Skip to main content

Documentation Index

Fetch the complete documentation index at: https://v2-docs.exponent.finance/llms.txt

Use this file to discover all available pages before exploring further.

createManagePricesInstruction

Manages price entries and price managers in the ExponentPrices account. Supports adding, removing, and updating price configurations for tokens used in vault valuations. Only callable by registered price managers.

Usage

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

const ix = createManagePricesInstruction(
  {
    manager: priceManagerKeypair.publicKey,
    exponentPrices: exponentPricesAddress,
  },
  {
    actions: [
      {
        addPriceEntry: {
          mint: usdcMint,
          oracleType: { pyth: {} },
          oracleAddress: pythUsdcFeedAddress,
        },
      },
      {
        addManager: {
          manager: newPriceManagerAddress,
        },
      },
    ],
  }
);

Accounts

NameSignerWritableDescription
managerYesYesRegistered price manager authorizing the changes
exponentPricesNoYesExponentPrices account to modify

Args

NameTypeDescription
actionsUpdatePriceAction[]Array of price management actions (add/remove price entries, add/remove managers)

Returns

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