-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
58 lines (51 loc) · 1.21 KB
/
hardhat.config.ts
File metadata and controls
58 lines (51 loc) · 1.21 KB
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
import * as dotenv from "dotenv";
import { HardhatUserConfig } from "hardhat/config";
import "@nomiclabs/hardhat-waffle";
import "./tasks/index";
dotenv.config(); // load env vars from .env
const { ARCHIVE_URL, MNEMONIC } = process.env;
console.log(ARCHIVE_URL, MNEMONIC);
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,
};
/**
* @see 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" },
// new version
{ version: "0.8.21" },
],
},
networks: {
sepolia: {
url: ARCHIVE_URL,
accounts,
},
hardhat: {
accounts,
forking: {
url: ARCHIVE_URL, // =https://sepolia.infura.io/v3/<API_KEY>
blockNumber: 4177325,
},
},
},
mocha: {
timeout: 300 * 1e3,
},
};
export default config;