Skip to content

Add quota-controlled ERC-20 fee paymaster - #127

Merged
aliXsed merged 1 commit into
mainfrom
feat/erc20-fee-paymaster
Jul 31, 2026
Merged

Add quota-controlled ERC-20 fee paymaster#127
aliXsed merged 1 commit into
mainfrom
feat/erc20-fee-paymaster

Conversation

@aliXsed

@aliXsed aliXsed commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds ERC20FeePaymaster: ApprovalBased-only paymaster so users can pay zkSync gas in a single ERC-20 fee token (NODL)
  • Off-chain erc20-fee-signer EIP-712-signs fee approvals; inner input shape matches ZyFi (expirationTime, signature)
  • Caps periodic ETH spend to the bootloader via existing QuotaControl (plus 15-minute max approval TTL)

Companion backend: NodleCode/erc20-fee-signer · Tracking: meta#193

Test plan

  • forge test --match-contract ERC20FeePaymasterTest
  • Review EIP-712 domain / FeeApproval typehash against what erc20-fee-signer will implement
  • Confirm initial ETH quota / period values for staging deploy (out of scope here)

Made with Cursor

ApprovalBased paymaster verified by EIP-712 fee-signer signatures, with
periodic ETH spend capped via QuotaControl for erc20-fee-signer.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown

LCOV of commit 356c735 during checks #757

Summary coverage rate:
  lines......: 26.5% (939 of 3550 lines)
  functions..: 27.0% (150 of 555 functions)
  branches...: 27.1% (164 of 605 branches)

Files changed coverage rate:
                                                    |Lines       |Functions  |Branches    
  Filename                                          |Rate     Num|Rate    Num|Rate     Num
  ========================================================================================
  src/paymasters/ERC20FeePaymaster.sol              | 0.0%     54| 0.0%     7| 0.0%     13
  test/paymasters/ERC20FeePaymaster.t.sol           | 0.0%      2| 0.0%     1|    -      0

@aliXsed
aliXsed merged commit 5caa74b into main Jul 31, 2026
3 checks passed
@aliXsed
aliXsed deleted the feat/erc20-fee-paymaster branch July 31, 2026 01:41
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