Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article examines ERC1474, which proposes a common specification for Ethereum's RPC interface so that clients and applications can operate consistently.

The explanation below translates, summarizes, and expands on the linked material.

I have also written about various other EIPs.

Overview

ERC1474 aims to define a standard set of remote procedure call (RPC) methods that Ethereum nodes should implement. In Ethereum, RPC is the interface through which external applications such as wallets and dApps communicate with nodes. Through RPC, applications can retrieve block information, submit transactions, check account balances, and perform other operations.

However, Ethereum node clients such as Geth, Nethermind, and Erigon have historically used their own RPC methods and response formats, creating an inconsistent environment for developers. This reduces application portability and maintainability while increasing development costs.

Motivation

ERC1474 defines the fundamental RPC methods required of Ethereum nodes and their behavior, offering the following benefits.

  • A predictable development environment
    • Developers can use the same RPC methods regardless of the client and build applications against a consistent interface.
  • Improved compatibility between clients
    • Different clients can exhibit the same behavior, so applications need not depend on a particular node implementation.
  • A foundation for future standardization
    • A clearly defined RPC interface across the Ethereum ecosystem makes future extensions and improvements easier.

Standardizing Ethereum's RPC specification thus contributes significantly to ecosystem maturity and a better developer experience. The proposal provides an important foundation for secure, stable communication without requiring developers to account for differences between nodes.

Specification

What is JSON-RPC?

Ethereum nodes communicate using JSON-RPC. It is a lightweight protocol for remote procedure calls (RPCs) using JSON-formatted data over transports such as HTTP or WebSocket.

Every Ethereum node RPC method must use the JSON-RPC request and response format. The caller must send a request conforming to JSON-RPC rules, and the node must return a response that follows those same rules.

Error code specification

When an RPC call fails, the response contains an error field with a code and message describing the failure.

Standard errors (derived from the RFC) include the following.

  • -32700
    • Failed to parse JSON.
  • -32600
    • Invalid request format.
  • -32601
    • The method does not exist.
  • -32602
    • Invalid parameters.
  • -32603
    • Internal error.

Ethereum-specific (non-standard) errors include the following.

  • -32000
    • Invalid input.
  • -32001
    • Resource not found.
  • -32003
    • Transaction rejected.
  • -32005
    • Request limit exceeded, among others.

For example, a rejected transaction produces an error such as the following.

json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "error": {
    "code": -32003,
    "message": "Transaction rejected"
  }
}

Value encoding specification

Ethereum RPC has strict rules for representing values.

Quantity type (numeric values)

Quantities, such as block numbers or gas amounts, must be expressed as hexadecimal strings prefixed with 0x, using the shortest possible representation. Zero must be written as "0x0". Leading-zero forms such as "0x00" and "0x0400" are invalid.

Data type (binary data)

Data also uses hexadecimal with a 0x prefix, but exactly two digits must represent each byte (8 bits). For example, "0x0" is invalid, while "0x00" is valid. Every byte must be represented explicitly by two hexadecimal digits.

Specifying block identifiers

RPC methods that operate on a particular block, such as eth_getBalance and eth_call, require a parameter identifying the target block. The identifier can specify a block number or a block hash. The format is based on EIP1898, using a JSON object such as the following.

json
{ "blockNumber": "0x1a2b3c" }

For more on EIP1898, see the following article.

[EIP1898] Extending JSON-RPC to Retrieve State Using a Block Hash

Or:

json
{ "blockHash": "0xabc123...", "requireCanonical": true }

The requireCanonical field specifies whether to return an error if the identified block is not part of the canonical chain.

If the block cannot be found, error -32001 (resource not found) is recommended. When specifying a hash with requireCanonical: true and the block is not canonical, error -32000 (invalid input) is recommended.

Updating the RPC specification

New RPC methods and modifications to existing methods must go through Ethereum's standardization process, the Ethereum Improvement Proposal (EIP) process.

Before a proposal can formally enter the specification, it must first reach Draft status. This procedure maintains transparency and consistency throughout Ethereum's RPC specification. It is essential to the Ethereum community's consensus-building process.

Methods

Ethereum nodes respond to requests from external applications through JSON-RPC.

web3_sha3

Computes a Keccak-256 hash of arbitrary binary data. This is equivalent to Solidity's keccak256.

