Skip to content

Commit 6ebed9c

Browse files
authored
feat: add amount to stake (#2671)
1 parent d4a6c48 commit 6ebed9c

File tree

1 file changed

+8
-1
lines changed
  • governance/xc_admin/packages/xc_admin_cli/src

1 file changed

+8
-1
lines changed

governance/xc_admin/packages/xc_admin_cli/src/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,11 @@ multisigCommand(
483483
"-d, --vote-pubkeys <comma_separated_voter_pubkeys>",
484484
"vote account to delegate to",
485485
)
486+
.option(
487+
"-a, --amount <number>",
488+
"Amount of stake to assign (in SOL)",
489+
"100000",
490+
)
486491
.action(async (options: any) => {
487492
const vault = await loadVaultFromOptions(options);
488493
const cluster: PythCluster = options.cluster;
@@ -493,6 +498,8 @@ multisigCommand(
493498
? options.votePubkeys.split(",").map((m: string) => new PublicKey(m))
494499
: [];
495500

501+
const amount = Number(options.amount);
502+
496503
const instructions: TransactionInstruction[] = [];
497504

498505
for (const votePubkey of votePubkeys) {
@@ -515,7 +522,7 @@ multisigCommand(
515522
seed: seed,
516523
fromPubkey: authorizedPubkey,
517524
newAccountPubkey: stakePubkey,
518-
lamports: 100000 * LAMPORTS_PER_SOL,
525+
lamports: amount * LAMPORTS_PER_SOL,
519526
space: StakeProgram.space,
520527
programId: StakeProgram.programId,
521528
}),

0 commit comments

Comments
 (0)