diff --git a/contracts/account/paymaster/PaymasterCore.sol b/contracts/account/paymaster/PaymasterCore.sol index 2ff20165..3732558d 100644 --- a/contracts/account/paymaster/PaymasterCore.sol +++ b/contracts/account/paymaster/PaymasterCore.sol @@ -4,7 +4,6 @@ pragma solidity ^0.8.20; import {ERC4337Utils} from "@openzeppelin/contracts/account/utils/draft-ERC4337Utils.sol"; import {IEntryPoint, IPaymaster, PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol"; -import {ERC4337Utils} from "@openzeppelin/contracts/account/utils/draft-ERC4337Utils.sol"; /** * @dev A simple ERC4337 paymaster implementation. This base implementation only includes the minimal logic to validate diff --git a/contracts/account/paymaster/PaymasterSigner.sol b/contracts/account/paymaster/PaymasterSigner.sol index 7524a5a5..e3be4c33 100644 --- a/contracts/account/paymaster/PaymasterSigner.sol +++ b/contracts/account/paymaster/PaymasterSigner.sol @@ -2,10 +2,8 @@ pragma solidity ^0.8.20; -import {PackedUserOperation} from "@openzeppelin/contracts/interfaces/draft-IERC4337.sol"; -import {ERC4337Utils} from "@openzeppelin/contracts/account/utils/draft-ERC4337Utils.sol"; +import {ERC4337Utils, PackedUserOperation} from "@openzeppelin/contracts/account/utils/draft-ERC4337Utils.sol"; import {EIP712} from "@openzeppelin/contracts/utils/cryptography/EIP712.sol"; -import {Calldata} from "@openzeppelin/contracts/utils/Calldata.sol"; import {PaymasterCore} from "./PaymasterCore.sol"; import {AbstractSigner} from "../../utils/cryptography/AbstractSigner.sol"; @@ -26,7 +24,7 @@ import {AbstractSigner} from "../../utils/cryptography/AbstractSigner.sol"; abstract contract PaymasterSigner is AbstractSigner, EIP712, PaymasterCore { using ERC4337Utils for *; - bytes32 internal constant _USER_OPERATION_REQUEST = + bytes32 private constant USER_OPERATION_REQUEST_TYPEHASH = keccak256( "UserOperationRequest(address sender,uint256 nonce,bytes initCode,bytes callData,bytes32 accountGasLimits,uint256 preVerificationGas,bytes32 gasFees,uint256 paymasterVerificationGasLimit,uint256 paymasterPostOpGasLimit,uint48 validAfter,uint48 validUntil)" ); @@ -45,7 +43,7 @@ abstract contract PaymasterSigner is AbstractSigner, EIP712, PaymasterCore { _hashTypedDataV4( keccak256( abi.encode( - _USER_OPERATION_REQUEST, + USER_OPERATION_REQUEST_TYPEHASH, userOp.sender, userOp.nonce, keccak256(userOp.initCode),