Skip to content

Commit

Permalink
chore: move userOpMaxCost to bottom and remove initialisation on init…
Browse files Browse the repository at this point in the history
…ialize
  • Loading branch information
fedealconada committed Jan 30, 2024
1 parent 2e9fb4c commit ba2a561
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/paymasters/SponsorPaymaster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ contract SponsorPaymaster is Initializable, BasePaymaster, UUPSUpgradeable, Reen
uint256 public constant RATE_LIMIT_PERIOD = 1 minutes;
uint256 public constant RATE_LIMIT_THRESHOLD_TOTAL = 50;

uint256 public userOpMaxCost;
IKintoAppRegistry public override appRegistry;

mapping(address => uint256) public balances;
Expand All @@ -45,6 +44,8 @@ contract SponsorPaymaster is Initializable, BasePaymaster, UUPSUpgradeable, Reen
// rate limit across apps: user => RateLimitData
mapping(address => ISponsorPaymaster.RateLimitData) public globalRateLimit;

uint256 public userOpMaxCost;

// ========== Events ============

event AppRegistrySet(address oldRegistry, address newRegistry);
Expand All @@ -65,7 +66,6 @@ contract SponsorPaymaster is Initializable, BasePaymaster, UUPSUpgradeable, Reen
__UUPSUpgradeable_init();
_transferOwnership(_owner);

userOpMaxCost = 0.03 ether;
// unlocks owner
unlockBlock[_owner] = block.number;
}
Expand Down
3 changes: 3 additions & 0 deletions test/helpers/AATestScaffolding.sol
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ abstract contract AATestScaffolding is KYCSignature {
// Set the registry in the paymaster
_paymaster.setAppRegistry(address(_kintoAppRegistry));

// Set user op max cost
_paymaster.setUserOpMaxCost(0.03 ether);

vm.stopPrank();
}

Expand Down

0 comments on commit ba2a561

Please sign in to comment.