Skip to main content

Module fork

Module fork 

Source

Functionsยง

check_broadcast ๐Ÿ”’
convert_to_bytes ๐Ÿ”’
Convert fixed bytes and address values to bytes in order to prevent encoding issues.
create_fork ๐Ÿ”’
Creates a new fork
create_fork_at_transaction ๐Ÿ”’
Creates a new fork at the given transaction
create_fork_request ๐Ÿ”’
Creates the request object for a new fork request
create_select_fork ๐Ÿ”’
Creates and then also selects the new fork
create_select_fork_at_transaction ๐Ÿ”’
Creates and then also selects the new fork at the given transaction
fork_env_op ๐Ÿ”’
Clones the EVM and tx environments, runs a fork operation that may modify them, then writes them back. This is the common pattern for all fork-switching cheatcodes (rollFork, selectFork, createSelectFork).
invalidate_active_fork_cache ๐Ÿ”’
Invalidates the fork DB cache after a vm.rpc call on the active fork that mutates the node directly (bypassing the cache), so later DB reads (e.g. the broadcast simulation runner) re-fetch the new value. Only well-known Anvil/Hardhat account/storage setters are handled; chain-advancing methods (e.g. eth_sendTransaction) need re-forking, not eviction.
persist_caller ๐Ÿ”’
rpc_call ๐Ÿ”’
Performs an Ethereum JSON-RPC request to the given endpoint.
rpc_json_call ๐Ÿ”’
Performs an Ethereum JSON-RPC request to the given endpoint and returns the JSON result.
rpc_result ๐Ÿ”’
transact ๐Ÿ”’