from glider import*defquery():# get if-instructions (to showcase how the function works) instructions =Instructions().if_instructions().exec(1,100)# get the same function where we have if, get it entry point and call next_block entry_point = instructions[0].get_parent().entry_point_instructions().exec()[0]# we should get instructions from entry point of the function up to the first if-statementreturn instructions + entry_point.next_block()
Output
"root":{4 items"contract":string"0x5e6b2027f794a069bfa5e80195e22544d40ae600""contract_name":string"NATEHALLINAN""sol_function":solidityfunction_transfer(address from,address to,uint256 amount ) internaloverride {require(from !=address(0),"ERC20: transfer from the zero address");require(to !=address(0),"ERC20: transfer to the zero address");require(!_blacklist[from] &&!_blacklist[to],"You are a bot");if (amount ==0) { super._transfer(from, to,0);return; }if (limitsInEffect){if ( from !=owner() && to !=owner() && to !=address(0) && to !=address(0xdead) &&!swapping ) { .... .... }"sol_instruction":soliditylimitsInEffect},"sol_instruction":solidityrequire(from !=address(0),"ERC20: transfer from the zero address")},"sol_instruction":solidityrequire(to !=address(0),"ERC20: transfer to the zero address")},"sol_instruction":solidityrequire(!_blacklist[from] &&!_blacklist[to],"You are a bot")},"sol_instruction":solidityamount ==0}
The output shows that the query returns all the instructions in the _setOwner() function