forked from foundry-rs/foundry
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): unify transaction options (foundry-rs#2172)
* fix(cli): unify transaction options * fix(cli): separate option modules
- Loading branch information
0xYYY
authored
Jun 30, 2022
1 parent
d000eec
commit 0d44687
Showing
8 changed files
with
309 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use clap::Parser; | ||
use ethers::types::Chain; | ||
use strum::VariantNames; | ||
|
||
// Helper for exposing enum values for `Chain` | ||
// TODO: Is this a duplicate of config/src/chain.rs? | ||
#[derive(Debug, Clone, Parser)] | ||
pub struct ClapChain { | ||
#[clap( | ||
short = 'c', | ||
long = "chain", | ||
env = "CHAIN", | ||
default_value = "mainnet", | ||
// if Chain implemented ArgEnum, we'd get this for free | ||
possible_values = Chain::VARIANTS, | ||
value_name = "CHAIN" | ||
)] | ||
pub inner: Chain, | ||
} |
Oops, something went wrong.