---
eip: 4430
label: ERC-4430
title: Described Transactions
status: Stagnant
type: Standards Track
category: ERC
created: 2021-11-07
official: https://eips.ethereum.org/EIPS/eip-4430
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-4430.md
canonical: https://eips.huatuo.xyz/eip-4430/
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]
---

# ERC-4430: Described Transactions

> A technique for contracts to provide a human-readable description of a transaction's side-effects.

**TL;DR:** 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.

## What problem does it solve?

When 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.

Decoding 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.

EIP-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.

## How it works

A contract exposes a "virtual function" (the spec still uses the placeholder name `eipXXXDescribe`):

```solidity
function eipXXXDescribe(bytes inputs, bytes32 reserved)
    view returns (string description, bytes execcode);
```

1. The dapp gives the wallet the high-level `inputs` (for ENS: name, owner, secret).
2. 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.
3. The wallet shows `description` to the user. If they accept, it sends a transaction to the same contract with `execcode` as its data.
4. If the method reverts, signing is aborted.

Because 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.

## Sample code

Illustrative wallet flow (ethers v6). The method name is a placeholder from the draft:

```ts
import { Contract, BrowserProvider, ZeroHash } from "ethers";

const provider = new BrowserProvider(window.ethereum);
const signer = await provider.getSigner();
const abi = ["function eipXXXDescribe(bytes inputs, bytes32 reserved) view returns (string, bytes)"];
const target = new Contract(contractAddress, abi, provider);

// Evaluate as the real sender, with the real value
const [description, execcode] = await target.eipXXXDescribe.staticCall(
  encodedInputs, ZeroHash, { from: await signer.getAddress(), value }
);

if (await askUser(description)) {      // show sanitized text
  await signer.sendTransaction({ to: contractAddress, data: execcode, value });
}
```

## Things to know

- Status: **Stagnant**. No final method name or selector was ever assigned, and wallets did not adopt it as a standard.
- 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.
- 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.
- For off-chain signatures, [EIP-712](/eip-712/) typed data addresses a related readability problem.


---

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