tokenised_fund.shift.historical
Documentation for eth_defi.tokenised_fund.shift.historical Python module.
Historical valuation reads for ShiftVault products.
Classes
Read Shift's TVL-feed share price and ERC-20 supply at historical blocks. |
- class ShiftVaultHistoricalReader
Bases:
eth_defi.vault.base.VaultHistoricalReaderRead 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-20totalSupply()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
block_number (int) – Sampled EVM block.
timestamp (datetime.datetime) – Naive UTC timestamp for the sampled block.
call_results (list[eth_defi.event_reader.multicall_batcher.EncodedCallResult]) – Responses from
construct_multicalls().
- Returns
ShiftVault valuation and diagnostic data.
- Return type