Parameters
No. Type Description
1 {Data} Binary data to hash (hex-encoded)
Return value
Type Description
{Data} Computed Keccak-256 hash
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "web3_sha3",
  "params": ["0x68656c6c6f20776f726c64"]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0xc94770007dda54cF92009BFF0dE90c06F603a09f"
}

net_listening

Determines whether the node is currently accepting new connections from peers.

Return value
Type Description
{boolean} true if listening for connections, otherwise false
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "net_listening",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": true
}

net_peerCount

Returns the number of peer nodes currently connected.

Return value

Type Description
{Quantity} Number of connected peers (hexadecimal)

Example

bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "net_peerCount",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x2"
}

net_version

Returns the chain ID of the connected network as a string.

Return value

Type Description
{string} Chain ID (e.g., "1", "3", or "5")

Example

bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "net_version",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "1"
}

eth_accounts

Returns the account addresses managed by the node.

Return value

Type Description
{Data[]} Array of managed addresses (hexadecimal)

Example

bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_accounts",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f"]
}

eth_blockNumber

Returns the latest block number recognized by the node.

Return value

Type Description
{Quantity} Latest block number (hexadecimal)

Example

bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_blockNumber",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0xc94"
}

eth_call

Executes a transaction and immediately returns the result without submitting it to the blockchain (no state change).

Parameters

No. Type Description
1 {object} Object containing the caller, destination, gas, value, data, and other information
2 {string/Quantity/BlockIdentifier} Target block identifier (e.g., "latest" or "pending")

Return value

Type Description
{Data} Execution result (return value)

Example

bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [{
    "from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
    "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
    "gas": "0x76c0",
    "gasPrice": "0x9184e72a000",
    "value": "0x9184e72a",
    "data": "0xd46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
  }, "latest"]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x"
}

eth_estimateGas

Estimates the amount of gas required to execute a transaction.

Parameters

No. Type Description
1 {object} Transaction information (from, to, gas, value, data, etc.)
2 {string} Block identifier (e.g., "latest")

Return value

Type Description
{Quantity} Estimated gas (hexadecimal)

Example

bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [{
    "from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
    "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
    "gas": "0x76c0",
    "gasPrice": "0x9184e72a000",
    "value": "0x9184e72a",
    "data": "0xd46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
  }]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x5208"
}

The following sections describe additional representative JSON-RPC methods using the same structure: headings, parameters, return values, and examples.


net_listening

Determines whether the node is accepting new connections from peers.

Parameters

None

Return value
Type Description
{boolean} true if listening, false otherwise
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "net_listening",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": true
}

net_peerCount

Returns the number of peer nodes currently connected to the node.

Parameters

None

Return value
Type Description
{Quantity} Connected peer count (hexadecimal integer)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "net_peerCount",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x2"
}

net_version

Returns the chain ID of the Ethereum network to which the node is connected.

Parameters

None

Return value
Type Description
{string} Chain ID (e.g., "1" = mainnet, "3" = Ropsten)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "net_version",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "1"
}

eth_accounts

Returns account addresses managed locally by the node.

Parameters

None

Return value
Type Description
{Data[]} Array of managed addresses (hexadecimal)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_accounts",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f"]
}

eth_blockNumber

Returns the latest block number recognized by the node.

Return value
Type Description
{Quantity} Latest block number (hexadecimal)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_blockNumber",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0xc94"
}

eth_call

Immediately executes a contract call without sending a transaction to the network. State is not changed (comparable to executing a view or pure function).

Parameters
No. Type Description
1 {object} Transaction information for the call, containing the following fields: - from ({Data}, optional): sender address - to ({Data}): destination address - gas ({Quantity}, optional): gas supplied - gasPrice ({Quantity}, optional): gas price - value ({Quantity}, optional): ETH amount to send - data ({Data}, optional): encoded method and arguments
2 {Quantity | string | Block Identifier} Identifier of the block against which to execute (e.g., "latest")
Return value
Type Description
{Data} Call result (return value)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_call",
  "params": [{
    "from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
    "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
    "gas": "0x76c0",
    "gasPrice": "0x9184e72a000",
    "value": "0x9184e72a",
    "data": "0xd46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
  }, "latest"]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x"
}

eth_coinbase

Returns the node's coinbase address (the account that receives mining rewards).

Return value
Type Description
{Data} Coinbase address (hexadecimal)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_coinbase",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0xc94770007dda54cF92009BFF0dE90c06F603a09f"
}

eth_estimateGas

Estimates the gas required to execute a transaction. Actual gas consumption may differ from the estimate.

Parameters
No. Type Description (same structure as eth_call)
1 {object} Transaction object (from, to, gas, value, data, etc.)
2 {string} Block identifier (e.g., "latest")
Return value
Type Description
{Quantity} Required gas (hexadecimal)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_estimateGas",
  "params": [{
    "from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
    "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
    "gas": "0x76c0",
    "gasPrice": "0x9184e72a000",
    "value": "0x9184e72a",
    "data": "0xd46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675"
  }]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x5208"
}

eth_gasPrice

Returns the current gas price on the network in wei.

Return value
Type Description
{Quantity} Current gas price (wei)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_gasPrice",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x09184e72a000"
}

eth_getBalance

Retrieves the ETH balance of a specified address in wei.

Parameters
No. Type Description
1 {Data} Target address
2 {Quantity | string | Block Identifier} Block identifier (e.g., "latest")
Return value
Type Description
{Quantity} ETH balance of the address (wei)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x0234c8a3397aab58"
}

eth_getBlockByHash

Retrieves detailed block information using a block hash.

Parameters
No. Type Description
1 {Data} Hash of the target block
2 {boolean} true to return transaction objects, false to return only hashes
Return value
Type Description
{object | null} Block information (null if not found)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_getBlockByHash",
  "params": [
    "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
    true
  ]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "hash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
    "miner": "0x4e65fda2159562a496f9f3522f89122a3088497a",
    "gasLimit": "0x9f759",
    "gasUsed": "0x9f759",
    "transactions": [],
    "uncles": ["0x1606e5...", "0xd5145a9..."]
  }
}

eth_getBlockByNumber

Retrieves detailed information about a block specified by block number.

Parameters
No. Type Description
1 {Quantity | string} Block number, or one of "latest", "earliest", or "pending"
2 {boolean} true to return transactions as objects, false to return hashes
Return value
Type Description
{object | null} Block information (null if not found)
Example
bash
curl -X POST --data '{
    "id": 1337,
    "jsonrpc": "2.0",
    "method": "eth_getBlockByNumber",
    "params": ["0x1b4", true]
}' <url>
json
{
    "id": 1337,
    "jsonrpc": "2.0",
    "result": {
        "number": "0x1b4",
        "hash": "0xe670ec64...",
        "parentHash": "0x9646252b...",
        "nonce": "0xe04d29...",
        "sha3Uncles": "0x1dcc4d...",
        "logsBloom": "0xe670ec...",
        "transactionsRoot": "0x56e81f...",
        "stateRoot": "0xd5855e...",
        "receiptsRoot": "0x...",
        "miner": "0x4e65fda2...",
        "difficulty": "0x027f07",
        "totalDifficulty": "0x027f07",
        "extraData": "0x000000...",
        "size": "0x027f07",
        "gasLimit": "0x9f759",
        "gasUsed": "0x9f759",
        "timestamp": "0x54e34e8e",
        "transactions": [],
        "uncles": ["0x1606e5...", "0xd5145a9..."]
    }
}

eth_getBlockTransactionCountByHash

Returns the number of transactions in a block identified by its hash.

Parameters
No. Type Description
1 {Data} Block hash
Return value
Type Description
{Quantity} Transaction count (hexadecimal)
Example
bash
curl -X POST --data '{
    "id": 1337,
    "jsonrpc": "2.0",
    "method": "eth_getBlockTransactionCountByHash",
    "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f"]
}' <url>
json
{
    "id": 1337,
    "jsonrpc": "2.0",
    "result": "0xc"
}

eth_getBlockTransactionCountByNumber

Returns the number of transactions in a block identified by its number.

Parameters
No. Type Description
1 {Quantity | string} Block number, or one of "latest", "earliest", or "pending"
Return value
Type Description
{Quantity} Transaction count (hexadecimal)
Example
bash
curl -X POST --data '{
    "id": 1337,
    "jsonrpc": "2.0",
    "method": "eth_getBlockTransactionCountByNumber",
    "params": ["0xe8"]
}' <url>
json
{
    "id": 1337,
    "jsonrpc": "2.0",
    "result": "0xa"
}

eth_getCode

Returns the contract code deployed at a specified address.

Parameters
No. Type Description
1 {Data} Target address
2 {Quantity | string | Block Identifier} Block number or identifier (e.g., "latest")
Return value
Type Description
{Data} Contract code at the specified address (hexadecimal)
Example
bash
curl -X POST --data '{
    "id": 1337,
    "jsonrpc": "2.0",
    "method": "eth_getCode",
    "params": ["0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "0x2"]
}' <url>
json
{
    "id": 1337,
    "jsonrpc": "2.0",
    "result": "0x600160008035811a818181146012578301005b..."
}

eth_getFilterChanges

Given a filter ID, returns logs or changes to blocks or transactions that occurred since the previous query. It is used to poll a filter created by eth_newFilter.

Parameters
No. Type Description
1 {Quantity} Target filter ID (hexadecimal)
Return value
Type Description
{Array} or {Array} Returns an array of logs, transaction hashes, or block hashes depending on the filter type

Log filter created by eth_newFilter → Array<Log> eth_newBlockFilter, eth_newPendingTransactionFilter → Array<Data>

Log object structure
  • address
    • Address of the contract that emitted the log.
  • blockHash
    • Hash of the block containing the log.
  • blockNumber
    • Number of the block containing the log.
  • data
    • Data for non-indexed arguments.
  • logIndex
    • Position of the log within the block.
  • transactionHash
    • Hash of the originating transaction.
  • transactionIndex
    • Position of the transaction within the block.
  • topics
    • Topics corresponding to indexed arguments.
  • removed
    • true if the log was removed from the chain.
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_getFilterChanges",
  "params": ["0x16"]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": [{
    "address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
    "blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
    "blockNumber":"0x1b4",
    "data":"0x0000000000000000000000000000000000000000000000000000000000000000",
    "logIndex": "0x1",
    "topics": [],
    "transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
    "transactionIndex": "0x0",
    "removed": false
  }]
}

eth_getFilterLogs

Retrieves all logs recorded for a specified filter ID. Unlike eth_getFilterChanges, it returns the full log history.

Parameters
No. Type Description
1 {Quantity} Target filter ID
Return value
Type Description
{Array} All log objects matching the filter

The Log structure is identical to that of eth_getFilterChanges.

Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_getFilterLogs",
  "params": ["0x16"]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": [{
    "address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
    "blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
    "blockNumber":"0x1b4",
    "data":"0x0000000000000000000000000000000000000000000000000000000000000000",
    "logIndex": "0x1",
    "topics": [],
    "transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
    "transactionIndex": "0x0",
    "removed": false
  }]
}

eth_getLogs

Retrieves logs matching arbitrary conditions such as block ranges, addresses, or topics. This offers more flexible querying than eth_newFilter or eth_getFilterLogs.

Parameters
No. Type Description
1 {object} Filter object containing the fields below
Filter object fields
  • fromBlock ({Quantity|string}, optional)
    • Starting block number or a value such as "latest".
  • toBlock ({Quantity|string}, optional)
    • Ending block number or a value such as "latest".
  • address ({Data|Data[]}, optional)
    • Contract address or array of addresses.
  • topics ({Data[]}, optional)
    • Topics of indexed logs.
  • blockhash ({Data}, optional)
    • Restricts results to a particular block (in this case, fromBlock/toBlock are ignored).
Return value
Type Description
{Array} Logs matching the conditions
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_getLogs",
  "params": [{
    "topics": ["0x000000000000000000000000a94f5374fce5edbc8e2a8697c15331677e6ebf0b"]
  }]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": [{
    "address": "0x16c5785ac562ff41e2dcfdf829c5a142f1fccd7d",
    "blockHash": "0x8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcfdf829c5a142f1fccd7d",
    "blockNumber":"0x1b4",
    "data":"0x0000000000000000000000000000000000000000000000000000000000000000",
    "logIndex": "0x1",
    "topics": [],
    "transactionHash": "0xdf829c5a142f1fccd7d8216c5785ac562ff41e2dcfdf5785ac562ff41e2dcf",
    "transactionIndex": "0x0",
    "removed": false
  }]
}

eth_getStorageAt

Retrieves the value stored at a specified address and storage slot (index). It can be used to inspect Solidity mapping entries or state variables.

Parameters
No. Type Description
1 {Data} Target address (hexadecimal)
2 {Quantity} Storage slot (e.g., "0x0")
3 {Quantity | string | Block Identifier} Target block (e.g., "latest")
Return value
Type Description
{Data} Data value at the specified slot (hexadecimal)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_getStorageAt",
  "params": ["0x295a70b2de5e3953354a6a8344e616ed314d7251", "0x0", "latest"]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x00000000000000000000000000000000000000000000000000000000000004d2"
}

