feat(recurring): add 0.2.0 types and batch trigger helpers - #1764
feat(recurring): add 0.2.0 types and batch trigger helpers#1764LeoSlrRf wants to merge 1 commit into
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 SummaryThis PR adds the shared 0.2.0 recurring-schedule permit types and helpers for encoding and submitting batch triggers. The encoding contract is aligned with the 0.2.0 ABI, but direct submission currently cannot resolve a deployed 0.2.0 proxy.
Confidence Score: 4/5The PR should not merge as a usable batch-trigger feature until a 0.2.0 deployment can be resolved or the unavailable submission helper is withheld. The calldata and shared types align with the contract, but every call to the new submission helper fails during address lookup because the selected 0.2.0 artifact has no network deployments. Files Needing Attention: packages/payment-processor/src/payment/erc20-recurring-payment-proxy.ts Important Files Changed
Sequence DiagramsequenceDiagram
participant App
participant Helper as triggerRecurringPaymentBatch
participant Artifact as ContractArtifact
participant Signer
App->>Helper: trigger permit batch
Helper->>Artifact: getAddress(network, "0.2.0")
Artifact-->>Helper: throw No deployment for network
Note over Helper,Signer: sendTransaction is never reached
Reviews (1): Last reviewed commit: "feat(recurring): add 0.2.0 types and bat..." | Re-trigger Greptile |
| signer: Signer; | ||
| network: CurrencyTypes.EvmChainName; | ||
| }): Promise<providers.TransactionResponse> { | ||
| const proxyAddress = getRecurringPaymentProxyAddress(network, RECURRING_PROXY_V2); |
There was a problem hiding this comment.
When triggerRecurringPaymentBatch is called with any supported network, it unconditionally resolves version 0.2.0, whose artifact has an empty deployment map, so address lookup throws No deployment for network: <network> before sendTransaction and the new submission helper cannot trigger a payment.
Knowledge Base Used:

Add ERC20 Recurring Payment Proxy v0.2.0 Support
Introduces support for the
0.2.0version of theERC20RecurringPaymentProxy, which introduces batch-based recurring payment scheduling viatriggerRecurringPaymentBatch.Changes
encodeRecurringPaymentTriggerBatchto encodetriggerRecurringPaymentBatchcalldata using the0.2.0ABI without requiring a deployed proxy address.triggerRecurringPaymentBatchto send atriggerRecurringPaymentBatchtransaction to the0.2.0proxy.versionparameter togetRecurringPaymentProxyAddress,encodeSetRecurringAllowance, andgetPayerRecurringPaymentAllowanceto allow callers to target a specific artifact version.SchedulePermitBatchandSchedulePermitLegtypes representing the0.2.0permit structure, along withSCHEDULE_PERMIT_BATCH_EIP712_TYPEScontaining the EIP-712 type definitions with field order matching the contract.getRecurringPaymentProxyInterfaceandconnectRecurringPaymentProxyto reduce duplication when resolving versioned artifacts.0.2.0functions, including encoding validation, address resolution, transaction dispatch, and error handling.