-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
80 lines (75 loc) · 2.4 KB
/
hardhat.config.js
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
require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();
const QUICKNODE_HTTP_URL_GOERLI = process.env.QUICKNODE_HTTP_URL_GOERLI;
const PRIVATE_KEY = process.env.PRIVATE_KEY;
// Ganache UI
const GANACHE_URL = process.env.GANACHE_URL;
const GANACHE_ACCOUNT_1_PRIVATE_KEYS = process.env.GANACHE_ACCOUNT_1_PRIVATE_KEYS;
const GANACHE_ACCOUNT_2_PRIVATE_KEYS = process.env.GANACHE_ACCOUNT_2_PRIVATE_KEYS;
// Ganache CLI
const GANACHE_CLI_URL = process.env.GANACHE_CLI_URL;
const GANACHE_CLI_ACCOUNT_1_PRIVATE_KEYS = process.env.GANACHE_CLI_ACCOUNT_1_PRIVATE_KEYS;
const GANACHE_CLI_ACCOUNT_2_PRIVATE_KEYS = process.env.GANACHE_CLI_ACCOUNT_2_PRIVATE_KEYS;
const FORK_GOERLI_URL = process.env.FORK_GOERLI_URL;
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: {
compilers: [
{
version: "0.6.0",
},
{
version: '0.6.12',
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
{
version: "0.5.0",
},
{
version: "0.8.9",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
],
},
networks: {
// defaultNetwork: "ganache",
goerli: {
url: QUICKNODE_HTTP_URL_GOERLI,
accounts: [PRIVATE_KEY],
},
ganache: {
url: GANACHE_URL,
// accounts: [privateKey1, privateKey2, ...]
accounts: [
PRIVATE_KEY, // This is Macias account
GANACHE_ACCOUNT_1_PRIVATE_KEYS, // This is the first account that Ganache creates by default
GANACHE_ACCOUNT_2_PRIVATE_KEYS, // This is the second account that Ganache creates by default
],
},
ganache_cli_latest_version: {
url: GANACHE_CLI_URL,
accounts: [
PRIVATE_KEY, // This is Macias account
GANACHE_CLI_ACCOUNT_1_PRIVATE_KEYS, // This is the first account that Ganache-CLI creates by default
GANACHE_CLI_ACCOUNT_2_PRIVATE_KEYS, // This is the second account that Ganache-CLI creates by default
],
// issue: https://github.com/NomicFoundation/hardhat/issues/3136
// workaround: https://github.com/NomicFoundation/hardhat/issues/2672#issuecomment-1167409582
timeout: 100_000,
},
goerli_fork: {
url: FORK_GOERLI_URL,
accounts: [PRIVATE_KEY],
}
},
};