Skip to content

Commit

Permalink
chore: move var to evm args (#7492)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Mar 25, 2024
1 parent bf5bfe0 commit 563e062
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions crates/anvil/src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@ pub struct NodeArgs {

#[command(flatten)]
pub server_config: ServerConfig,
/// The memory limit per EVM execution in bytes.
#[arg(long)]
pub memory_limit: Option<u64>,
}

#[cfg(windows)]
Expand Down Expand Up @@ -238,7 +235,7 @@ impl NodeArgs {
.with_optimism(self.evm_opts.optimism)
.with_disable_default_create2_deployer(self.evm_opts.disable_default_create2_deployer)
.with_slots_in_an_epoch(self.slots_in_an_epoch)
.with_memory_limit(self.memory_limit)
.with_memory_limit(self.evm_opts.memory_limit)
}

fn account_generator(&self) -> AccountGenerator {
Expand Down Expand Up @@ -507,6 +504,10 @@ pub struct AnvilEvmArgs {
/// Disable the default create2 deployer
#[arg(long, visible_alias = "no-create2")]
pub disable_default_create2_deployer: bool,

/// The memory limit per EVM execution in bytes.
#[arg(long)]
pub memory_limit: Option<u64>,
}

/// Resolves an alias passed as fork-url to the matching url defined in the rpc_endpoints section
Expand Down
2 changes: 1 addition & 1 deletion crates/anvil/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ pub struct NodeConfig {
pub enable_optimism: bool,
/// Slots in an epoch
pub slots_in_an_epoch: u64,
/// Memory configuration layer
/// The memory limit per EVM execution in bytes.
pub memory_limit: Option<u64>,
}

Expand Down

0 comments on commit 563e062

Please sign in to comment.