- Rust (latest stable)
- Stellar CLI v22+
- wasm32-unknown-unknown target
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Add WASM target
rustup target add wasm32-unknown-unknown
# Install Stellar CLI
cargo install --locked stellar-cli# Build all contracts in the workspace
stellar contract build
# Or build individually
cd contracts/ajo-pool && stellar contract build
# Run all tests
cargo test
# Run tests for a specific contract
cargo test -p ajo-poolstellar network add testnet \
--rpc-url https://soroban-testnet.stellar.org:443 \
--network-passphrase "Test SDF Network ; September 2015"stellar keys generate deployer --network testnet
stellar keys address deployerstellar keys fund deployer --network testnet# Deploy Factory
stellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/ajo_factory.wasm \
--source deployer \
--network testnet
# Deploy Pool (template for factory to use)
stellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/ajo_pool.wasm \
--source deployer \
--network testnet
# Deploy supporting contracts similarly...stellar contract invoke \
--id <FACTORY_CONTRACT_ID> \
--source deployer \
--network testnet \
-- initialize \
--admin <DEPLOYER_ADDRESS> \
--pool_wasm_hash <POOL_WASM_HASH> \
--default_fee_bps 50# Generate bindings for frontend integration
stellar contract bindings typescript \
--wasm target/wasm32-unknown-unknown/release/ajo_pool.wasm \
--output-dir frontend/src/lib/contracts/ajo-pool \
--contract-id <POOL_CONTRACT_ID> \
--network testnet
⚠️ Before mainnet deployment:
- Complete a professional security audit
- Run comprehensive fuzz tests
- Verify all collateral ratios
- Test governance timelock flows end-to-end
- Ensure backend indexer is fully operational
Follow the same steps as testnet, replacing testnet with mainnet and using the mainnet RPC URL.