vault_street.historical
Documentation for eth_defi.vault_street.historical Python module.
Historical reader for Vault Street primeUSD.
Classes
Read historical primeUSD supply and NAV/share. |
- class VaultStreetHistoricalReader
Bases:
eth_defi.vault.base.VaultHistoricalReaderRead historical primeUSD supply and NAV/share.
primeUSD is not ERC-4626. Its historical TVL is derived from the ERC-20
totalSupply()and Vault Street’sPriceStorage.getPrice()oracle.Create a Vault Street historical reader.
- Parameters
vault – Vault Street primeUSD adapter.
stateful – Whether to attach adaptive reader state for the shared historical scanner.
- __init__(vault, stateful)
Create a Vault Street historical reader.
- Parameters
vault (VaultStreetVault) – Vault Street primeUSD adapter.
stateful (bool) – Whether to attach adaptive reader state for the shared historical scanner.
- construct_multicalls()
Construct supply and NAV/share calls for a historical block.
- Returns
Multicall batch reading
totalSupply()andgetPrice().- Return type
collections.abc.Iterable[eth_defi.event_reader.multicall_batcher.EncodedCall]
- process_result(block_number, timestamp, call_results)
Convert primeUSD multicall results to a vault price row.
- Parameters
block_number (int) – Historical block number.
timestamp (datetime.datetime) – Naive UTC block timestamp.
call_results (list[eth_defi.event_reader.multicall_batcher.EncodedCallResult]) – Results from
construct_multicalls().
- Returns
Historical primeUSD supply, NAV/share and TVL.
- Return type