From c4fcf12d4f43368774748cab9775d9200be3a6c0 Mon Sep 17 00:00:00 2001 From: Jacob T Firek <106350168+jtfirek@users.noreply.github.com> Date: Wed, 11 Dec 2024 14:18:24 -0500 Subject: [PATCH 01/45] Update incorrect documentation in the READ.me (#9538) Update README.md --- crates/config/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/config/README.md b/crates/config/README.md index 9fcd30ac9..0aa2802e3 100644 --- a/crates/config/README.md +++ b/crates/config/README.md @@ -159,7 +159,7 @@ use_literal_content = false # use ipfs method to generate the metadata hash, solc's default. # To not include the metadata hash, to allow for deterministic code: https://docs.soliditylang.org/en/latest/metadata.html, use "none" bytecode_hash = "ipfs" -# Whether to append the metadata hash to the bytecode +# Whether to append the CBOR-encoded metadata file. cbor_metadata = true # How to treat revert (and require) reason strings. # Possible values are: "default", "strip", "debug" and "verboseDebug". From 539760c2d158c91c28cc3d3400963e09f49882ba Mon Sep 17 00:00:00 2001 From: Yash Atreya <44857776+yash-atreya@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:26:18 +0530 Subject: [PATCH 02/45] fix(`anvil`): set `best_number` to `state.block.number` if greater (#9543) fix(`anvil`): set `best_number` correctly while loading state with fork activated --- crates/anvil/src/eth/backend/mem/mod.rs | 26 ++++++++++++++++--- crates/anvil/tests/it/state.rs | 33 ++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/crates/anvil/src/eth/backend/mem/mod.rs b/crates/anvil/src/eth/backend/mem/mod.rs index 26787cca6..dfd96c723 100644 --- a/crates/anvil/src/eth/backend/mem/mod.rs +++ b/crates/anvil/src/eth/backend/mem/mod.rs @@ -922,10 +922,28 @@ impl Backend { let fork_num_and_hash = self.get_fork().map(|f| (f.block_number(), f.block_hash())); if let Some((number, hash)) = fork_num_and_hash { - // If loading state file on a fork, set best number to the fork block number. - // Ref: https://github.com/foundry-rs/foundry/pull/9215#issue-2618681838 - self.blockchain.storage.write().best_number = U64::from(number); - self.blockchain.storage.write().best_hash = hash; + let best_number = state.best_block_number.unwrap_or(block.number.to::<U64>()); + trace!(target: "backend", state_block_number=?best_number, fork_block_number=?number); + // If the state.block_number is greater than the fork block number, set best number + // to the state block number. + // Ref: https://github.com/foundry-rs/foundry/issues/9539 + if best_number.to::<u64>() > number { + self.blockchain.storage.write().best_number = best_number; + let best_hash = + self.blockchain.storage.read().hash(best_number.into()).ok_or_else( + || { + BlockchainError::RpcError(RpcError::internal_error_with(format!( + "Best hash not found for best number {best_number}", + ))) + }, + )?; + self.blockchain.storage.write().best_hash = best_hash; + } else { + // If loading state file on a fork, set best number to the fork block number. + // Ref: https://github.com/foundry-rs/foundry/pull/9215#issue-2618681838 + self.blockchain.storage.write().best_number = U64::from(number); + self.blockchain.storage.write().best_hash = hash; + } } else { let best_number = state.best_block_number.unwrap_or(block.number.to::<U64>()); self.blockchain.storage.write().best_number = best_number; diff --git a/crates/anvil/tests/it/state.rs b/crates/anvil/tests/it/state.rs index f7736de2f..5337b36b5 100644 --- a/crates/anvil/tests/it/state.rs +++ b/crates/anvil/tests/it/state.rs @@ -2,7 +2,7 @@ use crate::abi::Greeter; use alloy_network::{ReceiptResponse, TransactionBuilder}; -use alloy_primitives::{address, utils::Unit, Bytes, Uint, U256}; +use alloy_primitives::{address, utils::Unit, Bytes, Uint, U256, U64}; use alloy_provider::Provider; use alloy_rpc_types::{BlockId, TransactionRequest}; use alloy_serde::WithOtherFields; @@ -245,3 +245,34 @@ async fn test_fork_load_state() { assert_eq!(balance_alice + value, latest_balance_alice); } + +// <https://github.com/foundry-rs/foundry/issues/9539> +#[tokio::test(flavor = "multi_thread")] +async fn test_fork_load_state_with_greater_state_block() { + let (api, _handle) = spawn( + NodeConfig::test() + .with_eth_rpc_url(Some(next_http_rpc_endpoint())) + .with_fork_block_number(Some(21070682u64)), + ) + .await; + + api.mine_one().await; + + let block_number = api.block_number().unwrap(); + + let serialized_state = api.serialized_state(false).await.unwrap(); + + assert_eq!(serialized_state.best_block_number, Some(block_number.to::<U64>())); + + let (api, _handle) = spawn( + NodeConfig::test() + .with_eth_rpc_url(Some(next_http_rpc_endpoint())) + .with_fork_block_number(Some(21070682u64)) // Forked chain has moved forward + .with_init_state(Some(serialized_state)), + ) + .await; + + let new_block_number = api.block_number().unwrap(); + + assert_eq!(new_block_number, block_number); +} From 2eec0982c0640c6998c8dcd9cb57740fe4434168 Mon Sep 17 00:00:00 2001 From: Yash Atreya <44857776+yash-atreya@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:40:40 +0530 Subject: [PATCH 03/45] fix(`cast`): reset `env.tx.caller` for impersonated txs (#9544) * fix(`cast`): reset `env.tx.caller` for impersonated txs * test --- crates/cast/bin/cmd/run.rs | 14 +++++++++++- crates/cast/tests/cli/main.rs | 41 +++++++++++++++++++++++++++++++--- crates/common/src/constants.rs | 23 ++++++++++++++++++- 3 files changed, 73 insertions(+), 5 deletions(-) diff --git a/crates/cast/bin/cmd/run.rs b/crates/cast/bin/cmd/run.rs index 7ab5ddd51..4b26c848e 100644 --- a/crates/cast/bin/cmd/run.rs +++ b/crates/cast/bin/cmd/run.rs @@ -10,7 +10,7 @@ use foundry_cli::{ opts::{EtherscanOpts, RpcOpts}, utils::{handle_traces, init_progress, TraceResult}, }; -use foundry_common::{is_known_system_sender, shell, SYSTEM_TRANSACTION_TYPE}; +use foundry_common::{is_impersonated_tx, is_known_system_sender, shell, SYSTEM_TRANSACTION_TYPE}; use foundry_compilers::artifacts::EvmVersion; use foundry_config::{ figment::{ @@ -212,6 +212,12 @@ impl RunArgs { configure_tx_env(&mut env, &tx.inner); + if is_impersonated_tx(&tx.inner.inner) { + // If the transaction is impersonated, we need to set the caller to the from + // address Ref: https://github.com/foundry-rs/foundry/issues/9541 + env.tx.caller = tx.from; + } + if let Some(to) = Transaction::to(tx) { trace!(tx=?tx.tx_hash(),?to, "executing previous call transaction"); executor.transact_with_env(env.clone()).wrap_err_with(|| { @@ -251,6 +257,12 @@ impl RunArgs { configure_tx_env(&mut env, &tx.inner); + if is_impersonated_tx(&tx.inner.inner) { + // If the transaction is impersonated, we need to set the caller to the from address + // Ref: https://github.com/foundry-rs/foundry/issues/9541 + env.tx.caller = tx.from; + } + if let Some(to) = Transaction::to(&tx) { trace!(tx=?tx.tx_hash(), to=?to, "executing call transaction"); TraceResult::try_from(executor.transact_with_env(env))? diff --git a/crates/cast/tests/cli/main.rs b/crates/cast/tests/cli/main.rs index f2ee99009..df9842722 100644 --- a/crates/cast/tests/cli/main.rs +++ b/crates/cast/tests/cli/main.rs @@ -1,9 +1,10 @@ //! Contains various tests for checking cast commands use alloy_chains::NamedChain; -use alloy_network::TransactionResponse; -use alloy_primitives::{b256, B256}; -use alloy_rpc_types::{BlockNumberOrTag, Index}; +use alloy_network::{TransactionBuilder, TransactionResponse}; +use alloy_primitives::{address, b256, Bytes, B256}; +use alloy_provider::{Provider, ProviderBuilder}; +use alloy_rpc_types::{BlockNumberOrTag, Index, TransactionRequest}; use anvil::{EthereumHardfork, NodeConfig}; use foundry_test_utils::{ casttest, file, forgetest, forgetest_async, @@ -1995,3 +1996,37 @@ forgetest_async!(cast_call_custom_chain_id, |_prj, cmd| { ]) .assert_success(); }); + +// https://github.com/foundry-rs/foundry/issues/9541 +forgetest_async!(cast_run_impersonated_tx, |_prj, cmd| { + let (_api, handle) = anvil::spawn( + NodeConfig::test() + .with_auto_impersonate(true) + .with_eth_rpc_url(Some("https://sepolia.base.org")), + ) + .await; + + let http_endpoint = handle.http_endpoint(); + + let provider = ProviderBuilder::new().on_http(http_endpoint.parse().unwrap()); + + // send impersonated tx + let tx = TransactionRequest::default() + .with_from(address!("041563c07028Fc89106788185763Fc73028e8511")) + .with_to(address!("F38aA5909D89F5d98fCeA857e708F6a6033f6CF8")) + .with_input( + Bytes::from_str( + "0x60fe47b1000000000000000000000000000000000000000000000000000000000000000c", + ) + .unwrap(), + ); + + let receipt = provider.send_transaction(tx).await.unwrap().get_receipt().await.unwrap(); + + assert!(receipt.status()); + + // run impersonated tx + cmd.cast_fuse() + .args(["run", &receipt.transaction_hash.to_string(), "--rpc-url", &http_endpoint]) + .assert_success(); +}); diff --git a/crates/common/src/constants.rs b/crates/common/src/constants.rs index 4ff3eb8d7..c67131585 100644 --- a/crates/common/src/constants.rs +++ b/crates/common/src/constants.rs @@ -1,6 +1,8 @@ //! Commonly used constants. -use alloy_primitives::{address, Address}; +use alloy_consensus::Typed2718; +use alloy_network::AnyTxEnvelope; +use alloy_primitives::{address, Address, PrimitiveSignature, B256}; use std::time::Duration; /// The dev chain-id, inherited from hardhat @@ -53,6 +55,25 @@ pub fn is_known_system_sender(sender: Address) -> bool { [ARBITRUM_SENDER, OPTIMISM_SYSTEM_ADDRESS].contains(&sender) } +pub fn is_impersonated_tx(tx: &AnyTxEnvelope) -> bool { + if let AnyTxEnvelope::Ethereum(tx) = tx { + return is_impersonated_sig(tx.signature(), tx.ty()); + } + false +} + +pub fn is_impersonated_sig(sig: &PrimitiveSignature, ty: u8) -> bool { + let impersonated_sig = PrimitiveSignature::from_scalars_and_parity( + B256::with_last_byte(1), + B256::with_last_byte(1), + false, + ); + if ty != SYSTEM_TRANSACTION_TYPE && sig == &impersonated_sig { + return true; + } + false +} + #[cfg(test)] mod tests { use super::*; From e22a9ec015c9462eb33f9c21d83eebcea13dee09 Mon Sep 17 00:00:00 2001 From: grandizzy <38490174+grandizzy@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:15:59 +0200 Subject: [PATCH 04/45] chore: Add GH attestation for foundry binaries (#9546) Add GH attestation --- .github/workflows/release.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1377e5d6e..d6b2018d1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,6 +67,10 @@ jobs: uses: ./.github/workflows/docker-publish.yml release: + permissions: + id-token: write + contents: read + attestations: write name: ${{ matrix.target }} (${{ matrix.runner }}) runs-on: ${{ matrix.runner }} timeout-minutes: 240 @@ -156,8 +160,18 @@ jobs: du -h "$bin" || true ldd "$bin" || true $bin --version || true + echo "${name}_bin_path=${bin}" >> $GITHUB_ENV done + - name: Binaries attestation + uses: actions/attest-build-provenance@v2 + with: + subject-path: | + ${{ env.anvil_bin_path }} + ${{ env.cast_bin_path }} + ${{ env.chisel_bin_path }} + ${{ env.forge_bin_path }} + - name: Archive binaries id: artifacts env: From 2f698e4c9747eb035a951186966cfda7aec7359c Mon Sep 17 00:00:00 2001 From: grandizzy <38490174+grandizzy@users.noreply.github.com> Date: Fri, 13 Dec 2024 08:15:05 +0200 Subject: [PATCH 05/45] fix(release): allow contents write permission, run attestation after release created (#9550) fix(release): allow contents write permission, run attestation after release published --- .github/workflows/release.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6b2018d1..3e2dac1e8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -69,7 +69,7 @@ jobs: release: permissions: id-token: write - contents: read + contents: write attestations: write name: ${{ matrix.target }} (${{ matrix.runner }}) runs-on: ${{ matrix.runner }} @@ -163,15 +163,6 @@ jobs: echo "${name}_bin_path=${bin}" >> $GITHUB_ENV done - - name: Binaries attestation - uses: actions/attest-build-provenance@v2 - with: - subject-path: | - ${{ env.anvil_bin_path }} - ${{ env.cast_bin_path }} - ${{ env.chisel_bin_path }} - ${{ env.forge_bin_path }} - - name: Archive binaries id: artifacts env: @@ -228,6 +219,15 @@ jobs: ${{ steps.artifacts.outputs.file_name }} ${{ steps.man.outputs.foundry_man }} + - name: Binaries attestation + uses: actions/attest-build-provenance@v2 + with: + subject-path: | + ${{ env.anvil_bin_path }} + ${{ env.cast_bin_path }} + ${{ env.chisel_bin_path }} + ${{ env.forge_bin_path }} + # If this is a nightly release, it also updates the release # tagged `nightly` for compatibility with `foundryup` - name: Update nightly release From 1276f58ea9ddcebb402fa6e999355bef65c300b9 Mon Sep 17 00:00:00 2001 From: Arsenii Kulikov <klkvrr@gmail.com> Date: Fri, 13 Dec 2024 18:00:54 +0400 Subject: [PATCH 06/45] chore: bump compilers (#9554) * chore: bump compilers * clippy --- Cargo.lock | 22 +++++++++++----------- Cargo.toml | 2 +- crates/config/src/lib.rs | 16 +++++++++++++++- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1422df4b0..7b650cec7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3862,14 +3862,14 @@ dependencies = [ [[package]] name = "foundry-compilers" -version = "0.12.7" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7235826f00dd9196bcbdbb9c168ea38235601db95883a78819ba2303dee34bb8" +checksum = "d817beee8c566a99f4267f25ff63d0de46c442948496ecef91ead56e3383090c" dependencies = [ "alloy-json-abi", "alloy-primitives", "auto_impl", - "derivative", + "derive_more", "dirs 5.0.1", "dyn-clone", "foundry-compilers-artifacts", @@ -3899,9 +3899,9 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts" -version = "0.12.7" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "097bc5db7be5acf6d92938ad7daabf1932d7aa7c44326cdfc256531a53034d31" +checksum = "bec784a3a809ba2ee723fcfeb737a6ac90b4fd1e4d048c2d49fed6723bd35547" dependencies = [ "foundry-compilers-artifacts-solc", "foundry-compilers-artifacts-vyper", @@ -3909,9 +3909,9 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts-solc" -version = "0.12.7" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4168053c1ad217866c677a074517e8d51988e5b1bad044b95f3c513aa5b6caa" +checksum = "44549c33e5a03408c8d40c36d764b7e84d261258ef481c19e4a612e609fdf8a4" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -3933,9 +3933,9 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts-vyper" -version = "0.12.7" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b7beffe7182551d01d249f022a5eab17c36c73b39ae8efd404e0fb9c98b9f80" +checksum = "a438605ae74689752b2f717165daac15766f1b2a166d2095715d5f9407084b52" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -3948,9 +3948,9 @@ dependencies = [ [[package]] name = "foundry-compilers-core" -version = "0.12.7" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5247875b96dfb99da12d0cd0f6ce98954116d1cf8a9188d613b2a35cd6937b" +checksum = "04ac6d85c3e2d12585f8e698b12ed4880b02716ec7fde5d62de9a194e62f4e36" dependencies = [ "alloy-primitives", "cfg-if", diff --git a/Cargo.toml b/Cargo.toml index 68414b683..b8b0cfbeb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -169,7 +169,7 @@ foundry-linking = { path = "crates/linking" } # solc & compilation utilities foundry-block-explorers = { version = "0.9.0", default-features = false } -foundry-compilers = { version = "0.12.7", default-features = false } +foundry-compilers = { version = "0.12.8", default-features = false } foundry-fork-db = "0.9.0" solang-parser = "=0.3.3" solar-ast = { version = "=0.1.0", default-features = false } diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs index 805aaf7cd..7264b63f8 100644 --- a/crates/config/src/lib.rs +++ b/crates/config/src/lib.rs @@ -949,6 +949,7 @@ impl Config { } /// Resolves globs and builds a mapping from individual source files to their restrictions + #[expect(clippy::disallowed_macros)] fn restrictions( &self, paths: &ProjectPathsConfig, @@ -977,7 +978,20 @@ impl Config { if !map.contains_key(source) { map.insert(source.clone(), res); } else { - map.get_mut(source.as_path()).unwrap().merge(res); + let value = map.remove(source.as_path()).unwrap(); + if let Some(merged) = value.clone().merge(res) { + map.insert(source.clone(), merged); + } else { + // `sh_warn!` is a circular dependency, preventing us from using it here. + eprintln!( + "{}", + yansi::Paint::yellow(&format!( + "Failed to merge compilation restrictions for {}", + source.display() + )) + ); + map.insert(source.clone(), value); + } } } } From dabacecdc14d074a108c18f97d1e1f63ade37a37 Mon Sep 17 00:00:00 2001 From: Yash Atreya <44857776+yash-atreya@users.noreply.github.com> Date: Fri, 13 Dec 2024 20:07:19 +0530 Subject: [PATCH 07/45] fix: account for impersonated tx in configure_tx_env (#9553) * chore: account for impersonated tx in configure_tx_env * nit --- crates/cast/bin/cmd/run.rs | 14 +------------- crates/evm/core/src/backend/mod.rs | 2 +- crates/evm/core/src/utils.rs | 13 +++++++++++-- crates/verify/src/bytecode.rs | 4 ++-- 4 files changed, 15 insertions(+), 18 deletions(-) diff --git a/crates/cast/bin/cmd/run.rs b/crates/cast/bin/cmd/run.rs index 4b26c848e..7ab5ddd51 100644 --- a/crates/cast/bin/cmd/run.rs +++ b/crates/cast/bin/cmd/run.rs @@ -10,7 +10,7 @@ use foundry_cli::{ opts::{EtherscanOpts, RpcOpts}, utils::{handle_traces, init_progress, TraceResult}, }; -use foundry_common::{is_impersonated_tx, is_known_system_sender, shell, SYSTEM_TRANSACTION_TYPE}; +use foundry_common::{is_known_system_sender, shell, SYSTEM_TRANSACTION_TYPE}; use foundry_compilers::artifacts::EvmVersion; use foundry_config::{ figment::{ @@ -212,12 +212,6 @@ impl RunArgs { configure_tx_env(&mut env, &tx.inner); - if is_impersonated_tx(&tx.inner.inner) { - // If the transaction is impersonated, we need to set the caller to the from - // address Ref: https://github.com/foundry-rs/foundry/issues/9541 - env.tx.caller = tx.from; - } - if let Some(to) = Transaction::to(tx) { trace!(tx=?tx.tx_hash(),?to, "executing previous call transaction"); executor.transact_with_env(env.clone()).wrap_err_with(|| { @@ -257,12 +251,6 @@ impl RunArgs { configure_tx_env(&mut env, &tx.inner); - if is_impersonated_tx(&tx.inner.inner) { - // If the transaction is impersonated, we need to set the caller to the from address - // Ref: https://github.com/foundry-rs/foundry/issues/9541 - env.tx.caller = tx.from; - } - if let Some(to) = Transaction::to(&tx) { trace!(tx=?tx.tx_hash(), to=?to, "executing call transaction"); TraceResult::try_from(executor.transact_with_env(env))? diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index cf6e7e8be..3d162c96f 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -1281,7 +1281,7 @@ impl DatabaseExt for Backend { self.commit(journaled_state.state.clone()); let res = { - configure_tx_req_env(&mut env, tx)?; + configure_tx_req_env(&mut env, tx, None)?; let env = self.env_with_handler_cfg(env); let mut db = self.clone(); diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index 9a1dd8910..0f29ec2a4 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -9,6 +9,7 @@ use alloy_network::AnyTxEnvelope; use alloy_primitives::{Address, Selector, TxKind, B256, U256}; use alloy_provider::{network::BlockResponse, Network}; use alloy_rpc_types::{Transaction, TransactionRequest}; +use foundry_common::is_impersonated_tx; use foundry_config::NamedChain; use foundry_fork_db::DatabaseError; use revm::{ @@ -88,16 +89,21 @@ pub fn get_function<'a>( } /// Configures the env for the given RPC transaction. +/// Accounts for an impersonated transaction by resetting the `env.tx.caller` field to `tx.from`. pub fn configure_tx_env(env: &mut revm::primitives::Env, tx: &Transaction<AnyTxEnvelope>) { + let impersonated_from = is_impersonated_tx(&tx.inner).then_some(tx.from); if let AnyTxEnvelope::Ethereum(tx) = &tx.inner { - configure_tx_req_env(env, &tx.clone().into()).expect("cannot fail"); + configure_tx_req_env(env, &tx.clone().into(), impersonated_from).expect("cannot fail"); } } /// Configures the env for the given RPC transaction request. +/// `impersonated_from` is the address of the impersonated account. This helps account for an +/// impersonated transaction by resetting the `env.tx.caller` field to `impersonated_from`. pub fn configure_tx_req_env( env: &mut revm::primitives::Env, tx: &TransactionRequest, + impersonated_from: Option<Address>, ) -> eyre::Result<()> { let TransactionRequest { nonce, @@ -120,7 +126,10 @@ pub fn configure_tx_req_env( // If no `to` field then set create kind: https://eips.ethereum.org/EIPS/eip-2470#deployment-transaction env.tx.transact_to = to.unwrap_or(TxKind::Create); - env.tx.caller = from.ok_or_else(|| eyre::eyre!("missing `from` field"))?; + // If the transaction is impersonated, we need to set the caller to the from + // address Ref: https://github.com/foundry-rs/foundry/issues/9541 + env.tx.caller = + impersonated_from.unwrap_or(from.ok_or_else(|| eyre::eyre!("missing `from` field"))?); env.tx.gas_limit = gas.ok_or_else(|| eyre::eyre!("missing `gas` field"))?; env.tx.nonce = nonce; env.tx.value = value.unwrap_or_default(); diff --git a/crates/verify/src/bytecode.rs b/crates/verify/src/bytecode.rs index d3079fae7..01fcb4886 100644 --- a/crates/verify/src/bytecode.rs +++ b/crates/verify/src/bytecode.rs @@ -261,7 +261,7 @@ impl VerifyBytecodeArgs { // configure_tx_rq_env(&mut env, &gen_tx); - configure_tx_req_env(&mut env, &gen_tx_req) + configure_tx_req_env(&mut env, &gen_tx_req, None) .wrap_err("Failed to configure tx request env")?; // Seed deployer account with funds @@ -478,7 +478,7 @@ impl VerifyBytecodeArgs { } // configure_req__env(&mut env, &transaction.inner); - configure_tx_req_env(&mut env, &transaction) + configure_tx_req_env(&mut env, &transaction, None) .wrap_err("Failed to configure tx request env")?; let fork_address = crate::utils::deploy_contract( From 233bff2f8ef1f958e1676048c85a2bc37efa2241 Mon Sep 17 00:00:00 2001 From: anukul <44864521+anukul@users.noreply.github.com> Date: Sat, 14 Dec 2024 10:53:31 +0200 Subject: [PATCH 08/45] fix: read rpc config when using fork cheatcodes (#9547) * read rpc config when using fork cheatcodes * attempt to resolve failed environment variables again * nit: refactor * nit: refactor * fix clippy errors * fix rustfmt errors * run cargofmt * set auth header for fork * remove redundant clone() * Update crates/cheatcodes/src/config.rs --------- Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> --- crates/cheatcodes/src/config.rs | 37 ++--- crates/cheatcodes/src/evm/fork.rs | 10 +- crates/cheatcodes/src/test.rs | 3 +- crates/chisel/src/dispatcher.rs | 6 +- crates/common/src/provider/mod.rs | 6 + crates/config/src/endpoints.rs | 226 ++++++++++++++++---------- crates/config/src/lib.rs | 95 +++++++---- crates/evm/core/src/fork/multi.rs | 1 + crates/evm/core/src/opts.rs | 4 + crates/forge/tests/it/test_helpers.rs | 20 +-- 10 files changed, 246 insertions(+), 162 deletions(-) diff --git a/crates/cheatcodes/src/config.rs b/crates/cheatcodes/src/config.rs index e0463dfc4..5bd76d799 100644 --- a/crates/cheatcodes/src/config.rs +++ b/crates/cheatcodes/src/config.rs @@ -5,7 +5,7 @@ use foundry_common::{fs::normalize_path, ContractsByArtifact}; use foundry_compilers::{utils::canonicalize, ProjectPathsConfig}; use foundry_config::{ cache::StorageCachingConfig, fs_permissions::FsAccessKind, Config, FsPermissions, - ResolvedRpcEndpoints, + ResolvedRpcEndpoint, ResolvedRpcEndpoints, RpcEndpoint, RpcEndpointUrl, }; use foundry_evm_core::opts::EvmOpts; use semver::Version; @@ -185,33 +185,28 @@ impl CheatsConfig { /// - Returns an error if `url_or_alias` is a known alias but references an unresolved env var. /// - Returns an error if `url_or_alias` is not an alias but does not start with a `http` or /// `ws` `scheme` and is not a path to an existing file - pub fn rpc_url(&self, url_or_alias: &str) -> Result<String> { - match self.rpc_endpoints.get(url_or_alias) { - Some(Ok(url)) => Ok(url.clone()), - Some(Err(err)) => { - // try resolve again, by checking if env vars are now set - err.try_resolve().map_err(Into::into) - } - None => { - // check if it's a URL or a path to an existing file to an ipc socket - if url_or_alias.starts_with("http") || - url_or_alias.starts_with("ws") || - // check for existing ipc file - Path::new(url_or_alias).exists() - { - Ok(url_or_alias.into()) - } else { - Err(fmt_err!("invalid rpc url: {url_or_alias}")) - } + pub fn rpc_endpoint(&self, url_or_alias: &str) -> Result<ResolvedRpcEndpoint> { + if let Some(endpoint) = self.rpc_endpoints.get(url_or_alias) { + Ok(endpoint.clone().try_resolve()) + } else { + // check if it's a URL or a path to an existing file to an ipc socket + if url_or_alias.starts_with("http") || + url_or_alias.starts_with("ws") || + // check for existing ipc file + Path::new(url_or_alias).exists() + { + let url = RpcEndpointUrl::Env(url_or_alias.to_string()); + Ok(RpcEndpoint::new(url).resolve()) + } else { + Err(fmt_err!("invalid rpc url: {url_or_alias}")) } } } - /// Returns all the RPC urls and their alias. pub fn rpc_urls(&self) -> Result<Vec<Rpc>> { let mut urls = Vec::with_capacity(self.rpc_endpoints.len()); for alias in self.rpc_endpoints.keys() { - let url = self.rpc_url(alias)?; + let url = self.rpc_endpoint(alias)?.url()?; urls.push(Rpc { key: alias.clone(), url }); } Ok(urls) diff --git a/crates/cheatcodes/src/evm/fork.rs b/crates/cheatcodes/src/evm/fork.rs index 83942cdbe..e78aa3be9 100644 --- a/crates/cheatcodes/src/evm/fork.rs +++ b/crates/cheatcodes/src/evm/fork.rs @@ -226,7 +226,7 @@ impl Cheatcode for rpc_0Call { impl Cheatcode for rpc_1Call { fn apply(&self, state: &mut Cheatcodes) -> Result { let Self { urlOrAlias, method, params } = self; - let url = state.config.rpc_url(urlOrAlias)?; + let url = state.config.rpc_endpoint(urlOrAlias)?.url()?; rpc_call(&url, method, params) } } @@ -326,9 +326,15 @@ fn create_fork_request( ) -> Result<CreateFork> { persist_caller(ccx); - let url = ccx.state.config.rpc_url(url_or_alias)?; + let rpc_endpoint = ccx.state.config.rpc_endpoint(url_or_alias)?; + let url = rpc_endpoint.url()?; let mut evm_opts = ccx.state.config.evm_opts.clone(); evm_opts.fork_block_number = block; + evm_opts.fork_retries = rpc_endpoint.config.retries; + evm_opts.fork_retry_backoff = rpc_endpoint.config.retry_backoff; + if let Some(Ok(auth)) = rpc_endpoint.auth { + evm_opts.fork_headers = Some(vec![format!("Authorization: {auth}")]); + } let fork = CreateFork { enable_caching: !ccx.state.config.no_storage_caching && ccx.state.config.rpc_storage_caching.enable_for_endpoint(&url), diff --git a/crates/cheatcodes/src/test.rs b/crates/cheatcodes/src/test.rs index bd723c931..417ae6983 100644 --- a/crates/cheatcodes/src/test.rs +++ b/crates/cheatcodes/src/test.rs @@ -42,7 +42,8 @@ impl Cheatcode for getFoundryVersionCall { impl Cheatcode for rpcUrlCall { fn apply(&self, state: &mut Cheatcodes) -> Result { let Self { rpcAlias } = self; - state.config.rpc_url(rpcAlias).map(|url| url.abi_encode()) + let url = state.config.rpc_endpoint(rpcAlias)?.url()?.abi_encode(); + Ok(url) } } diff --git a/crates/chisel/src/dispatcher.rs b/crates/chisel/src/dispatcher.rs index 2a6a2fc3f..a445e99e7 100644 --- a/crates/chisel/src/dispatcher.rs +++ b/crates/chisel/src/dispatcher.rs @@ -13,7 +13,7 @@ use crate::{ use alloy_json_abi::{InternalType, JsonAbi}; use alloy_primitives::{hex, Address}; use forge_fmt::FormatterConfig; -use foundry_config::{Config, RpcEndpoint}; +use foundry_config::{Config, RpcEndpointUrl}; use foundry_evm::{ decode::decode_console_logs, traces::{ @@ -357,9 +357,9 @@ impl ChiselDispatcher { { endpoint.clone() } else { - RpcEndpoint::Env(arg.to_string()).into() + RpcEndpointUrl::Env(arg.to_string()).into() }; - let fork_url = match endpoint.resolve() { + let fork_url = match endpoint.resolve().url() { Ok(fork_url) => fork_url, Err(e) => { return DispatchResult::CommandFailed(Self::make_error(format!( diff --git a/crates/common/src/provider/mod.rs b/crates/common/src/provider/mod.rs index 75efdb869..cd34f94e9 100644 --- a/crates/common/src/provider/mod.rs +++ b/crates/common/src/provider/mod.rs @@ -241,6 +241,12 @@ impl ProviderBuilder { self } + /// Sets http headers. If `None`, defaults to the already-set value. + pub fn maybe_headers(mut self, headers: Option<Vec<String>>) -> Self { + self.headers = headers.unwrap_or(self.headers); + self + } + /// Constructs the `RetryProvider` taking all configs into account. pub fn build(self) -> Result<RetryProvider> { let Self { diff --git a/crates/config/src/endpoints.rs b/crates/config/src/endpoints.rs index 78cda4f73..1758e6a48 100644 --- a/crates/config/src/endpoints.rs +++ b/crates/config/src/endpoints.rs @@ -12,7 +12,7 @@ use std::{ #[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize)] #[serde(transparent)] pub struct RpcEndpoints { - endpoints: BTreeMap<String, RpcEndpointConfig>, + endpoints: BTreeMap<String, RpcEndpoint>, } impl RpcEndpoints { @@ -24,9 +24,7 @@ impl RpcEndpoints { endpoints: endpoints .into_iter() .map(|(name, e)| match e.into() { - RpcEndpointType::String(url) => { - (name.into(), RpcEndpointConfig { endpoint: url, ..Default::default() }) - } + RpcEndpointType::String(url) => (name.into(), RpcEndpoint::new(url)), RpcEndpointType::Config(config) => (name.into(), config), }) .collect(), @@ -38,29 +36,16 @@ impl RpcEndpoints { self.endpoints.is_empty() } - /// Returns all (alias -> url) pairs + /// Returns all (alias -> rpc_endpoint) pairs pub fn resolved(self) -> ResolvedRpcEndpoints { ResolvedRpcEndpoints { - endpoints: self - .endpoints - .clone() - .into_iter() - .map(|(name, e)| (name, e.resolve())) - .collect(), - auths: self - .endpoints - .into_iter() - .map(|(name, e)| match e.auth { - Some(auth) => (name, auth.resolve().map(Some)), - None => (name, Ok(None)), - }) - .collect(), + endpoints: self.endpoints.into_iter().map(|(name, e)| (name, e.resolve())).collect(), } } } impl Deref for RpcEndpoints { - type Target = BTreeMap<String, RpcEndpointConfig>; + type Target = BTreeMap<String, RpcEndpoint>; fn deref(&self) -> &Self::Target { &self.endpoints @@ -72,14 +57,14 @@ impl Deref for RpcEndpoints { #[serde(untagged)] pub enum RpcEndpointType { /// Raw Endpoint url string - String(RpcEndpoint), + String(RpcEndpointUrl), /// Config object - Config(RpcEndpointConfig), + Config(RpcEndpoint), } impl RpcEndpointType { /// Returns the string variant - pub fn as_endpoint_string(&self) -> Option<&RpcEndpoint> { + pub fn as_endpoint_string(&self) -> Option<&RpcEndpointUrl> { match self { Self::String(url) => Some(url), Self::Config(_) => None, @@ -87,7 +72,7 @@ impl RpcEndpointType { } /// Returns the config variant - pub fn as_endpoint_config(&self) -> Option<&RpcEndpointConfig> { + pub fn as_endpoint_config(&self) -> Option<&RpcEndpoint> { match self { Self::Config(config) => Some(config), Self::String(_) => None, @@ -134,7 +119,7 @@ impl TryFrom<RpcEndpointType> for String { /// value of the env var itself. /// In other words, this type does not resolve env vars when it's being deserialized #[derive(Clone, Debug, PartialEq, Eq)] -pub enum RpcEndpoint { +pub enum RpcEndpointUrl { /// A raw Url (ws, http) Url(String), /// An endpoint that contains at least one `${ENV_VAR}` placeholder @@ -143,7 +128,7 @@ pub enum RpcEndpoint { Env(String), } -impl RpcEndpoint { +impl RpcEndpointUrl { /// Returns the url variant pub fn as_url(&self) -> Option<&str> { match self { @@ -173,7 +158,7 @@ impl RpcEndpoint { } } -impl fmt::Display for RpcEndpoint { +impl fmt::Display for RpcEndpointUrl { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Self::Url(url) => url.fmt(f), @@ -182,15 +167,15 @@ impl fmt::Display for RpcEndpoint { } } -impl TryFrom<RpcEndpoint> for String { +impl TryFrom<RpcEndpointUrl> for String { type Error = UnresolvedEnvVarError; - fn try_from(value: RpcEndpoint) -> Result<Self, Self::Error> { + fn try_from(value: RpcEndpointUrl) -> Result<Self, Self::Error> { value.resolve() } } -impl Serialize for RpcEndpoint { +impl Serialize for RpcEndpointUrl { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer, @@ -199,7 +184,7 @@ impl Serialize for RpcEndpoint { } } -impl<'de> Deserialize<'de> for RpcEndpoint { +impl<'de> Deserialize<'de> for RpcEndpointUrl { fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de>, @@ -211,14 +196,14 @@ impl<'de> Deserialize<'de> for RpcEndpoint { } } -impl From<RpcEndpoint> for RpcEndpointType { - fn from(endpoint: RpcEndpoint) -> Self { +impl From<RpcEndpointUrl> for RpcEndpointType { + fn from(endpoint: RpcEndpointUrl) -> Self { Self::String(endpoint) } } -impl From<RpcEndpoint> for RpcEndpointConfig { - fn from(endpoint: RpcEndpoint) -> Self { +impl From<RpcEndpointUrl> for RpcEndpoint { + fn from(endpoint: RpcEndpointUrl) -> Self { Self { endpoint, ..Default::default() } } } @@ -275,12 +260,9 @@ impl<'de> Deserialize<'de> for RpcAuth { } } -/// Rpc endpoint configuration variant -#[derive(Debug, Clone, PartialEq, Eq)] +// Rpc endpoint configuration +#[derive(Debug, Clone, Default, PartialEq, Eq)] pub struct RpcEndpointConfig { - /// endpoint url or env - pub endpoint: RpcEndpoint, - /// The number of retries. pub retries: Option<u32>, @@ -291,23 +273,11 @@ pub struct RpcEndpointConfig { /// /// See also <https://docs.alchemy.com/reference/compute-units#what-are-cups-compute-units-per-second> pub compute_units_per_second: Option<u64>, - - /// Token to be used as authentication - pub auth: Option<RpcAuth>, -} - -impl RpcEndpointConfig { - /// Returns the url this type holds, see [`RpcEndpoint::resolve`] - pub fn resolve(self) -> Result<String, UnresolvedEnvVarError> { - self.endpoint.resolve() - } } impl fmt::Display for RpcEndpointConfig { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let Self { endpoint, retries, retry_backoff, compute_units_per_second, auth } = self; - - write!(f, "{endpoint}")?; + let Self { retries, retry_backoff, compute_units_per_second } = self; if let Some(retries) = retries { write!(f, ", retries={retries}")?; @@ -321,38 +291,75 @@ impl fmt::Display for RpcEndpointConfig { write!(f, ", compute_units_per_second={compute_units_per_second}")?; } + Ok(()) + } +} + +/// Rpc endpoint configuration variant +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RpcEndpoint { + /// endpoint url or env + pub endpoint: RpcEndpointUrl, + + /// Token to be used as authentication + pub auth: Option<RpcAuth>, + + /// additional configuration + pub config: RpcEndpointConfig, +} + +impl RpcEndpoint { + pub fn new(endpoint: RpcEndpointUrl) -> Self { + Self { endpoint, ..Default::default() } + } + + /// Resolves environment variables in fields into their raw values + pub fn resolve(self) -> ResolvedRpcEndpoint { + ResolvedRpcEndpoint { + endpoint: self.endpoint.resolve(), + auth: self.auth.map(|auth| auth.resolve()), + config: self.config, + } + } +} + +impl fmt::Display for RpcEndpoint { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let Self { endpoint, auth, config } = self; + write!(f, "{endpoint}")?; + write!(f, "{config}")?; if let Some(auth) = auth { write!(f, ", auth={auth}")?; } - Ok(()) } } -impl Serialize for RpcEndpointConfig { +impl Serialize for RpcEndpoint { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer, { - if self.retries.is_none() && - self.retry_backoff.is_none() && - self.compute_units_per_second.is_none() + if self.config.retries.is_none() && + self.config.retry_backoff.is_none() && + self.config.compute_units_per_second.is_none() && + self.auth.is_none() { // serialize as endpoint if there's no additional config self.endpoint.serialize(serializer) } else { let mut map = serializer.serialize_map(Some(4))?; map.serialize_entry("endpoint", &self.endpoint)?; - map.serialize_entry("retries", &self.retries)?; - map.serialize_entry("retry_backoff", &self.retry_backoff)?; - map.serialize_entry("compute_units_per_second", &self.compute_units_per_second)?; + map.serialize_entry("retries", &self.config.retries)?; + map.serialize_entry("retry_backoff", &self.config.retry_backoff)?; + map.serialize_entry("compute_units_per_second", &self.config.compute_units_per_second)?; map.serialize_entry("auth", &self.auth)?; map.end() } } } -impl<'de> Deserialize<'de> for RpcEndpointConfig { +impl<'de> Deserialize<'de> for RpcEndpoint { fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de>, @@ -368,7 +375,7 @@ impl<'de> Deserialize<'de> for RpcEndpointConfig { #[derive(Deserialize)] struct RpcEndpointConfigInner { #[serde(alias = "url")] - endpoint: RpcEndpoint, + endpoint: RpcEndpointUrl, retries: Option<u32>, retry_backoff: Option<u64>, compute_units_per_second: Option<u64>, @@ -383,46 +390,81 @@ impl<'de> Deserialize<'de> for RpcEndpointConfig { auth, } = serde_json::from_value(value).map_err(serde::de::Error::custom)?; - Ok(Self { endpoint, retries, retry_backoff, compute_units_per_second, auth }) + Ok(Self { + endpoint, + auth, + config: RpcEndpointConfig { retries, retry_backoff, compute_units_per_second }, + }) } } -impl From<RpcEndpointConfig> for RpcEndpointType { - fn from(config: RpcEndpointConfig) -> Self { +impl From<RpcEndpoint> for RpcEndpointType { + fn from(config: RpcEndpoint) -> Self { Self::Config(config) } } -impl Default for RpcEndpointConfig { +impl Default for RpcEndpoint { fn default() -> Self { Self { - endpoint: RpcEndpoint::Url("http://localhost:8545".to_string()), - retries: None, - retry_backoff: None, - compute_units_per_second: None, + endpoint: RpcEndpointUrl::Url("http://localhost:8545".to_string()), + config: RpcEndpointConfig::default(), auth: None, } } } -/// Container type for _resolved_ endpoints, see [`RpcEndpoint::resolve`]. +/// Rpc endpoint with environment variables resolved to values, see [`RpcEndpoint::resolve`]. +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct ResolvedRpcEndpoint { + pub endpoint: Result<String, UnresolvedEnvVarError>, + pub auth: Option<Result<String, UnresolvedEnvVarError>>, + pub config: RpcEndpointConfig, +} + +impl ResolvedRpcEndpoint { + /// Returns the url this type holds, see [`RpcEndpoint::resolve`] + pub fn url(&self) -> Result<String, UnresolvedEnvVarError> { + self.endpoint.clone() + } + + // Returns true if all environment variables are resolved successfully + pub fn is_unresolved(&self) -> bool { + let endpoint_err = self.endpoint.is_err(); + let auth_err = self.auth.as_ref().map(|auth| auth.is_err()).unwrap_or(false); + endpoint_err || auth_err + } + + // Attempts to resolve unresolved environment variables into a new instance + pub fn try_resolve(mut self) -> Self { + if !self.is_unresolved() { + return self + } + if let Err(err) = self.endpoint { + self.endpoint = err.try_resolve() + } + if let Some(Err(err)) = self.auth { + self.auth = Some(err.try_resolve()) + } + self + } +} + +/// Container type for _resolved_ endpoints. #[derive(Clone, Debug, Default, PartialEq, Eq)] pub struct ResolvedRpcEndpoints { - /// contains all named endpoints and their URL or an error if we failed to resolve the env var - /// alias - endpoints: BTreeMap<String, Result<String, UnresolvedEnvVarError>>, - auths: BTreeMap<String, Result<Option<String>, UnresolvedEnvVarError>>, + endpoints: BTreeMap<String, ResolvedRpcEndpoint>, } impl ResolvedRpcEndpoints { /// Returns true if there's an endpoint that couldn't be resolved pub fn has_unresolved(&self) -> bool { - self.endpoints.values().any(|val| val.is_err()) + self.endpoints.values().any(|e| e.is_unresolved()) } } impl Deref for ResolvedRpcEndpoints { - type Target = BTreeMap<String, Result<String, UnresolvedEnvVarError>>; + type Target = BTreeMap<String, ResolvedRpcEndpoint>; fn deref(&self) -> &Self::Target { &self.endpoints @@ -448,27 +490,31 @@ mod tests { "compute_units_per_second": 100, "auth": "Bearer 123" }"#; - let config: RpcEndpointConfig = serde_json::from_str(s).unwrap(); + let config: RpcEndpoint = serde_json::from_str(s).unwrap(); assert_eq!( config, - RpcEndpointConfig { - endpoint: RpcEndpoint::Url("http://localhost:8545".to_string()), - retries: Some(5), - retry_backoff: Some(250), - compute_units_per_second: Some(100), + RpcEndpoint { + endpoint: RpcEndpointUrl::Url("http://localhost:8545".to_string()), + config: RpcEndpointConfig { + retries: Some(5), + retry_backoff: Some(250), + compute_units_per_second: Some(100), + }, auth: Some(RpcAuth::Raw("Bearer 123".to_string())), } ); let s = "\"http://localhost:8545\""; - let config: RpcEndpointConfig = serde_json::from_str(s).unwrap(); + let config: RpcEndpoint = serde_json::from_str(s).unwrap(); assert_eq!( config, - RpcEndpointConfig { - endpoint: RpcEndpoint::Url("http://localhost:8545".to_string()), - retries: None, - retry_backoff: None, - compute_units_per_second: None, + RpcEndpoint { + endpoint: RpcEndpointUrl::Url("http://localhost:8545".to_string()), + config: RpcEndpointConfig { + retries: None, + retry_backoff: None, + compute_units_per_second: None, + }, auth: None, } ); diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs index 7264b63f8..d31f2b96b 100644 --- a/crates/config/src/lib.rs +++ b/crates/config/src/lib.rs @@ -58,7 +58,9 @@ pub mod utils; pub use utils::*; mod endpoints; -pub use endpoints::{ResolvedRpcEndpoints, RpcEndpoint, RpcEndpoints}; +pub use endpoints::{ + ResolvedRpcEndpoint, ResolvedRpcEndpoints, RpcEndpoint, RpcEndpointUrl, RpcEndpoints, +}; mod etherscan; use etherscan::{ @@ -1309,7 +1311,7 @@ impl Config { ) -> Option<Result<Cow<'_, str>, UnresolvedEnvVarError>> { let mut endpoints = self.rpc_endpoints.clone().resolved(); if let Some(endpoint) = endpoints.remove(maybe_alias) { - return Some(endpoint.map(Cow::Owned)); + return Some(endpoint.url().map(Cow::Owned)); } if let Ok(Some(endpoint)) = mesc::get_endpoint_by_query(maybe_alias, Some("foundry")) { @@ -2547,10 +2549,10 @@ mod tests { use super::*; use crate::{ cache::{CachedChains, CachedEndpoints}, - endpoints::{RpcEndpointConfig, RpcEndpointType}, + endpoints::{RpcEndpoint, RpcEndpointType}, etherscan::ResolvedEtherscanConfigs, }; - use endpoints::RpcAuth; + use endpoints::{RpcAuth, RpcEndpointConfig}; use figment::error::Kind::InvalidType; use foundry_compilers::artifacts::{ vyper::VyperOptimizationMode, ModelCheckerEngine, YulDetails, @@ -3220,17 +3222,19 @@ mod tests { RpcEndpoints::new([ ( "optimism", - RpcEndpointType::String(RpcEndpoint::Url( + RpcEndpointType::String(RpcEndpointUrl::Url( "https://example.com/".to_string() )) ), ( "mainnet", - RpcEndpointType::Config(RpcEndpointConfig { - endpoint: RpcEndpoint::Env("${_CONFIG_MAINNET}".to_string()), - retries: Some(3), - retry_backoff: Some(1000), - compute_units_per_second: Some(1000), + RpcEndpointType::Config(RpcEndpoint { + endpoint: RpcEndpointUrl::Env("${_CONFIG_MAINNET}".to_string()), + config: RpcEndpointConfig { + retries: Some(3), + retry_backoff: Some(1000), + compute_units_per_second: Some(1000), + }, auth: None, }) ), @@ -3241,10 +3245,23 @@ mod tests { let resolved = config.rpc_endpoints.resolved(); assert_eq!( RpcEndpoints::new([ - ("optimism", RpcEndpoint::Url("https://example.com/".to_string())), + ( + "optimism", + RpcEndpointType::String(RpcEndpointUrl::Url( + "https://example.com/".to_string() + )) + ), ( "mainnet", - RpcEndpoint::Url("https://eth-mainnet.alchemyapi.io/v2/123455".to_string()) + RpcEndpointType::Config(RpcEndpoint { + endpoint: RpcEndpointUrl::Env("${_CONFIG_MAINNET}".to_string()), + config: RpcEndpointConfig { + retries: Some(3), + retry_backoff: Some(1000), + compute_units_per_second: Some(1000), + }, + auth: None, + }) ), ]) .resolved(), @@ -3277,17 +3294,19 @@ mod tests { RpcEndpoints::new([ ( "optimism", - RpcEndpointType::String(RpcEndpoint::Url( + RpcEndpointType::String(RpcEndpointUrl::Url( "https://example.com/".to_string() )) ), ( "mainnet", - RpcEndpointType::Config(RpcEndpointConfig { - endpoint: RpcEndpoint::Env("${_CONFIG_MAINNET}".to_string()), - retries: Some(3), - retry_backoff: Some(1000), - compute_units_per_second: Some(1000), + RpcEndpointType::Config(RpcEndpoint { + endpoint: RpcEndpointUrl::Env("${_CONFIG_MAINNET}".to_string()), + config: RpcEndpointConfig { + retries: Some(3), + retry_backoff: Some(1000), + compute_units_per_second: Some(1000) + }, auth: Some(RpcAuth::Env("Bearer ${_CONFIG_AUTH}".to_string())), }) ), @@ -3299,19 +3318,21 @@ mod tests { RpcEndpoints::new([ ( "optimism", - RpcEndpointType::String(RpcEndpoint::Url( + RpcEndpointType::String(RpcEndpointUrl::Url( "https://example.com/".to_string() )) ), ( "mainnet", - RpcEndpointType::Config(RpcEndpointConfig { - endpoint: RpcEndpoint::Url( + RpcEndpointType::Config(RpcEndpoint { + endpoint: RpcEndpointUrl::Url( "https://eth-mainnet.alchemyapi.io/v2/123455".to_string() ), - retries: Some(3), - retry_backoff: Some(1000), - compute_units_per_second: Some(1000), + config: RpcEndpointConfig { + retries: Some(3), + retry_backoff: Some(1000), + compute_units_per_second: Some(1000) + }, auth: Some(RpcAuth::Raw("Bearer 123456".to_string())), }) ), @@ -3357,18 +3378,22 @@ mod tests { assert_eq!( endpoints, RpcEndpoints::new([ - ("optimism", RpcEndpoint::Url("https://example.com/".to_string())), + ("optimism", RpcEndpointUrl::Url("https://example.com/".to_string())), ( "mainnet", - RpcEndpoint::Url("https://eth-mainnet.alchemyapi.io/v2/123455".to_string()) + RpcEndpointUrl::Url( + "https://eth-mainnet.alchemyapi.io/v2/123455".to_string() + ) ), ( "mainnet_2", - RpcEndpoint::Url("https://eth-mainnet.alchemyapi.io/v2/123456".to_string()) + RpcEndpointUrl::Url( + "https://eth-mainnet.alchemyapi.io/v2/123456".to_string() + ) ), ( "mainnet_3", - RpcEndpoint::Url( + RpcEndpointUrl::Url( "https://eth-mainnet.alchemyapi.io/v2/123456/98765".to_string() ) ), @@ -3544,17 +3569,17 @@ mod tests { revert_strings: Some(RevertStrings::Strip), allow_paths: vec![PathBuf::from("allow"), PathBuf::from("paths")], rpc_endpoints: RpcEndpoints::new([ - ("optimism", RpcEndpoint::Url("https://example.com/".to_string())), - ("mainnet", RpcEndpoint::Env("${RPC_MAINNET}".to_string())), + ("optimism", RpcEndpointUrl::Url("https://example.com/".to_string())), + ("mainnet", RpcEndpointUrl::Env("${RPC_MAINNET}".to_string())), ( "mainnet_2", - RpcEndpoint::Env( + RpcEndpointUrl::Env( "https://eth-mainnet.alchemyapi.io/v2/${API_KEY}".to_string() ) ), ( "mainnet_3", - RpcEndpoint::Env( + RpcEndpointUrl::Env( "https://eth-mainnet.alchemyapi.io/v2/${API_KEY}/${ANOTHER_KEY}" .to_string() ) @@ -3678,11 +3703,11 @@ mod tests { assert_eq!( config.rpc_endpoints, RpcEndpoints::new([ - ("optimism", RpcEndpoint::Url("https://example.com/".to_string())), - ("mainnet", RpcEndpoint::Env("${RPC_MAINNET}".to_string())), + ("optimism", RpcEndpointUrl::Url("https://example.com/".to_string())), + ("mainnet", RpcEndpointUrl::Env("${RPC_MAINNET}".to_string())), ( "mainnet_2", - RpcEndpoint::Env( + RpcEndpointUrl::Env( "https://eth-mainnet.alchemyapi.io/v2/${API_KEY}".to_string() ) ), diff --git a/crates/evm/core/src/fork/multi.rs b/crates/evm/core/src/fork/multi.rs index 112e1eeda..490ae7379 100644 --- a/crates/evm/core/src/fork/multi.rs +++ b/crates/evm/core/src/fork/multi.rs @@ -514,6 +514,7 @@ async fn create_fork(mut fork: CreateFork) -> eyre::Result<(ForkId, CreatedFork, ProviderBuilder::new(fork.url.as_str()) .maybe_max_retry(fork.evm_opts.fork_retries) .maybe_initial_backoff(fork.evm_opts.fork_retry_backoff) + .maybe_headers(fork.evm_opts.fork_headers.clone()) .compute_units_per_second(fork.evm_opts.get_compute_units_per_second()) .build()?, ); diff --git a/crates/evm/core/src/opts.rs b/crates/evm/core/src/opts.rs index 76be5937b..4c13369b6 100644 --- a/crates/evm/core/src/opts.rs +++ b/crates/evm/core/src/opts.rs @@ -29,6 +29,9 @@ pub struct EvmOpts { /// Initial retry backoff. pub fork_retry_backoff: Option<u64>, + /// Headers to use with `fork_url` + pub fork_headers: Option<Vec<String>>, + /// The available compute units per second. /// /// See also <https://docs.alchemy.com/reference/compute-units#what-are-cups-compute-units-per-second> @@ -80,6 +83,7 @@ impl Default for EvmOpts { fork_block_number: None, fork_retries: None, fork_retry_backoff: None, + fork_headers: None, compute_units_per_second: None, no_rpc_rate_limit: false, no_storage_caching: false, diff --git a/crates/forge/tests/it/test_helpers.rs b/crates/forge/tests/it/test_helpers.rs index af957ccdc..3dd38a418 100644 --- a/crates/forge/tests/it/test_helpers.rs +++ b/crates/forge/tests/it/test_helpers.rs @@ -11,7 +11,7 @@ use foundry_compilers::{ }; use foundry_config::{ fs_permissions::PathPermission, Config, FsPermissions, FuzzConfig, FuzzDictionaryConfig, - InvariantConfig, RpcEndpoint, RpcEndpoints, + InvariantConfig, RpcEndpointUrl, RpcEndpoints, }; use foundry_evm::{constants::CALLER, opts::EvmOpts}; use foundry_test_utils::{fd_lock, init_tracing, rpc::next_rpc_endpoint}; @@ -339,15 +339,15 @@ pub fn manifest_root() -> &'static Path { /// the RPC endpoints used during tests pub fn rpc_endpoints() -> RpcEndpoints { RpcEndpoints::new([ - ("mainnet", RpcEndpoint::Url(next_rpc_endpoint(NamedChain::Mainnet))), - ("mainnet2", RpcEndpoint::Url(next_rpc_endpoint(NamedChain::Mainnet))), - ("sepolia", RpcEndpoint::Url(next_rpc_endpoint(NamedChain::Sepolia))), - ("optimism", RpcEndpoint::Url(next_rpc_endpoint(NamedChain::Optimism))), - ("arbitrum", RpcEndpoint::Url(next_rpc_endpoint(NamedChain::Arbitrum))), - ("polygon", RpcEndpoint::Url(next_rpc_endpoint(NamedChain::Polygon))), - ("avaxTestnet", RpcEndpoint::Url("https://api.avax-test.network/ext/bc/C/rpc".into())), - ("moonbeam", RpcEndpoint::Url("https://moonbeam-rpc.publicnode.com".into())), - ("rpcEnvAlias", RpcEndpoint::Env("${RPC_ENV_ALIAS}".into())), + ("mainnet", RpcEndpointUrl::Url(next_rpc_endpoint(NamedChain::Mainnet))), + ("mainnet2", RpcEndpointUrl::Url(next_rpc_endpoint(NamedChain::Mainnet))), + ("sepolia", RpcEndpointUrl::Url(next_rpc_endpoint(NamedChain::Sepolia))), + ("optimism", RpcEndpointUrl::Url(next_rpc_endpoint(NamedChain::Optimism))), + ("arbitrum", RpcEndpointUrl::Url(next_rpc_endpoint(NamedChain::Arbitrum))), + ("polygon", RpcEndpointUrl::Url(next_rpc_endpoint(NamedChain::Polygon))), + ("avaxTestnet", RpcEndpointUrl::Url("https://api.avax-test.network/ext/bc/C/rpc".into())), + ("moonbeam", RpcEndpointUrl::Url("https://moonbeam-rpc.publicnode.com".into())), + ("rpcEnvAlias", RpcEndpointUrl::Env("${RPC_ENV_ALIAS}".into())), ]) } From 206dab285437bd6889463ab006b6a5fb984079d8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 15 Dec 2024 03:56:54 +0000 Subject: [PATCH 09/45] chore(deps): weekly `cargo update` (#9560) --- Cargo.lock | 236 ++++++++++++++++++++++++++--------------------------- 1 file changed, 115 insertions(+), 121 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7b650cec7..f58e16894 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -134,7 +134,7 @@ dependencies = [ "alloy-transport", "futures", "futures-util", - "thiserror 2.0.6", + "thiserror 2.0.7", ] [[package]] @@ -238,7 +238,7 @@ dependencies = [ "alloy-sol-types", "serde", "serde_json", - "thiserror 2.0.6", + "thiserror 2.0.7", "tracing", ] @@ -264,7 +264,7 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror 2.0.6", + "thiserror 2.0.7", ] [[package]] @@ -292,7 +292,7 @@ dependencies = [ "rand", "serde_json", "tempfile", - "thiserror 2.0.6", + "thiserror 2.0.7", "tracing", "url", ] @@ -365,7 +365,7 @@ dependencies = [ "schnellru", "serde", "serde_json", - "thiserror 2.0.6", + "thiserror 2.0.7", "tokio", "tracing", "url", @@ -387,7 +387,7 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", - "tower 0.5.1", + "tower 0.5.2", "tracing", ] @@ -433,7 +433,7 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", - "tower 0.5.1", + "tower 0.5.2", "tracing", "url", "wasmtimer", @@ -537,7 +537,7 @@ dependencies = [ "alloy-serde", "serde", "serde_json", - "thiserror 2.0.6", + "thiserror 2.0.7", ] [[package]] @@ -576,7 +576,7 @@ dependencies = [ "auto_impl", "elliptic-curve", "k256", - "thiserror 2.0.6", + "thiserror 2.0.7", ] [[package]] @@ -593,7 +593,7 @@ dependencies = [ "aws-sdk-kms", "k256", "spki", - "thiserror 2.0.6", + "thiserror 2.0.7", "tracing", ] @@ -611,7 +611,7 @@ dependencies = [ "gcloud-sdk", "k256", "spki", - "thiserror 2.0.6", + "thiserror 2.0.7", "tracing", ] @@ -630,8 +630,8 @@ dependencies = [ "async-trait", "coins-ledger", "futures-util", - "semver 1.0.23", - "thiserror 2.0.6", + "semver 1.0.24", + "thiserror 2.0.7", "tracing", ] @@ -651,7 +651,7 @@ dependencies = [ "eth-keystore", "k256", "rand", - "thiserror 2.0.6", + "thiserror 2.0.7", ] [[package]] @@ -665,8 +665,8 @@ dependencies = [ "alloy-primitives", "alloy-signer", "async-trait", - "semver 1.0.23", - "thiserror 2.0.6", + "semver 1.0.24", + "thiserror 2.0.7", "tracing", "trezor-client", ] @@ -756,9 +756,9 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror 2.0.6", + "thiserror 2.0.7", "tokio", - "tower 0.5.1", + "tower 0.5.2", "tracing", "url", "wasmtimer", @@ -774,7 +774,7 @@ dependencies = [ "alloy-transport", "reqwest", "serde_json", - "tower 0.5.1", + "tower 0.5.2", "tracing", "url", ] @@ -810,7 +810,7 @@ dependencies = [ "alloy-transport", "futures", "http 1.2.0", - "rustls 0.23.19", + "rustls 0.23.20", "serde_json", "tokio", "tokio-tungstenite", @@ -981,7 +981,7 @@ dependencies = [ "serde_repr", "similar-asserts", "tempfile", - "thiserror 2.0.6", + "thiserror 2.0.7", "tikv-jemallocator", "tokio", "tower 0.4.13", @@ -1012,7 +1012,7 @@ dependencies = [ "revm", "serde", "serde_json", - "thiserror 2.0.6", + "thiserror 2.0.7", ] [[package]] @@ -1038,7 +1038,7 @@ dependencies = [ "pin-project 1.1.7", "serde", "serde_json", - "thiserror 2.0.6", + "thiserror 2.0.7", "tokio-util", "tower-http", "tracing", @@ -1692,10 +1692,10 @@ dependencies = [ "serde_path_to_error", "serde_urlencoded", "sha1", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tokio-tungstenite", - "tower 0.5.1", + "tower 0.5.2", "tower-layer", "tower-service", "tracing", @@ -1716,7 +1716,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 1.0.2", + "sync_wrapper", "tower-layer", "tower-service", "tracing", @@ -1885,9 +1885,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" +checksum = "786a307d683a5bf92e6fd5fd69a7eb613751668d1d8d67d802846dfe367c62c8" dependencies = [ "memchr", "regex-automata 0.4.9", @@ -2005,7 +2005,7 @@ checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "thiserror 1.0.69", @@ -2065,7 +2065,7 @@ dependencies = [ "rayon", "regex", "rpassword", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "tempfile", @@ -2087,9 +2087,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.3" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d" +checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf" dependencies = [ "shlex", ] @@ -2134,7 +2134,7 @@ dependencies = [ "reqwest", "revm", "rustyline", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "serial_test", @@ -3484,7 +3484,7 @@ dependencies = [ "regex", "reqwest", "revm-inspectors", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "similar", @@ -3496,7 +3496,7 @@ dependencies = [ "strum", "svm-rs", "tempfile", - "thiserror 2.0.6", + "thiserror 2.0.7", "tikv-jemallocator", "tokio", "toml 0.8.19", @@ -3529,7 +3529,7 @@ dependencies = [ "serde", "serde_json", "solang-parser", - "thiserror 2.0.6", + "thiserror 2.0.7", "toml 0.8.19", "tracing", ] @@ -3544,7 +3544,7 @@ dependencies = [ "itertools 0.13.0", "similar-asserts", "solang-parser", - "thiserror 2.0.6", + "thiserror 2.0.7", "toml 0.8.19", "tracing", "tracing-subscriber", @@ -3586,7 +3586,7 @@ dependencies = [ "itertools 0.13.0", "parking_lot", "revm-inspectors", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "tempfile", @@ -3654,7 +3654,7 @@ dependencies = [ "regex", "reqwest", "revm-primitives", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "tempfile", @@ -3683,7 +3683,7 @@ dependencies = [ "alloy-primitives", "foundry-compilers", "reqwest", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "thiserror 1.0.69", @@ -3729,10 +3729,10 @@ dependencies = [ "rand", "revm", "revm-inspectors", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", - "thiserror 2.0.6", + "thiserror 2.0.7", "toml 0.8.19", "tracing", "vergen", @@ -3826,12 +3826,12 @@ dependencies = [ "itertools 0.13.0", "num-format", "reqwest", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "similar-asserts", "terminal_size", - "thiserror 2.0.6", + "thiserror 2.0.7", "tokio", "tower 0.4.13", "tracing", @@ -3882,7 +3882,7 @@ dependencies = [ "path-slash", "rand", "rayon", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "sha2", @@ -3890,7 +3890,7 @@ dependencies = [ "svm-rs", "svm-rs-builds", "tempfile", - "thiserror 2.0.6", + "thiserror 2.0.7", "tokio", "tracing", "winnow", @@ -3920,11 +3920,11 @@ dependencies = [ "md-5", "path-slash", "rayon", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "serde_repr", - "thiserror 2.0.6", + "thiserror 2.0.7", "tokio", "tracing", "walkdir", @@ -3942,7 +3942,7 @@ dependencies = [ "foundry-compilers-artifacts-solc", "foundry-compilers-core", "path-slash", - "semver 1.0.23", + "semver 1.0.24", "serde", ] @@ -3958,12 +3958,12 @@ dependencies = [ "fs_extra", "path-slash", "regex", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "svm-rs", "tempfile", - "thiserror 2.0.6", + "thiserror 2.0.7", "tokio", "walkdir", ] @@ -3990,14 +3990,14 @@ dependencies = [ "regex", "reqwest", "revm-primitives", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "serde_regex", "similar-asserts", "solang-parser", "tempfile", - "thiserror 2.0.6", + "thiserror 2.0.7", "toml 0.8.19", "toml_edit", "tracing", @@ -4046,7 +4046,7 @@ dependencies = [ "revm", "revm-inspectors", "serde", - "thiserror 2.0.6", + "thiserror 2.0.7", "tracing", ] @@ -4092,7 +4092,7 @@ dependencies = [ "revm-inspectors", "serde", "serde_json", - "thiserror 2.0.6", + "thiserror 2.0.7", "tokio", "tracing", "url", @@ -4109,7 +4109,7 @@ dependencies = [ "foundry-evm-core", "rayon", "revm", - "semver 1.0.23", + "semver 1.0.24", "tracing", ] @@ -4135,7 +4135,7 @@ dependencies = [ "rand", "revm", "serde", - "thiserror 2.0.6", + "thiserror 2.0.7", "tracing", ] @@ -4185,7 +4185,7 @@ dependencies = [ "revm", "serde", "serde_json", - "thiserror 2.0.6", + "thiserror 2.0.7", "tokio", "tracing", "url", @@ -4197,8 +4197,8 @@ version = "0.2.0" dependencies = [ "alloy-primitives", "foundry-compilers", - "semver 1.0.23", - "thiserror 2.0.6", + "semver 1.0.24", + "thiserror 2.0.7", ] [[package]] @@ -4260,7 +4260,7 @@ dependencies = [ "gcloud-sdk", "rpassword", "serde", - "thiserror 2.0.6", + "thiserror 2.0.7", "tokio", "tracing", ] @@ -4428,7 +4428,7 @@ dependencies = [ "serde_json", "tokio", "tonic", - "tower 0.5.1", + "tower 0.5.2", "tower-layer", "tower-util", "tracing", @@ -4523,7 +4523,7 @@ dependencies = [ "bstr", "gix-path", "libc", - "thiserror 2.0.6", + "thiserror 2.0.7", ] [[package]] @@ -4535,7 +4535,7 @@ dependencies = [ "bstr", "itoa", "jiff", - "thiserror 2.0.6", + "thiserror 2.0.7", ] [[package]] @@ -4626,7 +4626,7 @@ dependencies = [ "gix-trace", "home", "once_cell", - "thiserror 2.0.6", + "thiserror 2.0.7", ] [[package]] @@ -4698,7 +4698,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd520d09f9f585b34b32aba1d0b36ada89ab7fefb54a8ca3fe37fc482a750937" dependencies = [ "bstr", - "thiserror 2.0.6", + "thiserror 2.0.7", ] [[package]] @@ -5066,7 +5066,7 @@ dependencies = [ "http 1.2.0", "hyper 1.5.1", "hyper-util", - "rustls 0.23.19", + "rustls 0.23.20", "rustls-native-certs 0.8.1", "rustls-pki-types", "tokio", @@ -6369,9 +6369,9 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "op-alloy-consensus" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d95d0ec6457ad4d3d7fc0ad41db490b219587ed837ada87a26b28e535db15f" +checksum = "848b3567a9a469ab0c9c712fca0fd6bbce13a9a0b723c94cb81214f53507cf07" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6380,14 +6380,14 @@ dependencies = [ "alloy-serde", "derive_more", "serde", - "thiserror 2.0.6", + "thiserror 2.0.7", ] [[package]] name = "op-alloy-rpc-types" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba1b44e2035ec04cc61762cb9b5457d0ecd29d9af631e1a1c107ef571ce2318" +checksum = "8a555dd1bd39cbcdd60b92f03a21871767a16e3a2ce2f82a26cff9aade56d35f" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6659,7 +6659,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 2.0.6", + "thiserror 2.0.7", "ucd-trie", ] @@ -7178,7 +7178,7 @@ dependencies = [ "newtype-uuid", "quick-xml 0.37.1", "strip-ansi-escapes", - "thiserror 2.0.6", + "thiserror 2.0.7", "uuid 1.11.0", ] @@ -7211,9 +7211,9 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.19", + "rustls 0.23.20", "socket2", - "thiserror 2.0.6", + "thiserror 2.0.7", "tokio", "tracing", ] @@ -7229,10 +7229,10 @@ dependencies = [ "rand", "ring", "rustc-hash", - "rustls 0.23.19", + "rustls 0.23.20", "rustls-pki-types", "slab", - "thiserror 2.0.6", + "thiserror 2.0.7", "tinyvec", "tracing", "web-time", @@ -7366,9 +7366,9 @@ checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags 2.6.0", ] @@ -7463,14 +7463,14 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.19", + "rustls 0.23.20", "rustls-native-certs 0.8.1", "rustls-pemfile 2.2.0", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.2", + "sync_wrapper", "tokio", "tokio-native-tls", "tokio-rustls 0.26.1", @@ -7516,7 +7516,7 @@ dependencies = [ "revm", "serde", "serde_json", - "thiserror 2.0.6", + "thiserror 2.0.7", ] [[package]] @@ -7732,7 +7732,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.23", + "semver 1.0.24", ] [[package]] @@ -7762,9 +7762,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.19" +version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ "log", "once_cell", @@ -7819,9 +7819,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" dependencies = [ "web-time", ] @@ -8131,9 +8131,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" dependencies = [ "serde", ] @@ -8155,18 +8155,18 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", @@ -8511,7 +8511,7 @@ dependencies = [ "either", "num-bigint", "num-rational", - "semver 1.0.23", + "semver 1.0.24", "solar-data-structures", "solar-interface", "solar-macros", @@ -8637,11 +8637,11 @@ dependencies = [ "regex", "reqwest", "sanitize-filename", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "sha2", - "thiserror 2.0.6", + "thiserror 2.0.7", "tokio", "toml_edit", "uuid 1.11.0", @@ -8775,7 +8775,7 @@ dependencies = [ "dirs 5.0.1", "fs4", "reqwest", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "sha2", @@ -8793,7 +8793,7 @@ checksum = "f2fa0f145894cb4d1c14446f08098ee5f21fc37ccbd1a7dd9dd355bbc806de3b" dependencies = [ "build_const", "const-hex", - "semver 1.0.23", + "semver 1.0.24", "serde_json", "svm-rs", ] @@ -8832,12 +8832,6 @@ dependencies = [ "syn 2.0.90", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" version = "1.0.2" @@ -8950,11 +8944,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.6" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec2a1820ebd077e2b90c4df007bebf344cd394098a13c563957d0afc83ea47" +checksum = "93605438cbd668185516ab499d589afb7ee1859ea3d5fc8f6b0755e1c7443767" dependencies = [ - "thiserror-impl 2.0.6", + "thiserror-impl 2.0.7", ] [[package]] @@ -8970,9 +8964,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.6" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d65750cab40f4ff1929fb1ba509e9914eb756131cef4210da8d5d700d26f6312" +checksum = "e1d8749b4531af2117677a5fcd12b1348a3fe2b81e36e61ffeac5c4aa3273e36" dependencies = [ "proc-macro2", "quote", @@ -9140,7 +9134,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls 0.23.19", + "rustls 0.23.20", "tokio", ] @@ -9176,7 +9170,7 @@ checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" dependencies = [ "futures-util", "log", - "rustls 0.23.19", + "rustls 0.23.20", "rustls-pki-types", "tokio", "tokio-rustls 0.26.1", @@ -9302,14 +9296,14 @@ dependencies = [ [[package]] name = "tower" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper 0.1.2", + "sync_wrapper", "tokio", "tower-layer", "tower-service", @@ -9450,9 +9444,9 @@ dependencies = [ [[package]] name = "tracy-client" -version = "0.17.5" +version = "0.17.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e295eae54124872df35720dc3a5b1e827c7deee352b342ec7f7e626d0d0ef3" +checksum = "73202d787346a5418f8222eddb5a00f29ea47caf3c7d38a8f2f69f8455fa7c7e" dependencies = [ "loom", "once_cell", @@ -9461,9 +9455,9 @@ dependencies = [ [[package]] name = "tracy-client-sys" -version = "0.24.2" +version = "0.24.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3637e734239e12ab152cd269302500bd063f37624ee210cd04b4936ed671f3b1" +checksum = "69fff37da548239c3bf9e64a12193d261e8b22b660991c6fd2df057c168f435f" dependencies = [ "cc", "windows-targets 0.52.6", @@ -9502,7 +9496,7 @@ dependencies = [ "httparse", "log", "rand", - "rustls 0.23.19", + "rustls 0.23.20", "rustls-pki-types", "sha1", "thiserror 1.0.69", @@ -10491,7 +10485,7 @@ dependencies = [ "flate2", "indexmap 2.7.0", "memchr", - "thiserror 2.0.6", + "thiserror 2.0.7", "zopfli", ] From 681bddd631fc736129a358b6e59621b49f9af995 Mon Sep 17 00:00:00 2001 From: W <public_double_v@protonmail.com> Date: Tue, 17 Dec 2024 13:12:42 +0100 Subject: [PATCH 10/45] feat(cast): add support for beacon proxies in cast impl (#9567) * feat(cast): add support for beacon proxies in cast impl * test: pin test to current block --- crates/cast/bin/args.rs | 13 +++++++++--- crates/cast/bin/main.rs | 4 ++-- crates/cast/src/lib.rs | 27 +++++++++++++++++++---- crates/cast/tests/cli/main.rs | 40 +++++++++++++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 9 deletions(-) diff --git a/crates/cast/bin/args.rs b/crates/cast/bin/args.rs index 47bf9a884..d9c86e901 100644 --- a/crates/cast/bin/args.rs +++ b/crates/cast/bin/args.rs @@ -606,7 +606,8 @@ pub enum CastSubcommand { formula_id: String, }, - /// Fetch the EIP-1967 implementation account + /// Fetch the EIP-1967 implementation for a contract + /// Can read from the implementation slot or the beacon slot. #[command(visible_alias = "impl")] Implementation { /// The block height to query at. @@ -615,7 +616,13 @@ pub enum CastSubcommand { #[arg(long, short = 'B')] block: Option<BlockId>, - /// The address to get the nonce for. + /// Fetch the implementation from the beacon slot. + /// + /// If not specified, the implementation slot is used. + #[arg(long)] + beacon: bool, + + /// The address for which the implementation will be fetched. #[arg(value_parser = NameOrAddress::from_str)] who: NameOrAddress, @@ -632,7 +639,7 @@ pub enum CastSubcommand { #[arg(long, short = 'B')] block: Option<BlockId>, - /// The address to get the nonce for. + /// The address from which the admin account will be fetched. #[arg(value_parser = NameOrAddress::from_str)] who: NameOrAddress, diff --git a/crates/cast/bin/main.rs b/crates/cast/bin/main.rs index 01bab16ac..0d2de2400 100644 --- a/crates/cast/bin/main.rs +++ b/crates/cast/bin/main.rs @@ -425,11 +425,11 @@ async fn main_args(args: CastArgs) -> Result<()> { let id = stdin::unwrap_line(id)?; sh_println!("{}", foundry_common::erc7201(&id))?; } - CastSubcommand::Implementation { block, who, rpc } => { + CastSubcommand::Implementation { block, beacon, who, rpc } => { let config = Config::from(&rpc); let provider = utils::get_provider(&config)?; let who = who.resolve(&provider).await?; - sh_println!("{}", Cast::new(provider).implementation(who, block).await?)?; + sh_println!("{}", Cast::new(provider).implementation(who, beacon, block).await?)?; } CastSubcommand::Admin { block, who, rpc } => { let config = Config::from(&rpc); diff --git a/crates/cast/src/lib.rs b/crates/cast/src/lib.rs index 01d7da6ef..72083b1f0 100644 --- a/crates/cast/src/lib.rs +++ b/crates/cast/src/lib.rs @@ -571,14 +571,33 @@ where /// ProviderBuilder::<_, _, AnyNetwork>::default().on_builtin("http://localhost:8545").await?; /// let cast = Cast::new(provider); /// let addr = Address::from_str("0x7eD52863829AB99354F3a0503A622e82AcD5F7d3")?; - /// let implementation = cast.implementation(addr, None).await?; + /// let implementation = cast.implementation(addr, false, None).await?; /// println!("{}", implementation); /// # Ok(()) /// # } /// ``` - pub async fn implementation(&self, who: Address, block: Option<BlockId>) -> Result<String> { - let slot = - B256::from_str("0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc")?; + pub async fn implementation( + &self, + who: Address, + is_beacon: bool, + block: Option<BlockId>, + ) -> Result<String> { + let slot = match is_beacon { + true => { + // Use the beacon slot : bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1) + B256::from_str( + "0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50", + )? + } + false => { + // Use the implementation slot : + // bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1) + B256::from_str( + "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc", + )? + } + }; + let value = self .provider .get_storage_at(who, slot.into()) diff --git a/crates/cast/tests/cli/main.rs b/crates/cast/tests/cli/main.rs index df9842722..3c3096a36 100644 --- a/crates/cast/tests/cli/main.rs +++ b/crates/cast/tests/cli/main.rs @@ -627,6 +627,46 @@ casttest!(rlp, |_prj, cmd| { "#]]); }); +// test that `cast impl` works correctly for both the implementation slot and the beacon slot +casttest!(impl_slot, |_prj, cmd| { + let eth_rpc_url = next_http_rpc_endpoint(); + + // Call `cast impl` for the implementation slot (AAVE Proxy) + cmd.args([ + "impl", + "0x4965f6FA20fE9728deCf5165016fc338a5a85aBF", + "--rpc-url", + eth_rpc_url.as_str(), + "--block", + "21422087", + ]) + .assert_success() + .stdout_eq(str![[r#" +0xb61306c8eb34a2104d9eb8d84f1bb1001067fa4b + +"#]]); +}); + +casttest!(impl_slot_beacon, |_prj, cmd| { + let eth_rpc_url = next_http_rpc_endpoint(); + + // Call `cast impl` for the beacon slot + cmd.args([ + "impl", + "0xc63d9f0040d35f328274312fc8771a986fc4ba86", + "--beacon", + "--rpc-url", + eth_rpc_url.as_str(), + "--block", + "21422087", + ]) + .assert_success() + .stdout_eq(str![[r#" +0xa748ae65ba11606492a9c57effa0d4b7be551ec2 + +"#]]); +}); + // test for cast_rpc without arguments casttest!(rpc_no_args, |_prj, cmd| { let eth_rpc_url = next_http_rpc_endpoint(); From 6b07c77eb1c1d1c4b56ffa7f79240254b73236d2 Mon Sep 17 00:00:00 2001 From: Yash Atreya <44857776+yash-atreya@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:26:19 +0200 Subject: [PATCH 11/45] feat(`cheatcodes`): count assertion for `expectEmit` (#9405) * introduce ExpectEmitTracker * cheats * account for emit accounts + simple testNoEmit * tests: expectCountEmits from specific address * fix * failure tests * fix * fix: account for log data * LogCountMap * fix * nit * test * fix * fix * fix: instantiate log count map in tracker only if log satisfies the checks * nit * nit * nits * doc nits * helper fn * nit * nits * fix * fix * nit * refactor count tests * fix * fix * fix --- crates/cheatcodes/assets/cheatcodes.json | 80 ++++++++ crates/cheatcodes/spec/src/vm.rs | 17 ++ crates/cheatcodes/src/inspector.rs | 63 +++++-- crates/cheatcodes/src/test/expect.rs | 230 +++++++++++++++++++---- testdata/cheats/Vm.sol | 4 + testdata/default/cheats/ExpectEmit.t.sol | 85 +++++++++ 6 files changed, 435 insertions(+), 44 deletions(-) diff --git a/crates/cheatcodes/assets/cheatcodes.json b/crates/cheatcodes/assets/cheatcodes.json index 82a7de2aa..d3a47288f 100644 --- a/crates/cheatcodes/assets/cheatcodes.json +++ b/crates/cheatcodes/assets/cheatcodes.json @@ -4971,6 +4971,86 @@ "status": "stable", "safety": "unsafe" }, + { + "func": { + "id": "expectEmit_4", + "description": "Expect a given number of logs with the provided topics.", + "declaration": "function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, uint64 count) external;", + "visibility": "external", + "mutability": "", + "signature": "expectEmit(bool,bool,bool,bool,uint64)", + "selector": "0x5e1d1c33", + "selectorBytes": [ + 94, + 29, + 28, + 51 + ] + }, + "group": "testing", + "status": "stable", + "safety": "unsafe" + }, + { + "func": { + "id": "expectEmit_5", + "description": "Expect a given number of logs from a specific emitter with the provided topics.", + "declaration": "function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter, uint64 count) external;", + "visibility": "external", + "mutability": "", + "signature": "expectEmit(bool,bool,bool,bool,address,uint64)", + "selector": "0xc339d02c", + "selectorBytes": [ + 195, + 57, + 208, + 44 + ] + }, + "group": "testing", + "status": "stable", + "safety": "unsafe" + }, + { + "func": { + "id": "expectEmit_6", + "description": "Expect a given number of logs with all topic and data checks enabled.", + "declaration": "function expectEmit(uint64 count) external;", + "visibility": "external", + "mutability": "", + "signature": "expectEmit(uint64)", + "selector": "0x4c74a335", + "selectorBytes": [ + 76, + 116, + 163, + 53 + ] + }, + "group": "testing", + "status": "stable", + "safety": "unsafe" + }, + { + "func": { + "id": "expectEmit_7", + "description": "Expect a given number of logs from a specific emitter with all topic and data checks enabled.", + "declaration": "function expectEmit(address emitter, uint64 count) external;", + "visibility": "external", + "mutability": "", + "signature": "expectEmit(address,uint64)", + "selector": "0xb43aece3", + "selectorBytes": [ + 180, + 58, + 236, + 227 + ] + }, + "group": "testing", + "status": "stable", + "safety": "unsafe" + }, { "func": { "id": "expectPartialRevert_0", diff --git a/crates/cheatcodes/spec/src/vm.rs b/crates/cheatcodes/spec/src/vm.rs index 4bc8c9b03..47e0b625b 100644 --- a/crates/cheatcodes/spec/src/vm.rs +++ b/crates/cheatcodes/spec/src/vm.rs @@ -982,6 +982,23 @@ interface Vm { #[cheatcode(group = Testing, safety = Unsafe)] function expectEmit(address emitter) external; + /// Expect a given number of logs with the provided topics. + #[cheatcode(group = Testing, safety = Unsafe)] + function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, uint64 count) external; + + /// Expect a given number of logs from a specific emitter with the provided topics. + #[cheatcode(group = Testing, safety = Unsafe)] + function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter, uint64 count) + external; + + /// Expect a given number of logs with all topic and data checks enabled. + #[cheatcode(group = Testing, safety = Unsafe)] + function expectEmit(uint64 count) external; + + /// Expect a given number of logs from a specific emitter with all topic and data checks enabled. + #[cheatcode(group = Testing, safety = Unsafe)] + function expectEmit(address emitter, uint64 count) external; + /// Prepare an expected anonymous log with (bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData.). /// Call this function, then emit an anonymous event, then call a function. Internally after the call, we check if /// logs were emitted in the expected order with the expected topics and data (as specified by the booleans). diff --git a/crates/cheatcodes/src/inspector.rs b/crates/cheatcodes/src/inspector.rs index 329b89d0e..a0695d0d2 100644 --- a/crates/cheatcodes/src/inspector.rs +++ b/crates/cheatcodes/src/inspector.rs @@ -12,7 +12,7 @@ use crate::{ test::{ assume::AssumeNoRevert, expect::{ - self, ExpectedCallData, ExpectedCallTracker, ExpectedCallType, ExpectedEmit, + self, ExpectedCallData, ExpectedCallTracker, ExpectedCallType, ExpectedEmitTracker, ExpectedRevert, ExpectedRevertKind, }, }, @@ -428,7 +428,7 @@ pub struct Cheatcodes { /// Expected calls pub expected_calls: ExpectedCallTracker, /// Expected emits - pub expected_emits: VecDeque<ExpectedEmit>, + pub expected_emits: ExpectedEmitTracker, /// Map of context depths to memory offset ranges that may be written to within the call depth. pub allowed_mem_writes: HashMap<u64, Vec<Range<u64>>>, @@ -1442,21 +1442,63 @@ impl Inspector<&mut dyn DatabaseExt> for Cheatcodes { let should_check_emits = self .expected_emits .iter() - .any(|expected| expected.depth == ecx.journaled_state.depth()) && + .any(|(expected, _)| expected.depth == ecx.journaled_state.depth()) && // Ignore staticcalls !call.is_static; if should_check_emits { + let expected_counts = self + .expected_emits + .iter() + .filter_map(|(expected, count_map)| { + let count = match expected.address { + Some(emitter) => match count_map.get(&emitter) { + Some(log_count) => expected + .log + .as_ref() + .map(|l| log_count.count(l)) + .unwrap_or_else(|| log_count.count_unchecked()), + None => 0, + }, + None => match &expected.log { + Some(log) => count_map.values().map(|logs| logs.count(log)).sum(), + None => count_map.values().map(|logs| logs.count_unchecked()).sum(), + }, + }; + + if count != expected.count { + Some((expected, count)) + } else { + None + } + }) + .collect::<Vec<_>>(); + // Not all emits were matched. - if self.expected_emits.iter().any(|expected| !expected.found) { + if self.expected_emits.iter().any(|(expected, _)| !expected.found) { outcome.result.result = InstructionResult::Revert; outcome.result.output = "log != expected log".abi_encode().into(); return outcome; - } else { - // All emits were found, we're good. - // Clear the queue, as we expect the user to declare more events for the next call - // if they wanna match further events. - self.expected_emits.clear() } + + if !expected_counts.is_empty() { + let msg = if outcome.result.is_ok() { + let (expected, count) = expected_counts.first().unwrap(); + format!("log emitted {count} times, expected {}", expected.count) + } else { + "expected an emit, but the call reverted instead. \ + ensure you're testing the happy path when using `expectEmit`" + .to_string() + }; + + outcome.result.result = InstructionResult::Revert; + outcome.result.output = Error::encode(msg); + return outcome; + } + + // All emits were found, we're good. + // Clear the queue, as we expect the user to declare more events for the next call + // if they wanna match further events. + self.expected_emits.clear() } // this will ensure we don't have false positives when trying to diagnose reverts in fork @@ -1544,10 +1586,9 @@ impl Inspector<&mut dyn DatabaseExt> for Cheatcodes { } } } - // Check if we have any leftover expected emits // First, if any emits were found at the root call, then we its ok and we remove them. - self.expected_emits.retain(|expected| !expected.found); + self.expected_emits.retain(|(expected, _)| expected.count > 0 && !expected.found); // If not empty, we got mismatched emits if !self.expected_emits.is_empty() { let msg = if outcome.result.is_ok() { diff --git a/crates/cheatcodes/src/test/expect.rs b/crates/cheatcodes/src/test/expect.rs index a3ddef8c1..e45298923 100644 --- a/crates/cheatcodes/src/test/expect.rs +++ b/crates/cheatcodes/src/test/expect.rs @@ -1,7 +1,9 @@ +use std::collections::VecDeque; + use crate::{Cheatcode, Cheatcodes, CheatsCtxt, Error, Result, Vm::*}; use alloy_primitives::{ address, hex, - map::{hash_map::Entry, HashMap}, + map::{hash_map::Entry, AddressHashMap, HashMap}, Address, Bytes, LogData as RawLog, U256, }; use alloy_sol_types::{SolError, SolValue}; @@ -113,6 +115,8 @@ pub struct ExpectedEmit { pub anonymous: bool, /// Whether the log was actually found in the subcalls pub found: bool, + /// Number of times the log is expected to be emitted + pub count: u64, } impl Cheatcode for expectCall_0Call { @@ -225,6 +229,7 @@ impl Cheatcode for expectEmit_0Call { [true, checkTopic1, checkTopic2, checkTopic3, checkData], None, false, + 1, ) } } @@ -238,6 +243,7 @@ impl Cheatcode for expectEmit_1Call { [true, checkTopic1, checkTopic2, checkTopic3, checkData], Some(emitter), false, + 1, ) } } @@ -245,14 +251,63 @@ impl Cheatcode for expectEmit_1Call { impl Cheatcode for expectEmit_2Call { fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result { let Self {} = self; - expect_emit(ccx.state, ccx.ecx.journaled_state.depth(), [true; 5], None, false) + expect_emit(ccx.state, ccx.ecx.journaled_state.depth(), [true; 5], None, false, 1) } } impl Cheatcode for expectEmit_3Call { fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result { let Self { emitter } = *self; - expect_emit(ccx.state, ccx.ecx.journaled_state.depth(), [true; 5], Some(emitter), false) + expect_emit(ccx.state, ccx.ecx.journaled_state.depth(), [true; 5], Some(emitter), false, 1) + } +} + +impl Cheatcode for expectEmit_4Call { + fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result { + let Self { checkTopic1, checkTopic2, checkTopic3, checkData, count } = *self; + expect_emit( + ccx.state, + ccx.ecx.journaled_state.depth(), + [true, checkTopic1, checkTopic2, checkTopic3, checkData], + None, + false, + count, + ) + } +} + +impl Cheatcode for expectEmit_5Call { + fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result { + let Self { checkTopic1, checkTopic2, checkTopic3, checkData, emitter, count } = *self; + expect_emit( + ccx.state, + ccx.ecx.journaled_state.depth(), + [true, checkTopic1, checkTopic2, checkTopic3, checkData], + Some(emitter), + false, + count, + ) + } +} + +impl Cheatcode for expectEmit_6Call { + fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result { + let Self { count } = *self; + expect_emit(ccx.state, ccx.ecx.journaled_state.depth(), [true; 5], None, false, count) + } +} + +impl Cheatcode for expectEmit_7Call { + fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result { + let Self { emitter, count } = *self; + expect_emit( + ccx.state, + ccx.ecx.journaled_state.depth(), + [true; 5], + Some(emitter), + false, + count, + ) } } @@ -265,6 +320,7 @@ impl Cheatcode for expectEmitAnonymous_0Call { [checkTopic0, checkTopic1, checkTopic2, checkTopic3, checkData], None, true, + 1, ) } } @@ -278,6 +334,7 @@ impl Cheatcode for expectEmitAnonymous_1Call { [checkTopic0, checkTopic1, checkTopic2, checkTopic3, checkData], Some(emitter), true, + 1, ) } } @@ -285,14 +342,14 @@ impl Cheatcode for expectEmitAnonymous_1Call { impl Cheatcode for expectEmitAnonymous_2Call { fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result { let Self {} = self; - expect_emit(ccx.state, ccx.ecx.journaled_state.depth(), [true; 5], None, true) + expect_emit(ccx.state, ccx.ecx.journaled_state.depth(), [true; 5], None, true, 1) } } impl Cheatcode for expectEmitAnonymous_3Call { fn apply_stateful(&self, ccx: &mut CheatsCtxt) -> Result { let Self { emitter } = *self; - expect_emit(ccx.state, ccx.ecx.journaled_state.depth(), [true; 5], Some(emitter), true) + expect_emit(ccx.state, ccx.ecx.journaled_state.depth(), [true; 5], Some(emitter), true, 1) } } @@ -638,15 +695,17 @@ fn expect_emit( checks: [bool; 5], address: Option<Address>, anonymous: bool, + count: u64, ) -> Result { - let expected_emit = ExpectedEmit { depth, checks, address, found: false, log: None, anonymous }; - if let Some(found_emit_pos) = state.expected_emits.iter().position(|emit| emit.found) { + let expected_emit = + ExpectedEmit { depth, checks, address, found: false, log: None, anonymous, count }; + if let Some(found_emit_pos) = state.expected_emits.iter().position(|(emit, _)| emit.found) { // The order of emits already found (back of queue) should not be modified, hence push any // new emit before first found emit. - state.expected_emits.insert(found_emit_pos, expected_emit); + state.expected_emits.insert(found_emit_pos, (expected_emit, Default::default())); } else { // If no expected emits then push new one at the back of queue. - state.expected_emits.push_back(expected_emit); + state.expected_emits.push_back((expected_emit, Default::default())); } Ok(Default::default()) @@ -667,18 +726,18 @@ pub(crate) fn handle_expect_emit( // First, we can return early if all events have been matched. // This allows a contract to arbitrarily emit more events than expected (additive behavior), // as long as all the previous events were matched in the order they were expected to be. - if state.expected_emits.iter().all(|expected| expected.found) { + if state.expected_emits.iter().all(|(expected, _)| expected.found) { return } - let should_fill_logs = state.expected_emits.iter().any(|expected| expected.log.is_none()); + let should_fill_logs = state.expected_emits.iter().any(|(expected, _)| expected.log.is_none()); let index_to_fill_or_check = if should_fill_logs { // If there's anything to fill, we start with the last event to match in the queue // (without taking into account events already matched). state .expected_emits .iter() - .position(|emit| emit.found) + .position(|(emit, _)| emit.found) .unwrap_or(state.expected_emits.len()) .saturating_sub(1) } else { @@ -687,7 +746,7 @@ pub(crate) fn handle_expect_emit( 0 }; - let mut event_to_fill_or_check = state + let (mut event_to_fill_or_check, mut count_map) = state .expected_emits .remove(index_to_fill_or_check) .expect("we should have an emit to fill or check"); @@ -698,7 +757,9 @@ pub(crate) fn handle_expect_emit( if event_to_fill_or_check.anonymous || !log.topics().is_empty() { event_to_fill_or_check.log = Some(log.data.clone()); // If we only filled the expected log then we put it back at the same position. - state.expected_emits.insert(index_to_fill_or_check, event_to_fill_or_check); + state + .expected_emits + .insert(index_to_fill_or_check, (event_to_fill_or_check, count_map)); } else { interpreter.instruction_result = InstructionResult::Revert; interpreter.next_action = InterpreterAction::Return { @@ -712,41 +773,120 @@ pub(crate) fn handle_expect_emit( return }; - event_to_fill_or_check.found = || -> bool { - // Topic count must match. - if expected.topics().len() != log.topics().len() { - return false + // Increment/set `count` for `log.address` and `log.data` + match count_map.entry(log.address) { + Entry::Occupied(mut entry) => { + // Checks and inserts the log into the map. + // If the log doesn't pass the checks, it is ignored and `count` is not incremented. + let log_count_map = entry.get_mut(); + log_count_map.insert(&log.data); } - // Match topics according to the checks. - if !log - .topics() - .iter() - .enumerate() - .filter(|(i, _)| event_to_fill_or_check.checks[*i]) - .all(|(i, topic)| topic == &expected.topics()[i]) - { + Entry::Vacant(entry) => { + let mut log_count_map = LogCountMap::new(&event_to_fill_or_check); + + if log_count_map.satisfies_checks(&log.data) { + log_count_map.insert(&log.data); + + // Entry is only inserted if it satisfies the checks. + entry.insert(log_count_map); + } + } + } + + event_to_fill_or_check.found = || -> bool { + if !checks_topics_and_data(event_to_fill_or_check.checks, expected, log) { return false } + // Maybe match source address. if event_to_fill_or_check.address.is_some_and(|addr| addr != log.address) { return false; } - // Maybe match data. - if event_to_fill_or_check.checks[4] && expected.data.as_ref() != log.data.data.as_ref() { - return false - } - true + let expected_count = event_to_fill_or_check.count; + + match event_to_fill_or_check.address { + Some(emitter) => count_map + .get(&emitter) + .is_some_and(|log_map| log_map.count(&log.data) >= expected_count), + None => count_map + .values() + .find(|log_map| log_map.satisfies_checks(&log.data)) + .is_some_and(|map| map.count(&log.data) >= expected_count), + } }(); // If we found the event, we can push it to the back of the queue // and begin expecting the next event. if event_to_fill_or_check.found { - state.expected_emits.push_back(event_to_fill_or_check); + state.expected_emits.push_back((event_to_fill_or_check, count_map)); } else { // We did not match this event, so we need to keep waiting for the right one to // appear. - state.expected_emits.push_front(event_to_fill_or_check); + state.expected_emits.push_front((event_to_fill_or_check, count_map)); + } +} + +/// Handles expected emits specified by the `expectEmit` cheatcodes. +/// +/// The second element of the tuple counts the number of times the log has been emitted by a +/// particular address +pub type ExpectedEmitTracker = VecDeque<(ExpectedEmit, AddressHashMap<LogCountMap>)>; + +#[derive(Clone, Debug, Default)] +pub struct LogCountMap { + checks: [bool; 5], + expected_log: RawLog, + map: HashMap<RawLog, u64>, +} + +impl LogCountMap { + /// Instantiates `LogCountMap`. + fn new(expected_emit: &ExpectedEmit) -> Self { + Self { + checks: expected_emit.checks, + expected_log: expected_emit.log.clone().expect("log should be filled here"), + map: Default::default(), + } + } + + /// Inserts a log into the map and increments the count. + /// + /// The log must pass all checks against the expected log for the count to increment. + /// + /// Returns true if the log was inserted and count was incremented. + fn insert(&mut self, log: &RawLog) -> bool { + // If its already in the map, increment the count without checking. + if self.map.contains_key(log) { + self.map.entry(log.clone()).and_modify(|c| *c += 1); + + return true + } + + if !self.satisfies_checks(log) { + return false + } + + self.map.entry(log.clone()).and_modify(|c| *c += 1).or_insert(1); + + true + } + + /// Checks the incoming raw log against the expected logs topics and data. + fn satisfies_checks(&self, log: &RawLog) -> bool { + checks_topics_and_data(self.checks, &self.expected_log, log) + } + + pub fn count(&self, log: &RawLog) -> u64 { + if !self.satisfies_checks(log) { + return 0 + } + + self.count_unchecked() + } + + pub fn count_unchecked(&self) -> u64 { + self.map.values().sum() } } @@ -910,6 +1050,30 @@ pub(crate) fn handle_expect_revert( } } +fn checks_topics_and_data(checks: [bool; 5], expected: &RawLog, log: &RawLog) -> bool { + if log.topics().len() != expected.topics().len() { + return false + } + + // Check topics. + if !log + .topics() + .iter() + .enumerate() + .filter(|(i, _)| checks[*i]) + .all(|(i, topic)| topic == &expected.topics()[i]) + { + return false + } + + // Check data + if checks[4] && expected.data.as_ref() != log.data.as_ref() { + return false + } + + true +} + fn expect_safe_memory(state: &mut Cheatcodes, start: u64, end: u64, depth: u64) -> Result { ensure!(start < end, "memory range start ({start}) is greater than end ({end})"); #[allow(clippy::single_range_in_vec_init)] // Wanted behaviour diff --git a/testdata/cheats/Vm.sol b/testdata/cheats/Vm.sol index bdbb68e37..260b5bb38 100644 --- a/testdata/cheats/Vm.sol +++ b/testdata/cheats/Vm.sol @@ -242,6 +242,10 @@ interface Vm { function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter) external; function expectEmit() external; function expectEmit(address emitter) external; + function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, uint64 count) external; + function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter, uint64 count) external; + function expectEmit(uint64 count) external; + function expectEmit(address emitter, uint64 count) external; function expectPartialRevert(bytes4 revertData) external; function expectPartialRevert(bytes4 revertData, address reverter) external; function expectRevert() external; diff --git a/testdata/default/cheats/ExpectEmit.t.sol b/testdata/default/cheats/ExpectEmit.t.sol index b8fe5e458..2503faf4b 100644 --- a/testdata/default/cheats/ExpectEmit.t.sol +++ b/testdata/default/cheats/ExpectEmit.t.sol @@ -28,6 +28,12 @@ contract Emitter { emit Something(topic1, topic2, topic3, data); } + function emitNEvents(uint256 topic1, uint256 topic2, uint256 topic3, uint256 data, uint256 n) public { + for (uint256 i = 0; i < n; i++) { + emit Something(topic1, topic2, topic3, data); + } + } + function emitMultiple( uint256[2] memory topic1, uint256[2] memory topic2, @@ -597,3 +603,82 @@ contract ExpectEmitTest is DSTest { // emitter.emitEvent(1, 2, 3, 4); // } } + +contract ExpectEmitCountTest is DSTest { + Vm constant vm = Vm(HEVM_ADDRESS); + Emitter emitter; + + event Something(uint256 indexed topic1, uint256 indexed topic2, uint256 indexed topic3, uint256 data); + + function setUp() public { + emitter = new Emitter(); + } + + function testCountNoEmit() public { + vm.expectEmit(0); + emit Something(1, 2, 3, 4); + emitter.doesNothing(); + } + + function testFailNoEmit() public { + vm.expectEmit(0); + emit Something(1, 2, 3, 4); + emitter.emitEvent(1, 2, 3, 4); + } + + function testCountNEmits() public { + uint64 count = 2; + vm.expectEmit(count); + emit Something(1, 2, 3, 4); + emitter.emitNEvents(1, 2, 3, 4, count); + } + + function testFailCountLessEmits() public { + uint64 count = 2; + vm.expectEmit(count); + emit Something(1, 2, 3, 4); + emitter.emitNEvents(1, 2, 3, 4, count - 1); + } + + function testCountMoreEmits() public { + uint64 count = 2; + vm.expectEmit(count); + emit Something(1, 2, 3, 4); + emitter.emitNEvents(1, 2, 3, 4, count + 1); + } + + /// Test zero emits from a specific address (emitter). + + function testCountNoEmitFromAddress() public { + vm.expectEmit(address(emitter), 0); + emit Something(1, 2, 3, 4); + emitter.doesNothing(); + } + + function testFailNoEmitFromAddress() public { + vm.expectEmit(address(emitter), 0); + emit Something(1, 2, 3, 4); + emitter.emitEvent(1, 2, 3, 4); + } + + function testCountEmitsFromAddress() public { + uint64 count = 2; + vm.expectEmit(address(emitter), count); + emit Something(1, 2, 3, 4); + emitter.emitNEvents(1, 2, 3, 4, count); + } + + function testFailCountEmitsFromAddress() public { + uint64 count = 3; + vm.expectEmit(address(emitter), count); + emit Something(1, 2, 3, 4); + emitter.emitNEvents(1, 2, 3, 4, count - 1); + } + + function testFailEmitSomethingElse() public { + uint64 count = 2; + vm.expectEmit(count); + emit Something(1, 2, 3, 4); + emitter.emitSomethingElse(23214); + } +} From 0086d041b8a8e348c4bb54eb1babc8a047d2ef71 Mon Sep 17 00:00:00 2001 From: grandizzy <38490174+grandizzy@users.noreply.github.com> Date: Wed, 18 Dec 2024 10:07:51 +0200 Subject: [PATCH 12/45] fix(release): check `env.IS_NIGHTLY` as string (#9568) fix(release): check IS_NIGHTLY as string --- .github/workflows/release.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e2dac1e8..086ac31e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ jobs: - name: Compute release name and tag id: release_info run: | - if [[ $IS_NIGHTLY ]]; then + if [[ ${IS_NIGHTLY} == 'true' ]]; then echo "tag_name=nightly-${GITHUB_SHA}" >> $GITHUB_OUTPUT echo "release_name=Nightly ($(date '+%Y-%m-%d'))" >> $GITHUB_OUTPUT else @@ -43,7 +43,7 @@ jobs: # which allows users to roll back. It is also used to build # the changelog. - name: Create build-specific nightly tag - if: ${{ env.IS_NIGHTLY }} + if: ${{ env.IS_NIGHTLY == 'true' }} uses: actions/github-script@v7 env: TAG_NAME: ${{ steps.release_info.outputs.tag_name }} @@ -57,7 +57,7 @@ jobs: uses: mikepenz/release-changelog-builder-action@v4 with: configuration: "./.github/changelog.json" - fromTag: ${{ env.IS_NIGHTLY && 'nightly' || '' }} + fromTag: ${{ env.IS_NIGHTLY == 'true' && 'nightly' || '' }} toTag: ${{ steps.release_info.outputs.tag_name }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -168,7 +168,7 @@ jobs: env: PLATFORM_NAME: ${{ matrix.platform }} OUT_DIR: target/${{ matrix.target }}/${{ env.PROFILE }} - VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }} + VERSION_NAME: ${{ (env.IS_NIGHTLY == 'true' && 'nightly') || needs.prepare.outputs.tag_name }} ARCH: ${{ matrix.arch }} shell: bash run: | @@ -192,7 +192,7 @@ jobs: if: matrix.target == 'x86_64-unknown-linux-gnu' env: OUT_DIR: target/${{ matrix.target }}/${{ env.PROFILE }} - VERSION_NAME: ${{ (env.IS_NIGHTLY && 'nightly') || needs.prepare.outputs.tag_name }} + VERSION_NAME: ${{ (env.IS_NIGHTLY == 'true' && 'nightly') || needs.prepare.outputs.tag_name }} shell: bash run: | sudo apt-get -y install help2man @@ -213,7 +213,7 @@ jobs: with: name: ${{ needs.prepare.outputs.release_name }} tag_name: ${{ needs.prepare.outputs.tag_name }} - prerelease: ${{ env.IS_NIGHTLY }} + prerelease: ${{ env.IS_NIGHTLY == 'true' }} body: ${{ needs.prepare.outputs.changelog }} files: | ${{ steps.artifacts.outputs.file_name }} @@ -231,7 +231,7 @@ jobs: # If this is a nightly release, it also updates the release # tagged `nightly` for compatibility with `foundryup` - name: Update nightly release - if: ${{ env.IS_NIGHTLY }} + if: ${{ env.IS_NIGHTLY == 'true' }} uses: softprops/action-gh-release@v2 with: name: "Nightly" @@ -253,7 +253,7 @@ jobs: # Moves the `nightly` tag to `HEAD` - name: Move nightly tag - if: ${{ env.IS_NIGHTLY }} + if: ${{ env.IS_NIGHTLY == 'true' }} uses: actions/github-script@v7 with: script: | From 8a08a3a92b0c842db2f254983cc3bd179300ad46 Mon Sep 17 00:00:00 2001 From: grandizzy <38490174+grandizzy@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:39:44 +0200 Subject: [PATCH 13/45] Run release workflow on stable tag push (#9575) --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 086ac31e4..2f4ed60e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,7 @@ name: release on: push: tags: + - "stable" - "v*.*.*" schedule: - cron: "0 0 * * *" From 6c4af1d4e3eddae075c8b5c2616685b7d53b5c47 Mon Sep 17 00:00:00 2001 From: grandizzy <38490174+grandizzy@users.noreply.github.com> Date: Thu, 19 Dec 2024 09:05:25 +0200 Subject: [PATCH 14/45] chore: update release notes template (#9577) - feat / fixes category per binaries - breaking changes and perf category - restrict summary to max 60 days / max 100 PRs, add full diff and contributors --- .github/changelog.json | 62 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 6 deletions(-) diff --git a/.github/changelog.json b/.github/changelog.json index 4fe255e69..e936ed9a3 100644 --- a/.github/changelog.json +++ b/.github/changelog.json @@ -1,16 +1,66 @@ { "categories": [ { - "title": "## Features", - "labels": ["T-feature"] + "title": "## Breaking changes", + "labels": ["T-likely-breaking "] }, { - "title": "## Fixes", - "labels": ["T-bug", "T-fix"] + "title": "## Anvil Features", + "labels": ["C-anvil", "T-feature"], + "exhaustive": true, + "exhaustive_rules": false + }, + { + "title": "## Anvil Fixes", + "labels": ["C-anvil", "T-bug"], + "exhaustive": true, + "exhaustive_rules": false + }, + { + "title": "## Cast Features", + "labels": ["C-cast", "T-feature"], + "exhaustive": true, + "exhaustive_rules": false + }, + { + "title": "## Cast Fixes", + "labels": ["C-cast", "T-bug"], + "exhaustive": true, + "exhaustive_rules": false + }, + { + "title": "## Chisel Features", + "labels": ["C-chisel", "T-feature"], + "exhaustive": true, + "exhaustive_rules": false + }, + { + "title": "## Chisel Fixes", + "labels": ["C-chisel", "T-bug"], + "exhaustive": true, + "exhaustive_rules": false + }, + { + "title": "## Forge Features", + "labels": ["C-forge", "T-feature"], + "exhaustive": true, + "exhaustive_rules": false + }, + { + "title": "## Forge Fixes", + "labels": ["C-forge", "T-bug"], + "exhaustive": true, + "exhaustive_rules": false + }, + { + "title": "## Performance improvements", + "labels": ["T-perf"] } ], "ignore_labels": ["L-ignore"], - "template": "${{CHANGELOG}}\n## Other\n\n${{UNCATEGORIZED}}", + "template": "${{CHANGELOG}}\n## Other\n\n${{UNCATEGORIZED}}\n## Full diff:\n\n ${{RELEASE_DIFF}}\n## Contributors:\n\n${{CONTRIBUTORS}}", "pr_template": "- ${{TITLE}} (#${{NUMBER}})", - "empty_template": "- No changes" + "empty_template": "- No changes", + "max_pull_requests": 100, + "max_back_track_time_days": 60 } From a263a9280717b9247c4de7b54bd2180a4b6af6d1 Mon Sep 17 00:00:00 2001 From: grandizzy <38490174+grandizzy@users.noreply.github.com> Date: Thu, 19 Dec 2024 16:27:09 +0200 Subject: [PATCH 15/45] chore: add contributors in release changelog (#9578) --- .github/changelog.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/changelog.json b/.github/changelog.json index e936ed9a3..aa548adc7 100644 --- a/.github/changelog.json +++ b/.github/changelog.json @@ -58,8 +58,8 @@ } ], "ignore_labels": ["L-ignore"], - "template": "${{CHANGELOG}}\n## Other\n\n${{UNCATEGORIZED}}\n## Full diff:\n\n ${{RELEASE_DIFF}}\n## Contributors:\n\n${{CONTRIBUTORS}}", - "pr_template": "- ${{TITLE}} (#${{NUMBER}})", + "template": "${{CHANGELOG}}\n## Other\n\n${{UNCATEGORIZED}}\n## Full Changelog:\n ${{RELEASE_DIFF}}", + "pr_template": "- ${{TITLE}} (#${{NUMBER}}) by @${{AUTHOR}}", "empty_template": "- No changes", "max_pull_requests": 100, "max_back_track_time_days": 60 From af52b801d762f1f7aeb410282e59bc6d3556e22a Mon Sep 17 00:00:00 2001 From: grandizzy <38490174+grandizzy@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:28:48 +0200 Subject: [PATCH 16/45] feat(foundryup): allow multiple installed versions (#9551) * feat(foundryup): allow multiple installed versions * Changes after review: new line after version, -v renamed as -i, create version dir on untar * Update foundryup link repo and contribute URL * Fix --one-top-level not avail in bsd tar * Fix --one-top-level not avail in bsd tar * update docs * Err if no version provided to use --------- Co-authored-by: zerosnacks <zerosnacks@protonmail.com> --- foundryup/README.md | 20 ++++++++++++--- foundryup/foundryup | 62 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 72 insertions(+), 10 deletions(-) diff --git a/foundryup/README.md b/foundryup/README.md index 39a53288c..5504063ab 100644 --- a/foundryup/README.md +++ b/foundryup/README.md @@ -2,6 +2,8 @@ Update or revert to a specific Foundry branch with ease. +`foundryup` supports installing and managing multiple versions. + ## Installing ```sh @@ -16,10 +18,22 @@ To install the **nightly** version: foundryup ``` -To install a specific **version** (in this case the `nightly` version): +To **install** a specific **version** (in this case the `nightly` version): + +```sh +foundryup --install nightly +``` + +To **list** all **versions** installed: + +```sh +foundryup --list +``` + +To switch between different versions and **use**: ```sh -foundryup --version nightly +foundryup --use nightly-00efa0d5965269149f374ba142fb1c3c7edd6c94 ``` To install a specific **branch** (in this case the `release/0.1.0` branch's latest commit): @@ -62,6 +76,6 @@ foundryup --path ./git/foundry --- -**Tip**: All flags have a single character shorthand equivalent! You can use `-v` instead of `--version`, etc. +**Tip**: All flags have a single character shorthand equivalent! You can use `-i` instead of `--install`, etc. --- diff --git a/foundryup/foundryup b/foundryup/foundryup index 2dc94bfb4..55b0b5a4b 100755 --- a/foundryup/foundryup +++ b/foundryup/foundryup @@ -3,6 +3,7 @@ set -eo pipefail BASE_DIR=${XDG_CONFIG_HOME:-$HOME} FOUNDRY_DIR=${FOUNDRY_DIR:-"$BASE_DIR/.foundry"} +FOUNDRY_VERSIONS_DIR="$FOUNDRY_DIR/versions" FOUNDRY_BIN_DIR="$FOUNDRY_DIR/bin" FOUNDRY_MAN_DIR="$FOUNDRY_DIR/share/man/man1" @@ -22,7 +23,9 @@ main() { -r|--repo) shift; FOUNDRYUP_REPO=$1;; -b|--branch) shift; FOUNDRYUP_BRANCH=$1;; - -v|--version) shift; FOUNDRYUP_VERSION=$1;; + -i|--install) shift; FOUNDRYUP_VERSION=$1;; + -l|--list) shift; list;; + -u|--use) shift; FOUNDRYUP_VERSION=$1; use;; -p|--path) shift; FOUNDRYUP_LOCAL_REPO=$1;; -P|--pr) shift; FOUNDRYUP_PR=$1;; -C|--commit) shift; FOUNDRYUP_COMMIT=$1;; @@ -137,15 +140,22 @@ main() { BIN_ARCHIVE_URL="${RELEASE_URL}foundry_${FOUNDRYUP_VERSION}_${PLATFORM}_${ARCHITECTURE}.$EXT" MAN_TARBALL_URL="${RELEASE_URL}foundry_man_${FOUNDRYUP_VERSION}.tar.gz" + ensure mkdir -p $FOUNDRY_VERSIONS_DIR # Download and extract the binaries archive - say "downloading latest forge, cast, anvil, and chisel" + say "downloading forge, cast, anvil, and chisel for $FOUNDRYUP_TAG version" if [ "$PLATFORM" = "win32" ]; then tmp="$(mktemp -d 2>/dev/null || echo ".")/foundry.zip" ensure download "$BIN_ARCHIVE_URL" "$tmp" - ensure unzip "$tmp" -d "$FOUNDRY_BIN_DIR" + ensure unzip "$tmp" -d "$FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_TAG" rm -f "$tmp" else - ensure download "$BIN_ARCHIVE_URL" | ensure tar -xzC "$FOUNDRY_BIN_DIR" + tmp="$(mktemp -d 2>/dev/null || echo ".")/foundry.tar.gz" + ensure download "$BIN_ARCHIVE_URL" "$tmp" + # Make sure it's a valid tar archive. + ensure tar tf $tmp 1> /dev/null + ensure mkdir -p $FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_TAG + ensure tar -C "$FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_TAG" -xvf $tmp + rm -f "$tmp" fi # Optionally download the manuals @@ -159,6 +169,7 @@ main() { for bin in "${BINS[@]}"; do bin_path="$FOUNDRY_BIN_DIR/$bin" + cp $FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_TAG/$bin $bin_path # Print installed msg say "installed - $(ensure "$bin_path" --version)" @@ -240,7 +251,9 @@ USAGE: OPTIONS: -h, --help Print help information - -v, --version Install a specific version from built binaries + -i, --install Install a specific version from built binaries + -l, --list List versions installed from built binaries + -u, --use Use a specific installed version from built binaries -b, --branch Build and install a specific branch -P, --pr Build and install a specific Pull Request -C, --commit Build and install a specific commit @@ -252,6 +265,41 @@ OPTIONS: EOF } +list() { + if [ -d "$FOUNDRY_VERSIONS_DIR" ]; then + for VERSION in $FOUNDRY_VERSIONS_DIR/*; do + say "${VERSION##*/}" + for bin in "${BINS[@]}"; do + bin_path="$VERSION/$bin" + say "- $(ensure "$bin_path" --version)" + done + printf "\n" + done + else + for bin in "${BINS[@]}"; do + bin_path="$FOUNDRY_BIN_DIR/$bin" + say "- $(ensure "$bin_path" --version)" + done + fi + exit 0 +} + +use() { + [ -z "$FOUNDRYUP_VERSION" ] && err "no version provided" + FOUNDRY_VERSION_DIR="$FOUNDRY_VERSIONS_DIR/$FOUNDRYUP_VERSION" + if [ -d "$FOUNDRY_VERSION_DIR" ]; then + for bin in "${BINS[@]}"; do + bin_path="$FOUNDRY_BIN_DIR/$bin" + cp $FOUNDRY_VERSION_DIR/$bin $bin_path + # Print usage msg + say "use - $(ensure "$bin_path" --version)" + done + exit 0 + else + err "version $FOUNDRYUP_VERSION not installed" + fi +} + say() { printf "foundryup: %s\n" "$1" } @@ -316,11 +364,11 @@ banner() { .xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx -Repo : https://github.com/foundry-rs/ +Repo : https://github.com/foundry-rs/foundry Book : https://book.getfoundry.sh/ Chat : https://t.me/foundry_rs/ Support : https://t.me/foundry_support/ -Contribute : https://github.com/orgs/foundry-rs/projects/2/ +Contribute : https://github.com/foundry-rs/foundry/blob/master/CONTRIBUTING.md .xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx.xOx From f3b5ac7ff29e7944884575de28c147f7f06ed41a Mon Sep 17 00:00:00 2001 From: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:55:50 +0200 Subject: [PATCH 17/45] chore: bump workspace version to `0.3.0` (#9580) bump to 0.3.0 --- Cargo.lock | 60 +++++++++++++++++++++++++++--------------------------- Cargo.toml | 2 +- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f58e16894..9125707d1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -923,7 +923,7 @@ dependencies = [ [[package]] name = "anvil" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-chains", "alloy-consensus", @@ -993,7 +993,7 @@ dependencies = [ [[package]] name = "anvil-core" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -1017,7 +1017,7 @@ dependencies = [ [[package]] name = "anvil-rpc" -version = "0.2.0" +version = "0.3.0" dependencies = [ "serde", "serde_json", @@ -1025,7 +1025,7 @@ dependencies = [ [[package]] name = "anvil-server" -version = "0.2.0" +version = "0.3.0" dependencies = [ "anvil-rpc", "async-trait", @@ -2019,7 +2019,7 @@ checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" [[package]] name = "cast" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-chains", "alloy-consensus", @@ -2114,7 +2114,7 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chisel" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -3420,7 +3420,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "forge" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-chains", "alloy-consensus", @@ -3513,7 +3513,7 @@ dependencies = [ [[package]] name = "forge-doc" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-primitives", "derive_more", @@ -3536,7 +3536,7 @@ dependencies = [ [[package]] name = "forge-fmt" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-primitives", "ariadne", @@ -3552,7 +3552,7 @@ dependencies = [ [[package]] name = "forge-script" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-chains", "alloy-consensus", @@ -3597,7 +3597,7 @@ dependencies = [ [[package]] name = "forge-script-sequence" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-network", "alloy-primitives", @@ -3615,7 +3615,7 @@ dependencies = [ [[package]] name = "forge-sol-macro-gen" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-json-abi", "alloy-sol-macro-expander", @@ -3631,7 +3631,7 @@ dependencies = [ [[package]] name = "forge-verify" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -3692,7 +3692,7 @@ dependencies = [ [[package]] name = "foundry-cheatcodes" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -3741,7 +3741,7 @@ dependencies = [ [[package]] name = "foundry-cheatcodes-spec" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-sol-types", "foundry-macros", @@ -3752,7 +3752,7 @@ dependencies = [ [[package]] name = "foundry-cli" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-chains", "alloy-dyn-abi", @@ -3791,7 +3791,7 @@ dependencies = [ [[package]] name = "foundry-common" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-consensus", "alloy-contract", @@ -3842,7 +3842,7 @@ dependencies = [ [[package]] name = "foundry-common-fmt" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -3970,7 +3970,7 @@ dependencies = [ [[package]] name = "foundry-config" -version = "0.2.0" +version = "0.3.0" dependencies = [ "Inflector", "alloy-chains", @@ -4007,7 +4007,7 @@ dependencies = [ [[package]] name = "foundry-debugger" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-primitives", "crossterm", @@ -4025,7 +4025,7 @@ dependencies = [ [[package]] name = "foundry-evm" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -4052,7 +4052,7 @@ dependencies = [ [[package]] name = "foundry-evm-abi" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -4065,7 +4065,7 @@ dependencies = [ [[package]] name = "foundry-evm-core" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -4100,7 +4100,7 @@ dependencies = [ [[package]] name = "foundry-evm-coverage" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-primitives", "eyre", @@ -4115,7 +4115,7 @@ dependencies = [ [[package]] name = "foundry-evm-fuzz" -version = "0.2.0" +version = "0.3.0" dependencies = [ "ahash", "alloy-dyn-abi", @@ -4141,7 +4141,7 @@ dependencies = [ [[package]] name = "foundry-evm-traces" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -4193,7 +4193,7 @@ dependencies = [ [[package]] name = "foundry-linking" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-primitives", "foundry-compilers", @@ -4203,7 +4203,7 @@ dependencies = [ [[package]] name = "foundry-macros" -version = "0.2.0" +version = "0.3.0" dependencies = [ "proc-macro-error", "proc-macro2", @@ -4213,7 +4213,7 @@ dependencies = [ [[package]] name = "foundry-test-utils" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-primitives", "alloy-provider", @@ -4236,7 +4236,7 @@ dependencies = [ [[package]] name = "foundry-wallets" -version = "0.2.0" +version = "0.3.0" dependencies = [ "alloy-consensus", "alloy-dyn-abi", diff --git a/Cargo.toml b/Cargo.toml index b8b0cfbeb..b6f4fef69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ members = [ resolver = "2" [workspace.package] -version = "0.2.0" +version = "0.3.0" edition = "2021" # Remember to update clippy.toml as well rust-version = "1.83" From 7ac050264eea044458f2df1f1a3d5f6fc0bc6d28 Mon Sep 17 00:00:00 2001 From: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Date: Thu, 19 Dec 2024 18:15:53 +0200 Subject: [PATCH 18/45] Update CI workflow template to unpin from `nightly` explicitly, relying on `foundry-toolchain` default (#9573) * default CI workflow template to stable as opposed to nightly, related: https://github.com/foundry-rs/foundry-toolchain/pull/60 * remove pinning to stable in workflow file, rely on default in foundry-toolchain - now being nightly, becoming stable --- crates/forge/assets/workflowTemplate.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/forge/assets/workflowTemplate.yml b/crates/forge/assets/workflowTemplate.yml index 762a2966f..34a4a527b 100644 --- a/crates/forge/assets/workflowTemplate.yml +++ b/crates/forge/assets/workflowTemplate.yml @@ -22,8 +22,6 @@ jobs: - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - name: Show Forge version run: | From 5a8bd893eeeeb9489ea66dd52a02eeaa580e3af0 Mon Sep 17 00:00:00 2001 From: Yash Atreya <44857776+yash-atreya@users.noreply.github.com> Date: Thu, 19 Dec 2024 18:59:08 +0200 Subject: [PATCH 19/45] chore: testFail* deprecation warning (#9581) * chore: testFail* deprecation warning * test * fix --- crates/forge/src/runner.rs | 17 +++++++++++++++++ crates/forge/tests/cli/test_cmd.rs | 27 +++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/crates/forge/src/runner.rs b/crates/forge/src/runner.rs index 7b1293a72..467f1acd6 100644 --- a/crates/forge/src/runner.rs +++ b/crates/forge/src/runner.rs @@ -402,6 +402,23 @@ impl<'a> ContractRunner<'a> { .collect::<BTreeMap<_, _>>(); let duration = start.elapsed(); + let test_fail_deprecations = self + .contract + .abi + .functions() + .filter_map(|func| { + TestFunctionKind::classify(&func.name, !func.inputs.is_empty()) + .is_any_test_fail() + .then_some(func.name.clone()) + }) + .collect::<Vec<_>>() + .join(", "); + + if !test_fail_deprecations.is_empty() { + warnings.push(format!( + "`testFail*` has been deprecated and will be removed in the next release. Consider changing to test_Revert[If|When]_Condition and expecting a revert. Found deprecated testFail* function(s): {test_fail_deprecations}.", + )); + } SuiteResult::new(duration, test_results, warnings) } } diff --git a/crates/forge/tests/cli/test_cmd.rs b/crates/forge/tests/cli/test_cmd.rs index e8da6a490..20f865fc9 100644 --- a/crates/forge/tests/cli/test_cmd.rs +++ b/crates/forge/tests/cli/test_cmd.rs @@ -2807,3 +2807,30 @@ Ran 1 test suite [ELAPSED]: 1 tests passed, 0 failed, 0 skipped (1 total tests) "#]], ); }); + +forgetest!(test_fail_deprecation_warning, |prj, cmd| { + prj.insert_ds_test(); + + prj.add_source( + "WarnDeprecationTestFail.t.sol", + r#" + import "./test.sol"; + contract WarnDeprecationTestFail is DSTest { + function testFail_deprecated() public { + revert("deprecated"); + } + + function testFail_deprecated2() public { + revert("deprecated2"); + } + } + "#, + ) + .unwrap(); + + cmd.forge_fuse() + .args(["test", "--mc", "WarnDeprecationTestFail"]) + .assert_success() + .stderr_eq(r#"Warning: `testFail*` has been deprecated and will be removed in the next release. Consider changing to test_Revert[If|When]_Condition and expecting a revert. Found deprecated testFail* function(s): testFail_deprecated, testFail_deprecated2. +"#); +}); From 6091f257a72ffd8c072c624950286d1ff05ca310 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:35:57 +0200 Subject: [PATCH 20/45] chore(tests): bump forge-std version (#9584) * chore: bump forge-std version used for tests * run CI * fix tests * fix gas --------- Co-authored-by: DaniPopes <DaniPopes@users.noreply.github.com> Co-authored-by: zerosnacks <zerosnacks@protonmail.com> --- crates/forge/tests/cli/cmd.rs | 4 ++-- crates/forge/tests/cli/script.rs | 2 +- testdata/forge-std-rev | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/forge/tests/cli/cmd.rs b/crates/forge/tests/cli/cmd.rs index 82d819b20..27aea6d86 100644 --- a/crates/forge/tests/cli/cmd.rs +++ b/crates/forge/tests/cli/cmd.rs @@ -2795,7 +2795,7 @@ contract NestedDeploy is Test { +============================================================================================+ | Deployment Cost | Deployment Size | | | | | |-------------------------------------------+-----------------+-----+--------+-----+---------| -| 251997 | 739 | | | | | +| 251985 | 739 | | | | | |-------------------------------------------+-----------------+-----+--------+-----+---------| | | | | | | | |-------------------------------------------+-----------------+-----+--------+-----+---------| @@ -2850,7 +2850,7 @@ Ran 1 test suite [ELAPSED]: 1 tests passed, 0 failed, 0 skipped (1 total tests) { "contract": "test/NestedDeployTest.sol:Parent", "deployment": { - "gas": 251997, + "gas": 251985, "size": 739 }, "functions": { diff --git a/crates/forge/tests/cli/script.rs b/crates/forge/tests/cli/script.rs index 9cf3e746c..09df55668 100644 --- a/crates/forge/tests/cli/script.rs +++ b/crates/forge/tests/cli/script.rs @@ -1956,7 +1956,7 @@ contract SimpleScript is Script { ]) .assert_success() .stdout_eq(str![[r#" -{"logs":[],"returns":{"success":{"internal_type":"bool","value":"true"}},"success":true,"raw_logs":[],"traces":[["Deployment",{"arena":[{"parent":null,"children":[],"idx":0,"trace":{"depth":0,"success":true,"caller":"0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"0x6080604052600c805462ff00ff191662010001179055348015601f575f5ffd5b506101568061002d5f395ff3fe608060405234801561000f575f5ffd5b5060043610610034575f3560e01c8063c040622614610038578063f8ccbf4714610054575b5f5ffd5b610040610067565b604051901515815260200160405180910390f35b600c546100409062010000900460ff1681565b5f7f885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d5f1c6001600160a01b0316637fb5297f6040518163ffffffff1660e01b81526004015f604051808303815f87803b1580156100c2575f5ffd5b505af11580156100d4573d5f5f3e3d5ffd5b50506040515f925090508181818181805af19150503d805f8114610113576040519150601f19603f3d011682016040523d82523d5f602084013e610118565b606091505b50909291505056fea264697066735822122060ba6332e526de9b6bc731fb4682b44e42845196324ec33068982984d700cdd964736f6c634300081b0033","output":"0x608060405234801561000f575f5ffd5b5060043610610034575f3560e01c8063c040622614610038578063f8ccbf4714610054575b5f5ffd5b610040610067565b604051901515815260200160405180910390f35b600c546100409062010000900460ff1681565b5f7f885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d5f1c6001600160a01b0316637fb5297f6040518163ffffffff1660e01b81526004015f604051808303815f87803b1580156100c2575f5ffd5b505af11580156100d4573d5f5f3e3d5ffd5b50506040515f925090508181818181805af19150503d805f8114610113576040519150601f19603f3d011682016040523d82523d5f602084013e610118565b606091505b50909291505056fea264697066735822122060ba6332e526de9b6bc731fb4682b44e42845196324ec33068982984d700cdd964736f6c634300081b0033","gas_used":90639,"gas_limit":1073682810,"status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]}]}],["Execution",{"arena":[{"parent":null,"children":[1,2],"idx":0,"trace":{"depth":0,"success":true,"caller":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc0406226","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":3214,"gas_limit":1073720760,"status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[{"Call":0},{"Call":1}]},{"parent":0,"children":[],"idx":1,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x7fb5297f","output":"0x","gas_used":0,"gas_limit":1056940983,"status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":2,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x0000000000000000000000000000000000000000","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x","output":"0x","gas_used":0,"gas_limit":1056940820,"status":"Stop","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]}]}]],"gas_used":24278,"labeled_addresses":{},"returned":"0x0000000000000000000000000000000000000000000000000000000000000001","address":null} +{"logs":[],"returns":{"success":{"internal_type":"bool","value":"true"}},"success":true,"raw_logs":[],"traces":[["Deployment",{"arena":[{"parent":null,"children":[],"idx":0,"trace":{"depth":0,"success":true,"caller":"0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":false,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CREATE","value":"0x0","data":"0x6080604052600c805462ff00ff191662010001179055348015601f575f5ffd5b506101568061002d5f395ff3fe608060405234801561000f575f5ffd5b5060043610610034575f3560e01c8063c040622614610038578063f8ccbf4714610054575b5f5ffd5b610040610067565b604051901515815260200160405180910390f35b600c546100409062010000900460ff1681565b5f7f885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d5f1c6001600160a01b0316637fb5297f6040518163ffffffff1660e01b81526004015f604051808303815f87803b1580156100c2575f5ffd5b505af11580156100d4573d5f5f3e3d5ffd5b50506040515f925090508181818181805af19150503d805f8114610113576040519150601f19603f3d011682016040523d82523d5f602084013e610118565b606091505b50909291505056fea264697066735822122051a3965709e156763fe3847b1a8c4c2e1f5ad2088ccbc31509b98951c018fc8764736f6c634300081b0033","output":"0x608060405234801561000f575f5ffd5b5060043610610034575f3560e01c8063c040622614610038578063f8ccbf4714610054575b5f5ffd5b610040610067565b604051901515815260200160405180910390f35b600c546100409062010000900460ff1681565b5f7f885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d5f1c6001600160a01b0316637fb5297f6040518163ffffffff1660e01b81526004015f604051808303815f87803b1580156100c2575f5ffd5b505af11580156100d4573d5f5f3e3d5ffd5b50506040515f925090508181818181805af19150503d805f8114610113576040519150601f19603f3d011682016040523d82523d5f602084013e610118565b606091505b50909291505056fea264697066735822122051a3965709e156763fe3847b1a8c4c2e1f5ad2088ccbc31509b98951c018fc8764736f6c634300081b0033","gas_used":90639,"gas_limit":1073682798,"status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]}]}],["Execution",{"arena":[{"parent":null,"children":[1,2],"idx":0,"trace":{"depth":0,"success":true,"caller":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","address":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0xc0406226","output":"0x0000000000000000000000000000000000000000000000000000000000000001","gas_used":3214,"gas_limit":1073720760,"status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[{"Call":0},{"Call":1}]},{"parent":0,"children":[],"idx":1,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x7109709ecfa91a80626ff3989d68f67f5b1dd12d","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x7fb5297f","output":"0x","gas_used":0,"gas_limit":1056940983,"status":"Return","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]},{"parent":0,"children":[],"idx":2,"trace":{"depth":1,"success":true,"caller":"0x5b73c5498c1e3b4dba84de0f1833c4a029d90519","address":"0x0000000000000000000000000000000000000000","maybe_precompile":null,"selfdestruct_address":null,"selfdestruct_refund_target":null,"selfdestruct_transferred_value":null,"kind":"CALL","value":"0x0","data":"0x","output":"0x","gas_used":0,"gas_limit":1056940820,"status":"Stop","steps":[],"decoded":{"label":null,"return_data":null,"call_data":null}},"logs":[],"ordering":[]}]}]],"gas_used":24278,"labeled_addresses":{},"returned":"0x0000000000000000000000000000000000000000000000000000000000000001","address":null} {"chain":31337,"estimated_gas_price":"2.000000001","estimated_total_gas_used":29005,"estimated_amount_required":"0.000058010000029005"} {"chain":"anvil-hardhat","status":"success","tx_hash":"0x4f78afe915fceb282c7625a68eb350bc0bf78acb59ad893e5c62b710a37f3156","contract_address":null,"block_number":1,"gas_used":21000,"gas_price":1000000001} {"status":"success","transactions":"[..]/broadcast/Foo.sol/31337/run-latest.json","sensitive":"[..]/cache/Foo.sol/31337/run-latest.json"} diff --git a/testdata/forge-std-rev b/testdata/forge-std-rev index ff90d09c2..1a0142f7e 100644 --- a/testdata/forge-std-rev +++ b/testdata/forge-std-rev @@ -1 +1 @@ -1eea5bae12ae557d589f9f0f0edae2faa47cb262 \ No newline at end of file +b93cf4bc34ff214c099dc970b153f85ade8c9f66 \ No newline at end of file From 0d5ad758e08fc5ddbd2069f068093c4a94347d1c Mon Sep 17 00:00:00 2001 From: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Date: Fri, 20 Dec 2024 12:03:20 +0200 Subject: [PATCH 21/45] chore(`foundryup`): default to stable if no specific version is passed in (#9585) * default to stable if no specific version is passed in * update mention, defaults to stable now --- foundryup/foundryup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/foundryup/foundryup b/foundryup/foundryup index 55b0b5a4b..710f7cce7 100755 --- a/foundryup/foundryup +++ b/foundryup/foundryup @@ -89,7 +89,7 @@ main() { # Install by downloading binaries if [[ "$FOUNDRYUP_REPO" == "foundry-rs/foundry" && -z "$FOUNDRYUP_BRANCH" && -z "$FOUNDRYUP_COMMIT" ]]; then - FOUNDRYUP_VERSION=${FOUNDRYUP_VERSION:-nightly} + FOUNDRYUP_VERSION=${FOUNDRYUP_VERSION:-stable} FOUNDRYUP_TAG=$FOUNDRYUP_VERSION # Normalize versions (handle channels, versions without v prefix @@ -244,7 +244,7 @@ The installer for Foundry. Update or revert to a specific Foundry version with ease. -By default, the latest nightly version is installed from built binaries. +By default, the latest stable version is installed from built binaries. USAGE: foundryup <OPTIONS> From f922a340dae8e347d573fc6a403694bcb7fea106 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 22 Dec 2024 09:44:52 +0000 Subject: [PATCH 22/45] chore(deps): weekly `cargo update` (#9588) --- Cargo.lock | 486 +++++++++++++++++++++++++++-------------------------- 1 file changed, 245 insertions(+), 241 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9125707d1..d4027c358 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,9 +74,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-chains" -version = "0.1.48" +version = "0.1.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0161082e0edd9013d23083465cc04b20e44b7a15646d36ba7b0cdb7cd6fe18f" +checksum = "830045a4421ee38d3ab570d36d4d2b5152c066e72797139224da8de5d5981fd0" dependencies = [ "alloy-primitives", "num_enum", @@ -86,9 +86,9 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ba14856660f31807ebb26ce8f667e814c72694e1077e97ef102e326ad580f3f" +checksum = "e88e1edea70787c33e11197d3f32ae380f3db19e6e061e539a5bcf8184a6b326" dependencies = [ "alloy-eips", "alloy-primitives", @@ -104,9 +104,9 @@ dependencies = [ [[package]] name = "alloy-consensus-any" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28666307e76441e7af37a2b90cde7391c28112121bea59f4e0d804df8b20057e" +checksum = "57b1bb53f40c0273cd1975573cd457b39213e68584e36d1401d25fd0398a1d65" dependencies = [ "alloy-consensus", "alloy-eips", @@ -118,9 +118,9 @@ dependencies = [ [[package]] name = "alloy-contract" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3510769905590b8991a8e63a5e0ab4aa72cf07a13ab5fbe23f12f4454d161da" +checksum = "1b668c78c4b1f12f474ede5a85e8ce550d0aa1ef7d49fd1d22855a43b960e725" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -134,7 +134,7 @@ dependencies = [ "alloy-transport", "futures", "futures-util", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] @@ -188,9 +188,9 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e922d558006ba371681d484d12aa73fe673d84884f83747730af7433c0e86d" +checksum = "5f9fadfe089e9ccc0650473f2d4ef0a28bc015bbca5631d9f0f09e49b557fdb3" dependencies = [ "alloy-eip2930", "alloy-eip7702", @@ -206,9 +206,9 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dca170827a7ca156b43588faebf9e9d27c27d0fb07cab82cfd830345e2b24f5" +checksum = "2b2a4cf7b70f3495788e74ce1c765260ffe38820a2a774ff4aacb62e31ea73f9" dependencies = [ "alloy-primitives", "alloy-serde", @@ -230,23 +230,23 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9335278f50b0273e0a187680ee742bb6b154a948adf036f448575bacc5ccb315" +checksum = "e29040b9d5fe2fb70415531882685b64f8efd08dfbd6cc907120650504821105" dependencies = [ "alloy-primitives", "alloy-sol-types", "serde", "serde_json", - "thiserror 2.0.7", + "thiserror 2.0.9", "tracing", ] [[package]] name = "alloy-network" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad4e6ad4230df8c4a254c20f8d6a84ab9df151bfca13f463177dbc96571cc1f8" +checksum = "510cc00b318db0dfccfdd2d032411cfae64fc144aef9679409e014145d3dacc4" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -264,14 +264,14 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] name = "alloy-network-primitives" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4df88a2f8020801e0fefce79471d3946d39ca3311802dbbd0ecfdeee5e972e3" +checksum = "9081c099e798b8a2bba2145eb82a9a146f01fc7a35e9ab6e7b43305051f97550" dependencies = [ "alloy-consensus", "alloy-eips", @@ -282,9 +282,9 @@ dependencies = [ [[package]] name = "alloy-node-bindings" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db5cefbc736b2b26a960dcf82279c70a03695dd11a0032a6dc27601eeb29182" +checksum = "aef9849fb8bbb28f69f2cbdb4b0dac2f0e35c04f6078a00dfb8486469aed02de" dependencies = [ "alloy-genesis", "alloy-primitives", @@ -292,7 +292,7 @@ dependencies = [ "rand", "serde_json", "tempfile", - "thiserror 2.0.7", + "thiserror 2.0.9", "tracing", "url", ] @@ -331,9 +331,9 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5115c74c037714e1b02a86f742289113afa5d494b5ea58308ba8aa378e739101" +checksum = "dc2dfaddd9a30aa870a78a4e1316e3e115ec1e12e552cbc881310456b85c1f24" dependencies = [ "alloy-chains", "alloy-consensus", @@ -365,7 +365,7 @@ dependencies = [ "schnellru", "serde", "serde_json", - "thiserror 2.0.7", + "thiserror 2.0.9", "tokio", "tracing", "url", @@ -374,9 +374,9 @@ dependencies = [ [[package]] name = "alloy-pubsub" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b073afa409698d1b9a30522565815f3bf7010e5b47b997cf399209e6110df097" +checksum = "695809e743628d54510c294ad17a4645bd9f465aeb0d20ee9ce9877c9712dc9c" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -415,9 +415,9 @@ dependencies = [ [[package]] name = "alloy-rpc-client" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6a0bd0ce5660ac48e4f3bb0c7c5c3a94db287a0be94971599d83928476cbcd" +checksum = "531137b283547d5b9a5cafc96b006c64ef76810c681d606f28be9781955293b6" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -441,9 +441,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374ac12e35bb90ebccd86e7c943ddba9590149a6e35cc4d9cd860d6635fd1018" +checksum = "3410a472ce26c457e9780f708ee6bd540b30f88f1f31fdab7a11d00bd6aa1aee" dependencies = [ "alloy-primitives", "alloy-rpc-types-anvil", @@ -457,9 +457,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-anvil" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0b85a5f5f5d99047544f4ec31330ee15121dcb8ef5af3e791a5207e6b92b05b" +checksum = "9ed06bd8a5fc57b352a6cbac24eec52a4760f08ae2c1eb56ac49c8ed4b02c351" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -469,9 +469,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-any" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea98f81bcd759dbfa3601565f9d7a02220d8ef1d294ec955948b90aaafbfd857" +checksum = "ed98e1af55a7d856bfa385f30f63d8d56be2513593655c904a8f4a7ec963aa3e" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", @@ -480,9 +480,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-debug" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fd14f68a482e67dfba52d404dfff1d3b0d9fc3b4775bd0923f3175d7661c3bd" +checksum = "e1dec1c1b65614ebd5834a7dfddf525a186962082023718e10f4f64ed2d02514" dependencies = [ "alloy-primitives", "serde", @@ -490,9 +490,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-engine" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca5898f753ff0d15a0dc955c169523d8fee57e05bb5a38a398b3451b0b988be" +checksum = "03bd16fa4959255ebf4a7702df08f325e5631df5cdca07c8a8e58bdc10fe02e3" dependencies = [ "alloy-consensus", "alloy-eips", @@ -508,9 +508,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e518b0a7771e00728f18be0708f828b18a1cfc542a7153bef630966a26388e0" +checksum = "8737d7a6e37ca7bba9c23e9495c6534caec6760eb24abc9d5ffbaaba147818e1" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -528,23 +528,23 @@ dependencies = [ [[package]] name = "alloy-rpc-types-trace" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdff93fa38be6982f8613a060e18fa0a37ce440d69ed3b7f37c6c69036ce1c53" +checksum = "db14a83665cd28ffd01939f04c2adf0e0fd9bb648b73ca651dcaa0869dae027f" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", "alloy-serde", "serde", "serde_json", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] name = "alloy-rpc-types-txpool" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d9dc647985db41fd164e807577134da1179b9f5ba0959f8698d6587eaa568f5" +checksum = "0a574e97dff62097d22d6cd360f898f3d069239ca0ca7bfc2e5e7b22815ec572" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -554,9 +554,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3dc8d4a08ffc90c1381d39a4afa2227668259a42c97ab6eecf51cbd82a8761" +checksum = "5851bf8d5ad33014bd0c45153c603303e730acc8a209450a7ae6b4a12c2789e2" dependencies = [ "alloy-primitives", "serde", @@ -565,9 +565,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16188684100f6e0f2a2b949968fe3007749c5be431549064a1bce4e7b3a196a9" +checksum = "7e10ca565da6500cca015ba35ee424d59798f2e1b85bc0dd8f81dafd401f029a" dependencies = [ "alloy-dyn-abi", "alloy-primitives", @@ -576,14 +576,14 @@ dependencies = [ "auto_impl", "elliptic-curve", "k256", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] name = "alloy-signer-aws" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe06d524ac84fefce1184f2d1273704e62faade7ff1f29c17ac9d493d3ffbdbf" +checksum = "1e774d4203ad7dbeba06876c8528a169b7cb56770bd900bc061e6a2c2756a736" dependencies = [ "alloy-consensus", "alloy-network", @@ -593,15 +593,15 @@ dependencies = [ "aws-sdk-kms", "k256", "spki", - "thiserror 2.0.7", + "thiserror 2.0.9", "tracing", ] [[package]] name = "alloy-signer-gcp" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "492cedcb4819a588aaef8d59edd5d65291f485d25f64b2aa0806dd86feeafd18" +checksum = "9843facd50077d2010ac0ef9e9176f8a06f2e2c8e653d83d82859803c623c6fc" dependencies = [ "alloy-consensus", "alloy-network", @@ -611,15 +611,15 @@ dependencies = [ "gcloud-sdk", "k256", "spki", - "thiserror 2.0.7", + "thiserror 2.0.9", "tracing", ] [[package]] name = "alloy-signer-ledger" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "426409a02587b98e118d2fd32dda3f423805e264a32f9e247a65164163bc0e9b" +checksum = "08367716d2eee6f15f0f7ee2e855decbfedd12be12fe5f490a2d2717deda95bf" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -631,15 +631,15 @@ dependencies = [ "coins-ledger", "futures-util", "semver 1.0.24", - "thiserror 2.0.7", + "thiserror 2.0.9", "tracing", ] [[package]] name = "alloy-signer-local" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2184dab8c9493ab3e1c9f6bd3bdb563ed322b79023d81531935e84a4fdf7cf1" +checksum = "47fababf5a745133490cde927d48e50267f97d3d1209b9fc9f1d1d666964d172" dependencies = [ "alloy-consensus", "alloy-network", @@ -651,14 +651,14 @@ dependencies = [ "eth-keystore", "k256", "rand", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] name = "alloy-signer-trezor" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290ead62e020b751761de95f60056340faba341b20493ae929013d1357b9ba5b" +checksum = "cfbd920ad5dc03e1904827d30fd2ed874968c33885e254b2c2f59503b33e4bb8" dependencies = [ "alloy-consensus", "alloy-network", @@ -666,7 +666,7 @@ dependencies = [ "alloy-signer", "async-trait", "semver 1.0.24", - "thiserror 2.0.7", + "thiserror 2.0.9", "tracing", "trezor-client", ] @@ -746,9 +746,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628be5b9b75e4f4c4f2a71d985bbaca4f23de356dc83f1625454c505f5eef4df" +checksum = "538a04a37221469cac0ce231b737fd174de2fdfcdd843bdd068cb39ed3e066ad" dependencies = [ "alloy-json-rpc", "base64 0.22.1", @@ -756,7 +756,7 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror 2.0.7", + "thiserror 2.0.9", "tokio", "tower 0.5.2", "tracing", @@ -766,9 +766,9 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e24412cf72f79c95cd9b1d9482e3a31f9d94c24b43c4b3b710cc8d4341eaab0" +checksum = "2ed40eb1e1265b2911512f6aa1dcece9702d078f5a646730c45e39e2be00ac1c" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -781,9 +781,9 @@ dependencies = [ [[package]] name = "alloy-transport-ipc" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0577a1f67ce70ece3f2b27cf1011da7222ef0a5701f7dcb558e5356278eeb531" +checksum = "a7a172a59d24706b26a79a837f86d51745cb26ca6f8524712acd0208a14cff95" dependencies = [ "alloy-json-rpc", "alloy-pubsub", @@ -802,9 +802,9 @@ dependencies = [ [[package]] name = "alloy-transport-ws" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca46272d17f9647fdb56080ed26c72b3ea5078416831130f5ed46f3b4be0ed6" +checksum = "fba0e39d181d13c266dbb8ca54ed584a2c66d6e9279afca89c7a6b1825e98abb" dependencies = [ "alloy-pubsub", "alloy-transport", @@ -968,7 +968,7 @@ dependencies = [ "foundry-evm", "foundry-test-utils", "futures", - "hyper 1.5.1", + "hyper 1.5.2", "itertools 0.13.0", "k256", "op-alloy-consensus", @@ -981,7 +981,7 @@ dependencies = [ "serde_repr", "similar-asserts", "tempfile", - "thiserror 2.0.7", + "thiserror 2.0.9", "tikv-jemallocator", "tokio", "tower 0.4.13", @@ -1012,7 +1012,7 @@ dependencies = [ "revm", "serde", "serde_json", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] @@ -1038,7 +1038,7 @@ dependencies = [ "pin-project 1.1.7", "serde", "serde_json", - "thiserror 2.0.7", + "thiserror 2.0.9", "tokio-util", "tower-http", "tracing", @@ -1338,9 +1338,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-config" -version = "1.5.10" +version = "1.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b49afaa341e8dd8577e1a2200468f98956d6eda50bcf4a53246cc00174ba924" +checksum = "a5d1c2c88936a73c699225d0bc00684a534166b0cebc2659c3cdf08de8edc64c" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1349,7 +1349,7 @@ dependencies = [ "aws-sdk-sts", "aws-smithy-async", "aws-smithy-http", - "aws-smithy-json 0.60.7", + "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -1380,9 +1380,9 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.4.4" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5ac934720fbb46206292d2c75b57e67acfc56fe7dfd34fb9a02334af08409ea" +checksum = "300a12520b4e6d08b73f77680f12c16e8ae43250d55100e0b2be46d78da16a48" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -1405,15 +1405,15 @@ dependencies = [ [[package]] name = "aws-sdk-kms" -version = "1.51.0" +version = "1.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c30f6fd5646b99d9b45ec3a0c22e67112c175b2383100c960d7ee39d96c8d96" +checksum = "0ff4c717bf02350576b1542d7534edda68b95299b72700424978afd125b0b507" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", - "aws-smithy-json 0.61.1", + "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -1427,15 +1427,15 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.50.0" +version = "1.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ca43a4ef210894f93096039ef1d6fa4ad3edfabb3be92b80908b9f2e4b4eab" +checksum = "74995133da38f109a0eb8e8c886f9e80c713b6e9f2e6e5a6a1ba4450ce2ffc46" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", - "aws-smithy-json 0.61.1", + "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -1449,15 +1449,15 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.51.0" +version = "1.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abaf490c2e48eed0bb8e2da2fb08405647bd7f253996e0f93b981958ea0f73b0" +checksum = "e7062a779685cbf3b2401eb36151e2c6589fd5f3569b8a6bc2d199e5aaa1d059" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", - "aws-smithy-json 0.61.1", + "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -1471,15 +1471,15 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.51.0" +version = "1.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b68fde0d69c8bfdc1060ea7da21df3e39f6014da316783336deff0a9ec28f4bf" +checksum = "299dae7b1dc0ee50434453fa5a229dc4b22bd3ee50409ff16becf1f7346e0193" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", - "aws-smithy-json 0.61.1", + "aws-smithy-json", "aws-smithy-query", "aws-smithy-runtime", "aws-smithy-runtime-api", @@ -1517,9 +1517,9 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" +checksum = "8aa8ff1492fd9fb99ae28e8467af0dbbb7c31512b16fabf1a0f10d7bb6ef78bb" dependencies = [ "futures-util", "pin-project-lite", @@ -1546,15 +1546,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "aws-smithy-json" -version = "0.60.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" -dependencies = [ - "aws-smithy-types", -] - [[package]] name = "aws-smithy-json" version = "0.61.1" @@ -1576,9 +1567,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.7.4" +version = "1.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f20685047ca9d6f17b994a07f629c813f08b5bce65523e47124879e60103d45" +checksum = "431a10d0e07e09091284ef04453dae4069283aa108d209974d67e77ae1caa658" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -1591,7 +1582,7 @@ dependencies = [ "http-body 0.4.6", "http-body 1.0.1", "httparse", - "hyper 0.14.31", + "hyper 0.14.32", "hyper-rustls 0.24.2", "once_cell", "pin-project-lite", @@ -1620,9 +1611,9 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.9" +version = "1.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fbd94a32b3a7d55d3806fe27d98d3ad393050439dd05eb53ece36ec5e3d3510" +checksum = "8ecbf4d5dfb169812e2b240a4350f15ad3c6b03a54074e5712818801615f2dc5" dependencies = [ "base64-simd", "bytes", @@ -1678,7 +1669,7 @@ dependencies = [ "http 1.2.0", "http-body 1.0.1", "http-body-util", - "hyper 1.5.1", + "hyper 1.5.2", "hyper-util", "itoa", "matchit", @@ -1914,9 +1905,9 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "bytemuck" -version = "1.20.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" [[package]] name = "byteorder" @@ -2087,9 +2078,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.4" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9157bbaa6b165880c27a4293a474c91cdcf265cc68cc829bf10be0964a391caf" +checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" dependencies = [ "shlex", ] @@ -2227,9 +2218,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.38" +version = "4.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9647a559c112175f17cf724dc72d3645680a883c58481332779192b0d8e7a01" +checksum = "ac2e663e3e3bed2d32d065a8404024dad306e699a04263ec59919529f803aee9" dependencies = [ "clap", ] @@ -2448,15 +2439,15 @@ checksum = "baf0a07a401f374238ab8e2f11a104d2851bf9ce711ec69804834de8af45c7af" [[package]] name = "console" -version = "0.15.8" +version = "0.15.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" dependencies = [ "encode_unicode", - "lazy_static", "libc", - "unicode-width 0.1.14", - "windows-sys 0.52.0", + "once_cell", + "unicode-width 0.2.0", + "windows-sys 0.59.0", ] [[package]] @@ -2543,18 +2534,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -2571,9 +2562,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crossterm" @@ -3052,9 +3043,9 @@ dependencies = [ [[package]] name = "encode_unicode" -version = "0.3.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "endian-type" @@ -3075,9 +3066,9 @@ dependencies = [ [[package]] name = "env_filter" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" dependencies = [ "log", "regex", @@ -3085,9 +3076,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" dependencies = [ "anstream", "anstyle", @@ -3304,6 +3295,17 @@ dependencies = [ "bytes", ] +[[package]] +name = "fastrlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + [[package]] name = "fd-lock" version = "4.0.2" @@ -3388,7 +3390,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide 0.8.2", ] [[package]] @@ -3399,9 +3401,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" [[package]] name = "foreign-types" @@ -3469,7 +3471,7 @@ dependencies = [ "futures", "globset", "humantime-serde", - "hyper 1.5.1", + "hyper 1.5.2", "indicatif", "inferno", "itertools 0.13.0", @@ -3496,7 +3498,7 @@ dependencies = [ "strum", "svm-rs", "tempfile", - "thiserror 2.0.7", + "thiserror 2.0.9", "tikv-jemallocator", "tokio", "toml 0.8.19", @@ -3529,7 +3531,7 @@ dependencies = [ "serde", "serde_json", "solang-parser", - "thiserror 2.0.7", + "thiserror 2.0.9", "toml 0.8.19", "tracing", ] @@ -3544,7 +3546,7 @@ dependencies = [ "itertools 0.13.0", "similar-asserts", "solang-parser", - "thiserror 2.0.7", + "thiserror 2.0.9", "toml 0.8.19", "tracing", "tracing-subscriber", @@ -3732,7 +3734,7 @@ dependencies = [ "semver 1.0.24", "serde", "serde_json", - "thiserror 2.0.7", + "thiserror 2.0.9", "toml 0.8.19", "tracing", "vergen", @@ -3831,7 +3833,7 @@ dependencies = [ "serde_json", "similar-asserts", "terminal_size", - "thiserror 2.0.7", + "thiserror 2.0.9", "tokio", "tower 0.4.13", "tracing", @@ -3890,7 +3892,7 @@ dependencies = [ "svm-rs", "svm-rs-builds", "tempfile", - "thiserror 2.0.7", + "thiserror 2.0.9", "tokio", "tracing", "winnow", @@ -3924,7 +3926,7 @@ dependencies = [ "serde", "serde_json", "serde_repr", - "thiserror 2.0.7", + "thiserror 2.0.9", "tokio", "tracing", "walkdir", @@ -3963,7 +3965,7 @@ dependencies = [ "serde_json", "svm-rs", "tempfile", - "thiserror 2.0.7", + "thiserror 2.0.9", "tokio", "walkdir", ] @@ -3997,7 +3999,7 @@ dependencies = [ "similar-asserts", "solang-parser", "tempfile", - "thiserror 2.0.7", + "thiserror 2.0.9", "toml 0.8.19", "toml_edit", "tracing", @@ -4046,7 +4048,7 @@ dependencies = [ "revm", "revm-inspectors", "serde", - "thiserror 2.0.7", + "thiserror 2.0.9", "tracing", ] @@ -4092,7 +4094,7 @@ dependencies = [ "revm-inspectors", "serde", "serde_json", - "thiserror 2.0.7", + "thiserror 2.0.9", "tokio", "tracing", "url", @@ -4135,7 +4137,7 @@ dependencies = [ "rand", "revm", "serde", - "thiserror 2.0.7", + "thiserror 2.0.9", "tracing", ] @@ -4185,7 +4187,7 @@ dependencies = [ "revm", "serde", "serde_json", - "thiserror 2.0.7", + "thiserror 2.0.9", "tokio", "tracing", "url", @@ -4198,7 +4200,7 @@ dependencies = [ "alloy-primitives", "foundry-compilers", "semver 1.0.24", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] @@ -4260,7 +4262,7 @@ dependencies = [ "gcloud-sdk", "rpassword", "serde", - "thiserror 2.0.7", + "thiserror 2.0.9", "tokio", "tracing", ] @@ -4273,9 +4275,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "fs4" -version = "0.9.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c6b3bd49c37d2aa3f3f2220233b29a7cd23f79d1fe70e5337d25fb390793de" +checksum = "c29c30684418547d476f0b48e84f4821639119c483b1eccd566c8cd0cd05f521" dependencies = [ "rustix", "windows-sys 0.52.0", @@ -4417,7 +4419,7 @@ dependencies = [ "bytes", "chrono", "futures", - "hyper 1.5.1", + "hyper 1.5.2", "jsonwebtoken", "once_cell", "prost", @@ -4523,7 +4525,7 @@ dependencies = [ "bstr", "gix-path", "libc", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] @@ -4535,7 +4537,7 @@ dependencies = [ "bstr", "itoa", "jiff", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] @@ -4626,7 +4628,7 @@ dependencies = [ "gix-trace", "home", "once_cell", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] @@ -4698,7 +4700,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd520d09f9f585b34b32aba1d0b36ada89ab7fefb54a8ca3fe37fc482a750937" dependencies = [ "bstr", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] @@ -4884,11 +4886,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4997,9 +4999,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.31" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ "bytes", "futures-channel", @@ -5021,9 +5023,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" dependencies = [ "bytes", "futures-channel", @@ -5048,7 +5050,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.31", + "hyper 0.14.32", "log", "rustls 0.21.12", "rustls-native-certs 0.6.3", @@ -5058,13 +5060,13 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.3" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ "futures-util", "http 1.2.0", - "hyper 1.5.1", + "hyper 1.5.2", "hyper-util", "rustls 0.23.20", "rustls-native-certs 0.8.1", @@ -5081,7 +5083,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.5.1", + "hyper 1.5.2", "hyper-util", "pin-project-lite", "tokio", @@ -5096,7 +5098,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.5.1", + "hyper 1.5.2", "hyper-util", "native-tls", "tokio", @@ -5115,7 +5117,7 @@ dependencies = [ "futures-util", "http 1.2.0", "http-body 1.0.1", - "hyper 1.5.1", + "hyper 1.5.2", "pin-project-lite", "socket2", "tokio", @@ -5470,9 +5472,9 @@ dependencies = [ [[package]] name = "instability" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b829f37dead9dc39df40c2d3376c179fdfd2ac771f53f55d3c30dc096a3c0c6e" +checksum = "898e106451f7335950c9cc64f8ec67b5f65698679ac67ed00619aeef14e1cf75" dependencies = [ "darling", "indoc", @@ -5718,9 +5720,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.168" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libdbus-sys" @@ -5993,9 +5995,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" dependencies = [ "adler2", ] @@ -6369,9 +6371,9 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "op-alloy-consensus" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "848b3567a9a469ab0c9c712fca0fd6bbce13a9a0b723c94cb81214f53507cf07" +checksum = "c698f80ee53e56d1b60a97e9d90ad09788b516c964c9c97fb5927860b812ef0d" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6380,14 +6382,14 @@ dependencies = [ "alloy-serde", "derive_more", "serde", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] name = "op-alloy-rpc-types" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a555dd1bd39cbcdd60b92f03a21871767a16e3a2ce2f82a26cff9aade56d35f" +checksum = "b5aef2128fe8979596b3a1f79a2454f3e32fd239889a03d50fe686b9a2f30a16" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6659,7 +6661,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 2.0.7", + "thiserror 2.0.9", "ucd-trie", ] @@ -6885,9 +6887,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "predicates" -version = "3.1.2" +version = "3.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" dependencies = [ "anstyle", "predicates-core", @@ -6895,15 +6897,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" [[package]] name = "predicates-tree" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" dependencies = [ "predicates-core", "termtree", @@ -7082,9 +7084,9 @@ dependencies = [ [[package]] name = "proptest-derive" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff7ff745a347b87471d859a377a9a404361e7efc2a971d73424a6d183c0fc77" +checksum = "4ee1c9ac207483d5e7db4940700de86a9aae46ef90c48b57f99fe7edb8345e49" dependencies = [ "proc-macro2", "quote", @@ -7178,7 +7180,7 @@ dependencies = [ "newtype-uuid", "quick-xml 0.37.1", "strip-ansi-escapes", - "thiserror 2.0.7", + "thiserror 2.0.9", "uuid 1.11.0", ] @@ -7213,7 +7215,7 @@ dependencies = [ "rustc-hash", "rustls 0.23.20", "socket2", - "thiserror 2.0.7", + "thiserror 2.0.9", "tokio", "tracing", ] @@ -7232,7 +7234,7 @@ dependencies = [ "rustls 0.23.20", "rustls-pki-types", "slab", - "thiserror 2.0.7", + "thiserror 2.0.9", "tinyvec", "tracing", "web-time", @@ -7240,9 +7242,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52cd4b1eff68bf27940dd39811292c49e007f4d0b4c357358dc9b0197be6b527" +checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" dependencies = [ "cfg_aliases 0.2.1", "libc", @@ -7449,8 +7451,8 @@ dependencies = [ "http 1.2.0", "http-body 1.0.1", "http-body-util", - "hyper 1.5.1", - "hyper-rustls 0.27.3", + "hyper 1.5.2", + "hyper-rustls 0.27.5", "hyper-tls", "hyper-util", "ipnet", @@ -7516,7 +7518,7 @@ dependencies = [ "revm", "serde", "serde_json", - "thiserror 2.0.7", + "thiserror 2.0.9", ] [[package]] @@ -7657,17 +7659,19 @@ dependencies = [ [[package]] name = "ruint" -version = "1.12.3" +version = "1.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" +checksum = "f5ef8fb1dd8de3870cb8400d51b4c2023854bbafd5431a3ac7e7317243e22d2f" dependencies = [ "alloy-rlp", "arbitrary", "ark-ff 0.3.0", "ark-ff 0.4.2", "bytes", - "fastrlp", + "fastrlp 0.3.1", + "fastrlp 0.4.0", "num-bigint", + "num-integer", "num-traits", "parity-scale-codec", "primitive-types", @@ -7796,7 +7800,7 @@ dependencies = [ "openssl-probe", "rustls-pki-types", "schannel", - "security-framework 3.0.1", + "security-framework 3.1.0", ] [[package]] @@ -7947,9 +7951,9 @@ dependencies = [ [[package]] name = "scc" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b202022bb57c049555430e11fc22fea12909276a80a4c3d368da36ac1d88ed" +checksum = "94b13f8ea6177672c49d12ed964cca44836f59621981b04a3e26b87e675181de" dependencies = [ "sdd", ] @@ -8034,9 +8038,9 @@ dependencies = [ [[package]] name = "sdd" -version = "3.0.4" +version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49c1eeaf4b6a87c7479688c6d52b9f1153cedd3c489300564f932b065c6eab95" +checksum = "478f121bb72bbf63c52c93011ea1791dca40140dfe13f8336c4c5ac952c33aa9" [[package]] name = "sec1" @@ -8099,9 +8103,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.0.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1415a607e92bec364ea2cf9264646dcce0f91e6d65281bd6f2819cca3bf39c8" +checksum = "81d3f8c9bfcc3cbb6b0179eb57042d75b1582bdc65c3cb95f3fa999509c03cbc" dependencies = [ "bitflags 2.6.0", "core-foundation 0.10.0", @@ -8112,9 +8116,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.1" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5" dependencies = [ "core-foundation-sys", "libc", @@ -8186,9 +8190,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.134" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" dependencies = [ "indexmap 2.7.0", "itoa", @@ -8453,9 +8457,9 @@ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" [[package]] name = "snapbox" -version = "0.6.20" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1373ce406dfad473059bbc31d807715642182bbc952a811952b58d1c9e41dcfa" +checksum = "96dcfc4581e3355d70ac2ee14cfdf81dce3d85c85f1ed9e2c1d3013f53b3436b" dependencies = [ "anstream", "anstyle", @@ -8641,7 +8645,7 @@ dependencies = [ "serde", "serde_json", "sha2", - "thiserror 2.0.7", + "thiserror 2.0.9", "tokio", "toml_edit", "uuid 1.11.0", @@ -8767,9 +8771,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "svm-rs" -version = "0.5.7" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aebac1b1ef2b46e2e2bdf3c09db304800f2a77c1fa902bd5231490203042be8" +checksum = "a1e9bc6b09b8a7a919128f8c029ae4048d83f814af557e948115273c75864acf" dependencies = [ "const-hex", "dirs 5.0.1", @@ -8780,16 +8784,16 @@ dependencies = [ "serde_json", "sha2", "tempfile", - "thiserror 1.0.69", + "thiserror 2.0.9", "url", "zip", ] [[package]] name = "svm-rs-builds" -version = "0.5.7" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fa0f145894cb4d1c14446f08098ee5f21fc37ccbd1a7dd9dd355bbc806de3b" +checksum = "34d0964cd9dfcbf8bd21057c1a4aa293fefab208306461989ce723dd9c51e71e" dependencies = [ "build_const", "const-hex", @@ -8918,9 +8922,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "textwrap" @@ -8944,11 +8948,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.7" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93605438cbd668185516ab499d589afb7ee1859ea3d5fc8f6b0755e1c7443767" +checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" dependencies = [ - "thiserror-impl 2.0.7", + "thiserror-impl 2.0.9", ] [[package]] @@ -8964,9 +8968,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.7" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d8749b4531af2117677a5fcd12b1348a3fe2b81e36e61ffeac5c4aa3273e36" +checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" dependencies = [ "proc-macro2", "quote", @@ -9066,9 +9070,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -9250,7 +9254,7 @@ dependencies = [ "http 1.2.0", "http-body 1.0.1", "http-body-util", - "hyper 1.5.1", + "hyper 1.5.2", "hyper-timeout", "hyper-util", "percent-encoding", @@ -10473,9 +10477,9 @@ dependencies = [ [[package]] name = "zip" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d52293fc86ea7cf13971b3bb81eb21683636e7ae24c729cdaf1b7c4157a352" +checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45" dependencies = [ "arbitrary", "bzip2", @@ -10485,7 +10489,7 @@ dependencies = [ "flate2", "indexmap 2.7.0", "memchr", - "thiserror 2.0.7", + "thiserror 2.0.9", "zopfli", ] From 3ba3d5f9e6008779c68b94ef9a0015ca2fe60b6a Mon Sep 17 00:00:00 2001 From: Delweng <delweng@gmail.com> Date: Tue, 24 Dec 2024 16:27:43 +0800 Subject: [PATCH 23/45] feat(cast): pretty print other receipt fields (#9589) * fix(cast): pretty print other receipt fields Signed-off-by: jsvisa <delweng@gmail.com> * feat(cast): add other receipt fields pretty test Signed-off-by: jsvisa <delweng@gmail.com> * fix(ui): receipt column length 20 Signed-off-by: jsvisa <delweng@gmail.com> * fmt Signed-off-by: jsvisa <delweng@gmail.com> * fix receipt indent test Signed-off-by: jsvisa <delweng@gmail.com> * fix test case /2 Signed-off-by: jsvisa <delweng@gmail.com> * fix revert reason indent Signed-off-by: jsvisa <delweng@gmail.com> --------- Signed-off-by: jsvisa <delweng@gmail.com> --- crates/cast/tests/cli/main.rs | 74 +++++++++++------------ crates/common/fmt/src/ui.rs | 99 ++++++++++++++++++++++++------- crates/common/src/transactions.rs | 2 +- 3 files changed, 116 insertions(+), 59 deletions(-) diff --git a/crates/cast/tests/cli/main.rs b/crates/cast/tests/cli/main.rs index 3c3096a36..c87c5f7f2 100644 --- a/crates/cast/tests/cli/main.rs +++ b/crates/cast/tests/cli/main.rs @@ -810,24 +810,24 @@ casttest!(receipt_revert_reason, |_prj, cmd| { .assert_success() .stdout_eq(str![[r#" -blockHash 0x2cfe65be49863676b6dbc04d58176a14f39b123f1e2f4fea0383a2d82c2c50d0 -blockNumber 16239315 -contractAddress -cumulativeGasUsed 10743428 -effectiveGasPrice 10539984136 -from 0x199D5ED7F45F4eE35960cF22EAde2076e95B253F -gasUsed 21000 -logs [] -logsBloom 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -root -status 1 (success) -transactionHash 0x44f2aaa351460c074f2cb1e5a9e28cbc7d83f33e425101d2de14331c7b7ec31e -transactionIndex 116 -type 0 -blobGasPrice -blobGasUsed -authorizationList -to 0x91da5bf3F8Eb72724E6f50Ec6C3D199C6355c59c +blockHash 0x2cfe65be49863676b6dbc04d58176a14f39b123f1e2f4fea0383a2d82c2c50d0 +blockNumber 16239315 +contractAddress +cumulativeGasUsed 10743428 +effectiveGasPrice 10539984136 +from 0x199D5ED7F45F4eE35960cF22EAde2076e95B253F +gasUsed 21000 +logs [] +logsBloom 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +root +status 1 (success) +transactionHash 0x44f2aaa351460c074f2cb1e5a9e28cbc7d83f33e425101d2de14331c7b7ec31e +transactionIndex 116 +type 0 +blobGasPrice +blobGasUsed +authorizationList +to 0x91da5bf3F8Eb72724E6f50Ec6C3D199C6355c59c "#]]); @@ -844,25 +844,25 @@ to 0x91da5bf3F8Eb72724E6f50Ec6C3D199C6355c59c .assert_success() .stdout_eq(str![[r#" -blockHash 0x883f974b17ca7b28cb970798d1c80f4d4bb427473dc6d39b2a7fe24edc02902d -blockNumber 14839405 -contractAddress -cumulativeGasUsed 20273649 -effectiveGasPrice 21491736378 -from 0x3cF412d970474804623bb4e3a42dE13F9bCa5436 -gasUsed 24952 -logs [] -logsBloom 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -root -status 0 (failed) -transactionHash 0x0e07d8b53ed3d91314c80e53cf25bcde02084939395845cbb625b029d568135c -transactionIndex 173 -type 2 -blobGasPrice -blobGasUsed -authorizationList -to 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45 -revertReason Transaction too old, data: "0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000135472616e73616374696f6e20746f6f206f6c6400000000000000000000000000" +blockHash 0x883f974b17ca7b28cb970798d1c80f4d4bb427473dc6d39b2a7fe24edc02902d +blockNumber 14839405 +contractAddress +cumulativeGasUsed 20273649 +effectiveGasPrice 21491736378 +from 0x3cF412d970474804623bb4e3a42dE13F9bCa5436 +gasUsed 24952 +logs [] +logsBloom 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +root +status 0 (failed) +transactionHash 0x0e07d8b53ed3d91314c80e53cf25bcde02084939395845cbb625b029d568135c +transactionIndex 173 +type 2 +blobGasPrice +blobGasUsed +authorizationList +to 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45 +revertReason Transaction too old, data: "0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000135472616e73616374696f6e20746f6f206f6c6400000000000000000000000000" "#]]); }); diff --git a/crates/common/fmt/src/ui.rs b/crates/common/fmt/src/ui.rs index 9962a8583..0798967c6 100644 --- a/crates/common/fmt/src/ui.rs +++ b/crates/common/fmt/src/ui.rs @@ -193,23 +193,23 @@ impl UIfmt for AnyTransactionReceipt { let mut pretty = format!( " -blockHash {} -blockNumber {} -contractAddress {} -cumulativeGasUsed {} -effectiveGasPrice {} -from {} -gasUsed {} -logs {} -logsBloom {} -root {} -status {} -transactionHash {} -transactionIndex {} -type {} -blobGasPrice {} -blobGasUsed {} -authorizationList {}", +blockHash {} +blockNumber {} +contractAddress {} +cumulativeGasUsed {} +effectiveGasPrice {} +from {} +gasUsed {} +logs {} +logsBloom {} +root {} +status {} +transactionHash {} +transactionIndex {} +type {} +blobGasPrice {} +blobGasUsed {} +authorizationList {}", block_hash.pretty(), block_number.pretty(), contract_address.pretty(), @@ -233,13 +233,11 @@ authorizationList {}", ); if let Some(to) = to { - pretty.push_str(&format!("\nto {}", to.pretty())); + pretty.push_str(&format!("\nto {}", to.pretty())); } // additional captured fields - for (key, val) in other.iter() { - pretty.push_str(&format!("\n{key} {val}")); - } + pretty.push_str(&other.pretty()); pretty } @@ -1415,4 +1413,63 @@ value 0".to_string(); assert_eq!(Some("1424182926".to_string()), get_pretty_block_attr(&block, "timestamp")); assert_eq!(Some("163591".to_string()), get_pretty_block_attr(&block, "totalDifficulty")); } + + #[test] + fn test_receipt_other_fields_alignment() { + let receipt_json = serde_json::json!( + { + "status": "0x1", + "cumulativeGasUsed": "0x74e483", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x91181b0dca3b29aa136eeb2f536be5ce7b0aebc949be1c44b5509093c516097d", + "transactionIndex": "0x10", + "blockHash": "0x54bafb12e8cea9bb355fbf03a4ac49e42a2a1a80fa6cf4364b342e2de6432b5d", + "blockNumber": "0x7b1ab93", + "gasUsed": "0xc222", + "effectiveGasPrice": "0x18961", + "from": "0x2d815240a61731c75fa01b2793e1d3ed09f289d0", + "to": "0x4200000000000000000000000000000000000000", + "contractAddress": null, + "l1BaseFeeScalar": "0x146b", + "l1BlobBaseFee": "0x6a83078", + "l1BlobBaseFeeScalar": "0xf79c5", + "l1Fee": "0x51a9af7fd3", + "l1GasPrice": "0x972fe4acc", + "l1GasUsed": "0x640" + }); + + let receipt: AnyTransactionReceipt = serde_json::from_value(receipt_json).unwrap(); + let formatted = receipt.pretty(); + + let expected = r#" +blockHash 0x54bafb12e8cea9bb355fbf03a4ac49e42a2a1a80fa6cf4364b342e2de6432b5d +blockNumber 129084307 +contractAddress +cumulativeGasUsed 7660675 +effectiveGasPrice 100705 +from 0x2D815240A61731c75Fa01b2793E1D3eD09F289d0 +gasUsed 49698 +logs [] +logsBloom 0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +root +status 1 (success) +transactionHash 0x91181b0dca3b29aa136eeb2f536be5ce7b0aebc949be1c44b5509093c516097d +transactionIndex 16 +type 2 +blobGasPrice +blobGasUsed +authorizationList +to 0x4200000000000000000000000000000000000000 +l1BaseFeeScalar 5227 +l1BlobBaseFee 111685752 +l1BlobBaseFeeScalar 1014213 +l1Fee 350739202003 +l1GasPrice 40583973580 +l1GasUsed 1600 +"#; + + assert_eq!(formatted.trim(), expected.trim()); + } } diff --git a/crates/common/src/transactions.rs b/crates/common/src/transactions.rs index b725fc068..9148cd6d9 100644 --- a/crates/common/src/transactions.rs +++ b/crates/common/src/transactions.rs @@ -88,7 +88,7 @@ impl UIfmt for TransactionReceiptWithRevertReason { if let Some(revert_reason) = &self.revert_reason { format!( "{} -revertReason {}", +revertReason {}", self.receipt.pretty(), revert_reason ) From 0caabdd3c8456a09604d9030fd9479ad8254346c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 29 Dec 2024 12:01:40 +0100 Subject: [PATCH 24/45] chore(deps): weekly `cargo update` (#9599) Locking 29 packages to latest compatible versions Updating alloy-chains v0.1.49 -> v0.1.51 Updating alloy-trie v0.7.6 -> v0.7.7 Updating anyhow v1.0.94 -> v1.0.95 Updating aws-config v1.5.11 -> v1.5.12 Updating aws-runtime v1.5.1 -> v1.5.2 Updating aws-sdk-kms v1.52.0 -> v1.53.0 Updating aws-sdk-sso v1.51.0 -> v1.52.0 Updating aws-sdk-ssooidc v1.52.0 -> v1.53.0 Updating aws-sdk-sts v1.52.0 -> v1.53.0 Updating aws-smithy-async v1.2.2 -> v1.2.3 Updating aws-smithy-runtime v1.7.5 -> v1.7.6 Updating aws-smithy-types v1.2.10 -> v1.2.11 Updating bon v3.3.0 -> v3.3.2 Updating bon-macros v3.3.0 -> v3.3.2 Updating cc v1.2.5 -> v1.2.6 Updating gix-date v0.9.2 -> v0.9.3 Updating glob v0.3.1 -> v0.3.2 Updating jiff v0.1.15 -> v0.1.16 Updating nybbles v0.2.1 -> v0.3.0 Updating quote v1.0.37 -> v1.0.38 Updating reqwest v0.12.9 -> v0.12.11 Updating rustversion v1.0.18 -> v1.0.19 Updating scc v2.2.6 -> v2.3.0 Updating serde v1.0.216 -> v1.0.217 Updating serde_derive v1.0.216 -> v1.0.217 Updating syn v2.0.90 -> v2.0.93 Updating tracing-tracy v0.11.3 -> v0.11.4 Updating tracy-client v0.17.6 -> v0.18.0 Updating unicase v2.8.0 -> v2.8.1 note: pass `--verbose` to see 13 unchanged dependencies behind latest Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com> --- Cargo.lock | 250 +++++++++++++++++++++++++++-------------------------- 1 file changed, 126 insertions(+), 124 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d4027c358..2ff45031d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,9 +74,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-chains" -version = "0.1.49" +version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830045a4421ee38d3ab570d36d4d2b5152c066e72797139224da8de5d5981fd0" +checksum = "d4e0f0136c085132939da6b753452ebed4efaa73fe523bb855b10c199c2ebfaf" dependencies = [ "alloy-primitives", "num_enum", @@ -410,7 +410,7 @@ checksum = "5a833d97bf8a5f0f878daf2c8451fff7de7f9de38baa5a45d936ec718d81255a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -682,7 +682,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -699,7 +699,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", "syn-solidity", "tiny-keccak", ] @@ -717,7 +717,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.90", + "syn 2.0.93", "syn-solidity", ] @@ -820,9 +820,9 @@ dependencies = [ [[package]] name = "alloy-trie" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a5fd8fea044cc9a8c8a50bb6f28e31f0385d820f116c5b98f6f4e55d6e5590b" +checksum = "1e428104b2445a4f929030891b3dbf8c94433a8349ba6480946bf6af7975c2f6" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -1046,9 +1046,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "arbitrary" @@ -1241,7 +1241,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -1263,7 +1263,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -1274,7 +1274,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -1327,7 +1327,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -1338,9 +1338,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-config" -version = "1.5.11" +version = "1.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d1c2c88936a73c699225d0bc00684a534166b0cebc2659c3cdf08de8edc64c" +checksum = "649316840239f4e58df0b7f620c428f5fababbbca2d504488c641534050bd141" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1380,9 +1380,9 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300a12520b4e6d08b73f77680f12c16e8ae43250d55100e0b2be46d78da16a48" +checksum = "44f6f1124d6e19ab6daf7f2e615644305dc6cb2d706892a8a8c0b98db35de020" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -1405,9 +1405,9 @@ dependencies = [ [[package]] name = "aws-sdk-kms" -version = "1.52.0" +version = "1.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ff4c717bf02350576b1542d7534edda68b95299b72700424978afd125b0b507" +checksum = "e349416a1998fde638deed85c18efeefd81af293439c16d676b7fce992904389" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1427,9 +1427,9 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.51.0" +version = "1.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74995133da38f109a0eb8e8c886f9e80c713b6e9f2e6e5a6a1ba4450ce2ffc46" +checksum = "cb25f7129c74d36afe33405af4517524df8f74b635af8c2c8e91c1552b8397b2" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1449,9 +1449,9 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.52.0" +version = "1.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7062a779685cbf3b2401eb36151e2c6589fd5f3569b8a6bc2d199e5aaa1d059" +checksum = "d03a3d5ef14851625eafd89660a751776f938bf32f309308b20dcca41c44b568" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1471,9 +1471,9 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.52.0" +version = "1.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "299dae7b1dc0ee50434453fa5a229dc4b22bd3ee50409ff16becf1f7346e0193" +checksum = "cf3a9f073ae3a53b54421503063dfb87ff1ea83b876f567d92e8b8d9942ba91b" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1517,9 +1517,9 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8aa8ff1492fd9fb99ae28e8467af0dbbb7c31512b16fabf1a0f10d7bb6ef78bb" +checksum = "427cb637d15d63d6f9aae26358e1c9a9c09d5aa490d64b09354c8217cfef0f28" dependencies = [ "futures-util", "pin-project-lite", @@ -1567,9 +1567,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.7.5" +version = "1.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "431a10d0e07e09091284ef04453dae4069283aa108d209974d67e77ae1caa658" +checksum = "a05dd41a70fc74051758ee75b5c4db2c0ca070ed9229c3df50e9475cda1cb985" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -1611,9 +1611,9 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.10" +version = "1.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecbf4d5dfb169812e2b240a4350f15ad3c6b03a54074e5712818801615f2dc5" +checksum = "38ddc9bd6c28aeb303477170ddd183760a956a03e083b3902a990238a7e3792d" dependencies = [ "base64-simd", "bytes", @@ -1841,9 +1841,9 @@ dependencies = [ [[package]] name = "bon" -version = "3.3.0" +version = "3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f265cdb2e8501f1c952749e78babe8f1937be92c98120e5f78fc72d634682bad" +checksum = "fe7acc34ff59877422326db7d6f2d845a582b16396b6b08194942bf34c6528ab" dependencies = [ "bon-macros", "rustversion", @@ -1851,9 +1851,9 @@ dependencies = [ [[package]] name = "bon-macros" -version = "3.3.0" +version = "3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38aa5c627cd7706490e5b003d685f8b9d69bc343b1a00b9fdd01e75fdf6827cf" +checksum = "4159dd617a7fbc9be6a692fe69dc2954f8e6bb6bb5e4d7578467441390d77fd0" dependencies = [ "darling", "ident_case", @@ -1861,7 +1861,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -2078,9 +2078,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.5" +version = "1.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" +checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333" dependencies = [ "shlex", ] @@ -2244,7 +2244,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -2659,7 +2659,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -2670,7 +2670,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -2743,7 +2743,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -2764,7 +2764,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -2774,7 +2774,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -2795,7 +2795,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", "unicode-xid", ] @@ -2909,7 +2909,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -2934,7 +2934,7 @@ checksum = "8dc51d98e636f5e3b0759a39257458b22619cac7e96d932da6eeb052891bb67c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -3061,7 +3061,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -3196,7 +3196,7 @@ dependencies = [ "regex", "serde", "serde_json", - "syn 2.0.90", + "syn 2.0.93", "toml 0.8.19", "walkdir", ] @@ -3224,7 +3224,7 @@ dependencies = [ "serde", "serde_json", "strum", - "syn 2.0.90", + "syn 2.0.93", "tempfile", "thiserror 1.0.69", "tiny-keccak", @@ -3628,7 +3628,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -4210,7 +4210,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -4370,7 +4370,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -4530,9 +4530,9 @@ dependencies = [ [[package]] name = "gix-date" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "691142b1a34d18e8ed6e6114bc1a2736516c5ad60ef3aa9bd1b694886e3ca92d" +checksum = "c57c477b645ee248b173bb1176b52dd528872f12c50375801a58aaf5ae91113f" dependencies = [ "bstr", "itoa", @@ -4705,9 +4705,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "globset" @@ -4904,7 +4904,7 @@ dependencies = [ "markup5ever", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -5263,7 +5263,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -5363,7 +5363,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -5481,7 +5481,7 @@ dependencies = [ "pretty_assertions", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -5557,11 +5557,12 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jiff" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db69f08d4fb10524cacdb074c10b296299d71274ddbc830a8ee65666867002e9" +checksum = "24a46169c7a10358cdccfb179910e8a5a392fc291bdb409da9aeece5b19786d8" dependencies = [ "jiff-tzdb-platform", + "serde", "windows-sys 0.59.0", ] @@ -5959,7 +5960,7 @@ checksum = "23c9b935fbe1d6cbd1dac857b54a688145e2d93f48db36010514d0f612d0ad67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -6049,7 +6050,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -6323,7 +6324,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -6343,9 +6344,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "nybbles" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95f06be0417d97f81fe4e5c86d7d01b392655a9cac9c19a848aa033e18937b23" +checksum = "55a62e678a89501192cc5ebf47dcbc656b608ae5e1c61c9251fe35230f119fe3" dependencies = [ "alloy-rlp", "const-hex", @@ -6463,7 +6464,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -6626,7 +6627,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -6685,7 +6686,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -6769,7 +6770,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -6827,7 +6828,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -6928,7 +6929,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -7006,7 +7007,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -7026,7 +7027,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", "version_check", "yansi", ] @@ -7090,7 +7091,7 @@ checksum = "4ee1c9ac207483d5e7db4940700de86a9aae46ef90c48b57f99fe7edb8345e49" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -7113,7 +7114,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -7256,9 +7257,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -7438,9 +7439,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.9" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" +checksum = "7fe060fe50f524be480214aba758c71f99f90ee8c83c5a36b5e9e1d568eb4eb3" dependencies = [ "async-compression", "base64 0.22.1", @@ -7478,6 +7479,7 @@ dependencies = [ "tokio-rustls 0.26.1", "tokio-socks", "tokio-util", + "tower 0.5.2", "tower-service", "url", "wasm-bindgen", @@ -7853,9 +7855,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "rusty-fork" @@ -7946,14 +7948,14 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] name = "scc" -version = "2.2.6" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b13f8ea6177672c49d12ed964cca44836f59621981b04a3e26b87e675181de" +checksum = "28e1c91382686d21b5ac7959341fcb9780fa7c03773646995a87c950fa7be640" dependencies = [ "sdd", ] @@ -7988,7 +7990,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -8159,22 +8161,22 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.216" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -8185,7 +8187,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -8229,7 +8231,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -8275,7 +8277,7 @@ checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -8583,7 +8585,7 @@ checksum = "f0cc54b74e214647c1bbfc098d080cc5deac77f8dcb99aca91747276b01a15ad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -8747,7 +8749,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -8815,9 +8817,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "9c786062daee0d6db1132800e623df74274a0a87322d8e183338e01b3d98d058" dependencies = [ "proc-macro2", "quote", @@ -8833,7 +8835,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -8853,7 +8855,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -8963,7 +8965,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -8974,7 +8976,7 @@ checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -9109,7 +9111,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -9383,7 +9385,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -9437,9 +9439,9 @@ dependencies = [ [[package]] name = "tracing-tracy" -version = "0.11.3" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc775fdaf33c3dfd19dc354729e65e87914bc67dcdc390ca1210807b8bee5902" +checksum = "0eaa1852afa96e0fe9e44caa53dc0bd2d9d05e0f2611ce09f97f8677af56e4ba" dependencies = [ "tracing-core", "tracing-subscriber", @@ -9448,9 +9450,9 @@ dependencies = [ [[package]] name = "tracy-client" -version = "0.17.6" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73202d787346a5418f8222eddb5a00f29ea47caf3c7d38a8f2f69f8455fa7c7e" +checksum = "d90a2c01305b02b76fdd89ac8608bae27e173c829a35f7d76a345ab5d33836db" dependencies = [ "loom", "once_cell", @@ -9554,9 +9556,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-bom" @@ -9798,7 +9800,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", "wasm-bindgen-shared", ] @@ -9833,7 +9835,7 @@ checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -10074,7 +10076,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -10085,7 +10087,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -10096,7 +10098,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -10107,7 +10109,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -10387,7 +10389,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", "synstructure", ] @@ -10409,7 +10411,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -10429,7 +10431,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", "synstructure", ] @@ -10450,7 +10452,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] @@ -10472,7 +10474,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.93", ] [[package]] From ffaa68fe083b945a12fc874b722079dda2c209da Mon Sep 17 00:00:00 2001 From: Matthias Seitz <matthias.seitz@outlook.de> Date: Sun, 29 Dec 2024 12:36:29 +0100 Subject: [PATCH 25/45] chore: make clippy happy (#9601) * chore: make clippy happy * allow literals tring with formatting args global --- Cargo.toml | 2 ++ crates/anvil/src/config.rs | 2 +- crates/anvil/src/eth/backend/db.rs | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b6f4fef69..01a6eaa7d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,6 +44,8 @@ uninlined-format-args = "warn" use-self = "warn" redundant-clone = "warn" octal-escapes = "allow" +# until <https://github.com/rust-lang/rust-clippy/issues/13885> is fixed +literal-string-with-formatting-args = "allow" [workspace.lints.rust] rust-2018-idioms = "warn" diff --git a/crates/anvil/src/config.rs b/crates/anvil/src/config.rs index 9e22adeed..7ed1432fd 100644 --- a/crates/anvil/src/config.rs +++ b/crates/anvil/src/config.rs @@ -800,7 +800,7 @@ impl NodeConfig { /// Sets the `fork_chain_id` to use to fork off local cache from #[must_use] pub fn with_fork_chain_id(mut self, fork_chain_id: Option<U256>) -> Self { - self.fork_chain_id = fork_chain_id.map(Into::into); + self.fork_chain_id = fork_chain_id; self } diff --git a/crates/anvil/src/eth/backend/db.rs b/crates/anvil/src/eth/backend/db.rs index db34d9c19..55159f4d3 100644 --- a/crates/anvil/src/eth/backend/db.rs +++ b/crates/anvil/src/eth/backend/db.rs @@ -482,7 +482,7 @@ impl From<Block> for SerializableBlock { Self { header: block.header, transactions: block.transactions.into_iter().map(Into::into).collect(), - ommers: block.ommers.into_iter().map(Into::into).collect(), + ommers: block.ommers.into_iter().collect(), } } } @@ -492,7 +492,7 @@ impl From<SerializableBlock> for Block { Self { header: block.header, transactions: block.transactions.into_iter().map(Into::into).collect(), - ommers: block.ommers.into_iter().map(Into::into).collect(), + ommers: block.ommers.into_iter().collect(), } } } From 4f22a38bd3b32c4017bcef4619b7833613dadc1d Mon Sep 17 00:00:00 2001 From: Delweng <delweng@gmail.com> Date: Mon, 30 Dec 2024 17:06:29 +0800 Subject: [PATCH 26/45] chore(fmt): tx fields indent with the same whitespaces (#9603) chore(fmt): follow the same indent rules of other fields Signed-off-by: jsvisa <delweng@gmail.com> --- crates/common/fmt/src/ui.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/common/fmt/src/ui.rs b/crates/common/fmt/src/ui.rs index 0798967c6..af1bdd5df 100644 --- a/crates/common/fmt/src/ui.rs +++ b/crates/common/fmt/src/ui.rs @@ -507,8 +507,8 @@ impl UIfmt for AnyTxEnvelope { Self::Unknown(tx) => { format!( " -hash {} -type {} +hash {} +type {} {} ", tx.hash.pretty(), From e618b2c202ca442144c3d15591bffaf0bb52bbb6 Mon Sep 17 00:00:00 2001 From: grandizzy <38490174+grandizzy@users.noreply.github.com> Date: Mon, 30 Dec 2024 15:04:16 +0200 Subject: [PATCH 27/45] chore: fix flaky inline config test (#9591) --- crates/forge/tests/cli/inline_config.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/forge/tests/cli/inline_config.rs b/crates/forge/tests/cli/inline_config.rs index 5e0273195..4e05d4b60 100644 --- a/crates/forge/tests/cli/inline_config.rs +++ b/crates/forge/tests/cli/inline_config.rs @@ -254,14 +254,14 @@ forgetest_init!(evm_version, |prj, cmd| { ) .unwrap(); - cmd.arg("test").arg("--evm-version=cancun").assert_success().stdout_eq(str![[r#" + cmd.args(["test", "--evm-version=cancun", "-j1"]).assert_success().stdout_eq(str![[r#" ... -Ran 2 tests for test/inline.sol:FunctionConfig +Ran 2 tests for test/inline.sol:ContractConfig [PASS] test_new() ([GAS]) [PASS] test_old() ([GAS]) Suite result: ok. 2 passed; 0 failed; 0 skipped; [ELAPSED] -Ran 2 tests for test/inline.sol:ContractConfig +Ran 2 tests for test/inline.sol:FunctionConfig [PASS] test_new() ([GAS]) [PASS] test_old() ([GAS]) Suite result: ok. 2 passed; 0 failed; 0 skipped; [ELAPSED] From 68aff728b88bc5677aa11484ac998e13df63bd65 Mon Sep 17 00:00:00 2001 From: Matthias Seitz <matthias.seitz@outlook.de> Date: Mon, 30 Dec 2024 16:44:51 +0100 Subject: [PATCH 28/45] feat: update revm 19 alloy 09 (#9605) * feat: update revm 19 alloy 09 * clippy * updata test * add back max data gas check --- Cargo.lock | 164 ++++++++++--------- Cargo.toml | 58 +++---- crates/anvil/core/src/eth/block.rs | 5 - crates/anvil/core/src/eth/transaction/mod.rs | 9 +- crates/anvil/src/config.rs | 7 +- crates/anvil/src/eth/api.rs | 2 +- crates/anvil/src/eth/backend/executor.rs | 6 +- crates/anvil/src/eth/backend/mem/mod.rs | 20 +-- crates/anvil/src/eth/backend/mem/storage.rs | 7 +- crates/anvil/src/eth/error.rs | 7 +- crates/anvil/src/eth/fees.rs | 11 +- crates/anvil/src/eth/otterscan/api.rs | 2 +- crates/anvil/tests/it/eip4844.rs | 6 +- crates/anvil/tests/it/eip7702.rs | 4 +- crates/anvil/tests/it/fork.rs | 4 +- crates/cast/bin/cmd/wallet/mod.rs | 4 +- crates/cast/bin/tx.rs | 9 +- crates/cast/tests/cli/main.rs | 1 - crates/cheatcodes/src/evm.rs | 5 +- crates/cheatcodes/src/script.rs | 8 +- crates/common/fmt/src/ui.rs | 6 +- crates/evm/core/src/backend/mod.rs | 3 +- crates/evm/evm/src/executors/mod.rs | 4 +- crates/script/src/broadcast.rs | 4 +- crates/script/src/receipts.rs | 2 +- 25 files changed, 181 insertions(+), 177 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2ff45031d..29742a2a1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -86,9 +86,9 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88e1edea70787c33e11197d3f32ae380f3db19e6e061e539a5bcf8184a6b326" +checksum = "db66918860ff33920fb9e6d648d1e8cee275321406ea255ac9320f6562e26fec" dependencies = [ "alloy-eips", "alloy-primitives", @@ -104,9 +104,9 @@ dependencies = [ [[package]] name = "alloy-consensus-any" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b1bb53f40c0273cd1975573cd457b39213e68584e36d1401d25fd0398a1d65" +checksum = "04519b5157de8a2166bddb07d84a63590100f1d3e2b3682144e787f1c27ccdac" dependencies = [ "alloy-consensus", "alloy-eips", @@ -118,9 +118,9 @@ dependencies = [ [[package]] name = "alloy-contract" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b668c78c4b1f12f474ede5a85e8ce550d0aa1ef7d49fd1d22855a43b960e725" +checksum = "8ff00ab4dd371f53e648d65bd5af01057bdad8aaae8b3cd7cee75445575995c1" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -173,9 +173,9 @@ dependencies = [ [[package]] name = "alloy-eip7702" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c986539255fb839d1533c128e190e557e52ff652c9ef62939e233a81dd93f7e" +checksum = "cabf647eb4650c91a9d38cb6f972bb320009e7e9d61765fb688a86f1563b33e8" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -188,9 +188,9 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9fadfe089e9ccc0650473f2d4ef0a28bc015bbca5631d9f0f09e49b557fdb3" +checksum = "e56518f46b074d562ac345238343e2231b672a13aca18142d285f95cc055980b" dependencies = [ "alloy-eip2930", "alloy-eip7702", @@ -206,10 +206,11 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2a4cf7b70f3495788e74ce1c765260ffe38820a2a774ff4aacb62e31ea73f9" +checksum = "2cf200fd4c28435995e47b26d4761a4cf6e1011a13b81f9a9afaf16a93d9fd09" dependencies = [ + "alloy-eips", "alloy-primitives", "alloy-serde", "alloy-trie", @@ -230,9 +231,9 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e29040b9d5fe2fb70415531882685b64f8efd08dfbd6cc907120650504821105" +checksum = "b17c5ada5faf0f9d2921e8b20971eced68abbc92a272b0502cac8b1d00f56777" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -244,9 +245,9 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510cc00b318db0dfccfdd2d032411cfae64fc144aef9679409e014145d3dacc4" +checksum = "24f3117647e3262f6db9e18b371bf67c5810270c0cf915786c30fad3b1739561" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -269,9 +270,9 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9081c099e798b8a2bba2145eb82a9a146f01fc7a35e9ab6e7b43305051f97550" +checksum = "1535a4577648ec2fd3c446d4644d9b8e9e01e5816be53a5d515dc1624e2227b2" dependencies = [ "alloy-consensus", "alloy-eips", @@ -282,9 +283,9 @@ dependencies = [ [[package]] name = "alloy-node-bindings" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef9849fb8bbb28f69f2cbdb4b0dac2f0e35c04f6078a00dfb8486469aed02de" +checksum = "bf741e871fb62c80e0007041e8bc1e81978abfd98aafea8354472f06bfd4d309" dependencies = [ "alloy-genesis", "alloy-primitives", @@ -331,9 +332,9 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc2dfaddd9a30aa870a78a4e1316e3e115ec1e12e552cbc881310456b85c1f24" +checksum = "fcfa2db03d4221b5ca14bff7dbed4712689cb87a3e826af522468783ff05ec5d" dependencies = [ "alloy-chains", "alloy-consensus", @@ -374,9 +375,9 @@ dependencies = [ [[package]] name = "alloy-pubsub" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "695809e743628d54510c294ad17a4645bd9f465aeb0d20ee9ce9877c9712dc9c" +checksum = "4eace70e43b073d4bfc1de915c45993a50facd6526fd8da80204e0f83a9e233a" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -415,9 +416,9 @@ dependencies = [ [[package]] name = "alloy-rpc-client" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531137b283547d5b9a5cafc96b006c64ef76810c681d606f28be9781955293b6" +checksum = "d2ec6963b08f1c6ef8eacc01dbba20f2c6a1533550403f6b52dbbe0da0360834" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -441,9 +442,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3410a472ce26c457e9780f708ee6bd540b30f88f1f31fdab7a11d00bd6aa1aee" +checksum = "138ef78340b47f16ca4d04a4d75fe2ccdb3f1a4f748d5f3b2fbebc43581fd02e" dependencies = [ "alloy-primitives", "alloy-rpc-types-anvil", @@ -457,9 +458,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-anvil" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed06bd8a5fc57b352a6cbac24eec52a4760f08ae2c1eb56ac49c8ed4b02c351" +checksum = "efbe94a1fcd071f19b313e4506d1affee0bd0b4a1cfbfd18a2541fda8e5487cf" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -469,9 +470,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-any" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed98e1af55a7d856bfa385f30f63d8d56be2513593655c904a8f4a7ec963aa3e" +checksum = "c64a83112b09bd293ef522bfa3800fa2d2df4d72f2bcd3a84b08490503b22e55" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", @@ -480,9 +481,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-debug" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1dec1c1b65614ebd5834a7dfddf525a186962082023718e10f4f64ed2d02514" +checksum = "3cb36f68cc0c83120ecfbf0b1862b35f846da8e0cb95be3d10a3a08bfa711248" dependencies = [ "alloy-primitives", "serde", @@ -490,9 +491,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-engine" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03bd16fa4959255ebf4a7702df08f325e5631df5cdca07c8a8e58bdc10fe02e3" +checksum = "2c9d87e5622ed4d471f1eefb99a400cd7e362a1889baa9bb4417742260ca43a8" dependencies = [ "alloy-consensus", "alloy-eips", @@ -508,9 +509,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8737d7a6e37ca7bba9c23e9495c6534caec6760eb24abc9d5ffbaaba147818e1" +checksum = "5fc1892a1ac0d2a49c063f0791aa6bde342f020c5d37aaaec14832b661802cb4" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -520,17 +521,17 @@ dependencies = [ "alloy-rlp", "alloy-serde", "alloy-sol-types", - "derive_more", "itertools 0.13.0", "serde", "serde_json", + "thiserror 2.0.9", ] [[package]] name = "alloy-rpc-types-trace" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db14a83665cd28ffd01939f04c2adf0e0fd9bb648b73ca651dcaa0869dae027f" +checksum = "b25a5e0a7ae0127f20077b23319c8d4a416187c204bf3329ab28a0309ed45535" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -542,9 +543,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-txpool" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a574e97dff62097d22d6cd360f898f3d069239ca0ca7bfc2e5e7b22815ec572" +checksum = "64952ac1199868bcd05b3aae2d5e988e6bd171e42ae71580abe6718263061b27" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -554,9 +555,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5851bf8d5ad33014bd0c45153c603303e730acc8a209450a7ae6b4a12c2789e2" +checksum = "17939f6bef49268e4494158fce1ab8913cd6164ec3f9a4ada2c677b9b5a77f2f" dependencies = [ "alloy-primitives", "serde", @@ -565,9 +566,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e10ca565da6500cca015ba35ee424d59798f2e1b85bc0dd8f81dafd401f029a" +checksum = "77d1f0762a44338f0e05987103bd5919df52170d949080bfebfeb6aaaa867c39" dependencies = [ "alloy-dyn-abi", "alloy-primitives", @@ -581,9 +582,9 @@ dependencies = [ [[package]] name = "alloy-signer-aws" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e774d4203ad7dbeba06876c8528a169b7cb56770bd900bc061e6a2c2756a736" +checksum = "63cf9487165bcf15e15f033529ca8b8c63a26e5f9b435fbd239f786391ca2cb3" dependencies = [ "alloy-consensus", "alloy-network", @@ -599,9 +600,9 @@ dependencies = [ [[package]] name = "alloy-signer-gcp" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9843facd50077d2010ac0ef9e9176f8a06f2e2c8e653d83d82859803c623c6fc" +checksum = "2a9f720296bf196732ecc6717aae33a4192c430b779b709557073329ae7ebeb4" dependencies = [ "alloy-consensus", "alloy-network", @@ -617,9 +618,9 @@ dependencies = [ [[package]] name = "alloy-signer-ledger" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08367716d2eee6f15f0f7ee2e855decbfedd12be12fe5f490a2d2717deda95bf" +checksum = "3eaa7c88f704957cd9a8021be4d9e1d12da2cea55b8ce0551224805520ab0720" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -637,9 +638,9 @@ dependencies = [ [[package]] name = "alloy-signer-local" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47fababf5a745133490cde927d48e50267f97d3d1209b9fc9f1d1d666964d172" +checksum = "59dd2f16055f532f83a8f8e3c13cf1e3b5ff78afdef82edb613946156e542272" dependencies = [ "alloy-consensus", "alloy-network", @@ -656,9 +657,9 @@ dependencies = [ [[package]] name = "alloy-signer-trezor" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfbd920ad5dc03e1904827d30fd2ed874968c33885e254b2c2f59503b33e4bb8" +checksum = "9bd52d50f219e5160799cc569c1a7efd20d4d92cc2c2352a59874f71f02d642c" dependencies = [ "alloy-consensus", "alloy-network", @@ -746,9 +747,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "538a04a37221469cac0ce231b737fd174de2fdfcdd843bdd068cb39ed3e066ad" +checksum = "3a3827275a4eed3431ce876a59c76fd19effc2a8c09566b2603e3a3376d38af0" dependencies = [ "alloy-json-rpc", "base64 0.22.1", @@ -766,9 +767,9 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ed40eb1e1265b2911512f6aa1dcece9702d078f5a646730c45e39e2be00ac1c" +checksum = "958417ddf333c55b0627cb7fbee7c6666895061dee79f50404dd6dbdd8e9eba0" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -781,9 +782,9 @@ dependencies = [ [[package]] name = "alloy-transport-ipc" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a172a59d24706b26a79a837f86d51745cb26ca6f8524712acd0208a14cff95" +checksum = "168abcf4337c3fbc0bf9030e62bbaca8b9a0fddf687ecc6585e2e6515dde8b0d" dependencies = [ "alloy-json-rpc", "alloy-pubsub", @@ -802,9 +803,9 @@ dependencies = [ [[package]] name = "alloy-transport-ws" -version = "0.8.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fba0e39d181d13c266dbb8ca54ed584a2c66d6e9279afca89c7a6b1825e98abb" +checksum = "fcaf327f8d3e938272c2eace672094d3800e069e3f34137358e563faaa314f8a" dependencies = [ "alloy-pubsub", "alloy-transport", @@ -4171,9 +4172,9 @@ dependencies = [ [[package]] name = "foundry-fork-db" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "491e9f9f138086b3627a8c406730dfbb6afcdcf688e6da0eb15df52f0c8ed163" +checksum = "89a794c8a78ba20568a0c86b035768da7e81fed3c51cecea57f81523123cbcfa" dependencies = [ "alloy-consensus", "alloy-primitives", @@ -6372,9 +6373,9 @@ checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "op-alloy-consensus" -version = "0.8.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c698f80ee53e56d1b60a97e9d90ad09788b516c964c9c97fb5927860b812ef0d" +checksum = "0adb232ec805af3aa35606c19329aa7dc44c4457ae318ed0b8fc7f799dd7dbfe" dependencies = [ "alloy-consensus", "alloy-eips", @@ -6388,9 +6389,9 @@ dependencies = [ [[package]] name = "op-alloy-rpc-types" -version = "0.8.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aef2128fe8979596b3a1f79a2454f3e32fd239889a03d50fe686b9a2f30a16" +checksum = "e68d1a51fe3ee143f102b82f54fa237f21d12635da363276901e6d3ef6c65b7b" dependencies = [ "alloy-consensus", "alloy-eips", @@ -7492,13 +7493,14 @@ dependencies = [ [[package]] name = "revm" -version = "18.0.0" +version = "19.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15689a3c6a8d14b647b4666f2e236ef47b5a5133cdfd423f545947986fff7013" +checksum = "e8905d0c5f10e767f13ea7cb8e502d315f144071a60fe2bd83977922dd3afa26" dependencies = [ "auto_impl", "cfg-if", "dyn-clone", + "once_cell", "revm-interpreter", "revm-precompile", "serde", @@ -7507,9 +7509,9 @@ dependencies = [ [[package]] name = "revm-inspectors" -version = "0.13.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d056aaa21f36038ab35fe8ce940ee332903a0b4b992b8ca805fb60c85eb2086" +checksum = "dc873bc873e12a1723493e1a35804fa79b673a0bfb1c19cfee659d46def8be42" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -7525,9 +7527,9 @@ dependencies = [ [[package]] name = "revm-interpreter" -version = "14.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74e3f11d0fed049a4a10f79820c59113a79b38aed4ebec786a79d5c667bfeb51" +checksum = "e5ff76b50b5a9fa861fbc236fc82ce1afdf58861f65012aea807d679e54630d6" dependencies = [ "revm-primitives", "serde", @@ -7535,9 +7537,9 @@ dependencies = [ [[package]] name = "revm-precompile" -version = "15.0.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e381060af24b750069a2b2d2c54bba273d84e8f5f9e8026fc9262298e26cc336" +checksum = "6542fb37650dfdbf4b9186769e49c4a8bc1901a3280b2ebf32f915b6c8850f36" dependencies = [ "aurora-engine-modexp", "blst", @@ -7555,9 +7557,9 @@ dependencies = [ [[package]] name = "revm-primitives" -version = "14.0.0" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3702f132bb484f4f0d0ca4f6fbde3c82cfd745041abbedd6eda67730e1868ef0" +checksum = "48faea1ecf2c9f80d9b043bbde0db9da616431faed84c4cfa3dd7393005598e6" dependencies = [ "alloy-eip2930", "alloy-eip7702", diff --git a/Cargo.toml b/Cargo.toml index 01a6eaa7d..d4ccda8e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -172,43 +172,43 @@ foundry-linking = { path = "crates/linking" } # solc & compilation utilities foundry-block-explorers = { version = "0.9.0", default-features = false } foundry-compilers = { version = "0.12.8", default-features = false } -foundry-fork-db = "0.9.0" +foundry-fork-db = "0.10.0" solang-parser = "=0.3.3" solar-ast = { version = "=0.1.0", default-features = false } solar-parse = { version = "=0.1.0", default-features = false } ## revm -revm = { version = "18.0.0", default-features = false } -revm-primitives = { version = "14.0.0", default-features = false } -revm-inspectors = { version = "0.13.0", features = ["serde"] } +revm = { version = "19.0.0", default-features = false } +revm-primitives = { version = "15.1.0", default-features = false } +revm-inspectors = { version = "0.14.1", features = ["serde"] } ## ethers ethers-contract-abigen = { version = "2.0.14", default-features = false } ## alloy -alloy-consensus = { version = "0.8.0", default-features = false } -alloy-contract = { version = "0.8.0", default-features = false } -alloy-eips = { version = "0.8.0", default-features = false } -alloy-genesis = { version = "0.8.0", default-features = false } -alloy-json-rpc = { version = "0.8.0", default-features = false } -alloy-network = { version = "0.8.0", default-features = false } -alloy-provider = { version = "0.8.0", default-features = false } -alloy-pubsub = { version = "0.8.0", default-features = false } -alloy-rpc-client = { version = "0.8.0", default-features = false } -alloy-rpc-types = { version = "0.8.0", default-features = true } -alloy-serde = { version = "0.8.0", default-features = false } -alloy-signer = { version = "0.8.0", default-features = false } -alloy-signer-aws = { version = "0.8.0", default-features = false } -alloy-signer-gcp = { version = "0.8.0", default-features = false } -alloy-signer-ledger = { version = "0.8.0", default-features = false } -alloy-signer-local = { version = "0.8.0", default-features = false } -alloy-signer-trezor = { version = "0.8.0", default-features = false } -alloy-transport = { version = "0.8.0", default-features = false } -alloy-transport-http = { version = "0.8.0", default-features = false } -alloy-transport-ipc = { version = "0.8.0", default-features = false } -alloy-transport-ws = { version = "0.8.0", default-features = false } -alloy-node-bindings = { version = "0.8.0", default-features = false } -alloy-network-primitives = { version = "0.8.0", default-features = false } +alloy-consensus = { version = "0.9.0", default-features = false } +alloy-contract = { version = "0.9.0", default-features = false } +alloy-eips = { version = "0.9.0", default-features = false } +alloy-genesis = { version = "0.9.0", default-features = false } +alloy-json-rpc = { version = "0.9.0", default-features = false } +alloy-network = { version = "0.9.0", default-features = false } +alloy-provider = { version = "0.9.0", default-features = false } +alloy-pubsub = { version = "0.9.0", default-features = false } +alloy-rpc-client = { version = "0.9.0", default-features = false } +alloy-rpc-types = { version = "0.9.0", default-features = true } +alloy-serde = { version = "0.9.0", default-features = false } +alloy-signer = { version = "0.9.0", default-features = false } +alloy-signer-aws = { version = "0.9.0", default-features = false } +alloy-signer-gcp = { version = "0.9.0", default-features = false } +alloy-signer-ledger = { version = "0.9.0", default-features = false } +alloy-signer-local = { version = "0.9.0", default-features = false } +alloy-signer-trezor = { version = "0.9.0", default-features = false } +alloy-transport = { version = "0.9.0", default-features = false } +alloy-transport-http = { version = "0.9.0", default-features = false } +alloy-transport-ipc = { version = "0.9.0", default-features = false } +alloy-transport-ws = { version = "0.9.0", default-features = false } +alloy-node-bindings = { version = "0.9.0", default-features = false } +alloy-network-primitives = { version = "0.9.0", default-features = false } ## alloy-core alloy-dyn-abi = "0.8.14" @@ -228,8 +228,8 @@ alloy-rlp = "0.3" alloy-trie = "0.7.0" ## op-alloy -op-alloy-rpc-types = "0.8.0" -op-alloy-consensus = "0.8.0" +op-alloy-rpc-types = "0.9.0" +op-alloy-consensus = "0.9.0" ## cli anstream = "0.6" diff --git a/crates/anvil/core/src/eth/block.rs b/crates/anvil/core/src/eth/block.rs index 50a9a66b3..c9f9048b8 100644 --- a/crates/anvil/core/src/eth/block.rs +++ b/crates/anvil/core/src/eth/block.rs @@ -65,7 +65,6 @@ impl Block { nonce: partial_header.nonce, base_fee_per_gas: partial_header.base_fee, requests_hash: partial_header.requests_hash, - target_blobs_per_block: None, }, transactions, ommers: vec![], @@ -158,7 +157,6 @@ mod tests { parent_beacon_block_root: Default::default(), base_fee_per_gas: None, requests_hash: None, - target_blobs_per_block: None, }; let encoded = alloy_rlp::encode(&header); @@ -200,7 +198,6 @@ mod tests { nonce: B64::ZERO, base_fee_per_gas: None, requests_hash: None, - target_blobs_per_block: None, }; header.encode(&mut data); @@ -234,7 +231,6 @@ mod tests { parent_beacon_block_root: None, base_fee_per_gas: None, requests_hash: None, - target_blobs_per_block: None, }; let header = Header::decode(&mut data.as_slice()).unwrap(); assert_eq!(header, expected); @@ -267,7 +263,6 @@ mod tests { excess_blob_gas: None, parent_beacon_block_root: None, requests_hash: None, - target_blobs_per_block: None, }; assert_eq!(header.hash_slow(), expected_hash); } diff --git a/crates/anvil/core/src/eth/transaction/mod.rs b/crates/anvil/core/src/eth/transaction/mod.rs index 29b8aee88..38eda6040 100644 --- a/crates/anvil/core/src/eth/transaction/mod.rs +++ b/crates/anvil/core/src/eth/transaction/mod.rs @@ -619,7 +619,6 @@ impl TryFrom<AnyRpcTransaction> for TypedTransaction { TxEnvelope::Eip1559(tx) => Ok(Self::EIP1559(tx)), TxEnvelope::Eip4844(tx) => Ok(Self::EIP4844(tx)), TxEnvelope::Eip7702(tx) => Ok(Self::EIP7702(tx)), - _ => Err(ConversionError::Custom("UnsupportedTxType".to_string())), }, AnyTxEnvelope::Unknown(mut tx) => { // Try to convert to deposit transaction @@ -1260,7 +1259,7 @@ impl From<TypedReceipt<Receipt<alloy_rpc_types::Log>>> for OtsReceipt { } as u8; let receipt = ReceiptWithBloom::<Receipt<alloy_rpc_types::Log>>::from(value); let status = receipt.status(); - let cumulative_gas_used = receipt.cumulative_gas_used() as u64; + let cumulative_gas_used = receipt.cumulative_gas_used(); let logs = receipt.logs().to_vec(); let logs_bloom = receipt.logs_bloom; @@ -1269,7 +1268,7 @@ impl From<TypedReceipt<Receipt<alloy_rpc_types::Log>>> for OtsReceipt { } impl TypedReceipt { - pub fn cumulative_gas_used(&self) -> u128 { + pub fn cumulative_gas_used(&self) -> u64 { self.as_receipt_with_bloom().cumulative_gas_used() } @@ -1653,7 +1652,7 @@ mod tests { let receipt = TypedReceipt::Legacy(ReceiptWithBloom { receipt: Receipt { status: false.into(), - cumulative_gas_used: 0x1u128, + cumulative_gas_used: 0x1, logs: vec![Log { address: Address::from_str("0000000000000000000000000000000000000011").unwrap(), data: LogData::new_unchecked( @@ -1688,7 +1687,7 @@ mod tests { let expected = TypedReceipt::Legacy(ReceiptWithBloom { receipt: Receipt { status: false.into(), - cumulative_gas_used: 0x1u128, + cumulative_gas_used: 0x1, logs: vec![Log { address: Address::from_str("0000000000000000000000000000000000000011").unwrap(), data: LogData::new_unchecked( diff --git a/crates/anvil/src/config.rs b/crates/anvil/src/config.rs index 7ed1432fd..247586bfd 100644 --- a/crates/anvil/src/config.rs +++ b/crates/anvil/src/config.rs @@ -498,10 +498,10 @@ impl NodeConfig { blob_excess_gas_and_price.clone() } else if let Some(excess_blob_gas) = self.genesis.as_ref().and_then(|g| g.excess_blob_gas) { - BlobExcessGasAndPrice::new(excess_blob_gas as u64) + BlobExcessGasAndPrice::new(excess_blob_gas, false) } else { // If no excess blob gas is configured, default to 0 - BlobExcessGasAndPrice::new(0) + BlobExcessGasAndPrice::new(0, false) } } @@ -1213,11 +1213,12 @@ latest block number: {latest_block}" (block.header.excess_blob_gas, block.header.blob_gas_used) { env.block.blob_excess_gas_and_price = - Some(BlobExcessGasAndPrice::new(blob_excess_gas)); + Some(BlobExcessGasAndPrice::new(blob_excess_gas, false)); let next_block_blob_excess_gas = fees .get_next_block_blob_excess_gas(blob_excess_gas as u128, blob_gas_used as u128); fees.set_blob_excess_gas_and_price(BlobExcessGasAndPrice::new( next_block_blob_excess_gas, + false, )); } } diff --git a/crates/anvil/src/eth/api.rs b/crates/anvil/src/eth/api.rs index daf9dc4a0..23aac7452 100644 --- a/crates/anvil/src/eth/api.rs +++ b/crates/anvil/src/eth/api.rs @@ -2315,7 +2315,7 @@ impl EthApi { let to = tx.to(); let gas_price = tx.gas_price(); let value = tx.value(); - let gas = tx.gas_limit() as u128; + let gas = tx.gas_limit(); TxpoolInspectSummary { to, value, gas, gas_price } } diff --git a/crates/anvil/src/eth/backend/executor.rs b/crates/anvil/src/eth/backend/executor.rs index f4b20868f..c07bfab78 100644 --- a/crates/anvil/src/eth/backend/executor.rs +++ b/crates/anvil/src/eth/backend/executor.rs @@ -30,7 +30,7 @@ use foundry_evm::{ traces::CallTraceNode, utils::odyssey_handler_register, }; -use revm::{db::WrapDatabaseRef, primitives::MAX_BLOB_GAS_PER_BLOCK}; +use revm::db::WrapDatabaseRef; use std::sync::Arc; /// Represents an executed transaction (transacted on the DB) @@ -57,7 +57,7 @@ impl ExecutedTransaction { let status_code = u8::from(self.exit_reason as u8 <= InstructionResult::SelfDestruct as u8); let receipt_with_bloom: ReceiptWithBloom = Receipt { status: (status_code == 1).into(), - cumulative_gas_used: *cumulative_gas_used as u128, + cumulative_gas_used: *cumulative_gas_used, logs, } .into(); @@ -288,7 +288,7 @@ impl<DB: Db + ?Sized, V: TransactionValidator> Iterator for &mut TransactionExec let max_blob_gas = self.blob_gas_used.saturating_add( transaction.pending_transaction.transaction.transaction.blob_gas().unwrap_or(0), ); - if max_blob_gas > MAX_BLOB_GAS_PER_BLOCK { + if max_blob_gas > alloy_eips::eip4844::MAX_DATA_GAS_PER_BLOCK { return Some(TransactionExecutionOutcome::BlobGasExhausted(transaction)) } diff --git a/crates/anvil/src/eth/backend/mem/mod.rs b/crates/anvil/src/eth/backend/mem/mod.rs index dfd96c723..154dae504 100644 --- a/crates/anvil/src/eth/backend/mem/mod.rs +++ b/crates/anvil/src/eth/backend/mem/mod.rs @@ -97,9 +97,7 @@ use op_alloy_consensus::{TxDeposit, DEPOSIT_TX_TYPE_ID}; use parking_lot::{Mutex, RwLock}; use revm::{ db::WrapDatabaseRef, - primitives::{ - calc_blob_gasprice, BlobExcessGasAndPrice, HashMap, OptimismFields, ResultAndState, - }, + primitives::{BlobExcessGasAndPrice, HashMap, OptimismFields, ResultAndState}, }; use std::{ collections::BTreeMap, @@ -1289,8 +1287,10 @@ impl Backend { // update next base fee self.fees.set_base_fee(next_block_base_fee); - self.fees - .set_blob_excess_gas_and_price(BlobExcessGasAndPrice::new(next_block_excess_blob_gas)); + self.fees.set_blob_excess_gas_and_price(BlobExcessGasAndPrice::new( + next_block_excess_blob_gas, + false, + )); // notify all listeners self.notify_on_new_block(header, block_hash); @@ -2341,7 +2341,8 @@ impl Backend { // Cancun specific let excess_blob_gas = block.header.excess_blob_gas; - let blob_gas_price = calc_blob_gasprice(excess_blob_gas.unwrap_or_default()); + let blob_gas_price = + alloy_eips::eip4844::calc_blob_gasprice(excess_blob_gas.unwrap_or_default()); let blob_gas_used = transaction.blob_gas(); let effective_gas_price = match transaction.transaction { @@ -2409,14 +2410,14 @@ impl Backend { transaction_hash: info.transaction_hash, transaction_index: Some(info.transaction_index), block_number: Some(block.header.number), - gas_used: info.gas_used as u128, + gas_used: info.gas_used, contract_address: info.contract_address, effective_gas_price, block_hash: Some(block_hash), from: info.from, to: info.to, blob_gas_price: Some(blob_gas_price), - blob_gas_used: blob_gas_used.map(|g| g as u128), + blob_gas_used, authorization_list: None, }; @@ -2809,7 +2810,7 @@ impl TransactionValidator for Backend { // Ensure the tx does not exceed the max blobs per block. if blob_count > MAX_BLOBS_PER_BLOCK { - return Err(InvalidTransactionError::TooManyBlobs(MAX_BLOBS_PER_BLOCK, blob_count)) + return Err(InvalidTransactionError::TooManyBlobs(blob_count)) } // Check for any blob validation errors @@ -2984,7 +2985,6 @@ pub fn transaction_build( let new_signed = Signed::new_unchecked(t, sig, hash); AnyTxEnvelope::Ethereum(TxEnvelope::Eip7702(new_signed)) } - _ => unreachable!("unknown tx type"), }; let tx = Transaction { diff --git a/crates/anvil/src/eth/backend/mem/storage.rs b/crates/anvil/src/eth/backend/mem/storage.rs index 5635a7acc..46429d453 100644 --- a/crates/anvil/src/eth/backend/mem/storage.rs +++ b/crates/anvil/src/eth/backend/mem/storage.rs @@ -556,10 +556,7 @@ impl MinedTransaction { GethDebugBuiltInTracerType::CallTracer => { return match tracer_config.into_call_config() { Ok(call_config) => Ok(GethTraceBuilder::new(self.info.traces.clone()) - .geth_call_traces( - call_config, - self.receipt.cumulative_gas_used() as u64, - ) + .geth_call_traces(call_config, self.receipt.cumulative_gas_used()) .into()), Err(e) => Err(RpcError::invalid_params(e.to_string()).into()), }; @@ -578,7 +575,7 @@ impl MinedTransaction { // default structlog tracer Ok(GethTraceBuilder::new(self.info.traces.clone()) .geth_traces( - self.receipt.cumulative_gas_used() as u64, + self.receipt.cumulative_gas_used(), self.info.out.clone().unwrap_or_default(), config, ) diff --git a/crates/anvil/src/eth/error.rs b/crates/anvil/src/eth/error.rs index dda9b8bb2..0c9723c40 100644 --- a/crates/anvil/src/eth/error.rs +++ b/crates/anvil/src/eth/error.rs @@ -246,8 +246,8 @@ pub enum InvalidTransactionError { /// Thrown when there are no `blob_hashes` in the transaction, and it is an EIP-4844 tx. #[error("`blob_hashes` are required for EIP-4844 transactions")] NoBlobHashes, - #[error("too many blobs in one transaction, max: {0}, have: {1}")] - TooManyBlobs(usize, usize), + #[error("too many blobs in one transaction, have: {0}")] + TooManyBlobs(usize), /// Thrown when there's a blob validation error #[error(transparent)] BlobTransactionValidationError(#[from] alloy_consensus::BlobTransactionValidationError), @@ -297,7 +297,7 @@ impl From<revm::primitives::InvalidTransaction> for InvalidTransactionError { InvalidTransaction::BlobCreateTransaction => Self::BlobCreateTransaction, InvalidTransaction::BlobVersionNotSupported => Self::BlobVersionNotSupported, InvalidTransaction::EmptyBlobs => Self::EmptyBlobs, - InvalidTransaction::TooManyBlobs { max, have } => Self::TooManyBlobs(max, have), + InvalidTransaction::TooManyBlobs { have } => Self::TooManyBlobs(have), InvalidTransaction::AuthorizationListNotSupported => { Self::AuthorizationListNotSupported } @@ -305,6 +305,7 @@ impl From<revm::primitives::InvalidTransaction> for InvalidTransactionError { InvalidTransaction::OptimismError(_) | InvalidTransaction::EofCrateShouldHaveToAddress | InvalidTransaction::EmptyAuthorizationList => Self::Revm(err), + InvalidTransaction::GasFloorMoreThanGasLimit => Self::Revm(err), } } } diff --git a/crates/anvil/src/eth/fees.rs b/crates/anvil/src/eth/fees.rs index f41c51505..bb405f62d 100644 --- a/crates/anvil/src/eth/fees.rs +++ b/crates/anvil/src/eth/fees.rs @@ -5,6 +5,7 @@ use crate::eth::{ use alloy_consensus::Header; use alloy_eips::{ calc_next_block_base_fee, eip1559::BaseFeeParams, eip4844::MAX_DATA_GAS_PER_BLOCK, + eip7840::BlobParams, }; use alloy_primitives::B256; use anvil_core::eth::transaction::TypedTransaction; @@ -172,7 +173,7 @@ impl FeeManager { /// Calculates the next block blob base fee, using the provided excess blob gas pub fn get_next_block_blob_base_fee_per_gas(&self, excess_blob_gas: u128) -> u128 { - crate::revm::primitives::calc_blob_gasprice(excess_blob_gas as u64) + alloy_eips::eip4844::calc_blob_gasprice(excess_blob_gas as u64) } /// Calculates the next block blob excess gas, using the provided parent blob gas used and @@ -182,7 +183,7 @@ impl FeeManager { blob_gas_used: u128, blob_excess_gas: u128, ) -> u64 { - crate::revm::primitives::calc_excess_blob_gas(blob_gas_used as u64, blob_excess_gas as u64) + alloy_eips::eip4844::calc_excess_blob_gas(blob_gas_used as u64, blob_excess_gas as u64) } } @@ -246,7 +247,7 @@ impl FeeHistoryService { let base_fee = header.base_fee_per_gas.map(|g| g as u128).unwrap_or_default(); let excess_blob_gas = header.excess_blob_gas.map(|g| g as u128); let blob_gas_used = header.blob_gas_used.map(|g| g as u128); - let base_fee_per_blob_gas = header.blob_fee(); + let base_fee_per_blob_gas = header.blob_fee(BlobParams::cancun()); let mut item = FeeHistoryCacheItem { base_fee, gas_used_ratio: 0f64, @@ -270,7 +271,7 @@ impl FeeHistoryService { blob_gas_used.map(|g| g / MAX_DATA_GAS_PER_BLOCK as f64).unwrap_or(0 as f64); // extract useful tx info (gas_used, effective_reward) - let mut transactions: Vec<(u128, u128)> = receipts + let mut transactions: Vec<(_, _)> = receipts .iter() .enumerate() .map(|(i, receipt)| { @@ -312,7 +313,7 @@ impl FeeHistoryService { item.rewards = reward_percentiles .into_iter() .filter_map(|p| { - let target_gas = (p * gas_used / 100f64) as u128; + let target_gas = (p * gas_used / 100f64) as u64; let mut sum_gas = 0; for (gas_used, effective_reward) in transactions.iter().cloned() { sum_gas += gas_used; diff --git a/crates/anvil/src/eth/otterscan/api.rs b/crates/anvil/src/eth/otterscan/api.rs index f9a7334e0..703c53b53 100644 --- a/crates/anvil/src/eth/otterscan/api.rs +++ b/crates/anvil/src/eth/otterscan/api.rs @@ -384,7 +384,7 @@ impl EthApi { let total_fees = receipts .iter() - .fold(0, |acc, receipt| acc + receipt.gas_used * receipt.effective_gas_price); + .fold(0, |acc, receipt| acc + (receipt.gas_used as u128) * receipt.effective_gas_price); let Block { header, uncles, transactions, withdrawals } = block.inner; diff --git a/crates/anvil/tests/it/eip4844.rs b/crates/anvil/tests/it/eip4844.rs index ea195f000..65bdba611 100644 --- a/crates/anvil/tests/it/eip4844.rs +++ b/crates/anvil/tests/it/eip4844.rs @@ -78,7 +78,7 @@ async fn can_send_multiple_blobs_in_one_tx() { let receipt = provider.send_transaction(tx).await.unwrap().get_receipt().await.unwrap(); - assert_eq!(receipt.blob_gas_used, Some(MAX_DATA_GAS_PER_BLOCK as u128)); + assert_eq!(receipt.blob_gas_used, Some(MAX_DATA_GAS_PER_BLOCK)); assert_eq!(receipt.blob_gas_price, Some(0x1)); // 1 wei } @@ -250,7 +250,7 @@ async fn can_correctly_estimate_blob_gas_with_recommended_fillers() { assert_eq!(receipt.to, Some(bob)); assert_eq!( receipt.blob_gas_used.expect("Expected to be EIP-4844 transaction"), - DATA_GAS_PER_BLOB as u128 + DATA_GAS_PER_BLOB ); } @@ -296,6 +296,6 @@ async fn can_correctly_estimate_blob_gas_with_recommended_fillers_with_signer() assert_eq!(receipt.to, Some(bob)); assert_eq!( receipt.blob_gas_used.expect("Expected to be EIP-4844 transaction"), - DATA_GAS_PER_BLOB as u128 + DATA_GAS_PER_BLOB ); } diff --git a/crates/anvil/tests/it/eip7702.rs b/crates/anvil/tests/it/eip7702.rs index e10633d6c..dfc93bfe0 100644 --- a/crates/anvil/tests/it/eip7702.rs +++ b/crates/anvil/tests/it/eip7702.rs @@ -1,7 +1,7 @@ use crate::utils::http_provider; use alloy_consensus::{transaction::TxEip7702, SignableTransaction}; use alloy_network::{ReceiptResponse, TransactionBuilder, TxSignerSync}; -use alloy_primitives::bytes; +use alloy_primitives::{bytes, U256}; use alloy_provider::Provider; use alloy_rpc_types::{Authorization, TransactionRequest}; use alloy_serde::WithOtherFields; @@ -44,7 +44,7 @@ async fn can_send_eip7702_tx() { let contract = receipt.contract_address.unwrap(); let authorization = Authorization { - chain_id: 31337u64, + chain_id: U256::from(31337u64), address: contract, nonce: provider.get_transaction_count(from).await.unwrap(), }; diff --git a/crates/anvil/tests/it/fork.rs b/crates/anvil/tests/it/fork.rs index 8e7736b0d..be91bbc12 100644 --- a/crates/anvil/tests/it/fork.rs +++ b/crates/anvil/tests/it/fork.rs @@ -1503,7 +1503,9 @@ async fn test_fork_get_account() { assert_eq!( alice_acc.balance, - alice_bal - (U256::from(142) + U256::from(receipt.gas_used * receipt.effective_gas_price)), + alice_bal - + (U256::from(142) + + U256::from(receipt.gas_used as u128 * receipt.effective_gas_price)), ); assert_eq!(alice_acc.nonce, alice_nonce + 1); diff --git a/crates/cast/bin/cmd/wallet/mod.rs b/crates/cast/bin/cmd/wallet/mod.rs index 7960cab6e..4234304f2 100644 --- a/crates/cast/bin/cmd/wallet/mod.rs +++ b/crates/cast/bin/cmd/wallet/mod.rs @@ -1,6 +1,6 @@ use alloy_chains::Chain; use alloy_dyn_abi::TypedData; -use alloy_primitives::{hex, Address, PrimitiveSignature as Signature, B256}; +use alloy_primitives::{hex, Address, PrimitiveSignature as Signature, B256, U256}; use alloy_provider::Provider; use alloy_signer::Signer; use alloy_signer_local::{ @@ -380,7 +380,7 @@ impl WalletSubcommands { } else { provider.get_chain_id().await? }; - let auth = Authorization { chain_id, address, nonce }; + let auth = Authorization { chain_id: U256::from(chain_id), address, nonce }; let signature = wallet.sign_hash(&auth.signature_hash()).await?; let auth = auth.into_signed(signature); sh_println!("{}", hex::encode_prefixed(alloy_rlp::encode(&auth)))?; diff --git a/crates/cast/bin/tx.rs b/crates/cast/bin/tx.rs index 29f8e2435..9cc98aedf 100644 --- a/crates/cast/bin/tx.rs +++ b/crates/cast/bin/tx.rs @@ -3,7 +3,7 @@ use alloy_json_abi::Function; use alloy_network::{ AnyNetwork, TransactionBuilder, TransactionBuilder4844, TransactionBuilder7702, }; -use alloy_primitives::{hex, Address, Bytes, TxKind}; +use alloy_primitives::{hex, Address, Bytes, TxKind, U256}; use alloy_provider::Provider; use alloy_rpc_types::{AccessList, Authorization, TransactionInput, TransactionRequest}; use alloy_serde::WithOtherFields; @@ -379,8 +379,11 @@ where let auth = match auth { CliAuthorizationList::Address(address) => { - let auth = - Authorization { chain_id: self.chain.id(), nonce: tx_nonce + 1, address }; + let auth = Authorization { + chain_id: U256::from(self.chain.id()), + nonce: tx_nonce + 1, + address, + }; let Some(signer) = sender.as_signer() else { eyre::bail!("No signer available to sign authorization"); diff --git a/crates/cast/tests/cli/main.rs b/crates/cast/tests/cli/main.rs index c87c5f7f2..f037cb166 100644 --- a/crates/cast/tests/cli/main.rs +++ b/crates/cast/tests/cli/main.rs @@ -105,7 +105,6 @@ totalDifficulty [..] blobGasUsed [..] excessBlobGas [..] requestsHash [..] -targetBlobsPerBlock [..] transactions: [ ... ] diff --git a/crates/cheatcodes/src/evm.rs b/crates/cheatcodes/src/evm.rs index 9f8eb27a4..f9d648bca 100644 --- a/crates/cheatcodes/src/evm.rs +++ b/crates/cheatcodes/src/evm.rs @@ -485,7 +485,10 @@ impl Cheatcode for blobBaseFeeCall { "`blobBaseFee` is not supported before the Cancun hard fork; \ see EIP-4844: https://eips.ethereum.org/EIPS/eip-4844" ); - ccx.ecx.env.block.set_blob_excess_gas_and_price((*newBlobBaseFee).to()); + ccx.ecx.env.block.set_blob_excess_gas_and_price( + (*newBlobBaseFee).to(), + ccx.ecx.spec_id() >= SpecId::PRAGUE, + ); Ok(Default::default()) } } diff --git a/crates/cheatcodes/src/script.rs b/crates/cheatcodes/src/script.rs index b28141ae0..0749d0d41 100644 --- a/crates/cheatcodes/src/script.rs +++ b/crates/cheatcodes/src/script.rs @@ -40,7 +40,7 @@ impl Cheatcode for attachDelegationCall { let auth = Authorization { address: *implementation, nonce: *nonce, - chain_id: ccx.ecx.env.cfg.chain_id, + chain_id: U256::from(ccx.ecx.env.cfg.chain_id), }; let signed_auth = SignedAuthorization::new_unchecked( auth, @@ -87,7 +87,11 @@ fn create_auth( let authority_acc = ccx.ecx.journaled_state.load_account(authority, &mut ccx.ecx.db)?; let nonce = authority_acc.data.info.nonce; Ok(( - Authorization { address: implementation, nonce, chain_id: ccx.ecx.env.cfg.chain_id }, + Authorization { + address: implementation, + nonce, + chain_id: U256::from(ccx.ecx.env.cfg.chain_id), + }, nonce, )) } diff --git a/crates/common/fmt/src/ui.rs b/crates/common/fmt/src/ui.rs index af1bdd5df..bd3dbbd42 100644 --- a/crates/common/fmt/src/ui.rs +++ b/crates/common/fmt/src/ui.rs @@ -811,7 +811,6 @@ pub fn get_pretty_tx_attr(transaction: &Transaction<AnyTxEnvelope>, attr: &str) TxEnvelope::Eip4844(tx) => Some(tx.signature()), TxEnvelope::Eip7702(tx) => Some(tx.signature()), TxEnvelope::Legacy(tx) => Some(tx.signature()), - _ => None, }, _ => None, }; @@ -899,7 +898,6 @@ fn pretty_block_basics<T>(block: &Block<T, alloy_rpc_types::Header<AnyHeader>>) excess_blob_gas, parent_beacon_block_root, requests_hash, - target_blobs_per_block, }, }, uncles: _, @@ -931,8 +929,7 @@ withdrawalsRoot {} totalDifficulty {} blobGasUsed {} excessBlobGas {} -requestsHash {} -targetBlobsPerBlock {}", +requestsHash {}", base_fee_per_gas.pretty(), difficulty.pretty(), extra_data.pretty(), @@ -960,7 +957,6 @@ targetBlobsPerBlock {}", blob_gas_used.pretty(), excess_blob_gas.pretty(), requests_hash.pretty(), - target_blobs_per_block.pretty(), ) } diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index 3d162c96f..12f39b1ee 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -1921,7 +1921,8 @@ fn update_env_block(env: &mut Env, block: &AnyRpcBlock) { env.block.gas_limit = U256::from(block.header.gas_limit); env.block.number = U256::from(block.header.number); if let Some(excess_blob_gas) = block.header.excess_blob_gas { - env.block.blob_excess_gas_and_price = Some(BlobExcessGasAndPrice::new(excess_blob_gas)); + env.block.blob_excess_gas_and_price = + Some(BlobExcessGasAndPrice::new(excess_blob_gas, false)); } } diff --git a/crates/evm/evm/src/executors/mod.rs b/crates/evm/evm/src/executors/mod.rs index ada7cc7b0..187315d58 100644 --- a/crates/evm/evm/src/executors/mod.rs +++ b/crates/evm/evm/src/executors/mod.rs @@ -932,7 +932,7 @@ fn convert_executed_result( (reason.into(), 0_u64, gas_used, None, vec![]) } }; - let stipend = revm::interpreter::gas::validate_initial_tx_gas( + let gas = revm::interpreter::gas::calculate_initial_tx_gas( env.spec_id(), &env.tx.data, env.tx.transact_to.is_create(), @@ -964,7 +964,7 @@ fn convert_executed_result( result, gas_used, gas_refunded, - stipend, + stipend: gas.initial_gas, logs, labels, traces, diff --git a/crates/script/src/broadcast.rs b/crates/script/src/broadcast.rs index 207754e5c..24368bc3d 100644 --- a/crates/script/src/broadcast.rs +++ b/crates/script/src/broadcast.rs @@ -413,11 +413,11 @@ impl BundledState { let (total_gas, total_gas_price, total_paid) = sequence.receipts.iter().fold((0, 0, 0), |acc, receipt| { let gas_used = receipt.gas_used; - let gas_price = receipt.effective_gas_price; + let gas_price = receipt.effective_gas_price as u64; (acc.0 + gas_used, acc.1 + gas_price, acc.2 + gas_used * gas_price) }); let paid = format_units(total_paid, 18).unwrap_or_else(|_| "N/A".to_string()); - let avg_gas_price = format_units(total_gas_price / sequence.receipts.len() as u128, 9) + let avg_gas_price = format_units(total_gas_price / sequence.receipts.len() as u64, 9) .unwrap_or_else(|_| "N/A".to_string()); seq_progress.inner.write().set_status(&format!( diff --git a/crates/script/src/receipts.rs b/crates/script/src/receipts.rs index cff893b55..ee1c7b46c 100644 --- a/crates/script/src/receipts.rs +++ b/crates/script/src/receipts.rs @@ -106,7 +106,7 @@ pub fn format_receipt(chain: Chain, receipt: &AnyTransactionReceipt) -> String { gas = if gas_price == 0 { format!("Gas Used: {gas_used}") } else { - let paid = format_units(gas_used.saturating_mul(gas_price), 18) + let paid = format_units((gas_used as u128).saturating_mul(gas_price), 18) .unwrap_or_else(|_| "N/A".into()); let gas_price = format_units(U256::from(gas_price), 9).unwrap_or_else(|_| "N/A".into()); From 03ec595fb59f9c1eaf0f695f71c9771d8b106a0b Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Thu, 2 Jan 2025 01:58:30 +0100 Subject: [PATCH 29/45] chore(deps): bump alloys (#9613) --- Cargo.lock | 204 ++++++++++++++++++++++++++++------------------------- 1 file changed, 108 insertions(+), 96 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 29742a2a1..9349acd2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -86,9 +86,9 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db66918860ff33920fb9e6d648d1e8cee275321406ea255ac9320f6562e26fec" +checksum = "d802a6d579d924a2926d181bce43231aaab4699a7c206197e88fbc6b9dda846f" dependencies = [ "alloy-eips", "alloy-primitives", @@ -104,9 +104,9 @@ dependencies = [ [[package]] name = "alloy-consensus-any" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04519b5157de8a2166bddb07d84a63590100f1d3e2b3682144e787f1c27ccdac" +checksum = "24b1bcb3e4810bff7e2a62ac0d741c70a7b5560e57b76eb0f0d33e1070735c60" dependencies = [ "alloy-consensus", "alloy-eips", @@ -118,9 +118,9 @@ dependencies = [ [[package]] name = "alloy-contract" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ff00ab4dd371f53e648d65bd5af01057bdad8aaae8b3cd7cee75445575995c1" +checksum = "8e56bc4dc06ab205dc4106348c44b92e0d979148f8db751994c11caabf5ebbef" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -139,9 +139,9 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41056bde53ae10ffbbf11618efbe1e0290859e5eab0fe9ef82ebdb62f12a866f" +checksum = "b0d2ea4d7f220a19c1f8c98822026d1d26a4b75a72e1a7308d02bab1f77c9a00" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -188,9 +188,9 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e56518f46b074d562ac345238343e2231b672a13aca18142d285f95cc055980b" +checksum = "938bc1cf2ec42579e187834efc254e76dd3fa19f526b57872713e6b95f411305" dependencies = [ "alloy-eip2930", "alloy-eip7702", @@ -206,9 +206,9 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cf200fd4c28435995e47b26d4761a4cf6e1011a13b81f9a9afaf16a93d9fd09" +checksum = "b648eac186485ead3da160985b929e610a45eb39903f750da9b35f58a91eef52" dependencies = [ "alloy-eips", "alloy-primitives", @@ -219,9 +219,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c357da577dfb56998d01f574d81ad7a1958d248740a7981b205d69d65a7da404" +checksum = "e79c6b4bcc1067a7394b5b2aec7da1bd829c8c476b796c73eb14da34392a07a7" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -231,9 +231,9 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b17c5ada5faf0f9d2921e8b20971eced68abbc92a272b0502cac8b1d00f56777" +checksum = "a1a38b4b49667a84ecad7cdaf431b8bd3f14ca496e5a021df1c26d5c4595dca6" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -245,9 +245,9 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f3117647e3262f6db9e18b371bf67c5810270c0cf915786c30fad3b1739561" +checksum = "4fb5dc326960e88eec6b5e9add221a071f15cb8fa93b9e88ee9c76cd0e4e1009" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -270,9 +270,9 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1535a4577648ec2fd3c446d4644d9b8e9e01e5816be53a5d515dc1624e2227b2" +checksum = "1535c89ae0648f2c15c0bf9b8b92670f6b3b8515b645425c8b46462563c0eae4" dependencies = [ "alloy-consensus", "alloy-eips", @@ -283,9 +283,9 @@ dependencies = [ [[package]] name = "alloy-node-bindings" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf741e871fb62c80e0007041e8bc1e81978abfd98aafea8354472f06bfd4d309" +checksum = "5af000a8d9aa22694c92a5c6ebd9113495d2eb78fb3579d02a715569b973cc26" dependencies = [ "alloy-genesis", "alloy-primitives", @@ -300,9 +300,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6259a506ab13e1d658796c31e6e39d2e2ee89243bcc505ddc613b35732e0a430" +checksum = "0540fd0355d400b59633c27bd4b42173e59943f28e9d3376b77a24771d432d04" dependencies = [ "alloy-rlp", "arbitrary", @@ -332,9 +332,9 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcfa2db03d4221b5ca14bff7dbed4712689cb87a3e826af522468783ff05ec5d" +checksum = "a9a9d6ef38d75e4b0dce6737463099698f9b839d1c3f7c8883bfdfce8954374b" dependencies = [ "alloy-chains", "alloy-consensus", @@ -375,9 +375,9 @@ dependencies = [ [[package]] name = "alloy-pubsub" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eace70e43b073d4bfc1de915c45993a50facd6526fd8da80204e0f83a9e233a" +checksum = "1be3b30bab565198a1bda090915dd165ca9211154eb0b37d046a22829418dcc0" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -416,9 +416,9 @@ dependencies = [ [[package]] name = "alloy-rpc-client" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ec6963b08f1c6ef8eacc01dbba20f2c6a1533550403f6b52dbbe0da0360834" +checksum = "f5ed1e9957edfc8d155e2610e2ff3e10b059b89a6103de9f01579f40d8926d47" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -442,9 +442,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138ef78340b47f16ca4d04a4d75fe2ccdb3f1a4f748d5f3b2fbebc43581fd02e" +checksum = "206749723862bd27d5468270e30fc987c5b4376240aefee728d7e64282c9d146" dependencies = [ "alloy-primitives", "alloy-rpc-types-anvil", @@ -458,9 +458,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-anvil" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efbe94a1fcd071f19b313e4506d1affee0bd0b4a1cfbfd18a2541fda8e5487cf" +checksum = "4ac98a9d17ec4d851ea38e556c27b92e1ff8c97664cf1feb77aec38dcba34579" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -470,9 +470,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-any" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64a83112b09bd293ef522bfa3800fa2d2df4d72f2bcd3a84b08490503b22e55" +checksum = "5e6ff23d7bde6ddeea4c1ca98e7a5a728326d543bd7133735c04ea83ebde41d0" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", @@ -481,9 +481,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-debug" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb36f68cc0c83120ecfbf0b1862b35f846da8e0cb95be3d10a3a08bfa711248" +checksum = "3d72085173d210806a27892eb72770a663f5b0c17598e37f18c6bb24f7583c3c" dependencies = [ "alloy-primitives", "serde", @@ -491,9 +491,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-engine" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d87e5622ed4d471f1eefb99a400cd7e362a1889baa9bb4417742260ca43a8" +checksum = "ee96e9793d3ec528ead6e8580f24e9acc71f5c2bc35feefba24465044bb77d76" dependencies = [ "alloy-consensus", "alloy-eips", @@ -509,9 +509,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc1892a1ac0d2a49c063f0791aa6bde342f020c5d37aaaec14832b661802cb4" +checksum = "319a0ca31863bd6fb9aafeaa16425d0a2f1228da44bc24fd2f997ba50afe7e18" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -529,9 +529,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-trace" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b25a5e0a7ae0127f20077b23319c8d4a416187c204bf3329ab28a0309ed45535" +checksum = "af2769894024f65ba252618e06a0ca22fc025377ade6d60d7f47a83ac9559680" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -543,9 +543,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-txpool" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64952ac1199868bcd05b3aae2d5e988e6bd171e42ae71580abe6718263061b27" +checksum = "69bfa0d7934827098cd386965a796e7765485dc86c6ae03cda262ad9ccb30e01" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -555,9 +555,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17939f6bef49268e4494158fce1ab8913cd6164ec3f9a4ada2c677b9b5a77f2f" +checksum = "81537867986734e5867a9131145bdc56301f5b37ef9c9fb4654d7f7691a4015d" dependencies = [ "alloy-primitives", "serde", @@ -566,9 +566,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77d1f0762a44338f0e05987103bd5919df52170d949080bfebfeb6aaaa867c39" +checksum = "0fdcbfe7079c877b3cb6ec43017e94f66432480f1c1779f736c064e6a8d422cc" dependencies = [ "alloy-dyn-abi", "alloy-primitives", @@ -582,9 +582,9 @@ dependencies = [ [[package]] name = "alloy-signer-aws" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63cf9487165bcf15e15f033529ca8b8c63a26e5f9b435fbd239f786391ca2cb3" +checksum = "6da52893079d9c16ad00b882f9b900bfe7517426c729e4858bf8404c2c593503" dependencies = [ "alloy-consensus", "alloy-network", @@ -600,9 +600,9 @@ dependencies = [ [[package]] name = "alloy-signer-gcp" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a9f720296bf196732ecc6717aae33a4192c430b779b709557073329ae7ebeb4" +checksum = "04dd0cd5702c40b836db606575d4122388e415c30eac99937f8fb65c19c8f4a9" dependencies = [ "alloy-consensus", "alloy-network", @@ -618,9 +618,9 @@ dependencies = [ [[package]] name = "alloy-signer-ledger" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eaa7c88f704957cd9a8021be4d9e1d12da2cea55b8ce0551224805520ab0720" +checksum = "e35a72689d2312268ba7b381633c8edf6f7aa4e18d7f2852f7cdcc7f0e2a7d1e" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -638,9 +638,9 @@ dependencies = [ [[package]] name = "alloy-signer-local" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59dd2f16055f532f83a8f8e3c13cf1e3b5ff78afdef82edb613946156e542272" +checksum = "3f5175bd063463e25f1ffc6daaa223db15baf4b18e3d83d0d31fb95756aab6cc" dependencies = [ "alloy-consensus", "alloy-network", @@ -657,9 +657,9 @@ dependencies = [ [[package]] name = "alloy-signer-trezor" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd52d50f219e5160799cc569c1a7efd20d4d92cc2c2352a59874f71f02d642c" +checksum = "312d26fc0ad8c0662bdda1cd68f0ecc4b16c27b8d3d3c228558349218c9f4de1" dependencies = [ "alloy-consensus", "alloy-network", @@ -674,9 +674,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d64f851d95619233f74b310f12bcf16e0cbc27ee3762b6115c14a84809280a" +checksum = "c6d1a14b4a9f6078ad9132775a2ebb465b06b387d60f7413ddc86d7bf7453408" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", @@ -688,9 +688,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-expander" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf7ed1574b699f48bf17caab4e6e54c6d12bc3c006ab33d58b1e227c1c3559f" +checksum = "4436b4b96d265eb17daea26eb31525c3076d024d10901e446790afbd2f7eeaf5" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", @@ -707,9 +707,9 @@ dependencies = [ [[package]] name = "alloy-sol-macro-input" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c02997ccef5f34f9c099277d4145f183b422938ed5322dc57a089fe9b9ad9ee" +checksum = "e5f58698a18b96faa8513519de112b79a96010b4ff84264ce54a217c52a8e98b" dependencies = [ "alloy-json-abi", "const-hex", @@ -724,9 +724,9 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce13ff37285b0870d0a0746992a4ae48efaf34b766ae4c2640fa15e5305f8e73" +checksum = "1f3d6d2c490f650c5abd65a9a583b09a8c8931c265d3a55b18a8e349dd6d9d84" dependencies = [ "serde", "winnow", @@ -734,9 +734,9 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1174cafd6c6d810711b4e00383037bdb458efc4fe3dbafafa16567e0320c54d8" +checksum = "c766e4979fc19d70057150befe8e3ea3f0c4cbc6839b8eaaa250803451692305" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -747,9 +747,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a3827275a4eed3431ce876a59c76fd19effc2a8c09566b2603e3a3376d38af0" +checksum = "6121c7a8791d7984bd3e1a487aae55c62358b0bd94330126db41d795d942e24e" dependencies = [ "alloy-json-rpc", "base64 0.22.1", @@ -767,9 +767,9 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958417ddf333c55b0627cb7fbee7c6666895061dee79f50404dd6dbdd8e9eba0" +checksum = "15487cd2d7f2bfd8546e851d80db470603c2a1de82f7c39403078356b20d9a21" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -782,9 +782,9 @@ dependencies = [ [[package]] name = "alloy-transport-ipc" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168abcf4337c3fbc0bf9030e62bbaca8b9a0fddf687ecc6585e2e6515dde8b0d" +checksum = "a74511d4703f571c2b4da85458b5634855d97e10a94407c05d97b2052ed5450b" dependencies = [ "alloy-json-rpc", "alloy-pubsub", @@ -803,9 +803,9 @@ dependencies = [ [[package]] name = "alloy-transport-ws" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcaf327f8d3e938272c2eace672094d3800e069e3f34137358e563faaa314f8a" +checksum = "f812a1f1ae7955964727d3040bf240955ca324d80383b9dd0ab21a6de3007386" dependencies = [ "alloy-pubsub", "alloy-transport", @@ -821,9 +821,9 @@ dependencies = [ [[package]] name = "alloy-trie" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e428104b2445a4f929030891b3dbf8c94433a8349ba6480946bf6af7975c2f6" +checksum = "6917c79e837aa7b77b7a6dae9f89cbe15313ac161c4d3cfaf8909ef21f3d22d8" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -2411,9 +2411,9 @@ dependencies = [ [[package]] name = "compact_str" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6050c3a16ddab2e412160b31f2c871015704239bca62f72f6e5f0be631d3f644" +checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32" dependencies = [ "castaway", "cfg-if", @@ -5431,7 +5431,7 @@ dependencies = [ "log", "num-format", "once_cell", - "quick-xml 0.37.1", + "quick-xml 0.37.2", "rgb", "str_stack", ] @@ -5558,11 +5558,14 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jiff" -version = "0.1.16" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24a46169c7a10358cdccfb179910e8a5a392fc291bdb409da9aeece5b19786d8" +checksum = "d09ead9616bda43297ffc1fa32e01f5951c0f08cf5239a296a8d73f3b13fc2b6" dependencies = [ "jiff-tzdb-platform", + "log", + "portable-atomic", + "portable-atomic-util", "serde", "windows-sys 0.59.0", ] @@ -6345,9 +6348,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "nybbles" -version = "0.3.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55a62e678a89501192cc5ebf47dcbc656b608ae5e1c61c9251fe35230f119fe3" +checksum = "a3409fc85ac27b27d971ea7cd1aabafd2eefa6de7e481c8d4f707225c117e81a" dependencies = [ "alloy-rlp", "const-hex", @@ -6866,6 +6869,15 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" +[[package]] +name = "portable-atomic-util" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -7180,7 +7192,7 @@ dependencies = [ "chrono", "indexmap 2.7.0", "newtype-uuid", - "quick-xml 0.37.1", + "quick-xml 0.37.2", "strip-ansi-escapes", "thiserror 2.0.9", "uuid 1.11.0", @@ -7197,9 +7209,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.37.1" +version = "0.37.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f22f29bdff3987b4d8632ef95fd6424ec7e4e0a57e2f4fc63e489e75357f6a03" +checksum = "165859e9e55f79d67b96c5d96f4e88b6f2695a1972849c15a6a3f5c59fc2c003" dependencies = [ "memchr", ] @@ -7440,9 +7452,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.11" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe060fe50f524be480214aba758c71f99f90ee8c83c5a36b5e9e1d568eb4eb3" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" dependencies = [ "async-compression", "base64 0.22.1", @@ -8830,9 +8842,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219389c1ebe89f8333df8bdfb871f6631c552ff399c23cac02480b6088aad8f0" +checksum = "c74af950d86ec0f5b2ae2d7f1590bbfbcf4603a0a15742d8f98132ac4fe3efd4" dependencies = [ "paste", "proc-macro2", @@ -10303,9 +10315,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.20" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "e6f5bb5257f2407a5425c6e749bfd9692192a73e70a6060516ac04f889087d68" dependencies = [ "memchr", ] From 6cb41febfc989cbf7dc13c43ec6c3ce5fba1ea04 Mon Sep 17 00:00:00 2001 From: zhiqiangxu <652732310@qq.com> Date: Thu, 2 Jan 2025 15:58:20 +0800 Subject: [PATCH 30/45] add comment to `-r` option about default value (#9571) add comment to -r option about default value --- crates/cli/src/opts/ethereum.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cli/src/opts/ethereum.rs b/crates/cli/src/opts/ethereum.rs index 8d2601be1..344efe73e 100644 --- a/crates/cli/src/opts/ethereum.rs +++ b/crates/cli/src/opts/ethereum.rs @@ -18,7 +18,7 @@ const FLASHBOTS_URL: &str = "https://rpc.flashbots.net/fast"; #[derive(Clone, Debug, Default, Parser)] pub struct RpcOpts { - /// The RPC endpoint. + /// The RPC endpoint, default value is http://localhost:8545. #[arg(short = 'r', long = "rpc-url", env = "ETH_RPC_URL")] pub url: Option<String>, From 8555f162576c6deb57a719d767271a710d23cf82 Mon Sep 17 00:00:00 2001 From: Marquis Shanahan <29431502+9547@users.noreply.github.com> Date: Fri, 3 Jan 2025 18:07:08 +0800 Subject: [PATCH 31/45] fix(anvil): ipc append a newline (#9608) * fix(anvil): ipc append a newline Signed-off-by: 9547 <29431502+9547@users.noreply.github.com> * use put_u8 instead of extend from slice Signed-off-by: 9547 <29431502+9547@users.noreply.github.com> --------- Signed-off-by: 9547 <29431502+9547@users.noreply.github.com> --- crates/anvil/server/src/ipc.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/anvil/server/src/ipc.rs b/crates/anvil/server/src/ipc.rs index 8743f0642..392eb47ac 100644 --- a/crates/anvil/server/src/ipc.rs +++ b/crates/anvil/server/src/ipc.rs @@ -2,7 +2,7 @@ use crate::{error::RequestError, pubsub::PubSubConnection, PubSubRpcHandler}; use anvil_rpc::request::Request; -use bytes::BytesMut; +use bytes::{BufMut, BytesMut}; use futures::{ready, Sink, Stream, StreamExt}; use interprocess::local_socket::{self as ls, tokio::prelude::*}; use std::{ @@ -171,6 +171,8 @@ impl tokio_util::codec::Encoder<String> for JsonRpcCodec { fn encode(&mut self, msg: String, buf: &mut BytesMut) -> io::Result<()> { buf.extend_from_slice(msg.as_bytes()); + // Add newline character + buf.put_u8(b'\n'); Ok(()) } } From caf845575568d23b9b22357eb8e7257c717e088e Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Fri, 3 Jan 2025 11:08:17 +0100 Subject: [PATCH 32/45] chore: dedup errors in eyre handler (#9612) --- crates/cli/src/handler.rs | 11 ++++++----- crates/common/src/errors/mod.rs | 32 +++++++++++++++++++++++++++++--- crates/forge/tests/cli/cmd.rs | 4 ---- crates/forge/tests/cli/config.rs | 1 - 4 files changed, 35 insertions(+), 13 deletions(-) diff --git a/crates/cli/src/handler.rs b/crates/cli/src/handler.rs index ed32fa16b..53485e226 100644 --- a/crates/cli/src/handler.rs +++ b/crates/cli/src/handler.rs @@ -10,15 +10,16 @@ impl EyreHandler for Handler { if f.alternate() { return fmt::Debug::fmt(error, f) } + let errors = foundry_common::errors::dedup_chain(error); + + let (error, sources) = errors.split_first().unwrap(); write!(f, "{error}")?; - if let Some(cause) = error.source() { + if !sources.is_empty() { write!(f, "\n\nContext:")?; - let multiple = cause.source().is_some(); - let errors = std::iter::successors(Some(cause), |e| (*e).source()); - - for (n, error) in errors.enumerate() { + let multiple = sources.len() > 1; + for (n, error) in sources.iter().enumerate() { writeln!(f)?; if multiple { write!(f, "- Error #{n}: {error}")?; diff --git a/crates/common/src/errors/mod.rs b/crates/common/src/errors/mod.rs index c8b2c6bcc..5ecd1dcc0 100644 --- a/crates/common/src/errors/mod.rs +++ b/crates/common/src/errors/mod.rs @@ -6,15 +6,41 @@ pub use fs::FsPathError; mod artifacts; pub use artifacts::*; +mod private { + use eyre::Chain; + use std::error::Error; + + pub trait ErrorChain { + fn chain(&self) -> Chain<'_>; + } + + impl ErrorChain for dyn Error + 'static { + fn chain(&self) -> Chain<'_> { + Chain::new(self) + } + } + + impl ErrorChain for eyre::Report { + fn chain(&self) -> Chain<'_> { + self.chain() + } + } +} + /// Displays a chain of errors in a single line. -pub fn display_chain(error: &eyre::Report) -> String { +pub fn display_chain<E: private::ErrorChain + ?Sized>(error: &E) -> String { + dedup_chain(error).join("; ") +} + +/// Deduplicates a chain of errors. +pub fn dedup_chain<E: private::ErrorChain + ?Sized>(error: &E) -> Vec<String> { let mut causes = all_sources(error); // Deduplicate the common pattern `msg1: msg2; msg2` -> `msg1: msg2`. causes.dedup_by(|b, a| a.contains(b.as_str())); - causes.join("; ") + causes } -fn all_sources(err: &eyre::Report) -> Vec<String> { +fn all_sources<E: private::ErrorChain + ?Sized>(err: &E) -> Vec<String> { err.chain().map(|cause| cause.to_string().trim().to_string()).collect() } diff --git a/crates/forge/tests/cli/cmd.rs b/crates/forge/tests/cli/cmd.rs index 27aea6d86..62b6de392 100644 --- a/crates/forge/tests/cli/cmd.rs +++ b/crates/forge/tests/cli/cmd.rs @@ -1135,7 +1135,6 @@ Warning (1878): SPDX license identifier not provided in source file. Before publ Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information. [FILE] - "#]]); // ignores error code and compiles @@ -1215,7 +1214,6 @@ Error (2314): Expected ';' but got identifier 7 | THIS WILL CAUSE AN ERROR | ^^^^^ - "#]]); // but ensure this cleaned cache and artifacts @@ -1231,7 +1229,6 @@ Error (2314): Expected ';' but got identifier 7 | THIS WILL CAUSE AN ERROR | ^^^^^ - "#]]); // resolve the error by replacing the file @@ -1271,7 +1268,6 @@ Error (2314): Expected ';' but got identifier 7 | THIS WILL CAUSE AN ERROR | ^^^^^ - "#]]); // ensure unchanged cache file diff --git a/crates/forge/tests/cli/config.rs b/crates/forge/tests/cli/config.rs index 545cebac8..61e63abf9 100644 --- a/crates/forge/tests/cli/config.rs +++ b/crates/forge/tests/cli/config.rs @@ -448,7 +448,6 @@ Error (6553): The msize instruction cannot be used when the Yul optimizer is act 6 | assembly { | ^ (Relevant source part starts here and spans across multiple lines). - "#]]); // disable yul optimizer explicitly From f7bb427246360b21c85d2909fd3bd8a00e42aa32 Mon Sep 17 00:00:00 2001 From: Yash Atreya <44857776+yash-atreya@users.noreply.github.com> Date: Fri, 3 Jan 2025 16:34:50 +0530 Subject: [PATCH 33/45] fix(`evm`): P256Verify address (#9618) --- crates/evm/core/src/precompiles.rs | 2 +- crates/evm/core/src/utils.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/evm/core/src/precompiles.rs b/crates/evm/core/src/precompiles.rs index ceaf6d004..c70dc06d2 100644 --- a/crates/evm/core/src/precompiles.rs +++ b/crates/evm/core/src/precompiles.rs @@ -49,7 +49,7 @@ pub const PRECOMPILES: &[Address] = &[ ODYSSEY_P256_ADDRESS, ]; -/// [EIP-7212](https://eips.ethereum.org/EIPS/eip-7212) secp256r1 precompile address on Odyssey. +/// [EIP-7212](https://github.com/ethereum/RIPs/blob/master/RIPS/rip-7212.md) secp256r1 precompile address on Odyssey. /// /// <https://github.com/ithacaxyz/odyssey/blob/482f4547631ae5c64ebea6a4b4ef93184a4abfee/crates/node/src/evm.rs#L35-L35> pub const ODYSSEY_P256_ADDRESS: Address = address!("0000000000000000000000000000000000000014"); diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index 0f29ec2a4..ac19e9155 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -18,6 +18,7 @@ use revm::{ return_ok, CallInputs, CallOutcome, CallScheme, CallValue, CreateInputs, CreateOutcome, Gas, InstructionResult, InterpreterResult, }, + precompile::secp256r1::P256VERIFY, primitives::{CreateScheme, EVMError, HandlerCfg, SpecId, KECCAK_EMPTY}, FrameOrResult, FrameResult, }; @@ -301,7 +302,7 @@ pub fn odyssey_handler_register<EXT, DB: revm::Database>(handler: &mut EvmHandle handler.pre_execution.load_precompiles = Arc::new(move || { let mut loaded_precompiles = prev(); - loaded_precompiles.extend([ODYSSEY_P256]); + loaded_precompiles.extend([ODYSSEY_P256, P256VERIFY]); loaded_precompiles }); From 15940fc427e73f27ebd6e9df8673c005aad1e306 Mon Sep 17 00:00:00 2001 From: Marquis Shanahan <29431502+9547@users.noreply.github.com> Date: Fri, 3 Jan 2025 20:02:23 +0800 Subject: [PATCH 34/45] typo: EtherScan -> Etherscan (#9607) Signed-off-by: 9547 <29431502+9547@users.noreply.github.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de> --- crates/cli/src/utils/abi.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cli/src/utils/abi.rs b/crates/cli/src/utils/abi.rs index e903804de..301200f70 100644 --- a/crates/cli/src/utils/abi.rs +++ b/crates/cli/src/utils/abi.rs @@ -51,7 +51,7 @@ pub async fn parse_function_args<T: Transport + Clone, P: Provider<T, AnyNetwork get_func(sig)? } else { let etherscan_api_key = etherscan_api_key.ok_or_eyre( - "If you wish to fetch function data from EtherScan, please provide an API key.", + "If you wish to fetch function data from Etherscan, please provide an Etherscan API key.", )?; let to = to.ok_or_eyre("A 'to' address must be provided to fetch function data.")?; get_func_etherscan(sig, to, &args, chain, etherscan_api_key).await? From 8cc2079ab843ca034f04262159098b39144b568d Mon Sep 17 00:00:00 2001 From: sam bacha <sam@manifoldfinance.com> Date: Fri, 3 Jan 2025 06:08:07 -0800 Subject: [PATCH 35/45] chore(git): enhance rust diffing (#9596) This has to be explicitly enabled for git to utilize its enhanced rust diffing, evidently. ref: https://github.com/rust-lang/rust/pull/78882 Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com> --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitattributes b/.gitattributes index 0e34b8632..0e0276a95 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,5 @@ crates/cheatcodes/assets/*.json linguist-generated testdata/cheats/Vm.sol linguist-generated + +# See <https://git-scm.com/docs/gitattributes#_defining_a_custom_hunk_header> +*.rs diff=rust From c66fd407926878f807dc1a96598d86425eb907bf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 5 Jan 2025 01:08:21 +0000 Subject: [PATCH 36/45] chore(deps): weekly `cargo update` (#9623) Locking 56 packages to latest compatible versions Updating alloy-chains v0.1.51 -> v0.1.52 Updating alloy-consensus v0.9.1 -> v0.9.2 Updating alloy-consensus-any v0.9.1 -> v0.9.2 Updating alloy-contract v0.9.1 -> v0.9.2 Updating alloy-dyn-abi v0.8.16 -> v0.8.18 Updating alloy-eips v0.9.1 -> v0.9.2 Updating alloy-genesis v0.9.1 -> v0.9.2 Updating alloy-json-abi v0.8.16 -> v0.8.18 Updating alloy-json-rpc v0.9.1 -> v0.9.2 Updating alloy-network v0.9.1 -> v0.9.2 Updating alloy-network-primitives v0.9.1 -> v0.9.2 Updating alloy-node-bindings v0.9.1 -> v0.9.2 Updating alloy-primitives v0.8.16 -> v0.8.18 Updating alloy-provider v0.9.1 -> v0.9.2 Updating alloy-pubsub v0.9.1 -> v0.9.2 Updating alloy-rpc-client v0.9.1 -> v0.9.2 Updating alloy-rpc-types v0.9.1 -> v0.9.2 Updating alloy-rpc-types-anvil v0.9.1 -> v0.9.2 Updating alloy-rpc-types-any v0.9.1 -> v0.9.2 Updating alloy-rpc-types-debug v0.9.1 -> v0.9.2 Updating alloy-rpc-types-engine v0.9.1 -> v0.9.2 Updating alloy-rpc-types-eth v0.9.1 -> v0.9.2 Updating alloy-rpc-types-trace v0.9.1 -> v0.9.2 Updating alloy-rpc-types-txpool v0.9.1 -> v0.9.2 Updating alloy-serde v0.9.1 -> v0.9.2 Updating alloy-signer v0.9.1 -> v0.9.2 Updating alloy-signer-aws v0.9.1 -> v0.9.2 Updating alloy-signer-gcp v0.9.1 -> v0.9.2 Updating alloy-signer-ledger v0.9.1 -> v0.9.2 Updating alloy-signer-local v0.9.1 -> v0.9.2 Updating alloy-signer-trezor v0.9.1 -> v0.9.2 Updating alloy-sol-macro v0.8.16 -> v0.8.18 Updating alloy-sol-macro-expander v0.8.16 -> v0.8.18 Updating alloy-sol-macro-input v0.8.16 -> v0.8.18 Updating alloy-sol-type-parser v0.8.16 -> v0.8.18 Updating alloy-sol-types v0.8.16 -> v0.8.18 Updating alloy-transport v0.9.1 -> v0.9.2 Updating alloy-transport-http v0.9.1 -> v0.9.2 Updating alloy-transport-ipc v0.9.1 -> v0.9.2 Updating alloy-transport-ws v0.9.1 -> v0.9.2 Updating async-trait v0.1.83 -> v0.1.84 Updating aws-config v1.5.12 -> v1.5.13 Updating aws-runtime v1.5.2 -> v1.5.3 Updating aws-sdk-kms v1.53.0 -> v1.54.0 Updating aws-sdk-sso v1.52.0 -> v1.53.0 Updating aws-sdk-ssooidc v1.53.0 -> v1.54.0 Updating aws-sdk-sts v1.53.0 -> v1.54.0 Updating bstr v1.11.1 -> v1.11.3 Updating cc v1.2.6 -> v1.2.7 Removing diff v0.1.13 Removing hex-literal v0.4.1 Updating instability v0.3.5 -> v0.3.6 Updating jiff v0.1.18 -> v0.1.21 Removing pretty_assertions v1.4.1 Updating schnellru v0.2.3 -> v0.2.4 Updating syn v2.0.93 -> v2.0.94 Updating syn-solidity v0.8.16 -> v0.8.18 Updating tempfile v3.14.0 -> v3.15.0 Updating winnow v0.6.21 -> v0.6.22 note: pass `--verbose` to see 12 unchanged dependencies behind latest Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com> --- Cargo.lock | 381 +++++++++++++++++++++++++---------------------------- 1 file changed, 179 insertions(+), 202 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9349acd2f..fdb092086 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,9 +74,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "alloy-chains" -version = "0.1.51" +version = "0.1.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e0f0136c085132939da6b753452ebed4efaa73fe523bb855b10c199c2ebfaf" +checksum = "56f15afc5993458b42739ab3b69bdb6b4c8112acd3997dbea9bc092c9517137c" dependencies = [ "alloy-primitives", "num_enum", @@ -86,9 +86,9 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d802a6d579d924a2926d181bce43231aaab4699a7c206197e88fbc6b9dda846f" +checksum = "f4138dc275554afa6f18c4217262ac9388790b2fc393c2dfe03c51d357abf013" dependencies = [ "alloy-eips", "alloy-primitives", @@ -104,9 +104,9 @@ dependencies = [ [[package]] name = "alloy-consensus-any" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1bcb3e4810bff7e2a62ac0d741c70a7b5560e57b76eb0f0d33e1070735c60" +checksum = "0fa04e1882c31288ce1028fdf31b6ea94cfa9eafa2e497f903ded631c8c6a42c" dependencies = [ "alloy-consensus", "alloy-eips", @@ -118,9 +118,9 @@ dependencies = [ [[package]] name = "alloy-contract" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e56bc4dc06ab205dc4106348c44b92e0d979148f8db751994c11caabf5ebbef" +checksum = "5f21886c1fea0626f755a49b2ac653b396fb345233f6170db2da3d0ada31560c" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", @@ -139,9 +139,9 @@ dependencies = [ [[package]] name = "alloy-dyn-abi" -version = "0.8.16" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d2ea4d7f220a19c1f8c98822026d1d26a4b75a72e1a7308d02bab1f77c9a00" +checksum = "44e3b98c37b3218924cd1d2a8570666b89662be54e5b182643855f783ea68b33" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -188,9 +188,9 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938bc1cf2ec42579e187834efc254e76dd3fa19f526b57872713e6b95f411305" +checksum = "52dd5869ed09e399003e0e0ec6903d981b2a92e74c5d37e6b40890bad2517526" dependencies = [ "alloy-eip2930", "alloy-eip7702", @@ -206,9 +206,9 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b648eac186485ead3da160985b929e610a45eb39903f750da9b35f58a91eef52" +checksum = "e7d2a7fe5c1a9bd6793829ea21a636f30fc2b3f5d2e7418ba86d96e41dd1f460" dependencies = [ "alloy-eips", "alloy-primitives", @@ -219,9 +219,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.16" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79c6b4bcc1067a7394b5b2aec7da1bd829c8c476b796c73eb14da34392a07a7" +checksum = "731ea743b3d843bc657e120fb1d1e9cc94f5dab8107e35a82125a63e6420a102" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -231,9 +231,9 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a38b4b49667a84ecad7cdaf431b8bd3f14ca496e5a021df1c26d5c4595dca6" +checksum = "2008bedb8159a255b46b7c8614516eda06679ea82f620913679afbd8031fea72" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -245,9 +245,9 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb5dc326960e88eec6b5e9add221a071f15cb8fa93b9e88ee9c76cd0e4e1009" +checksum = "4556f01fe41d0677495df10a648ddcf7ce118b0e8aa9642a0e2b6dd1fb7259de" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -270,9 +270,9 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1535c89ae0648f2c15c0bf9b8b92670f6b3b8515b645425c8b46462563c0eae4" +checksum = "f31c3c6b71340a1d076831823f09cb6e02de01de5c6630a9631bdb36f947ff80" dependencies = [ "alloy-consensus", "alloy-eips", @@ -283,9 +283,9 @@ dependencies = [ [[package]] name = "alloy-node-bindings" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5af000a8d9aa22694c92a5c6ebd9113495d2eb78fb3579d02a715569b973cc26" +checksum = "4520cd4bc5cec20c32c98e4bc38914c7fb96bf4a712105e44da186a54e65e3ba" dependencies = [ "alloy-genesis", "alloy-primitives", @@ -300,9 +300,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.16" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0540fd0355d400b59633c27bd4b42173e59943f28e9d3376b77a24771d432d04" +checksum = "788bb18e8f61d5d9340b52143f27771daf7e1dccbaf2741621d2493f9debf52e" dependencies = [ "alloy-rlp", "arbitrary", @@ -314,7 +314,6 @@ dependencies = [ "foldhash", "getrandom", "hashbrown 0.15.2", - "hex-literal", "indexmap 2.7.0", "itoa", "k256", @@ -332,9 +331,9 @@ dependencies = [ [[package]] name = "alloy-provider" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d6ef38d75e4b0dce6737463099698f9b839d1c3f7c8883bfdfce8954374b" +checksum = "5a22c4441b3ebe2d77fa9cf629ba68c3f713eb91779cff84275393db97eddd82" dependencies = [ "alloy-chains", "alloy-consensus", @@ -375,9 +374,9 @@ dependencies = [ [[package]] name = "alloy-pubsub" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be3b30bab565198a1bda090915dd165ca9211154eb0b37d046a22829418dcc0" +checksum = "2269fd635f7b505f27c63a3cb293148cd02301efce4c8bdd9ff54fbfc4a20e23" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -411,14 +410,14 @@ checksum = "5a833d97bf8a5f0f878daf2c8451fff7de7f9de38baa5a45d936ec718d81255a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] name = "alloy-rpc-client" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5ed1e9957edfc8d155e2610e2ff3e10b059b89a6103de9f01579f40d8926d47" +checksum = "d06a292b37e182e514903ede6e623b9de96420e8109ce300da288a96d88b7e4b" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -442,9 +441,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206749723862bd27d5468270e30fc987c5b4376240aefee728d7e64282c9d146" +checksum = "9383845dd924939e7ab0298bbfe231505e20928907d7905aa3bf112287305e06" dependencies = [ "alloy-primitives", "alloy-rpc-types-anvil", @@ -458,9 +457,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-anvil" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac98a9d17ec4d851ea38e556c27b92e1ff8c97664cf1feb77aec38dcba34579" +checksum = "11495cb8c8d3141fc27556a4c9188b81531ad5ec3076a0394c61a6dcfbce9f34" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -470,9 +469,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-any" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ff23d7bde6ddeea4c1ca98e7a5a728326d543bd7133735c04ea83ebde41d0" +checksum = "ca445cef0eb6c2cf51cfb4e214fbf1ebd00893ae2e6f3b944c8101b07990f988" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", @@ -481,9 +480,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-debug" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d72085173d210806a27892eb72770a663f5b0c17598e37f18c6bb24f7583c3c" +checksum = "358d6a8d7340b9eb1a7589a6c1fb00df2c9b26e90737fa5ed0108724dd8dac2c" dependencies = [ "alloy-primitives", "serde", @@ -491,9 +490,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-engine" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee96e9793d3ec528ead6e8580f24e9acc71f5c2bc35feefba24465044bb77d76" +checksum = "4a5f821f30344862a0b6eb9a1c2eb91dfb2ff44c7489f37152a526cdcab79264" dependencies = [ "alloy-consensus", "alloy-eips", @@ -509,9 +508,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "319a0ca31863bd6fb9aafeaa16425d0a2f1228da44bc24fd2f997ba50afe7e18" +checksum = "0938bc615c02421bd86c1733ca7205cc3d99a122d9f9bff05726bd604b76a5c2" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -529,9 +528,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-trace" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2769894024f65ba252618e06a0ca22fc025377ade6d60d7f47a83ac9559680" +checksum = "cd38207e056cc7d1372367fbb4560ddf9107cbd20731743f641246bf0dede149" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -543,9 +542,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-txpool" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69bfa0d7934827098cd386965a796e7765485dc86c6ae03cda262ad9ccb30e01" +checksum = "b7fd456a3fa9ea732d1c0611c9d52b5326ee29f4d02d01b07dac453ed68d9eb5" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -555,9 +554,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81537867986734e5867a9131145bdc56301f5b37ef9c9fb4654d7f7691a4015d" +checksum = "ae0465c71d4dced7525f408d84873aeebb71faf807d22d74c4a426430ccd9b55" dependencies = [ "alloy-primitives", "serde", @@ -566,9 +565,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdcbfe7079c877b3cb6ec43017e94f66432480f1c1779f736c064e6a8d422cc" +checksum = "9bfa395ad5cc952c82358d31e4c68b27bf4a89a5456d9b27e226e77dac50e4ff" dependencies = [ "alloy-dyn-abi", "alloy-primitives", @@ -582,9 +581,9 @@ dependencies = [ [[package]] name = "alloy-signer-aws" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6da52893079d9c16ad00b882f9b900bfe7517426c729e4858bf8404c2c593503" +checksum = "0eb06810c34427d499863817eb506acf57cb9ded9224b374116cae4e22dbd4e9" dependencies = [ "alloy-consensus", "alloy-network", @@ -600,9 +599,9 @@ dependencies = [ [[package]] name = "alloy-signer-gcp" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dd0cd5702c40b836db606575d4122388e415c30eac99937f8fb65c19c8f4a9" +checksum = "d629e63fec8802ad53706d46e8eceeeae2b135c6648d0de41669a523bf17df4a" dependencies = [ "alloy-consensus", "alloy-network", @@ -618,9 +617,9 @@ dependencies = [ [[package]] name = "alloy-signer-ledger" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35a72689d2312268ba7b381633c8edf6f7aa4e18d7f2852f7cdcc7f0e2a7d1e" +checksum = "b426789566a19252cb46b757d91543a6f8e70330c72f312b86c5878595d092ef" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -638,9 +637,9 @@ dependencies = [ [[package]] name = "alloy-signer-local" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f5175bd063463e25f1ffc6daaa223db15baf4b18e3d83d0d31fb95756aab6cc" +checksum = "fbdc63ce9eda1283fcbaca66ba4a414b841c0e3edbeef9c86a71242fc9e84ccc" dependencies = [ "alloy-consensus", "alloy-network", @@ -657,9 +656,9 @@ dependencies = [ [[package]] name = "alloy-signer-trezor" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312d26fc0ad8c0662bdda1cd68f0ecc4b16c27b8d3d3c228558349218c9f4de1" +checksum = "6e7d0c000abd591c9cceac5c07f785f101c9a8c879c6ccd300feca1ae03bdef6" dependencies = [ "alloy-consensus", "alloy-network", @@ -674,23 +673,23 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.8.16" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6d1a14b4a9f6078ad9132775a2ebb465b06b387d60f7413ddc86d7bf7453408" +checksum = "a07b74d48661ab2e4b50bb5950d74dbff5e61dd8ed03bb822281b706d54ebacb" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.16" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4436b4b96d265eb17daea26eb31525c3076d024d10901e446790afbd2f7eeaf5" +checksum = "19cc9c7f20b90f9be1a8f71a3d8e283a43745137b0837b1a1cb13159d37cad72" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", @@ -700,16 +699,16 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.8.16" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5f58698a18b96faa8513519de112b79a96010b4ff84264ce54a217c52a8e98b" +checksum = "713b7e6dfe1cb2f55c80fb05fd22ed085a1b4e48217611365ed0ae598a74c6ac" dependencies = [ "alloy-json-abi", "const-hex", @@ -718,15 +717,15 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.93", + "syn 2.0.94", "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.8.16" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3d6d2c490f650c5abd65a9a583b09a8c8931c265d3a55b18a8e349dd6d9d84" +checksum = "1eda2711ab2e1fb517fc6e2ffa9728c9a232e296d16810810e6957b781a1b8bc" dependencies = [ "serde", "winnow", @@ -734,9 +733,9 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.8.16" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c766e4979fc19d70057150befe8e3ea3f0c4cbc6839b8eaaa250803451692305" +checksum = "e3b478bc9c0c4737a04cd976accde4df7eba0bdc0d90ad6ff43d58bc93cf79c1" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -747,9 +746,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6121c7a8791d7984bd3e1a487aae55c62358b0bd94330126db41d795d942e24e" +checksum = "d17722a198f33bbd25337660787aea8b8f57814febb7c746bc30407bdfc39448" dependencies = [ "alloy-json-rpc", "base64 0.22.1", @@ -767,9 +766,9 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15487cd2d7f2bfd8546e851d80db470603c2a1de82f7c39403078356b20d9a21" +checksum = "6e1509599021330a31c4a6816b655e34bf67acb1cc03c564e09fd8754ff6c5de" dependencies = [ "alloy-json-rpc", "alloy-transport", @@ -782,9 +781,9 @@ dependencies = [ [[package]] name = "alloy-transport-ipc" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a74511d4703f571c2b4da85458b5634855d97e10a94407c05d97b2052ed5450b" +checksum = "fa4da44bc9a5155ab599666d26decafcf12204b72a80eeaba7c5e234ee8ac205" dependencies = [ "alloy-json-rpc", "alloy-pubsub", @@ -803,9 +802,9 @@ dependencies = [ [[package]] name = "alloy-transport-ws" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f812a1f1ae7955964727d3040bf240955ca324d80383b9dd0ab21a6de3007386" +checksum = "58011745b2f17b334db40df9077d75b181f78360a5bc5c35519e15d4bfce15e2" dependencies = [ "alloy-pubsub", "alloy-transport", @@ -1242,7 +1241,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -1264,18 +1263,18 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "1b1244b10dcd56c92219da4e14caa97e312079e185f04ba3eea25061561dc0a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -1328,7 +1327,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -1339,9 +1338,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-config" -version = "1.5.12" +version = "1.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "649316840239f4e58df0b7f620c428f5fababbbca2d504488c641534050bd141" +checksum = "c03a50b30228d3af8865ce83376b4e99e1ffa34728220fe2860e4df0bb5278d6" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1381,9 +1380,9 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.5.2" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f6f1124d6e19ab6daf7f2e615644305dc6cb2d706892a8a8c0b98db35de020" +checksum = "b16d1aa50accc11a4b4d5c50f7fb81cc0cf60328259c587d0e6b0f11385bde46" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -1406,9 +1405,9 @@ dependencies = [ [[package]] name = "aws-sdk-kms" -version = "1.53.0" +version = "1.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e349416a1998fde638deed85c18efeefd81af293439c16d676b7fce992904389" +checksum = "a6cf16c0e5853312995505557b876dd3f9fb9941e96d031383528ccef14ace57" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1428,9 +1427,9 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.52.0" +version = "1.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb25f7129c74d36afe33405af4517524df8f74b635af8c2c8e91c1552b8397b2" +checksum = "1605dc0bf9f0a4b05b451441a17fcb0bda229db384f23bf5cead3adbab0664ac" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1450,9 +1449,9 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.53.0" +version = "1.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d03a3d5ef14851625eafd89660a751776f938bf32f309308b20dcca41c44b568" +checksum = "59f3f73466ff24f6ad109095e0f3f2c830bfb4cd6c8b12f744c8e61ebf4d3ba1" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1472,9 +1471,9 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.53.0" +version = "1.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3a9f073ae3a53b54421503063dfb87ff1ea83b876f567d92e8b8d9942ba91b" +checksum = "249b2acaa8e02fd4718705a9494e3eb633637139aa4bb09d70965b0448e865db" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1862,7 +1861,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -1877,9 +1876,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.11.1" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786a307d683a5bf92e6fd5fd69a7eb613751668d1d8d67d802846dfe367c62c8" +checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" dependencies = [ "memchr", "regex-automata 0.4.9", @@ -2079,9 +2078,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.6" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333" +checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" dependencies = [ "shlex", ] @@ -2245,7 +2244,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -2660,7 +2659,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -2671,7 +2670,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -2744,7 +2743,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -2765,7 +2764,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -2775,7 +2774,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -2796,7 +2795,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", "unicode-xid", ] @@ -2813,12 +2812,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - [[package]] name = "digest" version = "0.9.0" @@ -2910,7 +2903,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -2935,7 +2928,7 @@ checksum = "8dc51d98e636f5e3b0759a39257458b22619cac7e96d932da6eeb052891bb67c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -3062,7 +3055,7 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -3197,7 +3190,7 @@ dependencies = [ "regex", "serde", "serde_json", - "syn 2.0.93", + "syn 2.0.94", "toml 0.8.19", "walkdir", ] @@ -3225,7 +3218,7 @@ dependencies = [ "serde", "serde_json", "strum", - "syn 2.0.93", + "syn 2.0.94", "tempfile", "thiserror 1.0.69", "tiny-keccak", @@ -3629,7 +3622,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -4211,7 +4204,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -4371,7 +4364,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -4858,12 +4851,6 @@ dependencies = [ "serde", ] -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - [[package]] name = "hidapi-rusb" version = "1.3.3" @@ -4905,7 +4892,7 @@ dependencies = [ "markup5ever", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -5264,7 +5251,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -5364,7 +5351,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -5473,16 +5460,15 @@ dependencies = [ [[package]] name = "instability" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "898e106451f7335950c9cc64f8ec67b5f65698679ac67ed00619aeef14e1cf75" +checksum = "894813a444908c0c8c0e221b041771d107c4a21de1d317dc49bcc66e3c9e5b3f" dependencies = [ "darling", "indoc", - "pretty_assertions", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -5558,9 +5544,9 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jiff" -version = "0.1.18" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09ead9616bda43297ffc1fa32e01f5951c0f08cf5239a296a8d73f3b13fc2b6" +checksum = "ed0ce60560149333a8e41ca7dc78799c47c5fd435e2bc18faf6a054382eec037" dependencies = [ "jiff-tzdb-platform", "log", @@ -5964,7 +5950,7 @@ checksum = "23c9b935fbe1d6cbd1dac857b54a688145e2d93f48db36010514d0f612d0ad67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -6054,7 +6040,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -6328,7 +6314,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -6468,7 +6454,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -6631,7 +6617,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -6690,7 +6676,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -6774,7 +6760,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -6832,7 +6818,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -6925,16 +6911,6 @@ dependencies = [ "termtree", ] -[[package]] -name = "pretty_assertions" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" -dependencies = [ - "diff", - "yansi", -] - [[package]] name = "prettyplease" version = "0.2.25" @@ -6942,7 +6918,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -7020,7 +6996,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -7040,7 +7016,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", "version_check", "yansi", ] @@ -7104,7 +7080,7 @@ checksum = "4ee1c9ac207483d5e7db4940700de86a9aae46ef90c48b57f99fe7edb8345e49" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -7127,7 +7103,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -7962,7 +7938,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -8004,14 +7980,14 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] name = "schnellru" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367" +checksum = "356285bbf17bea63d9e52e96bd18f039672ac92b55b8cb997d6162a2a37d1649" dependencies = [ "ahash", "cfg-if", @@ -8190,7 +8166,7 @@ checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -8201,7 +8177,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -8245,7 +8221,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -8291,7 +8267,7 @@ checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -8599,7 +8575,7 @@ checksum = "f0cc54b74e214647c1bbfc098d080cc5deac77f8dcb99aca91747276b01a15ad" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -8763,7 +8739,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -8831,9 +8807,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.93" +version = "2.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c786062daee0d6db1132800e623df74274a0a87322d8e183338e01b3d98d058" +checksum = "987bc0be1cdea8b10216bd06e2ca407d40b9543468fafd3ddfb02f36e77f71f3" dependencies = [ "proc-macro2", "quote", @@ -8842,14 +8818,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.16" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74af950d86ec0f5b2ae2d7f1590bbfbcf4603a0a15742d8f98132ac4fe3efd4" +checksum = "31e89d8bf2768d277f40573c83a02a099e96d96dd3104e13ea676194e61ac4b0" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -8869,7 +8845,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -8880,12 +8856,13 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.14.0" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", + "getrandom", "once_cell", "rustix", "windows-sys 0.59.0", @@ -8979,7 +8956,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -8990,7 +8967,7 @@ checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -9125,7 +9102,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -9399,7 +9376,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -9814,7 +9791,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", "wasm-bindgen-shared", ] @@ -9849,7 +9826,7 @@ checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -10090,7 +10067,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -10101,7 +10078,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -10112,7 +10089,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -10123,7 +10100,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -10315,9 +10292,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.21" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f5bb5257f2407a5425c6e749bfd9692192a73e70a6060516ac04f889087d68" +checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980" dependencies = [ "memchr", ] @@ -10403,7 +10380,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", "synstructure", ] @@ -10425,7 +10402,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -10445,7 +10422,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", "synstructure", ] @@ -10466,7 +10443,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] @@ -10488,7 +10465,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.94", ] [[package]] From 2e9d84933a11bc497a87f7ff0c179136f315a514 Mon Sep 17 00:00:00 2001 From: Yash Atreya <44857776+yash-atreya@users.noreply.github.com> Date: Sun, 5 Jan 2025 22:30:18 +0530 Subject: [PATCH 37/45] chore(`config`): use solar for inline config parsing (#9615) --- Cargo.lock | 3 +- crates/config/Cargo.toml | 3 +- crates/config/src/inline/natspec.rs | 180 ++++++++++++++---------- crates/forge/tests/cli/inline_config.rs | 2 +- 4 files changed, 109 insertions(+), 79 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fdb092086..e94ba1920 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3991,7 +3991,8 @@ dependencies = [ "serde_json", "serde_regex", "similar-asserts", - "solang-parser", + "solar-ast", + "solar-parse", "tempfile", "thiserror 2.0.9", "toml 0.8.19", diff --git a/crates/config/Cargo.toml b/crates/config/Cargo.toml index ba01a1afb..560a17823 100644 --- a/crates/config/Cargo.toml +++ b/crates/config/Cargo.toml @@ -21,7 +21,8 @@ alloy-chains = { workspace = true, features = ["serde"] } alloy-primitives = { workspace = true, features = ["serde"] } revm-primitives.workspace = true -solang-parser.workspace = true +solar-parse.workspace = true +solar-ast.workspace = true dirs-next = "2" dunce.workspace = true diff --git a/crates/config/src/inline/natspec.rs b/crates/config/src/inline/natspec.rs index 5774d9e19..013e53c10 100644 --- a/crates/config/src/inline/natspec.rs +++ b/crates/config/src/inline/natspec.rs @@ -6,7 +6,11 @@ use foundry_compilers::{ }; use itertools::Itertools; use serde_json::Value; -use solang_parser::{helpers::CodeLocation, pt}; +use solar_ast::{ + ast::{Arena, CommentKind, Item, ItemKind}, + interface::{self, Session}, +}; +use solar_parse::Parser; use std::{collections::BTreeMap, path::Path}; /// Convenient struct to hold in-line per-test configurations @@ -30,7 +34,7 @@ impl NatSpec { let mut natspecs: Vec<Self> = vec![]; let solc = SolcParser::new(); - let solang = SolangParser::new(); + let solar = SolarParser::new(); for (id, artifact) in output.artifact_ids() { let abs_path = id.source.as_path(); let path = abs_path.strip_prefix(root).unwrap_or(abs_path); @@ -48,7 +52,7 @@ impl NatSpec { if !used_solc_ast { if let Ok(src) = std::fs::read_to_string(abs_path) { - solang.parse(&mut natspecs, &src, &contract, contract_name); + solar.parse(&mut natspecs, &src, &contract, contract_name); } } } @@ -201,11 +205,11 @@ impl SolcParser { } } -struct SolangParser { +struct SolarParser { _private: (), } -impl SolangParser { +impl SolarParser { fn new() -> Self { Self { _private: () } } @@ -222,57 +226,85 @@ impl SolangParser { return; } - let Ok((pt, comments)) = solang_parser::parse(src, 0) else { return }; - - // Collects natspects from the given range. - let mut handle_docs = |contract: &str, func: Option<&str>, start, end| { - let docs = solang_parser::doccomment::parse_doccomments(&comments, start, end); - natspecs.extend( - docs.into_iter() - .flat_map(|doc| doc.into_comments()) - .filter(|doc| doc.value.contains(INLINE_CONFIG_PREFIX)) - .map(|doc| NatSpec { - // not possible to obtain correct value due to solang-parser bug - // https://github.com/hyperledger/solang/issues/1658 - line: "0:0:0".to_string(), - contract: contract.to_string(), - function: func.map(|f| f.to_string()), - docs: doc.value, - }), - ); + let mut handle_docs = |item: &Item<'_>| { + if item.docs.is_empty() { + return; + } + let lines = item + .docs + .iter() + .filter_map(|d| { + let s = d.symbol.as_str(); + if !s.contains(INLINE_CONFIG_PREFIX) { + return None + } + match d.kind { + CommentKind::Line => Some(s.trim().to_string()), + CommentKind::Block => Some( + s.lines() + .filter(|line| line.contains(INLINE_CONFIG_PREFIX)) + .map(|line| line.trim_start().trim_start_matches('*').trim()) + .collect::<Vec<_>>() + .join("\n"), + ), + } + }) + .join("\n"); + if lines.is_empty() { + return; + } + let span = + item.docs.iter().map(|doc| doc.span).reduce(|a, b| a.to(b)).unwrap_or_default(); + natspecs.push(NatSpec { + contract: contract_id.to_string(), + function: if let ItemKind::Function(f) = &item.kind { + Some( + f.header + .name + .map(|sym| sym.to_string()) + .unwrap_or_else(|| f.kind.to_string()), + ) + } else { + None + }, + line: format!("{}:{}:0", span.lo().0, span.hi().0), + docs: lines, + }); }; - let mut prev_item_end = 0; - for item in &pt.0 { - let pt::SourceUnitPart::ContractDefinition(c) = item else { - prev_item_end = item.loc().end(); - continue - }; - let Some(id) = c.name.as_ref() else { - prev_item_end = item.loc().end(); - continue - }; - if id.name != contract_name { - prev_item_end = item.loc().end(); - continue - }; - - // Handle doc comments in between the previous contract and the current one. - handle_docs(contract_id, None, prev_item_end, item.loc().start()); - - let mut prev_end = c.loc.start(); - for part in &c.parts { - let pt::ContractPart::FunctionDefinition(f) = part else { continue }; - let start = f.loc.start(); - // Handle doc comments in between the previous function and the current one. - if let Some(name) = &f.name { - handle_docs(contract_id, Some(name.name.as_str()), prev_end, start); + let sess = Session::builder() + .with_silent_emitter(Some("Inline config parsing failed".to_string())) + .build(); + let _ = sess.enter(|| -> interface::Result<()> { + let arena = Arena::new(); + + let mut parser = Parser::from_source_code( + &sess, + &arena, + interface::source_map::FileName::Custom(contract_id.to_string()), + src.to_string(), + )?; + + let source_unit = parser.parse_file().map_err(|e| e.emit())?; + + for item in source_unit.items.iter() { + let ItemKind::Contract(c) = &item.kind else { continue }; + if c.name.as_str() != contract_name { + continue; + } + + // Handle contract level doc comments. + handle_docs(item); + + // Handle function level doc comments. + for item in c.body.iter() { + let ItemKind::Function(_) = &item.kind else { continue }; + handle_docs(item); } - prev_end = f.loc.end(); } - prev_item_end = item.loc().end(); - } + Ok(()) + }); } } @@ -318,7 +350,7 @@ mod tests { } #[test] - fn parse_solang() { + fn parse_solar() { let src = " contract C { /// forge-config: default.fuzz.runs = 600 @@ -336,10 +368,9 @@ function f2() {} /** forge-config: default.fuzz.runs = 800 */ function f3() {} } "; let mut natspecs = vec![]; - let solang = SolangParser::new(); let id = || "path.sol:C".to_string(); - let default_line = || "0:0:0".to_string(); - solang.parse(&mut natspecs, src, &id(), "C"); + let solar_parser = SolarParser::new(); + solar_parser.parse(&mut natspecs, src, &id(), "C"); assert_eq!( natspecs, [ @@ -347,28 +378,28 @@ function f2() {} /** forge-config: default.fuzz.runs = 800 */ function f3() {} NatSpec { contract: id(), function: Some("f1".to_string()), - line: default_line(), + line: "14:134:0".to_string(), docs: "forge-config: default.fuzz.runs = 600\nforge-config: default.fuzz.runs = 601".to_string(), }, // f2 NatSpec { contract: id(), function: Some("f2".to_string()), - line: default_line(), + line: "164:208:0".to_string(), docs: "forge-config: default.fuzz.runs = 700".to_string(), }, // f3 NatSpec { contract: id(), function: Some("f3".to_string()), - line: default_line(), + line: "226:270:0".to_string(), docs: "forge-config: default.fuzz.runs = 800".to_string(), }, // f4 NatSpec { contract: id(), function: Some("f4".to_string()), - line: default_line(), + line: "289:391:0".to_string(), docs: "forge-config: default.fuzz.runs = 1024\nforge-config: default.fuzz.max-test-rejects = 500".to_string(), }, ] @@ -376,7 +407,7 @@ function f2() {} /** forge-config: default.fuzz.runs = 800 */ function f3() {} } #[test] - fn parse_solang_2() { + fn parse_solar_2() { let src = r#" // SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity >=0.8.0; @@ -394,17 +425,16 @@ contract FuzzInlineConf is DSTest { } "#; let mut natspecs = vec![]; - let solang = SolangParser::new(); + let solar = SolarParser::new(); let id = || "inline/FuzzInlineConf.t.sol:FuzzInlineConf".to_string(); - let default_line = || "0:0:0".to_string(); - solang.parse(&mut natspecs, src, &id(), "FuzzInlineConf"); + solar.parse(&mut natspecs, src, &id(), "FuzzInlineConf"); assert_eq!( natspecs, [ NatSpec { contract: id(), function: Some("testInlineConfFuzz".to_string()), - line: default_line(), + line: "141:255:0".to_string(), docs: "forge-config: default.fuzz.runs = 1024\nforge-config: default.fuzz.max-test-rejects = 500".to_string(), }, ] @@ -466,7 +496,7 @@ contract FuzzInlineConf is DSTest { } #[test] - fn parse_solang_multiple_contracts_from_same_file() { + fn parse_solar_multiple_contracts_from_same_file() { let src = r#" // SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity >=0.8.0; @@ -484,29 +514,28 @@ contract FuzzInlineConf2 is DSTest { } "#; let mut natspecs = vec![]; - let solang = SolangParser::new(); + let solar = SolarParser::new(); let id = || "inline/FuzzInlineConf.t.sol:FuzzInlineConf".to_string(); - let default_line = || "0:0:0".to_string(); - solang.parse(&mut natspecs, src, &id(), "FuzzInlineConf"); + solar.parse(&mut natspecs, src, &id(), "FuzzInlineConf"); assert_eq!( natspecs, [NatSpec { contract: id(), function: Some("testInlineConfFuzz1".to_string()), - line: default_line(), + line: "142:181:0".to_string(), docs: "forge-config: default.fuzz.runs = 1".to_string(), },] ); let mut natspecs = vec![]; let id = || "inline/FuzzInlineConf2.t.sol:FuzzInlineConf2".to_string(); - solang.parse(&mut natspecs, src, &id(), "FuzzInlineConf2"); + solar.parse(&mut natspecs, src, &id(), "FuzzInlineConf2"); assert_eq!( natspecs, [NatSpec { contract: id(), function: Some("testInlineConfFuzz2".to_string()), - line: default_line(), + line: "264:303:0".to_string(), // should not get config from previous contract docs: "forge-config: default.fuzz.runs = 2".to_string(), },] @@ -529,23 +558,22 @@ contract FuzzInlineConf is DSTest { function testInlineConfFuzz2() {} }"#; let mut natspecs = vec![]; - let solang = SolangParser::new(); + let solar = SolarParser::new(); let id = || "inline/FuzzInlineConf.t.sol:FuzzInlineConf".to_string(); - let default_line = || "0:0:0".to_string(); - solang.parse(&mut natspecs, src, &id(), "FuzzInlineConf"); + solar.parse(&mut natspecs, src, &id(), "FuzzInlineConf"); assert_eq!( natspecs, [ NatSpec { contract: id(), function: None, - line: default_line(), + line: "101:140:0".to_string(), docs: "forge-config: default.fuzz.runs = 1".to_string(), }, NatSpec { contract: id(), function: Some("testInlineConfFuzz1".to_string()), - line: default_line(), + line: "181:220:0".to_string(), docs: "forge-config: default.fuzz.runs = 3".to_string(), } ] diff --git a/crates/forge/tests/cli/inline_config.rs b/crates/forge/tests/cli/inline_config.rs index 4e05d4b60..085cc88a8 100644 --- a/crates/forge/tests/cli/inline_config.rs +++ b/crates/forge/tests/cli/inline_config.rs @@ -65,7 +65,7 @@ forgetest!(invalid_profile, |prj, cmd| { .unwrap(); cmd.arg("test").assert_failure().stderr_eq(str![[r#" -Error: Inline config error at test/inline.sol:0:0:0: invalid profile `unknown.fuzz.runs = 2`; valid profiles: default +Error: Inline config error at test/inline.sol:80:123:0: invalid profile `unknown.fuzz.runs = 2`; valid profiles: default "#]]); }); From a5c5be5cae42b4871d87469b913477f05bf380fe Mon Sep 17 00:00:00 2001 From: Yash Atreya <44857776+yash-atreya@users.noreply.github.com> Date: Mon, 6 Jan 2025 03:32:04 +0530 Subject: [PATCH 38/45] chore(`bind-json`): replace solang with solar (#9616) --- crates/forge/bin/cmd/bind_json.rs | 160 +++++++++++++++------------- crates/forge/tests/cli/bind_json.rs | 71 ++++++++++++ 2 files changed, 157 insertions(+), 74 deletions(-) diff --git a/crates/forge/bin/cmd/bind_json.rs b/crates/forge/bin/cmd/bind_json.rs index d8a361134..efc58c6c7 100644 --- a/crates/forge/bin/cmd/bind_json.rs +++ b/crates/forge/bin/cmd/bind_json.rs @@ -15,12 +15,15 @@ use foundry_compilers::{ }; use foundry_config::Config; use itertools::Itertools; -use rayon::prelude::*; -use solang_parser::pt as solang_ast; +use solar_ast::{ + ast::{self, Arena, FunctionKind, Span, VarMut}, + interface::source_map::FileName, + visit::Visit, +}; +use solar_parse::{interface::Session, Parser as SolarParser}; use std::{ collections::{BTreeMap, BTreeSet}, - fmt, - fmt::Write, + fmt::{self, Write}, path::PathBuf, sync::Arc, }; @@ -85,85 +88,94 @@ impl BindJsonArgs { .unwrap() .1; - // Insert empty bindings file + let sess = Session::builder().with_stderr_emitter().build(); + let result = sess.enter(|| -> solar_parse::interface::Result<()> { + // TODO: Switch back to par_iter_mut and `enter_parallel` after solar update. + sources.0.iter_mut().try_for_each(|(path, source)| { + let mut content = Arc::try_unwrap(std::mem::take(&mut source.content)).unwrap(); + + let arena = Arena::new(); + let mut parser = SolarParser::from_source_code( + &sess, + &arena, + FileName::Real(path.clone()), + content.to_string(), + )?; + let ast = parser.parse_file().map_err(|e| e.emit())?; + + let mut visitor = PreprocessorVisitor::new(); + visitor.visit_source_unit(&ast); + visitor.update(&sess, &mut content); + + source.content = Arc::new(content); + Ok(()) + }) + }); + eyre::ensure!(result.is_ok(), "failed parsing"); + + // Insert empty bindings file. sources.insert(target_path.clone(), Source::new("library JsonBindings {}")); - let sources = Sources( - sources - .0 - .into_par_iter() - .map(|(path, source)| { - let mut locs_to_update = Vec::new(); - let mut content = Arc::unwrap_or_clone(source.content); - let (parsed, _) = solang_parser::parse(&content, 0) - .map_err(|errors| eyre::eyre!("Parser failed: {errors:?}"))?; - - // All function definitions in the file - let mut functions = Vec::new(); - - for part in &parsed.0 { - if let solang_ast::SourceUnitPart::FunctionDefinition(def) = part { - functions.push(def); - } - if let solang_ast::SourceUnitPart::ContractDefinition(contract) = part { - for part in &contract.parts { - match part { - solang_ast::ContractPart::FunctionDefinition(def) => { - functions.push(def); - } - // Remove `immutable` attributes - solang_ast::ContractPart::VariableDefinition(def) => { - for attr in &def.attrs { - if let solang_ast::VariableAttribute::Immutable(loc) = - attr - { - locs_to_update.push(( - loc.start(), - loc.end(), - String::new(), - )); - } - } - } - _ => {} - } - } - }; - } + Ok(PreprocessedState { sources, target_path, project, config }) + } +} - for def in functions { - // If there's no body block, keep the function as is - let Some(solang_ast::Statement::Block { loc, .. }) = def.body else { - continue; - }; - let new_body = match def.ty { - solang_ast::FunctionTy::Modifier => "{ _; }", - _ => "{ revert(); }", - }; - let start = loc.start(); - let end = loc.end(); - locs_to_update.push((start, end + 1, new_body.to_string())); - } +struct PreprocessorVisitor { + updates: Vec<(Span, &'static str)>, +} + +impl PreprocessorVisitor { + fn new() -> Self { + Self { updates: Vec::new() } + } - locs_to_update.sort_by_key(|(start, _, _)| *start); + fn update(mut self, sess: &Session, content: &mut String) { + if self.updates.is_empty() { + return; + } - let mut shift = 0_i64; + let sf = sess.source_map().lookup_source_file(self.updates[0].0.lo()); + let base = sf.start_pos.0; - for (start, end, new) in locs_to_update { - let start = ((start as i64) - shift) as usize; - let end = ((end as i64) - shift) as usize; + self.updates.sort_by_key(|(span, _)| span.lo()); + let mut shift = 0_i64; + for (span, new) in self.updates { + let lo = span.lo() - base; + let hi = span.hi() - base; + let start = ((lo.0 as i64) - shift) as usize; + let end = ((hi.0 as i64) - shift) as usize; - content.replace_range(start..end, new.as_str()); - shift += (end - start) as i64; - shift -= new.len() as i64; - } + content.replace_range(start..end, new); + shift += (end - start) as i64; + shift -= new.len() as i64; + } + } +} - Ok((path, Source::new(content))) - }) - .collect::<Result<BTreeMap<_, _>>>()?, - ); +impl<'ast> Visit<'ast> for PreprocessorVisitor { + fn visit_item_function(&mut self, func: &'ast ast::ItemFunction<'ast>) { + // Replace function bodies with a noop statement. + if let Some(block) = &func.body { + if !block.is_empty() { + let span = block.first().unwrap().span.to(block.last().unwrap().span); + let new_body = match func.kind { + FunctionKind::Modifier => "_;", + _ => "revert();", + }; + self.updates.push((span, new_body)); + } + } - Ok(PreprocessedState { sources, target_path, project, config }) + self.walk_item_function(func) + } + + fn visit_variable_definition(&mut self, var: &'ast ast::VariableDefinition<'ast>) { + // Remove `immutable` attributes. + if let Some(VarMut::Immutable) = var.mutability { + self.updates.push((var.span, "")); + } + + self.walk_variable_definition(var) } } diff --git a/crates/forge/tests/cli/bind_json.rs b/crates/forge/tests/cli/bind_json.rs index bdc8f0fa1..fcc081f6b 100644 --- a/crates/forge/tests/cli/bind_json.rs +++ b/crates/forge/tests/cli/bind_json.rs @@ -1,3 +1,5 @@ +use foundry_test_utils::snapbox; + // tests complete bind-json workflow // ensures that we can run forge-bind even if files are depending on yet non-existent bindings and // that generated bindings are correct @@ -50,5 +52,74 @@ contract BindJsonTest is Test { .unwrap(); cmd.arg("bind-json").assert_success(); + + snapbox::assert_data_eq!( + snapbox::Data::read_from(&prj.root().join("utils/JsonBindings.sol"), None), + snapbox::str![[r#" +// Automatically generated by forge bind-json. + +pragma solidity >=0.6.2 <0.9.0; +pragma experimental ABIEncoderV2; + +import {BindJsonTest, TopLevelStruct} from "test/JsonBindings.sol"; + +interface Vm { + function parseJsonTypeArray(string calldata json, string calldata key, string calldata typeDescription) external pure returns (bytes memory); + function parseJsonType(string calldata json, string calldata typeDescription) external pure returns (bytes memory); + function parseJsonType(string calldata json, string calldata key, string calldata typeDescription) external pure returns (bytes memory); + function serializeJsonType(string calldata typeDescription, bytes memory value) external pure returns (string memory json); + function serializeJsonType(string calldata objectKey, string calldata valueKey, string calldata typeDescription, bytes memory value) external returns (string memory json); +} + +library JsonBindings { + Vm constant vm = Vm(address(uint160(uint256(keccak256("hevm cheat code"))))); + + string constant schema_TopLevelStruct = "TopLevelStruct(uint256 param1,int8 param2)"; + string constant schema_ContractLevelStruct = "ContractLevelStruct(address[][] param1,address addrParam)"; + + function serialize(TopLevelStruct memory value) internal pure returns (string memory) { + return vm.serializeJsonType(schema_TopLevelStruct, abi.encode(value)); + } + + function serialize(TopLevelStruct memory value, string memory objectKey, string memory valueKey) internal returns (string memory) { + return vm.serializeJsonType(objectKey, valueKey, schema_TopLevelStruct, abi.encode(value)); + } + + function deserializeTopLevelStruct(string memory json) public pure returns (TopLevelStruct memory) { + return abi.decode(vm.parseJsonType(json, schema_TopLevelStruct), (TopLevelStruct)); + } + + function deserializeTopLevelStruct(string memory json, string memory path) public pure returns (TopLevelStruct memory) { + return abi.decode(vm.parseJsonType(json, path, schema_TopLevelStruct), (TopLevelStruct)); + } + + function deserializeTopLevelStructArray(string memory json, string memory path) public pure returns (TopLevelStruct[] memory) { + return abi.decode(vm.parseJsonTypeArray(json, path, schema_TopLevelStruct), (TopLevelStruct[])); + } + + function serialize(BindJsonTest.ContractLevelStruct memory value) internal pure returns (string memory) { + return vm.serializeJsonType(schema_ContractLevelStruct, abi.encode(value)); + } + + function serialize(BindJsonTest.ContractLevelStruct memory value, string memory objectKey, string memory valueKey) internal returns (string memory) { + return vm.serializeJsonType(objectKey, valueKey, schema_ContractLevelStruct, abi.encode(value)); + } + + function deserializeContractLevelStruct(string memory json) public pure returns (BindJsonTest.ContractLevelStruct memory) { + return abi.decode(vm.parseJsonType(json, schema_ContractLevelStruct), (BindJsonTest.ContractLevelStruct)); + } + + function deserializeContractLevelStruct(string memory json, string memory path) public pure returns (BindJsonTest.ContractLevelStruct memory) { + return abi.decode(vm.parseJsonType(json, path, schema_ContractLevelStruct), (BindJsonTest.ContractLevelStruct)); + } + + function deserializeContractLevelStructArray(string memory json, string memory path) public pure returns (BindJsonTest.ContractLevelStruct[] memory) { + return abi.decode(vm.parseJsonTypeArray(json, path, schema_ContractLevelStruct), (BindJsonTest.ContractLevelStruct[])); + } +} + +"#]], + ); + cmd.forge_fuse().args(["test"]).assert_success(); }); From 15a9f177611fb0bdf8c8ff46b7405788fcee4279 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Mon, 6 Jan 2025 09:29:05 +0100 Subject: [PATCH 39/45] chore(deps): bump solar 0.1.1 (#9627) --- Cargo.lock | 49 +++++++++++++------------- Cargo.toml | 5 ++- crates/chisel/src/solidity_helper.rs | 2 +- crates/config/Cargo.toml | 1 - crates/config/src/inline/natspec.rs | 10 +++--- crates/evm/traces/src/debug/sources.rs | 5 +-- crates/forge/Cargo.toml | 1 - crates/forge/bin/cmd/bind_json.rs | 28 +++++++++------ crates/forge/bin/cmd/geiger.rs | 14 +++++--- 9 files changed, 61 insertions(+), 54 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e94ba1920..26cdab3bb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -869,6 +869,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "710e8eae58854cdc1790fcb56cca04d712a17be849eeb81da2a724bf4bae2bc4" dependencies = [ "anstyle", + "memchr", "unicode-width 0.2.0", ] @@ -3486,7 +3487,6 @@ dependencies = [ "similar", "similar-asserts", "solang-parser", - "solar-ast", "solar-parse", "soldeer-commands", "strum", @@ -3858,9 +3858,9 @@ dependencies = [ [[package]] name = "foundry-compilers" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d817beee8c566a99f4267f25ff63d0de46c442948496ecef91ead56e3383090c" +checksum = "f67e3eab56847dcf269eb186226f95874b171e262952cff6c910da36b1469e10" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -3895,9 +3895,9 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec784a3a809ba2ee723fcfeb737a6ac90b4fd1e4d048c2d49fed6723bd35547" +checksum = "865b00448dc2a5d56bae287c36fa716379ffcdd937aefb7758bd20b62024d234" dependencies = [ "foundry-compilers-artifacts-solc", "foundry-compilers-artifacts-vyper", @@ -3905,9 +3905,9 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts-solc" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44549c33e5a03408c8d40c36d764b7e84d261258ef481c19e4a612e609fdf8a4" +checksum = "668972ba511f80895ea12c75cd12fccd6627c26e64763799d83978b4e0916cae" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -3929,9 +3929,9 @@ dependencies = [ [[package]] name = "foundry-compilers-artifacts-vyper" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a438605ae74689752b2f717165daac15766f1b2a166d2095715d5f9407084b52" +checksum = "5a24f7f2a7458171e055c0cb33272f5eccaefbd96d791d74177d9a1fca048f74" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -3944,9 +3944,9 @@ dependencies = [ [[package]] name = "foundry-compilers-core" -version = "0.12.8" +version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04ac6d85c3e2d12585f8e698b12ed4880b02716ec7fde5d62de9a194e62f4e36" +checksum = "8005271a079bc6470c61d4145d2e390a827b1ccbb96abb7b69b088f17ffb95e0" dependencies = [ "alloy-primitives", "cfg-if", @@ -3991,7 +3991,6 @@ dependencies = [ "serde_json", "serde_regex", "similar-asserts", - "solar-ast", "solar-parse", "tempfile", "thiserror 2.0.9", @@ -8499,9 +8498,9 @@ dependencies = [ [[package]] name = "solar-ast" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5aeaf7a4bd326242c909bd287291226a540b62b36fa5824880248f4b1d4d6af" +checksum = "5d3f6c4a476a16dcd36933a70ecdb0a807f8949cc5f3c4c1984e3748666bd714" dependencies = [ "alloy-primitives", "bumpalo", @@ -8518,18 +8517,18 @@ dependencies = [ [[package]] name = "solar-config" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31d00d672a40a1a3620d7696f01a2d3301abf883d8168e1a9da3bf83f0c8e343" +checksum = "d40434a61f2c14a9e3777fbc478167bddee9828532fc26c57e416e9277916b09" dependencies = [ "strum", ] [[package]] name = "solar-data-structures" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6e4eb0b72ed7adbb808897c85de08ea99609774a58c72e3dce55c758043ca2" +checksum = "71d07263243b313296eca18f18eda3a190902dc3284bf67ceff29b8b54dac3e6" dependencies = [ "bumpalo", "index_vec", @@ -8542,9 +8541,9 @@ dependencies = [ [[package]] name = "solar-interface" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21fb8925638f3da1bba7a9a6ebeac3511e5c6354f921f2bb2e1ddce4ac70c107" +checksum = "9a87009b6989b2cc44d8381e3b86ff3b90280d54a60321919b6416214cd602f3" dependencies = [ "annotate-snippets", "anstream", @@ -8563,16 +8562,16 @@ dependencies = [ "solar-config", "solar-data-structures", "solar-macros", - "thiserror 1.0.69", + "thiserror 2.0.9", "tracing", "unicode-width 0.2.0", ] [[package]] name = "solar-macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0cc54b74e214647c1bbfc098d080cc5deac77f8dcb99aca91747276b01a15ad" +checksum = "970d7c774741f786d62cab78290e47d845b0b9c0c9d094a1642aced1d7946036" dependencies = [ "proc-macro2", "quote", @@ -8581,9 +8580,9 @@ dependencies = [ [[package]] name = "solar-parse" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82c3659c15975cd80e5e1c44591278c230c59ad89082d797837499a4784e1b" +checksum = "2e1e2d07fae218aca1b4cca81216e5c9ad7822516d48a28f11e2eaa8ffa5b249" dependencies = [ "alloy-primitives", "bitflags 2.6.0", diff --git a/Cargo.toml b/Cargo.toml index d4ccda8e5..de388f21b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -171,11 +171,10 @@ foundry-linking = { path = "crates/linking" } # solc & compilation utilities foundry-block-explorers = { version = "0.9.0", default-features = false } -foundry-compilers = { version = "0.12.8", default-features = false } +foundry-compilers = { version = "0.12.9", default-features = false } foundry-fork-db = "0.10.0" solang-parser = "=0.3.3" -solar-ast = { version = "=0.1.0", default-features = false } -solar-parse = { version = "=0.1.0", default-features = false } +solar-parse = { version = "=0.1.1", default-features = false } ## revm revm = { version = "19.0.0", default-features = false } diff --git a/crates/chisel/src/solidity_helper.rs b/crates/chisel/src/solidity_helper.rs index 465b7b535..c9df0c357 100644 --- a/crates/chisel/src/solidity_helper.rs +++ b/crates/chisel/src/solidity_helper.rs @@ -15,7 +15,7 @@ use rustyline::{ Helper, }; use solar_parse::{ - interface::{Pos, Session, SessionGlobals}, + interface::{Session, SessionGlobals}, token::{Token, TokenKind}, Lexer, }; diff --git a/crates/config/Cargo.toml b/crates/config/Cargo.toml index 560a17823..c7efcaec9 100644 --- a/crates/config/Cargo.toml +++ b/crates/config/Cargo.toml @@ -22,7 +22,6 @@ alloy-primitives = { workspace = true, features = ["serde"] } revm-primitives.workspace = true solar-parse.workspace = true -solar-ast.workspace = true dirs-next = "2" dunce.workspace = true diff --git a/crates/config/src/inline/natspec.rs b/crates/config/src/inline/natspec.rs index 013e53c10..2cb605f03 100644 --- a/crates/config/src/inline/natspec.rs +++ b/crates/config/src/inline/natspec.rs @@ -6,11 +6,13 @@ use foundry_compilers::{ }; use itertools::Itertools; use serde_json::Value; -use solar_ast::{ - ast::{Arena, CommentKind, Item, ItemKind}, - interface::{self, Session}, +use solar_parse::{ + ast::{ + interface::{self, Session}, + Arena, CommentKind, Item, ItemKind, + }, + Parser, }; -use solar_parse::Parser; use std::{collections::BTreeMap, path::Path}; /// Convenient struct to hold in-line per-test configurations diff --git a/crates/evm/traces/src/debug/sources.rs b/crates/evm/traces/src/debug/sources.rs index b2e37e32d..5c0caa579 100644 --- a/crates/evm/traces/src/debug/sources.rs +++ b/crates/evm/traces/src/debug/sources.rs @@ -11,10 +11,7 @@ use foundry_compilers::{ use foundry_evm_core::utils::PcIcMap; use foundry_linking::Linker; use rayon::prelude::*; -use solar_parse::{ - interface::{Pos, Session}, - Parser, -}; +use solar_parse::{interface::Session, Parser}; use std::{ collections::{BTreeMap, HashMap}, ops::Range, diff --git a/crates/forge/Cargo.toml b/crates/forge/Cargo.toml index cbbfa814d..8deafcd5d 100644 --- a/crates/forge/Cargo.toml +++ b/crates/forge/Cargo.toml @@ -89,7 +89,6 @@ semver.workspace = true serde_json.workspace = true similar = { version = "2", features = ["inline"] } solang-parser.workspace = true -solar-ast.workspace = true solar-parse.workspace = true strum = { workspace = true, features = ["derive"] } thiserror.workspace = true diff --git a/crates/forge/bin/cmd/bind_json.rs b/crates/forge/bin/cmd/bind_json.rs index efc58c6c7..5e63b14d8 100644 --- a/crates/forge/bin/cmd/bind_json.rs +++ b/crates/forge/bin/cmd/bind_json.rs @@ -15,15 +15,16 @@ use foundry_compilers::{ }; use foundry_config::Config; use itertools::Itertools; -use solar_ast::{ - ast::{self, Arena, FunctionKind, Span, VarMut}, - interface::source_map::FileName, - visit::Visit, +use rayon::prelude::*; +use solar_parse::{ + ast::{self, interface::source_map::FileName, visit::Visit, Arena, FunctionKind, Span, VarMut}, + interface::Session, + Parser as SolarParser, }; -use solar_parse::{interface::Session, Parser as SolarParser}; use std::{ collections::{BTreeMap, BTreeSet}, fmt::{self, Write}, + ops::ControlFlow, path::PathBuf, sync::Arc, }; @@ -89,9 +90,8 @@ impl BindJsonArgs { .1; let sess = Session::builder().with_stderr_emitter().build(); - let result = sess.enter(|| -> solar_parse::interface::Result<()> { - // TODO: Switch back to par_iter_mut and `enter_parallel` after solar update. - sources.0.iter_mut().try_for_each(|(path, source)| { + let result = sess.enter_parallel(|| -> solar_parse::interface::Result<()> { + sources.0.par_iter_mut().try_for_each(|(path, source)| { let mut content = Arc::try_unwrap(std::mem::take(&mut source.content)).unwrap(); let arena = Arena::new(); @@ -153,7 +153,12 @@ impl PreprocessorVisitor { } impl<'ast> Visit<'ast> for PreprocessorVisitor { - fn visit_item_function(&mut self, func: &'ast ast::ItemFunction<'ast>) { + type BreakValue = solar_parse::interface::data_structures::Never; + + fn visit_item_function( + &mut self, + func: &'ast ast::ItemFunction<'ast>, + ) -> ControlFlow<Self::BreakValue> { // Replace function bodies with a noop statement. if let Some(block) = &func.body { if !block.is_empty() { @@ -169,7 +174,10 @@ impl<'ast> Visit<'ast> for PreprocessorVisitor { self.walk_item_function(func) } - fn visit_variable_definition(&mut self, var: &'ast ast::VariableDefinition<'ast>) { + fn visit_variable_definition( + &mut self, + var: &'ast ast::VariableDefinition<'ast>, + ) -> ControlFlow<Self::BreakValue> { // Remove `immutable` attributes. if let Some(VarMut::Immutable) = var.mutability { self.updates.push((var.span, "")); diff --git a/crates/forge/bin/cmd/geiger.rs b/crates/forge/bin/cmd/geiger.rs index 6d4c735a9..ace3bbe1a 100644 --- a/crates/forge/bin/cmd/geiger.rs +++ b/crates/forge/bin/cmd/geiger.rs @@ -4,9 +4,11 @@ use foundry_cli::utils::LoadConfig; use foundry_compilers::{resolver::parse::SolData, Graph}; use foundry_config::{impl_figment_convert_basic, Config}; use itertools::Itertools; -use solar_ast::visit::Visit; -use solar_parse::{ast, interface::Session}; -use std::path::{Path, PathBuf}; +use solar_parse::{ast, ast::visit::Visit, interface::Session}; +use std::{ + ops::ControlFlow, + path::{Path, PathBuf}, +}; /// CLI arguments for `forge geiger`. #[derive(Clone, Debug, Parser)] @@ -144,7 +146,9 @@ impl<'a> Visitor<'a> { } impl<'ast> Visit<'ast> for Visitor<'_> { - fn visit_expr(&mut self, expr: &'ast ast::Expr<'ast>) { + type BreakValue = solar_parse::interface::data_structures::Never; + + fn visit_expr(&mut self, expr: &'ast ast::Expr<'ast>) -> ControlFlow<Self::BreakValue> { if let ast::ExprKind::Call(lhs, _args) = &expr.kind { if let ast::ExprKind::Member(_lhs, member) = &lhs.kind { if self.unsafe_cheatcodes.iter().any(|c| c.as_str() == member.as_str()) { @@ -154,6 +158,6 @@ impl<'ast> Visit<'ast> for Visitor<'_> { } } } - self.walk_expr(expr); + self.walk_expr(expr) } } From dc8d980ee312abdc24a0c92193cf433be23aa1df Mon Sep 17 00:00:00 2001 From: Marquis Shanahan <29431502+9547@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:02:33 +0800 Subject: [PATCH 40/45] chore(forge): remove `forge debug` subcommand (#9606) forge: rm subcommand debug Co-authored-by: 9547 <nivefive9547@gmail.com> Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com> --- crates/forge/bin/cmd/debug.rs | 69 ----------------------------------- crates/forge/bin/cmd/mod.rs | 1 - crates/forge/bin/main.rs | 1 - crates/forge/bin/opts.rs | 8 +--- 4 files changed, 2 insertions(+), 77 deletions(-) delete mode 100644 crates/forge/bin/cmd/debug.rs diff --git a/crates/forge/bin/cmd/debug.rs b/crates/forge/bin/cmd/debug.rs deleted file mode 100644 index 5ccfc13d5..000000000 --- a/crates/forge/bin/cmd/debug.rs +++ /dev/null @@ -1,69 +0,0 @@ -use clap::{Parser, ValueHint}; -use forge_script::ScriptArgs; -use forge_verify::retry::RETRY_VERIFY_ON_CREATE; -use foundry_cli::opts::CoreBuildArgs; -use foundry_common::evm::EvmArgs; -use std::path::PathBuf; - -// Loads project's figment and merges the build cli arguments into it -foundry_config::impl_figment_convert!(DebugArgs, opts, evm_args); - -/// CLI arguments for `forge debug`. -#[derive(Clone, Debug, Parser)] -pub struct DebugArgs { - /// The contract you want to run. Either the file path or contract name. - /// - /// If multiple contracts exist in the same file you must specify the target contract with - /// --target-contract. - #[arg(value_hint = ValueHint::FilePath)] - pub path: PathBuf, - - /// Arguments to pass to the script function. - pub args: Vec<String>, - - /// The name of the contract you want to run. - #[arg(long, visible_alias = "tc", value_name = "CONTRACT_NAME")] - pub target_contract: Option<String>, - - /// The signature of the function you want to call in the contract, or raw calldata. - #[arg(long, short, default_value = "run()", value_name = "SIGNATURE")] - pub sig: String, - - /// Open the script in the debugger. - #[arg(long)] - pub debug: bool, - - /// File path to dump execution details as JSON. - #[arg( - long, - requires = "debug", - value_hint = ValueHint::FilePath, - value_name = "PATH" - )] - pub dump: Option<PathBuf>, - - #[command(flatten)] - pub opts: CoreBuildArgs, - - #[command(flatten)] - pub evm_args: EvmArgs, -} - -impl DebugArgs { - pub async fn run(self) -> eyre::Result<()> { - let script = ScriptArgs { - path: self.path.to_str().expect("Invalid path string.").to_string(), - args: self.args, - target_contract: self.target_contract, - sig: self.sig, - gas_estimate_multiplier: 130, - opts: self.opts, - evm_args: self.evm_args, - debug: true, - dump: self.dump, - retry: RETRY_VERIFY_ON_CREATE, - ..Default::default() - }; - script.run_script().await - } -} diff --git a/crates/forge/bin/cmd/mod.rs b/crates/forge/bin/cmd/mod.rs index 427b25fb0..d6a70c9da 100644 --- a/crates/forge/bin/cmd/mod.rs +++ b/crates/forge/bin/cmd/mod.rs @@ -48,7 +48,6 @@ pub mod compiler; pub mod config; pub mod coverage; pub mod create; -pub mod debug; pub mod doc; pub mod eip712; pub mod flatten; diff --git a/crates/forge/bin/main.rs b/crates/forge/bin/main.rs index d60c1639a..60a55af7a 100644 --- a/crates/forge/bin/main.rs +++ b/crates/forge/bin/main.rs @@ -58,7 +58,6 @@ fn run() -> Result<()> { cmd.run().map(drop) } } - ForgeSubcommand::Debug(cmd) => utils::block_on(cmd.run()), ForgeSubcommand::VerifyContract(args) => utils::block_on(args.run()), ForgeSubcommand::VerifyCheck(args) => utils::block_on(args.run()), ForgeSubcommand::VerifyBytecode(cmd) => utils::block_on(cmd.run()), diff --git a/crates/forge/bin/opts.rs b/crates/forge/bin/opts.rs index 380cb61d4..f32ec0222 100644 --- a/crates/forge/bin/opts.rs +++ b/crates/forge/bin/opts.rs @@ -1,7 +1,7 @@ use crate::cmd::{ bind::BindArgs, bind_json, build::BuildArgs, cache::CacheArgs, clone::CloneArgs, - compiler::CompilerArgs, config, coverage, create::CreateArgs, debug::DebugArgs, doc::DocArgs, - eip712, flatten, fmt::FmtArgs, geiger, generate, init::InitArgs, inspect, install::InstallArgs, + compiler::CompilerArgs, config, coverage, create::CreateArgs, doc::DocArgs, eip712, flatten, + fmt::FmtArgs, geiger, generate, init::InitArgs, inspect, install::InstallArgs, remappings::RemappingArgs, remove::RemoveArgs, selectors::SelectorsSubcommands, snapshot, soldeer, test, tree, update, }; @@ -61,10 +61,6 @@ pub enum ForgeSubcommand { /// Clone a contract from Etherscan. Clone(CloneArgs), - /// Debugs a single smart contract as a script. - #[command(visible_alias = "d")] - Debug(DebugArgs), - /// Update one or multiple dependencies. /// /// If no arguments are provided, then all dependencies are updated. From 782787b32127b33c5453f5e569d218c65f2db217 Mon Sep 17 00:00:00 2001 From: Marquis Shanahan <29431502+9547@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:32:00 +0800 Subject: [PATCH 41/45] feat(test): add repro issue8566 testcase (#9617) * feat(test): add Issue8566 testcase Signed-off-by: 9547 <29431502+9547@users.noreply.github.com> * bump alloy to 0.8.18 Signed-off-by: 9547 <29431502+9547@users.noreply.github.com> --------- Signed-off-by: 9547 <29431502+9547@users.noreply.github.com> --- Cargo.toml | 14 +++++++------- crates/forge/tests/it/repros.rs | 3 +++ testdata/default/repros/Issue8566.t.sol | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 testdata/default/repros/Issue8566.t.sol diff --git a/Cargo.toml b/Cargo.toml index de388f21b..304597c16 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -210,17 +210,17 @@ alloy-node-bindings = { version = "0.9.0", default-features = false } alloy-network-primitives = { version = "0.9.0", default-features = false } ## alloy-core -alloy-dyn-abi = "0.8.14" -alloy-json-abi = "0.8.14" -alloy-primitives = { version = "0.8.14", features = [ +alloy-dyn-abi = "0.8.18" +alloy-json-abi = "0.8.18" +alloy-primitives = { version = "0.8.18", features = [ "getrandom", "rand", "map-foldhash", ] } -alloy-sol-macro-expander = "0.8.14" -alloy-sol-macro-input = "0.8.14" -alloy-sol-types = "0.8.14" -syn-solidity = "0.8.14" +alloy-sol-macro-expander = "0.8.18" +alloy-sol-macro-input = "0.8.18" +alloy-sol-types = "0.8.18" +syn-solidity = "0.8.18" alloy-chains = "0.1" alloy-rlp = "0.3" diff --git a/crates/forge/tests/it/repros.rs b/crates/forge/tests/it/repros.rs index 2a47d3d3e..863b8b284 100644 --- a/crates/forge/tests/it/repros.rs +++ b/crates/forge/tests/it/repros.rs @@ -389,3 +389,6 @@ test_repro!(8971; |config| { // https://github.com/foundry-rs/foundry/issues/8639 test_repro!(8639); + +// https://github.com/foundry-rs/foundry/issues/8566 +test_repro!(8566); diff --git a/testdata/default/repros/Issue8566.t.sol b/testdata/default/repros/Issue8566.t.sol new file mode 100644 index 000000000..f300d096f --- /dev/null +++ b/testdata/default/repros/Issue8566.t.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: MIT OR Apache-2.0 +pragma solidity ^0.8.18; + +import "ds-test/test.sol"; +import "cheats/Vm.sol"; + +// https://github.com/foundry-rs/foundry/issues/8566 +contract Issue8566Test is DSTest { + Vm constant vm = Vm(HEVM_ADDRESS); + + function testParseJsonUint() public { + string memory json = + "{ \"1284\": { \"addRewardInfo\": { \"amount\": 74258.225772486694040708e18, \"rewardPerSec\": 0.03069536448928848133e20 } } }"; + + assertEq(74258225772486694040708, vm.parseJsonUint(json, ".1284.addRewardInfo.amount")); + assertEq(3069536448928848133, vm.parseJsonUint(json, ".1284.addRewardInfo.rewardPerSec")); + } +} From e4fdc45558466ff24c347a179f678fb1b02c0bdc Mon Sep 17 00:00:00 2001 From: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:46:26 +0100 Subject: [PATCH 42/45] chore: standardize use of `opts` / `args` (#9629) * globalopts -> globalargs * consistently use opts for configurations, args for command line arguments --- crates/anvil/src/anvil.rs | 8 +-- crates/anvil/src/cmd.rs | 80 +++++++++------------ crates/cast/bin/args.rs | 6 +- crates/cast/bin/cmd/storage.rs | 4 +- crates/chisel/bin/main.rs | 12 ++-- crates/cli/src/opts/build/core.rs | 22 +++--- crates/cli/src/opts/build/mod.rs | 16 ++--- crates/cli/src/opts/build/paths.rs | 8 +-- crates/cli/src/opts/global.rs | 6 +- crates/cli/src/opts/mod.rs | 4 +- crates/cli/src/opts/{ethereum.rs => rpc.rs} | 0 crates/forge/bin/cmd/bind.rs | 12 ++-- crates/forge/bin/cmd/bind_json.rs | 6 +- crates/forge/bin/cmd/build.rs | 8 +-- crates/forge/bin/cmd/clone.rs | 12 ++-- crates/forge/bin/cmd/config.rs | 6 +- crates/forge/bin/cmd/create.rs | 22 +++--- crates/forge/bin/cmd/debug.rs | 69 ++++++++++++++++++ crates/forge/bin/cmd/eip712.rs | 6 +- crates/forge/bin/cmd/flatten.rs | 8 +-- crates/forge/bin/cmd/init.rs | 12 ++-- crates/forge/bin/cmd/inspect.rs | 8 +-- crates/forge/bin/cmd/mod.rs | 4 +- crates/forge/bin/cmd/selectors.rs | 28 ++++---- crates/forge/bin/cmd/test/mod.rs | 37 +++++----- crates/forge/bin/cmd/tree.rs | 6 +- crates/forge/bin/cmd/watch.rs | 2 +- crates/forge/bin/opts.rs | 6 +- crates/script/src/execute.rs | 2 +- crates/script/src/lib.rs | 21 +++--- crates/script/src/verify.rs | 6 +- 31 files changed, 250 insertions(+), 197 deletions(-) rename crates/cli/src/opts/{ethereum.rs => rpc.rs} (100%) create mode 100644 crates/forge/bin/cmd/debug.rs diff --git a/crates/anvil/src/anvil.rs b/crates/anvil/src/anvil.rs index 48e17ed44..ffdcc1755 100644 --- a/crates/anvil/src/anvil.rs +++ b/crates/anvil/src/anvil.rs @@ -3,7 +3,7 @@ use anvil::cmd::NodeArgs; use clap::{CommandFactory, Parser, Subcommand}; use eyre::Result; -use foundry_cli::{opts::GlobalOpts, utils}; +use foundry_cli::{opts::GlobalArgs, utils}; #[cfg(all(feature = "jemalloc", unix))] #[global_allocator] @@ -13,9 +13,9 @@ static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; #[derive(Parser)] #[command(name = "anvil", version = anvil::VERSION_MESSAGE, next_display_order = None)] pub struct Anvil { - /// Include the global options. + /// Include the global arguments. #[command(flatten)] - pub global: GlobalOpts, + pub global: GlobalArgs, #[command(flatten)] pub node: NodeArgs, @@ -50,7 +50,7 @@ fn run() -> Result<()> { let mut args = Anvil::parse(); args.global.init()?; - args.node.evm_opts.resolve_rpc_alias(); + args.node.evm.resolve_rpc_alias(); if let Some(cmd) = &args.cmd { match cmd { diff --git a/crates/anvil/src/cmd.rs b/crates/anvil/src/cmd.rs index 19e9193f9..8be6be750 100644 --- a/crates/anvil/src/cmd.rs +++ b/crates/anvil/src/cmd.rs @@ -185,7 +185,7 @@ pub struct NodeArgs { pub transaction_block_keeper: Option<usize>, #[command(flatten)] - pub evm_opts: AnvilEvmArgs, + pub evm: AnvilEvmArgs, #[command(flatten)] pub server_config: ServerConfig, @@ -209,15 +209,12 @@ const DEFAULT_DUMP_INTERVAL: Duration = Duration::from_secs(60); impl NodeArgs { pub fn into_node_config(self) -> eyre::Result<NodeConfig> { let genesis_balance = Unit::ETHER.wei().saturating_mul(U256::from(self.balance)); - let compute_units_per_second = if self.evm_opts.no_rate_limit { - Some(u64::MAX) - } else { - self.evm_opts.compute_units_per_second - }; + let compute_units_per_second = + if self.evm.no_rate_limit { Some(u64::MAX) } else { self.evm.compute_units_per_second }; let hardfork = match &self.hardfork { Some(hf) => { - if self.evm_opts.optimism { + if self.evm.optimism { Some(OptimismHardfork::from_str(hf)?.into()) } else { Some(EthereumHardfork::from_str(hf)?.into()) @@ -227,9 +224,9 @@ impl NodeArgs { }; Ok(NodeConfig::default() - .with_gas_limit(self.evm_opts.gas_limit) - .disable_block_gas_limit(self.evm_opts.disable_block_gas_limit) - .with_gas_price(self.evm_opts.gas_price) + .with_gas_limit(self.evm.gas_limit) + .disable_block_gas_limit(self.evm.disable_block_gas_limit) + .with_gas_price(self.evm.gas_price) .with_hardfork(hardfork) .with_blocktime(self.block_time) .with_no_mining(self.no_mining) @@ -238,54 +235,50 @@ impl NodeArgs { .with_genesis_balance(genesis_balance) .with_genesis_timestamp(self.timestamp) .with_port(self.port) - .with_fork_choice( - match (self.evm_opts.fork_block_number, self.evm_opts.fork_transaction_hash) { - (Some(block), None) => Some(ForkChoice::Block(block)), - (None, Some(hash)) => Some(ForkChoice::Transaction(hash)), - _ => { - self.evm_opts.fork_url.as_ref().and_then(|f| f.block).map(ForkChoice::Block) - } - }, - ) - .with_fork_headers(self.evm_opts.fork_headers) - .with_fork_chain_id(self.evm_opts.fork_chain_id.map(u64::from).map(U256::from)) - .fork_request_timeout(self.evm_opts.fork_request_timeout.map(Duration::from_millis)) - .fork_request_retries(self.evm_opts.fork_request_retries) - .fork_retry_backoff(self.evm_opts.fork_retry_backoff.map(Duration::from_millis)) + .with_fork_choice(match (self.evm.fork_block_number, self.evm.fork_transaction_hash) { + (Some(block), None) => Some(ForkChoice::Block(block)), + (None, Some(hash)) => Some(ForkChoice::Transaction(hash)), + _ => self.evm.fork_url.as_ref().and_then(|f| f.block).map(ForkChoice::Block), + }) + .with_fork_headers(self.evm.fork_headers) + .with_fork_chain_id(self.evm.fork_chain_id.map(u64::from).map(U256::from)) + .fork_request_timeout(self.evm.fork_request_timeout.map(Duration::from_millis)) + .fork_request_retries(self.evm.fork_request_retries) + .fork_retry_backoff(self.evm.fork_retry_backoff.map(Duration::from_millis)) .fork_compute_units_per_second(compute_units_per_second) - .with_eth_rpc_url(self.evm_opts.fork_url.map(|fork| fork.url)) - .with_base_fee(self.evm_opts.block_base_fee_per_gas) - .disable_min_priority_fee(self.evm_opts.disable_min_priority_fee) - .with_storage_caching(self.evm_opts.no_storage_caching) + .with_eth_rpc_url(self.evm.fork_url.map(|fork| fork.url)) + .with_base_fee(self.evm.block_base_fee_per_gas) + .disable_min_priority_fee(self.evm.disable_min_priority_fee) + .with_storage_caching(self.evm.no_storage_caching) .with_server_config(self.server_config) .with_host(self.host) .set_silent(shell::is_quiet()) .set_config_out(self.config_out) - .with_chain_id(self.evm_opts.chain_id) + .with_chain_id(self.evm.chain_id) .with_transaction_order(self.order) .with_genesis(self.init) - .with_steps_tracing(self.evm_opts.steps_tracing) - .with_print_logs(!self.evm_opts.disable_console_log) - .with_auto_impersonate(self.evm_opts.auto_impersonate) + .with_steps_tracing(self.evm.steps_tracing) + .with_print_logs(!self.evm.disable_console_log) + .with_auto_impersonate(self.evm.auto_impersonate) .with_ipc(self.ipc) - .with_code_size_limit(self.evm_opts.code_size_limit) - .disable_code_size_limit(self.evm_opts.disable_code_size_limit) + .with_code_size_limit(self.evm.code_size_limit) + .disable_code_size_limit(self.evm.disable_code_size_limit) .set_pruned_history(self.prune_history) .with_init_state(self.load_state.or_else(|| self.state.and_then(|s| s.state))) .with_transaction_block_keeper(self.transaction_block_keeper) .with_max_persisted_states(self.max_persisted_states) - .with_optimism(self.evm_opts.optimism) - .with_odyssey(self.evm_opts.odyssey) - .with_disable_default_create2_deployer(self.evm_opts.disable_default_create2_deployer) + .with_optimism(self.evm.optimism) + .with_odyssey(self.evm.odyssey) + .with_disable_default_create2_deployer(self.evm.disable_default_create2_deployer) .with_slots_in_an_epoch(self.slots_in_an_epoch) - .with_memory_limit(self.evm_opts.memory_limit) + .with_memory_limit(self.evm.memory_limit) .with_cache_path(self.cache_path)) } fn account_generator(&self) -> AccountGenerator { let mut gen = AccountGenerator::new(self.accounts as usize) .phrase(DEFAULT_MNEMONIC) - .chain_id(self.evm_opts.chain_id.unwrap_or_else(|| CHAIN_ID.into())); + .chain_id(self.evm.chain_id.unwrap_or_else(|| CHAIN_ID.into())); if let Some(ref mnemonic) = self.mnemonic { gen = gen.phrase(mnemonic); } else if let Some(count) = self.mnemonic_random { @@ -845,10 +838,7 @@ mod tests { "--fork-header", "Referrer: example.com", ]); - assert_eq!( - args.evm_opts.fork_headers, - vec!["User-Agent: test-agent", "Referrer: example.com"] - ); + assert_eq!(args.evm.fork_headers, vec!["User-Agent: test-agent", "Referrer: example.com"]); } #[test] @@ -869,7 +859,7 @@ mod tests { #[test] fn can_parse_disable_block_gas_limit() { let args: NodeArgs = NodeArgs::parse_from(["anvil", "--disable-block-gas-limit"]); - assert!(args.evm_opts.disable_block_gas_limit); + assert!(args.evm.disable_block_gas_limit); let args = NodeArgs::try_parse_from(["anvil", "--disable-block-gas-limit", "--gas-limit", "100"]); @@ -879,7 +869,7 @@ mod tests { #[test] fn can_parse_disable_code_size_limit() { let args: NodeArgs = NodeArgs::parse_from(["anvil", "--disable-code-size-limit"]); - assert!(args.evm_opts.disable_code_size_limit); + assert!(args.evm.disable_code_size_limit); let args = NodeArgs::try_parse_from([ "anvil", diff --git a/crates/cast/bin/args.rs b/crates/cast/bin/args.rs index d9c86e901..657fd0249 100644 --- a/crates/cast/bin/args.rs +++ b/crates/cast/bin/args.rs @@ -9,7 +9,7 @@ use alloy_primitives::{Address, B256, U256}; use alloy_rpc_types::BlockId; use clap::{Parser, Subcommand, ValueHint}; use eyre::Result; -use foundry_cli::opts::{EtherscanOpts, GlobalOpts, RpcOpts}; +use foundry_cli::opts::{EtherscanOpts, GlobalArgs, RpcOpts}; use foundry_common::ens::NameOrAddress; use std::{path::PathBuf, str::FromStr}; @@ -31,9 +31,9 @@ const VERSION_MESSAGE: &str = concat!( next_display_order = None, )] pub struct Cast { - /// Include the global options. + /// Include the global arguments. #[command(flatten)] - pub global: GlobalOpts, + pub global: GlobalArgs, #[command(subcommand)] pub cmd: CastSubcommand, diff --git a/crates/cast/bin/cmd/storage.rs b/crates/cast/bin/cmd/storage.rs index 7121f1a98..4499fea1c 100644 --- a/crates/cast/bin/cmd/storage.rs +++ b/crates/cast/bin/cmd/storage.rs @@ -10,7 +10,7 @@ use comfy_table::{modifiers::UTF8_ROUND_CORNERS, Cell, Table}; use eyre::Result; use foundry_block_explorers::Client; use foundry_cli::{ - opts::{CoreBuildArgs, EtherscanOpts, RpcOpts}, + opts::{BuildOpts, EtherscanOpts, RpcOpts}, utils, }; use foundry_common::{ @@ -64,7 +64,7 @@ pub struct StorageArgs { etherscan: EtherscanOpts, #[command(flatten)] - build: CoreBuildArgs, + build: BuildOpts, } impl_figment_convert_cast!(StorageArgs); diff --git a/crates/chisel/bin/main.rs b/crates/chisel/bin/main.rs index ca3fc1ff5..797da8a12 100644 --- a/crates/chisel/bin/main.rs +++ b/crates/chisel/bin/main.rs @@ -11,7 +11,7 @@ use clap::{Parser, Subcommand}; use eyre::Context; use foundry_cli::{ handler, - opts::{CoreBuildArgs, GlobalOpts}, + opts::{BuildOpts, GlobalArgs}, utils::{self, LoadConfig}, }; use foundry_common::{evm::EvmArgs, fs}; @@ -35,7 +35,7 @@ extern crate foundry_common; static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; // Loads project's figment and merges the build cli arguments into it -foundry_config::merge_impl_figment_convert!(Chisel, opts, evm_args); +foundry_config::merge_impl_figment_convert!(Chisel, build, evm); const VERSION_MESSAGE: &str = concat!( env!("CARGO_PKG_VERSION"), @@ -50,9 +50,9 @@ const VERSION_MESSAGE: &str = concat!( #[derive(Debug, Parser)] #[command(name = "chisel", version = VERSION_MESSAGE)] pub struct Chisel { - /// Include the global options. + /// Include the global arguments. #[command(flatten)] - pub global: GlobalOpts, + pub global: GlobalArgs, #[command(subcommand)] pub cmd: Option<ChiselSubcommand>, @@ -73,10 +73,10 @@ pub struct Chisel { pub no_vm: bool, #[command(flatten)] - pub opts: CoreBuildArgs, + pub build: BuildOpts, #[command(flatten)] - pub evm_args: EvmArgs, + pub evm: EvmArgs, } /// Chisel binary subcommands diff --git a/crates/cli/src/opts/build/core.rs b/crates/cli/src/opts/build/core.rs index 52a925ebb..9491ff35f 100644 --- a/crates/cli/src/opts/build/core.rs +++ b/crates/cli/src/opts/build/core.rs @@ -1,5 +1,5 @@ -use super::ProjectPathsArgs; -use crate::{opts::CompilerArgs, utils::LoadConfig}; +use super::ProjectPathOpts; +use crate::{opts::CompilerOpts, utils::LoadConfig}; use clap::{Parser, ValueHint}; use eyre::Result; use foundry_compilers::{ @@ -23,7 +23,7 @@ use std::path::PathBuf; #[derive(Clone, Debug, Default, Serialize, Parser)] #[command(next_help_heading = "Build options")] -pub struct CoreBuildArgs { +pub struct BuildOpts { /// Clear the cache and artifacts folder and recompile. #[arg(long, help_heading = "Cache options")] #[serde(skip)] @@ -138,14 +138,14 @@ pub struct CoreBuildArgs { #[command(flatten)] #[serde(flatten)] - pub compiler: CompilerArgs, + pub compiler: CompilerOpts, #[command(flatten)] #[serde(flatten)] - pub project_paths: ProjectPathsArgs, + pub project_paths: ProjectPathOpts, } -impl CoreBuildArgs { +impl BuildOpts { /// Returns the `Project` for the current workspace /// /// This loads the `foundry_config::Config` for the current workspace (see @@ -164,8 +164,8 @@ impl CoreBuildArgs { } // Loads project's figment and merges the build cli arguments into it -impl<'a> From<&'a CoreBuildArgs> for Figment { - fn from(args: &'a CoreBuildArgs) -> Self { +impl<'a> From<&'a BuildOpts> for Figment { + fn from(args: &'a BuildOpts) -> Self { let mut figment = if let Some(ref config_path) = args.project_paths.config_path { if !config_path.exists() { panic!("error: config-path `{}` does not exist", config_path.display()) @@ -196,8 +196,8 @@ impl<'a> From<&'a CoreBuildArgs> for Figment { } } -impl<'a> From<&'a CoreBuildArgs> for Config { - fn from(args: &'a CoreBuildArgs) -> Self { +impl<'a> From<&'a BuildOpts> for Config { + fn from(args: &'a BuildOpts) -> Self { let figment: Figment = args.into(); let mut config = Self::from_provider(figment).sanitized(); // if `--config-path` is set we need to adjust the config's root path to the actual root @@ -209,7 +209,7 @@ impl<'a> From<&'a CoreBuildArgs> for Config { } } -impl Provider for CoreBuildArgs { +impl Provider for BuildOpts { fn metadata(&self) -> Metadata { Metadata::named("Core Build Args Provider") } diff --git a/crates/cli/src/opts/build/mod.rs b/crates/cli/src/opts/build/mod.rs index fe50a3a9a..55c61dcbb 100644 --- a/crates/cli/src/opts/build/mod.rs +++ b/crates/cli/src/opts/build/mod.rs @@ -3,10 +3,10 @@ use foundry_compilers::artifacts::{output_selection::ContractOutputSelection, Ev use serde::Serialize; mod core; -pub use self::core::CoreBuildArgs; +pub use self::core::BuildOpts; mod paths; -pub use self::paths::ProjectPathsArgs; +pub use self::paths::ProjectPathOpts; // A set of solc compiler settings that can be set via command line arguments, which are intended // to be merged into an existing `foundry_config::Config`. @@ -14,7 +14,7 @@ pub use self::paths::ProjectPathsArgs; // See also `BuildArgs`. #[derive(Clone, Debug, Default, Serialize, Parser)] #[command(next_help_heading = "Compiler options")] -pub struct CompilerArgs { +pub struct CompilerOpts { /// Includes the AST as JSON in the compiler output. #[arg(long, help_heading = "Compiler options")] #[serde(skip)] @@ -62,15 +62,15 @@ mod tests { #[test] fn can_parse_evm_version() { - let args: CompilerArgs = - CompilerArgs::parse_from(["foundry-cli", "--evm-version", "london"]); + let args: CompilerOpts = + CompilerOpts::parse_from(["foundry-cli", "--evm-version", "london"]); assert_eq!(args.evm_version, Some(EvmVersion::London)); } #[test] fn can_parse_extra_output() { - let args: CompilerArgs = - CompilerArgs::parse_from(["foundry-cli", "--extra-output", "metadata", "ir-optimized"]); + let args: CompilerOpts = + CompilerOpts::parse_from(["foundry-cli", "--extra-output", "metadata", "ir-optimized"]); assert_eq!( args.extra_output, vec![ContractOutputSelection::Metadata, ContractOutputSelection::IrOptimized] @@ -79,7 +79,7 @@ mod tests { #[test] fn can_parse_extra_output_files() { - let args: CompilerArgs = CompilerArgs::parse_from([ + let args: CompilerOpts = CompilerOpts::parse_from([ "foundry-cli", "--extra-output-files", "metadata", diff --git a/crates/cli/src/opts/build/paths.rs b/crates/cli/src/opts/build/paths.rs index aa070800a..7a4d83eea 100644 --- a/crates/cli/src/opts/build/paths.rs +++ b/crates/cli/src/opts/build/paths.rs @@ -16,7 +16,7 @@ use std::path::PathBuf; /// Common arguments for a project's paths. #[derive(Clone, Debug, Default, Serialize, Parser)] #[command(next_help_heading = "Project options")] -pub struct ProjectPathsArgs { +pub struct ProjectPathOpts { /// The project's root path. /// /// By default root of the Git repository, if in one, @@ -63,7 +63,7 @@ pub struct ProjectPathsArgs { pub config_path: Option<PathBuf>, } -impl ProjectPathsArgs { +impl ProjectPathOpts { /// Returns the root directory to use for configuring the project. /// /// This will be the `--root` argument if provided, otherwise see [`find_project_root`]. @@ -87,10 +87,10 @@ impl ProjectPathsArgs { } } -foundry_config::impl_figment_convert!(ProjectPathsArgs); +foundry_config::impl_figment_convert!(ProjectPathOpts); // Make this args a `figment::Provider` so that it can be merged into the `Config` -impl Provider for ProjectPathsArgs { +impl Provider for ProjectPathOpts { fn metadata(&self) -> Metadata { Metadata::named("Project Paths Args Provider") } diff --git a/crates/cli/src/opts/global.rs b/crates/cli/src/opts/global.rs index 74ed15a65..6dc34067f 100644 --- a/crates/cli/src/opts/global.rs +++ b/crates/cli/src/opts/global.rs @@ -2,9 +2,9 @@ use clap::{ArgAction, Parser}; use foundry_common::shell::{ColorChoice, OutputFormat, OutputMode, Shell, Verbosity}; use serde::{Deserialize, Serialize}; -/// Global options. +/// Global arguments for the CLI. #[derive(Clone, Debug, Default, Serialize, Deserialize, Parser)] -pub struct GlobalOpts { +pub struct GlobalArgs { /// Verbosity level of the log messages. /// /// Pass multiple times to increase the verbosity (e.g. -v, -vv, -vvv). @@ -36,7 +36,7 @@ pub struct GlobalOpts { threads: Option<usize>, } -impl GlobalOpts { +impl GlobalArgs { /// Initialize the global options. pub fn init(&self) -> eyre::Result<()> { // Set the global shell. diff --git a/crates/cli/src/opts/mod.rs b/crates/cli/src/opts/mod.rs index 4e5d35572..3b6b914c1 100644 --- a/crates/cli/src/opts/mod.rs +++ b/crates/cli/src/opts/mod.rs @@ -1,13 +1,13 @@ mod build; mod chain; mod dependency; -mod ethereum; mod global; +mod rpc; mod transaction; pub use build::*; pub use chain::*; pub use dependency::*; -pub use ethereum::*; pub use global::*; +pub use rpc::*; pub use transaction::*; diff --git a/crates/cli/src/opts/ethereum.rs b/crates/cli/src/opts/rpc.rs similarity index 100% rename from crates/cli/src/opts/ethereum.rs rename to crates/cli/src/opts/rpc.rs diff --git a/crates/forge/bin/cmd/bind.rs b/crates/forge/bin/cmd/bind.rs index ec6b13dfd..33c497562 100644 --- a/crates/forge/bin/cmd/bind.rs +++ b/crates/forge/bin/cmd/bind.rs @@ -5,7 +5,7 @@ use ethers_contract_abigen::{ }; use eyre::{Result, WrapErr}; use forge_sol_macro_gen::{MultiSolMacroGen, SolMacroGen}; -use foundry_cli::{opts::CoreBuildArgs, utils::LoadConfig}; +use foundry_cli::{opts::BuildOpts, utils::LoadConfig}; use foundry_common::{compile::ProjectCompiler, fs::json_files}; use foundry_config::impl_figment_convert; use regex::Regex; @@ -14,7 +14,7 @@ use std::{ path::{Path, PathBuf}, }; -impl_figment_convert!(BindArgs, build_args); +impl_figment_convert!(BindArgs, build); const DEFAULT_CRATE_NAME: &str = "foundry-contracts"; const DEFAULT_CRATE_VERSION: &str = "0.1.0"; @@ -95,13 +95,13 @@ pub struct BindArgs { ethers: bool, #[command(flatten)] - build_args: CoreBuildArgs, + build: BuildOpts, } impl BindArgs { pub fn run(self) -> Result<()> { if !self.skip_build { - let project = self.build_args.project()?; + let project = self.build.project()?; let _ = ProjectCompiler::new().compile(&project)?; } @@ -139,7 +139,7 @@ impl BindArgs { if !self.select.is_empty() { return Ok(SelectContracts::default().extend_regex(self.select.clone()).into()) } - if let Some(skip) = self.build_args.skip.as_ref().filter(|s| !s.is_empty()) { + if let Some(skip) = self.build.skip.as_ref().filter(|s| !s.is_empty()) { return Ok(ExcludeContracts::default() .extend_regex( skip.clone() @@ -174,7 +174,7 @@ impl BindArgs { return Ok(Filter::Select(self.select.clone())); } - if let Some(skip) = self.build_args.skip.as_ref().filter(|s| !s.is_empty()) { + if let Some(skip) = self.build.skip.as_ref().filter(|s| !s.is_empty()) { return Ok(Filter::Skip( skip.clone() .into_iter() diff --git a/crates/forge/bin/cmd/bind_json.rs b/crates/forge/bin/cmd/bind_json.rs index 5e63b14d8..593380297 100644 --- a/crates/forge/bin/cmd/bind_json.rs +++ b/crates/forge/bin/cmd/bind_json.rs @@ -1,7 +1,7 @@ use super::eip712::Resolver; use clap::{Parser, ValueHint}; use eyre::Result; -use foundry_cli::{opts::CoreBuildArgs, utils::LoadConfig}; +use foundry_cli::{opts::BuildOpts, utils::LoadConfig}; use foundry_common::{compile::with_compilation_reporter, fs}; use foundry_compilers::{ artifacts::{ @@ -29,7 +29,7 @@ use std::{ sync::Arc, }; -foundry_config::impl_figment_convert!(BindJsonArgs, opts); +foundry_config::impl_figment_convert!(BindJsonArgs, build); /// CLI arguments for `forge bind-json`. #[derive(Clone, Debug, Parser)] @@ -39,7 +39,7 @@ pub struct BindJsonArgs { pub out: Option<PathBuf>, #[command(flatten)] - opts: CoreBuildArgs, + build: BuildOpts, } impl BindJsonArgs { diff --git a/crates/forge/bin/cmd/build.rs b/crates/forge/bin/cmd/build.rs index 7dea6b006..6a627d150 100644 --- a/crates/forge/bin/cmd/build.rs +++ b/crates/forge/bin/cmd/build.rs @@ -1,7 +1,7 @@ use super::{install, watch::WatchArgs}; use clap::Parser; use eyre::Result; -use foundry_cli::{opts::CoreBuildArgs, utils::LoadConfig}; +use foundry_cli::{opts::BuildOpts, utils::LoadConfig}; use foundry_common::{compile::ProjectCompiler, shell}; use foundry_compilers::{ compilers::{multi::MultiCompilerLanguage, Language}, @@ -20,7 +20,7 @@ use foundry_config::{ use serde::Serialize; use std::path::PathBuf; -foundry_config::merge_impl_figment_convert!(BuildArgs, args); +foundry_config::merge_impl_figment_convert!(BuildArgs, build); /// CLI arguments for `forge build`. /// @@ -68,7 +68,7 @@ pub struct BuildArgs { #[command(flatten)] #[serde(flatten)] - pub args: CoreBuildArgs, + pub build: BuildOpts, #[command(flatten)] #[serde(skip)] @@ -122,7 +122,7 @@ impl BuildArgs { /// [`utils::find_project_root`] and merges the cli `BuildArgs` into it before returning /// [`foundry_config::Config::project()`] pub fn project(&self) -> Result<Project> { - self.args.project() + self.build.project() } /// Returns whether `BuildArgs` was configured with `--watch` diff --git a/crates/forge/bin/cmd/clone.rs b/crates/forge/bin/cmd/clone.rs index 52ec97c48..7f998a6d8 100644 --- a/crates/forge/bin/cmd/clone.rs +++ b/crates/forge/bin/cmd/clone.rs @@ -87,12 +87,12 @@ pub struct CloneArgs { pub etherscan: EtherscanOpts, #[command(flatten)] - pub opts: DependencyInstallOpts, + pub install: DependencyInstallOpts, } impl CloneArgs { pub async fn run(self) -> Result<()> { - let Self { address, root, opts, etherscan, no_remappings_txt, keep_directory_structure } = + let Self { address, root, install, etherscan, no_remappings_txt, keep_directory_structure } = self; // step 0. get the chain and api key from the config @@ -107,7 +107,7 @@ impl CloneArgs { let meta = Self::collect_metadata_from_client(address, &client).await?; // step 2. initialize an empty project - Self::init_an_empty_project(&root, opts)?; + Self::init_an_empty_project(&root, install)?; // canonicalize the root path // note that at this point, the root directory must have been created let root = dunce::canonicalize(&root)?; @@ -127,7 +127,7 @@ impl CloneArgs { Self::collect_compilation_metadata(&meta, chain, address, &root, &client).await?; // step 5. git add and commit the changes if needed - if !opts.no_commit { + if !install.no_commit { let git = Git::new(&root); git.add(Some("--all"))?; let msg = format!("chore: forge clone {address}"); @@ -157,9 +157,9 @@ impl CloneArgs { /// * `root` - the root directory of the project. /// * `enable_git` - whether to enable git for the project. /// * `quiet` - whether to print messages. - pub(crate) fn init_an_empty_project(root: &Path, opts: DependencyInstallOpts) -> Result<()> { + pub(crate) fn init_an_empty_project(root: &Path, install: DependencyInstallOpts) -> Result<()> { // let's try to init the project with default init args - let init_args = InitArgs { root: root.to_path_buf(), opts, ..Default::default() }; + let init_args = InitArgs { root: root.to_path_buf(), install, ..Default::default() }; init_args.run().map_err(|e| eyre::eyre!("Project init error: {:?}", e))?; // remove the unnecessary example contracts diff --git a/crates/forge/bin/cmd/config.rs b/crates/forge/bin/cmd/config.rs index 0aa1fdb63..42ab29ec2 100644 --- a/crates/forge/bin/cmd/config.rs +++ b/crates/forge/bin/cmd/config.rs @@ -5,7 +5,7 @@ use foundry_cli::utils::LoadConfig; use foundry_common::{evm::EvmArgs, shell}; use foundry_config::fix::fix_tomls; -foundry_config::impl_figment_convert!(ConfigArgs, opts, evm_args); +foundry_config::impl_figment_convert!(ConfigArgs, build, evm); /// CLI arguments for `forge config`. #[derive(Clone, Debug, Parser)] @@ -20,10 +20,10 @@ pub struct ConfigArgs { // support nested build arguments #[command(flatten)] - opts: BuildArgs, + build: BuildArgs, #[command(flatten)] - evm_args: EvmArgs, + evm: EvmArgs, } impl ConfigArgs { diff --git a/crates/forge/bin/cmd/create.rs b/crates/forge/bin/cmd/create.rs index 2294d511e..9886e6baf 100644 --- a/crates/forge/bin/cmd/create.rs +++ b/crates/forge/bin/cmd/create.rs @@ -13,7 +13,7 @@ use clap::{Parser, ValueHint}; use eyre::{Context, Result}; use forge_verify::{RetryArgs, VerifierArgs, VerifyArgs}; use foundry_cli::{ - opts::{CoreBuildArgs, EthereumOpts, EtherscanOpts, TransactionOpts}, + opts::{BuildOpts, EthereumOpts, EtherscanOpts, TransactionOpts}, utils::{self, read_constructor_args_file, remove_contract, LoadConfig}, }; use foundry_common::{ @@ -35,7 +35,7 @@ use foundry_config::{ use serde_json::json; use std::{borrow::Borrow, marker::PhantomData, path::PathBuf, sync::Arc}; -merge_impl_figment_convert!(CreateArgs, opts, eth); +merge_impl_figment_convert!(CreateArgs, build, eth); /// CLI arguments for `forge create`. #[derive(Clone, Debug, Parser)] @@ -85,7 +85,7 @@ pub struct CreateArgs { pub timeout: Option<u64>, #[command(flatten)] - opts: CoreBuildArgs, + build: BuildOpts, #[command(flatten)] tx: TransactionOpts, @@ -236,11 +236,11 @@ impl CreateArgs { skip_is_verified_check: true, watch: true, retry: self.retry, - libraries: self.opts.libraries.clone(), + libraries: self.build.libraries.clone(), root: None, verifier: self.verifier.clone(), - via_ir: self.opts.via_ir, - evm_version: self.opts.compiler.evm_version, + via_ir: self.build.via_ir, + evm_version: self.build.compiler.evm_version, show_standard_json_input: self.show_standard_json_input, guess_constructor_args: false, compilation_profile: Some(id.profile.to_string()), @@ -397,8 +397,8 @@ impl CreateArgs { sh_println!("Starting contract verification...")?; - let num_of_optimizations = if self.opts.compiler.optimize.unwrap_or_default() { - self.opts.compiler.optimizer_runs + let num_of_optimizations = if self.build.compiler.optimize.unwrap_or_default() { + self.build.compiler.optimizer_runs } else { None }; @@ -416,11 +416,11 @@ impl CreateArgs { skip_is_verified_check: true, watch: true, retry: self.retry, - libraries: self.opts.libraries.clone(), + libraries: self.build.libraries.clone(), root: None, verifier: self.verifier, - via_ir: self.opts.via_ir, - evm_version: self.opts.compiler.evm_version, + via_ir: self.build.via_ir, + evm_version: self.build.compiler.evm_version, show_standard_json_input: self.show_standard_json_input, guess_constructor_args: false, compilation_profile: Some(id.profile.to_string()), diff --git a/crates/forge/bin/cmd/debug.rs b/crates/forge/bin/cmd/debug.rs new file mode 100644 index 000000000..d4fa4b6df --- /dev/null +++ b/crates/forge/bin/cmd/debug.rs @@ -0,0 +1,69 @@ +use clap::{Parser, ValueHint}; +use forge_script::ScriptArgs; +use forge_verify::retry::RETRY_VERIFY_ON_CREATE; +use foundry_cli::opts::BuildOpts; +use foundry_common::evm::EvmArgs; +use std::path::PathBuf; + +// Loads project's figment and merges the build cli arguments into it +foundry_config::impl_figment_convert!(DebugArgs, build, evm); + +/// CLI arguments for `forge debug`. +#[derive(Clone, Debug, Parser)] +pub struct DebugArgs { + /// The contract you want to run. Either the file path or contract name. + /// + /// If multiple contracts exist in the same file you must specify the target contract with + /// --target-contract. + #[arg(value_hint = ValueHint::FilePath)] + pub path: PathBuf, + + /// Arguments to pass to the script function. + pub args: Vec<String>, + + /// The name of the contract you want to run. + #[arg(long, visible_alias = "tc", value_name = "CONTRACT_NAME")] + pub target_contract: Option<String>, + + /// The signature of the function you want to call in the contract, or raw calldata. + #[arg(long, short, default_value = "run()", value_name = "SIGNATURE")] + pub sig: String, + + /// Open the script in the debugger. + #[arg(long)] + pub debug: bool, + + /// File path to dump execution details as JSON. + #[arg( + long, + requires = "debug", + value_hint = ValueHint::FilePath, + value_name = "PATH" + )] + pub dump: Option<PathBuf>, + + #[command(flatten)] + pub build: BuildOpts, + + #[command(flatten)] + pub evm: EvmArgs, +} + +impl DebugArgs { + pub async fn run(self) -> eyre::Result<()> { + let script = ScriptArgs { + path: self.path.to_str().expect("Invalid path string.").to_string(), + args: self.args, + target_contract: self.target_contract, + sig: self.sig, + gas_estimate_multiplier: 130, + build: self.build, + evm: self.evm, + debug: true, + dump: self.dump, + retry: RETRY_VERIFY_ON_CREATE, + ..Default::default() + }; + script.run_script().await + } +} diff --git a/crates/forge/bin/cmd/eip712.rs b/crates/forge/bin/cmd/eip712.rs index eb1d8dc1d..af3298877 100644 --- a/crates/forge/bin/cmd/eip712.rs +++ b/crates/forge/bin/cmd/eip712.rs @@ -1,6 +1,6 @@ use clap::{Parser, ValueHint}; use eyre::{Ok, OptionExt, Result}; -use foundry_cli::{opts::CoreBuildArgs, utils::LoadConfig}; +use foundry_cli::{opts::BuildOpts, utils::LoadConfig}; use foundry_common::compile::ProjectCompiler; use foundry_compilers::artifacts::{ output_selection::OutputSelection, @@ -9,7 +9,7 @@ use foundry_compilers::artifacts::{ }; use std::{collections::BTreeMap, fmt::Write, path::PathBuf}; -foundry_config::impl_figment_convert!(Eip712Args, opts); +foundry_config::impl_figment_convert!(Eip712Args, build); /// CLI arguments for `forge eip712`. #[derive(Clone, Debug, Parser)] @@ -19,7 +19,7 @@ pub struct Eip712Args { pub target_path: PathBuf, #[command(flatten)] - opts: CoreBuildArgs, + build: BuildOpts, } impl Eip712Args { diff --git a/crates/forge/bin/cmd/flatten.rs b/crates/forge/bin/cmd/flatten.rs index 7bbb0d1e2..3a3fb905e 100644 --- a/crates/forge/bin/cmd/flatten.rs +++ b/crates/forge/bin/cmd/flatten.rs @@ -1,7 +1,7 @@ use clap::{Parser, ValueHint}; use eyre::Result; use foundry_cli::{ - opts::{CoreBuildArgs, ProjectPathsArgs}, + opts::{BuildOpts, ProjectPathOpts}, utils::LoadConfig, }; use foundry_common::{compile::with_compilation_reporter, fs}; @@ -31,7 +31,7 @@ pub struct FlattenArgs { pub output: Option<PathBuf>, #[command(flatten)] - project_paths: ProjectPathsArgs, + project_paths: ProjectPathOpts, } impl FlattenArgs { @@ -39,8 +39,8 @@ impl FlattenArgs { let Self { target_path, output, project_paths } = self; // flatten is a subset of `BuildArgs` so we can reuse that to get the config - let build_args = CoreBuildArgs { project_paths, ..Default::default() }; - let config = build_args.try_load_config_emit_warnings()?; + let build = BuildOpts { project_paths, ..Default::default() }; + let config = build.try_load_config_emit_warnings()?; let project = config.create_project(false, true)?; let target_path = dunce::canonicalize(target_path)?; diff --git a/crates/forge/bin/cmd/init.rs b/crates/forge/bin/cmd/init.rs index 472d575bd..f1a216635 100644 --- a/crates/forge/bin/cmd/init.rs +++ b/crates/forge/bin/cmd/init.rs @@ -38,13 +38,13 @@ pub struct InitArgs { pub vscode: bool, #[command(flatten)] - pub opts: DependencyInstallOpts, + pub install: DependencyInstallOpts, } impl InitArgs { pub fn run(self) -> Result<()> { - let Self { root, template, branch, opts, offline, force, vscode } = self; - let DependencyInstallOpts { shallow, no_git, no_commit } = opts; + let Self { root, template, branch, install, offline, force, vscode } = self; + let DependencyInstallOpts { shallow, no_git, no_commit } = install; // create the root dir if it does not exist if !root.exists() { @@ -134,7 +134,7 @@ impl InitArgs { if !dest.exists() { fs::write(dest, config.clone().into_basic().to_string_pretty()?)?; } - let git = self.opts.git(&config); + let git = self.install.git(&config); // set up the repo if !no_git { @@ -145,10 +145,10 @@ impl InitArgs { if !offline { if root.join("lib/forge-std").exists() { sh_warn!("\"lib/forge-std\" already exists, skipping install...")?; - self.opts.install(&mut config, vec![])?; + self.install.install(&mut config, vec![])?; } else { let dep = "https://github.com/foundry-rs/forge-std".parse()?; - self.opts.install(&mut config, vec![dep])?; + self.install.install(&mut config, vec![dep])?; } } diff --git a/crates/forge/bin/cmd/inspect.rs b/crates/forge/bin/cmd/inspect.rs index 426a8b36e..d1836c9bc 100644 --- a/crates/forge/bin/cmd/inspect.rs +++ b/crates/forge/bin/cmd/inspect.rs @@ -3,7 +3,7 @@ use clap::Parser; use comfy_table::{modifiers::UTF8_ROUND_CORNERS, Cell, Table}; use eyre::{Context, Result}; use forge::revm::primitives::Eof; -use foundry_cli::opts::{CompilerArgs, CoreBuildArgs}; +use foundry_cli::opts::{BuildOpts, CompilerOpts}; use foundry_common::{compile::ProjectCompiler, fmt::pretty_eof, shell}; use foundry_compilers::{ artifacts::{ @@ -35,7 +35,7 @@ pub struct InspectArgs { /// All build arguments are supported #[command(flatten)] - build: CoreBuildArgs, + build: BuildOpts, } impl InspectArgs { @@ -58,8 +58,8 @@ impl InspectArgs { }; // Build modified Args - let modified_build_args = CoreBuildArgs { - compiler: CompilerArgs { extra_output: cos, optimize: optimized, ..build.compiler }, + let modified_build_args = BuildOpts { + compiler: CompilerOpts { extra_output: cos, optimize: optimized, ..build.compiler }, ..build }; diff --git a/crates/forge/bin/cmd/mod.rs b/crates/forge/bin/cmd/mod.rs index d6a70c9da..6885819f8 100644 --- a/crates/forge/bin/cmd/mod.rs +++ b/crates/forge/bin/cmd/mod.rs @@ -24,9 +24,9 @@ //! #[derive(Clone, Debug, Parser)] //! pub struct MyArgs { //! #[command(flatten)] -//! evm_args: EvmArgs, +//! evm: EvmArgs, //! #[command(flatten)] -//! opts: BuildArgs, +//! build: BuildArgs, //! } //! //! // add `Figment` and `Config` converters diff --git a/crates/forge/bin/cmd/selectors.rs b/crates/forge/bin/cmd/selectors.rs index 31992983d..56c25cc00 100644 --- a/crates/forge/bin/cmd/selectors.rs +++ b/crates/forge/bin/cmd/selectors.rs @@ -3,7 +3,7 @@ use clap::Parser; use comfy_table::{modifiers::UTF8_ROUND_CORNERS, Table}; use eyre::Result; use foundry_cli::{ - opts::{CompilerArgs, CoreBuildArgs, ProjectPathsArgs}, + opts::{BuildOpts, CompilerOpts, ProjectPathOpts}, utils::{cache_local_signatures, FoundryPathExt}, }; use foundry_common::{ @@ -29,7 +29,7 @@ pub enum SelectorsSubcommands { second_contract: ContractInfo, #[command(flatten)] - build: Box<CoreBuildArgs>, + build: Box<BuildOpts>, }, /// Upload selectors to registry @@ -44,7 +44,7 @@ pub enum SelectorsSubcommands { all: bool, #[command(flatten)] - project_paths: ProjectPathsArgs, + project_paths: ProjectPathOpts, }, /// List selectors from current workspace @@ -55,7 +55,7 @@ pub enum SelectorsSubcommands { contract: Option<String>, #[command(flatten)] - project_paths: ProjectPathsArgs, + project_paths: ProjectPathOpts, }, /// Find if a selector is present in the project @@ -66,14 +66,14 @@ pub enum SelectorsSubcommands { selector: String, #[command(flatten)] - project_paths: ProjectPathsArgs, + project_paths: ProjectPathOpts, }, /// Cache project selectors (enables trace with local contracts functions and events). #[command(visible_alias = "c")] Cache { #[command(flatten)] - project_paths: ProjectPathsArgs, + project_paths: ProjectPathOpts, }, } @@ -82,9 +82,9 @@ impl SelectorsSubcommands { match self { Self::Cache { project_paths } => { sh_println!("Caching selectors for contracts in the project...")?; - let build_args = CoreBuildArgs { + let build_args = BuildOpts { project_paths, - compiler: CompilerArgs { + compiler: CompilerOpts { extra_output: vec![ContractOutputSelection::Abi], ..Default::default() }, @@ -97,9 +97,9 @@ impl SelectorsSubcommands { cache_local_signatures(&outcome, Config::foundry_cache_dir().unwrap())? } Self::Upload { contract, all, project_paths } => { - let build_args = CoreBuildArgs { + let build_args = BuildOpts { project_paths: project_paths.clone(), - compiler: CompilerArgs { + compiler: CompilerOpts { extra_output: vec![ContractOutputSelection::Abi], ..Default::default() }, @@ -213,9 +213,9 @@ impl SelectorsSubcommands { } Self::List { contract, project_paths } => { sh_println!("Listing selectors for contracts in the project...")?; - let build_args = CoreBuildArgs { + let build_args = BuildOpts { project_paths, - compiler: CompilerArgs { + compiler: CompilerOpts { extra_output: vec![ContractOutputSelection::Abi], ..Default::default() }, @@ -301,9 +301,9 @@ impl SelectorsSubcommands { Self::Find { selector, project_paths } => { sh_println!("Searching for selector {selector:?} in the project...")?; - let build_args = CoreBuildArgs { + let build_args = BuildOpts { project_paths, - compiler: CompilerArgs { + compiler: CompilerOpts { extra_output: vec![ContractOutputSelection::Abi], ..Default::default() }, diff --git a/crates/forge/bin/cmd/test/mod.rs b/crates/forge/bin/cmd/test/mod.rs index 85f75a19b..9c8e3b4e7 100644 --- a/crates/forge/bin/cmd/test/mod.rs +++ b/crates/forge/bin/cmd/test/mod.rs @@ -17,7 +17,7 @@ use forge::{ MultiContractRunner, MultiContractRunnerBuilder, TestFilter, }; use foundry_cli::{ - opts::{CoreBuildArgs, GlobalOpts}, + opts::{BuildOpts, GlobalArgs}, utils::{self, LoadConfig}, }; use foundry_common::{compile::ProjectCompiler, evm::EvmArgs, fs, shell, TestFunctionExt}; @@ -59,7 +59,7 @@ use quick_junit::{NonSuccessKind, Report, TestCase, TestCaseStatus, TestSuite}; use summary::{print_invariant_metrics, TestSummaryReport}; // Loads project's figment and merges the build cli arguments into it -foundry_config::merge_impl_figment_convert!(TestArgs, opts, evm_args); +foundry_config::merge_impl_figment_convert!(TestArgs, build, evm); /// CLI arguments for `forge test`. #[derive(Clone, Debug, Parser)] @@ -67,7 +67,7 @@ foundry_config::merge_impl_figment_convert!(TestArgs, opts, evm_args); pub struct TestArgs { // Include global options for users of this struct. #[command(flatten)] - pub global: GlobalOpts, + pub global: GlobalArgs, /// The contract file you want to test, it's a shortcut for --match-path. #[arg(value_hint = ValueHint::FilePath)] @@ -157,23 +157,11 @@ pub struct TestArgs { #[arg(long, conflicts_with_all = ["quiet", "json"], help_heading = "Display options")] pub show_progress: bool, - #[command(flatten)] - filter: FilterArgs, - /// Re-run recorded test failures from last run. /// If no failure recorded then regular test run is performed. #[arg(long)] pub rerun: bool, - #[command(flatten)] - evm_args: EvmArgs, - - #[command(flatten)] - opts: CoreBuildArgs, - - #[command(flatten)] - pub watch: WatchArgs, - /// Print test summary table. #[arg(long, help_heading = "Display options")] pub summary: bool, @@ -181,14 +169,21 @@ pub struct TestArgs { /// Print detailed test summary table. #[arg(long, help_heading = "Display options", requires = "summary")] pub detailed: bool, + + #[command(flatten)] + filter: FilterArgs, + + #[command(flatten)] + evm: EvmArgs, + + #[command(flatten)] + pub build: BuildOpts, + + #[command(flatten)] + pub watch: WatchArgs, } impl TestArgs { - /// Returns the flattened [`CoreBuildArgs`]. - pub fn build_args(&self) -> &CoreBuildArgs { - &self.opts - } - pub async fn run(self) -> Result<TestOutcome> { trace!(target: "forge::test", "executing test command"); self.execute_tests().await @@ -1002,7 +997,7 @@ mod tests { fn extract_chain() { let test = |arg: &str, expected: Chain| { let args = TestArgs::parse_from(["foundry-cli", arg]); - assert_eq!(args.evm_args.env.chain, Some(expected)); + assert_eq!(args.evm.env.chain, Some(expected)); let (config, evm_opts) = args.load_config_and_evm_opts().unwrap(); assert_eq!(config.chain, Some(expected)); assert_eq!(evm_opts.env.chain_id, Some(expected.id())); diff --git a/crates/forge/bin/cmd/tree.rs b/crates/forge/bin/cmd/tree.rs index 088975d87..fe278e98c 100644 --- a/crates/forge/bin/cmd/tree.rs +++ b/crates/forge/bin/cmd/tree.rs @@ -1,6 +1,6 @@ use clap::Parser; use eyre::Result; -use foundry_cli::{opts::ProjectPathsArgs, utils::LoadConfig}; +use foundry_cli::{opts::ProjectPathOpts, utils::LoadConfig}; use foundry_compilers::{ resolver::{parse::SolData, Charset, TreeOptions}, Graph, @@ -20,10 +20,10 @@ pub struct TreeArgs { charset: Charset, #[command(flatten)] - opts: ProjectPathsArgs, + project_paths: ProjectPathOpts, } -foundry_config::impl_figment_convert!(TreeArgs, opts); +foundry_config::impl_figment_convert!(TreeArgs, project_paths); impl TreeArgs { pub fn run(self) -> Result<()> { diff --git a/crates/forge/bin/cmd/watch.rs b/crates/forge/bin/cmd/watch.rs index 926aecdba..37ae267ed 100644 --- a/crates/forge/bin/cmd/watch.rs +++ b/crates/forge/bin/cmd/watch.rs @@ -259,7 +259,7 @@ pub async fn watch_gas_snapshot(args: GasSnapshotArgs) -> Result<()> { /// Executes a [`Watchexec`] that listens for changes in the project's src dir and reruns `forge /// test` pub async fn watch_test(args: TestArgs) -> Result<()> { - let config: Config = args.build_args().into(); + let config: Config = Config::from(&args.build); let filter = args.filter(&config); // Marker to check whether to override the command. let no_reconfigure = filter.args().test_pattern.is_some() || diff --git a/crates/forge/bin/opts.rs b/crates/forge/bin/opts.rs index f32ec0222..e211d03b7 100644 --- a/crates/forge/bin/opts.rs +++ b/crates/forge/bin/opts.rs @@ -8,7 +8,7 @@ use crate::cmd::{ use clap::{Parser, Subcommand, ValueHint}; use forge_script::ScriptArgs; use forge_verify::{VerifyArgs, VerifyBytecodeArgs, VerifyCheckArgs}; -use foundry_cli::opts::GlobalOpts; +use foundry_cli::opts::GlobalArgs; use std::path::PathBuf; const VERSION_MESSAGE: &str = concat!( @@ -29,9 +29,9 @@ const VERSION_MESSAGE: &str = concat!( next_display_order = None, )] pub struct Forge { - /// Include the global options. + /// Include the global arguments. #[command(flatten)] - pub global: GlobalOpts, + pub global: GlobalArgs, #[command(subcommand)] pub cmd: ForgeSubcommand, diff --git a/crates/script/src/execute.rs b/crates/script/src/execute.rs index 4aad978d5..d7bf29c69 100644 --- a/crates/script/src/execute.rs +++ b/crates/script/src/execute.rs @@ -187,7 +187,7 @@ impl PreExecutionState { if let Some(txs) = transactions { // If the user passed a `--sender` don't check anything. if self.build_data.predeploy_libraries.libraries_count() > 0 && - self.args.evm_args.sender.is_none() + self.args.evm.sender.is_none() { for tx in txs.iter() { if tx.transaction.to().is_none() { diff --git a/crates/script/src/lib.rs b/crates/script/src/lib.rs index ab59569c7..791a15429 100644 --- a/crates/script/src/lib.rs +++ b/crates/script/src/lib.rs @@ -25,9 +25,9 @@ use clap::{Parser, ValueHint}; use dialoguer::Confirm; use eyre::{ContextCompat, Result}; use forge_script_sequence::{AdditionalContract, NestedValue}; -use forge_verify::RetryArgs; +use forge_verify::{RetryArgs, VerifierArgs}; use foundry_cli::{ - opts::{CoreBuildArgs, GlobalOpts}, + opts::{BuildOpts, GlobalArgs}, utils::LoadConfig, }; use foundry_common::{ @@ -72,14 +72,14 @@ mod transaction; mod verify; // Loads project's figment and merges the build cli arguments into it -foundry_config::merge_impl_figment_convert!(ScriptArgs, opts, evm_args); +foundry_config::merge_impl_figment_convert!(ScriptArgs, build, evm); /// CLI arguments for `forge script`. #[derive(Clone, Debug, Default, Parser)] pub struct ScriptArgs { // Include global options for users of this struct. #[command(flatten)] - pub global: GlobalOpts, + pub global: GlobalArgs, /// The contract you want to run. Either the file path or contract name. /// @@ -203,16 +203,16 @@ pub struct ScriptArgs { pub timeout: Option<u64>, #[command(flatten)] - pub opts: CoreBuildArgs, + pub build: BuildOpts, #[command(flatten)] pub wallets: MultiWalletOpts, #[command(flatten)] - pub evm_args: EvmArgs, + pub evm: EvmArgs, #[command(flatten)] - pub verifier: forge_verify::VerifierArgs, + pub verifier: VerifierArgs, #[command(flatten)] pub retry: RetryArgs, @@ -220,8 +220,7 @@ pub struct ScriptArgs { impl ScriptArgs { pub async fn preprocess(self) -> Result<PreprocessedState> { - let script_wallets = - Wallets::new(self.wallets.get_multi_wallet().await?, self.evm_args.sender); + let script_wallets = Wallets::new(self.wallets.get_multi_wallet().await?, self.evm.sender); let (config, mut evm_opts) = self.load_config_and_evm_opts_emit_warnings()?; @@ -414,7 +413,7 @@ impl ScriptArgs { } let mut prompt_user = false; - let max_size = match self.evm_args.env.code_size_limit { + let max_size = match self.evm.env.code_size_limit { Some(size) => size, None => CONTRACT_MAX_SIZE, }; @@ -728,7 +727,7 @@ mod tests { "--code-size-limit", "50000", ]); - assert_eq!(args.evm_args.env.code_size_limit, Some(50000)); + assert_eq!(args.evm.env.code_size_limit, Some(50000)); } #[test] diff --git a/crates/script/src/verify.rs b/crates/script/src/verify.rs index 220991703..eeeee3d11 100644 --- a/crates/script/src/verify.rs +++ b/crates/script/src/verify.rs @@ -7,7 +7,7 @@ use alloy_primitives::{hex, Address}; use eyre::{eyre, Result}; use forge_script_sequence::{AdditionalContract, ScriptSequence}; use forge_verify::{provider::VerificationProviderType, RetryArgs, VerifierArgs, VerifyArgs}; -use foundry_cli::opts::{EtherscanOpts, ProjectPathsArgs}; +use foundry_cli::opts::{EtherscanOpts, ProjectPathOpts}; use foundry_common::ContractsByArtifact; use foundry_compilers::{info::ContractInfo, Project}; use foundry_config::{Chain, Config}; @@ -48,7 +48,7 @@ impl BroadcastedState { pub struct VerifyBundle { pub num_of_optimizations: Option<usize>, pub known_contracts: ContractsByArtifact, - pub project_paths: ProjectPathsArgs, + pub project_paths: ProjectPathOpts, pub etherscan: EtherscanOpts, pub retry: RetryArgs, pub verifier: VerifierArgs, @@ -68,7 +68,7 @@ impl VerifyBundle { let config_path = config.get_config_path(); - let project_paths = ProjectPathsArgs { + let project_paths = ProjectPathOpts { root: Some(project.paths.root.clone()), contracts: Some(project.paths.sources.clone()), remappings: project.paths.remappings.clone(), From e3ff6cbd44840aa51055c273ad4f638767db9d5e Mon Sep 17 00:00:00 2001 From: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:03:42 +0100 Subject: [PATCH 43/45] fix: re-remove forge `debug` file (#9631) fix re-remove debug file --- crates/forge/bin/cmd/debug.rs | 69 ----------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 crates/forge/bin/cmd/debug.rs diff --git a/crates/forge/bin/cmd/debug.rs b/crates/forge/bin/cmd/debug.rs deleted file mode 100644 index d4fa4b6df..000000000 --- a/crates/forge/bin/cmd/debug.rs +++ /dev/null @@ -1,69 +0,0 @@ -use clap::{Parser, ValueHint}; -use forge_script::ScriptArgs; -use forge_verify::retry::RETRY_VERIFY_ON_CREATE; -use foundry_cli::opts::BuildOpts; -use foundry_common::evm::EvmArgs; -use std::path::PathBuf; - -// Loads project's figment and merges the build cli arguments into it -foundry_config::impl_figment_convert!(DebugArgs, build, evm); - -/// CLI arguments for `forge debug`. -#[derive(Clone, Debug, Parser)] -pub struct DebugArgs { - /// The contract you want to run. Either the file path or contract name. - /// - /// If multiple contracts exist in the same file you must specify the target contract with - /// --target-contract. - #[arg(value_hint = ValueHint::FilePath)] - pub path: PathBuf, - - /// Arguments to pass to the script function. - pub args: Vec<String>, - - /// The name of the contract you want to run. - #[arg(long, visible_alias = "tc", value_name = "CONTRACT_NAME")] - pub target_contract: Option<String>, - - /// The signature of the function you want to call in the contract, or raw calldata. - #[arg(long, short, default_value = "run()", value_name = "SIGNATURE")] - pub sig: String, - - /// Open the script in the debugger. - #[arg(long)] - pub debug: bool, - - /// File path to dump execution details as JSON. - #[arg( - long, - requires = "debug", - value_hint = ValueHint::FilePath, - value_name = "PATH" - )] - pub dump: Option<PathBuf>, - - #[command(flatten)] - pub build: BuildOpts, - - #[command(flatten)] - pub evm: EvmArgs, -} - -impl DebugArgs { - pub async fn run(self) -> eyre::Result<()> { - let script = ScriptArgs { - path: self.path.to_str().expect("Invalid path string.").to_string(), - args: self.args, - target_contract: self.target_contract, - sig: self.sig, - gas_estimate_multiplier: 130, - build: self.build, - evm: self.evm, - debug: true, - dump: self.dump, - retry: RETRY_VERIFY_ON_CREATE, - ..Default::default() - }; - script.run_script().await - } -} From 5e72c69e8414ec7b535eedb357e9b6db3e312b62 Mon Sep 17 00:00:00 2001 From: grandizzy <38490174+grandizzy@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:36:35 +0200 Subject: [PATCH 44/45] feat: remove ethers (#9412) Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> --- Cargo.lock | 216 ----------------------------------- Cargo.toml | 3 - README.md | 5 +- crates/forge/Cargo.toml | 2 - crates/forge/bin/cmd/bind.rs | 152 ++---------------------- 5 files changed, 14 insertions(+), 364 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 26cdab3bb..ec194355f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1971,38 +1971,6 @@ dependencies = [ "serde", ] -[[package]] -name = "camino" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.24", - "serde", - "serde_json", - "thiserror 1.0.69", -] - [[package]] name = "cassowary" version = "0.3.0" @@ -3126,106 +3094,6 @@ dependencies = [ "uuid 0.8.2", ] -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror 1.0.69", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types", - "scale-info", - "uint", -] - -[[package]] -name = "ethers-contract-abigen" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" -dependencies = [ - "Inflector", - "const-hex", - "dunce", - "ethers-core", - "eyre", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "serde", - "serde_json", - "syn 2.0.94", - "toml 0.8.19", - "walkdir", -] - -[[package]] -name = "ethers-core" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" -dependencies = [ - "arrayvec", - "bytes", - "cargo_metadata", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", - "generic-array", - "k256", - "num_enum", - "once_cell", - "open-fastrlp", - "rand", - "rlp", - "serde", - "serde_json", - "strum", - "syn 2.0.94", - "tempfile", - "thiserror 1.0.69", - "tiny-keccak", - "unicode-xid", -] - [[package]] name = "event-listener" version = "4.0.3" @@ -3444,7 +3312,6 @@ dependencies = [ "comfy-table", "dialoguer", "dunce", - "ethers-contract-abigen", "evm-disassembler", "eyre", "forge-doc", @@ -5325,24 +5192,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" -dependencies = [ - "serde", -] - [[package]] name = "impl-trait-for-tuples" version = "0.2.3" @@ -6311,7 +6160,6 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.94", @@ -6394,31 +6242,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "opener" version = "0.7.2" @@ -6938,9 +6761,6 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", "uint", ] @@ -7613,21 +7433,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", - "rlp-derive", "rustc-hex", ] -[[package]] -name = "rlp-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "rpassword" version = "7.3.1" @@ -7917,30 +7725,6 @@ dependencies = [ "regex", ] -[[package]] -name = "scale-info" -version = "2.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b" -dependencies = [ - "cfg-if", - "derive_more", - "parity-scale-codec", - "scale-info-derive", -] - -[[package]] -name = "scale-info-derive" -version = "2.11.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.94", -] - [[package]] name = "scc" version = "2.3.0" diff --git a/Cargo.toml b/Cargo.toml index 304597c16..636f4fd62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -181,9 +181,6 @@ revm = { version = "19.0.0", default-features = false } revm-primitives = { version = "15.1.0", default-features = false } revm-inspectors = { version = "0.14.1", features = ["serde"] } -## ethers -ethers-contract-abigen = { version = "2.0.14", default-features = false } - ## alloy alloy-consensus = { version = "0.9.0", default-features = false } alloy-contract = { version = "0.9.0", default-features = false } diff --git a/README.md b/README.md index ec0884aa2..bd9325191 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ If you're experiencing any issues while installing, check out [Getting Help](#ge ### How Fast? -Forge is quite fast at both compiling (leveraging [ethers-solc]) and testing. +Forge is quite fast at both compiling (leveraging [foundry-compilers]) and testing. See the benchmarks below. More benchmarks can be found in the [v0.2.0 announcement post][benchmark-post] and in the [Convex Shutdown Simulation][convex] repository. @@ -127,7 +127,7 @@ If you want to contribute, or follow along with contributor discussion, you can ## Acknowledgements - Foundry is a clean-room rewrite of the testing framework [DappTools](https://github.com/dapphub/dapptools). None of this would have been possible without the DappHub team's work over the years. -- [Matthias Seitz](https://twitter.com/mattsse_): Created [ethers-solc] which is the backbone of our compilation pipeline, as well as countless contributions to ethers, in particular the `abigen` macros. +- [Matthias Seitz](https://twitter.com/mattsse_): Created [ethers-solc] (now [foundry-compilers]) which is the backbone of our compilation pipeline, as well as countless contributions to ethers, in particular the `abigen` macros. - [Rohit Narurkar](https://twitter.com/rohitnarurkar): Created the Rust Solidity version manager [svm-rs](https://github.com/roynalnaruto/svm-rs) which we use to auto-detect and manage multiple Solidity versions. - [Brock Elmore](https://twitter.com/brockjelmore): For extending the VM's cheatcodes and implementing [structured call tracing](https://github.com/foundry-rs/foundry/pull/192), a critical feature for debugging smart contract calls. - All the other [contributors](https://github.com/foundry-rs/foundry/graphs/contributors) to the [ethers-rs](https://github.com/gakonst/ethers-rs) & [foundry](https://github.com/foundry-rs/foundry) repositories and chatrooms. @@ -135,6 +135,7 @@ If you want to contribute, or follow along with contributor discussion, you can [foundry-book]: https://book.getfoundry.sh [foundry-gha]: https://github.com/foundry-rs/foundry-toolchain [ethers-solc]: https://github.com/gakonst/ethers-rs/tree/master/ethers-solc/ +[foundry-compilers]: https://github.com/foundry-rs/foundry-compilers [solmate]: https://github.com/transmissions11/solmate/ [geb]: https://github.com/reflexer-labs/geb [vaults]: https://github.com/rari-capital/vaults diff --git a/crates/forge/Cargo.toml b/crates/forge/Cargo.toml index 8deafcd5d..a8b7f56c0 100644 --- a/crates/forge/Cargo.toml +++ b/crates/forge/Cargo.toml @@ -35,8 +35,6 @@ foundry-wallets.workspace = true foundry-linking.workspace = true forge-script-sequence.workspace = true -ethers-contract-abigen = { workspace = true, features = ["providers"] } - revm-inspectors.workspace = true comfy-table.workspace = true diff --git a/crates/forge/bin/cmd/bind.rs b/crates/forge/bin/cmd/bind.rs index 33c497562..c8763d08c 100644 --- a/crates/forge/bin/cmd/bind.rs +++ b/crates/forge/bin/cmd/bind.rs @@ -1,9 +1,6 @@ use alloy_primitives::map::HashSet; use clap::{Parser, ValueHint}; -use ethers_contract_abigen::{ - Abigen, ContractFilter, ExcludeContracts, MultiAbigen, SelectContracts, -}; -use eyre::{Result, WrapErr}; +use eyre::Result; use forge_sol_macro_gen::{MultiSolMacroGen, SolMacroGen}; use foundry_cli::{opts::BuildOpts, utils::LoadConfig}; use foundry_common::{compile::ProjectCompiler, fs::json_files}; @@ -83,15 +80,15 @@ pub struct BindArgs { skip_extra_derives: bool, /// Generate bindings for the `alloy` library, instead of `ethers`. - #[arg(long, conflicts_with = "ethers")] + #[arg(long, hide = true)] alloy: bool, /// Specify the alloy version. - #[arg(long, value_name = "ALLOY_VERSION")] + #[arg(long)] alloy_version: Option<String>, - /// Generate bindings for the `ethers` library, instead of `alloy` (default, deprecated). - #[arg(long)] + /// Generate bindings for the `ethers` library, instead of `alloy` (removed). + #[arg(long, hide = true)] ethers: bool, #[command(flatten)] @@ -100,17 +97,15 @@ pub struct BindArgs { impl BindArgs { pub fn run(self) -> Result<()> { + if self.ethers { + eyre::bail!("`--ethers` bindings have been removed. Use `--alloy` (default) instead."); + } + if !self.skip_build { let project = self.build.project()?; let _ = ProjectCompiler::new().compile(&project)?; } - if self.ethers { - sh_warn!( - "`--ethers` bindings are deprecated and will be removed in the future. Consider using `--alloy` (default) instead." - )?; - } - let config = self.try_load_config_emit_warnings()?; let artifacts = config.out; let bindings_root = self.bindings.clone().unwrap_or_else(|| artifacts.join("bindings")); @@ -131,40 +126,7 @@ impl BindArgs { Ok(()) } - /// Returns the filter to use for `MultiAbigen` - fn get_filter(&self) -> Result<ContractFilter> { - if self.select_all { - return Ok(ContractFilter::All) - } - if !self.select.is_empty() { - return Ok(SelectContracts::default().extend_regex(self.select.clone()).into()) - } - if let Some(skip) = self.build.skip.as_ref().filter(|s| !s.is_empty()) { - return Ok(ExcludeContracts::default() - .extend_regex( - skip.clone() - .into_iter() - .map(|s| Regex::new(s.file_pattern())) - .collect::<Result<Vec<_>, _>>()?, - ) - .into()) - } - // This excludes all Test/Script and forge-std contracts - Ok(ExcludeContracts::default() - .extend_pattern([ - ".*Test.*", - ".*Script", - "console[2]?", - "CommonBase", - "Components", - "[Ss]td(Chains|Math|Error|Json|Utils|Cheats|Style|Invariant|Assertions|Toml|Storage(Safe)?)", - "[Vv]m.*", - ]) - .extend_names(["IMulticall3"]) - .into()) - } - - fn get_alloy_filter(&self) -> Result<Filter> { + fn get_filter(&self) -> Result<Filter> { if self.select_all { // Select all json files return Ok(Filter::All); @@ -190,8 +152,6 @@ impl BindArgs { /// Returns an iterator over the JSON files and the contract name in the `artifacts` directory. fn get_json_files(&self, artifacts: &Path) -> Result<impl Iterator<Item = (String, PathBuf)>> { let filter = self.get_filter()?; - let alloy_filter = self.get_alloy_filter()?; - let is_alloy = !self.ethers; Ok(json_files(artifacts) .filter_map(|path| { // Ignore the build info JSON. @@ -212,35 +172,7 @@ impl BindArgs { Some((name, path)) }) - .filter( - move |(name, _path)| { - if is_alloy { - alloy_filter.is_match(name) - } else { - filter.is_match(name) - } - }, - )) - } - - /// Instantiate the multi-abigen - fn get_multi(&self, artifacts: &Path) -> Result<MultiAbigen> { - let abigens = self - .get_json_files(artifacts)? - .map(|(name, path)| { - trace!(?path, "parsing Abigen from file"); - let abi = Abigen::new(name, path.to_str().unwrap()) - .wrap_err_with(|| format!("failed to parse Abigen from file: {path:?}")); - if !self.skip_extra_derives { - abi?.add_derive("serde::Serialize")?.add_derive("serde::Deserialize") - } else { - abi - } - }) - .collect::<Result<Vec<_>, _>>()?; - let multi = MultiAbigen::from_abigens(abigens); - eyre::ensure!(!multi.is_empty(), "No contract artifacts found"); - Ok(multi) + .filter(move |(name, _path)| filter.is_match(name))) } fn get_solmacrogen(&self, artifacts: &Path) -> Result<MultiSolMacroGen> { @@ -264,40 +196,6 @@ impl BindArgs { /// Check that the existing bindings match the expected abigen output fn check_existing_bindings(&self, artifacts: &Path, bindings_root: &Path) -> Result<()> { - if self.ethers { - return self.check_ethers(artifacts, bindings_root); - } - - self.check_alloy(artifacts, bindings_root) - } - - fn check_ethers(&self, artifacts: &Path, bindings_root: &Path) -> Result<()> { - let bindings = self.get_multi(artifacts)?.build()?; - sh_println!("Checking bindings for {} contracts.", bindings.len())?; - if !self.module { - bindings - .ensure_consistent_crate( - &self.crate_name, - &self.crate_version, - bindings_root, - self.single_file, - !self.skip_cargo_toml, - ) - .map_err(|err| { - if !self.skip_cargo_toml && err.to_string().contains("Cargo.toml") { - err.wrap_err("To skip Cargo.toml consistency check, pass --skip-cargo-toml") - } else { - err - } - })?; - } else { - bindings.ensure_consistent_module(bindings_root, self.single_file)?; - } - sh_println!("OK.")?; - Ok(()) - } - - fn check_alloy(&self, artifacts: &Path, bindings_root: &Path) -> Result<()> { let mut bindings = self.get_solmacrogen(artifacts)?; bindings.generate_bindings()?; sh_println!("Checking bindings for {} contracts", bindings.instances.len())?; @@ -316,34 +214,6 @@ impl BindArgs { /// Generate the bindings fn generate_bindings(&self, artifacts: &Path, bindings_root: &Path) -> Result<()> { - if self.ethers { - return self.generate_ethers(artifacts, bindings_root); - } - - self.generate_alloy(artifacts, bindings_root) - } - - fn generate_ethers(&self, artifacts: &Path, bindings_root: &Path) -> Result<()> { - let mut bindings = self.get_multi(artifacts)?.build()?; - sh_println!("Generating bindings for {} contracts", bindings.len())?; - if !self.module { - trace!(single_file = self.single_file, "generating crate"); - if !self.skip_extra_derives { - bindings = bindings.dependencies([r#"serde = "1""#]) - } - bindings.write_to_crate( - &self.crate_name, - &self.crate_version, - bindings_root, - self.single_file, - ) - } else { - trace!(single_file = self.single_file, "generating module"); - bindings.write_to_module(bindings_root, self.single_file) - } - } - - fn generate_alloy(&self, artifacts: &Path, bindings_root: &Path) -> Result<()> { let mut solmacrogen = self.get_solmacrogen(artifacts)?; sh_println!("Generating bindings for {} contracts", solmacrogen.instances.len())?; From c71e81475cda49e872ea34fa3bc5a04e6b960656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn?= <martin.berguer@gmail.com> Date: Wed, 29 Jan 2025 13:25:59 -0300 Subject: [PATCH 45/45] Revert "Merge upstream commit 5e72c69" This reverts commit 1e8bad028b32a66c5c749161dec9db0ed89fba9b, reversing changes made to 7b5014354a71a58e5a8e1326abe375ad0be988b4. --- Cargo.lock | 566 +++++++++++++++++++++++++++-------------------------- 1 file changed, 285 insertions(+), 281 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dee127657..31eaef07c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,9 +99,9 @@ dependencies = [ [[package]] name = "alloy-chains" -version = "0.1.52" +version = "0.1.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f15afc5993458b42739ab3b69bdb6b4c8112acd3997dbea9bc092c9517137c" +checksum = "a0161082e0edd9013d23083465cc04b20e44b7a15646d36ba7b0cdb7cd6fe18f" dependencies = [ "alloy-primitives", "num_enum 0.7.3", @@ -519,7 +519,7 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", - "tower 0.5.2", + "tower 0.5.1", "tracing", ] @@ -542,7 +542,7 @@ checksum = "5a833d97bf8a5f0f878daf2c8451fff7de7f9de38baa5a45d936ec718d81255a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -565,7 +565,7 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", - "tower 0.5.2", + "tower 0.5.1", "tracing", "url", "wasmtimer", @@ -651,10 +651,10 @@ dependencies = [ "alloy-rlp", "alloy-serde 0.5.4", "alloy-sol-types", + "derive_more", "itertools 0.13.0", "serde", "serde_json", - "thiserror 2.0.9", ] [[package]] @@ -876,7 +876,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -893,7 +893,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", "syn-solidity", "tiny-keccak 2.0.2", ] @@ -911,7 +911,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.94", + "syn 2.0.90", "syn-solidity", ] @@ -952,7 +952,7 @@ dependencies = [ "serde_json", "thiserror 2.0.11", "tokio", - "tower 0.5.2", + "tower 0.5.1", "tracing", "url", "wasmtimer", @@ -968,7 +968,7 @@ dependencies = [ "alloy-transport", "reqwest 0.12.9", "serde_json", - "tower 0.5.2", + "tower 0.5.1", "tracing", "url", ] @@ -1004,7 +1004,7 @@ dependencies = [ "alloy-transport", "futures 0.3.31", "http 1.2.0", - "rustls 0.23.20", + "rustls 0.23.19", "serde_json", "tokio", "tokio-tungstenite", @@ -1014,9 +1014,9 @@ dependencies = [ [[package]] name = "alloy-trie" -version = "0.7.8" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6917c79e837aa7b77b7a6dae9f89cbe15313ac161c4d3cfaf8909ef21f3d22d8" +checksum = "3a5fd8fea044cc9a8c8a50bb6f28e31f0385d820f116c5b98f6f4e55d6e5590b" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -1573,7 +1573,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -1595,18 +1595,18 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] name = "async-trait" -version = "0.1.84" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1244b10dcd56c92219da4e14caa97e312079e185f04ba3eea25061561dc0a0" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -1659,7 +1659,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -1670,9 +1670,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "aws-config" -version = "1.5.13" +version = "1.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a50b30228d3af8865ce83376b4e99e1ffa34728220fe2860e4df0bb5278d6" +checksum = "9b49afaa341e8dd8577e1a2200468f98956d6eda50bcf4a53246cc00174ba924" dependencies = [ "aws-credential-types", "aws-runtime", @@ -1681,7 +1681,7 @@ dependencies = [ "aws-sdk-sts", "aws-smithy-async", "aws-smithy-http", - "aws-smithy-json", + "aws-smithy-json 0.60.7", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -1739,9 +1739,9 @@ dependencies = [ [[package]] name = "aws-runtime" -version = "1.5.3" +version = "1.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16d1aa50accc11a4b4d5c50f7fb81cc0cf60328259c587d0e6b0f11385bde46" +checksum = "b5ac934720fbb46206292d2c75b57e67acfc56fe7dfd34fb9a02334af08409ea" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -1764,15 +1764,15 @@ dependencies = [ [[package]] name = "aws-sdk-kms" -version = "1.54.0" +version = "1.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cf16c0e5853312995505557b876dd3f9fb9941e96d031383528ccef14ace57" +checksum = "3c30f6fd5646b99d9b45ec3a0c22e67112c175b2383100c960d7ee39d96c8d96" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", - "aws-smithy-json", + "aws-smithy-json 0.61.1", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -1786,15 +1786,15 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.53.0" +version = "1.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1605dc0bf9f0a4b05b451441a17fcb0bda229db384f23bf5cead3adbab0664ac" +checksum = "05ca43a4ef210894f93096039ef1d6fa4ad3edfabb3be92b80908b9f2e4b4eab" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", - "aws-smithy-json", + "aws-smithy-json 0.61.1", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -1808,15 +1808,15 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.54.0" +version = "1.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59f3f73466ff24f6ad109095e0f3f2c830bfb4cd6c8b12f744c8e61ebf4d3ba1" +checksum = "abaf490c2e48eed0bb8e2da2fb08405647bd7f253996e0f93b981958ea0f73b0" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", - "aws-smithy-json", + "aws-smithy-json 0.61.1", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -1830,15 +1830,15 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.54.0" +version = "1.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "249b2acaa8e02fd4718705a9494e3eb633637139aa4bb09d70965b0448e865db" +checksum = "b68fde0d69c8bfdc1060ea7da21df3e39f6014da316783336deff0a9ec28f4bf" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", - "aws-smithy-json", + "aws-smithy-json 0.61.1", "aws-smithy-query", "aws-smithy-runtime", "aws-smithy-runtime-api", @@ -1876,9 +1876,9 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "1.2.3" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427cb637d15d63d6f9aae26358e1c9a9c09d5aa490d64b09354c8217cfef0f28" +checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" dependencies = [ "futures-util", "pin-project-lite", @@ -1905,6 +1905,15 @@ dependencies = [ "tracing", ] +[[package]] +name = "aws-smithy-json" +version = "0.60.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" +dependencies = [ + "aws-smithy-types", +] + [[package]] name = "aws-smithy-json" version = "0.61.1" @@ -1926,9 +1935,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.7.6" +version = "1.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a05dd41a70fc74051758ee75b5c4db2c0ca070ed9229c3df50e9475cda1cb985" +checksum = "9f20685047ca9d6f17b994a07f629c813f08b5bce65523e47124879e60103d45" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -1941,7 +1950,7 @@ dependencies = [ "http-body 0.4.6", "http-body 1.0.1", "httparse", - "hyper 0.14.32", + "hyper 0.14.31", "hyper-rustls 0.24.2", "once_cell", "pin-project-lite", @@ -1970,9 +1979,9 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.2.11" +version = "1.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ddc9bd6c28aeb303477170ddd183760a956a03e083b3902a990238a7e3792d" +checksum = "4fbd94a32b3a7d55d3806fe27d98d3ad393050439dd05eb53ece36ec5e3d3510" dependencies = [ "base64-simd", "bytes", @@ -2028,7 +2037,7 @@ dependencies = [ "http 1.2.0", "http-body 1.0.1", "http-body-util", - "hyper 1.5.2", + "hyper 1.5.1", "hyper-util", "itoa", "matchit", @@ -2042,10 +2051,10 @@ dependencies = [ "serde_path_to_error", "serde_urlencoded", "sha1", - "sync_wrapper", + "sync_wrapper 1.0.2", "tokio", "tokio-tungstenite", - "tower 0.5.2", + "tower 0.5.1", "tower-layer", "tower-service", "tracing", @@ -2066,7 +2075,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper", + "sync_wrapper 1.0.2", "tower-layer", "tower-service", "tracing", @@ -2334,9 +2343,9 @@ dependencies = [ [[package]] name = "bon" -version = "3.3.2" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7acc34ff59877422326db7d6f2d845a582b16396b6b08194942bf34c6528ab" +checksum = "f265cdb2e8501f1c952749e78babe8f1937be92c98120e5f78fc72d634682bad" dependencies = [ "bon-macros", "rustversion", @@ -2344,9 +2353,9 @@ dependencies = [ [[package]] name = "bon-macros" -version = "3.3.2" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4159dd617a7fbc9be6a692fe69dc2954f8e6bb6bb5e4d7578467441390d77fd0" +checksum = "38aa5c627cd7706490e5b003d685f8b9d69bc343b1a00b9fdd01e75fdf6827cf" dependencies = [ "darling 0.20.10", "ident_case", @@ -2354,7 +2363,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -2375,9 +2384,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.11.3" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" +checksum = "1a68f1f47cdf0ec8ee4b941b2eee2a80cb796db73118c0dd09ac63fbe405be22" dependencies = [ "memchr", "regex-automata 0.4.9", @@ -2404,9 +2413,9 @@ checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "bytemuck" -version = "1.21.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" [[package]] name = "byteorder" @@ -2549,9 +2558,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.7" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" +checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d" dependencies = [ "jobserver", "libc", @@ -2614,7 +2623,7 @@ dependencies = [ "reqwest 0.12.9", "revm", "rustyline", - "semver 1.0.24", + "semver 1.0.23", "serde", "serde_json", "serial_test", @@ -2744,9 +2753,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.40" +version = "4.5.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac2e663e3e3bed2d32d065a8404024dad306e699a04263ec59919529f803aee9" +checksum = "d9647a559c112175f17cf724dc72d3645680a883c58481332779192b0d8e7a01" dependencies = [ "clap", ] @@ -2770,7 +2779,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -2965,9 +2974,9 @@ dependencies = [ [[package]] name = "compact_str" -version = "0.8.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32" +checksum = "6050c3a16ddab2e412160b31f2c871015704239bca62f72f6e5f0be631d3f644" dependencies = [ "castaway", "cfg-if", @@ -3000,15 +3009,15 @@ checksum = "baf0a07a401f374238ab8e2f11a104d2851bf9ce711ec69804834de8af45c7af" [[package]] name = "console" -version = "0.15.10" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ "encode_unicode", + "lazy_static", "libc", - "once_cell", - "unicode-width 0.2.0", - "windows-sys 0.59.0", + "unicode-width 0.1.14", + "windows-sys 0.52.0", ] [[package]] @@ -3123,18 +3132,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.14" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.6" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -3160,9 +3169,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.21" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crossterm" @@ -3325,7 +3334,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -3438,7 +3447,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -3459,7 +3468,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -3469,7 +3478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -3490,7 +3499,7 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", "unicode-xid", ] @@ -3507,6 +3516,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + [[package]] name = "digest" version = "0.9.0" @@ -3598,7 +3613,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -3623,7 +3638,7 @@ checksum = "8dc51d98e636f5e3b0759a39257458b22619cac7e96d932da6eeb052891bb67c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -3779,9 +3794,9 @@ dependencies = [ [[package]] name = "encode_unicode" -version = "1.0.0" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" @@ -3818,14 +3833,14 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] name = "env_filter" -version = "0.1.3" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ "log", "regex", @@ -3833,9 +3848,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.6" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ "anstream", "anstyle", @@ -4080,17 +4095,6 @@ dependencies = [ "bytes", ] -[[package]] -name = "fastrlp" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", -] - [[package]] name = "fd-lock" version = "4.0.2" @@ -4209,7 +4213,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", - "miniz_oxide 0.8.2", + "miniz_oxide 0.8.0", ] [[package]] @@ -4293,7 +4297,7 @@ dependencies = [ "futures 0.3.31", "globset", "humantime-serde", - "hyper 1.5.2", + "hyper 1.5.1", "indicatif", "inferno", "itertools 0.13.0", @@ -4415,7 +4419,7 @@ dependencies = [ "itertools 0.13.0", "parking_lot", "revm-inspectors", - "semver 1.0.24", + "semver 1.0.23", "serde", "serde_json", "tempfile", @@ -4456,7 +4460,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -4485,7 +4489,7 @@ dependencies = [ "regex", "reqwest 0.12.9", "revm-primitives", - "semver 1.0.24", + "semver 1.0.23", "serde", "serde_json", "tempfile", @@ -4563,7 +4567,7 @@ dependencies = [ "rand 0.8.5", "revm", "revm-inspectors", - "semver 1.0.24", + "semver 1.0.23", "serde", "serde_json", "thiserror 2.0.11", @@ -4729,7 +4733,7 @@ dependencies = [ "path-slash", "rand 0.8.5", "rayon", - "semver 1.0.24", + "semver 1.0.23", "serde", "serde_json", "sha2 0.10.8", @@ -4767,7 +4771,7 @@ dependencies = [ "md-5", "path-slash", "rayon", - "semver 1.0.24", + "semver 1.0.23", "serde", "serde_json", "serde_repr", @@ -4789,7 +4793,7 @@ dependencies = [ "foundry-compilers-artifacts-solc", "foundry-compilers-core", "path-slash", - "semver 1.0.24", + "semver 1.0.23", "serde", ] @@ -4805,7 +4809,7 @@ dependencies = [ "fs_extra", "path-slash", "regex", - "semver 1.0.24", + "semver 1.0.23", "serde", "serde_json", "svm-rs", @@ -4839,7 +4843,7 @@ dependencies = [ "regex", "reqwest 0.12.9", "revm-primitives", - "semver 1.0.24", + "semver 1.0.23", "serde", "serde_json", "serde_regex", @@ -4964,7 +4968,7 @@ dependencies = [ "foundry-evm-core", "rayon", "revm", - "semver 1.0.24", + "semver 1.0.23", "tracing", ] @@ -5068,7 +5072,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -5246,7 +5250,7 @@ dependencies = [ name = "fs4" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c29c30684418547d476f0b48e84f4821639119c483b1eccd566c8cd0cd05f521" +checksum = "e8c6b3bd49c37d2aa3f3f2220233b29a7cd23f79d1fe70e5337d25fb390793de" dependencies = [ "rustix", "windows-sys 0.52.0", @@ -5358,7 +5362,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -5429,7 +5433,7 @@ dependencies = [ "serde_json", "tokio", "tonic", - "tower 0.5.2", + "tower 0.5.1", "tower-layer", "tower-util", "tracing", @@ -5529,9 +5533,9 @@ dependencies = [ [[package]] name = "gix-date" -version = "0.9.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c57c477b645ee248b173bb1176b52dd528872f12c50375801a58aaf5ae91113f" +checksum = "691142b1a34d18e8ed6e6114bc1a2736516c5ad60ef3aa9bd1b694886e3ca92d" dependencies = [ "bstr", "itoa", @@ -5704,9 +5708,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" @@ -5936,11 +5940,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.11" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -5965,7 +5969,7 @@ dependencies = [ "markup5ever", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -6060,9 +6064,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.32" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -6084,9 +6088,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.5.2" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", @@ -6111,7 +6115,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.32", + "hyper 0.14.31", "log", "rustls 0.21.12", "rustls-native-certs 0.6.3", @@ -6121,13 +6125,13 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.5" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.2.0", - "hyper 1.5.2", + "hyper 1.5.1", "hyper-util", "log", "rustls 0.23.19", @@ -6145,7 +6149,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.5.2", + "hyper 1.5.1", "hyper-util", "pin-project-lite", "tokio", @@ -6173,7 +6177,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.5.2", + "hyper 1.5.1", "hyper-util", "native-tls", "tokio", @@ -6192,7 +6196,7 @@ dependencies = [ "futures-util", "http 1.2.0", "http-body 1.0.1", - "hyper 1.5.2", + "hyper 1.5.1", "pin-project-lite", "socket2", "tokio", @@ -6338,7 +6342,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -6456,7 +6460,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -6523,7 +6527,7 @@ dependencies = [ "log", "num-format", "once_cell", - "quick-xml 0.37.2", + "quick-xml 0.37.1", "rgb", "str_stack", ] @@ -6565,15 +6569,16 @@ dependencies = [ [[package]] name = "instability" -version = "0.3.6" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "894813a444908c0c8c0e221b041771d107c4a21de1d317dc49bcc66e3c9e5b3f" +checksum = "b829f37dead9dc39df40c2d3376c179fdfd2ac771f53f55d3c30dc096a3c0c6e" dependencies = [ "darling 0.20.10", "indoc", + "pretty_assertions", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -6672,15 +6677,11 @@ checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jiff" -version = "0.1.21" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0ce60560149333a8e41ca7dc78799c47c5fd435e2bc18faf6a054382eec037" +checksum = "db69f08d4fb10524cacdb074c10b296299d71274ddbc830a8ee65666867002e9" dependencies = [ "jiff-tzdb-platform", - "log", - "portable-atomic", - "portable-atomic-util", - "serde", "windows-sys 0.59.0", ] @@ -7061,9 +7062,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.169" +version = "0.2.168" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" [[package]] name = "libdbus-sys" @@ -7365,7 +7366,7 @@ checksum = "23c9b935fbe1d6cbd1dac857b54a688145e2d93f48db36010514d0f612d0ad67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -7401,9 +7402,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.8.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ "adler2", ] @@ -7461,7 +7462,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -7791,7 +7792,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -7811,9 +7812,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "nybbles" -version = "0.3.3" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3409fc85ac27b27d971ea7cd1aabafd2eefa6de7e481c8d4f707225c117e81a" +checksum = "95f06be0417d97f81fe4e5c86d7d01b392655a9cac9c19a848aa033e18937b23" dependencies = [ "alloy-rlp", "const-hex", @@ -7912,7 +7913,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -8219,7 +8220,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -8278,7 +8279,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -8362,7 +8363,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -8420,7 +8421,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -8467,15 +8468,6 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" -[[package]] -name = "portable-atomic-util" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" -dependencies = [ - "portable-atomic", -] - [[package]] name = "powerfmt" version = "0.2.0" @@ -8499,9 +8491,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "predicates" -version = "3.1.3" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" +checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" dependencies = [ "anstyle", "predicates-core", @@ -8509,20 +8501,30 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.9" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" [[package]] name = "predicates-tree" -version = "1.0.12" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" dependencies = [ "predicates-core", "termtree", ] +[[package]] +name = "pretty_assertions" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" +dependencies = [ + "diff", + "yansi", +] + [[package]] name = "prettyplease" version = "0.2.25" @@ -8530,7 +8532,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -8630,7 +8632,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -8650,7 +8652,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", "version_check", "yansi", ] @@ -8730,13 +8732,13 @@ dependencies = [ [[package]] name = "proptest-derive" -version = "0.5.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee1c9ac207483d5e7db4940700de86a9aae46ef90c48b57f99fe7edb8345e49" +checksum = "6ff7ff745a347b87471d859a377a9a404361e7efc2a971d73424a6d183c0fc77" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -8803,7 +8805,7 @@ dependencies = [ "itertools 0.13.0", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -8929,7 +8931,7 @@ dependencies = [ "chrono", "indexmap 2.7.0", "newtype-uuid", - "quick-xml 0.37.2", + "quick-xml 0.37.1", "strip-ansi-escapes", "thiserror 2.0.11", "uuid 1.11.0", @@ -8964,9 +8966,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.37.2" +version = "0.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "165859e9e55f79d67b96c5d96f4e88b6f2695a1972849c15a6a3f5c59fc2c003" +checksum = "f22f29bdff3987b4d8632ef95fd6424ec7e4e0a57e2f4fc63e489e75357f6a03" dependencies = [ "memchr", ] @@ -9011,9 +9013,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.9" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" +checksum = "52cd4b1eff68bf27940dd39811292c49e007f4d0b4c357358dc9b0197be6b527" dependencies = [ "cfg_aliases 0.2.1", "libc", @@ -9025,9 +9027,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.38" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -9180,9 +9182,9 @@ checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" [[package]] name = "redox_syscall" -version = "0.5.8" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] @@ -9292,7 +9294,7 @@ dependencies = [ name = "reqwest" version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" +checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ "async-compression", "base64 0.22.1", @@ -9319,7 +9321,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.20", + "rustls 0.23.19", "rustls-native-certs 0.8.1", "rustls-pemfile 2.2.0", "rustls-pki-types", @@ -9333,7 +9335,6 @@ dependencies = [ "tokio-rustls 0.26.1", "tokio-socks", "tokio-util", - "tower 0.5.2", "tower-service", "url", "wasm-bindgen", @@ -9521,19 +9522,17 @@ dependencies = [ [[package]] name = "ruint" -version = "1.12.4" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5ef8fb1dd8de3870cb8400d51b4c2023854bbafd5431a3ac7e7317243e22d2f" +checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" dependencies = [ "alloy-rlp", "arbitrary", "ark-ff 0.3.0", "ark-ff 0.4.2", "bytes", - "fastrlp 0.3.1", - "fastrlp 0.4.0", + "fastrlp", "num-bigint", - "num-integer", "num-traits", "parity-scale-codec 3.6.12", "primitive-types 0.12.2", @@ -9604,7 +9603,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.24", + "semver 1.0.23", ] [[package]] @@ -9634,9 +9633,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.20" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ "aws-lc-rs", "log", @@ -9682,7 +9681,7 @@ dependencies = [ "openssl-probe", "rustls-pki-types", "schannel", - "security-framework 3.1.0", + "security-framework 3.0.1", ] [[package]] @@ -9705,9 +9704,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" dependencies = [ "web-time", ] @@ -9763,9 +9762,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.19" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "rusty-fork" @@ -9837,9 +9836,9 @@ dependencies = [ [[package]] name = "scc" -version = "2.3.0" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28e1c91382686d21b5ac7959341fcb9780fa7c03773646995a87c950fa7be640" +checksum = "66b202022bb57c049555430e11fc22fea12909276a80a4c3d368da36ac1d88ed" dependencies = [ "sdd", ] @@ -9874,14 +9873,14 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] name = "schnellru" -version = "0.2.4" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356285bbf17bea63d9e52e96bd18f039672ac92b55b8cb997d6162a2a37d1649" +checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367" dependencies = [ "ahash", "cfg-if", @@ -9924,9 +9923,9 @@ dependencies = [ [[package]] name = "sdd" -version = "3.0.5" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478f121bb72bbf63c52c93011ea1791dca40140dfe13f8336c4c5ac952c33aa9" +checksum = "49c1eeaf4b6a87c7479688c6d52b9f1153cedd3c489300564f932b065c6eab95" [[package]] name = "sec1" @@ -10031,9 +10030,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.1.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81d3f8c9bfcc3cbb6b0179eb57042d75b1582bdc65c3cb95f3fa999509c03cbc" +checksum = "e1415a607e92bec364ea2cf9264646dcce0f91e6d65281bd6f2819cca3bf39c8" dependencies = [ "bitflags 2.6.0", "core-foundation 0.10.0", @@ -10044,9 +10043,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.13.0" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5" +checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" dependencies = [ "core-foundation-sys", "libc", @@ -10063,9 +10062,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.24" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] @@ -10235,7 +10234,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -10246,7 +10245,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -10290,7 +10289,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -10382,7 +10381,7 @@ checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -10633,9 +10632,9 @@ checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" [[package]] name = "snapbox" -version = "0.6.21" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96dcfc4581e3355d70ac2ee14cfdf81dce3d85c85f1ed9e2c1d3013f53b3436b" +checksum = "1373ce406dfad473059bbc31d807715642182bbc952a811952b58d1c9e41dcfa" dependencies = [ "anstream", "anstyle", @@ -10707,7 +10706,7 @@ dependencies = [ "either", "num-bigint", "num-rational", - "semver 1.0.24", + "semver 1.0.23", "solar-data-structures", "solar-interface", "solar-macros", @@ -10775,7 +10774,7 @@ checksum = "970d7c774741f786d62cab78290e47d845b0b9c0c9d094a1642aced1d7946036" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -10833,7 +10832,7 @@ dependencies = [ "regex", "reqwest 0.12.9", "sanitize-filename", - "semver 1.0.24", + "semver 1.0.23", "serde", "serde_json", "sha2 0.10.8", @@ -10968,7 +10967,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -10992,9 +10991,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "svm-rs" -version = "0.5.9" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e9bc6b09b8a7a919128f8c029ae4048d83f814af557e948115273c75864acf" +checksum = "4aebac1b1ef2b46e2e2bdf3c09db304800f2a77c1fa902bd5231490203042be8" dependencies = [ "const-hex", "dirs 5.0.1", @@ -11005,20 +11004,20 @@ dependencies = [ "serde_json", "sha2 0.10.8", "tempfile", - "thiserror 2.0.9", + "thiserror 1.0.69", "url", "zip", ] [[package]] name = "svm-rs-builds" -version = "0.5.9" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d0964cd9dfcbf8bd21057c1a4aa293fefab208306461989ce723dd9c51e71e" +checksum = "f2fa0f145894cb4d1c14446f08098ee5f21fc37ccbd1a7dd9dd355bbc806de3b" dependencies = [ "build_const", "const-hex", - "semver 1.0.24", + "semver 1.0.23", "serde_json", "svm-rs", ] @@ -11036,9 +11035,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.94" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "987bc0be1cdea8b10216bd06e2ca407d40b9543468fafd3ddfb02f36e77f71f3" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" dependencies = [ "proc-macro2", "quote", @@ -11054,9 +11053,15 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "sync_wrapper" version = "1.0.2" @@ -11074,7 +11079,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -11127,13 +11132,12 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.15.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" +checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" dependencies = [ "cfg-if", "fastrand", - "getrandom", "once_cell", "rustix", "windows-sys 0.59.0", @@ -11186,9 +11190,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.5.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "textwrap" @@ -11227,7 +11231,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -11238,7 +11242,7 @@ checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -11343,9 +11347,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -11383,7 +11387,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -11412,7 +11416,7 @@ version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "rustls 0.23.20", + "rustls 0.23.19", "tokio", ] @@ -11448,7 +11452,7 @@ checksum = "edc5f74e248dc973e0dbb7b74c7e0d6fcc301c694ff50049504004ef4d0cdcd9" dependencies = [ "futures-util", "log", - "rustls 0.23.20", + "rustls 0.23.19", "rustls-pki-types", "tokio", "tokio-rustls 0.26.1", @@ -11540,7 +11544,7 @@ dependencies = [ "http 1.2.0", "http-body 1.0.1", "http-body-util", - "hyper 1.5.2", + "hyper 1.5.1", "hyper-timeout", "hyper-util", "percent-encoding", @@ -11586,14 +11590,14 @@ dependencies = [ [[package]] name = "tower" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper", + "sync_wrapper 0.1.2", "tokio", "tower-layer", "tower-service", @@ -11683,7 +11687,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -11769,9 +11773,9 @@ dependencies = [ [[package]] name = "tracing-tracy" -version = "0.11.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eaa1852afa96e0fe9e44caa53dc0bd2d9d05e0f2611ce09f97f8677af56e4ba" +checksum = "dc775fdaf33c3dfd19dc354729e65e87914bc67dcdc390ca1210807b8bee5902" dependencies = [ "tracing-core", "tracing-subscriber", @@ -11780,9 +11784,9 @@ dependencies = [ [[package]] name = "tracy-client" -version = "0.18.0" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d90a2c01305b02b76fdd89ac8608bae27e173c829a35f7d76a345ab5d33836db" +checksum = "51e295eae54124872df35720dc3a5b1e827c7deee352b342ec7f7e626d0d0ef3" dependencies = [ "loom", "once_cell", @@ -11791,9 +11795,9 @@ dependencies = [ [[package]] name = "tracy-client-sys" -version = "0.24.3" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69fff37da548239c3bf9e64a12193d261e8b22b660991c6fd2df057c168f435f" +checksum = "3637e734239e12ab152cd269302500bd063f37624ee210cd04b4936ed671f3b1" dependencies = [ "cc", "windows-targets 0.52.6", @@ -11895,9 +11899,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.8.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-bom" @@ -12209,7 +12213,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", "wasm-bindgen-shared", ] @@ -12244,7 +12248,7 @@ checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -12497,7 +12501,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -12508,7 +12512,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -12519,7 +12523,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -12530,7 +12534,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -12733,7 +12737,7 @@ dependencies = [ name = "winnow" version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -12835,7 +12839,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", "synstructure", ] @@ -12857,7 +12861,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -12877,7 +12881,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", "synstructure", ] @@ -12898,7 +12902,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] @@ -12920,14 +12924,14 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.94", + "syn 2.0.90", ] [[package]] name = "zip" -version = "2.2.2" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9c1ea7b3a5e1f4b922ff856a129881167511563dc219869afe3787fc0c1a45" +checksum = "99d52293fc86ea7cf13971b3bb81eb21683636e7ae24c729cdaf1b7c4157a352" dependencies = [ "arbitrary", "bzip2",