-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
73 lines (68 loc) · 1.85 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
64
65
66
67
68
69
70
71
72
73
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "hardhat-abi-exporter";
require("dotenv").config();
const MAINNET_RPC_URL = process.env.MAINNET_RPC_URL as string;
const GOERLI_RPC_URL = process.env.MAINNET_RPC_URL as string;
const BINANCE_MAINNET_RPC_URL = process.env.BINANCE_MAINNET_RPC_URL as string;
const POLYGON_MAINNET_RPC_URL = process.env.POLYGON_MAINNET_RPC_URL as string;
const GANACHE_RPC_URL = process.env.GANACHE_RPC_URL as string;
const LOCAL_RPC_URL = process.env.RPC_URL as string;
const PRIVATE_KEY = (process.env.PRIVATE_KEY as string) || "0x";
interface Config extends HardhatUserConfig {
abiExporter: {
path: string;
runOnCompile: boolean;
format: string;
};
}
const config: Config = {
solidity: {
compilers: [
{
version: "0.8.17",
},
{
version: "0.6.1",
},
],
},
defaultNetwork: "hardhat",
abiExporter: {
path: "./packages/sdk/src/abi",
runOnCompile: true,
format: "json",
},
networks: {
// ganache: {
// url: GANACHE_RPC_URL,
// },
hardhat: {
// // comment out forking to run tests on a local chain
forking: {
url: MAINNET_RPC_URL,
},
},
// mainnet: {
// url: MAINNET_RPC_URL,
// accounts: PRIVATE_KEY !== undefined ? [PRIVATE_KEY] : [],
// chainId: 1,
// },
// goerli: {
// url: GOERLI_RPC_URL,
// accounts: PRIVATE_KEY !== undefined ? [PRIVATE_KEY] : [],
// chainId: 5,
// },
// polygon: {
// url: POLYGON_MAINNET_RPC_URL,
// accounts: PRIVATE_KEY !== undefined ? [PRIVATE_KEY] : [],
// chainId: 137,
// },
// binance: {
// url: BINANCE_MAINNET_RPC_URL,
// accounts: PRIVATE_KEY !== undefined ? [PRIVATE_KEY] : [],
// chainId: 56,
// },
},
};
export default config;