eth_getTransactionCount

Retrieves the nonce of the specified address (the number of transactions it has sent so far).

Parameters
No. Type Description
1 {Data} Target address (hexadecimal)
2 {Quantity | string | Block Identifier} Target block (e.g., "latest")
Return value
Type Description
{Quantity} Transaction count (nonce)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionCount",
  "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x3"
}

eth_getTransactionByHash

Returns details of the transaction corresponding to the specified transaction hash.

Parameters
No. Type Description
1 {Data} Transaction hash
Return value
Type Description
{object | null} Transaction information or null
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionByHash",
  "params": ["0x9f1c62092a3e8b8c73c5ab658aef507f9eeea113267c74f84f49d3d1954273fc"]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe670ec64...",
    "blockNumber": "0x1b4",
    "from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "gas": "0x76c0",
    "gasPrice": "0x9184e72a000",
    "hash": "0x9f1c62...",
    "input": "0x...",
    "nonce": "0x15",
    "to": "0x85f6a...",
    "transactionIndex": "0x1",
    "value": "0xf3dbb...",
    "v": "0x1c",
    "r": "0x5e1d3...",
    "s": "0x7e3f5..."
  }
}

eth_getTransactionReceipt

Returns the transaction's execution result, including success or failure, gas used, and logs. The transaction must have been mined.

Parameters
No. Type Description
1 {Data} Transaction hash
Return value
Type Description
{object | null} Receipt information (null if not found)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": ["0x9f1c62092a3e8b8c73c5ab658aef507f9eeea113267c74f84f49d3d1954273fc"]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": {
    "blockHash": "0xe670ec64...",
    "blockNumber": "0x1b4",
    "contractAddress": null,
    "cumulativeGasUsed": "0x33bc",
    "from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
    "gasUsed": "0x4dc",
    "logs": [],
    "logsBloom": "0x00...",
    "status": "0x1",
    "to": "0x85f6a...",
    "transactionHash": "0x9f1c62...",
    "transactionIndex": "0x1"
  }
}

eth_getUncleByBlockHashAndIndex

Retrieves information about an uncle block included in a block, specified by the block hash and uncle index.

Parameters
No. Type Description
1 {Data} Hash of the target block
2 {Quantity} Index of the uncle block
Return value
Type Description
{object | null} Detailed uncle block information, or null if not found
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockHashAndIndex",
  "params": ["0xc6ef2fc5...", "0x0"]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "miner": "0x4e65fda2...",
    "difficulty": "0x027f07",
    "gasUsed": "0x9f759",
    ...
  }
}

eth_getUncleByBlockNumberAndIndex

Retrieves information about an uncle block included in a block, specified by block number and uncle index.

Parameters
No. Type Description
1 {Quantity | string} Block number or an identifier such as "latest"
2 {Quantity} Uncle block index
Return value
Type Description
{object | null} Matching uncle block information, or null if not found
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_getUncleByBlockNumberAndIndex",
  "params": ["0x29c", "0x0"]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": {
    "number": "0x1b4",
    "miner": "0x4e65fda2...",
    "gasLimit": "0x9f759",
    ...
  }
}

eth_getUncleCountByBlockHash

Returns the number of uncle blocks included in a block identified by its hash.

Parameters
No. Type Description
1 {Data} Block hash
Return value
Type Description
{Quantity} Uncle block count (hexadecimal)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockHash",
  "params": ["0xc9477000..."]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0xc"
}

eth_getUncleCountByBlockNumber

Returns the number of uncle blocks included in a block identified by its number.

Parameters
No. Type Description
1 {Quantity | string} Block number or a value such as "latest"
Return value
Type Description
{Quantity} Uncle block count (hexadecimal)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_getUncleCountByBlockNumber",
  "params": ["0xe8"]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x1"
}

eth_getWork

Returns an array containing the information required for proof-of-work mining: the PoW hash, seed hash, and target.

Return value
Type Description
{Data[]} Array of the three values required for PoW
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_getWork",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": [
    "0x1234...",
    "0x5EED...",
    "0xd1ff..."
  ]
}

eth_hashrate

Returns the number of hashes processed per second by this node (mining performance).

