Skip to main content

GetBlockByHash

Blocks

Implements eth_getBlockByHash.

Params

(3)

1. shardId (required)

integer

The ID of the shard where the block was generated.

2. hash (required)

string

The hash of the block whose information is requested.

3. 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.

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

shardId

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,
null
],
"id": 1
}'