From ea10775e6e3b5e4e8765bf687265b6d2accd9527 Mon Sep 17 00:00:00 2001 From: o-az Date: Tue, 17 Mar 2026 20:35:02 -0700 Subject: [PATCH] chore: improve verify docs --- .gitignore | 1 + src/components/MermaidDiagram.tsx | 2 +- src/pages/quickstart/verify-contracts.mdx | 1 + src/pages/sdk/foundry/index.mdx | 17 ++++++++++++++--- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index b03dc1a3..dab22d28 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ src/pages/protocol/tips/tip-* # Playwright playwright-report/ test-results/ +.zed diff --git a/src/components/MermaidDiagram.tsx b/src/components/MermaidDiagram.tsx index 8b06449f..fe31e9eb 100644 --- a/src/components/MermaidDiagram.tsx +++ b/src/components/MermaidDiagram.tsx @@ -803,7 +803,7 @@ export function animate( const map = new Map() const get = (i: number, isNote = false) => { if (!map.has(i)) map.set(i, { si: i, fade: [], isNote }) - return map.get(i)! + return map.get(i) as Item } svg.querySelectorAll('[data-step]').forEach((el) => { diff --git a/src/pages/quickstart/verify-contracts.mdx b/src/pages/quickstart/verify-contracts.mdx index bbab73ca..c9e2a567 100644 --- a/src/pages/quickstart/verify-contracts.mdx +++ b/src/pages/quickstart/verify-contracts.mdx @@ -46,6 +46,7 @@ To verify a contract that's already deployed, use `forge verify-contract`: ```bash forge verify-contract \ + --rpc-url $TEMPO_RPC_URL \ --verifier-url https://contracts.tempo.xyz \ \ src/MyContract.sol:MyContract diff --git a/src/pages/sdk/foundry/index.mdx b/src/pages/sdk/foundry/index.mdx index 58ebe4bc..18c284e3 100644 --- a/src/pages/sdk/foundry/index.mdx +++ b/src/pages/sdk/foundry/index.mdx @@ -95,7 +95,7 @@ export VERIFIER_URL=https://contracts.tempo.xyz # Optional: create a new keypair and request some testnet tokens from the faucet. cast wallet new -cast rpc tempo_fundAddress --rpc-url $TEMPO_RPC_URL +cast rpc tempo_fundAddress --rpc-url https://rpc.moderato.tempo.xyz # Run all tests on Tempo's testnet forge test @@ -117,6 +117,15 @@ forge create src/Mail.sol:Mail \ --verify \ --constructor-args 0x20c0000000000000000000000000000000000001 +# Deploy using an access key (delegated signing) +forge create src/Mail.sol:Mail \ + --tempo.access-key $ACCESS_KEY_PRIVATE_KEY \ + --tempo.root-account $ROOT_ADDRESS \ + --rpc-url $TEMPO_RPC_URL \ + --broadcast \ + --verify \ + --constructor-args 0x20c0000000000000000000000000000000000001 + # Set a salt for deterministic contract address derivation # The salt is passed to TIP20_FACTORY.createToken() which uses it with the sender # address to compute a deterministic deployment address via getTokenAddress(sender, salt) @@ -244,8 +253,8 @@ cast send 0xAAAAAAAA00000000000000000000000000000000 \ # Then send using the access key cast send 'increment()' \ --rpc-url $TEMPO_RPC_URL \ - --access-key $ACCESS_KEY_PRIVATE_KEY \ - --root-account $ROOT_ADDRESS + --tempo.access-key $ACCESS_KEY_PRIVATE_KEY \ + --tempo.root-account $ROOT_ADDRESS ``` ### Local Development with Anvil @@ -301,6 +310,8 @@ The following flags are available for `cast` and `forge script` for Tempo-specif | `--tempo.valid-after ` | Unix timestamp after which tx can execute | `--tempo.valid-after 1704067100` | | `--tempo.sponsor-signature ` | Pre-signed sponsor signature for gasless transactions | `--tempo.sponsor-signature 0x...` | | `--tempo.print-sponsor-hash` | Print fee payer signature hash and exit (for sponsor to sign) | `--tempo.print-sponsor-hash` | +| `--tempo.access-key ` | Private key for delegated signing via access key | `--tempo.access-key $ACCESS_KEY_PRIVATE_KEY` | +| `--tempo.root-account
` | Root account address when using an access key | `--tempo.root-account $ROOT_ADDRESS` | Ledger and Trezor wallets are not yet compatible with any `--tempo.*` option.