WisdomTreeVaultHistoricalReader
Documentation for eth_defi.tokenised_fund.wisdomtree.historical.WisdomTreeVaultHistoricalReader Python class.
- class WisdomTreeVaultHistoricalReader
Bases:
eth_defi.vault.base.VaultHistoricalReaderRead on-chain token supply and official off-chain NAV history.
Create a read-only historical reader.
- Parameters
vault – WisdomTree tokenised-fund adapter.
stateful – Whether to persist adaptive scan state.
Attributes summary
addressfirst_blockMethods summary
__init__(vault, stateful)Create a read-only historical reader.
Construct the ERC-20 supply read.
process_result(block_number, timestamp, ...)Create a historical row, failing only this row if NAV is unavailable.
- __init__(vault, stateful)
Create a read-only historical reader.
- Parameters
vault (WisdomTreeVault) – WisdomTree tokenised-fund adapter.
stateful (bool) – Whether to persist adaptive scan state.
- construct_multicalls()
Construct the ERC-20 supply read.
- Returns
One
totalSupplymulticall.- Return type
collections.abc.Iterable[eth_defi.event_reader.multicall_batcher.EncodedCall]
- process_result(block_number, timestamp, call_results)
Create a historical row, failing only this row if NAV is unavailable.
- Parameters
block_number (int) – Archive block number.
timestamp (datetime.datetime) – Naive UTC block timestamp.
call_results (list[eth_defi.event_reader.multicall_batcher.EncodedCallResult]) – Supply read results.
- Returns
Supply, official NAV and calculated total assets where available.
- Return type