Repository navigation
Description
Description
This issue aims to address the implementation of Structured Contract Events with Indexed Topics across Escrow, Reputation & Loyalty.
The core objective is to: Publish a consistent, documented event on every state-changing contract operation, with topics chosen so an off-chain indexer can filter by appointment, worker, or address without scanning every ledger.
By completing this feature, we will ensure that the GuildWorkman protocol maintains its high standards for security, usability, and decentralized logic. This issue requires careful attention to the Smart Contract architecture and adherence to the existing project conventions.
When picking up this issue, please ensure you document any new dependencies or architectural decisions made during development.
Component
Smart Contracts (Soroban)
Difficulty
🟡 Medium
Current state
None of the three contracts publishes a single event — grep -rn "events()" contracts/*/src/lib.rs returns nothing. Escrow funding, completion, cancellation, dispute, reputation submission, and loyalty mint/transfer/burn all mutate state invisibly.
That directly blocks the on-chain ingestion pipeline in #22, which has nothing to ingest, and it means the only way to learn a contract's state today is to poll get_appointment for every id the backend already knows about. Events are the small change that unblocks the larger one.
Tasks
- Review the existing Soroban workspace under
soroban-contracts/contracts/ - Implement the contract logic for: Structured Contract Events with Indexed Topics across Escrow, Reputation & Loyalty
- Publish an event from every state-changing entry point in
escrow(create, confirm, cancel, dispute, resolve),reputation(review submitted), andloyalty-token(mint, transfer, burn, approve, minter rotation) - Choose topic tuples deliberately so an indexer can filter by
appointment_id, worker address, or account without a full scan — document the topic layout per event - Follow SEP-41 conventions for the loyalty token's events so standard tooling recognizes them
- Keep event payloads small and typed; do not emit unbounded
Stringdata - Document the full event catalogue (name, topics, data shape) in the contracts README so the backend indexer in On-Chain Event Ingestion Pipeline with Transactional Outbox & Replay #22 can be written against a stable contract
- Write comprehensive unit and integration tests, including adversarial edge cases — assert emitted events via the test env's event recorder, and assert that failed operations emit nothing
- Add caching for cargo dependencies in CI
- Run
cargo fmt --checkandcargo clippy -- -D warnings - Run
cargo testandsoroban contract buildto verify the optimized WASM build
Acceptance Criteria
- Feature accurately implements the objective: Publish a consistent, documented event on every state-changing contract operation, with topics chosen so an off-chain indexer can filter by appointment, worker, or address without scanning every ledger.
- Every state-changing entry point across all three contracts emits exactly one event
- An operation that fails and returns an
Erroremits no event - Topic layout supports filtering by appointment id and by address, demonstrated in tests
- The event catalogue is documented and stable enough for On-Chain Event Ingestion Pipeline with Transactional Outbox & Replay #22 to be implemented against it
- Any PR that introduces compiler or clippy warnings is automatically blocked
- Contract logic is covered by tests exercising success, failure, and attack paths
- Storage layout and authorization are documented and reviewed for safety
- Code is properly reviewed and approved by codeowners
Estimated Time
1-2 days
Activity
grantfox-oss commentedon Aug 19, 2026
🦊 GrantFox — @Chigybillionz has been assigned to this issue as part of the Third Campaign campaign!
Next steps:
Closes #45)Good luck! Track your progress on GrantFox.
Meet-hybrid commentedon Aug 20, 2026
I would like to contribute to this issue. I have experience with JavaScript/TypeScript, React, backend APIs, testing, Git, and software architecture. I will follow the acceptance criteria, add tests, and provide a focused pull request.
rexx010 commentedon Aug 28, 2026
Hi, I’m interested in this issue. I’d implement structured Soroban events across the three contracts with deliberate indexed topics for appointment IDs and addresses, follow SEP-41 conventions for loyalty events, and add tests covering successful and failed operations while documenting the event catalogue for the indexer.
Chigybillionz commentedon Aug 28, 2026
@meshackyaro good day, I open PR for this issue. I did not hear any feedback, what's going on?
Thank you
grantfox-oss commentedon Aug 29, 2026
🦊 GrantFox — @rexx010 has been assigned to this issue as part of the Third Campaign campaign!
Next steps:
Closes #45)Good luck! Track your progress on GrantFox.
grantfox-oss commentedon Aug 30, 2026
🎉 This issue has been marked as completed on GrantFox!
@Chigybillionz's PR #49 was approved and merged by @meshackyaro.
🏆 @Chigybillionz: You earned 40 FoxPoints for this contribution! Your current tier: Builder (2,955 total points). Track your full progress on GrantFox.
👏 Great work, @Chigybillionz! Keep contributing to workman-labs.