Functions.extended_caller_modifiers()

Returns a Modifiers object representing the modifiers through which the functions from current Functions object could be called.

extended_caller_modifiers() β†’ Modifiers

The function will retrieve extended/inter-procedural modifiers, meaning it works recursively. It returns the Modifiers object representing all the modifiers that ultimately call the function in question.

Query Example

from glider import *

def query():
  funcs = Functions().with_name("onlyOwner").extended_caller_modifiers().exec(2)
  
  return funcs

Output Example

{
  "content": [
    {
      "contract": "0x80469265317ff8f00c3ce16576949986cebbc543",
      "contract_name": "OwnedUpgradable",
      "sol_modifier": solidity
        modifier onlyOwnerIfSet() {
            address theOwner = OwnableStorage.getOwner();
    
            // if owner is set then check if msg.sender is the owner
            if (theOwner != address(0)) {
                OwnableStorage.onlyOwner();
            }
    
            _;
        }
      "sol_modifier_souce_line": 88
    },
    {
      "contract": "0x80469265317ff8f00c3ce16576949986cebbc543",
      "contract_name": "OwnedUpgradable",
      "sol_modifier": solidity
        modifier onlyOwner() {
            OwnableStorage.onlyOwner();
    
            _;
        }
      "sol_modifier_souce_line": 79
    }
  ]
}

Last updated