[xc-admin] Add activate (#609)

* Add activate

* Rebase

* Remove extra file

* Restore other part of code
This commit is contained in:
guibescos 2023-02-17 13:49:29 +00:00 committed by GitHub
parent 040169a196
commit 0b35be7015
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 22 additions and 0 deletions

View File

@ -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();