RPC Methods
Block & Chain
Testnet 122606
Section
RPC Methods
Documentation category
Type
Guide
Technical reference
Summary
Methods for querying block data, chain ID, and network version.
Article Content
eth_blockNumber
Returns the number of the most recent block.
Params: none
{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}
Result: string — hex-encoded block number
eth_chainId
Returns the chain ID used for transaction signing (EIP-155).
Params: none
Result: "0x1DEEE" — hex-encoded 122606
net_version
Returns the network ID as a decimal string.
Result: "122606"
eth_getBlockByNumber
Returns a block matching a given block number.
Params:
BLOCK— block number (hex) or tag:"latest","earliest","pending"FULL—trueto include full transaction objects;falsefor transaction hashes only
{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["latest", false],
"id": 1
}
Result: Block object
{
"number": "0x12D687",
"hash": "0xabc...",
"parentHash": "0xdef...",
"timestamp": "0x6849A3C0",
"gasLimit": "0x1C9C380",
"gasUsed": "0x5208",
"transactions": [],
"miner": "0x000..."
}
eth_getBlockByHash
Same as eth_getBlockByNumber but takes a block hash as the first parameter.
{ "method": "eth_getBlockByHash", "params": ["0xabc...", false] }
