Conversation
| let sender = SenderKind::from_wallet_opts(wallet).await?; | ||
|
|
||
| let (tx, _) = CastTxBuilder::new(&provider, tx, &config) | ||
| let (tx, _) = CastTxBuilder::<_, _, TransactionRequest>::new(&provider, tx, &config) |
There was a problem hiding this comment.
we can likely upstream the cast builder changes somewhat soon. some care should be taken on what we do wrt flags (e.g. do we namespace them? such as --tempo.nonce-seq for the sequence key, or do we just throw it all in global)
crates/cast/src/cmd/erc20.rs
Outdated
| let mut tx = IERC20::new(token.resolve(&provider).await?, &provider) | ||
| .approve(spender.resolve(&provider).await?, U256::from_str(&amount)?) | ||
| .into_transaction_request(); | ||
| tx.fee_token = send_tx.fee_token; |
There was a problem hiding this comment.
this we might also be able to upstream but i do wonder if there is a better way to just have this "automatically" happen if a user supplies --fee-token (and again, maybe it should be --tempo.fee-token)
| requires = "blob", | ||
| help_heading = "Transaction options" | ||
| )] | ||
| path: Option<PathBuf>, |
There was a problem hiding this comment.
Tempo does not support blobs but we should leave it for Ethereum, can be restored I think to make diff smaller
crates/cast/src/cmd/run.rs
Outdated
| if is_known_system_sender(tx.from()) | ||
| || tx.transaction_type() == Some(SYSTEM_TRANSACTION_TYPE) | ||
| { | ||
| return Err(eyre::eyre!( | ||
| "{:?} is a system transaction.\nReplaying system transactions is currently not supported.", | ||
| tx.tx_hash() | ||
| )); | ||
| } |
There was a problem hiding this comment.
we need to be careful w this given this also affects optimism. we added this check specifically for optimism & prob some other chains (e.g. arb), so maybe we should re-add this check but make it network specific.
There was a problem hiding this comment.
added option upstream to replay with system txes, default to false to keep current behavior
| env.evm_env.block_env.timestamp = U256::from(block.header.timestamp()); | ||
| env.evm_env.block_env.beneficiary = block.header.beneficiary(); | ||
| env.evm_env.block_env.difficulty = block.header.difficulty(); | ||
| env.evm_env.block_env.prevrandao = Some(block.header.mix_hash().unwrap_or_default()); | ||
| env.evm_env.block_env.basefee = block.header.base_fee_per_gas().unwrap_or_default(); | ||
| env.evm_env.block_env.gas_limit = block.header.gas_limit(); |
There was a problem hiding this comment.
this im unsure how to upstream given the evmenv will change from chain to chain :p
There was a problem hiding this comment.
these labels and such we can prob just do somewhere else and make them network specific. e.g. NetworkConfig/NetworkArgs
Sync's Foundry & Tempo
…ithSigner` (#163) Should resolve build failure: https://github.com/tempoxyz/tempo/actions/runs/20437525410/job/58722393899
* ci: add fee liquidity * fix shell check
* fix: bump to master, add commonware patches * cargo update
* chore: bump tempo * fix: remove deprecated precompiles (#171) * fix: remove deprecated precompiles * fix: update tx type * fix: update tx type * Bump and fix --------- Co-authored-by: 0xKitsune <77890308+0xKitsune@users.noreply.github.com> Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
* chore: bump tempo * add sepolia rpc --------- Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
* chore: bump tempo deps to 61eab39ab * fmt: fmt * fix: impl `with_account_info` on `FoundryStorageProvider` * fix: handle option properly * style: clippy * fix: `MailTemplate` token creation * install from master branch for tempo compatibility * fix test --------- Co-authored-by: 0xrusowsky <0xrusowsky@proton.me> Co-authored-by: zerosnacks <zerosnacks@protonmail.com>
* bump + Add helper back * Block timestamp as salt * Fixes * random salt
* chore: bump tempo deps to 2e29859 * fix: update stable exchange to stable dex * fmt: cargo fmt * chore: update `deny.toml` --------- Co-authored-by: 0xrusowsky <0xrusowsky@proton.me>
Following the 0.1.4 release users should now use the latest release instead of master
* feat: add vm.executeTransaction cheatcode and tests * Pin nightly to fix ci --------- Co-authored-by: grandizzy <grandizzy.the.egg@gmail.com>
Add TEMPO_FEE_TOKEN env var to configure the fee token used for tests, scripts, and deployments. Defaults to native token (0x20c0...0000). When a custom fee token is set: - Fee token arg is passed to forge script, forge create, cast send, etc. - Multi-token tests (liquidity minting, DEX operations) are skipped - Fee token addresses now use full addresses instead of numeric IDs
If disable nonce check is set to true, then we cannot do nonce invariants
The global config sets limit_contract_code_size = usize::MAX for test flexibility, which caused max_initcode_size() to return usize::MAX. This inadvertently disabled EIP-3860 validation for oversized initcode. Override the limit specifically in executeTransaction to enforce the 49152 byte limit for realistic transaction simulation while keeping flexibility for test contract deployments. Fixes BUG-001: Oversized Initcode Not Rejected
* ci: add scripts option to CI Tempo workflow Add a 'scripts' input to workflow_dispatch allowing selection of tempo-check.sh, tempo-deploy.sh, or both. Defaults to both. Co-Authored-By: grandizzy <38490174+grandizzy@users.noreply.github.com> * ci: remove hardcoded TEMPO_FEE_TOKEN from mainnet step Co-Authored-By: grandizzy <38490174+grandizzy@users.noreply.github.com> * ci: set TEMPO_FEE_TOKEN to PathUSD for mainnet The Mail.s.sol template falls back to AlphaUSD when TEMPO_FEE_TOKEN is unset, which reverts with InvalidToken() on mainnet. Set it to PathUSD explicitly. Co-Authored-By: grandizzy <38490174+grandizzy@users.noreply.github.com> * fix(ci): skip alternate fee token test on mainnet Alternate fee tokens (0x...0002, 0x...0003) only exist on testnet. Detect chain ID at runtime and skip that step on mainnet (chain 4217). Co-Authored-By: grandizzy <38490174+grandizzy@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019cb372-11f4-774d-848b-ddc08b0a7cbb Co-authored-by: Amp <amp@ampcode.com> --------- Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com> Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
* chore(deps): bump tempo dependencies to 9395d93 * fix: update EtherlinkTestnet -> EtherlinkShadownet for alloy-chains 0.2.31 Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019cd127-617c-7198-a339-2ccbe71bfec8 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com> Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
…ory (#307) * feat(cast): warn on non-ISO-4217 currency in `cast send` to TIP20Factory Detects `cast send <TIP20_FACTORY> "createToken(...)" ... <currency> ...` calls and validates the currency argument against ISO 4217. Shows a warning with docs links and prompts for confirmation if the code is not recognized. Co-Authored-By: malleshpai <5857042+malleshpai@users.noreply.github.com> * refactor(cast): use TIP20_FACTORY_ADDRESS from tempo-precompiles Replace local address constant with the canonical one from tempo-precompiles. Co-Authored-By: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019cd1eb-a0d1-7229-b047-1d5f3ce421df * chore: fix fmt and add JOD typos exception Co-Authored-By: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019cd1eb-a0d1-7229-b047-1d5f3ce421df * refactor(cast): use tempo-contracts is_iso4217_currency and pin tempo rev Pin tempo to 083592c7. Replace local ISO 4217 reimplementation in cast with tempo_contracts::precompiles::is_iso4217_currency. Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019cd253-3806-7188-9664-3f300010df92 * chore: ensure hyperlinks are clickable in terminals that support them * fix: broken tests due to version bump * chore: add `--force` flag to skip warnings --------- Co-authored-by: malleshpai <5857042+malleshpai@users.noreply.github.com> Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com> Co-authored-by: 0xrusowsky <0xrusowsky@proton.me>
…on (#306) Adds a new `create` subcommand to `cast tip20` (alias `cast erc20`) that calls the TIP20Factory.createToken() precompile. Validates the currency code against ISO 4217 and prompts the user with a warning + docs links if the code is not recognized. Use `--force` to skip the check. Amp-Thread-ID: https://ampcode.com/threads/T-019cd35c-8342-71f8-8197-41d8dda917dd Co-authored-by: malleshpai <5857042+malleshpai@users.noreply.github.com>
* chore(script): warn on tip20 deployments iwth invalid currency codes * style: clippy
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
bump alloy-chains 0.2.32
Previous value (v1.5.1) doesn't exist as a tag in this repo, causing the changelog builder to 404 on stable releases. Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Bumps tempo to b6e248ccc (tempoxyz/tempo#3094) which changes checkpoint_commit(&mut self) to checkpoint_commit(&mut self, checkpoint). Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com>
Updates from stale merge commit (b6e248c from rus/zc-103 branch) to actual main HEAD. Fixes invariant-tests build failure caused by checkpoint_commit trait mismatch. Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
Reverts the temporary disable from #336 — the missing revm bump is resolved. Amp-Thread-ID: https://ampcode.com/threads/T-019d0213-09e9-75ef-9146-1eef42bbde70 Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
* fix(evm): seed keychain tx.origin from effective caller context Amp-Thread-ID: https://ampcode.com/threads/T-019d088d-9ee3-7046-bfbb-e7dc95292e6a * fix(evm): preserve outer tx.origin for isolated inner context Amp-Thread-ID: https://ampcode.com/threads/T-019d088d-9ee3-7046-bfbb-e7dc95292e6a * refactor(evm): move tx_origin seeding into inspect_run, drop pipeline duplication Seed keychain tx.origin and load fee fields in inspect_run before delegating to the default inspect_run_without_catch_error, removing the need to duplicate the validate/pre_execution/execution/post_execution pipeline. Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d0aca-8e01-7495-a471-001306f4922b * style(evm): flatten ctx borrow scopes in inspect_run Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d0aca-8e01-7495-a471-001306f4922b --------- Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com> Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com>
… & fix breaking changes (#359) * chore(deps): bump tempo dependencies to 698f7cb * fix: bump reqwest 0.12 → 0.13 for alloy 1.8.2 compatibility alloy 1.8.2 depends on reqwest 0.13, causing two reqwest versions and a type mismatch for Http<reqwest::Client>. Bump workspace reqwest to 0.13, remove tls_built_in_root_certs (removed in 0.13), and use map_err for cross-version reqwest error conversions. Amp-Thread-ID: https://ampcode.com/threads/T-019d29f4-1377-7075-a470-89ef5b054dd2 Co-authored-by: Amp <amp@ampcode.com> * fix(deny): allow openssl when wrapped by native-tls gcloud-sdk (via alloy-signer-gcp) enables native-tls on reqwest with --all-features, which transitively pulls in openssl. Amp-Thread-ID: https://ampcode.com/threads/T-019d29f4-1377-7075-a470-89ef5b054dd2 Co-authored-by: Amp <amp@ampcode.com> * chore(deps): bump alloy-evm 0.29, alloy-op-evm 0.28, foundry-fork-db 0.24.1, revm-inspectors 0.36.1 Align dependency versions to resolve duplicate crate issues: - alloy-evm 0.27.3 → 0.29 (matches tempo/reth) - alloy-op-evm 0.27.3 → 0.28 - foundry-fork-db 0.23.0 → 0.24.1 (revm 36) - revm-inspectors 0.34.3 → 0.36.1 (revm 36) - rand 0.10 → 0.9 (compat with proptest) - strum 0.28 → 0.27 (matches alloy-chains) - rexpect 0.7 → 0.6 (matches patch) Amp-Thread-ID: https://ampcode.com/threads/T-019d29f4-1377-7075-a470-89ef5b054dd2 Co-authored-by: Amp <amp@ampcode.com> * chore(deps): bump alloy to 1.8, rust-version to 1.94 Amp-Thread-ID: https://ampcode.com/threads/T-019d29f4-1377-7075-a470-89ef5b054dd2 Co-authored-by: Amp <amp@ampcode.com> --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: zerosnacks <zerosnacks@protonmail.com> Co-authored-by: Amp <amp@ampcode.com>
Transparent HTTP 402 payment handling via the Machine Payments Protocol (mpp-rs). When an RPC endpoint returns 402, the transport automatically pays the challenge and retries. - MppHttpTransport wraps HTTP transport with 402 handling, 410 channel recovery, and key_authorization retry logic - SessionProvider manages signing mode (Direct/Keychain), channel lifecycle, and expiring nonces for channel open transactions - Persistent channels saved to ~/.tempo/foundry/channels.json for cross-process reuse - Key discovery from TEMPO_PRIVATE_KEY env var or ~/.tempo/wallet/keys.toml - Shared Tempo keystore types in common/tempo.rs - Built-in RPC aliases: 'tempo' and 'moderato' resolve to MPP endpoints - E2E test script and CI workflow step Amp-Thread-ID: https://ampcode.com/threads/T-019d28ce-05ec-73ef-ab95-50cb71da2e7b Amp-Thread-ID: https://ampcode.com/threads/T-019d28ce-05ec-73ef-ab95-50cb71da2e7b Amp-Thread-ID: https://ampcode.com/threads/T-019d28ce-05ec-73ef-ab95-50cb71da2e7b Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com>
Co-authored-by: onbjerg <8862627+onbjerg@users.noreply.github.com> Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com> Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com>
Co-authored-by: onbjerg <8862627+onbjerg@users.noreply.github.com>
* fix(anvil): seed keychain tx_origin during genesis initialization On T2+, `ensure_admin_caller` requires `tx_origin != Address::ZERO` and `tx_origin == msg_sender`. The anvil genesis path in `initialize_tempo_precompiles` calls `authorize_key` without first seeding `tx_origin` in transient storage, causing `UnauthorizedCaller` errors when creating a local anvil instance at T2. Fix by calling `keychain.set_tx_origin(account)` before each `authorize_key` call. Co-Authored-By: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com> * ci: default hardfork to T2 in tempo-check script Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d2ac6-3ac6-770d-9958-fb29f9f88570 * ci: use hardfork_gte for version-gated test blocks T1+ features (2D nonces, expiring nonces, access keys) should run on T1 and all later hardforks, not only on exactly T1. Add a hardfork_ord/ hardfork_gte helper and replace the three `== T1` checks with `hardfork_gte T1`. Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d2ac6-3ac6-770d-9958-fb29f9f88570 * ci: remove hardfork gates, always run all tests All features (2D nonces, expiring nonces, access keys) are available on T2 (the new default). Remove the if/else conditionals and the hardfork_gte helper — all tests now run unconditionally. Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d2ac6-3ac6-770d-9958-fb29f9f88570 --------- Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com>
* fix: patch alloy-signer-gcp to use rustls alloy-signer-gcp@1.8.2 depends on gcloud-sdk with default features, which enables native-tls -> openssl-sys. This breaks musl cross-compilation in the release workflow. Patch to alloy/main@867951b which adds tls-webpki-roots and removes the native-tls dependency chain. * bump to v1.8.3 * re-add commented out alloy patch block --------- Co-authored-by: zerosnacks <zerosnacks@protonmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Contains all changes applied to make Foundry work with Tempo
Instructions to sync upstream:
Once, add
upstreamremote targetFirst, sync
upstreambranchNext, sync
tempobranch by PR