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Β§

CURRENT_DIR_LOCK πŸ”’
IS_TTY
Stores whether stdout is a tty / terminal.
NEXT_ID πŸ”’
Global test identifier.
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Β§

canonicalize πŸ”’
clone_remote
Clones a remote repository into the specified directory. Panics if the command fails.
config_paths_exist πŸ”’
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.
insert_redactions πŸ”’
lossy_string
make_redactions πŸ”’
Creates a [snapbox] redactions object from a list of regex redactions.
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
test_redactions πŸ”’
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.