Skip to content

[Contract] Emit structured events for all state transitions #5

Open

Description

@Gbangbolaoluwagbemiga

Overview

The contract emits no events. Off-chain indexers and frontend real-time updates require structured contract events.

Events to implement

Event Trigger
`EscrowCreated` `create_escrow`
`WorkStarted` `start_work`
`MilestoneSubmitted` `submit_milestone`
`MilestoneApproved` `approve_milestone`
`MilestoneRejected` `reject_milestone`
`DisputeRaised` dispute path
`DisputeResolved` admin resolve
`EscrowCompleted` final approval
`EscrowRefunded` refund paths
`FreelancerRated` `rate_freelancer`

Use `env.events().publish()` with `contracttype` derive for ABI export.

Good first issue: Start with `EscrowCreated` only and open a draft PR.

Activity

  1. added
    enhancementNew feature or improvement
    good first issueAccessible to verified senior contributors new to this codebase
    contractSoroban / Rust smart contract work
    grant-criticalCompleting this directly unblocks the GrantFox application
    on May 18, 2026
  2. Gbangbolaoluwagbemiga commented on Jun 17, 2026

    @Gbangbolaoluwagbemiga
    ContributorAuthor

    Review finding: 0 events().publish calls exist today. Needed for the indexer (#39), frontend real-time updates (#9), and a verifiable dispute audit trail.

  3. Ranjeet2063 commented on Oct 2, 2026

    @Ranjeet2063

    Hello maintainers,

    I would like to take on and implement this issue: [Contract] Emit structured events for all state transitions.

    Technical Implementation Roadmap:

    1. Formal Soroban Invariant Design: Audit storage layout (Instance, Persistent, Temporary) with strict TTL management and explicit require_auth guards.
    2. Core Rust WASM Implementation: Implement deterministic state transition handlers eliminating arithmetic overflow risks using checked/saturating math.
    3. Hermetic Testing Suite: Build comprehensive test cases in tests/ asserting authorized vs unauthorized invocations, mock auth environments, and edge value bounds.
    4. Gas & Footprint Optimization: Profile CPU/memory instruction budgets under Soroban host environment to ensure optimal runtime efficiency.

    I have worked extensively on similar architectures and can deliver this cleanly within 24 hours. Please assign to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    contractSoroban / Rust smart contract workenhancementNew feature or improvementgood first issueAccessible to verified senior contributors new to this codebasegrant-criticalCompleting this directly unblocks the GrantFox application

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions