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
Related
Out of scope
- Production registry migration
- WASM size optimization
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 Serversoroban.service.tsand future gatekeeper consumers need a deployable mock returning configurable scores for CI.Deliverables
Directory:
Contracts/mock-score-registry/init()set_mock_score(wallet, score, tier)get_score(wallet)interface_version()Server test helper:
CI: Optional
stellar contract buildjob for mock contractAcceptance criteria
stellar contract buildContracts/interfaces/README.mdRelated
Out of scope