-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathhardhat.config.ts
125 lines (116 loc) · 3.92 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
import "@nomiclabs/hardhat-truffle5";
import * as dotenv from "dotenv";
import { HardhatUserConfig } from "hardhat/config";
const fs = require('fs');
dotenv.config();
const accounts = [
// In Truffle, default account is always the first one.
...(process.env.DEPLOYER_PRIVATE_KEY ? [{ privateKey: process.env.DEPLOYER_PRIVATE_KEY, balance: "100000000000000000000000000000000" }] : []),
// First 20 accounts with 10^14 NAT each
// Addresses:
// 0xc783df8a850f42e7f7e57013759c285caa701eb6
// 0xead9c93b79ae7c1591b1fb5323bd777e86e150d4
// 0xe5904695748fe4a84b40b3fc79de2277660bd1d3
// 0x92561f28ec438ee9831d00d1d59fbdc981b762b2
// 0x2ffd013aaa7b5a7da93336c2251075202b33fb2b
// 0x9fc9c2dfba3b6cf204c37a5f690619772b926e39
// 0xfbc51a9582d031f2ceaad3959256596c5d3a5468
// 0x84fae3d3cba24a97817b2a18c2421d462dbbce9f
// 0xfa3bdc8709226da0da13a4d904c8b66f16c3c8ba
// 0x6c365935ca8710200c7595f0a72eb6023a7706cd
// 0xd7de703d9bbc4602242d0f3149e5ffcd30eb3adf
// 0x532792b73c0c6e7565912e7039c59986f7e1dd1f
// 0xea960515f8b4c237730f028cbacf0a28e7f45de0
// 0x3d91185a02774c70287f6c74dd26d13dfb58ff16
// 0x5585738127d12542a8fd6c71c19d2e4cecdab08a
// 0x0e0b5a3f244686cf9e7811754379b9114d42f78b
// 0x704cf59b16fd50efd575342b46ce9c5e07076a4a
// 0x0a057a7172d0466aef80976d7e8c80647dfd35e3
// 0x68dfc526037e9030c8f813d014919cc89e7d4d74
// 0x26c43a1d431a4e5ee86cd55ed7ef9edf3641e901
...JSON.parse(fs.readFileSync('test-1020-accounts.json')).slice(0, process.env.TENDERLY == 'true' ? 150 : 2000).filter((x: any) => x.privateKey != process.env.DEPLOYER_PRIVATE_KEY),
...(process.env.GENESIS_GOVERNANCE_PRIVATE_KEY ? [{ privateKey: process.env.GENESIS_GOVERNANCE_PRIVATE_KEY, balance: "100000000000000000000000000000000" }] : []),
...(process.env.GOVERNANCE_PRIVATE_KEY ? [{ privateKey: process.env.GOVERNANCE_PRIVATE_KEY, balance: "100000000000000000000000000000000" }] : []),
];
const config: HardhatUserConfig = {
defaultNetwork: "hardhat",
networks: {
develop: {
url: "http://127.0.0.1:9650/ext/bc/C/rpc",
gas: 10000000,
timeout: 40000,
accounts: accounts.map((x: any) => x.privateKey)
},
scdev: {
url: "http://127.0.0.1:9650/ext/bc/C/rpc",
gas: 8000000,
timeout: 40000,
accounts: accounts.map((x: any) => x.privateKey)
},
staging: {
url: process.env.STAGING_RPC || "http://127.0.0.1:9650/ext/bc/C/rpc",
timeout: 40000,
accounts: accounts.map((x: any) => x.privateKey)
},
songbird: {
url: process.env.SONGBIRD_RPC || "https://songbird-api.flare.network/ext/bc/C/rpc",
timeout: 40000,
accounts: accounts.map((x: any) => x.privateKey)
},
flare: {
url: process.env.FLARE_RPC || "https://flare-api.flare.network/ext/bc/C/rpc",
timeout: 40000,
accounts: accounts.map((x: any) => x.privateKey)
},
coston: {
url: process.env.COSTON_RPC || "https://coston-api.flare.network/ext/bc/C/rpc",
timeout: 40000,
accounts: accounts.map((x: any) => x.privateKey)
},
coston2: {
url: process.env.COSTON2_RPC || "https://coston2-api.flare.network/ext/bc/C/rpc",
timeout: 40000,
accounts: accounts.map((x: any) => x.privateKey)
},
hardhat: {
accounts,
blockGasLimit: 125000000 // 10x ETH gas
},
local: {
url: 'http://127.0.0.1:8545',
chainId: 31337
}
},
solidity: {
compilers: [
{
version: "0.8.11",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
{
version: "0.7.6",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
}
]
},
paths: {
sources: "./contracts/",
tests: process.env.TEST_PATH || "./test/",
cache: "./cache",
artifacts: "./artifacts",
},
mocha: {
timeout: 1000000000
}
};
export default config;