Blocks

Examples

blocks

Reference

async ctc.evm.async_get_block(block, include_full_transactions=False, provider=None)
Parameters
  • block (Union[SupportsRound, str, int, Literal['latest'], Literal['earliest'], Literal['pending']]) –

  • include_full_transactions (<class 'bool'>) –

  • provider (Union[str, PartialProvider, Provider, NoneType]) –

Return type

<class ‘Block’>

async ctc.evm.async_get_block_of_timestamp(timestamp, nary=None, cache=None, block_timestamps=None, block_timestamp_array=None, block_number_array=None, verbose=False, provider=None, use_db=True)
Parameters
  • timestamp (Union[int, float, str, datetime]) –

  • nary (Union[int, NoneType]) –

  • cache (Union[BlockTimestampSearchCache, NoneType]) –

  • block_timestamps (Union[Mapping[int, int], NoneType]) –

  • block_timestamp_array (Union[Any, NoneType]) –

  • block_number_array (Union[Any, NoneType]) –

  • verbose (<class 'bool'>) –

  • provider (Union[str, PartialProvider, Provider, NoneType]) –

  • use_db (<class 'bool'>) –

Return type

<class ‘int’>

async ctc.evm.async_get_blocks(blocks, include_full_transactions=False, chunk_size=500, provider=None)
async ctc.evm.async_get_blocks_of_timestamps(timestamps, block_timestamps=None, block_number_array=None, block_timestamp_array=None, nary=None, cache=None, provider=None, use_db=None)

once parallel node search created, use that

Parameters
  • timestamps (Sequence[int]) –

  • block_timestamps (Optional[Mapping[int, int]]) –

  • block_number_array (Optional[NumpyArray]) –

  • block_timestamp_array (Optional[NumpyArray]) –

  • nary (Optional[int]) –

  • cache (Optional[BlockTimestampSearchCache]) –

  • provider (ProviderSpec) –

  • use_db (bool | None) –

Return type

list[int]