Skip to content
LogoLogo

Configuration

Config lives in deployoor.config.ts at your project root. Every field is optional.

import { defineConfig } from "deployoor";
import { etherscan } from "@deployoor/etherscan";
import { slack } from "@deployoor/slack";
 
export default defineConfig({
  include: ["Token", "Vault"], // default: every contract with bytecode
  out: "./deployers", // generated deployers output
  deploymentsPath: "./deployments", // deployment records
  plugins: [etherscan({ apiKey: process.env.ETHERSCAN_KEY! }), slack({ webhook: process.env.SLACK_HOOK! })],
  onPluginError: "warn", // "warn" (default) or "throw"
});

Options

OptionDefaultDescription
includeall deployable contractsFilter by contract name
out./deployersWhere typed deployers are written
deploymentsPath./deploymentsWhere JSON records are read/written
plugins[]Deploy-lifecycle hooks
onPluginError"warn""throw" fails the run on plugin error

Per-deploy plugin overrides

Skip or customize plugins for a single deploy:

await getOrDeployVault({
  ...clients,
  args: [token.address],
  plugins: { etherscan: false },
});

In tests, disable verifiers and notifiers:

await getOrDeployToken({
  ...clients,
  args: [owner],
  plugins: { slack: false, etherscan: false },
});

In-memory store (tests)

Pass a store override to keep deploys off disk:

import { memoryStore } from "deployoor";
 
await getOrDeployToken({
  ...clients,
  args: [owner],
  store: memoryStore(),
});

@deployoor/testing's createTestClients() passes an in-memory store automatically when you spread clients.