This folder contains scripts for deploying contracts that exist on any chain (both settlement and app chains). A single deployment refers to deploying a new proxy and implementation pair for a given contract.
These contracts are base-layer infrastructure (e.g. the Factory) that other contracts are deployed through or depend on at deploy time, rather than at runtime.
Important: Admin is NOT Required for Contract Deployment.
A newly deployed contract's initial state is set via constructor and initializer parameters, NOT from the parameter registry. Anyone with gas tokens can deploy a contract. Where admin rights are needed for post-deployment steps, the exact steps are documented in the per-contract .md files.
Complete all subsections below before starting any deployment listed in the Supported Deployments section.
Set environment before running any commands:
export ENVIRONMENT=testnet # or: testnet-dev, testnet-staging, mainnetOnly the deployer key is needed. No admin key is required — all contracts in this folder are deployed and verified using only the DEPLOYER.
DEPLOYER_PRIVATE_KEY=... # Deployer private key
BASE_SEPOLIA_RPC_URL=... # Settlement chain RPC endpoint (or mainnet equivalent)
ETHERSCAN_API_KEY=... # For contract verification
ETHERSCAN_API_URL=https://api-sepolia.basescan.org/apiEnsure the following fields are defined correctly for your chosen environment:
{
"factory": "0x...",
"parameterRegistryProxy": "0x...",
"deployer": "0x..."
}Additional per-contract fields (like salts) are documented in each contract's deployment guide.
After completing the prerequisites in section 2 above, follow the remaining steps according to the contract being deployed:
| Contract | Deployment Guide | Script |
|---|---|---|
| Factory | deploy-factory.md | DeployFactory.s.sol |
After a successful deployment:
-
Verify the implementation contract on the block explorer:
# Base Sepolia (testnet-dev, testnet-staging, testnet) forge verify-contract --chain-id 84532 <impl-address> src/any-chain/Factory.sol:Factory # Base Mainnet forge verify-contract --chain-id 8453 <impl-address> src/any-chain/Factory.sol:Factory
-
Confirm that
environments/<environment>.jsonwas updated with the new Factory address (written automatically bydeployContract()in Step 2). -
Update
config/<environment>.jsonwith the newfactory,factoryImplementation, andinitializableImplementationaddresses (see the per-contract deployment guide for details).