Skip to content

Deploy score-registry Soroban contract to Stellar testnet #16

Description

@Cbiux

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/attestationPOST /api/user/{wallet}/attest (requires JWT + signed message).


Acceptance criteria

  • Contract deployed; interface_version() returns 1
  • GET /api/contracts/config shows enabled: true in prod
  • Oracle can set_score for a test wallet; get_score matches DB score
  • Dapp attestation page submits tx and shows txHash link
  • Document contract ID and deploy steps in Contracts/README.md

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSPart of the GrantFox OSS programMaybe RewardedThis issue may receive a reward or bountyOfficial CampaignPart of an official ZCore campaignenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions