Adds a filter to get callables that have any of the given signatures. Returns a filtered child object. This method can be called on all child classes: and .
To filter given a single signature, refer to .
Functions Example
from glider import *
def query():
# Retrieve all functions that have `approve(address)` or `claim(address,uint256)` as signatures
functions = Functions() \
.with_signatures([
"approve(address)",
"claim(address,uint256)"
]) \
.exec(100)
# Return the first five functions
return functions[:5]
Output:
Modifiers Example
from glider import *
def query():
# Retrieve all the modifiers that have `nonReentrant()` or `initializer()` as their signatures
modifiers = Modifiers() \
.with_signatures([
"nonReentrant()",
"initializer()"
]) \
.exec(100)
# Return the first five modifiers
return modifiers[:5]