-
Notifications
You must be signed in to change notification settings - Fork 1
/
buidler.config.ts
80 lines (75 loc) · 1.98 KB
/
buidler.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { usePlugin, BuidlerConfig } from "@nomiclabs/buidler/config";
import path from "path";
import fs from "fs";
// @ts-ignore
import { accounts } from "./test-wallets.js";
usePlugin("@nomiclabs/buidler-ethers");
usePlugin("buidler-typechain");
usePlugin("@nomiclabs/buidler-waffle");
["deployments", "migrations"].forEach((folder) => {
const tasksPath = path.join(__dirname, "tasks", folder);
fs.readdirSync(tasksPath).forEach((task) => require(`${tasksPath}/${task}`));
});
const DEFAULT_BLOCK_GAS_LIMIT = 500000;
const DEFAULT_GAS_PRICE = 10;
const config: BuidlerConfig = {
solc: {
version: "0.6.6",
optimizer: { enabled: true, runs: 200 },
evmVersion: "istanbul",
},
typechain: {
outDir: "types",
target: "ethers",
},
defaultNetwork: "buidlerevm",
mocha: {
enableTimeouts: false,
},
networks: {
kovan: {
url: "YOUR_ETHEREUM_PROVIDER_URL_HERE",
hardfork: "istanbul",
blockGasLimit: DEFAULT_BLOCK_GAS_LIMIT,
gasMultiplier: DEFAULT_GAS_PRICE,
chainId: 42,
accounts: {
mnemonic:
"YOUR_MNEMONIC_HERE",
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
ropsten: {
url: "YOUR_ETHEREUM_PROVIDER_URL_HERE",
hardfork: "istanbul",
blockGasLimit: DEFAULT_BLOCK_GAS_LIMIT,
gasMultiplier: DEFAULT_GAS_PRICE,
chainId: 3,
accounts: {
mnemonic:
"YOUR_MNEMONIC_HERE",
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
buidlerevm: {
hardfork: "istanbul",
blockGasLimit: DEFAULT_BLOCK_GAS_LIMIT,
gas: DEFAULT_BLOCK_GAS_LIMIT,
gasPrice: 8000000000,
chainId: 31337,
throwOnTransactionFailures: true,
throwOnCallFailures: true,
accounts: accounts.map(
({ secretKey, balance }: { secretKey: string; balance: string }) => ({
privateKey: secretKey,
balance,
})
),
},
},
};
export default config;