MulticallWrapper
Documentation for eth_defi.event_reader.multicall_batcher.MulticallWrapper Python class.
- class MulticallWrapper
Bases:
abc.ABCWrap a call going through the Multicall contract.
Each call in the batch is represented by one instance of
MulticallWrapperThis class must be subclassed and needed
get_key(),handle()and__repr__()
Attributes summary
Bound web3.py function with args in the place
Set for extensive info logging
contract_addressMethods summary
__init__(call, debug)get_address_and_data()Get Solidity args as human readable string for debugging.
get_human_id()get_key()Get key that will identify this call in the result dictionary
handle(succeed, raw_return_value)Parse the call result.
multicall_callback(succeed, raw_return_value)Convert the raw Solidity function call result to a denominated token amount.
- call: web3.contract.contract.ContractFunction
Bound web3.py function with args in the place
- debug: bool
Set for extensive info logging
- abstract get_key()
Get key that will identify this call in the result dictionary
- Return type
- abstract handle(succeed, raw_return_value)
Parse the call result.
- get_human_args()
Get Solidity args as human readable string for debugging.
- Return type
- multicall_callback(succeed, raw_return_value)
Convert the raw Solidity function call result to a denominated token amount.
Multicall library callback
- __init__(call, debug)
- Parameters
call (web3.contract.contract.ContractFunction) –
debug (bool) –
- Return type
None