All Products

Tenderly Node
Brief JSON RPC reference

Brief JSON RPC reference

This page shows a brief overview of supported Ethereum JSON RPC calls. Find a detailed list of supported calls.

Ethereum JSON-RPC API

eth_getBlockByHash

Returns information about a block by hash.

Detailed version

Result

Block information

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": ["0x5a10754ae6c673ebabb1a78166232c6b88633d50fafe1499392dd6e4c61c344e", false]
}

eth_getBlockByNumber

Returns information about a block by number.

Detailed version

Result

Block information

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": ["latest", false]
}

eth_getBlockTransactionCountByHash

Returns the number of transactions in a block from a block matching the given block hash.

Detailed version

Result

Transaction count

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": ["0x5a10754ae6c673ebabb1a78166232c6b88633d50fafe1499392dd6e4c61c344e"]
}

eth_getBlockTransactionCountByNumber

Returns the number of transactions in a block matching the given block number.

Detailed version

Result

Transaction count

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByNumber",
  "params": ["latest"]
}

eth_getUncleCountByBlockHash

Returns the number of uncles in a block from a block matching the given block hash.

Detailed version

Result

Uncle count

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": ["0x5a10754ae6c673ebabb1a78166232c6b88633d50fafe1499392dd6e4c61c344e"]
}

eth_getUncleCountByBlockNumber

Returns the number of transactions in a block matching the given block number.

Detailed version

Result

Uncle count

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": ["latest"]
}

eth_chainId

Returns the chain ID of the current network.

Detailed version

Result

Chain ID

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_chainId",
  "params": []
}

eth_syncing

Returns an object with data about the sync status or false.

Detailed version

Result

Syncing status

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_syncing",
  "params": []
}

eth_accounts

Returns a list of addresses owned by client.

Detailed version

Result

Accounts

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_accounts",
  "params": []
}

eth_blockNumber

Returns the number of most recent block.

Detailed version

Result

Block number

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_blockNumber",
  "params": []
}

eth_call

Executes a new message call immediately without creating a transaction on the block chain.

Detailed version

Result

Return data

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [
    {
      "from": "0xDC6bDc37B2714eE601734cf55A05625C9e512461",
      "to": "0xff39a3e734fe363e631441f6d24c7539240c2628",
      "value": "0x0",
      "data": "0x2e7700f0"
    },
    "latest"
  ]
}

eth_estimateGas

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.

Detailed version

Result

Gas used

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [
    {
      "from": "0xDC6bDc37B2714eE601734cf55A05625C9e512461",
      "to": "0xff39a3e734fe363e631441f6d24c7539240c2628",
      "value": "0x0",
      "data": "0x2e7700f0"
    },
    "latest"
  ]
}

eth_createAccessList

Generates an access list for a transaction.

Detailed version

Result

Gas used

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_createAccessList",
  "params": [
    {
      "from": "0xDC6bDc37B2714eE601734cf55A05625C9e512461",
      "to": "0xff39a3e734fe363e631441f6d24c7539240c2628",
      "value": "0x0",
      "data": "0x2e7700f0"
    },
    "latest"
  ]
}

eth_gasPrice

Returns the current price per gas in wei.

Detailed version

Result

Gas price

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_gasPrice",
  "params": []
}

eth_maxPriorityFeePerGas

Returns the current maxPriorityFeePerGas per gas in wei.

Detailed version

Result

Max priority fee per gas

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_maxPriorityFeePerGas",
  "params": []
}

eth_feeHistory

Transaction fee history

Detailed version

Result

feeHistoryResult Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_feeHistory",
  "params": [2, "latest", []]
}

eth_newFilter

Creates a filter object, based on filter options, to notify when the state changes (logs).

Detailed version

Result

Filter Identifier

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [
    {
      "fromBlock": 7878500,
      "toBlock": 7878700,
      "topics": [
        "0x5445f318f4f5fcfb66592e68e0cc5822aa15664039bd5f0ffde24c5a8142b1ac",
        "0x000000000000000000000000dc6bdc37b2714ee601734cf55a05625c9e512461",
        "0x0000000000000000000000000000000000000000000000000000000000000000"
      ]
    }
  ]
}

eth_newBlockFilter

Creates a filter in the node, to notify when a new block arrives.

Detailed version

Result

Filter Identifier

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_newBlockFilter",
  "params": []
}

eth_newPendingTransactionFilter

Creates a filter in the node, to notify when a new pending transaction arrives.

Detailed version

Result

Filter Identifier

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_newPendingTransactionFilter",
  "params": []
}

eth_getFilterChanges

