Skip to main content

createExecuteProposalInstruction

Builds a raw instruction to execute an approved governance proposal after the timelock period has passed. Applies the proposed change — either a VaultSettingsAction or PositionUpdate — to the vault. This instruction is permissionless and can be called by anyone once the timelock expires.

Usage

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

const ix = createExecuteProposalInstruction({
  payer: payerKeypair.publicKey,
  vault: vaultAddress,
  proposal: proposalAddress,
  exponentPrices: exponentPricesAddress,
  systemProgram: SystemProgram.programId,
});

Accounts

NameSignerWritableDescription
payerYesYesFee payer for the transaction
vaultNoYesVault account to apply the proposal changes to
proposalNoYesApproved proposal to execute
exponentPricesNoYesExponent prices oracle account
systemProgramNoNoSystem program

Returns

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