Parameters for eth_getBlockByNumber: [blockNumber, fullTransactions].Positional parameters for eth_getBlockByNumber:
params[0]: Block identifier. Can be an integer block number or a string tag: “latest”, “earliest”, or “pending”.
params[1]: If true, returns the full transaction objects. If false, returns only the transaction hashes.
Returns
object
A block object returned by Ethereum RPC. Null if no block is found.
Show properties
string
The block number. Null when pending.
string
Hash of the block. Null when pending.
string
Hash of the parent block.
string
8 Bytes - Proof-of-work nonce. Null when pending. Missing in Proof-of-Authority (PoA) networks.
string
SHA3 of the uncles data in the block.
string
The bloom filter for the logs of the block. Null when pending.
string
Root of the transaction trie of the block.
string
Root of the final state trie of the block.
string
Root of the receipts trie of the block.
string
Address of the author (beneficiary) of the block.
string
Alias of “author”.
string
Difficulty for this block.
string
Total difficulty of the chain until this block.
string
Extra data field of this block.
string
Size of the block in bytes.
string
Maximum gas allowed in this block.
string
Total used gas by all transactions in this block.
string
Unix timestamp for when the block was collated.
array
Array of either full transaction objects or transaction hashes (32-byte strings).
Show items
oneOf
Legacy transaction (pre-EIP-2718).
Show variants
object
Legacy transaction (pre-EIP-2718).
Show properties
string
32 Bytes - hash of the transaction.
integer
Quantity - (optional) Integer of a nonce. This allows you to overwrite your own pending transactions that use the same nonce.
string
32 Bytes - hash of the block where this transaction was included. Null when pending.
oneOf
Block number where this transaction was included. Null when pending.
Show variants
integer
string
integer
The transaction’s index position in the block. Null when pending.
string
20 Bytes - The address the transaction is sent from.
string
20 Bytes - The address the transaction is directed to. (Optional when creating new contract)
integer
Quantity - (optional) Integer of the value sent with this transaction.
integer
Quantity - (optional) Integer of the gas price used for each paid gas.
integer
Quantity - (optional) Integer of the gas provided for the transaction execution. (eth_call consumes zero gas)
string
The data sent along with the transaction.
integer
The standardised V field of the signature.
integer
The standardised V field of the signature (0 or 1). Only applicable to legacy transactions.
integer
The R field of the signature.
string
Raw transaction data.
string
Public key of the signer.
integer
The chain id of the transaction, if any.
string
Creates contract hash.
oneOf
Conditional submission of the transaction. Can be an object with a block number ({ block: 1 }), a UTC timestamp in seconds ({ time: 1491290692 }), or null.