CallNode.callee_modifiers()

Returns Modifiers object for the modifiers that are called from the current node corresponding callable.

callee_modifiers() β†’ Modifiers

Query Example

from glider import *

def query():
    contracts = Contracts().exec(10,1)
    contract = contracts[0]

    call_nodes = contract.call_graph().all_nodes()
    call_node = call_nodes[31]
    call_node_name = call_node.callable_name()
    
    for modifier in call_node.callee_modifiers().exec():
        print(f"Function name: {call_node_name} | Callee modifier name: {modifier.name}")

    return []

Output Example

[
  {
    "print_output": [
      "Function name: renounceOwnership | Callee modifier name: onlyOwner"
    ]
  }
]

Last updated