-
Notifications
You must be signed in to change notification settings - Fork 3
/
hardhat.config.ts
66 lines (61 loc) · 1.34 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
55
56
57
58
59
60
61
62
63
64
65
66
import { HardhatUserConfig } from "hardhat/types";
import { config as dotEnvConfig } from "dotenv";
import "hardhat-typechain";
import "@nomiclabs/hardhat-waffle";
dotEnvConfig();
import * as packageJson from "./package.json";
import "./tasks";
const GANACHE_MNEMONIC =
"candy maple cake sugar pudding cream honey rich smooth crumble sweet treat";
const config: HardhatUserConfig = {
paths: {
sources: "./contracts",
tests: "./tests",
artifacts: "./artifacts",
},
solidity: {
compilers: [
{
version: packageJson.devDependencies.solc,
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
defaultNetwork: "hardhat",
networks: {
ganache: {
chainId: 1337,
url: "http://localhost:8545",
accounts: {
mnemonic: GANACHE_MNEMONIC,
},
},
hardhat: {
chainId: 1338,
loggingEnabled: false,
},
rinkeby: {
url: process.env.ETH_PROVIDER,
chainId: 4,
accounts: {
mnemonic: process.env.MNEMONIC ?? GANACHE_MNEMONIC,
},
},
kovan: {
url: process.env.ETH_PROVIDER,
chainId: 42,
accounts: {
mnemonic: process.env.MNEMONIC ?? GANACHE_MNEMONIC,
},
},
},
typechain: {
target: "ethers-v5",
},
};
export default config;