Skip to main content
Use this script after creating a vault, before adding assets or strategy positions. It adds one deposit asset using registered prices. Configure assets and prices explains the fields and required accounts. The manager signs and pays SOL for account rent and transaction fees. The script supports account creation for Token Program and Token-2022 mints; the selected asset must also be supported by the Strategy Vaults program.

Set up the example

Set the RPC endpoint, manager keypair file, vault address, and accepted token’s mint. ASSET_MINT must be an actual token mint with a registered price path to the vault’s accounting denomination.

Add the asset

Save the script as configure-assets-and-prices.mts. It creates both token accounts and adds the entry in one transaction. The transaction is sent to the network selected by RPC_URL.
configure-assets-and-prices.mts
Run it:
After confirmation, refresh prices and AUM before the next setup operation. The script stops after adding and checking the entry. If confirmation times out, resolve the transaction’s status and reload the vault before retrying. Associated account creation is idempotent; adding a duplicate token entry is rejected.