|
| 1 | +import type { HardhatUserConfig } from 'hardhat/config'; |
| 2 | + |
| 3 | +import '@matterlabs/hardhat-zksync'; |
| 4 | + |
| 5 | +import dotenv from 'dotenv'; |
| 6 | +dotenv.config(); |
| 7 | + |
| 8 | +const config: HardhatUserConfig = { |
| 9 | + defaultNetwork: 'ZKsyncEraSepolia', |
| 10 | + networks: { |
| 11 | + ZKsyncEraSepolia: { |
| 12 | + url: 'https://sepolia.era.zksync.dev', |
| 13 | + ethNetwork: 'sepolia', |
| 14 | + zksync: true, |
| 15 | + verifyURL: 'https://explorer.sepolia.era.zksync.dev/contract_verification', |
| 16 | + accounts: process.env.WALLET_PRIVATE_KEY ? [process.env.WALLET_PRIVATE_KEY] : [], |
| 17 | + }, |
| 18 | + ZKsyncEraMainnet: { |
| 19 | + url: 'https://mainnet.era.zksync.io', |
| 20 | + ethNetwork: 'mainnet', |
| 21 | + zksync: true, |
| 22 | + verifyURL: 'https://zksync2-mainnet-explorer.zksync.io/contract_verification', |
| 23 | + accounts: process.env.WALLET_PRIVATE_KEY ? [process.env.WALLET_PRIVATE_KEY] : [], |
| 24 | + }, |
| 25 | + dockerizedNode: { |
| 26 | + url: 'http://localhost:3050', |
| 27 | + ethNetwork: 'http://localhost:8545', |
| 28 | + zksync: true, |
| 29 | + accounts: process.env.WALLET_PRIVATE_KEY ? [process.env.WALLET_PRIVATE_KEY] : [], |
| 30 | + }, |
| 31 | + anvilZKsync: { |
| 32 | + url: 'http://127.0.0.1:8011', |
| 33 | + ethNetwork: 'localhost', // anvil doesn't support eth node; removing this line will cause an error |
| 34 | + zksync: true, |
| 35 | + accounts: process.env.WALLET_PRIVATE_KEY ? [process.env.WALLET_PRIVATE_KEY] : [], |
| 36 | + }, |
| 37 | + hardhat: { |
| 38 | + zksync: true, |
| 39 | + }, |
| 40 | + }, |
| 41 | + zksolc: { |
| 42 | + version: 'latest', |
| 43 | + settings: { |
| 44 | + // find all available options in the official documentation |
| 45 | + // https://docs.zksync.io/build/tooling/hardhat/hardhat-zksync-solc#configuration |
| 46 | + }, |
| 47 | + }, |
| 48 | + solidity: { |
| 49 | + version: '0.8.24', |
| 50 | + }, |
| 51 | +}; |
| 52 | + |
| 53 | +export default config; |
0 commit comments