forked from statechangelabs/polydocs-old
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhardhat.config.ts
More file actions
34 lines (34 loc) · 931 Bytes
/
hardhat.config.ts
File metadata and controls
34 lines (34 loc) · 931 Bytes
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
import { HardhatUserConfig } from "hardhat/config";
import dotenv from "dotenv";
import "@nomicfoundation/hardhat-toolbox";
import "hardhat-tracer";
dotenv.config();
const config: HardhatUserConfig = {
solidity: "0.8.9",
networks: {
hardhat: {
chainId: 31337,
},
polygonMumbai: process.env.ALCHEMY_MUMBAI
? {
url: process.env.ALCHEMY_MUMBAI,
accounts: [process.env.PK || ""],
}
: undefined,
polygon: process.env.ALCHEMY_POLYGON
? {
url: process.env.ALCHEMY_POLYGON,
accounts: [process.env.PK || ""],
}
: undefined,
},
etherscan: {
apiKey: {
polygonMumbai: process.env.POLYGON_API || "",
polygon: process.env.POLYGON_API || "",
},
},
};
if (!config.networks!.polygonMumbai) delete config.networks!.polygonMumbai;
if (!config.networks!.polygon) delete config.networks!.polygon;
export default config;