Skip to main content

createManageVaultSettingsInstruction

Builds a raw instruction to apply one or more settings changes to a Strategy Vault. Actions can include adding or removing token entries, updating withdrawal periods, and modifying vault parameters. Requires the manager role.

Usage

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

const ix = createManageVaultSettingsInstruction(
  {
    manager: wallet.publicKey,
    vault: vaultAddress,
    exponentPrices: exponentPricesPda,
    systemProgram: SYSTEM_PROGRAM_ID,
  },
  {
    actions: [
      { addTokenEntry: { mint: newTokenMint, oracle: oracleAddress, decimals: 6 } },
      { setWithdrawalPeriod: { seconds: 86400 } },
    ],
  }
);

Accounts

NameSignerWritableDescription
managerYesYesThe vault manager authority
vaultNoYesThe Strategy Vault account
exponentPricesNoYesGlobal ExponentPrices account
systemProgramNoNoSystem program

Args

NameTypeDescription
actionsVaultSettingsAction[]Array of settings changes to apply to the vault

Returns

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