Skip to main content

Don't have an RPC Node yet?

Start using RPC Nodes in your project today.

Get your free RPC Node
Version: 2.2

EVM RPC Schema

eth_blockNumber​

Executes a call to get the number of the most recent block.

Parameters

info

eth_blockNumber method does not accept any parameters.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1b4"
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client that must be returned by the server.
resultstringThe 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"
]
FieldTypeDescription
fromstring(optional) The address the transaction is sent from.
tostringThe address the transaction is directed to.
gasstring(optional) Integer of the gas provided for the transaction execution.
gasPricestring(optional) Integer of the gasPrice used for each paid gas.
valuestring(optional) Integer of the value sent with this transaction.
datastring(optional) Hash of the method signature and encoded parameters.
tagstring(optional) Tag for the state ("latest", "earliest", "pending"). Defaults to "latest" if null.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x"
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client that must be returned by the server.
resultstringThe result of the executed call.

eth_chainId​

Retrieves the current chain ID.

Parameters

info

eth_chainId method does not accept any parameters.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client that must be returned by the server.
resultstringThe 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"
]
FieldTypeDescription
fromstring(optional) The address the transaction is sent from.
tostringThe address the transaction is directed to.
gasstring(optional) Integer of the gas provided for the transaction execution.
gasPricestring(optional) Integer of the gasPrice used for each paid gas.
valuestring(optional) Integer of the value sent with this transaction.
datastring(optional) Hash of the method signature and encoded parameters.
blockTagstring(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"
}
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
accessListarrayAn array of access list object entries.
gasUsedstringThe 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"
}
]
FieldTypeDescription
fromstring(optional) The address the transaction is sent from.
tostringThe address the transaction is directed to.
gasstring(optional) Integer of the gas provided for the transaction execution.
gasPricestring(optional) Integer of the gasPrice used for each paid gas.
valuestring(optional) Integer of the value sent with this transaction.
datastring(optional) Hash of the method signature and encoded parameters.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client that must be returned by the server.
resultstringThe 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]]
FieldTypeDescription
blockCountstringNumber of blocks to return fee history for (hexadecimal).
newestBlockstringThe newest block (hexadecimal or one of the strings "latest", "earliest", "pending").
rewardPercentilesarray(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": []
}
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
oldestBlockstringThe oldest block number in the history (hexadecimal).
rewardarrayAn array of arrays with each item being a reward percentile.
baseFeePerGasarrayAn array of base fee per gas for each block (hexadecimal).
gasUsedRatioarrayAn array of ratios of gas used to gas limit for each block.

eth_gasPrice​

Returns the current price per gas in wei.

Parameters

info

eth_gasPrice method does not accept any parameters.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x4A817C800"
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client that must be returned by the server.
resultstringThe current price per gas in wei (hexadecimal).

eth_getBalance​

Returns the balance of the account of the given address.

Parameters

Example:

["0x0000000000000000000000000000000000000000", "latest"]
FieldTypeDescription
addressstringThe address to get the balance of.
blockTagstring(optional) The block number in hexadecimal or one of the strings "latest", "earliest", "pending".

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0234c8a3397aab58"
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client that must be returned by the server.
resultstringThe balance of the account at the provided address (hexadecimal).

eth_getBlockByHash​

Returns information about a block by hash.

Parameters

Example:

["0xbfddf451426ef49dc0b726480adfdbd660d64d45bfa49670834d67cf44c3f2e2", true]
FieldTypeDescription
blockHashstringThe hash of the block.
fullTxbooleanIf set to true, transactions are returned as objects; if false, only hashes are returned.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": {
// Block object
}
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultobjectObject with information about the block.

eth_getBlockByNumber​

Returns information about a block by block number.

Parameters

Example:

["0x1B4", false]
FieldTypeDescription
blockNumberstringThe block number in hexadecimal, or one of the strings "latest", "earliest", or "pending".
fullTxbooleanIf set to true, transactions are returned as objects; if false, only hashes are returned.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": {
// Block object
}
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultobjectObject 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"]
FieldTypeDescription
blockHashstringThe hash of the block.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x10"
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultstringThe 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:

["0x1B4"]
FieldTypeDescription
blockNumberstringThe block number in hexadecimal, or one of the strings "latest", "earliest", or "pending".

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x15"
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultstringThe 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"]
FieldTypeDescription
blockHashstringThe hash of the block to retrieve receipts for.

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": [
// Array of transaction receipt objects
]
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultarrayAn array containing the transaction receipts for all transactions in the specified block.

eth_getCode​

Returns code at a given address.

Parameters

Example:

