{"eip":2400,"title":"Transaction Receipt URI","description":"URI format for submitted transactions with complete information for transaction decoding","authors":["Ricardo Guilherme Schmidt (@3esmit)","Eric Dvorsak (@yenda)"],"status":"Stagnant","type":"Standards Track","category":"ERC","created":"2019-11-05","requires":[155,681],"discussionsTo":"https://ethereum-magicians.org/t/eip-2400-transaction-receipt-uri/","repo":"ERCs","label":"ERC-2400","officialUrl":"https://eips.ethereum.org/EIPS/eip-2400","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-2400.md","url":"https://eips.huatuo.xyz/eip-2400/","tldr":{"en":"A URI format, ethereum:tx-\u003chash\u003e@\u003cchainId\u003e, for sharing a submitted transaction together with the method and event signatures needed to decode it.","ja":"送信済みトランザクションを、デコードに必要なメソッドとイベントのシグネチャとともに共有するための URI 形式 ethereum:tx-\u003chash\u003e@\u003cchainId\u003e。","ko":"제출된 트랜잭션을 디코딩에 필요한 메서드와 이벤트 시그니처와 함께 공유하기 위한 URI 형식 ethereum:tx-\u003chash\u003e@\u003cchainId\u003e.","zh":"一种 URI 格式 ethereum:tx-\u003chash\u003e@\u003cchainId\u003e，用于分享已提交的交易，并附带解码它所需的方法和事件签名。"},"tags":["uri","transactions","wallet","interop","qr"],"explainers":{"en":{"lang":"en","tldr":"A URI format, ethereum:tx-\u003chash\u003e@\u003cchainId\u003e, for sharing a submitted transaction together with the method and event signatures needed to decode it.","tags":["uri","transactions","wallet","interop","qr"],"related":[681,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-2400/","markdown":"## What problem does it solve?\n\nA bare transaction hash looks like any other 32-byte hash. It does not say which chain it lives on, and a viewer that has never seen the contract cannot decode the calldata or the logs.\n\nERC-2400 defines a standard URI for \"a transaction that has been submitted\". Wallets, dapps, chat apps or a QR code on a vending machine can hand it off, and the receiver opens the user's preferred explorer with enough context to show the transaction meaningfully. It is the receipt-side companion to [EIP-681](/eip-681/), which describes transaction *requests*.\n\n## How it works\n\nThe grammar, simplified:\n\n```\nethereum:tx-\u003c0x + 64 hex chars\u003e[@\u003cchainId\u003e][?method=\u003csig\u003e\u0026events=\u003csig\u003e;\u003csig\u003e...]\n```\n\n- **`tx-` prefix** marks the URI as a receipt. Future incompatible formats must use a different dash-separated prefix.\n- **Transaction hash** is mandatory. The client looks it up on the given chain; if it is not found it checks the pending pool and keeps polling. If it still cannot find it, it shows a \"transaction not found\" error.\n- **`@chainId`** is the decimal chain ID from [EIP-155](/eip-155/). If omitted, mainnet (`1`) is assumed.\n- **`method`** is a function signature such as `transfer(address,uint256)`. The client must check that its 4-byte selector matches the first 4 bytes of the calldata and show a validation error otherwise.\n- **`events`** is a `;`-separated list of event signatures. A `!` before a type marks an indexed parameter. For successful transactions, each listed event must appear at least once in the receipt logs; pending and failed transactions are not checked against events.\n\nThe idea is that whoever signed the transaction already knew the ABI, so they can attach the relevant fragments when sharing it.\n\n## Sample code\n\nURIs from the spec:\n\n```text\nethereum:tx-0x1143b5e38fe3cf585fb026fb9b5ce35c85a691786397dc8a23a07a62796d8172@1\n\nethereum:tx-0x5375e805b0c6afa20daab8d37352bf09a533efb03129ba56dee869e2ce4f2f92@1?method=\"transfer(address,uint256)\"\u0026events=\"Transfer(!address,!address,uint256)\"\n```\n\nValidating the `method` parameter against a fetched transaction (ethers v6):\n\n```ts\nimport { JsonRpcProvider, id } from \"ethers\";\n\ndeclare const receiptUri: string;\ndeclare function rpcUrlFor(chainId: number): string; // your own chain -\u003e RPC map\n\nconst uri = new URL(receiptUri.replace(\"ethereum:tx-\", \"https://x/\")); // reuse URL parser\nconst [hash, chain = \"1\"] = uri.pathname.slice(1).split(\"@\");\nconst method = uri.searchParams.get(\"method\")?.replace(/\"/g, \"\");\n\nconst provider = new JsonRpcProvider(rpcUrlFor(Number(chain)));\nconst tx = await provider.getTransaction(hash);\nif (method \u0026\u0026 tx \u0026\u0026 tx.data.slice(0, 10) !== id(method).slice(0, 10)) {\n  throw new Error(\"method validation error\");\n}\n```\n\n## Things to know\n\n- **Status: Stagnant.** The format is not widely implemented by wallets or explorers; treat it as a reference design rather than something clients will understand.\n- The spec says to keep checking a pending transaction until it is \"unrevertable\", suggesting about 12 blocks. On post-Merge Ethereum, finality is a separate consensus concept, so implementers should decide what confirmation threshold to show.\n- A missing hash may simply mean the transaction is still propagating, or that it was replaced by another transaction with the same nonce.\n- Signatures in the URI are hints supplied by the sharer, not proof of anything. The client must validate them against the actual on-chain data, as the spec requires.\n"},"ja":{"lang":"ja","tldr":"送信済みトランザクションを、デコードに必要なメソッドとイベントのシグネチャとともに共有するための URI 形式 ethereum:tx-\u003chash\u003e@\u003cchainId\u003e。","tags":["uri","transactions","wallet","interop","qr"],"related":[681,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-2400/","markdown":"## 何を解決するのか\n\nトランザクションハッシュ単体では、他の 32 バイトのハッシュと見分けがつきません。どのチェーンのものかも分からず、そのコントラクトを見たことがない閲覧側は calldata もログもデコードできません。\n\nERC-2400 は「送信済みのトランザクション」を表す標準 URI を定義します。ウォレット、dapp、チャットアプリ、あるいは自動販売機の QR コードがこれを受け渡し、受け取った側はユーザーが好むエクスプローラーを、トランザクションを意味のある形で表示できるだけの文脈つきで開きます。トランザクションの*リクエスト*を記述する [EIP-681](/eip-681/) に対する、レシート側の対になる仕様です。\n\n## 仕組み\n\n文法（簡略化）:\n\n```\nethereum:tx-\u003c0x + 64 hex chars\u003e[@\u003cchainId\u003e][?method=\u003csig\u003e\u0026events=\u003csig\u003e;\u003csig\u003e...]\n```\n\n- **`tx-` プレフィックス**は、この URI がレシートであることを示します。将来の互換性のない形式は、別のダッシュ区切りのプレフィックスを使わなければなりません。\n- **トランザクションハッシュ**は必須です。クライアントは指定されたチェーンでそれを検索し、見つからなければ pending プールを確認してポーリングを続けます。それでも見つからなければ「transaction not found」エラーを表示します。\n- **`@chainId`** は [EIP-155](/eip-155/) の 10 進のチェーン ID です。省略した場合はメインネット（`1`）とみなします。\n- **`method`** は `transfer(address,uint256)` のような関数シグネチャです。クライアントは、その 4 バイトのセレクターが calldata の先頭 4 バイトと一致することを確認し、一致しなければ検証エラーを表示しなければなりません。\n- **`events`** は `;` 区切りのイベントシグネチャのリストです。型の前に `!` を付けると indexed パラメーターを表します。成功したトランザクションでは、列挙された各イベントがレシートのログに少なくとも 1 回現れなければなりません。pending や失敗したトランザクションは、イベントに対する確認を行いません。\n\nトランザクションに署名した人はすでに ABI を知っているはずなので、共有時に関連する断片を添付できる、という考え方です。\n\n## サンプルコード\n\n仕様の URI:\n\n```text\nethereum:tx-0x1143b5e38fe3cf585fb026fb9b5ce35c85a691786397dc8a23a07a62796d8172@1\n\nethereum:tx-0x5375e805b0c6afa20daab8d37352bf09a533efb03129ba56dee869e2ce4f2f92@1?method=\"transfer(address,uint256)\"\u0026events=\"Transfer(!address,!address,uint256)\"\n```\n\n取得したトランザクションに対して `method` パラメーターを検証する（ethers v6）:\n\n```ts\nimport { JsonRpcProvider, id } from \"ethers\";\n\ndeclare const receiptUri: string;\ndeclare function rpcUrlFor(chainId: number): string; // your own chain -\u003e RPC map\n\nconst uri = new URL(receiptUri.replace(\"ethereum:tx-\", \"https://x/\")); // reuse URL parser\nconst [hash, chain = \"1\"] = uri.pathname.slice(1).split(\"@\");\nconst method = uri.searchParams.get(\"method\")?.replace(/\"/g, \"\");\n\nconst provider = new JsonRpcProvider(rpcUrlFor(Number(chain)));\nconst tx = await provider.getTransaction(hash);\nif (method \u0026\u0026 tx \u0026\u0026 tx.data.slice(0, 10) !== id(method).slice(0, 10)) {\n  throw new Error(\"method validation error\");\n}\n```\n\n## 知っておくべきこと\n\n- **ステータス: Stagnant。** この形式はウォレットやエクスプローラーであまり実装されていません。クライアントが理解してくれるものではなく、リファレンス設計として扱ってください。\n- 仕様は、pending のトランザクションが「巻き戻らない」状態になるまで確認を続けるよう述べており、約 12 ブロックを提案しています。The Merge 後の Ethereum ではファイナリティは別のコンセンサス上の概念なので、実装者はどの確認しきい値を表示するかを決める必要があります。\n- ハッシュが見つからない場合は、トランザクションがまだ伝播中であるか、同じ nonce の別のトランザクションに置き換えられた可能性があります。\n- URI 内のシグネチャは共有者が提供するヒントであり、何かの証明ではありません。仕様が求めるとおり、クライアントは実際のオンチェーンのデータに照らして検証しなければなりません。\n"},"ko":{"lang":"ko","tldr":"제출된 트랜잭션을 디코딩에 필요한 메서드와 이벤트 시그니처와 함께 공유하기 위한 URI 형식 ethereum:tx-\u003chash\u003e@\u003cchainId\u003e.","tags":["uri","transactions","wallet","interop","qr"],"related":[681,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-2400/","markdown":"## 어떤 문제를 해결하나요?\n\n트랜잭션 해시만으로는 다른 32바이트 해시와 구분이 되지 않습니다. 어느 체인에 있는지도 알 수 없고, 해당 컨트랙트를 본 적 없는 뷰어는 calldata나 로그를 디코딩할 수 없습니다.\n\nERC-2400은 \"제출된 트랜잭션\"을 나타내는 표준 URI를 정의합니다. 지갑, dapp, 채팅 앱, 심지어 자판기의 QR 코드가 이를 전달할 수 있고, 받는 쪽은 사용자가 선호하는 익스플로러를 트랜잭션을 의미 있게 보여 줄 만큼의 맥락과 함께 엽니다. 트랜잭션 *요청*을 설명하는 [EIP-681](/eip-681/)의 영수증 쪽 짝입니다.\n\n## 어떻게 동작하나요?\n\n문법(단순화):\n\n```\nethereum:tx-\u003c0x + 64 hex chars\u003e[@\u003cchainId\u003e][?method=\u003csig\u003e\u0026events=\u003csig\u003e;\u003csig\u003e...]\n```\n\n- **`tx-` 접두사**는 이 URI가 영수증임을 나타냅니다. 앞으로 호환되지 않는 형식은 대시로 구분된 다른 접두사를 써야 합니다.\n- **트랜잭션 해시**는 필수입니다. 클라이언트는 지정된 체인에서 이를 조회하고, 없으면 펜딩 풀을 확인하며 계속 폴링합니다. 그래도 찾지 못하면 \"transaction not found\" 오류를 보여 줍니다.\n- **`@chainId`**는 [EIP-155](/eip-155/)의 10진수 체인 ID입니다. 생략하면 메인넷(`1`)으로 간주합니다.\n- **`method`**는 `transfer(address,uint256)` 같은 함수 시그니처입니다. 클라이언트는 그 4바이트 셀렉터가 calldata의 앞 4바이트와 일치하는지 확인해야 하며, 그렇지 않으면 검증 오류를 보여 줘야 합니다.\n- **`events`**는 `;`로 구분된 이벤트 시그니처 목록입니다. 타입 앞의 `!`는 indexed 파라미터를 뜻합니다. 성공한 트랜잭션에서는 나열된 각 이벤트가 영수증 로그에 최소 한 번 나타나야 하며, 펜딩이거나 실패한 트랜잭션은 이벤트에 대해 검사하지 않습니다.\n\n트랜잭션에 서명한 사람은 이미 ABI를 알고 있으므로, 공유할 때 관련 조각을 첨부할 수 있다는 발상입니다.\n\n## 샘플 코드\n\n스펙의 URI:\n\n```text\nethereum:tx-0x1143b5e38fe3cf585fb026fb9b5ce35c85a691786397dc8a23a07a62796d8172@1\n\nethereum:tx-0x5375e805b0c6afa20daab8d37352bf09a533efb03129ba56dee869e2ce4f2f92@1?method=\"transfer(address,uint256)\"\u0026events=\"Transfer(!address,!address,uint256)\"\n```\n\n가져온 트랜잭션에 대해 `method` 파라미터 검증하기(ethers v6):\n\n```ts\nimport { JsonRpcProvider, id } from \"ethers\";\n\ndeclare const receiptUri: string;\ndeclare function rpcUrlFor(chainId: number): string; // your own chain -\u003e RPC map\n\nconst uri = new URL(receiptUri.replace(\"ethereum:tx-\", \"https://x/\")); // reuse URL parser\nconst [hash, chain = \"1\"] = uri.pathname.slice(1).split(\"@\");\nconst method = uri.searchParams.get(\"method\")?.replace(/\"/g, \"\");\n\nconst provider = new JsonRpcProvider(rpcUrlFor(Number(chain)));\nconst tx = await provider.getTransaction(hash);\nif (method \u0026\u0026 tx \u0026\u0026 tx.data.slice(0, 10) !== id(method).slice(0, 10)) {\n  throw new Error(\"method validation error\");\n}\n```\n\n## 알아둘 점\n\n- **상태: Stagnant.** 이 형식은 지갑이나 익스플로러에서 널리 구현되어 있지 않습니다. 클라이언트가 이해해 줄 것으로 기대하기보다 참고용 설계로 다루세요.\n- 스펙은 펜딩 트랜잭션이 \"되돌릴 수 없게\" 될 때까지 계속 확인하라고 하며 약 12블록을 제안합니다. The Merge 이후의 이더리움에서 파이널리티는 별도의 합의 개념이므로, 구현자는 어떤 확인 임계값을 보여 줄지 정해야 합니다.\n- 해시를 찾지 못한 것은 트랜잭션이 아직 전파 중이거나 같은 nonce를 가진 다른 트랜잭션으로 대체되었기 때문일 수 있습니다.\n- URI의 시그니처는 공유하는 쪽이 제공하는 힌트일 뿐 무엇의 증명도 아닙니다. 클라이언트는 스펙이 요구하는 대로 실제 온체인 데이터에 대해 검증해야 합니다.\n"},"zh":{"lang":"zh","tldr":"一种 URI 格式 ethereum:tx-\u003chash\u003e@\u003cchainId\u003e，用于分享已提交的交易，并附带解码它所需的方法和事件签名。","tags":["uri","transactions","wallet","interop","qr"],"related":[681,155],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-2400/","markdown":"## 它解决什么问题？\n\n单独一个交易哈希看起来和其他任何 32 字节哈希没有区别。它没有说明自己属于哪条链，而且从未见过该合约的查看者无法解码 calldata 或日志。\n\nERC-2400 为「已提交的交易」定义了标准 URI。钱包、dapp、聊天应用，甚至自动售货机上的二维码都可以传递它，接收方会用用户偏好的浏览器打开，并带上足够的上下文来有意义地展示这笔交易。它是 [EIP-681](/eip-681/) 在回执一侧的配套规范，后者描述的是交易*请求*。\n\n## 它如何运作\n\n语法（简化）：\n\n```\nethereum:tx-\u003c0x + 64 hex chars\u003e[@\u003cchainId\u003e][?method=\u003csig\u003e\u0026events=\u003csig\u003e;\u003csig\u003e...]\n```\n\n- **`tx-` 前缀**表明该 URI 是一份回执。将来不兼容的格式必须使用另一个以短横线分隔的前缀。\n- **交易哈希**是必需的。客户端在给定的链上查找它；如果找不到，就检查待处理池并持续轮询。如果仍然找不到，则显示「transaction not found」错误。\n- **`@chainId`** 是 [EIP-155](/eip-155/) 中的十进制链 ID。省略时默认为主网（`1`）。\n- **`method`** 是函数签名，例如 `transfer(address,uint256)`。客户端必须检查其 4 字节选择器是否与 calldata 的前 4 个字节一致，否则显示验证错误。\n- **`events`** 是以 `;` 分隔的事件签名列表。类型前的 `!` 表示 indexed 参数。对于成功的交易，列出的每个事件必须在回执日志中至少出现一次；待处理和失败的交易不会按事件进行检查。\n\n其思路是：签署该交易的人本来就知道 ABI，所以分享时可以附上相关片段。\n\n## 示例代码\n\n规范中的 URI：\n\n```text\nethereum:tx-0x1143b5e38fe3cf585fb026fb9b5ce35c85a691786397dc8a23a07a62796d8172@1\n\nethereum:tx-0x5375e805b0c6afa20daab8d37352bf09a533efb03129ba56dee869e2ce4f2f92@1?method=\"transfer(address,uint256)\"\u0026events=\"Transfer(!address,!address,uint256)\"\n```\n\n针对获取到的交易验证 `method` 参数（ethers v6）：\n\n```ts\nimport { JsonRpcProvider, id } from \"ethers\";\n\ndeclare const receiptUri: string;\ndeclare function rpcUrlFor(chainId: number): string; // your own chain -\u003e RPC map\n\nconst uri = new URL(receiptUri.replace(\"ethereum:tx-\", \"https://x/\")); // reuse URL parser\nconst [hash, chain = \"1\"] = uri.pathname.slice(1).split(\"@\");\nconst method = uri.searchParams.get(\"method\")?.replace(/\"/g, \"\");\n\nconst provider = new JsonRpcProvider(rpcUrlFor(Number(chain)));\nconst tx = await provider.getTransaction(hash);\nif (method \u0026\u0026 tx \u0026\u0026 tx.data.slice(0, 10) !== id(method).slice(0, 10)) {\n  throw new Error(\"method validation error\");\n}\n```\n\n## 需要注意\n\n- **状态：Stagnant。** 钱包和浏览器对该格式的实现并不普遍；请把它当作参考设计，而不是客户端都能理解的东西。\n- 规范说要持续检查待处理交易，直到它「不可回滚」，建议约 12 个区块。在合并（Merge）之后的以太坊上，最终性是另一个共识层面的概念，因此实现者应自行决定显示什么样的确认阈值。\n- 找不到哈希可能只是因为交易仍在传播，或者它已被同一 nonce 的另一笔交易替换。\n- URI 中的签名是分享者提供的提示，不能证明任何事情。客户端必须像规范要求的那样，对照实际的链上数据进行验证。\n"}}}
