-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
54 lines (45 loc) · 1.19 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
51
52
53
54
import dotenv from 'dotenv'
dotenv.config();
import "@nomiclabs/hardhat-truffle5";
require("@nomiclabs/hardhat-web3");
import {task} from "hardhat/config";
import "solidity-coverage";
import "@nomiclabs/hardhat-waffle";
const {
INFURA_KEY,
MNEMONIC,
ETHERSCAN_API_KEY,
PRIVATE_KEY,
PRIVATE_KEY_TESTNET
} = process.env;
const accountsTestnet = PRIVATE_KEY_TESTNET
? [PRIVATE_KEY_TESTNET]
: {mnemonic: MNEMONIC};
const accountsMainnet = PRIVATE_KEY
? [PRIVATE_KEY]
: {mnemonic: MNEMONIC};
/**
* @type import('hardhat/config').HardhatUserConfig
*/
export default {
solidity: "0.8.9",
networks: {
hardhat: {},
mainnet: {
url: `https://mainnet.infura.io/v3/${INFURA_KEY}`,
accounts: accountsMainnet,
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${INFURA_KEY}`,
accounts: accountsTestnet,
},
polygon: {
url: `https://polygon-mainnet.infura.io/v3/${INFURA_KEY}`,
accounts: accountsMainnet,
},
mumbai: {
url: `https://polygon-mumbai.infura.io/v3/${INFURA_KEY}`,
accounts: accountsTestnet,
}
}
};