["0x0000000000000000000000000000000000000000", "latest"]
FieldTypeDescription
addressstringThe address of the account.
blockTagstring(optional) The block number in hexadecimal or one of the strings "latest", "earliest", "pending".

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0xbfddf451426ef49dc0b726480adfdbd660d64d45bfa49670834d67cf44c3f2e2"
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultstringThe 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"]
}
]
FieldTypeDescription
fromBlockstring/number(optional) The number of the earliest block (hexadecimal or block number).
blockHashstring(optional) The hash of the block.
toBlockstring/number(optional) The number of the latest block (hexadecimal or block number).
addressstring/array(optional) An address or a list of addresses from which logs should originate.
topicsarray(optional) Array of 32-byte DATA topics. Order-dependent.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": [
// Array of log objects
]
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultarrayAn 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"
]
FieldTypeDescription
addressstringThe address of the account.
storageKeysarrayArray of storage keys.
blockTagstring(optional) The block number in hexadecimal or one of the strings "latest", "earliest", "pending".

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": {
// Account proof object
}
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultobjectObject containing the account and storage proofs.

eth_getStorageAt​

Returns the value from a storage position at a given address.

Parameters

Example:

["0x0000000000000000000000000000000000000000", "0x0", "latest"]
FieldTypeDescription
addressstringThe address of the storage.
storagePositionstringPosition in the storage.
blockTagstring(optional) The block number in hexadecimal or one of the strings "latest", "earliest", "pending".

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x..."
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultstringThe value from the given storage position (hexadecimal).

eth_getTransactionByHash​

Returns information about a transaction requested by transaction hash.

Parameters

Example:

["0x1a14ddf8d90ef3bdfa85e9d9d35f4abebfdff70606faa55b61404f1e78cb90fc"]
FieldTypeDescription
transactionHashstringThe hash of the transaction to get information about.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": {
// Transaction object
}
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultobjectAn object with information about the transaction.

eth_getTransactionByBlockHashAndIndex​

Returns information about a transaction by block hash and transaction index position.

Parameters

Example:

["0xe9de65582d5a210f3f5703e0d7dc1daf9fbb5a0670937f5d92283a41ea1bcb2b", "0x0"]
FieldTypeDescription
blockHashstringThe hash of the block.
transactionIndexstringThe index of the transaction in the block, in hexadecimal.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": {
// Transaction object
}
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultobjectAn object with information about the transaction.

eth_getTransactionByBlockNumberAndIndex​

Returns information about a transaction by block number and transaction index position.

Parameters

Example:

["0x1B4", "0x0"]
FieldTypeDescription
blockNumberstringThe block number in hexadecimal, or one of the strings "latest", "earliest", or "pending".
transactionIndexstringThe index of the transaction in the block, in hexadecimal.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": {
// Transaction object
}
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultobjectAn object with information about the transaction.

eth_getTransactionCount​

Returns the number of transactions sent from an address.

Parameters

Example:

["0x0000000000000000000000000000000000000000", "latest"]
FieldTypeDescription
addressstringThe address to get the number of transactions from.
blockTagstring(optional) The block number in hexadecimal or one of the strings "latest", "earliest", "pending".

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x10"
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultstringThe number of transactions sent from the address (hexadecimal).

eth_getTransactionReceipt​

Returns the receipt of a transaction by transaction hash.

Parameters

Example:

["0x1a14ddf8d90ef3bdfa85e9d9d35f4abebfdff70606faa55b61404f1e78cb90fc"]
FieldTypeDescription
transactionHashstringThe hash of the transaction to get the receipt for.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": {
// Transaction receipt object
}
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultobjectAn 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"]
FieldTypeDescription
blockHashstringThe hash of the block.
uncleIndexstringThe index of the uncle in the block, in hexadecimal.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": {
// Uncle block object
}
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultobjectAn 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:

["0x1B4", "0x0"]
FieldTypeDescription
blockNumberstringThe block number in hexadecimal, or one of the strings "latest", "earliest", or "pending".
uncleIndexstringThe index of the uncle in the block, in hexadecimal.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": {
// Uncle block object
}
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultobjectAn 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"]
FieldTypeDescription
blockHashstringThe hash of the block.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1"
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultstringThe 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:

[
"0x1B4" // Block number in hexadecimal or one of the strings "latest", "earliest", or "pending".
]
FieldTypeDescription
blockNumberstringThe block number in hexadecimal, or one of the strings "latest", "earliest", or "pending".

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x2"
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultstringThe number of uncles in the block with the given number (hexadecimal).

eth_maxPriorityFeePerGas​

Returns the current max priority fee per gas.

Parameters

info

eth_maxPriorityFeePerGas method does not accept any parameters.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x3B9ACA00"
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultstringThe current max priority fee per gas in wei (hexadecimal).

eth_sendRawTransaction​

Submits a pre-signed transaction for broadcast to the Ethereum network.

Parameters

Example:

["0x..."]
FieldTypeDescription
transactionDatastringThe signed transaction data in hexadecimal format.

Response

Example:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x..."
}
FieldTypeDescription
jsonrpcstringA string specifying the version of the JSON RPC protocol.
idnumberA unique identifier established by the client.
resultstringThe hash of the transaction after it's been submitted to the network.