[xc-admin] Add activate (#609)
* Add activate * Rebase * Remove extra file * Restore other part of code
This commit is contained in:
parent
040169a196
commit
0b35be7015
|
@ -360,4 +360,26 @@ mutlisigCommand("propose-token-transfer", "Propose token transfer")
|
||||||
await proposeInstructions(squad, vault, [proposalInstruction], false);
|
await proposeInstructions(squad, vault, [proposalInstruction], false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Activate proposal, mostly useful for cleaning up draft proposals that happen when the browser wallet fails to send all transactions succesfully
|
||||||
|
*/
|
||||||
|
mutlisigCommand("activate", "Activate a transaction sitting in the multisig")
|
||||||
|
.requiredOption(
|
||||||
|
"-t, --transaction <pubkey>",
|
||||||
|
"address of the draft transaction"
|
||||||
|
)
|
||||||
|
.action(async (options: any) => {
|
||||||
|
const wallet = await loadHotWalletOrLedger(
|
||||||
|
options.wallet,
|
||||||
|
options.ledgerDerivationAccount,
|
||||||
|
options.ledgerDerivationChange
|
||||||
|
);
|
||||||
|
|
||||||
|
const transaction: PublicKey = new PublicKey(options.transaction);
|
||||||
|
const cluster: PythCluster = options.cluster;
|
||||||
|
|
||||||
|
const squad = SquadsMesh.endpoint(getPythClusterApiUrl(cluster), wallet);
|
||||||
|
await squad.activateTransaction(transaction);
|
||||||
|
});
|
||||||
|
|
||||||
program.parse();
|
program.parse();
|
||||||
|
|
Loading…
Reference in New Issue