Skip to main content

Module clone

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.
SourcifyClient πŸ”’
SourcifyClient is a client for interacting with Sourcify API.
SourcifyCompilation πŸ”’
SourcifyContractData πŸ”’
SourcifyDeployment πŸ”’
SourcifyErrorResponse πŸ”’
SourcifySourceFile πŸ”’

EnumsΒ§

SourceExplorer
Source explorer type for forge clone.
SourcifyContractResponse πŸ”’
Sourcify API response for contract files.

TraitsΒ§

ExplorerClient πŸ”’
ExplorerClient is a trait that defines the methods to interact with block explorers. 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
ensure_source_entrypoint πŸ”’
Ensure sources moved into lib remain buildable from the project’s src directory.
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.
source_import πŸ”’
Return a namespaced import for a source path that is safe to embed in Solidity.
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: