{"eip":7896,"title":"ABI attachment in `wallet_sendCalls`","description":"A capability to enable calldata decoding in wallets.","authors":["Francisco Giordano (@frangio)"],"status":"Stagnant","type":"Standards Track","category":"Interface","created":"2025-02-27","requires":[5792],"discussionsTo":"https://ethereum-magicians.org/t/eip-tbd-abi-attachment-in-wallet-sendcalls/23016","repo":"EIPs","label":"EIP-7896","officialUrl":"https://eips.ethereum.org/EIPS/eip-7896","sourceUrl":"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7896.md","url":"https://eips.huatuo.xyz/eip-7896/","tldr":{"en":"Adds an `interfaces` capability to `wallet_sendCalls` so dapps can attach contract ABIs, letting wallets decode calldata and show users what they are signing instead of raw hex.","ja":"wallet_sendCalls に `interfaces` ケイパビリティを追加し、dapp がコントラクトの ABI を添付できるようにする。ウォレットは calldata をデコードして、生の 16 進数の代わりに、署名内容をユーザーに表示できる。","ko":"wallet_sendCalls에 `interfaces` 기능을 추가해 dapp이 컨트랙트 ABI를 첨부할 수 있게 한다. 지갑은 calldata를 디코딩해 raw 16진수 대신 사용자가 무엇에 서명하는지 보여 줄 수 있다.","zh":"为 wallet_sendCalls 增加 `interfaces` 能力，让 dapp 附带合约 ABI，使钱包能够解码 calldata，向用户展示他们正在签署的内容，而不是原始十六进制。"},"tags":["wallet","rpc","abi","security","capabilities"],"explainers":{"en":{"lang":"en","tldr":"Adds an `interfaces` capability to `wallet_sendCalls` so dapps can attach contract ABIs, letting wallets decode calldata and show users what they are signing instead of raw hex.","tags":["wallet","rpc","abi","security","capabilities"],"related":[5792,1193],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7896/","markdown":"## What problem does it solve?\n\n\"Blind signing\" is one of Ethereum's biggest user-safety problems. When a dapp asks a wallet to send a transaction, the wallet receives `data` as an opaque bytestring. To show something meaningful (\"transfer 100 tokens to 0xf0c8…\") the wallet must guess the contract's ABI, either from a database of 4-byte selectors (which fails for new contracts and can be fooled by deliberate selector collisions) or from a verified-source service (which is centralised).\n\nTransaction simulation helps but cannot predict every outcome. The dapp, on the other hand, always knows the ABI it used to build the call. This EIP lets it hand that ABI to the wallet.\n\n## How it works\n\nIt extends the batch-call API of [EIP-5792](/eip-5792/) with a new capability called `interfaces`:\n\n- In a `wallet_sendCalls` request, `capabilities.interfaces` maps contract addresses (normally the `to` addresses in `calls`) to `{ version, spec }`.\n- Two versions are defined: `abi-v1` and `abi-v2`, matching Solidity's ABI coder v1 and v2. The `spec` is the standard Solidity JSON ABI array. It may include events and errors, but should be trimmed to what is relevant.\n- Dapps should set `optional: true` so the request still works on wallets that do not support the capability.\n- Wallets that support it should decode each call's `data` with the supplied ABI and display the arguments. They may cross-check the ABI against a database of verified or trusted specs.\n- `wallet_getCapabilities` advertises support with a `versions` array, e.g. `[\"abi-v1\", \"abi-v2\"]`.\n\n## Sample code\n\nA `wallet_sendCalls` request with an attached ABI for an ERC-20 `transfer`:\n\n```ts\nawait provider.request({\n  method: \"wallet_sendCalls\",\n  params: [{\n    version: \"1.0\",\n    from: account,\n    chainId: \"0x1\",\n    calls: [{ to: token, value: \"0x0\", data: transferCalldata }],\n    capabilities: {\n      interfaces: {\n        optional: true,\n        [token]: {\n          version: \"abi-v2\",\n          spec: [{\n            type: \"function\", name: \"transfer\", stateMutability: \"nonpayable\",\n            inputs: [{ name: \"to\", type: \"address\" }, { name: \"value\", type: \"uint256\" }],\n            outputs: [{ name: \"\", type: \"bool\" }],\n          }],\n        },\n      },\n    },\n  }],\n});\n```\n\nChecking wallet support first:\n\n```json\n{ \"0x0\": { \"interfaces\": { \"supported\": true, \"versions\": [\"abi-v1\", \"abi-v2\"] } } }\n```\n\n## Things to know\n\n- **Status: Stagnant.** The proposal has seen no recent activity and its Rationale and Security Considerations sections were left as TODO. Wallet support should not be assumed.\n- An attached ABI is supplied by the dapp, which may itself be malicious. It improves *readability*, not trust; wallets are encouraged to validate it against trusted sources.\n- Addresses in `interfaces` are compared to `to` addresses case-sensitively, so use consistent casing.\n- Builds on [EIP-5792](/eip-5792/), which wallets expose through the standard [EIP-1193](/eip-1193/) provider.\n"},"ja":{"lang":"ja","tldr":"wallet_sendCalls に `interfaces` ケイパビリティを追加し、dapp がコントラクトの ABI を添付できるようにする。ウォレットは calldata をデコードして、生の 16 進数の代わりに、署名内容をユーザーに表示できる。","tags":["wallet","rpc","abi","security","capabilities"],"related":[5792,1193],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7896/","markdown":"## 何を解決するのか\n\n「ブラインド署名」は、Ethereum におけるユーザー安全性の最大の問題の 1 つです。dapp がウォレットにトランザクションの送信を求めるとき、ウォレットは `data` を不透明なバイト列として受け取ります。意味のある表示（「100 トークンを 0xf0c8… に転送」）をするには、ウォレットはコントラクトの ABI を推測しなければなりません。その方法は、4 バイトの selector のデータベース（新しいコントラクトでは失敗し、意図的な selector の衝突で欺かれうる）か、検証済みソースのサービス（中央集権的）のいずれかです。\n\nトランザクションのシミュレーションは役に立ちますが、あらゆる結果を予測できるわけではありません。一方、dapp は、呼び出しの組み立てに使った ABI を常に知っています。この EIP は、その ABI をウォレットに渡せるようにします。\n\n## 仕組み\n\n[EIP-5792](/eip-5792/) のバッチ呼び出し API を、`interfaces` という新しいケイパビリティで拡張します。\n\n- `wallet_sendCalls` のリクエストでは、`capabilities.interfaces` が、コントラクトのアドレス（通常は `calls` 内の `to` アドレス）を `{ version, spec }` に対応づけます。\n- 2 つのバージョンが定義されています。`abi-v1` と `abi-v2` で、Solidity の ABI コーダー v1 と v2 に対応します。`spec` は標準的な Solidity の JSON ABI の配列です。イベントやエラーを含めてもかまいませんが、関連するものに絞るべきです。\n- dapp は `optional: true` を設定し、このケイパビリティをサポートしないウォレットでもリクエストが動作するようにするべきです。\n- サポートするウォレットは、渡された ABI で各呼び出しの `data` をデコードし、引数を表示するべきです。ABI を、検証済みまたは信頼できる仕様のデータベースと照合してもかまいません。\n- `wallet_getCapabilities` は、`versions` 配列（例: `[\"abi-v1\", \"abi-v2\"]`）でサポートを広告します。\n\n## サンプルコード\n\nERC-20 の `transfer` の ABI を添付した `wallet_sendCalls` リクエスト:\n\n```ts\nawait provider.request({\n  method: \"wallet_sendCalls\",\n  params: [{\n    version: \"1.0\",\n    from: account,\n    chainId: \"0x1\",\n    calls: [{ to: token, value: \"0x0\", data: transferCalldata }],\n    capabilities: {\n      interfaces: {\n        optional: true,\n        [token]: {\n          version: \"abi-v2\",\n          spec: [{\n            type: \"function\", name: \"transfer\", stateMutability: \"nonpayable\",\n            inputs: [{ name: \"to\", type: \"address\" }, { name: \"value\", type: \"uint256\" }],\n            outputs: [{ name: \"\", type: \"bool\" }],\n          }],\n        },\n      },\n    },\n  }],\n});\n```\n\n先にウォレットのサポートを確認する:\n\n```json\n{ \"0x0\": { \"interfaces\": { \"supported\": true, \"versions\": [\"abi-v1\", \"abi-v2\"] } } }\n```\n\n## 知っておくべきこと\n\n- **ステータス: Stagnant。** この提案には最近の動きがなく、Rationale と Security Considerations の節は TODO のままです。ウォレットが対応していると想定してはいけません。\n- 添付された ABI は dapp が提供するもので、dapp 自体が悪意を持っている可能性があります。これが改善するのは*可読性*であって信頼ではありません。ウォレットには、信頼できるソースと照合して検証することが推奨されます。\n- `interfaces` 内のアドレスは `to` アドレスと大文字小文字を区別して比較されるため、表記を統一してください。\n- [EIP-5792](/eip-5792/) の上に構築されており、ウォレットは標準の [EIP-1193](/eip-1193/) プロバイダーを通じてそれを公開します。\n"},"ko":{"lang":"ko","tldr":"wallet_sendCalls에 `interfaces` 기능을 추가해 dapp이 컨트랙트 ABI를 첨부할 수 있게 한다. 지갑은 calldata를 디코딩해 raw 16진수 대신 사용자가 무엇에 서명하는지 보여 줄 수 있다.","tags":["wallet","rpc","abi","security","capabilities"],"related":[5792,1193],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7896/","markdown":"## 어떤 문제를 해결하나요?\n\n\"블라인드 서명\"은 이더리움에서 가장 큰 사용자 안전 문제 중 하나입니다. dapp이 지갑에 트랜잭션 전송을 요청하면 지갑은 `data`를 의미를 알 수 없는 바이트열로 받습니다. 의미 있는 내용(\"0xf0c8…로 토큰 100개 전송\")을 보여 주려면 지갑이 컨트랙트의 ABI를 추측해야 하는데, 4바이트 selector 데이터베이스(새 컨트랙트에는 실패하고 의도적인 selector 충돌에 속을 수 있음)나 검증된 소스 서비스(중앙화됨)에 의존합니다.\n\n트랜잭션 시뮬레이션이 도움은 되지만 모든 결과를 예측할 수는 없습니다. 반면 dapp은 호출을 만드는 데 쓴 ABI를 항상 알고 있습니다. 이 EIP는 dapp이 그 ABI를 지갑에 넘길 수 있게 합니다.\n\n## 어떻게 동작하나요?\n\n[EIP-5792](/eip-5792/)의 배치 호출 API를 `interfaces`라는 새 기능으로 확장합니다.\n\n- `wallet_sendCalls` 요청에서 `capabilities.interfaces`는 컨트랙트 주소(보통 `calls`의 `to` 주소)를 `{ version, spec }`에 매핑합니다.\n- 두 가지 버전이 정의되어 있습니다. `abi-v1`과 `abi-v2`로, Solidity의 ABI 코더 v1, v2에 해당합니다. `spec`은 표준 Solidity JSON ABI 배열입니다. 이벤트와 에러를 포함해도 되지만 관련된 것만 남기도록 줄여야 합니다.\n- dapp은 이 기능을 지원하지 않는 지갑에서도 요청이 동작하도록 `optional: true`를 설정해야 합니다.\n- 이를 지원하는 지갑은 제공된 ABI로 각 호출의 `data`를 디코딩해 인자를 표시해야 합니다. ABI를 검증되었거나 신뢰할 수 있는 스펙의 데이터베이스와 대조해 확인할 수도 있습니다.\n- `wallet_getCapabilities`는 `versions` 배열(예: `[\"abi-v1\", \"abi-v2\"]`)로 지원 여부를 알립니다.\n\n## 샘플 코드\n\nERC-20 `transfer`의 ABI를 첨부한 `wallet_sendCalls` 요청:\n\n```ts\nawait provider.request({\n  method: \"wallet_sendCalls\",\n  params: [{\n    version: \"1.0\",\n    from: account,\n    chainId: \"0x1\",\n    calls: [{ to: token, value: \"0x0\", data: transferCalldata }],\n    capabilities: {\n      interfaces: {\n        optional: true,\n        [token]: {\n          version: \"abi-v2\",\n          spec: [{\n            type: \"function\", name: \"transfer\", stateMutability: \"nonpayable\",\n            inputs: [{ name: \"to\", type: \"address\" }, { name: \"value\", type: \"uint256\" }],\n            outputs: [{ name: \"\", type: \"bool\" }],\n          }],\n        },\n      },\n    },\n  }],\n});\n```\n\n먼저 지갑 지원 여부 확인하기:\n\n```json\n{ \"0x0\": { \"interfaces\": { \"supported\": true, \"versions\": [\"abi-v1\", \"abi-v2\"] } } }\n```\n\n## 알아둘 점\n\n- **상태: Stagnant.** 이 제안은 최근 활동이 없으며 Rationale과 Security Considerations 절은 TODO로 남아 있습니다. 지갑이 지원한다고 가정해서는 안 됩니다.\n- 첨부된 ABI는 dapp이 제공하는 것이며 dapp 자체가 악의적일 수 있습니다. 이것이 개선하는 것은 *가독성*이지 신뢰가 아닙니다. 지갑은 신뢰할 수 있는 출처와 대조해 검증하는 것이 권장됩니다.\n- `interfaces`의 주소는 `to` 주소와 대소문자를 구분해 비교하므로 대소문자를 일관되게 쓰세요.\n- [EIP-5792](/eip-5792/) 위에 구축되며, 지갑은 이를 표준 [EIP-1193](/eip-1193/) provider로 노출합니다.\n"},"zh":{"lang":"zh","tldr":"为 wallet_sendCalls 增加 `interfaces` 能力，让 dapp 附带合约 ABI，使钱包能够解码 calldata，向用户展示他们正在签署的内容，而不是原始十六进制。","tags":["wallet","rpc","abi","security","capabilities"],"related":[5792,1193],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7896/","markdown":"## 它解决什么问题？\n\n\"盲签\"是以太坊最大的用户安全问题之一。当 dapp 请求钱包发送交易时，钱包收到的 `data` 是一段不透明的字节串。要显示有意义的内容（\"向 0xf0c8… 转账 100 个代币\"），钱包必须猜测合约的 ABI，要么依靠 4 字节 selector 数据库（对新合约无效，还可能被刻意制造的 selector 碰撞欺骗），要么依靠已验证源码的服务（中心化）。\n\n交易模拟有帮助，但无法预测所有结果。而 dapp 总是知道自己构造调用时所用的 ABI。这份 EIP 让它把这份 ABI 交给钱包。\n\n## 它如何运作\n\n它用一个名为 `interfaces` 的新能力扩展了 [EIP-5792](/eip-5792/) 的批量调用 API：\n\n- 在 `wallet_sendCalls` 请求中，`capabilities.interfaces` 将合约地址（通常是 `calls` 中的 `to` 地址）映射到 `{ version, spec }`。\n- 定义了两个版本：`abi-v1` 和 `abi-v2`，分别对应 Solidity 的 ABI coder v1 和 v2。`spec` 是标准的 Solidity JSON ABI 数组。它可以包含事件和错误，但应当精简到相关的部分。\n- dapp 应当设置 `optional: true`，这样请求在不支持该能力的钱包上仍可使用。\n- 支持该能力的钱包应当用所提供的 ABI 解码每次调用的 `data` 并显示参数。它们可以对照已验证或受信任规范的数据库来交叉检查 ABI。\n- `wallet_getCapabilities` 通过 `versions` 数组声明支持情况，例如 `[\"abi-v1\", \"abi-v2\"]`。\n\n## 示例代码\n\n一个附带了 ERC-20 `transfer` ABI 的 `wallet_sendCalls` 请求：\n\n```ts\nawait provider.request({\n  method: \"wallet_sendCalls\",\n  params: [{\n    version: \"1.0\",\n    from: account,\n    chainId: \"0x1\",\n    calls: [{ to: token, value: \"0x0\", data: transferCalldata }],\n    capabilities: {\n      interfaces: {\n        optional: true,\n        [token]: {\n          version: \"abi-v2\",\n          spec: [{\n            type: \"function\", name: \"transfer\", stateMutability: \"nonpayable\",\n            inputs: [{ name: \"to\", type: \"address\" }, { name: \"value\", type: \"uint256\" }],\n            outputs: [{ name: \"\", type: \"bool\" }],\n          }],\n        },\n      },\n    },\n  }],\n});\n```\n\n先检查钱包是否支持：\n\n```json\n{ \"0x0\": { \"interfaces\": { \"supported\": true, \"versions\": [\"abi-v1\", \"abi-v2\"] } } }\n```\n\n## 需要注意\n\n- **状态：Stagnant。** 这份提案近期没有任何动静，其 Rationale 和 Security Considerations 部分仍是 TODO。不应假设钱包已支持。\n- 附带的 ABI 由 dapp 提供，而 dapp 本身可能是恶意的。它提升的是*可读性*，而不是可信度；建议钱包对照受信任的来源进行验证。\n- `interfaces` 中的地址与 `to` 地址是区分大小写比较的，所以请使用一致的大小写。\n- 构建在 [EIP-5792](/eip-5792/) 之上，钱包通过标准的 [EIP-1193](/eip-1193/) provider 暴露它。\n"}}}
