---
title: Clear sign your Earn smart contracts
category: how-to
---

# Clear sign your Earn smart contracts

Earn Live Apps must clear sign every smart-contract interaction they trigger: staking, unstaking, claiming rewards, delegating. This page shows how to do it with [ERC-7730](../../../clear-signing/overview), the metadata-only standard supported by Ledger Wallet.

> **Note:** Clear signing is a release blocker for Earn. A Live App with even one un-clear-signed call will not be approved.

## Prerequisites

- Your contract is deployed on an EVM-compatible mainnet (the [JSON Builder](../../../clear-signing/for-dapps/json-builder) tool currently targets Ethereum mainnet only).
- You have the contract **address** and **ABI**.
- You can open a pull request to [`ethereum/clear-signing-erc7730-registry`](https://github.com/ethereum/clear-signing-erc7730-registry), the public ERC-7730 registry that wallets fetch from.

## Steps

### Pick the right approach

Use the [ERC-7730 JSON Builder](../../../clear-signing/for-dapps/json-builder) when your contract is on Ethereum mainnet and uses standard function signatures. It produces a valid metadata file in a few minutes. For multi-chain deployments, EIP-712 messages, nested tuples, or reusable includes, write the metadata file [manually](../../../clear-signing/for-dapps/manual-implementation) instead. The full step-by-step walkthrough is on [How to add Clear Signing to your dApp](../../../clear-signing/for-dapps/get-started).

### Describe each function in metadata

For every function your Earn Live App calls, declare it under `display.formats`. The example below is taken from Lido's published [`calldata-stETH.json`](https://github.com/ethereum/clear-signing-erc7730-registry/blob/master/registry/lido/calldata-stETH.json) and shows the `submit(address)` function used to stake ETH:

```json
{
  "$schema": "../../specs/erc7730-v2.schema.json",
  "context": {
    "$id": "stETH",
    "contract": {
      "deployments": [
        { "chainId": 1, "address": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84" }
      ]
    }
  },
  "metadata": {
    "owner": "Lido DAO",
    "info": { "url": "https://lido.fi" },
    "contractName": "stETH"
  },
  "display": {
    "formats": {
      "submit(address _referral)": {
        "intent": "Stake ETH",
        "fields": [
          { "label": "Amount to stake", "format": "amount", "path": "@.value" },
          { "label": "Referral",       "path": "#._referral", "visible": "never" }
        ]
      }
    }
  }
}
```

The same file should also describe `approve`, `transfer`, and any unstake / claim / delegate functions your Live App invokes. Every function the user signs needs an entry.

### Validate the file

Check that your metadata follows the schema before you submit, using the [ERC-7730 validator](../../../clear-signing/for-dapps/validate-submit). A failing schema check means wallets cannot use the file.

### Submit to the registry

Open a pull request to [`ethereum/clear-signing-erc7730-registry`](https://github.com/ethereum/clear-signing-erc7730-registry) under `registry/<your-protocol>/`. Once the pull request is merged, Ledger Wallet (and other ERC-7730-compatible wallets) automatically fetches the file when users sign one of the listed transactions, with no app release needed. Detailed submission rules are on [Validate and submit your metadata](../../../clear-signing/for-dapps/validate-submit).

## Non-EVM chains

ERC-7730 currently covers EVM-compatible chains only. If your Earn Live App stakes on a non-EVM chain (for example Cosmos, Solana, Cardano, Polkadot), get in touch with your Ledger contact during the integration review. Clear signing on those chains is handled outside this registry.

## Common pitfalls

- **`localhost:` links in the file.** A local validator URL has no place in a registry submission; remove it before opening the pull request.
- **Spelling mistakes in `intent` or `label`.** They appear verbatim on the device screen, so misspellings ship straight to users.
- **Forgotten functions.** If you ship a flow with five contract calls, the registry file must describe all five. Anything missing falls back to blind signing.

## See also

- [Clear signing overview](../../../clear-signing/overview): what ERC-7730 is and how it works.
- [How to add Clear Signing to your dApp](../../../clear-signing/for-dapps/get-started): step-by-step guide.
- [Manual implementation](../../../clear-signing/for-dapps/manual-implementation): for multi-chain or EIP-712 cases.
- [`ethereum/clear-signing-erc7730-registry`](https://github.com/ethereum/clear-signing-erc7730-registry): registry of published metadata files (Lido, Kiln, Swell, P2P, Figment, Ethena, and others useful for Earn).
