CallGraph.name_suffix()

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

Returns a list of CallNode objects whose corresponding function name has the specified suffix.

Return type

β†’ List[CallNode]

from glider import *

def query():
  # Fetch the first contract
  contracts = Contracts().exec(1)
  
  # Get call nodes of functions ending with "Sender" 
  call_nodes = contracts[0].call_graph().name_suffix("Sender")
  for node in call_nodes:
    print(node.callable_name())
  return []

Output:

{
  "print_output": [
    "_msgSender"
  ]
}

Last updated