EVM RPC Schema
eth_blockNumberβ
Executes a call to get the number of the most recent block.
Parameters
eth_blockNumber method does not accept any parameters.
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1b4"
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client that must be returned by the server. |
result | string | The number of the most recent block in hexadecimal. |
eth_callβ
Executes a new message call immediately without creating a transaction on the blockchain.
Parameters
Example:
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
Field | Type | Description |
---|
from | string | (optional) The address the transaction is sent from. |
to | string | The address the transaction is directed to. |
gas | string | (optional) Integer of the gas provided for the transaction execution. |
gasPrice | string | (optional) Integer of the gasPrice used for each paid gas. |
value | string | (optional) Integer of the value sent with this transaction. |
data | string | (optional) Hash of the method signature and encoded parameters. |
tag | string | (optional) Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client that must be returned by the server. |
result | string | The result of the executed call. |
eth_chainIdβ
Retrieves the current chain ID.
Parameters
eth_chainId method does not accept any parameters.
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client that must be returned by the server. |
result | string | The chain ID of the current network in hexadecimal. |
eth_createAccessListβ
Generates an access list for a transaction.
Parameters
Example:
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
},
"latest"
]
Field | Type | Description |
---|
from | string | (optional) The address the transaction is sent from. |
to | string | The address the transaction is directed to. |
gas | string | (optional) Integer of the gas provided for the transaction execution. |
gasPrice | string | (optional) Integer of the gasPrice used for each paid gas. |
value | string | (optional) Integer of the value sent with this transaction. |
data | string | (optional) Hash of the method signature and encoded parameters. |
blockTag | string | (optional) Block number in hexadecimal or one of the strings "latest", "earliest", or "pending". |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accessList": [],
"gasUsed": "0x"
}
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
accessList | array | An array of access list object entries. |
gasUsed | string | The amount of gas used with this access list in hexadecimal. |
eth_estimateGasβ
Generates an estimate of how much gas is necessary to allow the transaction to complete.
Parameters
Example:
[
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x0000000000000000000000000000000000000000",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0x9184e72a",
"data": "0x"
}
]
Field | Type | Description |
---|
from | string | (optional) The address the transaction is sent from. |
to | string | The address the transaction is directed to. |
gas | string | (optional) Integer of the gas provided for the transaction execution. |
gasPrice | string | (optional) Integer of the gasPrice used for each paid gas. |
value | string | (optional) Integer of the value sent with this transaction. |
data | string | (optional) Hash of the method signature and encoded parameters. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client that must be returned by the server. |
result | string | The estimated amount of gas to allow the transaction to complete. |
eth_feeHistoryβ
Retrieves the fee history for the requested block range.
Parameters
Example:
["0x4", "latest", [10, 20, 30]]
Field | Type | Description |
---|
blockCount | string | Number of blocks to return fee history for (hexadecimal). |
newestBlock | string | The newest block (hexadecimal or one of the strings "latest", "earliest", "pending"). |
rewardPercentiles | array | (optional) A list of block reward percentiles to report in ascending order. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"oldestBlock": "0x1b4",
"reward": [],
"baseFeePerGas": [],
"gasUsedRatio": []
}
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
oldestBlock | string | The oldest block number in the history (hexadecimal). |
reward | array | An array of arrays with each item being a reward percentile. |
baseFeePerGas | array | An array of base fee per gas for each block (hexadecimal). |
gasUsedRatio | array | An array of ratios of gas used to gas limit for each block. |
eth_gasPriceβ
Returns the current price per gas in wei.
Parameters
eth_gasPrice method does not accept any parameters.
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4A817C800"
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client that must be returned by the server. |
result | string | The current price per gas in wei (hexadecimal). |
eth_getBalanceβ
Returns the balance of the account of the given address.
Parameters
Example:
["0x0000000000000000000000000000000000000000", "latest"]
Field | Type | Description |
---|
address | string | The address to get the balance of. |
blockTag | string | (optional) The block number in hexadecimal or one of the strings "latest", "earliest", "pending". |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client that must be returned by the server. |
result | string | The balance of the account at the provided address (hexadecimal). |
eth_getBlockByHashβ
Returns information about a block by hash.
Parameters
Example:
["0xbfddf451426ef49dc0b726480adfdbd660d64d45bfa49670834d67cf44c3f2e2", true]
Field | Type | Description |
---|
blockHash | string | The hash of the block. |
fullTx | boolean | If set to true, transactions are returned as objects; if false, only hashes are returned. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
}
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | object | Object with information about the block. |
eth_getBlockByNumberβ
Returns information about a block by block number.
Parameters
Example:
Field | Type | Description |
---|
blockNumber | string | The block number in hexadecimal, or one of the strings "latest", "earliest", or "pending". |
fullTx | boolean | If set to true, transactions are returned as objects; if false, only hashes are returned. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
}
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | object | Object with information about the block. |
eth_getBlockTransactionCountByHashβ
Returns the number of transactions in a block from a block matching the given block hash.
Parameters
Example:
["0xbfddf451426ef49dc0b726480adfdbd660d64d45bfa49670834d67cf44c3f2e2"]
Field | Type | Description |
---|
blockHash | string | The hash of the block. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x10"
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | string | The number of transactions in the block with the given hash (hexadecimal). |
eth_getBlockTransactionCountByNumberβ
Returns the number of transactions in a block from a block matching the given block number.
Parameters
Example:
Field | Type | Description |
---|
blockNumber | string | The block number in hexadecimal, or one of the strings "latest", "earliest", or "pending". |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15"
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | string | The number of transactions in the block with the given number (hexadecimal). |
eth_getBlockReceiptsβ
Returns receipts of all transactions in a block matching the given block hash.
Parameters
["0xbfddf451426ef49dc0b726480adfdbd660d64d45bfa49670834d67cf44c3f2e2"]
Field | Type | Description |
---|
blockHash | string | The hash of the block to retrieve receipts for. |
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": [
]
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | array | An array containing the transaction receipts for all transactions in the specified block. |
eth_getCodeβ
Returns code at a given address.
Parameters
Example:
["0x0000000000000000000000000000000000000000", "latest"]
Field | Type | Description |
---|
address | string | The address of the account. |
blockTag | string | (optional) The block number in hexadecimal or one of the strings "latest", "earliest", "pending". |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0xbfddf451426ef49dc0b726480adfdbd660d64d45bfa49670834d67cf44c3f2e2"
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | string | The code from the given address (hexadecimal). |
eth_getLogsβ
Returns an array of all logs matching a given filter object.
Parameters
Example:
[
{
"fromBlock": "0x1",
"toBlock": "0x2",
"address": "0x8888f1f195afa192cfee860698584c030f4c9db1",
"topics": ["0x00000000000000000000000000000000"]
}
]
Field | Type | Description |
---|
fromBlock | string/number | (optional) The number of the earliest block (hexadecimal or block number). |
blockHash | string | (optional) The hash of the block. |
toBlock | string/number | (optional) The number of the latest block (hexadecimal or block number). |
address | string/array | (optional) An address or a list of addresses from which logs should originate. |
topics | array | (optional) Array of 32-byte DATA topics. Order-dependent. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": [
]
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | array | An array of log objects. |
eth_getProofβ
Returns the account and storage values of the specified account including the Merkle-proof.
Parameters
Example:
[
"0x0000000000000000000000000000000000000000",
["0x0000000000000000000000000000000000000000000000000000000000000000"],
"latest"
]
Field | Type | Description |
---|
address | string | The address of the account. |
storageKeys | array | Array of storage keys. |
blockTag | string | (optional) The block number in hexadecimal or one of the strings "latest", "earliest", "pending". |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
}
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | object | Object containing the account and storage proofs. |
eth_getStorageAtβ
Returns the value from a storage position at a given address.
Parameters
Example:
["0x0000000000000000000000000000000000000000", "0x0", "latest"]
Field | Type | Description |
---|
address | string | The address of the storage. |
storagePosition | string | Position in the storage. |
blockTag | string | (optional) The block number in hexadecimal or one of the strings "latest", "earliest", "pending". |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x..."
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | string | The value from the given storage position (hexadecimal). |
eth_getTransactionByHashβ
Returns information about a transaction requested by transaction hash.
Parameters
Example:
["0x1a14ddf8d90ef3bdfa85e9d9d35f4abebfdff70606faa55b61404f1e78cb90fc"]
Field | Type | Description |
---|
transactionHash | string | The hash of the transaction to get information about. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
}
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | object | An object with information about the transaction. |
eth_getTransactionByBlockHashAndIndexβ
Returns information about a transaction by block hash and transaction index position.
Parameters
Example:
["0xe9de65582d5a210f3f5703e0d7dc1daf9fbb5a0670937f5d92283a41ea1bcb2b", "0x0"]
Field | Type | Description |
---|
blockHash | string | The hash of the block. |
transactionIndex | string | The index of the transaction in the block, in hexadecimal. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
}
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | object | An object with information about the transaction. |
eth_getTransactionByBlockNumberAndIndexβ
Returns information about a transaction by block number and transaction index position.
Parameters
Example:
Field | Type | Description |
---|
blockNumber | string | The block number in hexadecimal, or one of the strings "latest", "earliest", or "pending". |
transactionIndex | string | The index of the transaction in the block, in hexadecimal. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
}
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | object | An object with information about the transaction. |
eth_getTransactionCountβ
Returns the number of transactions sent from an address.
Parameters
Example:
["0x0000000000000000000000000000000000000000", "latest"]
Field | Type | Description |
---|
address | string | The address to get the number of transactions from. |
blockTag | string | (optional) The block number in hexadecimal or one of the strings "latest", "earliest", "pending". |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x10"
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | string | The number of transactions sent from the address (hexadecimal). |
eth_getTransactionReceiptβ
Returns the receipt of a transaction by transaction hash.
Parameters
Example:
["0x1a14ddf8d90ef3bdfa85e9d9d35f4abebfdff70606faa55b61404f1e78cb90fc"]
Field | Type | Description |
---|
transactionHash | string | The hash of the transaction to get the receipt for. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
}
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | object | An object representing the transaction receipt. |
eth_getUncleByBlockHashAndIndexβ
Returns information about an uncle of a block by hash and uncle index position.
Parameters
Example:
["0xe9de65582d5a210f3f5703e0d7dc1daf9fbb5a0670937f5d92283a41ea1bcb2b", "0x0"]
Field | Type | Description |
---|
blockHash | string | The hash of the block. |
uncleIndex | string | The index of the uncle in the block, in hexadecimal. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
}
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | object | An object with information about the uncle block. |
eth_getUncleByBlockNumberAndIndexβ
Returns information about an uncle of a block by block number and uncle index position.
Parameters
Example:
Field | Type | Description |
---|
blockNumber | string | The block number in hexadecimal, or one of the strings "latest", "earliest", or "pending". |
uncleIndex | string | The index of the uncle in the block, in hexadecimal. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
}
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | object | An object with information about the uncle block. |
eth_getUncleCountByBlockHashβ
Returns the number of uncles in a block from a block matching the given block hash.
Parameters
Example:
["0xe9de65582d5a210f3f5703e0d7dc1daf9fbb5a0670937f5d92283a41ea1bcb2b"]
Field | Type | Description |
---|
blockHash | string | The hash of the block. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | string | The number of uncles in the block with the given hash (hexadecimal). |
eth_getUncleCountByBlockNumberβ
Returns the number of uncles in a block from a block matching the given block number.
Parameters
Example:
Field | Type | Description |
---|
blockNumber | string | The block number in hexadecimal, or one of the strings "latest", "earliest", or "pending". |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x2"
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | string | The number of uncles in the block with the given number (hexadecimal). |
eth_maxPriorityFeePerGasβ
Returns the current max priority fee per gas.
Parameters
eth_maxPriorityFeePerGas method does not accept any parameters.
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x3B9ACA00"
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | string | The current max priority fee per gas in wei (hexadecimal). |
eth_sendRawTransactionβ
Submits a pre-signed transaction for broadcast to the Ethereum network.
Parameters
Example:
Field | Type | Description |
---|
transactionData | string | The signed transaction data in hexadecimal format. |
Response
Example:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x..."
}
Field | Type | Description |
---|
jsonrpc | string | A string specifying the version of the JSON RPC protocol. |
id | number | A unique identifier established by the client. |
result | string | The hash of the transaction after it's been submitted to the network. |