WisdomTreeVaultHistoricalReader

Documentation for eth_defi.tokenised_fund.wisdomtree.historical.WisdomTreeVaultHistoricalReader Python class.

class WisdomTreeVaultHistoricalReader

Bases: eth_defi.vault.base.VaultHistoricalReader

Read 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

address

first_block

Methods summary

__init__(vault, stateful)

Create a read-only historical reader.

construct_multicalls()

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 totalSupply multicall.

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
Returns

Supply, official NAV and calculated total assets where available.

Return type

eth_defi.vault.base.VaultHistoricalRead