-
Notifications
You must be signed in to change notification settings - Fork 28
/
hardhat.config.ts
51 lines (46 loc) · 1.12 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
import dotenv from "dotenv";
dotenv.config(); // load env vars from .env
import { task, HardhatUserConfig } from "hardhat/config";
import "@nomiclabs/hardhat-waffle";
import "./tasks/index";
const { ARCHIVE_URL, MNEMONIC } = process.env;
if (!ARCHIVE_URL)
throw new Error(
`ARCHIVE_URL env var not set. Copy .env.template to .env and set the env var`
);
if (!MNEMONIC)
throw new Error(
`MNEMONIC env var not set. Copy .env.template to .env and set the env var`
);
const accounts = {
// derive accounts from mnemonic, see tasks/create-key
mnemonic: MNEMONIC,
};
// Go to https://hardhat.org/config/ to learn more
const config: HardhatUserConfig = {
solidity: {
compilers: [
// old ethernaut compilers
{ version: "0.5.0" },
{ version: "0.6.0" },
{ version: "0.7.3" }
],
},
networks: {
rinkeby: {
url: ARCHIVE_URL,
accounts,
},
hardhat: {
accounts,
forking: {
url: ARCHIVE_URL, // https://eth-rinkeby.alchemyapi.io/v2/SECRET`,
blockNumber: 7838325,
},
},
},
mocha: {
timeout: 300 * 1e3,
}
};
export default config;