Callable.instructions_recursive()
Returns the set of all instructions from the current function entry in the control flow graph.
Query Example
from glider import *
def query():
# Let's find a function with name transferFrom
functions = Functions().with_name('transferOwnership').exec(1)
# Print the code of the function
print(functions[0].source_code())
# Return the list of (recursive) instructions, as it return a set, we need to cast it to list
return list(functions[0].instructions_recursive().exec(10))
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}Example Output

















Last updated