@godzillaba/mutest 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +1 -1
  2. package/index.ts +23 -6
  3. package/package.json +4 -1
  4. package/.devcontainer/Dockerfile +0 -117
  5. package/.devcontainer/devcontainer.json +0 -62
  6. package/.devcontainer/init-firewall.sh +0 -118
  7. package/.github/workflows/test.yml +0 -38
  8. package/.gitmodules +0 -3
  9. package/CLAUDE.md +0 -39
  10. package/foundry.lock +0 -8
  11. package/foundry.toml +0 -6
  12. package/lib/forge-std/.gitattributes +0 -1
  13. package/lib/forge-std/.github/CODEOWNERS +0 -1
  14. package/lib/forge-std/.github/dependabot.yml +0 -6
  15. package/lib/forge-std/.github/workflows/ci.yml +0 -125
  16. package/lib/forge-std/.github/workflows/sync.yml +0 -36
  17. package/lib/forge-std/CONTRIBUTING.md +0 -193
  18. package/lib/forge-std/LICENSE-APACHE +0 -203
  19. package/lib/forge-std/LICENSE-MIT +0 -25
  20. package/lib/forge-std/README.md +0 -314
  21. package/lib/forge-std/RELEASE_CHECKLIST.md +0 -12
  22. package/lib/forge-std/foundry.toml +0 -18
  23. package/lib/forge-std/package.json +0 -16
  24. package/lib/forge-std/scripts/vm.py +0 -636
  25. package/lib/forge-std/src/Base.sol +0 -48
  26. package/lib/forge-std/src/Config.sol +0 -60
  27. package/lib/forge-std/src/LibVariable.sol +0 -477
  28. package/lib/forge-std/src/Script.sol +0 -28
  29. package/lib/forge-std/src/StdAssertions.sol +0 -779
  30. package/lib/forge-std/src/StdChains.sol +0 -303
  31. package/lib/forge-std/src/StdCheats.sol +0 -825
  32. package/lib/forge-std/src/StdConfig.sol +0 -632
  33. package/lib/forge-std/src/StdConstants.sol +0 -30
  34. package/lib/forge-std/src/StdError.sol +0 -15
  35. package/lib/forge-std/src/StdInvariant.sol +0 -140
  36. package/lib/forge-std/src/StdJson.sol +0 -275
  37. package/lib/forge-std/src/StdMath.sol +0 -47
  38. package/lib/forge-std/src/StdStorage.sol +0 -475
  39. package/lib/forge-std/src/StdStyle.sol +0 -333
  40. package/lib/forge-std/src/StdToml.sol +0 -275
  41. package/lib/forge-std/src/StdUtils.sol +0 -200
  42. package/lib/forge-std/src/Test.sol +0 -32
  43. package/lib/forge-std/src/Vm.sol +0 -2533
  44. package/lib/forge-std/src/console.sol +0 -1551
  45. package/lib/forge-std/src/console2.sol +0 -4
  46. package/lib/forge-std/src/interfaces/IERC1155.sol +0 -105
  47. package/lib/forge-std/src/interfaces/IERC165.sol +0 -12
  48. package/lib/forge-std/src/interfaces/IERC20.sol +0 -43
  49. package/lib/forge-std/src/interfaces/IERC4626.sol +0 -190
  50. package/lib/forge-std/src/interfaces/IERC6909.sol +0 -72
  51. package/lib/forge-std/src/interfaces/IERC721.sol +0 -164
  52. package/lib/forge-std/src/interfaces/IERC7540.sol +0 -144
  53. package/lib/forge-std/src/interfaces/IERC7575.sol +0 -241
  54. package/lib/forge-std/src/interfaces/IMulticall3.sol +0 -68
  55. package/lib/forge-std/src/safeconsole.sol +0 -13248
  56. package/lib/forge-std/test/CommonBase.t.sol +0 -44
  57. package/lib/forge-std/test/Config.t.sol +0 -381
  58. package/lib/forge-std/test/LibVariable.t.sol +0 -452
  59. package/lib/forge-std/test/StdAssertions.t.sol +0 -141
  60. package/lib/forge-std/test/StdChains.t.sol +0 -227
  61. package/lib/forge-std/test/StdCheats.t.sol +0 -638
  62. package/lib/forge-std/test/StdConstants.t.sol +0 -38
  63. package/lib/forge-std/test/StdError.t.sol +0 -119
  64. package/lib/forge-std/test/StdJson.t.sol +0 -49
  65. package/lib/forge-std/test/StdMath.t.sol +0 -202
  66. package/lib/forge-std/test/StdStorage.t.sol +0 -485
  67. package/lib/forge-std/test/StdStyle.t.sol +0 -110
  68. package/lib/forge-std/test/StdToml.t.sol +0 -49
  69. package/lib/forge-std/test/StdUtils.t.sol +0 -342
  70. package/lib/forge-std/test/Vm.t.sol +0 -18
  71. package/lib/forge-std/test/compilation/CompilationScript.sol +0 -8
  72. package/lib/forge-std/test/compilation/CompilationScriptBase.sol +0 -8
  73. package/lib/forge-std/test/compilation/CompilationTest.sol +0 -8
  74. package/lib/forge-std/test/compilation/CompilationTestBase.sol +0 -8
  75. package/lib/forge-std/test/fixtures/broadcast.log.json +0 -187
  76. package/lib/forge-std/test/fixtures/config.toml +0 -81
  77. package/lib/forge-std/test/fixtures/test.json +0 -8
  78. package/lib/forge-std/test/fixtures/test.toml +0 -6
  79. package/script/Counter.s.sol +0 -19
  80. package/src/Counter.sol +0 -14
  81. package/test/Counter.t.sol +0 -24
