FranklinVaultHistoricalReader

Documentation for eth_defi.tokenised_fund.franklin.historical.FranklinVaultHistoricalReader Python class.

class FranklinVaultHistoricalReader

Bases: eth_defi.vault.base.VaultHistoricalReader

Read historical Benji share supply and issuer-published reference price.

Create the historical reader.

Parameters
  • vault – Franklin Templeton Benji tokenised-fund adapter.

  • stateful – Whether to attach the shared adaptive reader state.

Attributes summary

address

first_block

Methods summary

__init__(vault, stateful)

Create the historical reader.

construct_multicalls()

Construct total-supply and reference-price calls.

process_result(block_number, timestamp, ...)

Convert supply and price calls into a historical fund row.

__init__(vault, stateful)

Create the historical reader.

Parameters
  • vault (FranklinVault) – Franklin Templeton Benji tokenised-fund adapter.

  • stateful (bool) – Whether to attach the shared adaptive reader state.

construct_multicalls()

Construct total-supply and reference-price calls.

Returns

ERC-20 supply and lastKnownPrice calls for every sample block.

Return type

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

process_result(block_number, timestamp, call_results)

Convert supply and price calls into a historical fund row.

Parameters
Returns

Benji share price, supply and USD TVL at the sampled block.

Return type

eth_defi.vault.base.VaultHistoricalRead