-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
51 lines (47 loc) · 1.05 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
require("dotenv").config();
import { HardhatUserConfig } from "hardhat/config";
import "@nomiclabs/hardhat-waffle";
import "hardhat-deploy";
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
const mnemonic = process.env.DEPLOYER_MNEMONIC as string;
const testMnemonic = process.env.TEST_MNEMONIC as string;
const config: HardhatUserConfig = {
//@ts-ignore
namedAccounts: {
deployer: {
default: 0, // here this will by default take the first account as deployer
},
},
solidity: {
version: "0.8.6",
settings: {
optimizer: {
enabled: true,
runs: 999999,
},
},
},
paths: {
sources: "./src",
tests: "./src/test",
cache: "./cache",
artifacts: "./artifacts",
},
networks: {
hardhat: {
forking: {
url: process.env.MAINNET_API_URL as string,
},
},
mainnet: {
url: process.env.MAINNET_API_URL,
accounts: { mnemonic: mnemonic },
},
rinkeby: {
url: process.env.RINKEBY_API_URL,
accounts: { mnemonic: testMnemonic },
},
},
};
export default config;