CallGraph.with_name_not()

with_name_not(name: str, sensitivity: bool = True) β†’ List[CallNode]

Returns a list of call nodes whose corresponding function doesn't have the specified name.

Return type

β†’ List[CallNode]

from glider import *

def query():
  # Fetch the first contract
  contracts = Contracts().exec(1)
  
  # Get call nodes of functions whose name is not "_msgSender"
  call_nodes = contracts[0].call_graph().with_name_not("_msgSender")
  for node in call_nodes:
    print(node.callable_name())
  return []

Output:

{
  "print_output": [
    "_msgData"
  ]
}

Last updated