You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DApps will request chainId and blocknumber continuously (e.g. look at uniswap dapp network console). There is not any RPC methods that return ChainId information outside of eth_chainId. This seems useful, so include it in block number and block timestamp response and we got this.
eth_getBlockState
Motivation
DApps will request chainId and blocknumber continuously (e.g. look at uniswap dapp network console). There is not any RPC methods that return ChainId information outside of eth_chainId. This seems useful, so include it in block number and block timestamp response and we got this.
Method Name
eth_getBlockState
Description
Returns the chain ID, block number, and block state and block timestamp for the specified block parameter.
Note
Need to add block.timestamp in response and request, just thought of it as I am typing this meow
Parameters
blockParameter
- An object containing one of the following block state identifiers:{ "blockNumber": "earliest" }
- Earliest/genesis block{ "blockNumber": "latest" }
- Latest canonical block{ "blockNumber": "pending" }
- Pending state/transactions{ "blockNumber": "safe" }
- Most recent safe block{ "blockNumber": "finalized" }
- Most recent finalized blockReturns
Object - A block state object containing:
chainId
: STRING - The chain ID in hexadecimal formatblockNumber
: STRING - The block number in hexadecimal formatblockState
: STRING - One of: "earliest", "latest", "pending", "safe", "finalized"Example Request
Example Response
Error Codes
Specification Notes
EIP-1898 Compliance
blockNumber
fieldEIP-1474 Compliance
eth_
namespace conventionAdditional Requirements
The text was updated successfully, but these errors were encountered: