{"eip":1474,"title":"Remote procedure call specification","description":"This proposal defines a standard set of remote procedure call methods that an Ethereum node should implement.","authors":["Paul Bouchon \u003cmail@bitpshr.net\u003e","Erik Marks (@rekmarks)"],"status":"Stagnant","type":"Standards Track","category":"Interface","created":"2018-10-02","discussionsTo":"https://ethereum-magicians.org/t/eip-remote-procedure-call-specification/1537","repo":"EIPs","label":"EIP-1474","officialUrl":"https://eips.ethereum.org/EIPS/eip-1474","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1474.md","url":"https://eips.huatuo.xyz/eip-1474/","tldr":{"en":"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.","ja":"Ethereum ノード向けの正式な JSON-RPC 仕様（メソッド、値のエンコード、エラーコード）を 1 つにまとめようとした試み。dapp がどのクライアントからでも同じ挙動を得られるようにする。","ko":"이더리움 노드를 위한 공식 JSON-RPC 명세(메서드, 값 인코딩, 에러 코드)를 하나로 정리하려던 시도. dapp이 모든 클라이언트에서 같은 동작을 얻도록 하려는 것이었다.","zh":"尝试为以太坊节点编写一份统一的正式 JSON-RPC 规范（方法、值编码和错误码），使 dapp 在每个客户端上都获得相同的行为。"},"tags":["json-rpc","api","nodes","interface"],"explainers":{"en":{"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"],"related":[1898,1901],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-1474/","markdown":"## What problem does it solve?\n\nWallets, 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.\n\nEIP-1474 collects the methods into one document and makes it changeable through the normal EIP process.\n\n## How it works\n\nThe proposal defines three layers:\n\n- **Transport.** Every call is a JSON-RPC 2.0 request object and must get a JSON-RPC 2.0 response object.\n- **Value encoding.**\n  - `Quantity` (numbers): `0x`-prefixed hex with no leading zeros; zero is `0x0`. So `0x400` is valid and `0x0400` is not.\n  - `Data` (bytes): `0x`-prefixed hex, two digits per byte. `0x` is empty data, `0x00` is one zero byte.\n  - Block parameters may be a block number, a tag such as `latest`, or (per [EIP-1898](/eip-1898/)) an object `{ blockHash, requireCanonical }`.\n- **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.\n\nIt 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.\n\n## Sample code\n\nA raw request, exactly as the spec frames it:\n\n```sh\ncurl -X POST -H \"Content-Type: application/json\" --data '{\n  \"id\": 1, \"jsonrpc\": \"2.0\",\n  \"method\": \"eth_getBalance\",\n  \"params\": [\"0x0000000000000000000000000000000000000000\", \"latest\"]\n}' \"$RPC_URL\"\n# -\u003e {\"id\":1,\"jsonrpc\":\"2.0\",\"result\":\"0x...\"}   (a Quantity, in wei)\n```\n\nThe same call through ethers v6, which handles the encoding for you:\n\n```ts\nimport { JsonRpcProvider, toQuantity } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst hex = await provider.send(\"eth_getBalance\", [someAddress, \"latest\"]);\nconsole.log(BigInt(hex));          // decode Quantity\nconsole.log(toQuantity(1024));     // \"0x400\" - encode, no leading zeros\n```\n\n## Things to know\n\n- 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.\n- 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.\n- 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.\n"},"ja":{"lang":"ja","tldr":"Ethereum ノード向けの正式な JSON-RPC 仕様（メソッド、値のエンコード、エラーコード）を 1 つにまとめようとした試み。dapp がどのクライアントからでも同じ挙動を得られるようにする。","tags":["json-rpc","api","nodes","interface"],"related":[1898,1901],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-1474/","markdown":"## 何を解決するのか\n\nウォレット、ライブラリ、dapp は、JSON-RPC（`eth_getBalance`、`eth_call`、`eth_sendRawTransaction` など）で Ethereum ノードと通信します。2018 年当時、これらのメソッドに正式な仕様はなく、クライアントのドキュメントと wiki ページがあるだけでした。クライアントごとにメソッドのシグネチャ、エンコード、エラー時の挙動が異なり、アプリケーションは各ノードの癖に対処しなければなりませんでした。\n\nEIP-1474 はメソッドを 1 つの文書にまとめ、通常の EIP プロセスを通じて変更できるようにします。\n\n## 仕組み\n\nこの提案は 3 つのレイヤーを定義します。\n\n- **トランスポート。** すべての呼び出しは JSON-RPC 2.0 のリクエストオブジェクトであり、JSON-RPC 2.0 のレスポンスオブジェクトを受け取らなければなりません。\n- **値のエンコード。**\n  - `Quantity`（数値）: `0x` で始まる 16 進で、先頭ゼロなし。ゼロは `0x0`。つまり `0x400` は有効で、`0x0400` は無効です。\n  - `Data`（バイト列）: `0x` で始まる 16 進で、1 バイトあたり 2 桁。`0x` は空のデータ、`0x00` は 1 バイトのゼロです。\n  - ブロックパラメーターには、ブロック番号、`latest` などのタグ、または（[EIP-1898](/eip-1898/) による）オブジェクト `{ blockHash, requireCanonical }` を指定できます。\n- **エラー。** 標準の JSON-RPC コード（`-32700` から `-32603`）に加えて、Ethereum 固有のコードを予約しています。たとえば `-32000` は不正な入力、`-32001` はリソースが見つからない、`-32003` はトランザクションの拒否、`-32004` はメソッド非対応、`-32005` は制限超過です。\n\n続いて、各メソッドのパラメーター、戻り値、例を文書化しています。`web3_*`、`net_*`、そして `eth_*` ファミリー（ブロック、トランザクション、レシート、ログ、フィルター、`eth_call`、`eth_estimateGas`、署名、古いマイニングメソッドを含む）です。\n\n## サンプルコード\n\n仕様のとおりに組み立てた生のリクエスト:\n\n```sh\ncurl -X POST -H \"Content-Type: application/json\" --data '{\n  \"id\": 1, \"jsonrpc\": \"2.0\",\n  \"method\": \"eth_getBalance\",\n  \"params\": [\"0x0000000000000000000000000000000000000000\", \"latest\"]\n}' \"$RPC_URL\"\n# -\u003e {\"id\":1,\"jsonrpc\":\"2.0\",\"result\":\"0x...\"}   (a Quantity, in wei)\n```\n\nethers v6 による同じ呼び出し。エンコードは自動で処理されます。\n\n```ts\nimport { JsonRpcProvider, toQuantity } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst hex = await provider.send(\"eth_getBalance\", [someAddress, \"latest\"]);\nconsole.log(BigInt(hex));          // decode Quantity\nconsole.log(toQuantity(1024));     // \"0x400\" - encode, no leading zeros\n```\n\n## 知っておくべきこと\n\n- ステータスは **Stagnant** です。ノード API の最新のリファレンスは、現在この EIP ではなく、コミュニティが保守する Ethereum execution-apis 仕様（OpenRPC ベース）です。[EIP-1901](/eip-1901/) は OpenRPC の `rpc.discover` によるアプローチを提案しました。\n- ここに挙げられたメソッドの一部は、現在のネットワークでは廃止されています。特にプルーフ・オブ・ワークのマイニング呼び出し（`eth_getWork`、`eth_submitWork`、`eth_hashrate`）とアンクルのクエリです。\n- `-32603` を超えるエラーコードは、今もすべてのクライアントで同一に使われているわけではありません。プロバイダーでテストせずに、正確なコードに制御フローを依存させないでください。\n"},"ko":{"lang":"ko","tldr":"이더리움 노드를 위한 공식 JSON-RPC 명세(메서드, 값 인코딩, 에러 코드)를 하나로 정리하려던 시도. dapp이 모든 클라이언트에서 같은 동작을 얻도록 하려는 것이었다.","tags":["json-rpc","api","nodes","interface"],"related":[1898,1901],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-1474/","markdown":"## 어떤 문제를 해결하나요?\n\n지갑, 라이브러리, dapp은 JSON-RPC(`eth_getBalance`, `eth_call`, `eth_sendRawTransaction` 등)로 이더리움 노드와 통신합니다. 2018년에는 이런 메서드에 대한 공식 명세가 없었고, 클라이언트 문서와 위키 페이지만 있었습니다. 클라이언트마다 메서드 시그니처, 인코딩, 에러 동작이 달라서 애플리케이션은 각 노드의 특이점을 우회해야 했습니다.\n\nEIP-1474는 메서드를 하나의 문서로 모으고, 일반적인 EIP 프로세스를 통해 변경할 수 있게 합니다.\n\n## 어떻게 동작하나요?\n\n이 제안은 세 계층을 정의합니다.\n\n- **전송.** 모든 호출은 JSON-RPC 2.0 요청 객체이며 JSON-RPC 2.0 응답 객체를 받아야 합니다.\n- **값 인코딩.**\n  - `Quantity`(숫자): `0x`로 시작하는 16진수이며 앞에 0이 없어야 합니다. 0은 `0x0`입니다. 따라서 `0x400`은 유효하고 `0x0400`은 유효하지 않습니다.\n  - `Data`(바이트): `0x`로 시작하는 16진수이며 바이트당 두 자리입니다. `0x`는 빈 데이터이고 `0x00`은 0 바이트 하나입니다.\n  - 블록 파라미터는 블록 번호, `latest` 같은 태그, 또는 ([EIP-1898](/eip-1898/)에 따른) 객체 `{ blockHash, requireCanonical }`일 수 있습니다.\n- **에러.** 표준 JSON-RPC 코드(`-32700` ~ `-32603`) 외에 이더리움 전용 코드를 예약합니다. 예를 들어 `-32000`은 잘못된 입력, `-32001`은 리소스를 찾을 수 없음, `-32003`은 트랜잭션 거부, `-32004`는 지원하지 않는 메서드, `-32005`는 한도 초과입니다.\n\n그다음 각 메서드의 파라미터, 반환값, 예시를 문서화합니다. `web3_*`, `net_*`, 그리고 블록, 트랜잭션, 영수증, 로그와 필터, `eth_call`, `eth_estimateGas`, 서명, 오래된 채굴 메서드를 포함한 `eth_*` 계열입니다.\n\n## 샘플 코드\n\n명세가 구성한 그대로의 원시 요청:\n\n```sh\ncurl -X POST -H \"Content-Type: application/json\" --data '{\n  \"id\": 1, \"jsonrpc\": \"2.0\",\n  \"method\": \"eth_getBalance\",\n  \"params\": [\"0x0000000000000000000000000000000000000000\", \"latest\"]\n}' \"$RPC_URL\"\n# -\u003e {\"id\":1,\"jsonrpc\":\"2.0\",\"result\":\"0x...\"}   (a Quantity, in wei)\n```\n\n인코딩을 대신 처리해 주는 ethers v6로 같은 호출을 한 것:\n\n```ts\nimport { JsonRpcProvider, toQuantity } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst hex = await provider.send(\"eth_getBalance\", [someAddress, \"latest\"]);\nconsole.log(BigInt(hex));          // decode Quantity\nconsole.log(toQuantity(1024));     // \"0x400\" - encode, no leading zeros\n```\n\n## 알아둘 점\n\n- 상태는 **Stagnant**입니다. 노드 API의 현행 참조 문서는 이제 이 EIP가 아니라 커뮤니티가 관리하는 이더리움 execution-apis 명세(OpenRPC 기반)입니다. [EIP-1901](/eip-1901/)은 OpenRPC의 `rpc.discover` 방식을 제안했습니다.\n- 여기에 나열된 일부 메서드는 오늘날의 네트워크에서는 쓸모없어졌습니다. 특히 작업 증명 채굴 호출(`eth_getWork`, `eth_submitWork`, `eth_hashrate`)과 엉클 조회가 그렇습니다.\n- `-32603` 이후의 에러 코드는 여전히 모든 클라이언트가 똑같이 사용하지 않으므로, 사용하는 프로바이더로 테스트하지 않고 정확한 코드에 제어 흐름을 의존하지 마세요.\n"},"zh":{"lang":"zh","tldr":"尝试为以太坊节点编写一份统一的正式 JSON-RPC 规范（方法、值编码和错误码），使 dapp 在每个客户端上都获得相同的行为。","tags":["json-rpc","api","nodes","interface"],"related":[1898,1901],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-1474/","markdown":"## 它解决什么问题？\n\n钱包、库和 dapp 通过 JSON-RPC（`eth_getBalance`、`eth_call`、`eth_sendRawTransaction` 等）与以太坊节点通信。2018 年时，这些方法没有正式规范，只有客户端文档和一个 wiki 页面。各客户端在方法签名、编码和错误行为上各不相同，因此应用不得不绕开每个节点的怪癖。\n\nEIP-1474 把这些方法汇总到一份文档中，并使其可以通过正常的 EIP 流程进行修改。\n\n## 它如何运作\n\n该提案定义了三层：\n\n- **传输。** 每次调用都是一个 JSON-RPC 2.0 请求对象，并且必须得到一个 JSON-RPC 2.0 响应对象。\n- **值编码。**\n  - `Quantity`（数字）：以 `0x` 为前缀的十六进制，无前导零；零是 `0x0`。因此 `0x400` 有效，而 `0x0400` 无效。\n  - `Data`（字节）：以 `0x` 为前缀的十六进制，每字节两位数字。`0x` 是空数据，`0x00` 是一个零字节。\n  - 区块参数可以是区块号、`latest` 之类的标签，或者（依据 [EIP-1898](/eip-1898/)）一个对象 `{ blockHash, requireCanonical }`。\n- **错误。** 除标准的 JSON-RPC 错误码（`-32700` 至 `-32603`）外，它还保留了以太坊专用的错误码，例如 `-32000` 表示输入无效、`-32001` 表示资源未找到、`-32003` 表示交易被拒绝、`-32004` 表示不支持该方法、`-32005` 表示超出限制。\n\n随后它记录了每个方法的参数、返回值和一个示例：`web3_*`、`net_*` 以及 `eth_*` 系列，包括区块、交易、收据、日志和过滤器、`eth_call`、`eth_estimateGas`、签名，以及旧的挖矿方法。\n\n## 示例代码\n\n按规范格式书写的原始请求：\n\n```sh\ncurl -X POST -H \"Content-Type: application/json\" --data '{\n  \"id\": 1, \"jsonrpc\": \"2.0\",\n  \"method\": \"eth_getBalance\",\n  \"params\": [\"0x0000000000000000000000000000000000000000\", \"latest\"]\n}' \"$RPC_URL\"\n# -\u003e {\"id\":1,\"jsonrpc\":\"2.0\",\"result\":\"0x...\"}   (a Quantity, in wei)\n```\n\n通过 ethers v6 进行的同一调用，编码由它替你处理：\n\n```ts\nimport { JsonRpcProvider, toQuantity } from \"ethers\";\n\nconst provider = new JsonRpcProvider(process.env.RPC_URL);\nconst hex = await provider.send(\"eth_getBalance\", [someAddress, \"latest\"]);\nconsole.log(BigInt(hex));          // decode Quantity\nconsole.log(toQuantity(1024));     // \"0x400\" - encode, no leading zeros\n```\n\n## 需要注意\n\n- 状态为 **Stagnant**。节点 API 现行的权威参考是由社区维护的以太坊 execution-apis 规范（基于 OpenRPC），而不是这份 EIP。[EIP-1901](/eip-1901/) 提出了采用 OpenRPC 的 `rpc.discover` 方案。\n- 这里列出的一些方法在当今的网络上已经过时，尤其是工作量证明的挖矿调用（`eth_getWork`、`eth_submitWork`、`eth_hashrate`）和叔块查询。\n- `-32603` 之外的错误码至今仍未被所有客户端一致使用，因此在未针对你的提供方测试之前，不要依赖确切的错误码来控制流程。\n"}},"requiredBy":[234,758,1102,1186,2256,3041,3044,3045,3046]}
