Reject Proposal

Cast a rejection on a given transaction's proposal

Opposite of approval, any qualifying member key with "Voter" permissions can cast a rejection on proposal. Additionally, a rejection will fail if the proposal is stale (Proposal transactionIndex < Multisig staleTransactionIndex).

Example

import * as multisig from "@sqds/multisig";
import { Connection, PublicKey } from "@solana/web3.js"

async function main(member: PublicKey) {
    // Cluster Connection
    const connection = new Connection("<your rpc url>");
    
    // If you've saved your createKey, you can define it as a static PublicKey
    const createKey = new PublicKey("<your createkey>")
    
    // Derive the multisig PDA
    const [multisigPda] = multisig.getMultisigPda({
        createKey,
    });
    // or
    // const multisigPda = new PublicKey("<your multisig key>");
    
    // Get deserialized multisig account info
    const multisigInfo = await multisig.accounts.Multisig.fromAccountAddress(
      connection,
      multisigPda
    );

    // Get the current transaction index
    const transactionIndex = Number(multisigInfo.transactionIndex);
    // or, if this is tied to your first transaction
    // const transactionIndex = 1n;
    
    const ix = await multisig.instructions.proposalReject({
      multisigPda,
      transactionIndex,
      // Member must have "Voter" permissions
      member: member,
    });
}

Notes

  • Rejecting members must have "Voter" permissions

  • A Proposal can not be rejected if the transaction index is less than the stale transaction index (see Multisig reference)

Last updated