wstgbp.historical

Documentation for eth_defi.wstgbp.historical Python module.

Historical reader for Wren Staked tGBP.

Classes

WSTGBPVaultHistoricalReader

Read historical supply and NAV/share for Wren Staked tGBP.

class WSTGBPVaultHistoricalReader

Bases: eth_defi.vault.base.VaultHistoricalReader

Read historical supply and NAV/share for Wren Staked tGBP.

wstGBP does not implement ERC-4626 convertToAssets() or totalAssets(). Its canonical onchain share price is navprice(). Historical TVL is therefore totalSupply() * navprice() in the ERC-20 denomination returned by gem().

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 wstGBP navprice().

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
Returns

Historical NAV/share, supply, TVL and observed error information.

Return type

eth_defi.vault.base.VaultHistoricalRead