Examples
Runnable examples for the two things you'll do most against the Transaction Builder — discover routes, and build calldata for them.
Runnable examples for the Transaction Builder. Each section shows the endpoint, a working curl, and what to do with the response.
Prerequisites
curl(required) andjq(optional — used to pretty-print responses).A Veda-issued API key exported as
VEDA_API_KEY.The
{chain},{vault_address}, and{strategist_address}you're targeting.
Every curl below assumes these environment variables:
export VEDA_API_KEY=veda_user_live_...
BASE=https://api.veda.tech/v1
CHAIN=monad
VAULT=0x1C8a336051D2024E318A229d01F9F6CF96efD316
STRATEGIST=0xAdc33E147ddc92e03A2f9818DbeDEDbAe56829df/actions — list available routes
GET /actions/{chain}/{vault}/{strategist} returns the full manifest of routes the strategist is permitted to call on the vault. Each key is a route (e.g. steakhouse/deposit); each value describes the route's params and any constraints on them.
curl -sS \
-H "Authorization: Bearer $VEDA_API_KEY" \
"$BASE/tx-builder/api/actions/$CHAIN/$VAULT/$STRATEGIST"Response (abridged — one route shown):
Use the manifest to see which routes exist for your strategist, what parameters each takes, and whether any parameters are correlated (when has_constraints is true, call /constraints/{route} for the valid combinations).
/execute — build a single action
POST /execute/{chain}/{vault}/{strategist}/{route} builds calldata for one route. The body carries the params for that route (matching the manifest returned by /actions) and an optional simulate_transaction flag.
Submitting the calldata onchain
The /execute response returns:
encoded_tx_data
Hex-encoded calldata (0x…) — the data field of your transaction.
target
The vault's Manager contract address — the to field of your transaction.
description
Human-readable description of what the calldata does.
simulation_status
true if Tenderly-simulated cleanly (when simulate_transaction: true).
tenderly_simulation_url
Link to inspect the sim in Tenderly.
Submit the transaction as:
Under the hood, encoded_tx_data is a call to ManagerWithMerkleVerification.manageVaultWithMerkleVerification on the vault's Manager, so decoding encoded_tx_data against that function's ABI shows you the exact targets / targetData / values the Manager will execute. Verify these match your intent before signing.
Submitting through an external wallet
msg.sender on the onchain transaction must equal strategist_address — the Manager reverts otherwise. In practice the strategist is a Safe, Fordefi vault, or other multisig — not an EOA. You don't broadcast this from a hot wallet; you hand the three fields (to, data, value) to your custody workflow:
Safe — propose a transaction with
to = target,data = encoded_tx_data,value = 0(Safe's Transaction Builder app accepts these directly), then execute once threshold is met.Fordefi — pass the same three fields to your Fordefi policy workflow.
Other custody — anywhere that accepts a raw contract call (to + data + value) can carry this.
See Transaction Builder → Concepts for the exact caller constraint and everything the Manager checks before accepting the call.
Full example — Kraken Advanced USDC on Ink
End-to-end walkthrough against a real vault. Save as veda-tx-builder-example.sh, export VEDA_API_KEY=..., and run it.
Full example — Balanced Yield USDC on Solana
Solana counterpart. Same three-step story — list actions, build one action, submit — with base58 addresses, a base64 v0 transaction as the return, and native RPC simulation instead of Tenderly. See Solana Transaction Builder for the endpoint-level walkthrough.
Last updated