"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const dotenv_1 = require("dotenv");
require("hardhat-diamond-abi");
require("@typechain/hardhat");
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-waffle");
require("hardhat-gas-reporter");
require("hardhat-deploy");
require("solidity-coverage");
require("@nomiclabs/hardhat-etherscan");
require("@openzeppelin/hardhat-upgrades");
require("hardhat-contract-sizer");
require("hardhat-abi-exporter");
require("./tasks/addWatcher");
require("./tasks/addAdmin");
require("./tasks/setupRouter");
require("./tasks/setupAsset");
require("./tasks/addLiquidity");
require("./tasks/mintTestToken");
require("./tasks/setupTestRouter");
require("./tasks/renounceOwnership");
require("./tasks/proposeTransferOwnership");
require("./tasks/setAggregator");
require("./tasks/setDexPrice");
require("./tasks/setDirectPrice");
require("./tasks/debugCustomError");
require("./tasks/decodeInputData");
require("./tasks/removeRouter");
require("./tasks/enrollHandlers");
require("./tasks/dustSelfAccounts");
require("./tasks/xcall");
require("./tasks/readBalances");
require("./tasks/preflight");
require("./tasks/addRelayer");
require("./tasks/executeEstimateGas");
require("./tasks/exportAbi");
require("./tasks/stableswap/initializeSwap");
require("./tasks/stableswap/addSwapLiquidity");
require("./tasks/stableswap/removeSwapLiquidity");
require("./tasks/stableswap/setSwapFees");
require("./tasks/connector/send");
require("./tasks/connector/setDelayBlocks");
require("./tasks/rootmanager/propagate");
require("./tasks/rootmanager/setDelayBlocks");
require("./tasks/setMirrorConnectors");
require("./tasks/addSequencer");
require("./tasks/setXAppConnectionManager");
require("./tasks/queryRoots");
require("./tasks/submitExitProof");
require("./tasks/addConnectors");
require("./tasks/connector/proveAndProcess");
require("./tasks/addSender");
require("./tasks/connector/processFromRoot");
require("./tasks/connector/redeem");
require("./tasks/pause");
require("./tasks/unpause");
require("./tasks/bumpTransfer");
const config_1 = require("./src/config");
(0, dotenv_1.config)();
const config = {
    solidity: {
        compilers: [
            {
                version: "0.8.17",
                settings: {
                    optimizer: {
                        enabled: true,
                        runs: 200,
                    },
                },
            },
            {
                version: "0.7.6",
                settings: {},
            },
        ],
    },
    paths: {
        artifacts: "./artifacts",
        sources: "./contracts",
        tests: "./test",
    },
    defaultNetwork: "hardhat",
    namedAccounts: {
        deployer: { default: 0 },
        alice: { default: 1 },
        bob: { default: 2 },
        rando: { default: 3 },
    },
    networks: config_1.hardhatNetworks,
    etherscan: {
        apiKey: {
            // testnets
            rinkeby: process.env.ETHERSCAN_API_KEY,
            kovan: process.env.ETHERSCAN_API_KEY,
            ropsten: process.env.ETHERSCAN_API_KEY,
            goerli: process.env.ETHERSCAN_API_KEY,
            "optimism-goerli": process.env.OPTIMISM_ETHERSCAN_API_KEY,
            "gnosis-testnet": process.env.GNOSISSCAN_API_KEY,
            mumbai: process.env.POLYGONSCAN_API_KEY,
            chapel: process.env.BNBSCAN_API_KEY,
            // mainnets
            mainnet: process.env.ETHERSCAN_API_KEY,
            matic: process.env.POLYGONSCAN_API_KEY,
            optimism: process.env.OPTIMISM_ETHERSCAN_API_KEY,
            bnb: process.env.BNBSCAN_API_KEY,
            "arbitrum-one": process.env.ARBISCAN_API_KEY,
            xdai: process.env.GNOSISSCAN_API_KEY,
        },
        customChains: [
            {
                network: "optimism-goerli",
                chainId: 420,
                urls: {
                    apiURL: "https://blockscout.com/optimism/goerli/api",
                    browserURL: "https://blockscout.com/optimism/goerli",
                },
            },
            {
                network: "gnosis-testnet",
                chainId: 10200,
                urls: {
                    apiURL: "https://blockscout.chiadochain.net/api",
                    browserURL: "https://blockscout.chiadochain.net",
                },
            },
        ],
    },
    gasReporter: {
        enabled: process.env.REPORT_GAS == "true",
    },
    diamondAbi: {
        // (required) The name of your Diamond ABI.
        name: "Connext",
        // (optional) An array of strings, matched against fully qualified contract names, to
        // determine which contracts are included in your Diamond ABI.
        include: [
            "TokenFacet",
            "BaseConnextFacet",
            "BridgeFacet",
            "DiamondCutFacet",
            "DiamondLoupeFacet",
            "NomadFacet",
            "ProposedOwnableFacet",
            "RelayerFacet",
            "RoutersFacet",
            "StableSwapFacet",
            "PortalFacet",
        ],
        strict: false,
        filter: function (abiElement, index, fullAbi, fullyQualifiedName) {
            const contractName = fullyQualifiedName.split(":")[1];
            if (abiElement.type === "error" && abiElement.name.includes("Facet") && !abiElement.name.includes(contractName)) {
                return false;
            }
            return true;
        },
    },
    typechain: {
        outDir: "src/typechain-types",
    },
    abiExporter: {
        path: "./abi",
        runOnCompile: true,
        clear: true,
        spacing: 2,
        pretty: true,
    },
};
exports.default = config;
//# sourceMappingURL=hardhat.config.js.map