Skip to content

Commit

Permalink
Merge branch 'develop' into no-revert-on-no-prefund
Browse files Browse the repository at this point in the history
  • Loading branch information
drortirosh committed Feb 8, 2024
2 parents 5cdd5ec + 626af49 commit 7d5a64e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion contracts/samples/TokenPaymaster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ contract TokenPaymaster is BasePaymaster, UniswapHelper, OracleHelper {
/// @notice All 'price' variables are multiplied by this value to avoid rounding up
uint256 private constant PRICE_DENOMINATOR = 1e26;

TokenPaymasterConfig private tokenPaymasterConfig;
TokenPaymasterConfig public tokenPaymasterConfig;

/// @notice Initializes the TokenPaymaster contract with the given parameters.
/// @param _token The ERC20 token used for transaction fee payments.
Expand Down
4 changes: 2 additions & 2 deletions reports/gas-checker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ token paymaster with diff │ 2 │ │ 66349 │ 37370 ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ token paymaster │ 10 │ 726158 │ │ ║
║ token paymaster │ 10 │ 726134 │ │ ║
╟────────────────────────────────┼───────┼───────────────┼────────────────┼─────────────────────╢
║ token paymaster with diff │ 11 │ │ 6636937390
║ token paymaster with diff │ 11 │ │ 6641737438
╚════════════════════════════════╧═══════╧═══════════════╧════════════════╧═════════════════════╝

3 changes: 2 additions & 1 deletion test/samples/TokenPaymaster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,12 @@ describe('TokenPaymaster', function () {

it('paymaster should reject if postOpGaSLimit is too low', async () => {
const snapshot = await ethers.provider.send('evm_snapshot', [])
const config = await paymaster.tokenPaymasterConfig()
let op = await fillUserOp({
sender: account.address,
paymaster: paymasterAddress,
paymasterVerificationGasLimit: 3e5,
paymasterPostOpGasLimit: 4000, // too low
paymasterPostOpGasLimit: config.refundPostopCost - 1, // too low
callData
}, entryPoint)
op = signUserOp(op, accountOwner, entryPoint.address, chainId)
Expand Down

0 comments on commit 7d5a64e

Please sign in to comment.