Return value
Type Description
{Quantity} Hash rate (hash/s)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_hashrate",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x38a"
}

eth_mining

Determines whether the node is currently mining.

Return value
Type Description
{boolean} true if mining
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_mining",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": true
}

eth_newBlockFilter

Creates a filter to monitor new blocks. Use it with eth_getFilterChanges.

Return value
Type Description
{Quantity} Filter ID (hexadecimal)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_newBlockFilter",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x1"
}

eth_newFilter

Creates a filter for monitoring log events based on specified conditions such as addresses, topics, and block ranges.

Parameters
No. Type Description
1 {object} Object containing properties such as fromBlock, toBlock, address, and topics
Return value
Type Description
{Quantity} Filter ID (hexadecimal)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_newFilter",
  "params": [{
    "topics": ["0x0000000000000000000000000000000000000000000000000000000012341234"]
  }]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x1"
}

eth_newPendingTransactionFilter

Creates a filter to monitor newly pending (unconfirmed) transactions. The filter ID is used with eth_getFilterChanges.

Return value
Type Description
{Quantity} Filter ID (hexadecimal)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_newPendingTransactionFilter",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x1"
}

eth_protocolVersion

Returns the current Ethereum protocol version.

Return value
Type Description
{string} Ethereum protocol version
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_protocolVersion",
  "params": []
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "54"
}

eth_sendRawTransaction

Broadcasts a signed transaction to the network. The transaction must already be signed on the client side.

Parameters
No. Type Description
1 {Data} RLP-encoded signed transaction data
Return value
Type Description
{Data} Transaction hash, or zero hash if unavailable
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransaction",
  "params": ["0xd46e8dd67c5d32be..."]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0xe670ec6434177160..."
}

eth_sendTransaction

Creates, signs, and sends a new transaction using an account managed by the node.

Parameters
No. Type Description (object properties)
1 {object} from (required); to, gas, gasPrice, value, data, nonce (optional)
Return value
Type Description
{Data} Transaction hash or zero hash
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_sendTransaction",
  "params": [{
    "from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
    "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
    "gas": "0x76c0",
    "gasPrice": "0x9184e72a000",
    "value": "0x9184e72a",
    "data": "0xd46e8dd67c5d32be..."
  }]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0xe670ec6434177160..."
}

eth_sign

Signs a message according to the Ethereum specification. The signed message uses the format \x19Ethereum Signed Message:\n + message length + message.

Parameters
No. Type Description
1 {Data} Signer address
2 {Data} Data to sign (hexadecimal)
Return value
Type Description
{Data} Signature hash
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_sign",
  "params": ["0x9b2055d370f73ec7...", "0xdeadbeaf"]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0xa3f20717a250c2b0b729b7..."
}

eth_signTransaction

Signs a transaction without submitting it, so it can later be sent via eth_sendRawTransaction.

Parameters
No. Type Description
1 {object} Transaction data (from, to, gas, gasPrice, value, data, nonce)
Return value
Type Description
{Data} Signed transaction
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_signTransaction",
  "params": [{
    "from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
    "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
    "gas": "0x76c0",
    "gasPrice": "0x9184e72a000",
    "value": "0x9184e72a",
    "data": "0xd46e8dd67c5d32be..."
  }]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0xa3f20717a250c2b0..."
}

eth_signTypedData

Signs typed data conforming to EIP712. It operates on structured data, enabling secure signature verification.

For more on EIP712, see the following article.

[EIP712] Hashing and Signing Typed Structured Data

Parameters
No. Type Description
1 {Data} Signer address
2 {object} Message data in EIP712 format
Return value
Type Description
{Data} Signature result (hexadecimal)
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_signTypedData",
  "params": ["0xCD2a3d9F938E13CD...", {
    "types": {
      "EIP712Domain": [
        { "name": "name", "type": "string" },
        { "name": "version", "type": "string" },
        { "name": "chainId", "type": "uint256" },
        { "name": "verifyingContract", "type": "address" }
      ],
      "Person": [
        { "name": "name", "type": "string" },
        { "name": "wallet", "type": "address" }
      ],
      "Mail": [
        { "name": "from", "type": "Person" },
        { "name": "to", "type": "Person" },
        { "name": "contents", "type": "string" }
      ]
    },
    "primaryType": "Mail",
    "domain": {
      "name": "Ether Mail",
      "version": "1",
      "chainId": 1,
      "verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
    },
    "message": {
      "from": {
        "name": "Cow",
        "wallet": "0xCD2a3d9F938E13CD..."
      },
      "to": {
        "name": "Bob",
        "wallet": "0xbBbBBBBbbBBBbbbB..."
      },
      "contents": "Hello, Bob!"
    }
  }]
}' <url>
json
{
  "id": 1337,
  "jsonrpc": "2.0",
  "result": "0x4355c47d63924e8a72e509b6..."
}

