Skip to content

Commit

Permalink
feat(anvil): expose --disable-default-create2-deployer CLI flag (#7282)
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr authored Feb 29, 2024
1 parent 5c171f7 commit 4a91072
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/anvil/src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ impl NodeArgs {
.with_init_state(self.load_state.or_else(|| self.state.and_then(|s| s.state)))
.with_transaction_block_keeper(self.transaction_block_keeper)
.with_optimism(self.evm_opts.optimism)
.with_disable_default_create2_deployer(self.evm_opts.disable_default_create2_deployer)
}

fn account_generator(&self) -> AccountGenerator {
Expand Down Expand Up @@ -493,6 +494,10 @@ pub struct AnvilEvmArgs {
/// Run an Optimism chain
#[arg(long, visible_alias = "optimism")]
pub optimism: bool,

/// Disable the default create2 deployer
#[arg(long, visible_alias = "no-create2")]
pub disable_default_create2_deployer: bool,
}

/// Resolves an alias passed as fork-url to the matching url defined in the rpc_endpoints section
Expand Down
7 changes: 7 additions & 0 deletions crates/anvil/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,13 @@ impl NodeConfig {
self
}

/// Sets whether to disable the default create2 deployer
#[must_use]
pub fn with_disable_default_create2_deployer(mut self, yes: bool) -> Self {
self.disable_default_create2_deployer = yes;
self
}

/// Configures everything related to env, backend and database and returns the
/// [Backend](mem::Backend)
///
Expand Down

0 comments on commit 4a91072

Please sign in to comment.