@@ -9,12 +9,37 @@ import * as dotenv from "dotenv";
9
9
import { parseUnits } from "ethers/lib/utils" ;
10
10
import "hardhat-deploy" ;
11
11
import "hardhat-gas-reporter" ;
12
- import { HardhatUserConfig } from "hardhat/config" ;
12
+ import { HardhatUserConfig , extendConfig } from "hardhat/config" ;
13
+ import { HardhatConfig } from "hardhat/types" ;
13
14
import "solidity-coverage" ;
14
15
import "solidity-docgen" ;
15
16
16
17
dotenv . config ( ) ;
17
18
19
+ extendConfig ( ( config : HardhatConfig ) => {
20
+ if ( process . env . EXPORT !== "true" ) {
21
+ config . external = {
22
+ ...config . external ,
23
+ deployments : {
24
+ bsctestnet : [
25
+ "node_modules/@venusprotocol/governance-contracts/deployments/bsctestnet" ,
26
+ "node_modules/@venusprotocol/venus-protocol/deployments/bsctestnet" ,
27
+ "node_modules/@venusprotocol/oracle/deployments/bsctestnet" ,
28
+ ] ,
29
+ bscmainnet : [
30
+ "node_modules/@venusprotocol/governance-contracts/deployments/bscmainnet" ,
31
+ "node_modules/@venusprotocol/venus-protocol/deployments/bscmainnet" ,
32
+ "node_modules/@venusprotocol/oracle/deployments/bscmainnet" ,
33
+ ] ,
34
+ sepolia : [
35
+ "node_modules/@venusprotocol/governance-contracts/deployments/sepolia" ,
36
+ "node_modules/@venusprotocol/oracle/deployments/sepolia" ,
37
+ ] ,
38
+ } ,
39
+ } ;
40
+ }
41
+ } ) ;
42
+
18
43
const config : HardhatUserConfig = {
19
44
solidity : {
20
45
compilers : [
@@ -140,22 +165,7 @@ const config: HardhatUserConfig = {
140
165
templates : "./docgen-templates" ,
141
166
} ,
142
167
external : {
143
- deployments : {
144
- bsctestnet : [
145
- "node_modules/@venusprotocol/governance-contracts/deployments/bsctestnet" ,
146
- "node_modules/@venusprotocol/venus-protocol/deployments/bsctestnet" ,
147
- "node_modules/@venusprotocol/oracle/deployments/bsctestnet" ,
148
- ] ,
149
- bscmainnet : [
150
- "node_modules/@venusprotocol/governance-contracts/deployments/bscmainnet" ,
151
- "node_modules/@venusprotocol/venus-protocol/deployments/bscmainnet" ,
152
- "node_modules/@venusprotocol/oracle/deployments/bscmainnet" ,
153
- ] ,
154
- sepolia : [
155
- "node_modules/@venusprotocol/governance-contracts/deployments/sepolia" ,
156
- "node_modules/@venusprotocol/oracle/deployments/sepolia" ,
157
- ] ,
158
- } ,
168
+ deployments : { } ,
159
169
} ,
160
170
} ;
161
171
0 commit comments