from glider import*defquery(): functions =Functions().exec(100) if_instructions = []for function in functions:for instruction in function.if_instructions().exec(): if_instructions.append(instruction)return if_instructions
Example output
[ {"contract":"0x798AcB51D8FBc97328835eE2027047a8B54533AD","contract_name":"ERC721URIStorage","sol_function": `// Formatted for the examplefunctiontokenURI(uint256 tokenId) publicviewvirtualoverridereturns (stringmemory) {require(_exists(tokenId),"ERC721URIStorage: URI query for nonexistent token");stringmemory _tokenURI = _tokenURIs[tokenId];stringmemory base =_baseURI();if (bytes(base).length ==0) {return _tokenURI; }if (bytes(_tokenURI).length >0) {returnstring(abi.encodePacked(base,_tokenURI)); }return super.tokenURI(tokenId); } `,"sol_instruction":"bytes(base).length == 0" }, { ..."sol_instruction":"bytes(_tokenURI).length > 0" }, ...]