Callable.get_contract()
Returns the parent contract of the function/modifier if exists, otherwise (global functions) returns NoneObject.
Example
from glider import *
def query():
functions = Functions().without_modifier_names(["onlyOwner"]).exec(100)
contracts = []
for function in functions:
# For each function without an "onlyOwner" modifier, return the contract
contracts.append(function.get_contract())
return contractsExample output

Last updated