From 2eb4db1f3ef01acd0ec0f42fdce1676d63e71aba Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Wed, 4 Feb 2026 12:16:40 +0000 Subject: [PATCH 1/8] docs(foundry): update tempo args to use --tempo. prefix, add anvil section - Update all flag examples to use --tempo.fee-token, --tempo.nonce-key, etc. - Add Local Development with Anvil section with fork examples - Add Tempo-Specific CLI Flags reference table - Document TEMPO_FEE_TOKEN environment variable Reference: https://github.com/tempoxyz/tempo-foundry/blob/tempo/.github/scripts/tempo-check.sh Amp-Thread-ID: https://ampcode.com/threads/T-019c2893-8689-740d-b948-86823f014e58 Co-authored-by: Amp --- src/pages/sdk/foundry/index.mdx | 73 +++++++++++++++++++++++++++++---- 1 file changed, 66 insertions(+), 7 deletions(-) diff --git a/src/pages/sdk/foundry/index.mdx b/src/pages/sdk/foundry/index.mdx index dd8de308..a166fff3 100644 --- a/src/pages/sdk/foundry/index.mdx +++ b/src/pages/sdk/foundry/index.mdx @@ -107,7 +107,7 @@ forge create src/Mail.sol:Mail \ # Deploy a simple contract with custom fee token forge create src/Mail.sol:Mail \ - --fee-token \ + --tempo.fee-token \ --rpc-url $TEMPO_RPC_URL \ --interactive \ --broadcast \ @@ -124,7 +124,7 @@ forge script script/Mail.s.sol \ # Run a deployment script with custom fee token and verify forge script script/Mail.s.sol \ - --fee-token \ + --tempo.fee-token \ --rpc-url $TEMPO_RPC_URL \ --interactive \ --sender \ @@ -174,13 +174,13 @@ cast erc20 transfer \ # Transfer some of your ERC20 tokens with custom fee token: cast erc20 transfer \ - --fee-token + --tempo.fee-token \ --rpc-url $TEMPO_RPC_URL \ --interactive # Send a transaction with custom fee token: cast send \ - --fee-token \ + --tempo.fee-token \ --rpc-url $TEMPO_RPC_URL \ --interactive @@ -221,14 +221,14 @@ cast send 'increment()' \ cast send 'increment()' \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY \ - --nonce 0 --nonce-key 1 + --nonce 0 --tempo.nonce-key 1 # Send with expiring nonce (time-bounded tx, max 30s): VALID_BEFORE=$(($(date +%s) + 25)) cast send 'increment()' \ --rpc-url $TEMPO_RPC_URL \ --private-key $PRIVATE_KEY \ - --expiring-nonce --valid-before $VALID_BEFORE + --tempo.expiring-nonce --tempo.valid-before $VALID_BEFORE # Send with access key (delegated signing): # First authorize the key via Account Keychain precompile @@ -244,6 +244,65 @@ cast send 'increment()' \ --root-account $ROOT_ADDRESS ``` +### Local Development with Anvil + +Anvil supports Tempo mode for local testing and forking Tempo networks: + +```bash +# Start anvil in Tempo mode with T1 hardfork +anvil --tempo --hardfork t1 + +# Fork a live Tempo network for local testing +anvil --tempo --hardfork t1 --fork-url $TEMPO_RPC_URL + +# Test transactions on local anvil fork +cast send 'increment()' \ + --tempo.fee-token \ + --rpc-url http://127.0.0.1:8545 \ + --private-key $PRIVATE_KEY + +# 2D nonce on anvil fork +cast send 'increment()' \ + --tempo.fee-token \ + --rpc-url http://127.0.0.1:8545 \ + --private-key $PRIVATE_KEY \ + --nonce 0 --tempo.nonce-key 100 + +# Expiring nonce on anvil fork +cast send 'increment()' \ + --tempo.fee-token \ + --rpc-url http://127.0.0.1:8545 \ + --private-key $PRIVATE_KEY \ + --tempo.expiring-nonce --tempo.valid-before $(($(date +%s) + 25)) + +# Batch transactions on anvil fork +cast batch-send \ + --tempo.fee-token \ + --rpc-url http://127.0.0.1:8545 \ + --call "::increment()" \ + --call "::increment()" \ + --private-key $PRIVATE_KEY +``` + +## Tempo-Specific CLI Flags + +The following flags are available for Tempo-specific features: + +| Flag | Description | Example | +|------|-------------|---------| +| `--tempo.fee-token
` | Specify the TIP-20 token to pay transaction fees | `--tempo.fee-token 0x20c0...0001` | +| `--tempo.nonce-key ` | 2D nonce key for parallel transaction submission | `--tempo.nonce-key 1` | +| `--tempo.expiring-nonce` | Enable expiring nonce for time-bounded transactions | `--tempo.expiring-nonce` | +| `--tempo.valid-before ` | Unix timestamp before which tx must execute (max 30s from now) | `--tempo.valid-before 1704067200` | +| `--tempo.valid-after ` | Unix timestamp after which tx can execute | `--tempo.valid-after 1704067100` | + +:::tip[Environment Variable] +You can set `TEMPO_FEE_TOKEN` environment variable instead of passing `--tempo.fee-token` on every command: +```bash +export TEMPO_FEE_TOKEN=0x20c0000000000000000000000000000000000001 +``` +::: + ### Limitations -Ledger and Trezor wallets are not yet compatible with the `--fee-token` option. +Ledger and Trezor wallets are not yet compatible with the `--tempo.fee-token` option. From 38d12cabaab1032fc7e1ba7a010a6fbf46f004d5 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Wed, 4 Feb 2026 12:19:27 +0000 Subject: [PATCH 2/8] Remove incorrect TEMPO_FEE_TOKEN env var tip Amp-Thread-ID: https://ampcode.com/threads/T-019c2897-7bc7-73dc-93f2-4bc49bfa5685 Co-authored-by: Amp --- src/pages/sdk/foundry/index.mdx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/pages/sdk/foundry/index.mdx b/src/pages/sdk/foundry/index.mdx index a166fff3..04c50c4d 100644 --- a/src/pages/sdk/foundry/index.mdx +++ b/src/pages/sdk/foundry/index.mdx @@ -296,13 +296,6 @@ The following flags are available for Tempo-specific features: | `--tempo.valid-before ` | Unix timestamp before which tx must execute (max 30s from now) | `--tempo.valid-before 1704067200` | | `--tempo.valid-after ` | Unix timestamp after which tx can execute | `--tempo.valid-after 1704067100` | -:::tip[Environment Variable] -You can set `TEMPO_FEE_TOKEN` environment variable instead of passing `--tempo.fee-token` on every command: -```bash -export TEMPO_FEE_TOKEN=0x20c0000000000000000000000000000000000001 -``` -::: - ### Limitations Ledger and Trezor wallets are not yet compatible with the `--tempo.fee-token` option. From d78214eeac425726e9ffdd26780b608f7bf35dbf Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Wed, 4 Feb 2026 14:20:22 +0000 Subject: [PATCH 3/8] docs(foundry): update sponsor flags to use --tempo. prefix Amp-Thread-ID: https://ampcode.com/threads/T-019c289a-0156-7181-8581-626edbd012a4 Co-authored-by: Amp --- src/pages/sdk/foundry/index.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/sdk/foundry/index.mdx b/src/pages/sdk/foundry/index.mdx index 04c50c4d..5e5895b4 100644 --- a/src/pages/sdk/foundry/index.mdx +++ b/src/pages/sdk/foundry/index.mdx @@ -208,14 +208,14 @@ cast batch-send \ FEE_PAYER_HASH=$(cast mktx 'increment()' \ --rpc-url $TEMPO_RPC_URL \ --private-key $SENDER_KEY \ - --print-sponsor-hash) + --tempo.print-sponsor-hash) # Step 2: Sponsor signs the hash SPONSOR_SIG=$(cast wallet sign --private-key $SPONSOR_KEY "$FEE_PAYER_HASH" --no-hash) # Step 3: Send with sponsor signature cast send 'increment()' \ --rpc-url $TEMPO_RPC_URL \ --private-key $SENDER_KEY \ - --sponsor-signature "$SPONSOR_SIG" + --tempo.sponsor-signature "$SPONSOR_SIG" # Send with 2D nonce (parallel tx submission): cast send 'increment()' \ From a4e04c0e38d6ac125a3ffc401851b180a93c8964 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Wed, 4 Feb 2026 14:44:48 +0000 Subject: [PATCH 4/8] docs(foundry): make sponsor signature commands inline, add flags to table Amp-Thread-ID: https://ampcode.com/threads/T-019c290b-2902-772b-a5bb-c402cf1c91d7 Co-authored-by: Amp --- src/pages/sdk/foundry/index.mdx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/pages/sdk/foundry/index.mdx b/src/pages/sdk/foundry/index.mdx index 5e5895b4..336c9709 100644 --- a/src/pages/sdk/foundry/index.mdx +++ b/src/pages/sdk/foundry/index.mdx @@ -205,17 +205,11 @@ cast batch-send \ # Sponsored transaction (gasless for sender): # Step 1: Get the fee payer signature hash -FEE_PAYER_HASH=$(cast mktx 'increment()' \ - --rpc-url $TEMPO_RPC_URL \ - --private-key $SENDER_KEY \ - --tempo.print-sponsor-hash) +FEE_PAYER_HASH=$(cast mktx 'increment()' --rpc-url $TEMPO_RPC_URL --private-key $SENDER_KEY --tempo.print-sponsor-hash) # Step 2: Sponsor signs the hash SPONSOR_SIG=$(cast wallet sign --private-key $SPONSOR_KEY "$FEE_PAYER_HASH" --no-hash) # Step 3: Send with sponsor signature -cast send 'increment()' \ - --rpc-url $TEMPO_RPC_URL \ - --private-key $SENDER_KEY \ - --tempo.sponsor-signature "$SPONSOR_SIG" +cast send 'increment()' --rpc-url $TEMPO_RPC_URL --private-key $SENDER_KEY --tempo.sponsor-signature "$SPONSOR_SIG" # Send with 2D nonce (parallel tx submission): cast send 'increment()' \ @@ -295,6 +289,8 @@ The following flags are available for Tempo-specific features: | `--tempo.expiring-nonce` | Enable expiring nonce for time-bounded transactions | `--tempo.expiring-nonce` | | `--tempo.valid-before ` | Unix timestamp before which tx must execute (max 30s from now) | `--tempo.valid-before 1704067200` | | `--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` | ### Limitations From f2d8f5954be66a8156ed6a9f89c759541de2d444 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Wed, 4 Feb 2026 14:44:53 +0000 Subject: [PATCH 5/8] Address PR feedback: use evm-version and clarify cast/forge script Amp-Thread-ID: https://ampcode.com/threads/T-019c291c-7b33-70de-a217-9921a41b98f6 Co-authored-by: Amp --- src/pages/sdk/foundry/index.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/sdk/foundry/index.mdx b/src/pages/sdk/foundry/index.mdx index 336c9709..4b465b35 100644 --- a/src/pages/sdk/foundry/index.mdx +++ b/src/pages/sdk/foundry/index.mdx @@ -243,11 +243,11 @@ cast send 'increment()' \ Anvil supports Tempo mode for local testing and forking Tempo networks: ```bash -# Start anvil in Tempo mode with T1 hardfork -anvil --tempo --hardfork t1 +# Start anvil in Tempo mode +anvil --tempo --evm-version t1 # Fork a live Tempo network for local testing -anvil --tempo --hardfork t1 --fork-url $TEMPO_RPC_URL +anvil --tempo --fork-url $TEMPO_RPC_URL # Test transactions on local anvil fork cast send 'increment()' \ @@ -280,7 +280,7 @@ cast batch-send \ ## Tempo-Specific CLI Flags -The following flags are available for Tempo-specific features: +The following flags are available for `cast` and `forge script` for Tempo-specific features: | Flag | Description | Example | |------|-------------|---------| From 9baefa2ee1e3586d13aea18dd12b356ee566dfbf Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Wed, 4 Feb 2026 14:49:05 +0000 Subject: [PATCH 6/8] Remove limitations section per review feedback Amp-Thread-ID: https://ampcode.com/threads/T-019c291c-7b33-70de-a217-9921a41b98f6 Co-authored-by: Amp --- src/pages/sdk/foundry/index.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pages/sdk/foundry/index.mdx b/src/pages/sdk/foundry/index.mdx index 4b465b35..21b8f006 100644 --- a/src/pages/sdk/foundry/index.mdx +++ b/src/pages/sdk/foundry/index.mdx @@ -292,6 +292,4 @@ The following flags are available for `cast` and `forge script` for Tempo-specif | `--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` | -### Limitations -Ledger and Trezor wallets are not yet compatible with the `--tempo.fee-token` option. From b1ba2f94a8063330705c07832dd30549e78759fe Mon Sep 17 00:00:00 2001 From: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Date: Wed, 4 Feb 2026 15:50:07 +0100 Subject: [PATCH 7/8] Apply suggestion from @zerosnacks --- src/pages/sdk/foundry/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/sdk/foundry/index.mdx b/src/pages/sdk/foundry/index.mdx index 21b8f006..6dd06d80 100644 --- a/src/pages/sdk/foundry/index.mdx +++ b/src/pages/sdk/foundry/index.mdx @@ -244,7 +244,7 @@ Anvil supports Tempo mode for local testing and forking Tempo networks: ```bash # Start anvil in Tempo mode -anvil --tempo --evm-version t1 +anvil --tempo --hardfork t1 # Fork a live Tempo network for local testing anvil --tempo --fork-url $TEMPO_RPC_URL From ac35c7a7d27210e4219ec9c06b43c794c3aea5f5 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Wed, 4 Feb 2026 15:17:13 +0000 Subject: [PATCH 8/8] docs: apply Ledger/Trezor --tempo.* compatibility note suggestion Amp-Thread-ID: https://ampcode.com/threads/T-019c2939-d6a2-74cf-8539-f05a1956c051 Co-authored-by: Amp --- src/pages/sdk/foundry/index.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/sdk/foundry/index.mdx b/src/pages/sdk/foundry/index.mdx index 6dd06d80..963cc751 100644 --- a/src/pages/sdk/foundry/index.mdx +++ b/src/pages/sdk/foundry/index.mdx @@ -292,4 +292,6 @@ The following flags are available for `cast` and `forge script` for Tempo-specif | `--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` | +Ledger and Trezor wallets are not yet compatible with any `--tempo.*` option. +