ValuationMulticallWrapper
Documentation for eth_defi.vault.valuation.ValuationMulticallWrapper Python class.
- class ValuationMulticallWrapper
Bases:
eth_defi.event_reader.multicall_batcher.MulticallWrapperWrap the undertlying Multicall with diagnostics data.
Because the underlying Multicall lib is not powerful enough.
And we do not have time to fix it
Attributes summary
quoterrouteamount_incallBound web3.py function with args in the place
contract_addressdebugSet for extensive info logging
Methods summary
__init__(call, debug, quoter, route, amount_in)Create underlying call about.
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(success, 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.
- get_key()
Get key that will identify this call in the result dictionary
- Return type
- create_multicall()
Create underlying call about.
- Return type
multicall.call.Call
- handle(success, raw_return_value)
Parse the call result.
- Parameters
succeed – Did we revert or not
raw_return_value (bytes) – Undecoded bytes from the Solidity function call
- Returns
The value placed in the return dict
- Return type
decimal.Decimal | None
- __init__(call, debug, quoter, route, amount_in)
- Parameters
call (web3.contract.contract.ContractFunction) –
debug (bool) –
quoter (eth_defi.vault.valuation.ValuationQuoter) –
route (eth_defi.vault.valuation.Route) –
amount_in (int) –
- Return type
None
- 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