Skip to content

feat(recurring-payment): contract deployment - #1767

Open
LeoSlrRf wants to merge 2 commits into
feat/req-429-lib-admit-revokefrom
feat/erc20-recurring-payment-deployment
Open

feat(recurring-payment): contract deployment#1767
LeoSlrRf wants to merge 2 commits into
feat/req-429-lib-admit-revokefrom
feat/erc20-recurring-payment-deployment

Conversation

@LeoSlrRf

@LeoSlrRf LeoSlrRf commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Promote ERC20RecurringPaymentProxy v0.2.0 as default with Sepolia deployment

Deploys ERC20RecurringPaymentProxy v0.2.0 to Sepolia at 0xD7b1553ffE25491377a505f97f92cc44427D80A0 and promotes it to the default artifact version.

Version resolution

A resolveRecurringPaymentProxyVersion helper is introduced so that functions like getRecurringPaymentProxyAddress, connectRecurringPaymentProxy, and getPayerRecurringPaymentAllowance automatically select 0.2.0 on networks where it is deployed, and fall back to 0.1.0 elsewhere. Callers that explicitly need v1 (e.g. encodeRecurringPaymentTrigger and triggerRecurringPayment) now pass RECURRING_PROXY_V1 directly.

Constructor args

The ERC20RecurringPaymentProxy v0.2.0 deployment script now resolves the admin address from the Safe admin artifact when available, falling back to the RECURRING_PAYMENT_ADMIN_ADDRESS environment variable for networks where no Safe is registered.

Tests

  • Updated existing tests to pass version: RECURRING_PROXY_V1 explicitly where v1 behaviour is expected.
  • Added a fallback test asserting that omitting the version on a network without a v0.2.0 deployment returns the v0.1.0 address.
  • Updated the artifact test to assert that the default ABI exposes triggerRecurringPaymentBatch (v0.2.0) and that v0.1.0 still exposes triggerRecurringPayment.

Copy link
Copy Markdown
Contributor Author

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.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@greptile-apps

greptile-apps Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR promotes ERC20RecurringPaymentProxy v0.2.0 as the default artifact, registers its Sepolia deployment, and preserves v0.1.0 behavior where required.

  • Resolves omitted proxy versions according to deployment availability.
  • Pins legacy trigger operations to v0.1.0.
  • Uses the registered Safe admin when available and the environment-configured admin otherwise.
  • Updates recurring-payment and artifact tests for the new defaults.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
packages/payment-processor/src/payment/erc20-recurring-payment-proxy.ts Adds deployment-aware default version resolution and explicitly retains v0.1.0 for legacy trigger calls.
packages/smart-contracts/scripts-create2/constructor-args.ts Selects a registered Safe as recurring-payment admin and falls back to the configured environment address when no Safe deployment exists.
packages/smart-contracts/src/lib/artifacts/ERC20RecurringPaymentProxy/index.ts Registers the Sepolia v0.2.0 deployment and promotes that ABI as the artifact default.
packages/payment-processor/test/payment/erc-20-recurring-payment.test.ts Pins tests requiring legacy behavior to v0.1.0 and verifies fallback on networks without v0.2.0.
packages/smart-contracts/test/lib/artifact.test.ts Verifies the promoted ABI, retained legacy ABI, and Sepolia deployment metadata.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Recurring-payment helper] --> B{Version explicitly supplied?}
  B -->|Yes| C[Use requested version]
  B -->|No| D{v0.2.0 deployed on network?}
  D -->|Yes| E[Use v0.2.0]
  D -->|No| F[Use v0.1.0]
  C --> G[Resolve ABI and deployment]
  E --> G
  F --> G
Loading

Reviews (3): Last reviewed commit: "fix(recurring-payment): fall back to 0.1..." | Re-trigger Greptile

Comment thread packages/smart-contracts/scripts-create2/constructor-args.ts Outdated

Copy link
Copy Markdown
Contributor Author

@greptileai

Comment thread packages/smart-contracts/scripts-create2/constructor-args.ts

Copy link
Copy Markdown
Contributor Author

@greptileai

@LeoSlrRf
LeoSlrRf marked this pull request as ready for review August 26, 2026 10:27
@LeoSlrRf
LeoSlrRf requested review from a team, aimen74 and rodrigopavezi and removed request for a team August 26, 2026 10:27
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.

2 participants