Add voluntary exit via validator manager (#6612)

* #4303
* #4804


  -Add voluntary exit feature to the validator manager
-Add delete all validators by using the keyword "all"
This commit is contained in:
chonghe
2025-07-01 11:07:49 +08:00
committed by GitHub
parent c1f94d9b7b
commit 257d270718
14 changed files with 983 additions and 23 deletions

View File

@@ -9,6 +9,7 @@ use types::EthSpec;
pub mod common;
pub mod create_validators;
pub mod delete_validators;
pub mod exit_validators;
pub mod import_validators;
pub mod list_validators;
pub mod move_validators;
@@ -51,6 +52,7 @@ pub fn cli_app() -> Command {
.subcommand(move_validators::cli_app())
.subcommand(list_validators::cli_app())
.subcommand(delete_validators::cli_app())
.subcommand(exit_validators::cli_app())
}
/// Run the account manager, returning an error if the operation did not succeed.
@@ -79,11 +81,14 @@ pub fn run<E: EthSpec>(matches: &ArgMatches, env: Environment<E>) -> Result<(),
move_validators::cli_run(matches, dump_config).await
}
Some((list_validators::CMD, matches)) => {
list_validators::cli_run(matches, dump_config).await
list_validators::cli_run::<E>(matches, dump_config).await
}
Some((delete_validators::CMD, matches)) => {
delete_validators::cli_run(matches, dump_config).await
}
Some((exit_validators::CMD, matches)) => {
exit_validators::cli_run::<E>(matches, dump_config).await
}
Some(("", _)) => Err("No command supplied. See --help.".to_string()),
Some((unknown, _)) => Err(format!(
"{} is not a valid {} command. See --help.",