Block Estimation State

The BlockEstimationState type is used to represent different block numbers or block states when interacting with the Ethereum/EVM blockchain.

Here's an explanation of each of the predefined constants:

  1. "safe": this constant represents a block number that is considered safe or finalized. It typically indicates a block that has undergone multiple confirmations and is unlikely to be reorganized or changed in the blockchain's history.

  2. "finalized": this constant represents a block number that is considered finalized. It signifies a block that has passed a certain level of consensus and security checks.

  3. "latest": This constant represents the latest or most recent block in the Ethereum blockchain. When used as a parameter, it refers to the current block at the time of the request.

  4. "pending": This constant represents a special state where the block number is not specified. When used, it typically indicates that the request should be executed in the context of the pending block or the next block to be mined.

  5. "earliest": This constant represents the earliest block in the Ethereum blockchain. When used as a parameter, it refers to the very first block (genesis block) in the blockchain's history.

These constants provide a convenient way to specify the block number or state when making requests to the Ethereum blockchain. For example, when querying for the balance of an Ethereum address at the "latest", you would get the current balance. When using "safe" or "finalized" you would query for a block that is considered secure and unlikely to change in the future.

By using these constants, Ethereum developers can interact with the blockchain at different points in its history, depending on their specific needs and use cases.

Last updated