|
1 | | -import { HardhatUserConfig } from 'hardhat/config'; |
2 | 1 | import '@nomicfoundation/hardhat-toolbox'; |
3 | | -import '@nomiclabs/hardhat-etherscan'; |
| 2 | +import { HardhatUserConfig } from 'hardhat/config'; |
| 3 | +import { env } from './config/env'; |
4 | 4 |
|
5 | | -const { WALLET_PRIVATE_KEY } = process.env; |
| 5 | +const privateKey = env.WALLET_PRIVATE_KEY; |
6 | 6 |
|
7 | 7 | const config: HardhatUserConfig = { |
8 | | - defaultNetwork: 'hardhat', |
9 | | - networks: { |
10 | | - hardhat: {}, |
11 | | - // modify with the dev network when the environment is ready |
12 | | - bellecour: { |
13 | | - url: 'https://bellecour.iex.ec', |
14 | | - gasPrice: 0, |
15 | | - accounts: WALLET_PRIVATE_KEY ? [WALLET_PRIVATE_KEY] : [], |
16 | | - }, |
17 | | - // poco-chain native config |
18 | | - 'dev-native': { |
19 | | - chainId: 65535, |
20 | | - url: process.env.RPC_URL ?? 'http://localhost:8545', |
21 | | - accounts: { |
22 | | - mnemonic: process.env.MNEMONIC ?? '', |
23 | | - }, |
24 | | - gasPrice: 0, |
| 8 | + networks: { |
| 9 | + hardhat: { |
| 10 | + forking: { |
| 11 | + enabled: true, |
| 12 | + url: 'https://bellecour.iex.ec', |
| 13 | + }, |
| 14 | + }, |
| 15 | + // modify with the dev network when the environment is ready |
| 16 | + bellecour: { |
| 17 | + url: 'https://bellecour.iex.ec', |
| 18 | + gasPrice: 0, |
| 19 | + accounts: privateKey ? [privateKey] : [], |
| 20 | + }, |
| 21 | + // poco-chain native config |
| 22 | + 'dev-native': { |
| 23 | + chainId: 65535, |
| 24 | + url: env.RPC_URL ?? 'http://localhost:8545', |
| 25 | + accounts: { |
| 26 | + mnemonic: env.MNEMONIC ?? '', |
| 27 | + }, |
| 28 | + gasPrice: 0, |
| 29 | + }, |
25 | 30 | }, |
26 | | - }, |
27 | | - //to verify contract on Blockscout |
28 | | - etherscan: { |
29 | | - apiKey: { |
30 | | - bellecour: 'abc', |
| 31 | + //to verify contract on Blockscout |
| 32 | + etherscan: { |
| 33 | + apiKey: { |
| 34 | + bellecour: 'abc', |
| 35 | + }, |
| 36 | + customChains: [ |
| 37 | + { |
| 38 | + network: 'bellecour', |
| 39 | + chainId: 134, |
| 40 | + urls: { |
| 41 | + apiURL: 'https://blockscout.bellecour.iex.ec/api', |
| 42 | + browserURL: 'https://blockscout.bellecour.iex.ec', |
| 43 | + }, |
| 44 | + }, |
| 45 | + ], |
31 | 46 | }, |
32 | | - customChains: [ |
33 | | - { |
34 | | - network: 'bellecour', |
35 | | - chainId: 134, |
36 | | - urls: { |
37 | | - apiURL: 'https://blockscout.bellecour.iex.ec/api', |
38 | | - browserURL: 'https://blockscout.bellecour.iex.ec', |
| 47 | + //compiler version |
| 48 | + solidity: { |
| 49 | + version: '0.8.19', |
| 50 | + settings: { |
| 51 | + optimizer: { |
| 52 | + enabled: true, |
| 53 | + runs: 200, |
| 54 | + }, |
39 | 55 | }, |
40 | | - }, |
41 | | - ], |
42 | | - }, |
43 | | - //compiler version |
44 | | - solidity: { |
45 | | - version: '0.8.19', |
46 | | - settings: { |
47 | | - optimizer: { |
48 | | - enabled: true, |
49 | | - runs: 200, |
50 | | - }, |
51 | 56 | }, |
52 | | - }, |
53 | 57 | }; |
54 | 58 | export default config; |
0 commit comments