Skip to main content

Module env

Module env 

Source
Expand description

Implementations of Environment cheatcodes.

StaticsΒ§

FORGE_CONTEXT
Stores the forge execution context for the duration of the program.

FunctionsΒ§

current_execution_context
Returns the current forge execution context, if it has been set.
env πŸ”’
env_array πŸ”’
env_array_default πŸ”’
env_default πŸ”’
env_is_missing πŸ”’
Returns true if the variable is not set at all. The envOr cheatcodes fall back to their default only then (or when the variable is set but empty, for the scalar typed overloads); a variable that is set to a value that cannot be parsed is an error.
get_env πŸ”’
map_env_err πŸ”’
Converts the error message of a failed parsing attempt to a more user-friendly message that doesn’t leak the value.
set_execution_context
Set forge command current execution context for the duration of the program. Execution context is immutable, subsequent calls of this function won’t change the context.