From 6f044e477c5c0af5c2e55c705bdc7d7e45a523aa Mon Sep 17 00:00:00 2001 From: o-az Date: Wed, 28 Jan 2026 14:19:00 -0800 Subject: [PATCH 1/3] chore: add more info in contract verify page --- src/pages/quickstart/verify-contracts.mdx | 58 +++++++++++++++++------ src/pages/sdk/foundry/index.mdx | 8 ++-- 2 files changed, 48 insertions(+), 18 deletions(-) diff --git a/src/pages/quickstart/verify-contracts.mdx b/src/pages/quickstart/verify-contracts.mdx index 2dd2d5f0..f97b6f48 100644 --- a/src/pages/quickstart/verify-contracts.mdx +++ b/src/pages/quickstart/verify-contracts.mdx @@ -9,13 +9,40 @@ Verify your smart contracts on Tempo using [contracts.tempo.xyz](https://contrac ## Verify with Foundry -The easiest way to verify contracts is using Foundry's `forge verify-contract` command with the Sourcify verifier. +The easiest way to verify contracts is to include the `--verify` flag when deploying. Set the verifier URL environment variable: + +```bash +export VERIFIER_URL=https://contracts.tempo.xyz +``` + +### Verify during deployment + +Deploy and verify in a single command: + +```bash +# Deploy and verify with forge create +forge create src/Token.sol:Token \ + --rpc-url $TEMPO_RPC_URL \ + --interactive \ + --broadcast \ + --verify + +# Deploy and verify with forge script +forge script script/Deploy.s.sol \ + --rpc-url $TEMPO_RPC_URL \ + --interactive \ + --sender \ + --broadcast \ + --verify +``` + +### Verify an existing contract + +To verify a contract that's already deployed, use `forge verify-contract`: ```bash forge verify-contract \ - --verifier sourcify \ --verifier-url https://contracts.tempo.xyz \ - --chain-id 42431 \ \ src/MyContract.sol:MyContract ``` @@ -26,23 +53,24 @@ Replace `` with your deployed contract address and `src/MyCont Make sure you're using the same compiler settings (optimizer, EVM version) that you used when deploying the contract. ::: -### Example +### Retry options -After deploying a contract, verify it: +If verification fails intermittently, use `--retries` and `--delay` to automatically retry: ```bash -# Deploy your contract -forge create src/Token.sol:Token --rpc-url https://rpc.moderato.tempo.xyz --private-key $PRIVATE_KEY - -# Verify the deployed contract -forge verify-contract \ - --verifier sourcify \ - --verifier-url https://contracts.tempo.xyz \ - --chain-id 42431 \ - 0x1234567890abcdef1234567890abcdef12345678 \ - src/Token.sol:Token +forge create src/Token.sol:Token \ + --rpc-url $TEMPO_RPC_URL \ + --interactive \ + --broadcast \ + --verify \ + --retries 10 \ + --delay 10 ``` +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 the API You can also verify contracts directly using the REST API. Verification is asynchronous—you submit a request, then poll for the result. diff --git a/src/pages/sdk/foundry/index.mdx b/src/pages/sdk/foundry/index.mdx index d66a5503..1c28c96b 100644 --- a/src/pages/sdk/foundry/index.mdx +++ b/src/pages/sdk/foundry/index.mdx @@ -97,7 +97,7 @@ cast rpc tempo_fundAddress --rpc-url $TEMPO_RPC_URL # Run all tests on Tempo's testnet forge test -# Deploy a simple contract +# Deploy and verify a simple contract forge create src/Mail.sol:Mail \ --rpc-url $TEMPO_RPC_URL \ --interactive \ @@ -114,7 +114,7 @@ forge create src/Mail.sol:Mail \ --verify \ --constructor-args 0x20c0000000000000000000000000000000000001 -# Run a deployment script and verify on Tempo's explorer +# Run a deployment script and verify forge script script/Mail.s.sol \ --rpc-url $TEMPO_RPC_URL \ --interactive \ @@ -122,7 +122,7 @@ forge script script/Mail.s.sol \ --broadcast \ --verify -# Run a deployment script with custom fee token and verify on Tempo's explorer +# Run a deployment script with custom fee token and verify forge script script/Mail.s.sol \ --fee-token \ --rpc-url $TEMPO_RPC_URL \ @@ -132,6 +132,8 @@ forge script script/Mail.s.sol \ --verify ``` +For more verification options including verifying existing contracts and API verification, see [Contract Verification](/quickstart/verify-contracts). + ### Interact & debug with `cast` ```bash From 9b64059a74feae08bb44dbe258d8e1e07b4a2433 Mon Sep 17 00:00:00 2001 From: o-az Date: Wed, 28 Jan 2026 14:22:48 -0800 Subject: [PATCH 2/3] chore: clarify further --- src/pages/quickstart/verify-contracts.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/quickstart/verify-contracts.mdx b/src/pages/quickstart/verify-contracts.mdx index f97b6f48..97f139b5 100644 --- a/src/pages/quickstart/verify-contracts.mdx +++ b/src/pages/quickstart/verify-contracts.mdx @@ -9,12 +9,14 @@ Verify your smart contracts on Tempo using [contracts.tempo.xyz](https://contrac ## Verify with Foundry -The easiest way to verify contracts is to include the `--verify` flag when deploying. Set the verifier URL environment variable: +The easiest way to verify contracts is to include the `--verify` flag when deploying. You can specify Tempo's verifier by either setting the `VERIFIER_URL` environment variable: ```bash export VERIFIER_URL=https://contracts.tempo.xyz ``` +Or by passing `--verifier-url https://contracts.tempo.xyz` directly to the command. + ### Verify during deployment Deploy and verify in a single command: From 8607a771e011e88a14529f912eedbb4d508d7240 Mon Sep 17 00:00:00 2001 From: o-az Date: Wed, 28 Jan 2026 14:24:46 -0800 Subject: [PATCH 3/3] chore: clarify further more --- src/pages/quickstart/verify-contracts.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/quickstart/verify-contracts.mdx b/src/pages/quickstart/verify-contracts.mdx index 97f139b5..f0aba7d6 100644 --- a/src/pages/quickstart/verify-contracts.mdx +++ b/src/pages/quickstart/verify-contracts.mdx @@ -17,6 +17,8 @@ export VERIFIER_URL=https://contracts.tempo.xyz Or by passing `--verifier-url https://contracts.tempo.xyz` directly to the command. +The chain ID is auto-detected from the RPC URL, but you can specify it explicitly with `--chain ` if needed. + ### Verify during deployment Deploy and verify in a single command: