Module util

Module util 

Source

Structs§

ExtTester
External test builder
RemoteProject
How to initialize a remote git project
TestCommand
A simple wrapper around a Command with some conveniences.
TestProject
TestProject represents a temporary project to run tests against.

Constants§

FORGE_STD_REVISION
The commit of forge-std to use.
OTHER_SOLC_VERSION
Another Solc version used when compiling tests.
SOLC_VERSION
The default Solc version used when compiling tests.

Statics§

IS_TTY
Stores whether stdout is a tty / terminal.
TEMPLATE_LOCK 🔒
Global default template lock. If its contents are not exactly "1", the global template will be re-initialized. See initialize() for more info.
TEMPLATE_PATH 🔒
Global default template path. Contains the global template project from which all other temp projects are initialized. See initialize() for more info.

Traits§

OutputExt
Extension trait for Output.

Functions§

clone_remote
Clones a remote repository into the specified directory. Panics if the command fails.
get_compiled
Compile the project with a lock for the cache.
get_vyper
Installs Vyper if it’s not already present.
initialize
Initializes a project with forge init at the given path from a template directory.
lossy_string
pretty_err
read_string
setup_cast
setup_cast_project
setup_forge
Setup an empty test project and return a command pointing to the forge executable whose CWD is set to the project’s root.
setup_forge_project
setup_forge_remote
Setups a new local forge project by cloning and initializing the RemoteProject
try_setup_forge_remote
Same as setup_forge_remote but not panicking

Type Aliases§

RegexRedaction
A tuple of a placeholder and a regex replacement string.