From 0c769c3b6f5bb4ade5e0f3855efe677eeea8203d Mon Sep 17 00:00:00 2001 From: grandizzy <38490174+grandizzy@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:23:06 +0200 Subject: [PATCH 1/2] chore: ignore flaky rostock chain test (#9261) --- crates/forge/tests/cli/script.rs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/crates/forge/tests/cli/script.rs b/crates/forge/tests/cli/script.rs index 88b75ad50114a..901ef592211dd 100644 --- a/crates/forge/tests/cli/script.rs +++ b/crates/forge/tests/cli/script.rs @@ -2250,11 +2250,14 @@ Simulated On-chain Traces: // Tests that chained errors are properly displayed. // -forgetest_init!(should_display_evm_chained_error, |prj, cmd| { - let script = prj - .add_source( - "Foo", - r#" +forgetest_init!( + #[ignore] + should_display_evm_chained_error, + |prj, cmd| { + let script = prj + .add_source( + "Foo", + r#" import "forge-std/Script.sol"; contract ContractScript is Script { @@ -2262,14 +2265,15 @@ contract ContractScript is Script { } } "#, - ) - .unwrap(); - cmd.arg("script").arg(script).args(["--fork-url", "https://public-node.testnet.rsk.co"]).assert_failure().stderr_eq(str![[r#" + ) + .unwrap(); + cmd.arg("script").arg(script).args(["--fork-url", "https://public-node.testnet.rsk.co"]).assert_failure().stderr_eq(str![[r#" Error: Failed to deploy script: backend: failed while inspecting; header validation error: `prevrandao` not set; `prevrandao` not set; "#]]); -}); + } +); forgetest_async!(should_detect_additional_contracts, |prj, cmd| { let (_api, handle) = spawn(NodeConfig::test()).await; From 57bb12e022fb9ea46a4a7ca8647eb016e8d43ca3 Mon Sep 17 00:00:00 2001 From: Delweng Date: Tue, 5 Nov 2024 16:31:49 +0800 Subject: [PATCH 2/2] fix(anvil): set auto-unlock an alias of auto-impersonate (#9256) * fix(anvil): alias --auto-unlock of auto-impersonate Signed-off-by: jsvisa * feat(anvil): add more clear help messge for auto-impersonate Signed-off-by: jsvisa --------- Signed-off-by: jsvisa --- crates/anvil/src/cmd.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/anvil/src/cmd.rs b/crates/anvil/src/cmd.rs index 8592ed1a02b91..839dae0160b2e 100644 --- a/crates/anvil/src/cmd.rs +++ b/crates/anvil/src/cmd.rs @@ -561,8 +561,9 @@ pub struct AnvilEvmArgs { #[arg(long, visible_alias = "no-console-log")] pub disable_console_log: bool, - /// Enable autoImpersonate on startup - #[arg(long, visible_alias = "auto-impersonate")] + /// Enables automatic impersonation on startup. This allows any transaction sender to be + /// simulated as different accounts, which is useful for testing contract behavior. + #[arg(long, visible_alias = "auto-unlock")] pub auto_impersonate: bool, /// Run an Optimism chain