Skip to content

refactor(recurring): pack schedule state into one mapping - #1762

Closed
LeoSlrRf wants to merge 1 commit into
feat/req-429-access-controlfrom
feat/req-429-pack-schedule-state
Closed

refactor(recurring): pack schedule state into one mapping#1762
LeoSlrRf wants to merge 1 commit into
feat/req-429-access-controlfrom
feat/req-429-pack-schedule-state

Conversation

@LeoSlrRf

Copy link
Copy Markdown
Contributor

Description of the changes

@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR consolidates recurring-payment replay, admission, ordering, and cancellation data into one keyed ScheduleState structure while preserving the existing individual getter interfaces.

  • Replaces four schedule-state mappings with one struct-backed mapping.
  • Routes schedule validation and updates through a shared storage reference.
  • Retains compatibility getters for each former public mapping.

Confidence Score: 5/5

The PR appears safe to merge because the packed state remains isolated by schedule key and the existing external getter contracts are preserved.

The changed trigger and cancellation paths consistently use storage derived from the same schedule key, while all four former mapping getters retain their original signatures and scalar results.

Important Files Changed

Filename Overview
packages/smart-contracts/src/contracts/ERC20RecurringPaymentProxy.sol Consolidates four schedule mappings into one struct-backed mapping and mechanically preserves schedule-specific validation, mutation, and legacy getter behavior.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  K[Schedule key] --> S[ScheduleState]
  S --> B[Payment bitmap]
  S --> A[Admitted cycles]
  S --> I[Last payment index]
  S --> C[Cancellation flag]
  S --> V[Validation and state updates]
Loading

Reviews (1): Last reviewed commit: "refactor(recurring): pack schedule state..." | Re-trigger Greptile

@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