wstgbp.historical
Documentation for eth_defi.wstgbp.historical Python module.
Historical reader for Wren Staked tGBP.
Classes
Read historical supply and NAV/share for Wren Staked tGBP. |
- class WSTGBPVaultHistoricalReader
Bases:
eth_defi.vault.base.VaultHistoricalReaderRead historical supply and NAV/share for Wren Staked tGBP.
wstGBP does not implement ERC-4626
convertToAssets()ortotalAssets(). Its canonical onchain share price isnavprice(). Historical TVL is thereforetotalSupply() * navprice()in the ERC-20 denomination returned bygem().Create a Wren Staked tGBP historical reader.
- Parameters
vault – Wren Staked tGBP vault adapter.
stateful – Whether to attach adaptive reader state used by the shared historical multicaller.
- __init__(vault, stateful)
Create a Wren Staked tGBP historical reader.
- Parameters
vault (WSTGBPVault) – Wren Staked tGBP vault adapter.
stateful (bool) – Whether to attach adaptive reader state used by the shared historical multicaller.
- construct_multicalls()
Construct Wren Staked tGBP historical multicalls.
- Returns
Multicall batch reading ERC-20
totalSupply()and wstGBPnavprice().- Return type
collections.abc.Iterable[eth_defi.event_reader.multicall_batcher.EncodedCall]
- process_result(block_number, timestamp, call_results)
Convert Wren Staked tGBP multicall results 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 for calls from
construct_multicalls().
- Returns
Historical NAV/share, supply, TVL and observed error information.
- Return type