Skip to content

Commit

Permalink
Making config public
Browse files Browse the repository at this point in the history
  • Loading branch information
shahafn committed Jan 31, 2024
1 parent 0766b38 commit 13cb536
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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
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 13cb536

Please sign in to comment.