VaultHistoricalReader

Documentation for eth_defi.vault.base.VaultHistoricalReader Python class.

class VaultHistoricalReader

Bases: abc.ABC

Support reading historical vault share prices.

  • Allows to construct historical returns

Attributes summary

address

first_block

Methods summary

__init__(vault)

construct_multicalls()

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()

Return type

Iterable[eth_defi.event_reader.multicall_batcher.EncodedCall]

abstract process_result(block_number, timestamp, call_results)

Process the result of mult

Parameters
Return type

eth_defi.vault.base.VaultHistoricalRead