foundry_cheatcodes::fs

Function get_artifact_code

Source
fn get_artifact_code(
    state: &Cheatcodes,
    path: &str,
    deployed: bool,
) -> Result<Bytes>
Expand description

Returns the path to the json artifact depending on the input

Can parse following input formats:

  • path/to/artifact.json
  • path/to/contract.sol
  • path/to/contract.sol:ContractName
  • path/to/contract.sol:ContractName:0.8.23
  • path/to/contract.sol:0.8.23
  • ContractName
  • ContractName:0.8.23