eth_submitHashrate

Reports the current hash rate (mining speed) of a mining node to the Ethereum client. It may be used to collect per-node statistics or as a reference for calculating rewards.

Parameters
No. Type Description
1 {Data} Hash rate (e.g., 0x500000)
2 {Data} Random ID identifying the node (e.g., 0xabc123...)
Return value
Type Description
{boolean} true on success, false on failure
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_submitHashrate",
  "params": [
    "0x0000000000000000000000000000000000000000000000000000000000500000",
    "0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c"
  ]
}' <url>

eth_submitWork

Submits a solution (nonce) found for a candidate block during mining to an Ethereum client. It was used to validate blocks in proof-of-work Ethereum.

Parameters
No. Type Description
1 {Data} Discovered nonce (e.g., 0x000...001)
2 {Data} PoW hash of the block header
3 {Data} Mix digest (for hash verification)
Return value
Type Description
{boolean} true if the solution is valid, false otherwise
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_submitWork",
  "params": [
    "0x0000000000000001",
    "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "0xD1GE5700000000000000000000000000D1GE5700000000000000000000000000"
  ]
}' <url>

eth_syncing

Checks whether the node is synchronizing with the Ethereum network. Returns false when not syncing, or an object containing progress information when syncing.

Return value
Type Description
{boolean} false when not syncing
{object} When syncing, returns an object containing the following properties

Properties of the synchronization object:

Property Type Description
startingBlock {Quantity} Block number at the start of synchronization
currentBlock {Quantity} Latest block number synchronized so far
highestBlock {Quantity} Latest block number on the network
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_syncing",
  "params": []
}' <url>

eth_uninstallFilter

Discards the event filter associated with the specified filter ID. It is used to clean up filters that are no longer needed.

Parameters
No. Type Description
1 {Quantity} ID of the filter to discard
Return value
Type Description
{boolean} true if the filter was successfully discarded, false otherwise
Example
bash
curl -X POST --data '{
  "id": 1337,
  "jsonrpc": "2.0",
  "method": "eth_uninstallFilter",
  "params": ["0xb"]
}' <url>

Rationale

Ethereum's RPC (JSON-RPC) is the main interface through which applications communicate with nodes. For example, most operations, including sending transactions, retrieving block information, and checking account balances, use RPC methods.

However, different clients have implemented methods with the same names using different formats or behavior, requiring developers to handle implementation differences and creating unnecessary development costs and bugs.

The proposal aims to avoid this confusion by clearly standardizing RPC method names, parameter formats, and return-value structures.

Impact on compatibility with existing clients

ERC1474 affects both Ethereum node clients and dApps.

For node client developers, RPC endpoints released in the future are expected to conform fully to the specification. This provides a consistent RPC interface across clients.

dApp developers are also affected. If existing applications make RPC calls in a manner that differs from the specification, they may need to update them to conform. In other words, standardization creates short-term adjustment costs for developers but improves stability and portability over the long term.

Reference implementations

Several Ethereum clients have already attempted implementations close to this RPC specification. Representative clients include the following.

Client Implementation language Official website
Geth Go https://geth.ethereum.org
Parity Rust https://parity.io/ethereum
Aleth C++ https://cpp-ethereum.org

These clients are implemented in different languages, but all operate as Ethereum nodes and expose RPC endpoints. The proposal aims to have each implementation expose its RPC interface according to common rules so that dApp developers can reliably support any client.

References

Paul Bouchon mail@bitpshr.net, Erik Marks (@rekmarks), "EIP-1474: Remote procedure call specification [DRAFT]," Ethereum Improvement Proposals, no. 1474, October 2018. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-1474.

Conclusion

This article examined ERC1474, which proposes a common Ethereum RPC interface specification to provide consistent behavior across clients and applications. What do you think of the proposal?

If you have any questions, feel free to send me a direct message on Twitter.

Twitter @cardene777

I also publish content on other platforms, so feel free to explore them.

https://chaldene.net/