Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes https://linear.app/decent-labs/issue/ENG-147/gasless-voting-paymaster-contract
Depends on #137, so if you're here for a review, please review that one first.
DecentPaymaster Implementation for Account Abstraction Gasless Voting
This PR implements a paymaster contract that enables DAOs to subsidize specific function calls on whitelisted strategy contracts. The implementation follows EIP-4337 (Account Abstraction) standards and provides a flexible way for DAOs to manage which functions they want to sponsor.
Key Features
Custom BasePaymaster Implementation
BasePaymaster.sol
instead of using the one from@account-abstraction/contracts
ModuleProxyFactory
initializer
patternOwnable
implementation to use OZ's upgradeable variantStrategy Function Whitelisting
ERC165 Support
IPaymaster
and customIDecentPaymaster
interfacesRobust Validation
Technical Details
ModuleProxyFactory
for deploying minimal proxies of a master copysetUp
pattern instead of constructorsArchitectural Decisions
Proxy Pattern
setUp
function instead of constructorsOpenZeppelin Compatibility
Deployment Strategy
Security Considerations
Testing
The implementation includes extensive tests covering:
Dependencies
@account-abstraction/contracts
v0.7.0 (for interfaces only)