@@ -1,342 +0,0 @@
1
- // SPDX-License-Identifier: MIT OR Apache-2.0
2
- pragma solidity >=0.8.13 <0.9.0;
3
-
4
- import {Test, StdUtils} from "../src/Test.sol";
5
-
6
- contract StdUtilsMock is StdUtils {
7
- // We deploy a mock version so we can properly test expected reverts.
8
- function exposedGetTokenBalances(address token, address[] memory addresses)
9
- external
10
- returns (uint256[] memory balances)
11
- {
12
- return getTokenBalances(token, addresses);
13
- }
14
-
15
- function exposedBound(int256 num, int256 min, int256 max) external pure returns (int256) {
16
- return bound(num, min, max);
17
- }
18
-
19
- function exposedBound(uint256 num, uint256 min, uint256 max) external pure returns (uint256) {
20
- return bound(num, min, max);
21
- }
22
-
23
- function exposedBytesToUint(bytes memory b) external pure returns (uint256) {
24
- return bytesToUint(b);
25
- }
26
- }
27
-
28
- contract StdUtilsTest is Test {
29
- /*//////////////////////////////////////////////////////////////////////////
30
- BOUND UINT
31
- //////////////////////////////////////////////////////////////////////////*/
32
-
33
- function test_Bound() public pure {
34
- assertEq(bound(uint256(5), 0, 4), 0);
35
- assertEq(bound(uint256(0), 69, 69), 69);
36
- assertEq(bound(uint256(0), 68, 69), 68);
37
- assertEq(bound(uint256(10), 150, 190), 174);
38
- assertEq(bound(uint256(300), 2800, 3200), 3107);
39
- assertEq(bound(uint256(9999), 1337, 6666), 4669);
40
- }
41
-
42
- function test_Bound_WithinRange() public pure {
43
- assertEq(bound(uint256(51), 50, 150), 51);
44
- assertEq(bound(uint256(51), 50, 150), bound(bound(uint256(51), 50, 150), 50, 150));
45
- assertEq(bound(uint256(149), 50, 150), 149);
46
- assertEq(bound(uint256(149), 50, 150), bound(bound(uint256(149), 50, 150), 50, 150));
47
- }
48
-
49
- function test_Bound_EdgeCoverage() public pure {
50
- assertEq(bound(uint256(0), 50, 150), 50);
51
- assertEq(bound(uint256(1), 50, 150), 51);
52
- assertEq(bound(uint256(2), 50, 150), 52);
53
- assertEq(bound(uint256(3), 50, 150), 53);
54
- assertEq(bound(type(uint256).max, 50, 150), 150);
55
- assertEq(bound(type(uint256).max - 1, 50, 150), 149);
56
- assertEq(bound(type(uint256).max - 2, 50, 150), 148);
57
- assertEq(bound(type(uint256).max - 3, 50, 150), 147);
58
- }
59
-
60
- function testFuzz_Bound_DistributionIsEven(uint256 min, uint256 size) public pure {
61
- size = size % 100 + 1;
62
- min = bound(min, UINT256_MAX / 2, UINT256_MAX / 2 + size);
63
- uint256 max = min + size - 1;
64
- uint256 result;
65
-
66
- for (uint256 i = 1; i <= size * 4; ++i) {
67
- // x > max
68
- result = bound(max + i, min, max);
69
- assertEq(result, min + (i - 1) % size);
70
- // x < min
71
- result = bound(min - i, min, max);
72
- assertEq(result, max - (i - 1) % size);
73
- }
74
- }
75
-
76
- function testFuzz_Bound(uint256 num, uint256 min, uint256 max) public pure {
77
- if (min > max) (min, max) = (max, min);
78
-
79
- uint256 result = bound(num, min, max);
80
-
81
- assertGe(result, min);
82
- assertLe(result, max);
83
- assertEq(result, bound(result, min, max));
84
- if (num >= min && num <= max) assertEq(result, num);
85
- }
86
-
87
- function test_BoundUint256Max() public pure {
88
- assertEq(bound(0, type(uint256).max - 1, type(uint256).max), type(uint256).max - 1);
89
- assertEq(bound(1, type(uint256).max - 1, type(uint256).max), type(uint256).max);
90
- }
91
-
92
- function test_RevertIf_BoundMaxLessThanMin() public {
93
- // We deploy a mock version so we can properly test the revert.
94
- StdUtilsMock stdUtils = new StdUtilsMock();
95
-
96
- vm.expectRevert(bytes("StdUtils bound(uint256,uint256,uint256): Max is less than min."));
97
- stdUtils.exposedBound(uint256(5), 100, 10);
98
- }
99
-
100
- function testFuzz_RevertIf_BoundMaxLessThanMin(uint256 num, uint256 min, uint256 max) public {
101
- // We deploy a mock version so we can properly test the revert.
102
- StdUtilsMock stdUtils = new StdUtilsMock();
103
-
104
- vm.assume(min > max);
105
- vm.expectRevert(bytes("StdUtils bound(uint256,uint256,uint256): Max is less than min."));
106
- stdUtils.exposedBound(num, min, max);
107
- }
108
-
109
- /*//////////////////////////////////////////////////////////////////////////
110
- BOUND INT
111
- //////////////////////////////////////////////////////////////////////////*/
112
-
113
- function test_BoundInt() public pure {
114
- assertEq(bound(-3, 0, 4), 2);
115
- assertEq(bound(0, -69, -69), -69);
116
- assertEq(bound(0, -69, -68), -68);
117
- assertEq(bound(-10, 150, 190), 154);
118
- assertEq(bound(-300, 2800, 3200), 2908);
119
- assertEq(bound(9999, -1337, 6666), 1995);
120
- }
121
-
122
- function test_BoundInt_WithinRange() public pure {
123
- assertEq(bound(51, -50, 150), 51);
124
- assertEq(bound(51, -50, 150), bound(bound(51, -50, 150), -50, 150));
125
- assertEq(bound(149, -50, 150), 149);
126
- assertEq(bound(149, -50, 150), bound(bound(149, -50, 150), -50, 150));
127
- }
128
-
129
- function test_BoundInt_EdgeCoverage() public pure {
130
- assertEq(bound(type(int256).min, -50, 150), -50);
131
- assertEq(bound(type(int256).min + 1, -50, 150), -49);
132
- assertEq(bound(type(int256).min + 2, -50, 150), -48);
133
- assertEq(bound(type(int256).min + 3, -50, 150), -47);
134
- assertEq(bound(type(int256).min, 10, 150), 10);
135
- assertEq(bound(type(int256).min + 1, 10, 150), 11);
136
- assertEq(bound(type(int256).min + 2, 10, 150), 12);
137
- assertEq(bound(type(int256).min + 3, 10, 150), 13);
138
-
139
- assertEq(bound(type(int256).max, -50, 150), 150);
140
- assertEq(bound(type(int256).max - 1, -50, 150), 149);
141
- assertEq(bound(type(int256).max - 2, -50, 150), 148);
142
- assertEq(bound(type(int256).max - 3, -50, 150), 147);
143
- assertEq(bound(type(int256).max, -50, -10), -10);
144
- assertEq(bound(type(int256).max - 1, -50, -10), -11);
145
- assertEq(bound(type(int256).max - 2, -50, -10), -12);
146
- assertEq(bound(type(int256).max - 3, -50, -10), -13);
147
- }
148
-
149
- function testFuzz_BoundInt_DistributionIsEven(int256 min, uint256 size) public pure {
150
- size = size % 100 + 1;
151
- min = bound(min, -int256(size / 2), int256(size - size / 2));
152
- int256 max = min + int256(size) - 1;
153
- int256 result;
154
-
155
- for (uint256 i = 1; i <= size * 4; ++i) {
156
- // x > max
157
- result = bound(max + int256(i), min, max);
158
- assertEq(result, min + int256((i - 1) % size));
159
- // x < min
160
- result = bound(min - int256(i), min, max);
161
- assertEq(result, max - int256((i - 1) % size));
162
- }
163
- }
164
-
165
- function testFuzz_BoundInt(int256 num, int256 min, int256 max) public pure {
166
- if (min > max) (min, max) = (max, min);
167
-
168
- int256 result = bound(num, min, max);
169
-
170
- assertGe(result, min);
171
- assertLe(result, max);
172
- assertEq(result, bound(result, min, max));
173
- if (num >= min && num <= max) assertEq(result, num);
174
- }
175
-
176
- function test_BoundIntInt256Max() public pure {
177
- assertEq(bound(0, type(int256).max - 1, type(int256).max), type(int256).max - 1);
178
- assertEq(bound(1, type(int256).max - 1, type(int256).max), type(int256).max);
179
- }
180
-
181
- function test_BoundIntInt256Min() public pure {
182
- assertEq(bound(0, type(int256).min, type(int256).min + 1), type(int256).min);
183
- assertEq(bound(1, type(int256).min, type(int256).min + 1), type(int256).min + 1);
184
- }
185
-
186
- function test_RevertIf_BoundIntMaxLessThanMin() public {
187
- // We deploy a mock version so we can properly test the revert.
188
- StdUtilsMock stdUtils = new StdUtilsMock();
189
-
190
- vm.expectRevert(bytes("StdUtils bound(int256,int256,int256): Max is less than min."));
191
- stdUtils.exposedBound(-5, 100, 10);
192
- }
193
-
194
- function testFuzz_RevertIf_BoundIntMaxLessThanMin(int256 num, int256 min, int256 max) public {
195
- // We deploy a mock version so we can properly test the revert.
196
- StdUtilsMock stdUtils = new StdUtilsMock();
197
-
198
- vm.assume(min > max);
199
- vm.expectRevert(bytes("StdUtils bound(int256,int256,int256): Max is less than min."));
200
- stdUtils.exposedBound(num, min, max);
201
- }
202
-
203
- /*//////////////////////////////////////////////////////////////////////////
204
- BOUND PRIVATE KEY
205
- //////////////////////////////////////////////////////////////////////////*/
206
-
207
- function test_BoundPrivateKey() public pure {
208
- assertEq(boundPrivateKey(0), 1);
209
- assertEq(boundPrivateKey(1), 1);
210
- assertEq(boundPrivateKey(300), 300);
211
- assertEq(boundPrivateKey(9999), 9999);
212
- assertEq(boundPrivateKey(SECP256K1_ORDER - 1), SECP256K1_ORDER - 1);
213
- assertEq(boundPrivateKey(SECP256K1_ORDER), 1);
214
- assertEq(boundPrivateKey(SECP256K1_ORDER + 1), 2);
215
- assertEq(boundPrivateKey(UINT256_MAX), UINT256_MAX & SECP256K1_ORDER - 1); // x&y is equivalent to x-x%y
216
- }
217
-
218
- /*//////////////////////////////////////////////////////////////////////////
219
- BYTES TO UINT
220
- //////////////////////////////////////////////////////////////////////////*/
221
-
222
- function test_BytesToUint() external pure {
223
- bytes memory maxUint = hex"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";
224
- bytes memory two = hex"02";
225
- bytes memory millionEther = hex"d3c21bcecceda1000000";
226
-
227
- assertEq(bytesToUint(maxUint), type(uint256).max);
228
- assertEq(bytesToUint(two), 2);
229
- assertEq(bytesToUint(millionEther), 1_000_000 ether);
230
- }
231
-
232
- function test_RevertIf_BytesLengthExceeds32() external {
233
- // We deploy a mock version so we can properly test the revert.
234
- StdUtilsMock stdUtils = new StdUtilsMock();
235
-
236
- bytes memory thirty3Bytes = hex"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";
237
- vm.expectRevert("StdUtils bytesToUint(bytes): Bytes length exceeds 32.");
238
- stdUtils.exposedBytesToUint(thirty3Bytes);
239
- }
240
-
241
- /*//////////////////////////////////////////////////////////////////////////
242
- COMPUTE CREATE ADDRESS
243
- //////////////////////////////////////////////////////////////////////////*/
244
-
245
- function test_ComputeCreateAddress() external pure {
246
- address deployer = 0x6C9FC64A53c1b71FB3f9Af64d1ae3A4931A5f4E9;
247
- uint256 nonce = 14;
248
- address createAddress = computeCreateAddress(deployer, nonce);
249
- assertEq(createAddress, 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45);
250
- }
251
-
252
- /*//////////////////////////////////////////////////////////////////////////
253
- COMPUTE CREATE2 ADDRESS
254
- //////////////////////////////////////////////////////////////////////////*/
255
-
256
- function test_ComputeCreate2Address() external pure {
257
- bytes32 salt = bytes32(uint256(31415));
258
- bytes32 initcodeHash = keccak256(abi.encode(0x6080));
259
- address deployer = 0x6C9FC64A53c1b71FB3f9Af64d1ae3A4931A5f4E9;
260
- address create2Address = computeCreate2Address(salt, initcodeHash, deployer);
261
- assertEq(create2Address, 0xB147a5d25748fda14b463EB04B111027C290f4d3);
262
- }
263
-
264
- function test_ComputeCreate2AddressWithDefaultDeployer() external pure {
265
- bytes32 salt = 0xc290c670fde54e5ef686f9132cbc8711e76a98f0333a438a92daa442c71403c0;
266
- bytes32 initcodeHash = hashInitCode(hex"6080", "");
267
- assertEq(initcodeHash, 0x1a578b7a4b0b5755db6d121b4118d4bc68fe170dca840c59bc922f14175a76b0);
268
- address create2Address = computeCreate2Address(salt, initcodeHash);
269
- assertEq(create2Address, 0xc0ffEe2198a06235aAbFffe5Db0CacF1717f5Ac6);
270
- }
271
- }
272
-
273
- contract StdUtilsForkTest is Test {
274
- /*//////////////////////////////////////////////////////////////////////////
275
- GET TOKEN BALANCES
276
- //////////////////////////////////////////////////////////////////////////*/
277
-
278
- address internal SHIB = 0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE;
279
- address internal SHIB_HOLDER_0 = 0x855F5981e831D83e6A4b4EBFCAdAa68D92333170;
280
- address internal SHIB_HOLDER_1 = 0x8F509A90c2e47779cA408Fe00d7A72e359229AdA;
281
- address internal SHIB_HOLDER_2 = 0x0e3bbc0D04fF62211F71f3e4C45d82ad76224385;
282
-
283
- address internal USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
284
- address internal USDC_HOLDER_0 = 0xDa9CE944a37d218c3302F6B82a094844C6ECEb17;
285
- address internal USDC_HOLDER_1 = 0x3e67F4721E6d1c41a015f645eFa37BEd854fcf52;
286
-
287
- function setUp() public {
288
- // All tests of the `getTokenBalances` method are fork tests using live contracts.
289
- vm.createSelectFork({urlOrAlias: "mainnet", blockNumber: 16_428_900});
290
- }
291
-
292
- function test_RevertIf_CannotGetTokenBalances_NonTokenContract() external {
293
- // We deploy a mock version so we can properly test the revert.
294
- StdUtilsMock stdUtils = new StdUtilsMock();
295
-
296
- // The UniswapV2Factory contract has neither a `balanceOf` function nor a fallback function,
297
- // so the `balanceOf` call should revert.
298
- address token = address(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
299
- address[] memory addresses = new address[](1);
300
- addresses[0] = USDC_HOLDER_0;
301
-
302
- vm.expectRevert("Multicall3: call failed");
303
- stdUtils.exposedGetTokenBalances(token, addresses);
304
- }
305
-
306
- function test_RevertIf_CannotGetTokenBalances_EOA() external {
307
- // We deploy a mock version so we can properly test the revert.
308
- StdUtilsMock stdUtils = new StdUtilsMock();
309
-
310
- address eoa = vm.addr({privateKey: 1});
311
- address[] memory addresses = new address[](1);
312
- addresses[0] = USDC_HOLDER_0;
313
- vm.expectRevert("StdUtils getTokenBalances(address,address[]): Token address is not a contract.");
314
- stdUtils.exposedGetTokenBalances(eoa, addresses);
315
- }
316
-
317
- function test_GetTokenBalances_Empty() external {
318
- address[] memory addresses = new address[](0);
319
- uint256[] memory balances = getTokenBalances(USDC, addresses);
320
- assertEq(balances.length, 0);
321
- }
322
-
323
- function test_GetTokenBalances_USDC() external {
324
- address[] memory addresses = new address[](2);
325
- addresses[0] = USDC_HOLDER_0;
326
- addresses[1] = USDC_HOLDER_1;
327
- uint256[] memory balances = getTokenBalances(USDC, addresses);
328
- assertEq(balances[0], 159_000_000_000_000);
329
- assertEq(balances[1], 131_350_000_000_000);
330
- }
331
-
332
- function test_GetTokenBalances_SHIB() external {
333
- address[] memory addresses = new address[](3);
334
- addresses[0] = SHIB_HOLDER_0;
335
- addresses[1] = SHIB_HOLDER_1;
336
- addresses[2] = SHIB_HOLDER_2;
337
- uint256[] memory balances = getTokenBalances(SHIB, addresses);
338
- assertEq(balances[0], 3_323_256_285_484.42e18);
339
- assertEq(balances[1], 1_271_702_771_149.99999928e18);
340
- assertEq(balances[2], 606_357_106_247e18);
341
- }
342
- }
@@ -1,18 +0,0 @@
1
- // SPDX-License-Identifier: MIT OR Apache-2.0
2
- pragma solidity >=0.8.13 <0.9.0;
3
-
4
- import {Test} from "../src/Test.sol";
5
- import {Vm, VmSafe} from "../src/Vm.sol";
6
-
7
- // These tests ensure that functions are never accidentally removed from a Vm interface, or
8
- // inadvertently moved between Vm and VmSafe. These tests must be updated each time a function is
9
- // added to or removed from Vm or VmSafe.
10
- contract VmTest is Test {
11
- function test_VmInterfaceId() public pure {
12
- assertEq(type(Vm).interfaceId, bytes4(0x7c08f084), "Vm");
13
- }
14
-
15
- function test_VmSafeInterfaceId() public pure {
16
- assertEq(type(VmSafe).interfaceId, bytes4(0x42a4e20e), "VmSafe");
17
- }
18
- }
@@ -1,8 +0,0 @@
1
- // SPDX-License-Identifier: MIT OR Apache-2.0
2
- pragma solidity >=0.8.13 <0.9.0;
3
-
4
- import {Script} from "../../src/Script.sol";
5
-
6
- // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing
7
- // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207
8
- contract CompilationScript is Script {}
@@ -1,8 +0,0 @@
1
- // SPDX-License-Identifier: MIT OR Apache-2.0
2
- pragma solidity >=0.8.13 <0.9.0;
3
-
4
- import {ScriptBase} from "../../src/Script.sol";
5
-
6
- // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing
7
- // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207
8
- contract CompilationScriptBase is ScriptBase {}
@@ -1,8 +0,0 @@
1
- // SPDX-License-Identifier: MIT OR Apache-2.0
2
- pragma solidity >=0.8.13 <0.9.0;
3
-
4
- import {Test} from "../../src/Test.sol";
5
-
6
- // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing
7
- // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207
8
- contract CompilationTest is Test {}
@@ -1,8 +0,0 @@
1
- // SPDX-License-Identifier: MIT OR Apache-2.0
2
- pragma solidity >=0.8.13 <0.9.0;
3
-
4
- import {TestBase} from "../../src/Test.sol";
5
-
6
- // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing
7
- // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207
8
- contract CompilationTestBase is TestBase {}
@@ -1,187 +0,0 @@
1
- {
2
- "transactions": [
3
- {
4
- "hash": "0xc6006863c267735a11476b7f15b15bc718e117e2da114a2be815dd651e1a509f",
5
- "type": "CALL",
6
- "contractName": "Test",
7
- "contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
8
- "function": "multiple_arguments(uint256,address,uint256[]):(uint256)",
9
- "arguments": ["1", "0000000000000000000000000000000000001337", "[3,4]"],
10
- "tx": {
11
- "type": "0x02",
12
- "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
13
- "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
14
- "gas": "0x73b9",
15
- "value": "0x0",
16
- "data": "0x23e99187000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000013370000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004",
17
- "nonce": "0x3",
18
- "accessList": []
19
- }
20
- },
21
- {
22
- "hash": "0xedf2b38d8d896519a947a1acf720f859bb35c0c5ecb8dd7511995b67b9853298",
23
- "type": "CALL",
24
- "contractName": "Test",
25
- "contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
26
- "function": "inc():(uint256)",
27
- "arguments": [],
28
- "tx": {
29
- "type": "0x02",
30
- "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
31
- "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
32
- "gas": "0xdcb2",
33
- "value": "0x0",
34
- "data": "0x371303c0",
35
- "nonce": "0x4",
36
- "accessList": []
37
- }
38
- },
39
- {
40
- "hash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c",
41
- "type": "CALL",
42
- "contractName": "Test",
43
- "contractAddress": "0x7c6b4bbe207d642d98d5c537142d85209e585087",
44
- "function": "t(uint256):(uint256)",
45
- "arguments": ["1"],
46
- "tx": {
47
- "type": "0x02",
48
- "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
49
- "to": "0x7c6b4bbe207d642d98d5c537142d85209e585087",
50
- "gas": "0x8599",
51
- "value": "0x0",
52
- "data": "0xafe29f710000000000000000000000000000000000000000000000000000000000000001",
53
- "nonce": "0x5",
54
- "accessList": []
55
- }
56
- }
57
- ],
58
- "receipts": [
59
- {
60
- "transactionHash": "0x481dc86e40bba90403c76f8e144aa9ff04c1da2164299d0298573835f0991181",
61
- "transactionIndex": "0x0",
62
- "blockHash": "0xef0730448490304e5403be0fa8f8ce64f118e9adcca60c07a2ae1ab921d748af",
63
- "blockNumber": "0x1",
64
- "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
65
- "to": null,
66
- "cumulativeGasUsed": "0x13f3a",
67
- "gasUsed": "0x13f3a",
68
- "contractAddress": "0x5fbdb2315678afecb367f032d93f642f64180aa3",
69
- "logs": [],
70
- "status": "0x1",
71
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
72
- "effectiveGasPrice": "0xee6b2800"
73
- },
74
- {
75
- "transactionHash": "0x6a187183545b8a9e7f1790e847139379bf5622baff2cb43acf3f5c79470af782",
76
- "transactionIndex": "0x0",
77
- "blockHash": "0xf3acb96a90071640c2a8c067ae4e16aad87e634ea8d8bbbb5b352fba86ba0148",
78
- "blockNumber": "0x2",
79
- "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
80
- "to": null,
81
- "cumulativeGasUsed": "0x45d80",
82
- "gasUsed": "0x45d80",
83
- "contractAddress": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
84
- "logs": [],
85
- "status": "0x1",
86
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
87
- "effectiveGasPrice": "0xee6b2800"
88
- },
89
- {
90
- "transactionHash": "0x064ad173b4867bdef2fb60060bbdaf01735fbf10414541ea857772974e74ea9d",
91
- "transactionIndex": "0x0",
92
- "blockHash": "0x8373d02109d3ee06a0225f23da4c161c656ccc48fe0fcee931d325508ae73e58",
93
- "blockNumber": "0x3",
94
- "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
95
- "to": "0x4e59b44847b379578588920ca78fbf26c0b4956c",
96
- "cumulativeGasUsed": "0x45feb",
97
- "gasUsed": "0x45feb",
98
- "contractAddress": null,
99
- "logs": [],
100
- "status": "0x1",
101
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
102
- "effectiveGasPrice": "0xee6b2800"
103
- },
104
- {
105
- "transactionHash": "0xc6006863c267735a11476b7f15b15bc718e117e2da114a2be815dd651e1a509f",
106
- "transactionIndex": "0x0",
107
- "blockHash": "0x16712fae5c0e18f75045f84363fb6b4d9a9fe25e660c4ce286833a533c97f629",
108
- "blockNumber": "0x4",
109
- "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
110
- "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
111
- "cumulativeGasUsed": "0x5905",
112
- "gasUsed": "0x5905",
113
- "contractAddress": null,
114
- "logs": [],
115
- "status": "0x1",
116
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
117
- "effectiveGasPrice": "0xee6b2800"
118
- },
119
- {
120
- "transactionHash": "0xedf2b38d8d896519a947a1acf720f859bb35c0c5ecb8dd7511995b67b9853298",
121
- "transactionIndex": "0x0",
122
- "blockHash": "0x156b88c3eb9a1244ba00a1834f3f70de735b39e3e59006dd03af4fe7d5480c11",
123
- "blockNumber": "0x5",
124
- "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
125
- "to": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512",
126
- "cumulativeGasUsed": "0xa9c4",
127
- "gasUsed": "0xa9c4",
128
- "contractAddress": null,
129
- "logs": [],
130
- "status": "0x1",
131
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
132
- "effectiveGasPrice": "0xee6b2800"
133
- },
134
- {
135
- "transactionHash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c",
136
- "transactionIndex": "0x0",
137
- "blockHash": "0xcf61faca67dbb2c28952b0b8a379e53b1505ae0821e84779679390cb8571cadb",
138
- "blockNumber": "0x6",
139
- "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
140
- "to": "0x7c6b4bbe207d642d98d5c537142d85209e585087",
141
- "cumulativeGasUsed": "0x66c5",
142
- "gasUsed": "0x66c5",
143
- "contractAddress": null,
144
- "logs": [
145
- {
146
- "address": "0x7c6b4bbe207d642d98d5c537142d85209e585087",
147
- "topics": [
148
- "0x0b2e13ff20ac7b474198655583edf70dedd2c1dc980e329c4fbb2fc0748b796b"
149
- ],
150
- "data": "0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000046865726500000000000000000000000000000000000000000000000000000000",
151
- "blockHash": "0xcf61faca67dbb2c28952b0b8a379e53b1505ae0821e84779679390cb8571cadb",
152
- "blockNumber": "0x6",
153
- "transactionHash": "0xa57e8e3981a6c861442e46c9471bd19cb3e21f9a8a6c63a72e7b5c47c6675a7c",
154
- "transactionIndex": "0x1",
155
- "logIndex": "0x0",
156
- "transactionLogIndex": "0x0",
157
- "removed": false
158
- }
159
- ],
160
- "status": "0x1",
161
- "logsBloom": "0x00000000000800000000000000000010000000000000000000000000000180000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100",
162
- "effectiveGasPrice": "0xee6b2800"
163
- },
164
- {
165
- "transactionHash": "0x11fbb10230c168ca1e36a7e5c69a6dbcd04fd9e64ede39d10a83e36ee8065c16",
166
- "transactionIndex": "0x0",
167
- "blockHash": "0xf1e0ed2eda4e923626ec74621006ed50b3fc27580dc7b4cf68a07ca77420e29c",
168
- "blockNumber": "0x7",
169
- "from": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
170
- "to": "0x0000000000000000000000000000000000001337",
171
- "cumulativeGasUsed": "0x5208",
172
- "gasUsed": "0x5208",
173
- "contractAddress": null,
174
- "logs": [],
175
- "status": "0x1",
176
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
177
- "effectiveGasPrice": "0xee6b2800"
178
- }
179
- ],
180
- "libraries": [
181
- "src/Broadcast.t.sol:F:0x5fbdb2315678afecb367f032d93f642f64180aa3"
182
- ],
183
- "pending": [],
184
- "path": "broadcast/Broadcast.t.sol/31337/run-latest.json",
185
- "returns": {},
186
- "timestamp": 1655140035
187
- }