Ethereum API
eth_getBlockByHash
Overview
Ethereum API
- POSTeth_chainId
- POSTeth_call
- POSTeth_estimateGas
- POSTeth_gasPrice
- POSTeth_newFilter
- POSTeth_newBlockFilter
- POSTeth_uninstallFilter
- POSTeth_newPendingTransactionFilter
- POSTeth_getLogs
- POSTeth_getFilterLogs
- POSTeth_getFilterChanges
- POSTeth_getBalance
- POSTweb3_clientVersion
- POSTeth_getBlockByNumber
- POSTeth_getBlockByHash
- POSTeth_getBlockTransactionCountByNumber
- POSTeth_getBlockReceipts
- POSTeth_getBlockTransactionCountByHash
- POSTeth_getCode
- POSTeth_getStorageAt
- POSTeth_getTransactionCount
- POSTeth_sendRawTransaction
- POSTeth_accounts
- POSTeth_feeHistory
ZKSync API
- POSTzks_estimateFee
- POSTzks_estimateGasL1ToL2
- POSTzks_getBridgehubContract
- POSTzks_getMainContract
- POSTzks_getTestnetPaymaster
- POSTzks_getL1BatchBlockRange
- POSTzks_getL1BatchDetails
- POSTzks_L1BatchNumber
- POSTzks_L1ChainId
- POSTzks_getConfirmedTokens
- POSTzks_getAllAccountBalances
- POSTzks_getTransactionDetails
- POSTzks_getBlockDetails
- POSTzks_getBridgeContracts
- POSTzks_getBaseTokenL1Address
- POSTzks_getL2ToL1MsgProof
- POSTzks_getL2ToL1LogProof
- POSTzks_getRawBlockTransactions
- POSTzks_getBytecodeByHash
- POSTzks_getL1GasPrice
- POSTzks_getFeeParams
- POSTzks_getProtocolVersion
- POSTzks_getProof
- POSTzks_sendRawTransactionWithDetailedOutput
Debug API
PubSub API
Ethereum API
eth_getBlockByHash
Returns information about a block by hash
POST
/
eth_getBlockByHash
curl --request POST \
--url https://api.mainnet.abs.xyz/eth_getBlockByHash \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBlockByHash",
"params": [
"0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
false
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"number": "0x1b4",
"hash": "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
"parentHash": "0x59f0ff194fe56f5b5fe5436df726c0f6201ce7d6364a04361c7324cceb322a67",
"nonce": "0x0000000000000000",
"sha3Uncles": "0x0000000000000000000000000000000000000000000000000000000000000000",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"transactionsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"stateRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"receiptsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"miner": "0x0000000000000000000000000000000000000000",
"difficulty": "0x0",
"totalDifficulty": "0x0",
"extraData": "0x",
"size": "0x3e8",
"gasLimit": "0x6691b7",
"gasUsed": "0x5208",
"timestamp": "0x5d9676a0",
"transactions": [],
"uncles": []
}
}
Body
application/json
JSON-RPC version
The method to call
Block hash and transaction details flag
Request identifier
Response
200 - application/json
Returns block information
Example:
"2.0"
Example:
1
Was this page helpful?
curl --request POST \
--url https://api.mainnet.abs.xyz/eth_getBlockByHash \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBlockByHash",
"params": [
"0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
false
]
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"number": "0x1b4",
"hash": "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
"parentHash": "0x59f0ff194fe56f5b5fe5436df726c0f6201ce7d6364a04361c7324cceb322a67",
"nonce": "0x0000000000000000",
"sha3Uncles": "0x0000000000000000000000000000000000000000000000000000000000000000",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"transactionsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"stateRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"receiptsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
"miner": "0x0000000000000000000000000000000000000000",
"difficulty": "0x0",
"totalDifficulty": "0x0",
"extraData": "0x",
"size": "0x3e8",
"gasLimit": "0x6691b7",
"gasUsed": "0x5208",
"timestamp": "0x5d9676a0",
"transactions": [],
"uncles": []
}
}