Skip to content

Commit

Permalink
chore: add alias (#9082)
Browse files Browse the repository at this point in the history
add alias
  • Loading branch information
klkvr authored Oct 9, 2024
1 parent 92702e9 commit f79c53c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/anvil/src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ pub struct AnvilEvmArgs {
pub memory_limit: Option<u64>,

/// Enable Alphanet features
#[arg(long, visible_alias = "alphanet")]
#[arg(long, visible_alias = "odyssey")]
pub alphanet: bool,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/cast/bin/cmd/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub struct CallArgs {
json: bool,

/// Enable Alphanet features.
#[arg(long)]
#[arg(long, alias = "odyssey")]
pub alphanet: bool,

#[command(subcommand)]
Expand Down
2 changes: 1 addition & 1 deletion crates/cast/bin/cmd/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub struct RunArgs {
pub no_rate_limit: bool,

/// Enables Alphanet features.
#[arg(long)]
#[arg(long, alias = "odyssey")]
pub alphanet: bool,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/common/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ pub struct EvmArgs {
pub isolate: bool,

/// Whether to enable Alphanet features.
#[arg(long)]
#[arg(long, alias = "odyssey")]
#[serde(skip)]
pub alphanet: bool,
}
Expand Down
4 changes: 4 additions & 0 deletions crates/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2447,6 +2447,10 @@ impl<P: Provider> Provider for BackwardsCompatTomlProvider<P> {
dict.insert("solc".to_string(), v);
}
}

if let Some(v) = dict.remove("odyssey") {
dict.insert("alphanet".to_string(), v);
}
map.insert(profile, dict);
}
Ok(map)
Expand Down

0 comments on commit f79c53c

Please sign in to comment.