Summary
Deploy the score-registry Soroban contract to Stellar testnet and configure the API to read/attest on-chain scores.
Contract source exists at Contracts/score-registry/. Server integration exists in Server/src/services/soroban.service.ts but GET /api/contracts/config returns { enabled: false } in prod.
Prerequisites
- Stellar testnet account funded with XLM
stellar CLI installed
- Oracle keypair for
set_score (store as ORACLE_SECRET_KEY — never commit)
Steps
1. Build and deploy contract
cd Contracts/score-registry
stellar contract build
stellar contract deploy \
--wasm target/wasm32v1-none/release/score_registry.wasm \
--source-account ORACLE_KEY \
--network testnet
stellar contract invoke --id <CONTRACT_ID> -- init --admin ORACLE_G...
2. Configure Vercel (zcore-api)
SCORE_REGISTRY_CONTRACT_ID=C...
ORACLE_SECRET_KEY=S...
STELLAR_NETWORK=testnet
SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
3. Verify
curl https://zcore-api.vercel.app/api/contracts/config
# { enabled: true, contractId: "C...", network: "testnet" }
curl https://zcore-api.vercel.app/api/user/G.../on-chain
# score record after attestation
Attestation flow: dapp /dashboard/attestation → POST /api/user/{wallet}/attest (requires JWT + signed message).
Acceptance criteria
Related
Summary
Deploy the score-registry Soroban contract to Stellar testnet and configure the API to read/attest on-chain scores.
Contract source exists at
Contracts/score-registry/. Server integration exists inServer/src/services/soroban.service.tsbutGET /api/contracts/configreturns{ enabled: false }in prod.Prerequisites
stellarCLI installedset_score(store asORACLE_SECRET_KEY— never commit)Steps
1. Build and deploy contract
2. Configure Vercel (zcore-api)
3. Verify
Attestation flow: dapp
/dashboard/attestation→POST /api/user/{wallet}/attest(requires JWT + signed message).Acceptance criteria
interface_version()returns 1GET /api/contracts/configshowsenabled: truein prodset_scorefor a test wallet;get_scorematches DB scoreContracts/README.mdRelated
Contracts/mock-score-registry/(Mock Soroban score-registry for local integration tests #39 closed)Contracts/interfaces/README.md