build_contracts

Function build_contracts 

Source
pub fn build_contracts(contract_dirs: Vec<&str>)
Expand description

Build the Smart contracts at the specified directories.

This function will automatically rerun the build if changes are detected in the src directory within any of the directories specified. Due to this, it is recommended to ensure that you only pass in directories that contain the src directory and won’t be modified by anything else in the build script (otherwise, the build will always rerun).

§Panics

  • If the Cargo Manifest directory is not found.
  • If the forge executable is not found.
  • If the foundry.toml file is not found in any of the specified directories