{"eip":4430,"title":"Described Transactions","description":"A technique for contracts to provide a human-readable description of a transaction's side-effects.","authors":["Richard Moore (@ricmoo)","Nick Johnson (@arachnid)"],"status":"Stagnant","type":"Standards Track","category":"ERC","created":"2021-11-07","discussionsTo":"https://ethereum-magicians.org/t/discussion-eip-4430-described-transactions/8762","repo":"ERCs","label":"ERC-4430","officialUrl":"https://eips.ethereum.org/EIPS/eip-4430","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-4430.md","url":"https://eips.huatuo.xyz/eip-4430/","tldr":{"en":"Proposed a contract method that returns both a human-readable description of an action and the exact calldata to perform it, so wallets can show users what they are signing instead of an opaque hex blob.","ja":"ユーザーが不透明な 16 進数の塊ではなく中身を理解して署名できるよう、アクションの人間が読める説明と、それを実行する正確な calldata の両方を返すコントラクトメソッドを提案した。","ko":"사용자가 불투명한 16진수 덩어리 대신 내용을 알고 서명할 수 있도록, 동작에 대한 사람이 읽을 수 있는 설명과 그 동작을 수행하는 정확한 calldata를 함께 반환하는 컨트랙트 메서드를 제안했다.","zh":"提出一种合约方法，同时返回对某个操作的人类可读描述和执行该操作所需的精确 calldata，让钱包能向用户展示他们签署的内容，而不是一串不透明的十六进制数据。"},"tags":["wallets","ux","signing","transactions","security"],"explainers":{"en":{"lang":"en","tldr":"Proposed a contract method that returns both a human-readable description of an action and the exact calldata to perform it, so wallets can show users what they are signing instead of an opaque hex blob.","tags":["wallets","ux","signing","transactions","security"],"related":[712],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-4430/","markdown":"## What problem does it solve?\n\nWhen a wallet asks you to approve a transaction, it usually shows a contract address and a blob of calldata. Outside a few special-cased actions like ERC-20 transfers, the wallet has no idea what the call does, so the user signs blind.\n\nDecoding the calldata does not always help either. The spec's example is ENS `commit(bytes32)`: the argument is a hash of the name, owner and a secret, so the information a user would care about is not in the transaction at all.\n\nEIP-4430 lets an *honest* contract explain itself. The contract author writes code that turns the user's original inputs into both a sentence and the matching calldata, and auditors can check that the two agree.\n\n## How it works\n\nA contract exposes a \"virtual function\" (the spec still uses the placeholder name `eipXXXDescribe`):\n\n```solidity\nfunction eipXXXDescribe(bytes inputs, bytes32 reserved)\n    view returns (string description, bytes execcode);\n```\n\n1. The dapp gives the wallet the high-level `inputs` (for ENS: name, owner, secret).\n2. The wallet calls the method statically. During that call `ADDRESS`, `CALLER`, `VALUE` and `GASPRICE` must equal those of the transaction being described, so the description can depend on who is sending what. Block values should match the latest block, with `COINBASE` set to zero.\n3. The wallet shows `description` to the user. If they accept, it sends a transaction to the same contract with `execcode` as its data.\n4. If the method reverts, signing is aborted.\n\nBecause the description and the calldata come out of one evaluation, the user approves the text and the machine executes the bytes that text was generated with.\n\n## Sample code\n\nIllustrative wallet flow (ethers v6). The method name is a placeholder from the draft:\n\n```ts\nimport { Contract, BrowserProvider, ZeroHash } from \"ethers\";\n\nconst provider = new BrowserProvider(window.ethereum);\nconst signer = await provider.getSigner();\nconst abi = [\"function eipXXXDescribe(bytes inputs, bytes32 reserved) view returns (string, bytes)\"];\nconst target = new Contract(contractAddress, abi, provider);\n\n// Evaluate as the real sender, with the real value\nconst [description, execcode] = await target.eipXXXDescribe.staticCall(\n  encodedInputs, ZeroHash, { from: await signer.getAddress(), value }\n);\n\nif (await askUser(description)) {      // show sanitized text\n  await signer.sendTransaction({ to: contractAddress, data: execcode, value });\n}\n```\n\n## Things to know\n\n- Status: **Stagnant**. No final method name or selector was ever assigned, and wallets did not adopt it as a standard.\n- It explicitly does **not** protect against malicious contracts: a contract can lie in its description. The security model relies on descriptions being audited with the code.\n- Wallets must sanitize descriptions carefully: hidden HTML, homoglyphs, right-to-left marks and odd whitespace can all make text look like something it is not.\n- For off-chain signatures, [EIP-712](/eip-712/) typed data addresses a related readability problem.\n"},"ja":{"lang":"ja","tldr":"ユーザーが不透明な 16 進数の塊ではなく中身を理解して署名できるよう、アクションの人間が読める説明と、それを実行する正確な calldata の両方を返すコントラクトメソッドを提案した。","tags":["wallets","ux","signing","transactions","security"],"related":[712],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-4430/","markdown":"## 何を解決するのか\n\nウォレットがトランザクションの承認を求めるとき、通常はコントラクトアドレスと calldata の塊が表示されるだけです。ERC-20 の転送のような特別扱いされた一部のアクションを除けば、ウォレットはその呼び出しが何をするのか分からないため、ユーザーは中身を知らないまま署名することになります。\n\ncalldata をデコードしても、常に役立つとは限りません。仕様の例は ENS の `commit(bytes32)` です。引数は名前、オーナー、シークレットのハッシュであり、ユーザーが知りたい情報はトランザクションの中に含まれていません。\n\nEIP-4430 は、*誠実な*コントラクトが自分自身を説明できるようにします。コントラクトの作者は、ユーザーの元の入力から 1 つの文と、それに対応する calldata の両方を生成するコードを書き、監査者は両者が一致していることを確認できます。\n\n## 仕組み\n\nコントラクトは「仮想関数」を公開します（仕様ではまだプレースホルダー名 `eipXXXDescribe` が使われています）。\n\n```solidity\nfunction eipXXXDescribe(bytes inputs, bytes32 reserved)\n    view returns (string description, bytes execcode);\n```\n\n1. dapp が高レベルの `inputs` をウォレットに渡します（ENS の場合は名前、オーナー、シークレット）。\n2. ウォレットがこのメソッドを静的に呼び出します。この呼び出しの間、`ADDRESS`、`CALLER`、`VALUE`、`GASPRICE` は、説明対象のトランザクションのものと等しくなければなりません。そのため、説明は誰が何を送るかに依存できます。ブロックの値は最新ブロックと一致させ、`COINBASE` はゼロにします。\n3. ウォレットはユーザーに `description` を表示します。ユーザーが承諾すると、`execcode` をデータとして同じコントラクトにトランザクションを送ります。\n4. メソッドが revert した場合、署名は中止されます。\n\n説明と calldata は 1 回の評価から生成されるため、ユーザーが承認するテキストと、マシンが実行するバイト列は、そのテキストの生成元と同じものになります。\n\n## サンプルコード\n\nウォレットのフローの例（ethers v6）。メソッド名はドラフト上のプレースホルダーです。\n\n```ts\nimport { Contract, BrowserProvider, ZeroHash } from \"ethers\";\n\nconst provider = new BrowserProvider(window.ethereum);\nconst signer = await provider.getSigner();\nconst abi = [\"function eipXXXDescribe(bytes inputs, bytes32 reserved) view returns (string, bytes)\"];\nconst target = new Contract(contractAddress, abi, provider);\n\n// Evaluate as the real sender, with the real value\nconst [description, execcode] = await target.eipXXXDescribe.staticCall(\n  encodedInputs, ZeroHash, { from: await signer.getAddress(), value }\n);\n\nif (await askUser(description)) {      // show sanitized text\n  await signer.sendTransaction({ to: contractAddress, data: execcode, value });\n}\n```\n\n## 知っておくべきこと\n\n- ステータス: **Stagnant**。最終的なメソッド名やセレクターは割り当てられず、ウォレットも標準として採用しませんでした。\n- 悪意のあるコントラクトに対する保護は明示的に**提供しません**。コントラクトは説明文で嘘をつくことができます。セキュリティモデルは、説明文がコードとともに監査されることを前提としています。\n- ウォレットは説明文を慎重にサニタイズする必要があります。隠れた HTML、ホモグリフ、右から左への制御文字、不自然な空白によって、テキストが実際とは違うものに見えてしまう可能性があります。\n- オフチェーン署名については、[EIP-712](/eip-712/) の型付きデータが、関連する可読性の問題に対応しています。\n"},"ko":{"lang":"ko","tldr":"사용자가 불투명한 16진수 덩어리 대신 내용을 알고 서명할 수 있도록, 동작에 대한 사람이 읽을 수 있는 설명과 그 동작을 수행하는 정확한 calldata를 함께 반환하는 컨트랙트 메서드를 제안했다.","tags":["wallets","ux","signing","transactions","security"],"related":[712],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-4430/","markdown":"## 어떤 문제를 해결하나요?\n\n지갑이 트랜잭션 승인을 요청할 때는 보통 컨트랙트 주소와 calldata 덩어리만 보여 줍니다. ERC-20 전송처럼 따로 처리되는 일부 동작을 제외하면 지갑은 그 호출이 무엇을 하는지 알지 못하므로, 사용자는 내용을 모른 채 서명하게 됩니다.\n\ncalldata를 디코딩해도 항상 도움이 되는 것은 아닙니다. 사양의 예시는 ENS `commit(bytes32)`입니다. 인자는 이름, 소유자, 시크릿의 해시이므로 사용자가 알고 싶은 정보는 트랜잭션 안에 전혀 들어 있지 않습니다.\n\nEIP-4430은 *정직한* 컨트랙트가 스스로를 설명할 수 있게 합니다. 컨트랙트 작성자는 사용자의 원래 입력을 문장 하나와 그에 맞는 calldata로 함께 바꾸는 코드를 작성하고, 감사자는 둘이 일치하는지 확인할 수 있습니다.\n\n## 어떻게 동작하나요?\n\n컨트랙트는 \"가상 함수\"를 노출합니다(사양에서는 아직 자리 표시자 이름 `eipXXXDescribe`를 사용합니다).\n\n```solidity\nfunction eipXXXDescribe(bytes inputs, bytes32 reserved)\n    view returns (string description, bytes execcode);\n```\n\n1. dapp이 상위 수준의 `inputs`를 지갑에 전달합니다(ENS의 경우 이름, 소유자, 시크릿).\n2. 지갑이 이 메서드를 정적으로 호출합니다. 이 호출 동안 `ADDRESS`, `CALLER`, `VALUE`, `GASPRICE`는 설명 대상 트랜잭션의 값과 같아야 하므로, 설명은 누가 무엇을 보내는지에 따라 달라질 수 있습니다. 블록 값은 최신 블록과 일치해야 하며 `COINBASE`는 0으로 설정합니다.\n3. 지갑이 사용자에게 `description`을 보여 줍니다. 사용자가 수락하면 `execcode`를 데이터로 하여 같은 컨트랙트에 트랜잭션을 보냅니다.\n4. 메서드가 revert되면 서명은 중단됩니다.\n\n설명과 calldata가 한 번의 평가에서 함께 나오므로, 사용자가 승인한 텍스트와 머신이 실행하는 바이트는 그 텍스트를 생성할 때 쓰인 것과 같습니다.\n\n## 샘플 코드\n\n지갑 흐름 예시(ethers v6). 메서드 이름은 초안의 자리 표시자입니다.\n\n```ts\nimport { Contract, BrowserProvider, ZeroHash } from \"ethers\";\n\nconst provider = new BrowserProvider(window.ethereum);\nconst signer = await provider.getSigner();\nconst abi = [\"function eipXXXDescribe(bytes inputs, bytes32 reserved) view returns (string, bytes)\"];\nconst target = new Contract(contractAddress, abi, provider);\n\n// Evaluate as the real sender, with the real value\nconst [description, execcode] = await target.eipXXXDescribe.staticCall(\n  encodedInputs, ZeroHash, { from: await signer.getAddress(), value }\n);\n\nif (await askUser(description)) {      // show sanitized text\n  await signer.sendTransaction({ to: contractAddress, data: execcode, value });\n}\n```\n\n## 알아둘 점\n\n- 상태: **Stagnant**. 최종 메서드 이름이나 selector는 끝내 정해지지 않았고, 지갑들도 표준으로 채택하지 않았습니다.\n- 악의적인 컨트랙트에 대한 보호는 명시적으로 **제공하지 않습니다**. 컨트랙트는 설명에서 거짓말을 할 수 있습니다. 보안 모델은 설명이 코드와 함께 감사된다는 전제에 기대고 있습니다.\n- 지갑은 설명 텍스트를 신중하게 정제해야 합니다. 숨겨진 HTML, 동형 문자, 오른쪽에서 왼쪽으로 쓰는 표시, 이상한 공백 때문에 텍스트가 실제와 다르게 보일 수 있습니다.\n- 오프체인 서명의 경우 [EIP-712](/eip-712/) 타입 데이터가 관련된 가독성 문제를 다룹니다.\n"},"zh":{"lang":"zh","tldr":"提出一种合约方法，同时返回对某个操作的人类可读描述和执行该操作所需的精确 calldata，让钱包能向用户展示他们签署的内容，而不是一串不透明的十六进制数据。","tags":["wallets","ux","signing","transactions","security"],"related":[712],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-4430/","markdown":"## 它解决什么问题？\n\n钱包请求你批准交易时，通常只会显示一个合约地址和一大段 calldata。除了 ERC-20 转账等少数被特殊处理的操作外，钱包并不知道这次调用会做什么，用户只能盲签。\n\n解码 calldata 也不一定有帮助。规范中的例子是 ENS 的 `commit(bytes32)`：其参数是名称、所有者和一个秘密值的哈希，因此用户真正关心的信息根本不在交易里。\n\nEIP-4430 让*诚实的*合约能够自我说明。合约作者编写代码，把用户的原始输入同时转换成一句话和对应的 calldata，审计者则可以检查两者是否一致。\n\n## 它如何运作\n\n合约公开一个\"虚拟函数\"（规范仍使用占位名称 `eipXXXDescribe`）：\n\n```solidity\nfunction eipXXXDescribe(bytes inputs, bytes32 reserved)\n    view returns (string description, bytes execcode);\n```\n\n1. dapp 把高层级的 `inputs` 交给钱包（对 ENS 来说是名称、所有者、秘密值）。\n2. 钱包以静态调用的方式调用该方法。调用期间，`ADDRESS`、`CALLER`、`VALUE` 和 `GASPRICE` 必须与被描述交易的对应值相等，因此描述可以取决于谁在发送什么。区块相关的值应与最新区块一致，`COINBASE` 设为零。\n3. 钱包向用户展示 `description`。如果用户接受，就向同一合约发送一笔交易，并以 `execcode` 作为数据。\n4. 如果该方法 revert，签名流程中止。\n\n由于描述和 calldata 来自同一次计算，用户批准的文字，与机器执行的字节，正是由该文字所生成的。\n\n## 示例代码\n\n钱包流程示意（ethers v6）。方法名是草案中的占位名称：\n\n```ts\nimport { Contract, BrowserProvider, ZeroHash } from \"ethers\";\n\nconst provider = new BrowserProvider(window.ethereum);\nconst signer = await provider.getSigner();\nconst abi = [\"function eipXXXDescribe(bytes inputs, bytes32 reserved) view returns (string, bytes)\"];\nconst target = new Contract(contractAddress, abi, provider);\n\n// Evaluate as the real sender, with the real value\nconst [description, execcode] = await target.eipXXXDescribe.staticCall(\n  encodedInputs, ZeroHash, { from: await signer.getAddress(), value }\n);\n\nif (await askUser(description)) {      // show sanitized text\n  await signer.sendTransaction({ to: contractAddress, data: execcode, value });\n}\n```\n\n## 需要注意\n\n- 状态：**Stagnant**。最终的方法名和选择器从未确定，钱包也没有将其作为标准采用。\n- 它明确**不能**防御恶意合约：合约可以在描述中撒谎。其安全模型依赖于描述与代码一起被审计。\n- 钱包必须谨慎清理描述文本：隐藏的 HTML、同形异义字符、从右到左标记和异常空白，都可能让文本看起来与实际不同。\n- 对于链下签名，[EIP-712](/eip-712/) 的类型化数据解决了相关的可读性问题。\n"}}}
