Skip to main content

GetBlockByHash

Blocks

Implements eth_getBlockByHash.

Params

(2)

1. hash (required)

string

The hash of the block whose information is requested.

2. fullTx (required)

boolean

The flag that determines whether full transaction information is returned in the output.

Result

(rpcBlock)

The block whose information was requested.

Hash
string
required

The hash of the block.

MessageHashes
string
required

The hashes of messages included in the block.

Messages
messages
required

The messages included in the block.

Number
integer
required

The block number.

ParentHash
string
required

The hash of the parent block.

ReceiptsRoot
string
required

The root of the block receipts.

ShardId
integer
required

The ID of the shard where the block was generated.

API credentials

Username

Token

Params

hash

fullTx


Request

curl -X POST https://api.devnet.nil.foundation/api/undefined/undefined \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": [
null,
null
],
"id": 1
}'