Skip to main content

createFinalizeProposalInstruction

Builds a raw instruction to finalize a governance proposal after the voting period has ended. The instruction determines whether the proposal passes or is rejected based on the rejection threshold. If total reject votes exceed the threshold percentage of LP supply, the proposal is rejected. This instruction is permissionless and can be called by anyone.

Usage

import { createFinalizeProposalInstruction } from "@exponent-labs/exponent-sdk/client/vaults";
import { PublicKey } from "@solana/web3.js";

const ix = createFinalizeProposalInstruction({
  payer: payerKeypair.publicKey,
  vault: vaultAddress,
  mintLp: lpMintAddress,
  proposal: proposalAddress,
});

Accounts

NameSignerWritableDescription
payerYesYesFee payer for the transaction
vaultNoNoVault account associated with the proposal
mintLpNoNoLP token mint used to calculate rejection threshold
proposalNoYesProposal account to finalize

Returns

TransactionInstruction — a transaction instruction ready to be added to a transaction.