You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 <amp@ampcode.com>
Copy file name to clipboardExpand all lines: src/pages/quickstart/verify-contracts.mdx
+39-1Lines changed: 39 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,45 @@ This retries verification up to 10 times with a 10-second delay between attempts
75
75
76
76
For more details on deployment and verification options, see the [Foundry documentation](https://getfoundry.sh/forge/deploying).
77
77
78
+
## Verify with Hardhat
79
+
80
+
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):
81
+
82
+
```ts
83
+
import"@nomicfoundation/hardhat-verify";
84
+
85
+
const config:HardhatUserConfig= {
86
+
// ... your existing config
87
+
sourcify: {
88
+
enabled: true,
89
+
apiUrl: "https://contracts.tempo.xyz",
90
+
browserUrl: "https://explore.tempo.xyz",
91
+
},
92
+
};
93
+
```
94
+
95
+
Then verify:
96
+
97
+
```bash
98
+
npx hardhat verify --network tempo <CONTRACT_ADDRESS> [constructor args...]
99
+
```
100
+
101
+
### Verify from deployment artifacts
102
+
103
+
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`).
104
+
105
+
Extract the `metadata` field, parse it as JSON, then construct a [verification API request](#verify-with-the-api) using:
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`).
114
+
115
+
If you have the deployment artifact for each contract, the correct compiler version and settings are already embedded in each file's metadata.
116
+
78
117
## Verify with the API
79
118
80
119
You can also verify contracts directly using the REST API. Verification is asynchronous—you submit a request, then poll for the result.
@@ -193,7 +232,6 @@ View the full API documentation at [contracts.tempo.xyz/docs](https://contracts.
193
232
:::info
194
233
The `andantino` testnet (chain ID `42429`) has been deprecated. Use `moderato` (chain ID `42431`) for testnet development.
0 commit comments