@@ -146,7 +146,7 @@ interface VmSafe {
146
146
// Suspends execution of the main thread for `duration` milliseconds
147
147
function sleep (uint256 duration ) external ;
148
148
149
- // ======== Filesystem ========
149
+ // ======== OS and Filesystem ========
150
150
151
151
// -------- Metadata --------
152
152
@@ -165,6 +165,9 @@ interface VmSafe {
165
165
// Get the path of the current project root.
166
166
function projectRoot () external view returns (string memory path );
167
167
168
+ // Returns the time since unix epoch in milliseconds
169
+ function unixTime () external returns (uint256 milliseconds );
170
+
168
171
// -------- Reading and writing --------
169
172
170
173
// Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.
@@ -238,6 +241,14 @@ interface VmSafe {
238
241
// `path` is relative to the project root.
239
242
function writeLine (string calldata path , string calldata data ) external ;
240
243
244
+ // -------- Foreign Function Interface --------
245
+
246
+ // Performs a foreign function call via the terminal
247
+ function ffi (string [] calldata commandInput ) external returns (bytes memory result );
248
+
249
+ // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr
250
+ function tryFfi (string [] calldata commandInput ) external returns (FfiResult memory result );
251
+
241
252
// ======== Environment Variables ========
242
253
243
254
// Sets environment variables
@@ -317,14 +328,6 @@ interface VmSafe {
317
328
// Signs data, (Wallet, digest) => (v, r, s)
318
329
function sign (Wallet calldata wallet , bytes32 digest ) external returns (uint8 v , bytes32 r , bytes32 s );
319
330
320
- // ======== External Interactions ========
321
-
322
- // Performs a foreign function call via the terminal
323
- function ffi (string [] calldata commandInput ) external returns (bytes memory result );
324
-
325
- // Performs a foreign function call via terminal and returns the exit code, stdout, and stderr
326
- function tryFfi (string [] calldata commandInput ) external returns (FfiResult memory result );
327
-
328
331
// ======== Scripts ========
329
332
330
333
// -------- Broadcasting Transactions --------
0 commit comments