- Rust +
wasm32-unknown-unknowntarget:rustup target add wasm32-unknown-unknown - Stellar CLI: https://developers.stellar.org/docs/tools/developer-tools/cli/install-stellar-cli
- A funded Stellar keypair for deployment
cp .env.example .env
# Fill in DEPLOYER_SECRET, ADMIN_ADDRESS, XLM_TOKEN_ADDRESSchmod +x scripts/deploy.sh
./scripts/deploy.sh testnet
# Contract IDs written to .env.contractschmod +x scripts/initialize.sh
./scripts/initialize.sh testnet
# Sets admin, fee config, and wires verification → progress cross-contract linkchmod +x scripts/generate-bindings.sh
./scripts/generate-bindings.sh testnet
# Bindings written to bindings/{contract}/chmod +x testnet/seed.sh
./testnet/seed.shCopy migrations/001_initial_schema.sql to your backend repo and run it against PostgreSQL:
psql $DATABASE_URL -f migrations/001_initial_schema.sql- Audit all four contracts
- Replace testnet XLM token address with mainnet address in
.env - Set
STELLAR_NETWORK=mainnetand update RPC/Horizon URLs - Run
./scripts/deploy.sh mainnet - Run
./scripts/initialize.sh mainnet - Verify all contract IDs in
.env.contracts - Regenerate bindings:
./scripts/generate-bindings.sh mainnet
Milestones approved but player levels don't advance
You skipped the cross-contract wiring step. approve_milestone calls advance_level on the progress contract, but only if the link has been set. Fix it by running:
./scripts/initialize.sh testnetOr manually:
stellar contract invoke --id $VERIFICATION_CONTRACT_ID \
-- set_progress_contract \
--progress_contract $PROGRESS_CONTRACT_IDThis must be done once after every fresh deployment.