Callables.contracts()
Returns Contracts object for the contracts of the functions/modifiers.
contracts() →
Contracts
Returns the Contracts object for the contracts of the callables. This method can be called on all Callables child classes: Functions and Modifiers.
The function will account for the inheritance of the contracts, thus, even one callable can have multiple contracts where it is accessible.
Functions Example
from glider import *
def query():
# Retrieve the contracts of a list of functions
contracts = Functions().contracts().exec(100)
# Return the first five contracts
return contracts[:5]
Output:

Modifiers Example
from glider import *
def query():
# Retrieve the contracts of a list of modifiers
contracts = Modifiers().contracts().exec(100)
# Return the first five contracts
return contracts[:5]
Output:

Last updated