Callable.signature()

Returns the function's or modifier's signature.

signature() β†’ str

Example

from glider import *
def query():
  functions = Functions().exec(100)

  functions_with_sig = []
  for function in functions:
    # Aggregate the signature of each function along with their name
    functions_with_sig.append({"function": function.name(), "sig": function.signature()})

  return functions_with_sig

Example output

[
  {
    "function": "transferOwnership",
    "sig": "transferOwnership(address)"
  },
  {
    "function": "safeTransferFrom",
    "sig": "safeTransferFrom(address,address,uint256)"
  },
  ...
]

Last updated