-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate generate-account-key in favour of generate-moonbeam-key #3090
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
//! It is built using clap and inherits behavior from Substrate's sc_cli crate. | ||
|
||
use clap::Parser; | ||
use colored::Colorize; | ||
use moonbeam_cli_opt::{account_key::GenerateAccountKey, EthApi, FrontierBackendType, Sealing}; | ||
use moonbeam_service::chain_spec; | ||
use sc_cli::{Error as CliError, SubstrateCli}; | ||
|
@@ -372,7 +373,10 @@ pub enum KeyCmd { | |
#[clap(flatten)] | ||
BaseCli(sc_cli::KeySubcommand), | ||
/// Generate an Ethereum account. | ||
#[clap(about = "This command is deprecated, please use `generate-moonbeam-key` instead.")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we make it so it points to this PR with explanation about why it is deprecated and the difference between the 2. |
||
GenerateAccountKey(GenerateAccountKey), | ||
/// Generate a Moonbeam account. | ||
GenerateMoonbeamKey(GenerateAccountKey), | ||
} | ||
|
||
impl KeyCmd { | ||
|
@@ -381,7 +385,18 @@ impl KeyCmd { | |
match self { | ||
KeyCmd::BaseCli(cmd) => cmd.run(cli), | ||
KeyCmd::GenerateAccountKey(cmd) => { | ||
cmd.run(); | ||
eprintln!( | ||
"\n{}\n", | ||
"Warning: This command is deprecated, please use `generate-moonbeam-key`instead." | ||
.on_yellow() | ||
.black() | ||
.bold() | ||
); | ||
cmd.run(true); | ||
Ok(()) | ||
} | ||
KeyCmd::GenerateMoonbeamKey(cmd) => { | ||
cmd.run(false); | ||
Ok(()) | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should allow to pass a
--network moonbeam|moonriver|moonbase|ethereum