FleetTreasuryPaymaster — whitelisted contract destinations#102
Open
Douglasacost wants to merge 2 commits intomainfrom
Open
FleetTreasuryPaymaster — whitelisted contract destinations#102Douglasacost wants to merge 2 commits intomainfrom
Douglasacost wants to merge 2 commits intomainfrom
Conversation
…nd validation improvements - Introduced `isWhitelistedContract` mapping to manage allowed destinations for gas sponsorship. - Added functions to add and remove whitelisted contracts, with checks to prevent removal of `fleetIdentity`. - Updated validation logic in `_validateAndPayGeneralFlow` to accommodate new contract whitelist. - Enhanced documentation in the swarm specification to reflect these changes. - Added tests for whitelisted contract functionality and validation scenarios.
LCOV of commit
|
aliXsed
reviewed
Mar 27, 2026
aliXsed
reviewed
Mar 27, 2026
aliXsed
reviewed
Mar 27, 2026
aliXsed
reviewed
Mar 27, 2026
- Introduced `BondTreasuryPaymaster` for managing gas sponsorship and bond consumption for whitelisted contracts. - Implemented functions for adding/removing whitelisted users and contracts, with appropriate access control. - Enhanced validation logic for sponsored bond consumption and gas payments. - Updated swarm specification documentation to reflect the new paymaster. - Added comprehensive tests for the new paymaster functionality, including validation and access control scenarios.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Extends
FleetTreasuryPaymasterso gas sponsorship is not limited tofleetIdentityonly: allowedtoaddresses are tracked inisWhitelistedContract.fleetIdentityis seeded at deploy and cannot be removed. Documentation and tests are updated accordingly.Sponsors need to pay gas for user transactions targeting other protocol contracts (for example
SwarmRegistryUniversal) while keeping the same user whitelist and ETH balance checks, without deploying a separateWhitelistPaymaster.isWhitelistedContractmapping to manage allowed destinations for gas sponsorship.fleetIdentity._validateAndPayGeneralFlowto accommodate new contract whitelist.