LazyTimestampContainer
Documentation for eth_defi.event_reader.lazy_timestamp_reader.LazyTimestampContainer Python class.
- class LazyTimestampContainer
Bases:
objectDictionary-like object to get block timestamps on-demand.
Lazily load any block timestamp over JSON-RPC API if we have not cached it yet.
See
extract_timestamps_json_rpc_lazy().TODO: This is not using middleware and fails to retry any failed JSON-RPC requests.
- Parameters
web3 – Connection
start_block – Start block range, inclusive
end_block – End block range, inclusive
Attributes summary
How many API requets we have made
Methods summary
__init__(web3, start_block, end_block[, ...])- param web3
update_block_hash(block_identifier)Internal function to get block timestamp from JSON-RPC and store it in the cache.
- __init__(web3, start_block, end_block, callback=None)
- api_call_counter
How many API requets we have made
- update_block_hash(block_identifier)
Internal function to get block timestamp from JSON-RPC and store it in the cache.