v0.9.1
Added
-
vm.getEnvcheatcode to read environment variables as strings:function getEnv(string calldata key) external returns (string memory value); function getEnv(string calldata key, string calldata defaultValue) external returns (string memory value);
The single-argument form reverts when the key is missing:
Failed to get environment variable FOO as type string: environment variable not foundThe two-argument form returns
defaultValuewhen the key is missing. -
Automatic
.envloading from the project directory (defaults to the current
working directory). Values are available tovm.getEnv. Existing process
environment variables take precedence over.env. -
vm.forkcheatcode to create or select a remote chain fork:struct ForkConfig { uint32 retries; uint64 backoffMs; uint64 timeoutMs; uint64 rateLimit; } function fork(string calldata url, uint256 blockNumber) external; function fork(string calldata url, uint256 blockNumber, ForkConfig config) external;
Campaigns always start as an empty sandbox. Call
vm.forkinsetupor
action modifiers to opt into remote state. Multiple forks are cached and
selected by(url, block). Local accounts (harness, deployer,vm.addr
results) persist across switches. Remote state is isolated per fork, so the
same address on two chains (e.g. a bridge on Ethereum and Polygon) keeps
independent storage and balances. Coverage is keyed by bytecode hash, not
address. Single-argvm.forkdefaults: retries 3, backoff 100ms, timeout
30s, no rate limit (same as the former CLI defaults).
Changed
-
RVM address is now derived from
keccak256("ripfuzz cheatcode")instead of
Foundry'shevm cheat code:// before (Foundry HEVM) 0x7109709ECfa91a80626fF3989D68f67F5b1DD12D // after 0x628dC59F11F72B611132eC40437F125ba1312F08Harnesses must point
rvmat the new address (ripfuzz-stdHarnessalready
does this). -
ripfuzz run <HARNESS>accepts a bare harness name (Harness) or a full
artifact id (src/Harness.sol:Harness). When multiple contracts share the
same name, the command lists the matching full ids to choose from -
Upgraded solc dependency to v0.0.14
-
Campaign directory IDs include seconds
(.ripfuzz/campaigns/YYYY-MM-DD-HHMMSS-<uuid>/) so campaigns started in the
same minute are easier to tell apart -
Fork mode is driven entirely by
vm.forkin the harness. CLI flags
--rpc-url,--rpc-block,--rpc-retries,--rpc-backoff,
--rpc-timeout, and--rpc-rate-limitare removed. Single-arg
vm.fork(url, block)uses built-in defaults (retries 3, backoff 100ms,
timeout 30s, no rate limit). Override viavm.fork(url, block, ForkConfig) -
Removed the library helper
Chain::fork_with_transport. Tests and campaigns
create an empty sandbox and opt into remote state withvm.forkonly. -
Removed the startup log for spawning the test chain (including empty-sandbox
chain id, EVM version, block number, and timestamp). Empty vs fork is decided
at runtime byvm.fork, so those defaults were misleading
Fixed
-
vm.forknow applies the forked block's EVMSpecId(and matching mainnet
gas params) to the active chain config. Previously only the former
Chain::forkpath did this, so harnesses that calledvm.forkkept the
empty-sandbox hardfork instead of the remote chain's hardfork at that height
(opcodes, gas schedule, and blob base-fee fraction). -
Traces now surface calls to empty accounts clearly. A successful call with no
bytecode shows← [stop] (no code), and a parent empty revert that follows
such a call decodes asno contract code at <address>instead of plain
reverted. This makes--fail-on-revertfailures actionable when a harness
hits remote addresses withoutrvm.fork.