Overview
⚠️ Depends on: #40 (GF-07 — VaultRouter: Full Implementation) — all 8 contracts must be complete before deployment scripts can be written or executed.
Write Soroban CLI deployment scripts for all 8 YieldLadder contracts and execute the testnet deployment so that deployments/testnet.json contains real addresses.
Problem
Both deployment files contain placeholder values:
deployments/testnet.json: all addresses are "CC_PENDING_TESTNET", deployedAt is "pending"
deployments/mainnet.json: all addresses are empty strings, deployedAt is null
No deployment scripts exist anywhere in the repo. The .env.example defines all required env vars (VAULT_ROUTER_ADDRESS, etc.) but there is no automated way to populate them.
Without deployed testnet addresses, the SDK (GF-08 / #41) and the data service layer (GF-12 / #44) cannot be wired to real contracts.
Proposed Solution
1. Create scripts/deploy.sh
A bash script that deploys all 8 contracts in dependency order using the Soroban CLI:
shared → vault_flex → vault_l3 → vault_l6 → vault_l12 → strategy_vault → harvester → governance → vault_router
For each contract, deploy with the Stellar CLI and capture the contract ID:
CONTRACT_ID=$(stellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/CONTRACT_NAME.wasm \
--source DEPLOYER_KEY \
--network $NETWORK)
echo "CONTRACT_NAME: $CONTRACT_ID"
After deploying, call the initialize function on each contract passing the correct addresses (e.g. VaultRouter needs the addresses of all tier vaults).
2. Create scripts/populate-env.sh
After deployment, write the contract addresses to a .env file in the correct format, populating all vars from .env.example.
3. Update deployments/testnet.json
After running the testnet deployment, update this file with real contract addresses and the deployment timestamp.
4. Add stellar.toml
Create a stellar.toml in the project root documenting the deployed contracts for Stellar ecosystem tooling.
5. Document the deployment process in CONTRIBUTING.md
Add a section explaining how to run scripts/deploy.sh locally against testnet.
Acceptance Criteria
Overview
Write Soroban CLI deployment scripts for all 8 YieldLadder contracts and execute the testnet deployment so that
deployments/testnet.jsoncontains real addresses.Problem
Both deployment files contain placeholder values:
deployments/testnet.json: all addresses are"CC_PENDING_TESTNET",deployedAtis"pending"deployments/mainnet.json: all addresses are empty strings,deployedAtisnullNo deployment scripts exist anywhere in the repo. The
.env.exampledefines all required env vars (VAULT_ROUTER_ADDRESS, etc.) but there is no automated way to populate them.Without deployed testnet addresses, the SDK (GF-08 / #41) and the data service layer (GF-12 / #44) cannot be wired to real contracts.
Proposed Solution
1. Create
scripts/deploy.shA bash script that deploys all 8 contracts in dependency order using the Soroban CLI:
For each contract, deploy with the Stellar CLI and capture the contract ID:
After deploying, call the
initializefunction on each contract passing the correct addresses (e.g. VaultRouter needs the addresses of all tier vaults).2. Create
scripts/populate-env.shAfter deployment, write the contract addresses to a
.envfile in the correct format, populating all vars from.env.example.3. Update
deployments/testnet.jsonAfter running the testnet deployment, update this file with real contract addresses and the deployment timestamp.
4. Add
stellar.tomlCreate a
stellar.tomlin the project root documenting the deployed contracts for Stellar ecosystem tooling.5. Document the deployment process in
CONTRIBUTING.mdAdd a section explaining how to run
scripts/deploy.shlocally against testnet.Acceptance Criteria
scripts/deploy.shdeploys all 8 contracts to Stellar testnet in the correct dependency orderinitializefunction is called automatically by the script with the correct addressesdeployments/testnet.jsonis updated with real contract addresses and adeployedAttimestamp.env.examplevars are all populated byscripts/populate-env.shstellar.tomlcreated with contract addresses and network informationCONTRIBUTING.mdVaultRouter.position) after deployment