Skip to main content

GetBlockByNumber

Blocks

Implements eth_getBlockByNumber.

Params

(3)

1. shardId (required)

integer

The ID of the shard where the block was generated.

2. blockNumber (required)

integer

The number 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.

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

shardId

blockNumber

fullTx


Request

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