Skip to content

feat(recurring): emit schedule and admin events - #1760

Closed
LeoSlrRf wants to merge 1 commit into
feat/req-429-remove-single-pathfrom
feat/req-429-events
Closed

feat(recurring): emit schedule and admin events#1760
LeoSlrRf wants to merge 1 commit into
feat/req-429-remove-single-pathfrom
feat/req-429-events

Conversation

@LeoSlrRf

@LeoSlrRf LeoSlrRf commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Add Events to ERC20RecurringPaymentProxy

Adds the following events to the ERC20RecurringPaymentProxy contract to improve on-chain observability:

  • PaymentTriggered — emitted when a payment is successfully executed, including the schedule key, subscriber, token, cycle index, and total payer amount
  • ScheduleCancelled — emitted when a subscriber cancels a schedule batch
  • CyclesAdmitted — emitted when a relayer admits cycles via bitmask
  • CyclesRevoked — emitted when a relayer revokes cycles via bitmask
  • FeeProxyUpdated — emitted when the fee proxy address is updated, including both the old and new proxy addresses

Tests have been updated to assert that each of these events is emitted with the correct arguments.

@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds recurring-payment lifecycle and administrative events without changing the underlying authorization or settlement flow.

  • Emits an aggregate event after successful recurring payments.
  • Emits events for schedule cancellation and cycle admission or revocation.
  • Records fee-proxy address changes.
  • Extends contract tests to assert each event payload.

Confidence Score: 4/5

The PR should not merge until the exported recurring-payment ABI is updated so package consumers can use the events this feature introduces.

The contract emits the new events correctly, but the package continues to export a versioned ABI containing none of them, making the public feature unavailable to artifact-based consumers.

Files Needing Attention: packages/smart-contracts/src/contracts/ERC20RecurringPaymentProxy.sol and packages/smart-contracts/src/lib/artifacts/ERC20RecurringPaymentProxy/0.1.0.json

Important Files Changed

Filename Overview
packages/smart-contracts/src/contracts/ERC20RecurringPaymentProxy.sol Adds five correctly positioned post-success events, but the new public ABI is not propagated to the package's exported versioned artifact.
packages/smart-contracts/test/contracts/ERC20RecurringPaymentProxy.test.ts Adds direct event-name and payload assertions for each newly emitted event.

Sequence Diagram

sequenceDiagram
  participant Caller
  participant RecurringProxy
  participant FeeProxy
  participant Listener
  Caller->>RecurringProxy: trigger/cancel/admin operation
  alt recurring payment
    RecurringProxy->>FeeProxy: settle payment legs
    FeeProxy-->>RecurringProxy: settlement succeeds
  else schedule or admin operation
    RecurringProxy->>RecurringProxy: update contract state
  end
  RecurringProxy-->>Listener: emit lifecycle/admin event
Loading

Reviews (1): Last reviewed commit: "feat(recurring): emit schedule and admin..." | Re-trigger Greptile

Comment on lines +61 to 75
event PaymentTriggered(
bytes32 indexed scheduleKey,
address indexed subscriber,
address token,
uint8 index,
uint256 payerTotal
);
event ScheduleCancelled(bytes32 indexed scheduleKey, address indexed subscriber);
event CyclesAdmitted(bytes32 indexed scheduleKey, uint256 mask);
event CyclesRevoked(bytes32 indexed scheduleKey, uint256 mask);
event FeeProxyUpdated(address indexed oldProxy, address indexed newProxy);

IERC20FeeProxy public erc20FeeProxy;

struct Leg {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Events missing from exported ABI

When consumers use erc20RecurringPaymentProxyArtifact to subscribe to or decode these events, the artifact still loads an ABI containing none of the five new definitions, causing the package's public contract interface to omit this feature. Update or version the exported recurring-payment artifact alongside the Solidity ABI change.

Knowledge Base Used: Smart contracts and deployments

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Abi exported in a PR up the graphite stack

@LeoSlrRf LeoSlrRf closed this Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant