Stores information on voting and status of a transaction
Proposals handle consensus for a given transaction, mapped one-to-one. Without a proposal account for a transaction, it can not be voted on and subsequently executed.
Getting a Proposal account
import*as multisig from"@sqds/multisig";const { Proposal } =multisig.accounts;asyncfunctionmain() {// Public Key of the Multisig PDAconstmultisigPda=newPublicKey("MyAmazingMultisig");// Fetch the deserialized Multisig accountconstmultisigInfo=awaitmultisig.accounts.Multisig.fromAccountAddress( connection, multisigPda );// Get the current transaction indexconstcurrentTransactionIndex=Number(multisigInfo.transactionIndex);consttransactionIndex=BigInt(currentTransactionIndex +1);// or, if this is your first transaction// const transactionIndex = 1n; // Bump is generally not neededconst [proposalPda,proposalBump] =multisig.getProposalPda({ multisigPda, transactionIndex, });constproposalAccount=awaitProposal.fromAccountAddress( connection, proposalPda );// Log the proposal statusconsole.log("Proposal Status",proposalAccount.status);}
Notes
Required for voting on and executing transactions
They store status of consensus, and tallies for who's approved and rejected.
See the reference for more information on account structure and seeds.