|
8 | 8 | ValidationConfigLib |
9 | 9 | } from "@erc6900/reference-implementation/libraries/ValidationConfigLib.sol"; |
10 | 10 | import {PackedUserOperation} from "@eth-infinitism/account-abstraction/interfaces/PackedUserOperation.sol"; |
11 | | -import {MessageHashUtils} from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; |
12 | 11 | import {Vm} from "forge-std/Vm.sol"; |
13 | 12 |
|
14 | 13 | import {ModularAccountBase} from "../../src/account/ModularAccountBase.sol"; |
@@ -87,7 +86,7 @@ contract ModularAccountGasTest is ModularAccountBenchmarkBase("SemiModularAccoun |
87 | 86 | }); |
88 | 87 |
|
89 | 88 | bytes32 userOpHash = entryPoint.getUserOpHash(userOp); |
90 | | - (uint8 v, bytes32 r, bytes32 s) = vm.sign(owner1Key, MessageHashUtils.toEthSignedMessageHash(userOpHash)); |
| 89 | + (uint8 v, bytes32 r, bytes32 s) = vm.sign(owner1Key, userOpHash); |
91 | 90 | userOp.signature = _encodeSignature(abi.encodePacked(EOA_TYPE_SIGNATURE, r, s, v)); |
92 | 91 |
|
93 | 92 | uint256 gasUsed = _userOpBenchmark(userOp); |
@@ -146,7 +145,7 @@ contract ModularAccountGasTest is ModularAccountBenchmarkBase("SemiModularAccoun |
146 | 145 | }); |
147 | 146 |
|
148 | 147 | bytes32 userOpHash = entryPoint.getUserOpHash(userOp); |
149 | | - (uint8 v, bytes32 r, bytes32 s) = vm.sign(owner1Key, MessageHashUtils.toEthSignedMessageHash(userOpHash)); |
| 148 | + (uint8 v, bytes32 r, bytes32 s) = vm.sign(owner1Key, userOpHash); |
150 | 149 | userOp.signature = _encodeSignature(abi.encodePacked(EOA_TYPE_SIGNATURE, r, s, v)); |
151 | 150 |
|
152 | 151 | uint256 gasUsed = _userOpBenchmark(userOp); |
@@ -214,7 +213,7 @@ contract ModularAccountGasTest is ModularAccountBenchmarkBase("SemiModularAccoun |
214 | 213 | }); |
215 | 214 |
|
216 | 215 | bytes32 userOpHash = entryPoint.getUserOpHash(userOp); |
217 | | - (uint8 v, bytes32 r, bytes32 s) = vm.sign(owner1Key, MessageHashUtils.toEthSignedMessageHash(userOpHash)); |
| 216 | + (uint8 v, bytes32 r, bytes32 s) = vm.sign(owner1Key, userOpHash); |
218 | 217 | userOp.signature = _encodeSignature(abi.encodePacked(EOA_TYPE_SIGNATURE, r, s, v)); |
219 | 218 |
|
220 | 219 | uint256 gasUsed = _userOpBenchmark(userOp); |
@@ -250,7 +249,7 @@ contract ModularAccountGasTest is ModularAccountBenchmarkBase("SemiModularAccoun |
250 | 249 | }); |
251 | 250 |
|
252 | 251 | bytes32 userOpHash = entryPoint.getUserOpHash(userOp); |
253 | | - (uint8 v, bytes32 r, bytes32 s) = vm.sign(owner2Key, MessageHashUtils.toEthSignedMessageHash(userOpHash)); |
| 252 | + (uint8 v, bytes32 r, bytes32 s) = vm.sign(owner2Key, userOpHash); |
254 | 253 | bytes memory uoValidationSig = _packFinalSignature(abi.encodePacked(EOA_TYPE_SIGNATURE, r, s, v)); |
255 | 254 |
|
256 | 255 | ValidationConfig newUOValidation = |
@@ -322,7 +321,7 @@ contract ModularAccountGasTest is ModularAccountBenchmarkBase("SemiModularAccoun |
322 | 321 | }); |
323 | 322 |
|
324 | 323 | bytes32 userOpHash = entryPoint.getUserOpHash(userOp); |
325 | | - (uint8 v, bytes32 r, bytes32 s) = vm.sign(owner1Key, MessageHashUtils.toEthSignedMessageHash(userOpHash)); |
| 324 | + (uint8 v, bytes32 r, bytes32 s) = vm.sign(owner1Key, userOpHash); |
326 | 325 | userOp.signature = _encodeSignature(abi.encodePacked(EOA_TYPE_SIGNATURE, r, s, v)); |
327 | 326 |
|
328 | 327 | uint256 gasUsed = _userOpBenchmark(userOp); |
@@ -389,8 +388,7 @@ contract ModularAccountGasTest is ModularAccountBenchmarkBase("SemiModularAccoun |
389 | 388 | }); |
390 | 389 |
|
391 | 390 | bytes32 userOpHash = entryPoint.getUserOpHash(userOp); |
392 | | - (uint8 v, bytes32 r, bytes32 s) = |
393 | | - vm.sign(sessionSigner1Key, MessageHashUtils.toEthSignedMessageHash(userOpHash)); |
| 391 | + (uint8 v, bytes32 r, bytes32 s) = vm.sign(sessionSigner1Key, userOpHash); |
394 | 392 | userOp.signature = _encodeSignature(abi.encodePacked(EOA_TYPE_SIGNATURE, r, s, v)); |
395 | 393 |
|
396 | 394 | uint256 gasUsed = _userOpBenchmark(userOp); |
@@ -462,8 +460,7 @@ contract ModularAccountGasTest is ModularAccountBenchmarkBase("SemiModularAccoun |
462 | 460 | }); |
463 | 461 |
|
464 | 462 | bytes32 userOpHash = entryPoint.getUserOpHash(userOp); |
465 | | - (uint8 v, bytes32 r, bytes32 s) = |
466 | | - vm.sign(sessionSigner1Key, MessageHashUtils.toEthSignedMessageHash(userOpHash)); |
| 463 | + (uint8 v, bytes32 r, bytes32 s) = vm.sign(sessionSigner1Key, userOpHash); |
467 | 464 | userOp.signature = _encodeSignature(abi.encodePacked(EOA_TYPE_SIGNATURE, r, s, v)); |
468 | 465 |
|
469 | 466 | uint256 gasUsed = _userOpBenchmark(userOp); |
|
0 commit comments