Adds a filter to get callables having specified argument types like "address" or even non-elementary types like structs is strict ordering. Returns a filtered Callables child object. This method can be called on all Callables child classes: Functions and Modifiers.
Note that the order of the argument types is important. I.e. calling .with_arg_types(["a", "b"]) is not equivalent to calling .with_arg_types(["b", "a"]) !
Note that the function will handle alias types, e.g. if uint256 is passed to the function, the results will also include the alias "uint" variables
Functions Example
from glider import*defquery():# Retrieve the functions that have `uint256` and `address` as argument types functions =Functions().with_arg_types(["uint256", "address"]).exec(100)# Return the first five functionsreturn functions[0:5]
from glider import*defquery():# Retrieve the modifiers that have `uint256` and `State` as their argument types modifiers =Modifiers().with_arg_types(["uint256", "State"]).exec(100)# Return the first five modifiersreturn modifiers[0:5]
Output:
[ {"contract":"0x7f62DB88eB9BE16D1B597094bDC3f5Ad84D3B6ea","contract_name":"Lists", "sol_modifier": "modifier isListState(uint _id,State _state) {\n require (\n idToList[_id].state == _state,\"list state is not valid\"\n );\n _;\n }"
}]