Skip to content

recurring-payment: create_recurring, pause_payment, resume_payment, and cancel_payment emit no events #856

Description

@gboigwe

Summary

Only execute_payment emits an event in recurring-payment; the entire lifecycle-management side of the contract (creation, pausing, resuming, cancellation) is silent off-chain.

Location

contracts/recurring-payment/src/lib.rs: create_recurring (~70), pause_payment (~211), resume_payment (~242), cancel_payment (~281) — none emit events; only execute_payment (~137) does.

Problem

An off-chain system tracking a user's recurring payments (a subscription dashboard, for instance) has no way to know when a subscription was created, paused, resumed, or cancelled without polling get_payment for every payment ID of interest — only the periodic execution itself is observable.

Impact

Medium-high: this covers the majority of the contract's state machine (4 of 5 state-mutating functions), including the two most user-facing actions (creating and cancelling a recurring payment).

Acceptance Criteria

  • create_recurring, pause_payment, resume_payment, and cancel_payment each emit an event capturing the relevant payment ID and new state
  • cargo test -p pulsar-recurring-payment passes

Suggested Approach

Mirror execute_payment's existing event-emission structure for the other four functions.

Activity

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

    contractsSoroban smart contractsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions