ERC-7730 Specifications
Complete technical specification for the Clear Signing metadata format.
This page contains the complete technical reference for the ERC-7730 standard. For a tooling-first overview, see Getting Started. For a step-by-step manual JSON walkthrough, see Manual Implementation.
Quick Navigation
Standard Overview
Defines a JSON format for providing human-readable descriptions of smart contract calls and EIP-712 messages.
File Structure
An ERC-7730 file contains three main sections:
{
"$schema": "https://eips.ethereum.org/assets/eip-7730/erc7730-v1.schema.json",
"context": {
// Binding information: contract address, chain ID, ABI
// OR EIP-712 schemas for structured messages
},
"metadata": {
// Owner information, enums, constants
// Optional but recommended for attribution
},
"display": {
// How to format and display transaction data
// The core of human-readable transformation
}
}
Includes
Use the optional top-level includes
field to reuse shared display definitions across files.
{
"$schema": ".../erc7730-v1.schema.json",
"includes": "common-swap.json",
"context": { /* file-specific overrides */ }
}
When both files define the same key, the including file takes precedence. Shared helpers typically live under display.definitions
.
Context Section
The context section provides binding information for the metadata.
contract.abi
- Contract ABI or URL (required)contract.deployments
- Chain ID and address pairs (required)contract.addressMatcher
- URL to check if transaction matches (optional)contract.factory
- Factory deployment info (optional)eip712.schemas
- Message type definitions (required)eip712.domain
- Domain requirements (optional)eip712.deployments
- Verifier contracts (optional)eip712.domainSeparator
- Domain separator hex value (optional)Metadata Section
Contains constants and mappings used by the display section.
owner
- Protocol name (required)info
- Additional protocol information (optional)info.signature
- URL to signature verification (optional)constants
- Reusable constant values (optional)enums
- Value-to-label mappings (optional)token
- ERC-20 metadata (token contracts only)Display Section
The display section defines how transaction data is presented to users.
Format Structure
Each field in the display format follows this structure:
{
"path": "field.path", // Path to the value in transaction data
"label": "User-friendly label", // Text shown to the user
"format": "formatType", // Format type (see below)
"params": { // Format-specific parameters
// ...
}
}
Format Types
raw
No paramsamount
No paramstokenAmount
tokenPath or token*nftName
collectionPath or collection*date
encoding*duration
NoneaddressOrName
typeenum
ref to $.enumsunit
unit suffix● Required parameter ● Optional/No parameters
Format Specifications
raw Format
Displays integers in their natural representation without conversion.
Parameters: None
Example:
{
"path": "value",
"label": "Amount",
"format": "raw"
}
Output Examples:
• Input: 1000
displays as 1000
• Input: 42
displays as 42
Format Keys
Entries in display.formats
accept any of the following identifiers:
"transfer(address _to,uint256 _value)": { }, // Solidity declaration
"transfer(address,uint256)": { }, // Canonical signature
"0xa9059cbb": { } // 4-byte selector
All three map to the same function; use the form that best fits your tooling.
Path System
Paths reference data using three root identifiers:
#.params.amount
$.constants.maxUint256
@.from
Container References
Special references for transaction data:
Reference | Description | Example |
---|---|---|
@.from | Transaction sender | 0x1234…5678 |
@.to | Target contract | 0xabcd…ef01 |
@.value | Native currency value | 0.1 ETH |
Array Handling
Arrays can be accessed individually or collectively:
// Specific elements
"tokens[0]" // First element
"tokens[tokens.length-1]" // Last element
// All elements
"tokens[]" // Format all array items
// Slice selectors (bytes/string)
"data[4:]" // Skip first 4 bytes
"data[:32]" // First 32 bytes
"data[4:36]" // Bytes 4-36
Array Format Example:
{
"path": "approvals[]",
"fields": [
{
"path": "amount",
"label": "Amount",
"format": "tokenAmount",
"params": { "tokenPath": "token" }
},
{
"path": "expiration",
"label": "Expires",
"format": "date",
"params": { "encoding": "timestamp" }
}
]
}
Complete Example
{
"$schema": "https://eips.ethereum.org/assets/eip-7730/erc7730-v1.schema.json",
"context": {
"$id": "Example ERC-20",
"contract": {
"abi": "https://api.example.io/api?module=contract&action=getabi&address=0xdac17f958d2ee523a2206206994597c13d831ec7",
"deployments": [
{
"chainId": 1,
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
}
]
}
},
"metadata": {
"owner": "Example",
"info": {
"legalName": "Example Inc.",
"url": "https://example.io/"
}
},
"display": {
"formats": {
"transfer(address _to,uint256 _value)": {
"intent": "Send",
"fields": [
{
"path": "_to",
"label": "To",
"format": "addressOrName"
},
{
"path": "_value",
"label": "Amount",
"format": "tokenAmount",
"params": {
"tokenPath": "@.to"
}
}
],
"required": ["_to", "_value"]
}
}
}
}