APIList
A APIList integrates classic list operations with advanced features. It allows functions to be applied to all elements, enables list refinement using filter() function, and includes a fallback mechanism to ensure default behavior when no transformations or filtering are applied.
APIList Functionality
A APIList supports all classic list operation, such as indexing, iteration, and length calculations. Functions called on the list are applied to every element, resulting a new APIList with the processed data.
The filter() function
filter() functionThe filter() function uses a predicate to evaluate each element of the APIList. Elements where the predicate returns true are retained, while others are excluded, allowing precise control over the final list content.
Flattening
When a function return another APIList, the results are flattened into a single, one-dimensional APIList. This ensures a unified list structure, facilitating easier processing and analysis.
Functions that return APIList
callables.exec()
callable.callee_values()
callable.loops()
functions.list()
modifiers.list()
modifier.properties()
instructions.exec()
instructions.list()
instruction.get_dests()instruction.get_components()
breakinstruction.get_block_instructions()
startassemblyinstruction.get_block_instructions()
tryinstruction.get_block_instructions()
value.get_callee_values()
value.get_local_vars()
tupleexpression.get_components()
value.expression.get_components()
value.get_dests()
varvalue.get_defining_points()
point.df_reaches_from_functions_arguments()
point.df_reaching_functions_arguments()
argumentpoint.list()
argumentpoint.with_memory_type()
argumentpoint.with_name()
argumentpoint.with_type()
argumentpoint.with_type_convertible()
globalvariables.list()
localvariables.list()
localvariables.with_memory_type()
localvariables.with_type()
statevariables.exec()
statevariables.list()
callnode.callees()
callnode.callers()
contract.get_contracts_from_same_src_file()
contracts().exec()
enums.exec()
errors.exec()
events.exec()
Last updated