agent0.utils.block_number_before_timestamp ========================================== .. py:module:: agent0.utils.block_number_before_timestamp .. autoapi-nested-parse:: Get the number of the block that is at or immediately before the given timestamp. .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: agent0.utils.block_number_before_timestamp.block_number_before_timestamp Module Contents --------------- .. py:function:: block_number_before_timestamp(web3: web3.Web3, block_timestamp: web3.types.Timestamp | int) -> eth_typing.BlockNumber Finds the closest block number that is before or at the given block time. :param web3: The web3 instance. :type web3: Web3 :param block_timestamp: The block time to find the closest block to. :type block_timestamp: BlockTime | int :returns: The closest block number to the given block time. :rtype: BlockNumber .. !! processed by numpydoc !!