Skip to content

Configuration

The midl field in your Hardhat config enables integration with the MIDL Hardhat plugin. Below is the configuration reference:

Options

OptionTypeDescription
pathstring (optional)Path to deployments directory
networksRecord<string, NetworkConfig>Network configurations (see below)

NetworkConfig

OptionTypeDescription
mnemonicstringMnemonic phrase for wallet
confirmationsRequirednumber (optional)EVM confirmations required
btcConfirmationsRequirednumber (optional)BTC confirmations required
networkstring | BitcoinNetwork (optional)Bitcoin network or name
hardhatNetworkstring (optional)Name of the Hardhat network to use
providerAbstractProvider (optional)Custom BTC data provider
defaultPurposeAddressPurpose (optional)Default purpose for wallet

Example

ts
import { AddressPurpose } from "@midl/core";

export default {
  midl: {
    path: "deployments",
    networks: {
      default: {
        mnemonic: "test test test ...",
        confirmationsRequired: 5,
        btcConfirmationsRequired: 1,
        network: "regtest",
        hardhatNetwork: "regtest",
        defaultPurpose: AddressPurpose.Payment
      },
    },
  },
};

See the API Reference for more details on usage.