-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
49 lines (45 loc) · 998 Bytes
/
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
import { HardhatUserConfig } from "hardhat/types";
import "@nomiclabs/hardhat-waffle";
import "@typechain/hardhat";
import * as dotenv from 'dotenv';
dotenv.config();
const chainIds = {
ganache: 1337,
goerli: 5,
hardhat: 31337,
kovan: 42,
mainnet: 1,
rinkeby: 4,
ropsten: 3,
};
const INFURA_API_KEY = process.env.INFURA_API_KEY || "";
const PRIVATE_KEY = process.env.PRIVATE_KEY || "";
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
chainId: chainIds.hardhat,
forking: { // mainnet fork
url: `https://mainnet.infura.io/v3/${INFURA_API_KEY}`,
blockNumber: 13718340
}
},
ropsten: {
url: `https://ropsten.infura.io/v3/${INFURA_API_KEY}`,
chainId: chainIds.ropsten,
accounts: [`0x${PRIVATE_KEY}`]
}
},
solidity: {
compilers: [
{
version: "0.6.12",
settings: {}
}
],
},
mocha: {
timeout: 80000
}
};
export default config;