Functions.with_one_property()

with_one_property(properties: List[MethodProp]) β†’ Functions

Adds a filter to get functions that at least have one of the given properties.

Example

from glider import *

def query():
  
  # Fetch a list of functions which a external
  functions = Functions().with_one_property([MethodProp.EXTERNAL]).exec(10)

  return functions

Output

[
  {
    "contract": "0x798AcB51D8FBc97328835eE2027047a8B54533AD",
    "contract_name": "IERC165",
    "sol_function": "function supportsInterface(bytes4 interfaceId) external view returns (bool);"
  },
  {
    "contract": "0x798AcB51D8FBc97328835eE2027047a8B54533AD",
    "contract_name": "IERC721",
    "sol_function": "function supportsInterface(bytes4 interfaceId) external view returns (bool);"
  }
]

Last updated