feat(recurring): emit schedule and admin events - #1760
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Greptile SummaryAdds recurring-payment lifecycle and administrative events without changing the underlying authorization or settlement flow.
Confidence Score: 4/5The 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
Sequence DiagramsequenceDiagram
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
Reviews (1): Last reviewed commit: "feat(recurring): emit schedule and admin..." | Re-trigger Greptile |
| 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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Abi exported in a PR up the graphite stack

Add Events to ERC20RecurringPaymentProxy
Adds the following events to the
ERC20RecurringPaymentProxycontract to improve on-chain observability:PaymentTriggered— emitted when a payment is successfully executed, including the schedule key, subscriber, token, cycle index, and total payer amountScheduleCancelled— emitted when a subscriber cancels a schedule batchCyclesAdmitted— emitted when a relayer admits cycles via bitmaskCyclesRevoked— emitted when a relayer revokes cycles via bitmaskFeeProxyUpdated— emitted when the fee proxy address is updated, including both the old and new proxy addressesTests have been updated to assert that each of these events is emitted with the correct arguments.