CLI command reference
This page is generated from packages/cli/src/help.ts for @erc7730/cli@0.3.8. The public surface is the erc7730 binary only — do not import the package.
npm install -D @erc7730/clierc7730 --helperc7730 <command> --helpUsage: erc7730 <command> [options]
Commands: generate Bootstrap a v2 descriptor from an ABI lint Validate descriptor files (exit 1 on errors) preview Decode a transaction and print intent + fields diff Compare a local descriptor to the official registry scaffold Lay out calldata-*.json (+ testsv2) for an official-registry PR registry Refresh a pinned official registry cache
Environment: ERC7730_REGISTRY_PATH Local clone of ethereum/clear-signing-erc7730-registry ERC7730_REGISTRY_PIN Default 40-character commit SHA pin ERC7730_CACHE_DIR Cache root (default ~/.erc7730)
Does not open PRs against the official registry.generate
Section titled “generate”Usage: erc7730 generate --chain-id <id> --address <addr> --abi <file> --owner <name> [--url <url>] [--out <file>]
Bootstrap a draft ERC-7730 v2 descriptor from a contract ABI.Output is a starting point for an official-registry PR — never confidence: "high".
--chain-id EIP-155 chain id --address Contract address --abi Path to a JSON ABI (array or { abi: [...] }). Use - for stdin --owner Protocol / owner display name --url Optional protocol URL --out Also write the JSON to this pathUsage: erc7730 lint <file-or-dir...> [--json] [--tests]
Validate ERC-7730 descriptor files against the official JSON Schema, then runlocal semantic checks. Does not call Etherscan / Sourcify.
With --tests, validate registry testsv2 files againstspecs/erc7730-tests-v2.schema.json instead of descriptor schema.
Exit 1 if any error-level issue is reported.preview
Section titled “preview”Usage: erc7730 preview --data <hex> --to <addr> --chain-id <id> [--from <addr>] [--value <n>] [--pin <sha>] [--registry-path <dir>] [--json] [--sourcify]
Decode a transaction with the official registry (or ERC7730_REGISTRY_PATH) andprint intent, interpolatedIntent, fields, and trust to stdout.
--sourcify Opt in to the untrusted Sourcify / generated ABI fallbackNegative --value must be passed as --value=-1. A separate argv token -1 is parsed as another flag.
scaffold
Section titled “scaffold”Usage: erc7730 scaffold --chain-id <id> --address <addr> --abi <file> --owner <name> --out <dir> [--url <url>] [--force]
Write a registry-shaped directory tree for an official-registry PR: <out>/calldata-<slug>.json <out>/testsv2/calldata-<slug>.tests.json
Does not open a GitHub PR. Copy the tree into a fork ofethereum/clear-signing-erc7730-registry and submit there.Refuses to overwrite existing files unless --force is set.Usage: erc7730 diff <file> --against official [--pin <sha>] [--registry-path <dir>]
Compare a local descriptor to the official registry file for the samedeployment. Exit 1 when the comparable slice differs.registry update
Section titled “registry update”Usage: erc7730 registry update [--pin <sha>] [--cache-dir <dir>]
Download index.calldata.json, index.eip712.json, and referenced descriptorfiles (including relative includes) into the local cache.
Default cache: ~/.erc7730/registry/<pin> Override with --cache-dir or ERC7730_CACHE_DIREnvironment
Section titled “Environment”| Variable | Meaning |
|---|---|
ERC7730_REGISTRY_PATH |
Local checkout of the official registry (GitHub tree layout). Read-side only |
ERC7730_REGISTRY_PIN |
Default 40-character commit SHA pin |
ERC7730_CACHE_DIR |
Cache root (default ~/.erc7730). registry update writes under this directory |
Floating branch names (master, main) are not pins.
Exit codes
Section titled “Exit codes”| Code | When |
|---|---|
| 0 | Success. Also --help and --version |
| 1 | Usage error, unknown command, lint error-level issue, generate draft that fails v2 validation, diff mismatch / miss, registry without update |
lint warnings do not fail the process. With no arguments, erc7730 prints help and exits 1.