UpshiftMultiAssetHistoricalReader
Documentation for eth_defi.erc_4626.vault_protocol.upshift.vault.UpshiftMultiAssetHistoricalReader Python class.
- class UpshiftMultiAssetHistoricalReader
Bases:
eth_defi.vault.base.VaultHistoricalReaderRead Upshift multi-asset vault accounting history.
Upshift multi-asset vaults are not plain ERC-4626 share-token contracts. The vault proxy exposes accounting methods like
getSharePrice()andgetTotalAssets(), whilelpTokenAddress()points to the ERC-20 share token used for name, symbol, decimals and total supply.Relevant verified implementation: Upshift multiAssetVault.
Create a historical reader for Upshift multi-asset vaults.
- Parameters
vault – Upshift vault adapter.
stateful – Whether to attach adaptive reader state used by the shared historical multicaller.
Attributes summary
addressfirst_blockMethods summary
__init__(vault, stateful)Create a historical reader for Upshift multi-asset vaults.
Construct historical multicalls for Upshift multi-asset vaults.
process_result(block_number, timestamp, ...)Convert Upshift multi-asset multicalls to a vault price row.
- __init__(vault, stateful)
Create a historical reader for Upshift multi-asset vaults.
- Parameters
vault (eth_defi.erc_4626.vault_protocol.upshift.vault.UpshiftVault) – Upshift vault adapter.
stateful (bool) – Whether to attach adaptive reader state used by the shared historical multicaller.
- construct_multicalls()
Construct historical multicalls for Upshift multi-asset vaults.
- Returns
Calls for vault share price, NAV, LP token supply, pause flags and configured maximum deposit/withdrawal amounts.
- Return type
collections.abc.Iterable[eth_defi.event_reader.multicall_batcher.EncodedCall]
- process_result(block_number, timestamp, call_results)
Convert Upshift multi-asset multicalls to a vault price row.
- Parameters
block_number (int) – Historical block number.
timestamp (datetime.datetime) – Naive UTC block timestamp.
call_results (list[eth_defi.event_reader.multicall_batcher.EncodedCallResult]) – Multicall results created by
construct_multicalls().
- Returns
VaultHistoricalReadwith Upshift share price, NAV and LP token supply.- Return type