Polling method for a filter, which returns an array of logs which occurred since last poll.

Detailed version

Result

Log objects

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": ["0x433e8e72506124c82ccbb4095b73544422b46a5cc6b2557c386bddf1b0d1f736"]
}

eth_getFilterLogs

Returns an array of all logs matching filter with given id.

Detailed version

Result

Log objects

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": ["0x433e8e72506124c82ccbb4095b73544422b46a5cc6b2557c386bddf1b0d1f736"]
}

eth_getLogs

Returns an array of all logs matching filter with given id.

Detailed version

Result

Log objects

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [
    {
      "fromBlock": 7878500,
      "toBlock": 7878700,
      "topics": [
        "0x5445f318f4f5fcfb66592e68e0cc5822aa15664039bd5f0ffde24c5a8142b1ac",
        "0x000000000000000000000000dc6bdc37b2714ee601734cf55a05625c9e512461",
        "0x0000000000000000000000000000000000000000000000000000000000000000"
      ]
    }
  ]
}

eth_mining

Returns whether the client is actively mining new blocks.

Detailed version

Result

Mining status

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_mining",
  "params": []
}

eth_hashrate

Returns the number of hashes per second that the node is mining with.

Detailed version

Result

Mining status

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_hashrate",
  "params": []
}

eth_getBalance

Returns the balance of the account of given address.

Detailed version

Result

Balance

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": ["0x05c476a8b9a1a69c47ca81944fbb13a1ac55d62b", "latest"]
}

eth_getStorageAt

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

Detailed version

Result

Value

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": [
    "0x05c476a8b9a1a69c47ca81944fbb13a1ac55d62b",
    "0x0000000000000000000000000000000000000000000000000000000000000001",
    "latest"
  ]
}

eth_getTransactionCount

Returns the number of transactions sent from an address.

Detailed version

Result

Transaction count

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": ["0x05c476a8b9a1a69c47ca81944fbb13a1ac55d62b", "latest"]
}

eth_getCode

Returns code at a given address.

Detailed version

Result

Bytecode

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getCode",
  "params": ["0x05c476a8b9a1a69c47ca81944fbb13a1ac55d62b", "latest"]
}

eth_getProof

Returns the Merkle proof for a given account and optionally some storage keys.

Detailed version

Result:

An object, containing accountProof, balance, codeHash, nonce, and storageHash.

{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": ["0x05c476a8b9a1a69c47ca81944fbb13a1ac55d62b", [], "latest"]
}

eth_sendTransaction

Tenderly doesn't store private keys, so this method is not supported

eth_sendRawTransaction

Submits a raw transaction.

Detailed version

Result

Transaction hash

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": ["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"]
}

eth_getTransactionByHash

Returns the information about a transaction requested by transaction hash.

Detailed version

Result

Transaction information

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": ["0xd9724b68ad04ac3919678e3158f5d474d3c129cfb4cb7fafcde9b4c756fce188"]
}

eth_getTransactionByBlockHashAndIndex

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

Detailed version

Result

Transaction information

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockHashAndIndex",
  "params": ["0x5a10754ae6c673ebabb1a78166232c6b88633d50fafe1499392dd6e4c61c344e", "0x1"]
}

eth_getTransactionByBlockNumberAndIndex

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

Detailed version

Result

Transaction information

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByBlockNumberAndIndex",
  "params": ["latest", "0x1"]
}

eth_getTransactionReceipt

Returns the receipt of a transaction by transaction hash.

Detailed version

Result

Receipt Information

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": ["0xd9724b68ad04ac3919678e3158f5d474d3c129cfb4cb7fafcde9b4c756fce188"]
}

eth_subscribe

Subscribes user to a Ethereum event notification stream.

Detailed version

Result

Subscription ID

example.json
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_subscribe",
  "params": [
    "logs",
    {
      "address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd",
      "topics": ["0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"]
    }
  ]
}

eth_unsubscribe

Unsubscribes user from a previously subscribed Ethereum event notification stream.

Detailed version

example.json
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_unsubscribe",
  "params": ["0x9cef478923ff08bf67fde6c64013158d"]
}

Result

Boolean Flag that represents if unsubscribe call is successful

Trace API

trace_filter

Returns traces matching given filter.

Detailed version

Result

Traces of transactions based on the given filters

Example

example.json
{
  "id": 0,
  "jsonrpc": "2.0",
  "method": "trace_filter",
  "params": [
    {
      "fromBlock": "0xccb943",
      "toBlock": "latest",
      "fromAddress": ["0xEdC763b3e418cD14767b3Be02b667619a6374076"]
    }
  ]
}