forked from Thorn-Protocol/thorn-protocol-contract
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.ts
160 lines (153 loc) · 3.46 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
import "@typechain/hardhat";
import "hardhat-contract-sizer";
import "@nomiclabs/hardhat-ethers";
import "@openzeppelin/hardhat-upgrades";
import "hardhat-interface-generator";
import { HardhatUserConfig } from "hardhat/types";
import 'hardhat-deploy';
import * as dotenv from "dotenv";
import "@nomicfoundation/hardhat-network-helpers";
import "hardhat-interface-generator";
import "@nomiclabs/hardhat-waffle"
dotenv.config();
const PRIVATE_KEY = process.env.PRIVATE_KEY;
const PRIVATE_KEY_1=process.env.PRIVATE_KEY_1;
const PRIVATE_KEY_2=process.env.PRIVATE_KEY_2;
const PRIVATE_KEY_3=process.env.PRIVATE_KEY_3;
const TEST_HDWALLET = {
mnemonic: "test test test test test test test test test test test junk",
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 6,
passphrase: "",
accountsBalance: "10000000000000000000000"
};
const config:HardhatUserConfig = {
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
deploy:"src/deploy_upgrade",
artifacts: "./artifacts"
},
solidity: {
compilers: [
{
version: "0.8.12",
settings: {
optimizer: {
enabled: true,
runs: 0
}
}
},
{
version: "0.8.10",
settings: {
optimizer: {
enabled: true,
runs: 0
}
}
},
{
version: "0.7.6",
settings: {
optimizer: {
enabled: true,
runs: 0
}
}
},
{
version: "0.8.4",
settings: {
optimizer: {
enabled: true,
runs: 0
}
}
},
{
version: "0.8.0",
settings: {
optimizer: {
enabled: true,
runs: 100000
}
}
}
]
},
defaultNetwork: "bscTestnet",
networks: {
hardhat: {
// forking: {
// url: "https://data-seed-prebsc-1-s1.bnbchain.org:8545",
// blockNumber: 14390000
// },
allowUnlimitedContractSize: true,
// forking: {
// url: "https://hardcore-mayer:[email protected]",
// },
// chainId: 97,
chainId: 31337,
accounts: TEST_HDWALLET,
gasPrice: 5000000000,
gas: 25e6,
// tags: ["hardhat"],
// saveDeployments: true,
},
bscTestnet: {
url: process.env.PROVIDER_URL,
chainId: 97,
gasPrice: 20000000000,
gas: 4e7,
// gas: 1e7,
accounts: [
`0x${PRIVATE_KEY}`,
`0x${PRIVATE_KEY_1}`,
`0x${PRIVATE_KEY_2}`,
]
},
mainnet: {
url: "https://bsc.publicnode.com",
chainId: 56,
gasPrice: 3e9,
// gas: 2e7,
// gas: 1e5,
accounts: [
`0x${PRIVATE_KEY}`,
]
},
sapphireTestnet: {
url: "https://testnet.sapphire.oasis.dev/",
chainId: 0x5aff,
gasPrice: 100e9,
gas: 1e7,
accounts: [
`0x${PRIVATE_KEY}`,
`0x${PRIVATE_KEY_1}`,
`0x${PRIVATE_KEY_2}`,
`0x${PRIVATE_KEY_3}`
],
// tags:["sapphireTestnet"]
},
sapphireMainnet: {
url: "https://sapphire.oasis.io/",
chainId: 23294,
// gasPrice: 4e7,
// gas: 2e7,
accounts: [
`0x${PRIVATE_KEY}`
]
}
},
// paths: {
// sources: "./contracts",
// tests: "./test",
// cache: "./cache",
// artifacts: "./artifacts"
// }
};
export default config;