AssetoVaultHistoricalReader
Documentation for eth_defi.tokenised_fund.asseto.historical.AssetoVaultHistoricalReader Python class.
- class AssetoVaultHistoricalReader
Bases:
eth_defi.vault.base.VaultHistoricalReaderRead Asseto historical supply and NAV/share.
Asseto’s
Pricercontract stores NAV/share in 18 decimal USD units. The token proxy exposes ERC-20 supply but is not an ERC-4626 vault, so the product TVL is calculated astotalSupply() * getLatestPrice().Create a historical reader.
- Parameters
vault – Asseto tokenised fund adapter.
stateful – Whether to attach adaptive read state.
Attributes summary
addressfirst_blockMethods summary
__init__(vault, stateful)Create a historical reader.
Construct the supply and NAV/share multicalls.
process_result(block_number, timestamp, ...)Convert supply and price call results to a price row.
- __init__(vault, stateful)
Create a historical reader.
- Parameters
vault (AssetoVault) – Asseto tokenised fund adapter.
stateful (bool) – Whether to attach adaptive read state.
- construct_multicalls()
Construct the supply and NAV/share multicalls.
- Returns
Calls for ERC-20 supply and Asseto NAV/share.
- Return type
collections.abc.Iterable[eth_defi.event_reader.multicall_batcher.EncodedCall]
- process_result(block_number, timestamp, call_results)
Convert supply and price call results to a price row.
- Parameters
block_number (int) – Block that was read.
timestamp (datetime.datetime) – Naive UTC block timestamp.
call_results (list[eth_defi.event_reader.multicall_batcher.EncodedCallResult]) – Results of calls constructed by
construct_multicalls().
- Returns
Asseto share price, supply and total assets at the block.
- Return type