from glider import*defquery(): functions =Functions().exec(100) assembly = []for function in functions:for asm_instruction in function.end_assembly_instructions().exec():# For each function, return the assembly instructions assembly.append(asm_instruction)return assembly
Example output
[ {"contract":"0x798AcB51D8FBc97328835eE2027047a8B54533AD","contract_name":"ERC721URIStorage","sol_function": `// Formatted for the examplefunction_checkOnERC721Received(address from,address to,uint256 tokenId,bytesmemory_data ) privatereturns (bool) {if (to.isContract()) {tryIERC721Receiver(to).onERC721Received(_msgSender(),from,tokenId,_data) returns (bytes4 retval) {return retval == IERC721Receiver.onERC721Received.selector; } catch (bytesmemory reason) {if (reason.length ==0) {revert("ERC721: transfer to non ERC721Receiver implementer"); } else {assembly {revert(add(32,reason),mload(reason)) } } } } else {returntrue; } } `,"sol_instruction": `// Formatted for the exampleassembly {revert(add(32,reason),mload(reason)) } ` }, ...]