Deploy and configure CreatorVault vault infrastructure (CreatorOVault, wrapper, ShareOFT, gauge, CCA strategy, oracle) and optionally post-deploy strategies/payout routing...
script/DeployInfrastructure.s.sol and script/deploy.shscript/deploy-with-aa.ts (and frontend/src/pages/DeployVault.tsx for the UI flow)contracts/helpers/batchers/CreatorVaultDeployer.sol (Phase 1–2; Phase 3 is strategies)./script/deploy.sh infra-v2 → script/DeployBaseMainnetDeployer.s.solcontracts/helpers/batchers/StrategyDeploymentBatcher.sol, contracts/helpers/batchers/VaultActivationBatcher.sol.env contents in output.There are multiple layers:
script/DeployInfrastructure.s.sol)CreatorOVault (ERC-4626 vault)CreatorOVaultWrapperCreatorShareOFT (wrapped shares; tradable token)CreatorGaugeControllerCCALaunchStrategy (auction / launch mechanism)CreatorOraclePayoutRouter)PRIVATE_KEY, RPC_URL (or BASE_RPC_URL for v2 deployer), ETHERSCAN_API_KEY/BaseScan keyCREATOR_FACTORYdeploy-with-aa.ts):SMART_ACCOUNT, PRIVATE_KEY, CREATOR_FACTORYBASE_RPC_URL, BUNDLER_URL, PAYMASTER_URL, PAYOUT_ROUTER_FACTORYDeployVault.tsx):VITE_PRIVY_*, server PRIVY_*), and the user must sign in with Privy or connect an external wallet that can operate the canonical smart wallet.script/DeployInfrastructure.s.sol (core infra + DeployCreatorVault per creator)script/deploy.sh (wrapper for infra/vault/AA deploy)script/DeployBaseMainnetDeployer.s.sol (used by ./script/deploy.sh infra-v2)script/deploy-with-aa.ts (UserOp deployment via bundler/paymaster)frontend/src/pages/DeployVault.tsx (Privy + smart wallet 1-click deploy; can also operate via external owner wallet in some flows)contracts/helpers/batchers/CreatorVaultDeployer.sol (Phase 1: vault/wrapper/shareOFT; Phase 2: gauge/cca/oracle + deposit/auction; Phase 3: strategies)contracts/helpers/batchers/StrategyDeploymentBatcher.sol (Charm + optional Ajna strategies)contracts/helpers/batchers/VaultActivationBatcher.sol (activates vault + can trigger launch)contracts/helpers/routers/PayoutRouter.soldocs/deployment/REQUIRED_APPROVALS_CHECKLIST.mddocs/deployment/PRE_LAUNCH_VERIFICATION.mddocs/deployment/CCA_DEPLOYMENT_VERIFICATION.mdUse templates like:
# Ensure RPC works and you’re on the expected chain
cast chain-id --rpc-url $RPC_URL
# Check whether a creator coin is already registered/deployed.
#
# IMPORTANT: This repo has had multiple infra deployments over time. For existing creator coins, you may need to
# check the *legacy* registry/factory (from env/config) rather than the latest defaults.
# 1) Registry is the source of truth for what the app should use.
cast call --rpc-url $RPC_URL $CREATOR_REGISTRY "getVaultForToken(address)(address)" $CREATOR_COIN
# 2) Factory is useful to see “which stack was registered by which infra deploy”.
cast call --rpc-url $RPC_URL $CREATOR_FACTORY "isDeployed(address)(bool)" $CREATOR_COIN
cast call --rpc-url $RPC_URL $CREATOR_FACTORY "getDeployment(address)((address,address,address,address,address,address,address,address,uint256,bool))" $CREATOR_COIN
If you’re using the multi-phase deployer, prefer checking deterministic addresses first (computeAddress/create2) rather than “guessing”.
Preferred wrapper:
./script/deploy.sh infrastructureOr directly:
forge script script/DeployInfrastructure.s.sol:DeployInfrastructure --rpc-url $RPC_URL --broadcast --verify -vvvvOutputs/verification:
broadcast/**Wrapper:
./script/deploy.sh vault $CREATOR_COIN_ADDRESSThis runs:
script/DeployInfrastructure.s.sol:DeployCreatorVault with CREATOR_COIN_ADDRESS setPost-checks:
CreatorOVaultFactory (via registerDeployment)CreatorOVaultFactory.registry was set)Wrapper:
./script/deploy.sh aa $CREATOR_COIN_ADDRESS --gaslessUnder the hood:
npx ts-node script/deploy-with-aa.ts <CREATOR_COIN> [--gasless]Notes:
EntryPoint, smart account) and the bundler/paymaster.Reality check (AA CLI vs UI):
creatorVaultBatcher, vaultActivationBatcher) and submits UserOperations via Coinbase.script/deploy-with-aa.ts, called by ./script/deploy.sh aa) may be stale depending on the currently deployed factory shape; validate its target contract ABI before relying on it for production deployments.CreatorVaultDeployer (Phase 1–3)Use when Base code-deposit limits prevent “all-in-one” deploys, or when you want deterministic CREATE2 addresses + phased execution.
The most common “gotcha” is approvals for launch/batchers. See:
docs/deployment/REQUIRED_APPROVALS_CHECKLIST.mdCommon required approvals (high level):
CCALaunchStrategy.setApprovedLauncher(vaultActivationBatcher, true)StrategyDeploymentBatcher (so it can transferFrom during batch calls)CreatorOVaultFactory.registerDeployment reverts if deployments[token].exists == truesetApprovedLauncher(...) approval on CCA strategy (protocol owner action)Return a structured result: