Functions.without_modifier_name()

without_modifier_name(name: str, sensitivity: bool = True) β†’ Functions

Adds a filter to get functions that either have no modifier with the given name or have no modifier at all.

Example

from glider import *

def query():
  
  # Fetch a list of functions without onlyOwner modifier
  functions = Functions().without_modifier_name('onlyOwner').exec(10)

  return functions

Output

[
  {
    "contract": "0x798AcB51D8FBc97328835eE2027047a8B54533AD",
    "contract_name": "Context",
    "sol_function": "function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }"
  },
  {
    "contract": "0x798AcB51D8FBc97328835eE2027047a8B54533AD",
    "contract_name": "Context",
    "sol_function": "function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }"
  }
]

Last updated