-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Copy pathVm.sol
544 lines (542 loc) · 48.7 KB
/
Vm.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
// Automatically generated from `foundry-cheatcodes` Vm definitions. Do not modify manually.
// This interface is just for internal testing purposes. Use `forge-std` instead.
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.6.2 <0.9.0;
pragma experimental ABIEncoderV2;
interface Vm {
enum CallerMode { None, Broadcast, RecurrentBroadcast, Prank, RecurrentPrank }
enum AccountAccessKind { Call, DelegateCall, CallCode, StaticCall, Create, SelfDestruct, Resume, Balance, Extcodesize, Extcodehash, Extcodecopy }
enum ForgeContext { TestGroup, Test, Coverage, Snapshot, ScriptGroup, ScriptDryRun, ScriptBroadcast, ScriptResume, Unknown }
enum BroadcastTxType { Call, Create, Create2 }
struct Log { bytes32[] topics; bytes data; address emitter; }
struct Rpc { string key; string url; }
struct EthGetLogs { address emitter; bytes32[] topics; bytes data; bytes32 blockHash; uint64 blockNumber; bytes32 transactionHash; uint64 transactionIndex; uint256 logIndex; bool removed; }
struct DirEntry { string errorMessage; string path; uint64 depth; bool isDir; bool isSymlink; }
struct FsMetadata { bool isDir; bool isSymlink; uint256 length; bool readOnly; uint256 modified; uint256 accessed; uint256 created; }
struct Wallet { address addr; uint256 publicKeyX; uint256 publicKeyY; uint256 privateKey; }
struct FfiResult { int32 exitCode; bytes stdout; bytes stderr; }
struct ChainInfo { uint256 forkId; uint256 chainId; }
struct AccountAccess { ChainInfo chainInfo; AccountAccessKind kind; address account; address accessor; bool initialized; uint256 oldBalance; uint256 newBalance; bytes deployedCode; uint256 value; bytes data; bool reverted; StorageAccess[] storageAccesses; uint64 depth; }
struct StorageAccess { address account; bytes32 slot; bool isWrite; bytes32 previousValue; bytes32 newValue; bool reverted; }
struct Gas { uint64 gasLimit; uint64 gasTotalUsed; uint64 gasMemoryUsed; int64 gasRefunded; uint64 gasRemaining; }
struct DebugStep { uint256[] stack; bytes memoryInput; uint8 opcode; uint64 depth; bool isOutOfGas; address contractAddr; }
struct BroadcastTxSummary { bytes32 txHash; BroadcastTxType txType; address contractAddress; uint64 blockNumber; bool success; }
struct SignedDelegation { uint8 v; bytes32 r; bytes32 s; uint64 nonce; address implementation; }
struct PotentialRevert { address reverter; bool partialMatch; bytes revertData; }
struct AccessListItem { address target; bytes32[] storageKeys; }
function _expectCheatcodeRevert() external;
function _expectCheatcodeRevert(bytes4 revertData) external;
function _expectCheatcodeRevert(bytes calldata revertData) external;
function accessList(AccessListItem[] calldata access) external;
function accesses(address target) external returns (bytes32[] memory readSlots, bytes32[] memory writeSlots);
function activeFork() external view returns (uint256 forkId);
function addr(uint256 privateKey) external pure returns (address keyAddr);
function allowCheatcodes(address account) external;
function assertApproxEqAbsDecimal(uint256 left, uint256 right, uint256 maxDelta, uint256 decimals) external pure;
function assertApproxEqAbsDecimal(uint256 left, uint256 right, uint256 maxDelta, uint256 decimals, string calldata error) external pure;
function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals) external pure;
function assertApproxEqAbsDecimal(int256 left, int256 right, uint256 maxDelta, uint256 decimals, string calldata error) external pure;
function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta) external pure;
function assertApproxEqAbs(uint256 left, uint256 right, uint256 maxDelta, string calldata error) external pure;
function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta) external pure;
function assertApproxEqAbs(int256 left, int256 right, uint256 maxDelta, string calldata error) external pure;
function assertApproxEqRelDecimal(uint256 left, uint256 right, uint256 maxPercentDelta, uint256 decimals) external pure;
function assertApproxEqRelDecimal(uint256 left, uint256 right, uint256 maxPercentDelta, uint256 decimals, string calldata error) external pure;
function assertApproxEqRelDecimal(int256 left, int256 right, uint256 maxPercentDelta, uint256 decimals) external pure;
function assertApproxEqRelDecimal(int256 left, int256 right, uint256 maxPercentDelta, uint256 decimals, string calldata error) external pure;
function assertApproxEqRel(uint256 left, uint256 right, uint256 maxPercentDelta) external pure;
function assertApproxEqRel(uint256 left, uint256 right, uint256 maxPercentDelta, string calldata error) external pure;
function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta) external pure;
function assertApproxEqRel(int256 left, int256 right, uint256 maxPercentDelta, string calldata error) external pure;
function assertEqDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
function assertEqDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
function assertEqDecimal(int256 left, int256 right, uint256 decimals) external pure;
function assertEqDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
function assertEq(bool left, bool right) external pure;
function assertEq(bool left, bool right, string calldata error) external pure;
function assertEq(string calldata left, string calldata right) external pure;
function assertEq(string calldata left, string calldata right, string calldata error) external pure;
function assertEq(bytes calldata left, bytes calldata right) external pure;
function assertEq(bytes calldata left, bytes calldata right, string calldata error) external pure;
function assertEq(bool[] calldata left, bool[] calldata right) external pure;
function assertEq(bool[] calldata left, bool[] calldata right, string calldata error) external pure;
function assertEq(uint256[] calldata left, uint256[] calldata right) external pure;
function assertEq(uint256[] calldata left, uint256[] calldata right, string calldata error) external pure;
function assertEq(int256[] calldata left, int256[] calldata right) external pure;
function assertEq(int256[] calldata left, int256[] calldata right, string calldata error) external pure;
function assertEq(uint256 left, uint256 right) external pure;
function assertEq(address[] calldata left, address[] calldata right) external pure;
function assertEq(address[] calldata left, address[] calldata right, string calldata error) external pure;
function assertEq(bytes32[] calldata left, bytes32[] calldata right) external pure;
function assertEq(bytes32[] calldata left, bytes32[] calldata right, string calldata error) external pure;
function assertEq(string[] calldata left, string[] calldata right) external pure;
function assertEq(string[] calldata left, string[] calldata right, string calldata error) external pure;
function assertEq(bytes[] calldata left, bytes[] calldata right) external pure;
function assertEq(bytes[] calldata left, bytes[] calldata right, string calldata error) external pure;
function assertEq(uint256 left, uint256 right, string calldata error) external pure;
function assertEq(int256 left, int256 right) external pure;
function assertEq(int256 left, int256 right, string calldata error) external pure;
function assertEq(address left, address right) external pure;
function assertEq(address left, address right, string calldata error) external pure;
function assertEq(bytes32 left, bytes32 right) external pure;
function assertEq(bytes32 left, bytes32 right, string calldata error) external pure;
function assertFalse(bool condition) external pure;
function assertFalse(bool condition, string calldata error) external pure;
function assertGeDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
function assertGeDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
function assertGeDecimal(int256 left, int256 right, uint256 decimals) external pure;
function assertGeDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
function assertGe(uint256 left, uint256 right) external pure;
function assertGe(uint256 left, uint256 right, string calldata error) external pure;
function assertGe(int256 left, int256 right) external pure;
function assertGe(int256 left, int256 right, string calldata error) external pure;
function assertGtDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
function assertGtDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
function assertGtDecimal(int256 left, int256 right, uint256 decimals) external pure;
function assertGtDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
function assertGt(uint256 left, uint256 right) external pure;
function assertGt(uint256 left, uint256 right, string calldata error) external pure;
function assertGt(int256 left, int256 right) external pure;
function assertGt(int256 left, int256 right, string calldata error) external pure;
function assertLeDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
function assertLeDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
function assertLeDecimal(int256 left, int256 right, uint256 decimals) external pure;
function assertLeDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
function assertLe(uint256 left, uint256 right) external pure;
function assertLe(uint256 left, uint256 right, string calldata error) external pure;
function assertLe(int256 left, int256 right) external pure;
function assertLe(int256 left, int256 right, string calldata error) external pure;
function assertLtDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
function assertLtDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
function assertLtDecimal(int256 left, int256 right, uint256 decimals) external pure;
function assertLtDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
function assertLt(uint256 left, uint256 right) external pure;
function assertLt(uint256 left, uint256 right, string calldata error) external pure;
function assertLt(int256 left, int256 right) external pure;
function assertLt(int256 left, int256 right, string calldata error) external pure;
function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals) external pure;
function assertNotEqDecimal(uint256 left, uint256 right, uint256 decimals, string calldata error) external pure;
function assertNotEqDecimal(int256 left, int256 right, uint256 decimals) external pure;
function assertNotEqDecimal(int256 left, int256 right, uint256 decimals, string calldata error) external pure;
function assertNotEq(bool left, bool right) external pure;
function assertNotEq(bool left, bool right, string calldata error) external pure;
function assertNotEq(string calldata left, string calldata right) external pure;
function assertNotEq(string calldata left, string calldata right, string calldata error) external pure;
function assertNotEq(bytes calldata left, bytes calldata right) external pure;
function assertNotEq(bytes calldata left, bytes calldata right, string calldata error) external pure;
function assertNotEq(bool[] calldata left, bool[] calldata right) external pure;
function assertNotEq(bool[] calldata left, bool[] calldata right, string calldata error) external pure;
function assertNotEq(uint256[] calldata left, uint256[] calldata right) external pure;
function assertNotEq(uint256[] calldata left, uint256[] calldata right, string calldata error) external pure;
function assertNotEq(int256[] calldata left, int256[] calldata right) external pure;
function assertNotEq(int256[] calldata left, int256[] calldata right, string calldata error) external pure;
function assertNotEq(uint256 left, uint256 right) external pure;
function assertNotEq(address[] calldata left, address[] calldata right) external pure;
function assertNotEq(address[] calldata left, address[] calldata right, string calldata error) external pure;
function assertNotEq(bytes32[] calldata left, bytes32[] calldata right) external pure;
function assertNotEq(bytes32[] calldata left, bytes32[] calldata right, string calldata error) external pure;
function assertNotEq(string[] calldata left, string[] calldata right) external pure;
function assertNotEq(string[] calldata left, string[] calldata right, string calldata error) external pure;
function assertNotEq(bytes[] calldata left, bytes[] calldata right) external pure;
function assertNotEq(bytes[] calldata left, bytes[] calldata right, string calldata error) external pure;
function assertNotEq(uint256 left, uint256 right, string calldata error) external pure;
function assertNotEq(int256 left, int256 right) external pure;
function assertNotEq(int256 left, int256 right, string calldata error) external pure;
function assertNotEq(address left, address right) external pure;
function assertNotEq(address left, address right, string calldata error) external pure;
function assertNotEq(bytes32 left, bytes32 right) external pure;
function assertNotEq(bytes32 left, bytes32 right, string calldata error) external pure;
function assertTrue(bool condition) external pure;
function assertTrue(bool condition, string calldata error) external pure;
function assume(bool condition) external pure;
function assumeNoRevert() external pure;
function assumeNoRevert(PotentialRevert calldata potentialRevert) external pure;
function assumeNoRevert(PotentialRevert[] calldata potentialReverts) external pure;
function attachDelegation(SignedDelegation calldata signedDelegation) external;
function blobBaseFee(uint256 newBlobBaseFee) external;
function blobhashes(bytes32[] calldata hashes) external;
function breakpoint(string calldata char) external pure;
function breakpoint(string calldata char, bool value) external pure;
function broadcastRawTransaction(bytes calldata data) external;
function broadcast() external;
function broadcast(address signer) external;
function broadcast(uint256 privateKey) external;
function chainId(uint256 newChainId) external;
function clearMockedCalls() external;
function cloneAccount(address source, address target) external;
function closeFile(string calldata path) external;
function coinbase(address newCoinbase) external;
function computeCreate2Address(bytes32 salt, bytes32 initCodeHash, address deployer) external pure returns (address);
function computeCreate2Address(bytes32 salt, bytes32 initCodeHash) external pure returns (address);
function computeCreateAddress(address deployer, uint256 nonce) external pure returns (address);
function contains(string calldata subject, string calldata search) external returns (bool result);
function cool(address target) external;
function coolSlot(address target, bytes32 slot) external;
function copyFile(string calldata from, string calldata to) external returns (uint64 copied);
function copyStorage(address from, address to) external;
function createDir(string calldata path, bool recursive) external;
function createFork(string calldata urlOrAlias) external returns (uint256 forkId);
function createFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);
function createFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);
function createSelectFork(string calldata urlOrAlias) external returns (uint256 forkId);
function createSelectFork(string calldata urlOrAlias, uint256 blockNumber) external returns (uint256 forkId);
function createSelectFork(string calldata urlOrAlias, bytes32 txHash) external returns (uint256 forkId);
function createWallet(string calldata walletLabel) external returns (Wallet memory wallet);
function createWallet(uint256 privateKey) external returns (Wallet memory wallet);
function createWallet(uint256 privateKey, string calldata walletLabel) external returns (Wallet memory wallet);
function deal(address account, uint256 newBalance) external;
function deleteSnapshot(uint256 snapshotId) external returns (bool success);
function deleteSnapshots() external;
function deleteStateSnapshot(uint256 snapshotId) external returns (bool success);
function deleteStateSnapshots() external;
function deployCode(string calldata artifactPath) external returns (address deployedAddress);
function deployCode(string calldata artifactPath, bytes calldata constructorArgs) external returns (address deployedAddress);
function deployCode(string calldata artifactPath, uint256 value) external returns (address deployedAddress);
function deployCode(string calldata artifactPath, bytes calldata constructorArgs, uint256 value) external returns (address deployedAddress);
function deployCode(string calldata artifactPath, bytes32 salt) external returns (address deployedAddress);
function deployCode(string calldata artifactPath, bytes calldata constructorArgs, bytes32 salt) external returns (address deployedAddress);
function deployCode(string calldata artifactPath, uint256 value, bytes32 salt) external returns (address deployedAddress);
function deployCode(string calldata artifactPath, bytes calldata constructorArgs, uint256 value, bytes32 salt) external returns (address deployedAddress);
function deriveKey(string calldata mnemonic, uint32 index) external pure returns (uint256 privateKey);
function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index) external pure returns (uint256 privateKey);
function deriveKey(string calldata mnemonic, uint32 index, string calldata language) external pure returns (uint256 privateKey);
function deriveKey(string calldata mnemonic, string calldata derivationPath, uint32 index, string calldata language) external pure returns (uint256 privateKey);
function difficulty(uint256 newDifficulty) external;
function dumpState(string calldata pathToStateJson) external;
function ensNamehash(string calldata name) external pure returns (bytes32);
function envAddress(string calldata name) external view returns (address value);
function envAddress(string calldata name, string calldata delim) external view returns (address[] memory value);
function envBool(string calldata name) external view returns (bool value);
function envBool(string calldata name, string calldata delim) external view returns (bool[] memory value);
function envBytes32(string calldata name) external view returns (bytes32 value);
function envBytes32(string calldata name, string calldata delim) external view returns (bytes32[] memory value);
function envBytes(string calldata name) external view returns (bytes memory value);
function envBytes(string calldata name, string calldata delim) external view returns (bytes[] memory value);
function envExists(string calldata name) external view returns (bool result);
function envInt(string calldata name) external view returns (int256 value);
function envInt(string calldata name, string calldata delim) external view returns (int256[] memory value);
function envOr(string calldata name, bool defaultValue) external view returns (bool value);
function envOr(string calldata name, uint256 defaultValue) external view returns (uint256 value);
function envOr(string calldata name, string calldata delim, address[] calldata defaultValue) external view returns (address[] memory value);
function envOr(string calldata name, string calldata delim, bytes32[] calldata defaultValue) external view returns (bytes32[] memory value);
function envOr(string calldata name, string calldata delim, string[] calldata defaultValue) external view returns (string[] memory value);
function envOr(string calldata name, string calldata delim, bytes[] calldata defaultValue) external view returns (bytes[] memory value);
function envOr(string calldata name, int256 defaultValue) external view returns (int256 value);
function envOr(string calldata name, address defaultValue) external view returns (address value);
function envOr(string calldata name, bytes32 defaultValue) external view returns (bytes32 value);
function envOr(string calldata name, string calldata defaultValue) external view returns (string memory value);
function envOr(string calldata name, bytes calldata defaultValue) external view returns (bytes memory value);
function envOr(string calldata name, string calldata delim, bool[] calldata defaultValue) external view returns (bool[] memory value);
function envOr(string calldata name, string calldata delim, uint256[] calldata defaultValue) external view returns (uint256[] memory value);
function envOr(string calldata name, string calldata delim, int256[] calldata defaultValue) external view returns (int256[] memory value);
function envString(string calldata name) external view returns (string memory value);
function envString(string calldata name, string calldata delim) external view returns (string[] memory value);
function envUint(string calldata name) external view returns (uint256 value);
function envUint(string calldata name, string calldata delim) external view returns (uint256[] memory value);
function etch(address target, bytes calldata newRuntimeBytecode) external;
function eth_getLogs(uint256 fromBlock, uint256 toBlock, address target, bytes32[] calldata topics) external returns (EthGetLogs[] memory logs);
function exists(string calldata path) external view returns (bool result);
function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data) external;
function expectCallMinGas(address callee, uint256 msgValue, uint64 minGas, bytes calldata data, uint64 count) external;
function expectCall(address callee, bytes calldata data) external;
function expectCall(address callee, bytes calldata data, uint64 count) external;
function expectCall(address callee, uint256 msgValue, bytes calldata data) external;
function expectCall(address callee, uint256 msgValue, bytes calldata data, uint64 count) external;
function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data) external;
function expectCall(address callee, uint256 msgValue, uint64 gas, bytes calldata data, uint64 count) external;
function expectCreate(bytes calldata bytecode, address deployer) external;
function expectCreate2(bytes calldata bytecode, address deployer) external;
function expectEmitAnonymous(bool checkTopic0, bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;
function expectEmitAnonymous(bool checkTopic0, bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter) external;
function expectEmitAnonymous() external;
function expectEmitAnonymous(address emitter) external;
function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData) external;
function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter) external;
function expectEmit() external;
function expectEmit(address emitter) external;
function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, uint64 count) external;
function expectEmit(bool checkTopic1, bool checkTopic2, bool checkTopic3, bool checkData, address emitter, uint64 count) external;
function expectEmit(uint64 count) external;
function expectEmit(address emitter, uint64 count) external;
function expectPartialRevert(bytes4 revertData) external;
function expectPartialRevert(bytes4 revertData, address reverter) external;
function expectRevert() external;
function expectRevert(bytes4 revertData) external;
function expectRevert(bytes4 revertData, address reverter, uint64 count) external;
function expectRevert(bytes calldata revertData, address reverter, uint64 count) external;
function expectRevert(bytes calldata revertData) external;
function expectRevert(address reverter) external;
function expectRevert(bytes4 revertData, address reverter) external;
function expectRevert(bytes calldata revertData, address reverter) external;
function expectRevert(uint64 count) external;
function expectRevert(bytes4 revertData, uint64 count) external;
function expectRevert(bytes calldata revertData, uint64 count) external;
function expectRevert(address reverter, uint64 count) external;
function expectSafeMemory(uint64 min, uint64 max) external;
function expectSafeMemoryCall(uint64 min, uint64 max) external;
function fee(uint256 newBasefee) external;
function ffi(string[] calldata commandInput) external returns (bytes memory result);
function foundryVersionAtLeast(string calldata version) external view returns (bool);
function foundryVersionCmp(string calldata version) external view returns (int256);
function fsMetadata(string calldata path) external view returns (FsMetadata memory metadata);
function getArtifactPathByCode(bytes calldata code) external view returns (string memory path);
function getArtifactPathByDeployedCode(bytes calldata deployedCode) external view returns (string memory path);
function getBlobBaseFee() external view returns (uint256 blobBaseFee);
function getBlobhashes() external view returns (bytes32[] memory hashes);
function getBlockNumber() external view returns (uint256 height);
function getBlockTimestamp() external view returns (uint256 timestamp);
function getBroadcast(string calldata contractName, uint64 chainId, BroadcastTxType txType) external view returns (BroadcastTxSummary memory);
function getBroadcasts(string calldata contractName, uint64 chainId, BroadcastTxType txType) external view returns (BroadcastTxSummary[] memory);
function getBroadcasts(string calldata contractName, uint64 chainId) external view returns (BroadcastTxSummary[] memory);
function getCode(string calldata artifactPath) external view returns (bytes memory creationBytecode);
function getDeployedCode(string calldata artifactPath) external view returns (bytes memory runtimeBytecode);
function getDeployment(string calldata contractName) external view returns (address deployedAddress);
function getDeployment(string calldata contractName, uint64 chainId) external view returns (address deployedAddress);
function getDeployments(string calldata contractName, uint64 chainId) external view returns (address[] memory deployedAddresses);
function getFoundryVersion() external view returns (string memory version);
function getLabel(address account) external view returns (string memory currentLabel);
function getMappingKeyAndParentOf(address target, bytes32 elementSlot) external returns (bool found, bytes32 key, bytes32 parent);
function getMappingLength(address target, bytes32 mappingSlot) external returns (uint256 length);
function getMappingSlotAt(address target, bytes32 mappingSlot, uint256 idx) external returns (bytes32 value);
function getNonce(address account) external view returns (uint64 nonce);
function getNonce(Wallet calldata wallet) external returns (uint64 nonce);
function getRecordedLogs() external returns (Log[] memory logs);
function getStateDiff() external view returns (string memory diff);
function getStateDiffJson() external view returns (string memory diff);
function getWallets() external returns (address[] memory wallets);
function indexOf(string calldata input, string calldata key) external pure returns (uint256);
function interceptInitcode() external;
function isContext(ForgeContext context) external view returns (bool result);
function isDir(string calldata path) external view returns (bool result);
function isFile(string calldata path) external view returns (bool result);
function isPersistent(address account) external view returns (bool persistent);
function keyExists(string calldata json, string calldata key) external view returns (bool);
function keyExistsJson(string calldata json, string calldata key) external view returns (bool);
function keyExistsToml(string calldata toml, string calldata key) external view returns (bool);
function label(address account, string calldata newLabel) external;
function lastCallGas() external view returns (Gas memory gas);
function load(address target, bytes32 slot) external view returns (bytes32 data);
function loadAllocs(string calldata pathToAllocsJson) external;
function makePersistent(address account) external;
function makePersistent(address account0, address account1) external;
function makePersistent(address account0, address account1, address account2) external;
function makePersistent(address[] calldata accounts) external;
function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external;
function mockCallRevert(address callee, uint256 msgValue, bytes calldata data, bytes calldata revertData) external;
function mockCallRevert(address callee, bytes4 data, bytes calldata revertData) external;
function mockCallRevert(address callee, uint256 msgValue, bytes4 data, bytes calldata revertData) external;
function mockCall(address callee, bytes calldata data, bytes calldata returnData) external;
function mockCall(address callee, uint256 msgValue, bytes calldata data, bytes calldata returnData) external;
function mockCall(address callee, bytes4 data, bytes calldata returnData) external;
function mockCall(address callee, uint256 msgValue, bytes4 data, bytes calldata returnData) external;
function mockCalls(address callee, bytes calldata data, bytes[] calldata returnData) external;
function mockCalls(address callee, uint256 msgValue, bytes calldata data, bytes[] calldata returnData) external;
function mockFunction(address callee, address target, bytes calldata data) external;
function noAccessList() external;
function parseAddress(string calldata stringifiedValue) external pure returns (address parsedValue);
function parseBool(string calldata stringifiedValue) external pure returns (bool parsedValue);
function parseBytes(string calldata stringifiedValue) external pure returns (bytes memory parsedValue);
function parseBytes32(string calldata stringifiedValue) external pure returns (bytes32 parsedValue);
function parseInt(string calldata stringifiedValue) external pure returns (int256 parsedValue);
function parseJsonAddress(string calldata json, string calldata key) external pure returns (address);
function parseJsonAddressArray(string calldata json, string calldata key) external pure returns (address[] memory);
function parseJsonBool(string calldata json, string calldata key) external pure returns (bool);
function parseJsonBoolArray(string calldata json, string calldata key) external pure returns (bool[] memory);
function parseJsonBytes(string calldata json, string calldata key) external pure returns (bytes memory);
function parseJsonBytes32(string calldata json, string calldata key) external pure returns (bytes32);
function parseJsonBytes32Array(string calldata json, string calldata key) external pure returns (bytes32[] memory);
function parseJsonBytesArray(string calldata json, string calldata key) external pure returns (bytes[] memory);
function parseJsonInt(string calldata json, string calldata key) external pure returns (int256);
function parseJsonIntArray(string calldata json, string calldata key) external pure returns (int256[] memory);
function parseJsonKeys(string calldata json, string calldata key) external pure returns (string[] memory keys);
function parseJsonString(string calldata json, string calldata key) external pure returns (string memory);
function parseJsonStringArray(string calldata json, string calldata key) external pure returns (string[] memory);
function parseJsonTypeArray(string calldata json, string calldata key, string calldata typeDescription) external pure returns (bytes memory);
function parseJsonType(string calldata json, string calldata typeDescription) external pure returns (bytes memory);
function parseJsonType(string calldata json, string calldata key, string calldata typeDescription) external pure returns (bytes memory);
function parseJsonUint(string calldata json, string calldata key) external pure returns (uint256);
function parseJsonUintArray(string calldata json, string calldata key) external pure returns (uint256[] memory);
function parseJson(string calldata json) external pure returns (bytes memory abiEncodedData);
function parseJson(string calldata json, string calldata key) external pure returns (bytes memory abiEncodedData);
function parseTomlAddress(string calldata toml, string calldata key) external pure returns (address);
function parseTomlAddressArray(string calldata toml, string calldata key) external pure returns (address[] memory);
function parseTomlBool(string calldata toml, string calldata key) external pure returns (bool);
function parseTomlBoolArray(string calldata toml, string calldata key) external pure returns (bool[] memory);
function parseTomlBytes(string calldata toml, string calldata key) external pure returns (bytes memory);
function parseTomlBytes32(string calldata toml, string calldata key) external pure returns (bytes32);
function parseTomlBytes32Array(string calldata toml, string calldata key) external pure returns (bytes32[] memory);
function parseTomlBytesArray(string calldata toml, string calldata key) external pure returns (bytes[] memory);
function parseTomlInt(string calldata toml, string calldata key) external pure returns (int256);
function parseTomlIntArray(string calldata toml, string calldata key) external pure returns (int256[] memory);
function parseTomlKeys(string calldata toml, string calldata key) external pure returns (string[] memory keys);
function parseTomlString(string calldata toml, string calldata key) external pure returns (string memory);
function parseTomlStringArray(string calldata toml, string calldata key) external pure returns (string[] memory);
function parseTomlTypeArray(string calldata toml, string calldata key, string calldata typeDescription) external pure returns (bytes memory);
function parseTomlType(string calldata toml, string calldata typeDescription) external pure returns (bytes memory);
function parseTomlType(string calldata toml, string calldata key, string calldata typeDescription) external pure returns (bytes memory);
function parseTomlUint(string calldata toml, string calldata key) external pure returns (uint256);
function parseTomlUintArray(string calldata toml, string calldata key) external pure returns (uint256[] memory);
function parseToml(string calldata toml) external pure returns (bytes memory abiEncodedData);
function parseToml(string calldata toml, string calldata key) external pure returns (bytes memory abiEncodedData);
function parseUint(string calldata stringifiedValue) external pure returns (uint256 parsedValue);
function pauseGasMetering() external;
function pauseTracing() external view;
function prank(address msgSender) external;
function prank(address msgSender, address txOrigin) external;
function prank(address msgSender, bool delegateCall) external;
function prank(address msgSender, address txOrigin, bool delegateCall) external;
function prevrandao(bytes32 newPrevrandao) external;
function prevrandao(uint256 newPrevrandao) external;
function projectRoot() external view returns (string memory path);
function prompt(string calldata promptText) external returns (string memory input);
function promptAddress(string calldata promptText) external returns (address);
function promptSecret(string calldata promptText) external returns (string memory input);
function promptSecretUint(string calldata promptText) external returns (uint256);
function promptUint(string calldata promptText) external returns (uint256);
function publicKeyP256(uint256 privateKey) external pure returns (uint256 publicKeyX, uint256 publicKeyY);
function randomAddress() external returns (address);
function randomBool() external view returns (bool);
function randomBytes(uint256 len) external view returns (bytes memory);
function randomBytes4() external view returns (bytes4);
function randomBytes8() external view returns (bytes8);
function randomInt() external view returns (int256);
function randomInt(uint256 bits) external view returns (int256);
function randomUint() external returns (uint256);
function randomUint(uint256 min, uint256 max) external returns (uint256);
function randomUint(uint256 bits) external view returns (uint256);
function readCallers() external returns (CallerMode callerMode, address msgSender, address txOrigin);
function readDir(string calldata path) external view returns (DirEntry[] memory entries);
function readDir(string calldata path, uint64 maxDepth) external view returns (DirEntry[] memory entries);
function readDir(string calldata path, uint64 maxDepth, bool followLinks) external view returns (DirEntry[] memory entries);
function readFile(string calldata path) external view returns (string memory data);
function readFileBinary(string calldata path) external view returns (bytes memory data);
function readLine(string calldata path) external view returns (string memory line);
function readLink(string calldata linkPath) external view returns (string memory targetPath);
function record() external;
function recordLogs() external;
function rememberKey(uint256 privateKey) external returns (address keyAddr);
function rememberKeys(string calldata mnemonic, string calldata derivationPath, uint32 count) external returns (address[] memory keyAddrs);
function rememberKeys(string calldata mnemonic, string calldata derivationPath, string calldata language, uint32 count) external returns (address[] memory keyAddrs);
function removeDir(string calldata path, bool recursive) external;
function removeFile(string calldata path) external;
function replace(string calldata input, string calldata from, string calldata to) external pure returns (string memory output);
function resetGasMetering() external;
function resetNonce(address account) external;
function resumeGasMetering() external;
function resumeTracing() external view;
function revertTo(uint256 snapshotId) external returns (bool success);
function revertToAndDelete(uint256 snapshotId) external returns (bool success);
function revertToState(uint256 snapshotId) external returns (bool success);
function revertToStateAndDelete(uint256 snapshotId) external returns (bool success);
function revokePersistent(address account) external;
function revokePersistent(address[] calldata accounts) external;
function roll(uint256 newHeight) external;
function rollFork(uint256 blockNumber) external;
function rollFork(bytes32 txHash) external;
function rollFork(uint256 forkId, uint256 blockNumber) external;
function rollFork(uint256 forkId, bytes32 txHash) external;
function rpcUrl(string calldata rpcAlias) external view returns (string memory json);
function rpcUrlStructs() external view returns (Rpc[] memory urls);
function rpcUrls() external view returns (string[2][] memory urls);
function rpc(string calldata method, string calldata params) external returns (bytes memory data);
function rpc(string calldata urlOrAlias, string calldata method, string calldata params) external returns (bytes memory data);
function selectFork(uint256 forkId) external;
function serializeAddress(string calldata objectKey, string calldata valueKey, address value) external returns (string memory json);
function serializeAddress(string calldata objectKey, string calldata valueKey, address[] calldata values) external returns (string memory json);
function serializeBool(string calldata objectKey, string calldata valueKey, bool value) external returns (string memory json);
function serializeBool(string calldata objectKey, string calldata valueKey, bool[] calldata values) external returns (string memory json);
function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32 value) external returns (string memory json);
function serializeBytes32(string calldata objectKey, string calldata valueKey, bytes32[] calldata values) external returns (string memory json);
function serializeBytes(string calldata objectKey, string calldata valueKey, bytes calldata value) external returns (string memory json);
function serializeBytes(string calldata objectKey, string calldata valueKey, bytes[] calldata values) external returns (string memory json);
function serializeInt(string calldata objectKey, string calldata valueKey, int256 value) external returns (string memory json);
function serializeInt(string calldata objectKey, string calldata valueKey, int256[] calldata values) external returns (string memory json);
function serializeJson(string calldata objectKey, string calldata value) external returns (string memory json);
function serializeJsonType(string calldata typeDescription, bytes calldata value) external pure returns (string memory json);
function serializeJsonType(string calldata objectKey, string calldata valueKey, string calldata typeDescription, bytes calldata value) external returns (string memory json);
function serializeString(string calldata objectKey, string calldata valueKey, string calldata value) external returns (string memory json);
function serializeString(string calldata objectKey, string calldata valueKey, string[] calldata values) external returns (string memory json);
function serializeUintToHex(string calldata objectKey, string calldata valueKey, uint256 value) external returns (string memory json);
function serializeUint(string calldata objectKey, string calldata valueKey, uint256 value) external returns (string memory json);
function serializeUint(string calldata objectKey, string calldata valueKey, uint256[] calldata values) external returns (string memory json);
function setArbitraryStorage(address target) external;
function setArbitraryStorage(address target, bool overwrite) external;
function setBlockhash(uint256 blockNumber, bytes32 blockHash) external;
function setEnv(string calldata name, string calldata value) external;
function setNonce(address account, uint64 newNonce) external;
function setNonceUnsafe(address account, uint64 newNonce) external;
function shuffle(uint256[] calldata array) external returns (uint256[] memory);
function signAndAttachDelegation(address implementation, uint256 privateKey) external returns (SignedDelegation memory signedDelegation);
function signAndAttachDelegation(address implementation, uint256 privateKey, uint64 nonce) external returns (SignedDelegation memory signedDelegation);
function signCompact(Wallet calldata wallet, bytes32 digest) external returns (bytes32 r, bytes32 vs);
function signCompact(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 vs);
function signCompact(bytes32 digest) external pure returns (bytes32 r, bytes32 vs);
function signCompact(address signer, bytes32 digest) external pure returns (bytes32 r, bytes32 vs);
function signDelegation(address implementation, uint256 privateKey) external returns (SignedDelegation memory signedDelegation);
function signDelegation(address implementation, uint256 privateKey, uint64 nonce) external returns (SignedDelegation memory signedDelegation);
function signP256(uint256 privateKey, bytes32 digest) external pure returns (bytes32 r, bytes32 s);
function sign(Wallet calldata wallet, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);
function sign(uint256 privateKey, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);
function sign(bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);
function sign(address signer, bytes32 digest) external pure returns (uint8 v, bytes32 r, bytes32 s);
function skip(bool skipTest) external;
function skip(bool skipTest, string calldata reason) external;
function sleep(uint256 duration) external;
function snapshot() external returns (uint256 snapshotId);
function snapshotGasLastCall(string calldata name) external returns (uint256 gasUsed);
function snapshotGasLastCall(string calldata group, string calldata name) external returns (uint256 gasUsed);
function snapshotState() external returns (uint256 snapshotId);
function snapshotValue(string calldata name, uint256 value) external;
function snapshotValue(string calldata group, string calldata name, uint256 value) external;
function sort(uint256[] calldata array) external returns (uint256[] memory);
function split(string calldata input, string calldata delimiter) external pure returns (string[] memory outputs);
function startBroadcast() external;
function startBroadcast(address signer) external;
function startBroadcast(uint256 privateKey) external;
function startDebugTraceRecording() external;
function startMappingRecording() external;
function startPrank(address msgSender) external;
function startPrank(address msgSender, address txOrigin) external;
function startPrank(address msgSender, bool delegateCall) external;
function startPrank(address msgSender, address txOrigin, bool delegateCall) external;
function startSnapshotGas(string calldata name) external;
function startSnapshotGas(string calldata group, string calldata name) external;
function startStateDiffRecording() external;
function stopAndReturnDebugTraceRecording() external returns (DebugStep[] memory step);
function stopAndReturnStateDiff() external returns (AccountAccess[] memory accountAccesses);
function stopBroadcast() external;
function stopExpectSafeMemory() external;
function stopMappingRecording() external;
function stopPrank() external;
function stopSnapshotGas() external returns (uint256 gasUsed);
function stopSnapshotGas(string calldata name) external returns (uint256 gasUsed);
function stopSnapshotGas(string calldata group, string calldata name) external returns (uint256 gasUsed);
function store(address target, bytes32 slot, bytes32 value) external;
function toBase64URL(bytes calldata data) external pure returns (string memory);
function toBase64URL(string calldata data) external pure returns (string memory);
function toBase64(bytes calldata data) external pure returns (string memory);
function toBase64(string calldata data) external pure returns (string memory);
function toLowercase(string calldata input) external pure returns (string memory output);
function toString(address value) external pure returns (string memory stringifiedValue);
function toString(bytes calldata value) external pure returns (string memory stringifiedValue);
function toString(bytes32 value) external pure returns (string memory stringifiedValue);
function toString(bool value) external pure returns (string memory stringifiedValue);
function toString(uint256 value) external pure returns (string memory stringifiedValue);
function toString(int256 value) external pure returns (string memory stringifiedValue);
function toUppercase(string calldata input) external pure returns (string memory output);
function transact(bytes32 txHash) external;
function transact(uint256 forkId, bytes32 txHash) external;
function trim(string calldata input) external pure returns (string memory output);
function tryFfi(string[] calldata commandInput) external returns (FfiResult memory result);
function txGasPrice(uint256 newGasPrice) external;
function unixTime() external view returns (uint256 milliseconds);
function warmSlot(address target, bytes32 slot) external;
function warp(uint256 newTimestamp) external;
function writeFile(string calldata path, string calldata data) external;
function writeFileBinary(string calldata path, bytes calldata data) external;
function writeJson(string calldata json, string calldata path) external;
function writeJson(string calldata json, string calldata path, string calldata valueKey) external;
function writeLine(string calldata path, string calldata data) external;
function writeToml(string calldata json, string calldata path) external;
function writeToml(string calldata json, string calldata path, string calldata valueKey) external;
}