ERC-7730 · Draft · ERC · 2024-02-07
ERC-7730: Structured Data Clear Signing Format
A JSON descriptor format that tells wallets how to display contract calls and EIP-712 messages in human terms ("Send 100 USDT to alice.eth") so users can clear-sign instead of blind-sign.
What problem does it solve?
When you approve a transaction on a hardware wallet, you often see a raw function selector and hex parameters. Even with the ABI or EIP-712 types, the wallet only knows primitive types: it does not know that a uint256 is a token amount with 6 decimals, that another uint256 is a deadline, or that an address field is the token being spent. Users end up "blind signing", which is how many phishing and front-end compromise attacks succeed.
ERC-7730 defines a file that app developers write once, describing how each function or message should be rendered. Any wallet supporting the standard can then show a clear, human-readable review screen.
How it works
A descriptor is a JSON document with three main sections:
context: binding constraints. Either acontract(list ofdeploymentsaschainId+address, or afactory) or aneip712binding (domainvalues,deployments, or adomainSeparator). A wallet MUST verify these match before applying the file.metadata: trusted constants such as the owner name, contract name, enums and maps.display.formats: keyed by a human-readable function signature liketransfer(address to,uint256 value)(the wallet derives the selector from it) or by an EIP-712 type. Each entry has anintent("Send"), an optionalinterpolatedIntent("Send {value} to {to}") and a list offields, each with apath,labelandformat.
Formats include raw, amount (native currency), tokenAmount (decimals and ticker from a token address, with an optional "Unlimited" threshold), date, duration, unit, enum, chainId, nftName, addressName and more. Paths use three roots: # for decoded data, $ for the descriptor itself, and @ for container values like @.to, @.value, @.chainId.
The schema is versioned with semver; a descriptor's $schema key tells the wallet which major version applies, and the 1.x line is deprecated.
Sample code
A descriptor for an ERC-20 transfer (addresses are placeholders):
{
"$schema": "https://eips.ethereum.org/assets/eip-7730/erc7730-v2.schema.json",
"context": {
"$id": "Example ERC-20",
"contract": {
"deployments": [
{ "chainId": 1, "address": "0x1111111111111111111111111111111111111111" }
]
}
},
"metadata": {
"owner": "Example",
"contractName": "Example Token"
},
"display": {
"formats": {
"transfer(address to,uint256 value)": {
"intent": "Send",
"interpolatedIntent": "Send {value} to {to}",
"fields": [
{ "path": "value", "label": "Amount", "format": "tokenAmount", "params": { "tokenPath": "@.to" } },
{ "path": "to", "label": "To", "format": "addressName" }
]
}
}
}
}
Here tokenPath: "@.to" tells the wallet that the token being sent is the contract the transaction is addressed to, so it can look up decimals and ticker.
Things to know
- Status: Draft. The schema is under active development; target the alias file of the currently "Active" major line and pin
$schemaaccordingly. - The format only helps if the descriptor is trustworthy. The spec warns about registry poisoning and misleading but well-formed files, and says registries need verifiable provenance, tamper-evident history and a way to link files to contract ownership. Curation itself is out of scope.
- Binding
contextmust be restrictive; a loose binding lets a legitimate-looking format be applied to a malicious contract. - The spec also covers proxies, ERC-4337 user operations (ERC-4337), batched calls (EIP-5792) and encrypted fields.