-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
50 lines (44 loc) · 1.01 KB
/
hardhat.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import dotenv from 'dotenv';
import { HardhatUserConfig } from 'hardhat/config';
import { HARDHAT_PROVIDER_URL } from './constants';
import 'hardhat-deploy';
import 'hardhat-deploy-ethers';
import '@typechain/hardhat';
import 'solidity-coverage';
import '@nomiclabs/hardhat-etherscan';
dotenv.config();
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
const config: HardhatUserConfig = {
solidity: {
version: '0.8.12',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
defaultNetwork: 'hardhat',
networks: {
hardhat: {
// the url is 'http://localhost:8545' but you should not define it
},
localhost: {
url: HARDHAT_PROVIDER_URL,
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_ID}`,
accounts: [process.env.DEPLOYER_PRIVATE_KEY as string],
},
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
namedAccounts: {
deployer: 0,
user1: 1,
user2: 2,
},
};
export default config;