Skip to main content
This script proposes either a 1% annual management fee (10_000n) or a new deposit asset, then finalizes and executes it in separate runs. Use Propose a vault change for the workflow.

Set up

The keypair signs and pays transaction fees. Creation requires a manager. Finalization permits any signer; execution requires a vault role for the first 24 hours after executableAt, then permits any signer. The program enforces those permissions.

Script

Save as propose-vault-change.mts. The script simulates and submits transactions to the network selected by RPC_URL. Set CHANGE=fee (default) or CHANGE=deposit-asset. The asset option demonstrates the additional validation accounts required at execution. Both options compare the stored actions before executing.
propose-vault-change.mts

Run each phase

Choose the change, then create the proposal and save its printed address. For a deposit asset, its mint must not already be tracked and its price path must be registered:
Creation prepares the two canonical token accounts. Execution supplies those read-only accounts before existing-position valuation accounts. The fee option has no action-specific prefix. Policy actions require different Squads account trios, documented in Policies and proposal actions. Create the draft and activate:
After voting ends:
If approved, fill all pending withdrawals, then run at or after the proposal’s stored executableAt:
The execution phase updates supported price inputs, refreshes AUM, executes the proposal, and refreshes again afterward. Keep any other required oracle or protocol inputs current. If that sequence exceeds one transaction’s limits, use the refresh and bundle guidance. Resolve an uncertain transaction status before retrying a phase. Creating another proposal uses another ID; an already executed proposal cannot execute again.