Architecture Overview
rocketh Architecture
rocketh follows a modular architecture with several key components:
- Core Package (
rocketh): Provides the basic environment and deployment tracking functionality. - Deploy Package (
@rocketh/deploy): Adds thedeployfunction to the environment. - Proxy Package (
@rocketh/proxy): Adds proxy deployment capabilities. - Diamond Package (
@rocketh/diamond): Adds diamond pattern deployment capabilities. - Export Package (
@rocketh/export): Provides functionality to export deployments for use in frontends. - Verifier Package (
@rocketh/verifier): Provides contract verification capabilities for Etherscan, Sourcify, etc. - Doc Package (
@rocketh/doc): Generates documentation for deployed contracts. - Unknown Signer Package (
@rocketh/unknown-signer): AddscatchUnknownSigner, the non-interactive way to defer a call whosefromis an account rocketh cannot sign for. Optional: handling such accounts is built into rocketh itself, which by default pauses and asks you to execute the transaction (see Handling unknown signers). This package is mainly for migrating hardhat-deploy v1 scripts.
Each package extends the core with additional functionality, allowing you to use only what you need.
hardhat-deploy Architecture
hardhat-deploy integrates rocketh with Hardhat through:
- Plugin Registration: Registers the
deploytask with Hardhat. - Config Hook Handler: Processes Hardhat configuration to set up rocketh.
- Solidity Hook Handler: Processes Solidity compilation results for use with rocketh.
- Deploy Task: Executes deployment scripts using rocketh's
loadAndExecuteDeploymentsfunction.