Skip to main content

Module runner

Module runner 

Source
Expand description

The runner module

Structs§

Env
Container for EVM environment (cfg + block) and transaction.
TestRunner
Runs test macros on Foundry’s executor, with its cheatcodes, tracer and log collector.

Constants§

DEFAULT_INITIAL_BALANCE 🔒
Foundry’s default --initial-balance: 2^96 - 1 wei

Functions§

apply_env_overrides 🔒
Sets the transaction and block fields a test overrides, on top of the runner’s environment
call_base_gas 🔒
Intrinsic gas of a call transaction to another account, excluding calldata and access lists
cheats_config
Settings for Foundry cheatcodes in hnc test. A failed vm.assert* reverts, as in forge test, so the test stops there and the failure survives a vm.revertToState.
db_error 🔒
Wraps a database failure as a runner error
decode_hex 🔒
Decodes hex the runner was given, such as compiled code or calldata, naming it in the error
huff_functions 🔒
Where each outlined function of the compiled test starts, so traces can show its calls
outcome_of 🔒
How a call ended, with Foundry’s exit reason turned back into the EVM’s halt reason, so OutOfGas covers every kind of out-of-gas halt
skipped_result 🔒
The result of a test a skip flag skips, which does not run
use_sender_nonce 🔒
Sends the next transaction of the sender with its current nonce