Module clone

Source

Structs§

CloneArgs
CLI arguments for forge clone.
CloneMetadata
CloneMetadata stores the metadata that are not included by foundry.toml but necessary for a cloned contract. The metadata can be serialized to a metadata file in the cloned project root.

Traits§

EtherscanClient 🔒
EtherscanClient is a trait that defines the methods to interact with Etherscan. It is defined as a wrapper of the foundry_block_explorers::Client to allow mocking.

Functions§

compile_project
Compile the project in the root directory, and return the compilation result.
dump_sources 🔒
Dump the contract sources to the root directory. The sources are dumped to the src directory. IO errors may be returned. A list of remappings is returned
find_main_contract
Find the artifact of the contract with the specified name. This function returns the path to the source file and the artifact.
update_config_by_metadata 🔒
Update the configuration file with the metadata. This function will update the configuration file with the metadata from the contract. It will update the following fields: