tokenised_fund.shift.historical

Documentation for eth_defi.tokenised_fund.shift.historical Python module.

Historical valuation reads for ShiftVault products.

Classes

ShiftVaultHistoricalReader

Read Shift's TVL-feed share price and ERC-20 supply at historical blocks.

class ShiftVaultHistoricalReader

Bases: eth_defi.vault.base.VaultHistoricalReader

Read Shift’s TVL-feed share price and ERC-20 supply at historical blocks.

Create a historical ShiftVault reader.

Parameters
  • vault – ShiftVault adapter to read.

  • stateful – Whether adaptive reader state should be retained.

__init__(vault, stateful)

Create a historical ShiftVault reader.

Parameters
  • vault (ShiftVault) – ShiftVault adapter to read.

  • stateful (bool) – Whether adaptive reader state should be retained.

Return type

None

construct_multicalls()

Build share-price and supply reads.

Returns

Shift getSharePrice() and ERC-20 totalSupply() calls.

Return type

collections.abc.Iterable[eth_defi.event_reader.multicall_batcher.EncodedCall]

process_result(block_number, timestamp, call_results)

Convert Shift historical calls into a price row.

Parameters
Returns

ShiftVault valuation and diagnostic data.

Return type

eth_defi.vault.base.VaultHistoricalRead