Skip to content

Mock Soroban score-registry for local integration tests #39

Description

@Cbiux

Summary

Build a mock Soroban score-registry contract for local integration tests so gatekeeper (#28) and server attestation flows can be tested without testnet deploy (#16).


Background

Contract tests exist in Rust #[test], but Server soroban.service.ts and future gatekeeper consumers need a deployable mock returning configurable scores for CI.


Deliverables

Directory: Contracts/mock-score-registry/

Function Behavior
init() No admin auth required in mock
set_mock_score(wallet, score, tier) Anyone can set (test only)
get_score(wallet) Returns configured mock
interface_version() Returns 1

Server test helper:

// Server/src/test-helpers/mock-soroban.ts
export function withMockContractId(id: string): void

CI: Optional stellar contract build job for mock contract


Acceptance criteria

  • Mock contract builds with stellar contract build
  • README with local deploy instructions
  • Server integration test reads mock score via RPC (testnet or local sandbox)
  • Clearly marked TEST ONLY — never deploy to mainnet
  • Referenced from Contracts/interfaces/README.md

Related


Out of scope

  • Production registry migration
  • WASM size optimization

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