|
|
@@ -483,6 +483,11 @@ multisigCommand(
|
|
|
"-d, --vote-pubkeys <comma_separated_voter_pubkeys>",
|
|
|
"vote account to delegate to",
|
|
|
)
|
|
|
+ .option(
|
|
|
+ "-a, --amount <number>",
|
|
|
+ "Amount of stake to assign (in SOL)",
|
|
|
+ "100000",
|
|
|
+ )
|
|
|
.action(async (options: any) => {
|
|
|
const vault = await loadVaultFromOptions(options);
|
|
|
const cluster: PythCluster = options.cluster;
|
|
|
@@ -493,6 +498,8 @@ multisigCommand(
|
|
|
? options.votePubkeys.split(",").map((m: string) => new PublicKey(m))
|
|
|
: [];
|
|
|
|
|
|
+ const amount = Number(options.amount);
|
|
|
+
|
|
|
const instructions: TransactionInstruction[] = [];
|
|
|
|
|
|
for (const votePubkey of votePubkeys) {
|
|
|
@@ -515,7 +522,7 @@ multisigCommand(
|
|
|
seed: seed,
|
|
|
fromPubkey: authorizedPubkey,
|
|
|
newAccountPubkey: stakePubkey,
|
|
|
- lamports: 100000 * LAMPORTS_PER_SOL,
|
|
|
+ lamports: amount * LAMPORTS_PER_SOL,
|
|
|
space: StakeProgram.space,
|
|
|
programId: StakeProgram.programId,
|
|
|
}),
|