docs: publish a contract event schema reference (#578) - #628
Closed
ZacLou wants to merge 3 commits into
Closed
Conversation
added 3 commits
August 29, 2026 08:55
…LitCodes#557) - services/api.ts now imports apiUrl from security/env.ts instead of reading EXPO_PUBLIC_API_BASE_URL directly - EXPO_PUBLIC_API_BASE_URL is fully removed from the codebase - security/env.ts: corrected dev rpcUrl default from 8545 (EVM port) to 8000 (Soroban RPC port) - validateEnv() now provides detailed warnings in development when env vars are missing or still using defaults - validateEnv() is called at app start in app/_layout.tsx - Added apps/mobile/.env.example documenting EXPO_PUBLIC_APP_ENV, EXPO_PUBLIC_API_URL, and EXPO_PUBLIC_RPC_URL Closes StayLitCodes#557
…tCodes#579) Created docs/ENVIRONMENT.md listing every env var per service (backend, frontend, mobile, onchain deployment) with: - Variable name, owning service, required/optional, secret flag, default - Conflict & duplicate register (EXPO_PUBLIC_API_BASE_URL vs EXPO_PUBLIC_API_URL, NEXT_PUBLIC_API_BASE_URL vs NEXT_PUBLIC_API_URL, API_BASE_URL) - Cross-service variables that must agree (API URL, Stellar network, Soroban RPC, contract ID) - Quick start examples for each service Closes StayLitCodes#579
Created docs/contract/EVENTS.md documenting: - Three-part topic convention (Vaultix, v1, EventName) - EVENT_NAMESPACE and EVENT_SCHEMA_VERSION constants - All 16 emitted events with topic tuples, payload structs, and field types - Entrypoint mapping and state transitions for each event - Events that deviate from the typed-struct pattern (SignatureCollected, MultisigConfigured, ContractUpgraded) flagged for convergence - State transition graph showing legal EscrowStatus transitions - Schema version bump strategy for consumers Linked from docs/contract/README.md. Closes StayLitCodes#578
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Fixes #578 — creates
docs/contract/EVENTS.mddocumenting every event emitted by the Vaultix escrow contract.What's in the doc
Topic convention
Documents the three-part topic tuple
(Vaultix, <schema_version>, <event_name>)and whereEVENT_NAMESPACE(line 454) andEVENT_SCHEMA_VERSION(line 455) are defined inlib.rs.All 16 emitted events documented
Each event is listed with:
Events covered:
EscrowCreated,EscrowCreatedBatch,FundsDeposited,SignatureCollected,MilestoneReleased,DeliveryConfirmed,DisputeRaised,DisputeResolved,EscrowCancelled,EscrowCompleted,EscrowExpiredRefundedContractUpgraded,AdminProposed,AdminProposalCancelled,RoleUpdated,FeeUpdated,PausedToggled,MultisigConfiguredDeviation flags
Events that deviate from the typed-struct pattern (
SignatureCollected,MultisigConfigured,ContractUpgraded) are explicitly flagged so the doc and code can converge in a future schema version.State transition graph
ASCII diagram showing all legal
EscrowStatustransitions and which event is emitted at each transition.Schema version bump strategy
Explains how consumers should handle a schema version bump, including backward compatibility and migration guidance.
Cross-references
Linked from
docs/contract/README.mdand cross-referenced withDATA_MODELS.md,ERRORS.md,WORKFLOWS.md, andDEPLOYMENT.md.Acceptance Criteria Checklist
docs/contract/EVENTS.mddocuments the three-part topic convention(Vaultix, <schema version>, <event name>)and whereEVENT_SCHEMA_VERSIONis defineddocs/contract/README.mdCloses #578