diff --git a/packages/deploy/hardhat.config.ts b/packages/deploy/hardhat.config.ts index 11fd5b882f..0e5a435f1e 100644 --- a/packages/deploy/hardhat.config.ts +++ b/packages/deploy/hardhat.config.ts @@ -320,12 +320,34 @@ const namedAccounts = { /** * TAGS: * - mainnet -> production networks (you must pay for gas!!!) - * - L1 -> Layer 1 networks - * - L2 -> Layer 2 networks + * - L1, L1-prod, L1-test -> Layer 1 networks + * - L2, L2-prod, L2-test -> Layer 2 networks */ +enum NETWORKS { + SEPOLIA = 11155111, + MAINNET = 1, + AMOY = 80002, + POLYGON = 137, + BASESEPOLIA = 84532, + BASE = 8453, + BSCTESTNET = 97, + BSCMAINNET = 56, +} + +enum DEPLOY_NETWORKS { + SEPOLIA = 'sepolia', + MAINNET = 'mainnet', + BSCTESTNET = 'bscTestnet', + BSCMAINNET = 'bscMainnet', + AMOY = 'amoy', + POLYGON = 'polygon', + BASESEPOLIA = 'baseSepolia', + BASE = 'base', +} + const networks = { hardhat: { - tags: ['L1', 'L2'], + tags: ['L1', 'L1-prod', 'L1-test', 'L2', 'L2-prod', 'L2-test'], deploy: ['deploy_mocks/', 'deploy/'], companionNetworks: { l1: 'hardhat', @@ -344,66 +366,66 @@ const networks = { l2: 'mumbai', }, }, - sepolia: { - tags: ['L1'], + [DEPLOY_NETWORKS.SEPOLIA]: { + tags: ['L1', 'L1-test'], companionNetworks: { - l2: 'amoy', - bsc: 'bscTestnet', - base: 'baseSepolia', + [NETWORKS.AMOY]: [DEPLOY_NETWORKS.AMOY], + [NETWORKS.BASESEPOLIA]: [DEPLOY_NETWORKS.BASESEPOLIA], + [NETWORKS.BSCTESTNET]: [DEPLOY_NETWORKS.BSCTESTNET], }, }, - mainnet: { - tags: ['mainnet', 'L1'], + [DEPLOY_NETWORKS.MAINNET]: { + tags: ['mainnet', 'L1', 'L1-prod'], companionNetworks: { - l2: 'polygon', - bsc: 'bscMainnet', - base: 'base', + [NETWORKS.POLYGON]: [DEPLOY_NETWORKS.POLYGON], + [NETWORKS.BASE]: [DEPLOY_NETWORKS.BASE], + [NETWORKS.BSCMAINNET]: [DEPLOY_NETWORKS.BSCMAINNET], }, }, - baseSepolia: { - tags: ['L2'], + [DEPLOY_NETWORKS.BSCTESTNET]: { + tags: ['L1', 'L1-test'], companionNetworks: { - ethereum: 'sepolia', - bsc: 'bscTestnet', + [NETWORKS.SEPOLIA]: [DEPLOY_NETWORKS.SEPOLIA], + [NETWORKS.BASESEPOLIA]: [DEPLOY_NETWORKS.BASESEPOLIA], }, }, - base: { - tags: ['L2'], + [DEPLOY_NETWORKS.BSCMAINNET]: { + tags: ['L1', 'L1-prod'], companionNetworks: { - ethereum: 'mainnet', - bsc: 'bscMainnet', + [NETWORKS.MAINNET]: [DEPLOY_NETWORKS.MAINNET], + [NETWORKS.BASE]: [DEPLOY_NETWORKS.BASE], }, }, - bscTestnet: { - tags: ['L1'], + mumbai: { + tags: ['L2'], companionNetworks: { - ethereum: 'sepolia', - base: 'baseSepolia', + l1: 'goerli', }, }, - bscMainnet: { - tags: ['L1'], + [DEPLOY_NETWORKS.AMOY]: { + tags: ['L2', 'L2-test'], companionNetworks: { - ethereum: 'mainnet', - base: 'base', + [NETWORKS.SEPOLIA]: [DEPLOY_NETWORKS.SEPOLIA], }, }, - mumbai: { - tags: ['L2'], + [DEPLOY_NETWORKS.POLYGON]: { + tags: ['L2', 'L2-prod'], companionNetworks: { - l1: 'goerli', + [NETWORKS.MAINNET]: [DEPLOY_NETWORKS.MAINNET], }, }, - amoy: { - tags: ['L2'], + [DEPLOY_NETWORKS.BASESEPOLIA]: { + tags: ['L2', 'L2-test'], companionNetworks: { - l1: 'sepolia', + [NETWORKS.SEPOLIA]: [DEPLOY_NETWORKS.SEPOLIA], + [NETWORKS.BSCTESTNET]: [DEPLOY_NETWORKS.BSCTESTNET], }, }, - polygon: { - tags: ['mainnet', 'L2'], + [DEPLOY_NETWORKS.BASE]: { + tags: ['L2', 'L2-prod'], companionNetworks: { - l1: 'mainnet', + [NETWORKS.MAINNET]: [DEPLOY_NETWORKS.MAINNET], + [NETWORKS.BSCMAINNET]: [DEPLOY_NETWORKS.BSCMAINNET], }, }, };