-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
33 lines (27 loc) · 990 Bytes
/
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
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox-viem";
import "@nomicfoundation/hardhat-chai-matchers";
import "solidity-coverage";
import { getNetwork, Networks } from "./networks";
import envParsed from "./envParsed";
const NETWORK_TESTNET = envParsed().NETWORK_TESTNET as Networks;
const NETWORK_MAINNET = envParsed().NETWORK_MAINNET as Networks;
const networkTestnet = getNetwork(NETWORK_TESTNET, true);
const networkMainnet = getNetwork(NETWORK_MAINNET, false);
const config: HardhatUserConfig = {
solidity: {
compilers: [{ version: "0.8.24" }],
},
networks: {
testnet: networkTestnet ? networkTestnet.network : undefined,
mainnet: networkMainnet ? networkMainnet.network : undefined,
},
etherscan: {
apiKey: networkTestnet ? networkTestnet.apiKeys : undefined,
customChains: networkTestnet ? networkTestnet.customChains : undefined,
},
sourcify: {
enabled: false,
},
};
export default config;