---
eip: 1474
label: EIP-1474
title: Remote procedure call specification
status: Stagnant
type: Standards Track
category: Interface
created: 2018-10-02
official: https://eips.ethereum.org/EIPS/eip-1474
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md
canonical: https://eips.huatuo.xyz/eip-1474/
lang: en
tldr: An attempt to write down one formal JSON-RPC specification for Ethereum nodes (methods, value encoding and error codes) so dapps get the same behaviour from every client.
tags: [json-rpc, api, nodes, interface]
---

# EIP-1474: Remote procedure call specification

> This proposal defines a standard set of remote procedure call methods that an Ethereum node should implement.

**TL;DR:** An attempt to write down one formal JSON-RPC specification for Ethereum nodes (methods, value encoding and error codes) so dapps get the same behaviour from every client.

## What problem does it solve?

Wallets, libraries and dapps talk to Ethereum nodes over JSON-RPC (`eth_getBalance`, `eth_call`, `eth_sendRawTransaction`…). In 2018 there was no formal spec for these methods, only client documentation and a wiki page. Clients differed in method signatures, encodings and error behaviour, so applications had to work around each node's quirks.

EIP-1474 collects the methods into one document and makes it changeable through the normal EIP process.

## How it works

The proposal defines three layers:

- **Transport.** Every call is a JSON-RPC 2.0 request object and must get a JSON-RPC 2.0 response object.
- **Value encoding.**
  - `Quantity` (numbers): `0x`-prefixed hex with no leading zeros; zero is `0x0`. So `0x400` is valid and `0x0400` is not.
  - `Data` (bytes): `0x`-prefixed hex, two digits per byte. `0x` is empty data, `0x00` is one zero byte.
  - Block parameters may be a block number, a tag such as `latest`, or (per [EIP-1898](/eip-1898/)) an object `{ blockHash, requireCanonical }`.
- **Errors.** Besides the standard JSON-RPC codes (`-32700` … `-32603`), it reserves Ethereum-specific codes, for example `-32000` invalid input, `-32001` resource not found, `-32003` transaction rejected, `-32004` method not supported and `-32005` limit exceeded.

It then documents each method's parameters, return values and an example: `web3_*`, `net_*` and the `eth_*` family, including blocks, transactions, receipts, logs and filters, `eth_call`, `eth_estimateGas`, signing, and the old mining methods.

## Sample code

A raw request, exactly as the spec frames it:

```sh
curl -X POST -H "Content-Type: application/json" --data '{
  "id": 1, "jsonrpc": "2.0",
  "method": "eth_getBalance",
  "params": ["0x0000000000000000000000000000000000000000", "latest"]
}' "$RPC_URL"
# -> {"id":1,"jsonrpc":"2.0","result":"0x..."}   (a Quantity, in wei)
```

The same call through ethers v6, which handles the encoding for you:

```ts
import { JsonRpcProvider, toQuantity } from "ethers";

const provider = new JsonRpcProvider(process.env.RPC_URL);
const hex = await provider.send("eth_getBalance", [someAddress, "latest"]);
console.log(BigInt(hex));          // decode Quantity
console.log(toQuantity(1024));     // "0x400" - encode, no leading zeros
```

## Things to know

- Status is **Stagnant**. The living reference for node APIs is now the community-maintained Ethereum execution-apis specification (OpenRPC-based), rather than this EIP. [EIP-1901](/eip-1901/) proposed the OpenRPC `rpc.discover` approach.
- Some methods listed here are obsolete on today's network, notably the proof-of-work mining calls (`eth_getWork`, `eth_submitWork`, `eth_hashrate`) and the uncle queries.
- Error codes beyond `-32603` are still not used identically by every client, so do not rely on exact codes for control flow without testing your provider.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-1474
