Callables.with_signatures()

with_signatures(signatures: List[str]) โ†’ Callables

Adds a filter to get callables that have any of the given signatures. Returns a filtered Callables child object. This method can be called on all Callables child classes: Functions and Modifiers.

To filter given a single signature, refer to Callables.with_signature().

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

Output:

Last updated