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
Suggested Approach
Mirror execute_payment's existing event-emission structure for the other four functions.
Summary
Only
execute_paymentemits 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; onlyexecute_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_paymentfor 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, andcancel_paymenteach emit an event capturing the relevant payment ID and new statecargo test -p pulsar-recurring-paymentpassesSuggested Approach
Mirror
execute_payment's existing event-emission structure for the other four functions.