From c9edca8ba6f10fcb3c8feb439332e5a58d2c051f Mon Sep 17 00:00:00 2001 From: Liam Horne Date: Thu, 19 Feb 2026 09:11:27 -0500 Subject: [PATCH] docs: add Hardhat verification, deployment artifacts, and proxy contract guidance Adds concise coverage for the three gaps in verification docs: - Verify with Hardhat: hardhat-verify plugin Sourcify config + usage - Verify from deployment artifacts: how to extract metadata from hardhat-deploy JSON files and map fields to the API request - Proxy contracts: each contract verified separately, may use different compiler versions - Removes deprecated andantino from supported chains table Amp-Thread-ID: https://ampcode.com/threads/T-019c7634-cb49-73e3-971f-fce5d6d67030 Co-authored-by: Amp --- src/pages/quickstart/verify-contracts.mdx | 42 ++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/src/pages/quickstart/verify-contracts.mdx b/src/pages/quickstart/verify-contracts.mdx index f0aba7d6..2f4ad28e 100644 --- a/src/pages/quickstart/verify-contracts.mdx +++ b/src/pages/quickstart/verify-contracts.mdx @@ -75,6 +75,45 @@ This retries verification up to 10 times with a 10-second delay between attempts For more details on deployment and verification options, see the [Foundry documentation](https://getfoundry.sh/forge/deploying). +## Verify with Hardhat + +If you deployed with Hardhat, add Sourcify verification to your `hardhat.config.ts` using [`@nomicfoundation/hardhat-verify`](https://hardhat.org/hardhat-runner/plugins/nomicfoundation-hardhat-verify): + +```ts +import "@nomicfoundation/hardhat-verify"; + +const config: HardhatUserConfig = { + // ... your existing config + sourcify: { + enabled: true, + apiUrl: "https://contracts.tempo.xyz", + browserUrl: "https://explore.tempo.xyz", + }, +}; +``` + +Then verify: + +```bash +npx hardhat verify --network tempo [constructor args...] +``` + +### Verify from deployment artifacts + +If you have Hardhat deployment JSON files (from `hardhat-deploy` or `hardhat-ignition`) but no longer have the project set up, you can still verify. These files contain embedded compiler metadata with full source code (when compiled with `useLiteralContent: true`, the default for `hardhat-deploy`). + +Extract the `metadata` field, parse it as JSON, then construct a [verification API request](#verify-with-the-api) using: +- `metadata.sources` → `stdJsonInput.sources` +- `metadata.settings` (optimizer, evmVersion, remappings) → `stdJsonInput.settings` +- `metadata.compiler.version` → `compilerVersion` +- `metadata.settings.compilationTarget` → `contractIdentifier` (format: `path/to/File.sol:ContractName`) + +## Proxy Contracts + +OpenZeppelin proxy deployments (e.g., `TransparentUpgradeableProxy`) create multiple contracts — typically an implementation, a proxy, and a `ProxyAdmin`. Each must be verified **separately** and may use **different compiler versions** (e.g., your contract uses `solc 0.8.22` while the OZ proxy uses `solc 0.8.10`). + +If you have the deployment artifact for each contract, the correct compiler version and settings are already embedded in each file's metadata. + ## Verify with the API You can also verify contracts directly using the REST API. Verification is asynchronous—you submit a request, then poll for the result. @@ -187,10 +226,11 @@ View the full API documentation at [contracts.tempo.xyz/docs](https://contracts. | Network | Chain ID | |---------|----------| | Tempo Mainnet | `4217` | -| Tempo Testnet (Andantino) | `42429` | | Tempo Testnet (Moderato) | `42431` | | Tempo Devnet | `31318` | +The `andantino` testnet (chain ID `42429`) has been deprecated. Use `moderato` (chain ID `42431`) for testnet development. + ## Troubleshooting :::tip