Skip to content

Commit

Permalink
Merge branch 'master' into emo/expand-assume-no-revert
Browse files Browse the repository at this point in the history
  • Loading branch information
zerosnacks authored Nov 5, 2024
2 parents 935152f + 57bb12e commit db65b86
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
5 changes: 3 additions & 2 deletions crates/anvil/src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 13 additions & 9 deletions crates/forge/tests/cli/script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2250,26 +2250,30 @@ Simulated On-chain Traces:

// Tests that chained errors are properly displayed.
// <https://github.com/foundry-rs/foundry/issues/9161>
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 {
function run() public {
}
}
"#,
)
.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;
Expand Down

0 comments on commit db65b86

Please sign in to comment.