Skip to content
Draft
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
53 changes: 28 additions & 25 deletions staking/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions staking/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ uriparse = "0.6.4"
solana-remote-wallet = "1.18.16"
solana-account-decoder = "1.18.16"
chrono = "0.4.38"
futures = "0.3.31"
tokio = "1.42.0"
tokio-stream = "0.1.17"
66 changes: 5 additions & 61 deletions staking/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,68 +48,12 @@ fn get_keypair_from_file(path: &str) -> Result<Keypair, String> {
#[allow(clippy::large_enum_variant)]
#[derive(Subcommand, Debug)]
pub enum Action {
#[clap(about = "Initialize pool")]
InitializePool {
#[clap(
long,
help = "Keypair pool data account",
parse(try_from_str = get_keypair_from_file)
)]
pool_data_keypair: Keypair,
#[clap(long, help = "Y parameter")]
y: u64,
#[clap(long, help = "Reward program authority parameter")]
reward_program_authority: Pubkey,
#[clap(long, help = "Slash custody parameter")]
slash_custody: Pubkey,
ClaimRewards {
#[clap(long, help = "Minimum staked tokens")]
min_staked: u64,
#[clap(long, help = "Minimum reward tokens per publisher")]
min_reward: u64,
},
Advance {
#[clap(
long,
help = "Url of hermes to fetch publisher caps",
default_value = "https://hermes-beta.pyth.network/"
)]
hermes_url: String,

#[clap(long, default_value = "3u8hJUVTA4jH1wYAyUur7FFZVQ8H635K3tSHHF4ssjQ5")]
wormhole: Pubkey,
},
InitializePoolRewardCustody {},
UpdateDelegationFee {
#[clap(long, help = "New fee")]
delegation_fee: u64,
},
SetPublisherStakeAccount {
#[clap(long, help = "Publisher")]
publisher: Pubkey,
#[clap(long, help = "Stake account positions")]
stake_account_positions: Pubkey,
},
CreateSlashEvent {
#[clap(long, help = "Publisher")]
publisher: Pubkey,
#[clap(long, help = "Amount")]
slash_ratio: u64,
},
UpdateRewardProgramAuthority {
#[clap(long, help = "New reward program authority")]
new_reward_program_authority: Pubkey,
},
Slash {
#[clap(long, help = "Publisher")]
publisher: Pubkey,
#[clap(long, help = "Stake account positions")]
stake_account_positions: Pubkey,
},
UpdateY {
#[clap(long, help = "New Y")]
y: u64,
},
ClosePublisherCaps {
#[clap(long, help = "Publisher caps")]
publisher_caps: Pubkey,
},
SaveStakeAccountsSnapshot {},
}

pub enum SignerSource {
Expand Down
Loading