-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
63 lines (56 loc) · 1.3 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
import dotenv from "dotenv";
import { HardhatUserConfig } from "hardhat/config";
import type { HttpNetworkUserConfig } from "hardhat/types";
import "@nomicfoundation/hardhat-toolbox";
import "hardhat-deploy";
import "./tasks/reality";
import "./tasks/shrine";
import "./tasks/test";
dotenv.config();
const { INFURA_KEY, SEEDPHRASE, ETHERSCAN_API_KEY, PK, ALCHEMY_KEY } =
process.env;
const HARDHAT_DEFAULT_SEEDPHRASE =
"test test test test test test test test test test test junk";
const sharedNetworkConfig: HttpNetworkUserConfig = {};
if (PK) {
sharedNetworkConfig.accounts = [PK];
} else {
sharedNetworkConfig.accounts = {
mnemonic: SEEDPHRASE || HARDHAT_DEFAULT_SEEDPHRASE,
};
}
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.8.17",
},
{
version: "0.6.7",
settings: {},
},
],
},
networks: {
mainnet: {
...sharedNetworkConfig,
url: `https://mainnet.infura.io/v3/${INFURA_KEY}`,
},
goerli: {
...sharedNetworkConfig,
url: `https://goerli.infura.io/v3/${INFURA_KEY}`,
},
localhost: {
saveDeployments: false,
},
hardhat: {
saveDeployments: false,
},
},
etherscan: {
apiKey: {
goerli: ETHERSCAN_API_KEY,
},
},
};
export default config;