@@ -146,7 +146,7 @@ interface VmSafe {
146146 // Suspends execution of the main thread for `duration` milliseconds
147147 function sleep (uint256 duration ) external ;
148148
149- // ======== Filesystem ========
149+ // ======== OS and Filesystem ========
150150
151151 // -------- Metadata --------
152152
@@ -165,6 +165,9 @@ interface VmSafe {
165165 // Get the path of the current project root.
166166 function projectRoot () external view returns (string memory path );
167167
168+ // Returns the time since unix epoch in milliseconds
169+ function unixTime () external returns (uint256 milliseconds );
170+
168171 // -------- Reading and writing --------
169172
170173 // Closes file for reading, resetting the offset and allowing to read it from beginning with readLine.
@@ -238,6 +241,14 @@ interface VmSafe {
238241 // `path` is relative to the project root.
239242 function writeLine (string calldata path , string calldata data ) external ;
240243
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+
241252 // ======== Environment Variables ========
242253
243254 // Sets environment variables
@@ -317,14 +328,6 @@ interface VmSafe {
317328 // Signs data, (Wallet, digest) => (v, r, s)
318329 function sign (Wallet calldata wallet , bytes32 digest ) external returns (uint8 v , bytes32 r , bytes32 s );
319330
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-
328331 // ======== Scripts ========
329332
330333 // -------- Broadcasting Transactions --------
0 commit comments