foundry_evm_coverage::inspector

Function get_or_insert_contract_hash

Source
fn get_or_insert_contract_hash(interpreter: &mut Interpreter) -> &B256
Expand description

Helper function for extracting contract hash used to record coverage hit map.

If the contract hash is zero (contract not yet created but it’s going to be created in current tx) then the hash is calculated from the bytecode.