Skip to content
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

CLI: Added NCN Commands #196

Merged
merged 9 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 58 additions & 1 deletion cli/src/restaking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,30 @@ pub enum ConfigActions {
#[derive(Subcommand)]
pub enum NcnActions {
/// Initialize NCN
Initialize,
Initialize {
#[arg(long)]
path_to_base_keypair: Option<String>,
},
/// Initialize NCN Operator State
InitializeNcnOperatorState { ncn: String, operator: String },
/// Warmup NCN Operator State
NcnWarmupOperator { ncn: String, operator: String },
/// NCN Cooldown Operator State
NcnCooldownOperator { ncn: String, operator: String },
/// Initialize NCN Vault Ticket
InitializeNcnVaultTicket { ncn: String, vault: String },
/// Warmup NCN Vault Ticket
WarmupNcnVaultTicket { ncn: String, vault: String },
/// Cooldown NCN Vault Ticket
CooldownNcnVaultTicket { ncn: String, vault: String },
/// NCN Delegate Token Account
NcnDelegateTokenAccount {
ncn: String,
delegate: String,
token_mint: String,
#[arg(long)]
should_create_token_account: bool,
},
/// Get NCN
Get { pubkey: String },
/// List all NCNs
Expand All @@ -51,6 +74,40 @@ pub enum OperatorActions {
InitializeOperatorVaultTicket { operator: String, vault: String },
/// Warmup Operator Vault Ticket
WarmupOperatorVaultTicket { operator: String, vault: String },
/// Cooldown Operator Vault Ticket
CooldownOperatorVaultTicket { operator: String, vault: String },
/// Operator Warmup NCN
OperatorWarmupNcn { operator: String, ncn: String },
/// Operator Cooldown NCN
OperatorCooldownNcn { operator: String, ncn: String },
/// Operator Set Admin
OperatorSetSecondaryAdmin {
operator: String,
new_admin: String,
#[arg(long)]
set_ncn_admin: bool,
#[arg(long)]
set_vault_admin: bool,
#[arg(long)]
set_voter_admin: bool,
#[arg(long)]
set_delegate_admin: bool,
#[arg(long)]
set_metadata_admin: bool,
},
/// Sets the operator fee
OperatorSetFees {
operator: String,
operator_fee_bps: u16,
},
/// Operator Delegate Token Account
OperatorDelegateTokenAccount {
operator: String,
delegate: String,
token_mint: String,
#[arg(long)]
should_create_token_account: bool,
},
/// Get operator
Get { pubkey: String },
/// List all operators
Expand Down
Loading
Loading