forked from rhinestonewtf/erc4337-validation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSimulatorV060.t.sol
29 lines (23 loc) · 849 Bytes
/
SimulatorV060.t.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
import { TestBaseUtil, UserOperation } from "test/utils/TestBaseUtilV060.sol";
import { MockValidator } from "test/utils/MockValidator.sol";
contract SimulatorTest is TestBaseUtil {
MockValidator internal validator;
function setUp() public override {
// Set up base test util
super.setUp();
// Set up validator
validator = new MockValidator();
}
function testSimulate() public {
// Set up userOp
UserOperation memory userOp = getDefaultUserOp();
(address account, bytes memory initCode) = getAccountAndInitCode(0);
userOp.initCode = initCode;
userOp.sender = account;
userOp.signature = abi.encode(address(validator), bytes(""));
// Simulate
simulateUserOp(userOp);
}
}