VaultHistoricalReader
Documentation for eth_defi.vault.base.VaultHistoricalReader Python class.
- class VaultHistoricalReader
Bases:
abc.ABCSupport reading historical vault share prices.
Allows to construct historical returns
Attributes summary
addressfirst_blockMethods summary
__init__(vault)Create smart contract calls needed to read the historical state of this vault.
process_result(block_number, timestamp, ...)Process the result of mult
- __init__(vault)
- Parameters
vault (eth_defi.vault.base.VaultBase) –
- abstract construct_multicalls()
Create smart contract calls needed to read the historical state of this vault.
Multicall machinery will call these calls at a specific block and report back to
process_result()
- abstract process_result(block_number, timestamp, call_results)
Process the result of mult
Calls are created in
construct_multicalls()This method combines result of this calls to a easy to manage historical record
VaultHistoricalRead
- Parameters
block_number (int) –
timestamp (datetime.datetime) –
call_results (list[eth_defi.event_reader.multicall_batcher.EncodedCallResult]) –
- Return type