@@ -18,16 +18,16 @@ const util = require('util')
18
18
function getTestFilePaths ( files ) {
19
19
const target = globby . sync ( [ files ] )
20
20
21
- // Buidler/ Hardhat supports js & ts
21
+ // Hardhat supports js & ts
22
22
const testregex = / .* \. ( j s | t s ) $ / ;
23
23
return target . filter ( f => f . match ( testregex ) != null ) ;
24
24
}
25
25
26
26
/**
27
- * Normalizes Buidler/ Hardhat paths / logging for use by the plugin utilities and
27
+ * Normalizes Hardhat paths / logging for use by the plugin utilities and
28
28
* attaches them to the config
29
- * @param {Buidler/ HardhatConfig } config
30
- * @return {Buidler/ HardhatConfig } updated config
29
+ * @param {HardhatConfig } config
30
+ * @return {HardhatConfig } updated config
31
31
*/
32
32
function normalizeConfig ( config , args = { } ) {
33
33
config . workingDir = config . paths . root ;
@@ -49,32 +49,6 @@ function normalizeConfig(config, args={}){
49
49
return config ;
50
50
}
51
51
52
- function setupBuidlerNetwork ( env , api , ui ) {
53
- const { createProvider } = require ( "@nomiclabs/buidler/internal/core/providers/construction" ) ;
54
-
55
- let networkConfig = { } ;
56
-
57
- let networkName = ( env . buidlerArguments . network !== 'buidlerevm' )
58
- ? env . buidlerArguments . network
59
- : api . defaultNetworkName ;
60
-
61
- if ( networkName !== api . defaultNetworkName ) {
62
- networkConfig = env . config . networks [ networkName ] ;
63
- configureHttpProvider ( networkConfig , api , ui )
64
- } else {
65
- networkConfig . url = `http://${ api . host } :${ api . port } `
66
- }
67
-
68
- const provider = createProvider ( networkName , networkConfig ) ;
69
-
70
- return configureNetworkEnv (
71
- env ,
72
- networkName ,
73
- networkConfig ,
74
- provider
75
- )
76
- }
77
-
78
52
async function setupHardhatNetwork ( env , api , ui ) {
79
53
const hardhatPackage = require ( 'hardhat/package.json' ) ;
80
54
const { createProvider } = require ( "hardhat/internal/core/providers/construction" ) ;
@@ -244,7 +218,7 @@ function setNetworkFrom(networkConfig, accounts){
244
218
// TODO: Hardhat cacheing??
245
219
/**
246
220
* Generates a path to a temporary compilation cache directory
247
- * @param {BuidlerConfig } config
221
+ * @param {HardhatConfig } config
248
222
* @return {String } .../.coverage_cache
249
223
*/
250
224
function tempCacheDir ( config ) {
@@ -253,7 +227,7 @@ function tempCacheDir(config){
253
227
254
228
/**
255
229
* Silently removes temporary folders and calls api.finish to shut server down
256
- * @param {Buidler/ HardhatConfig } config
230
+ * @param {HardhatConfig } config
257
231
* @param {SolidityCoverage } api
258
232
* @return {Promise }
259
233
*/
@@ -277,7 +251,6 @@ module.exports = {
277
251
normalizeConfig,
278
252
finish,
279
253
tempCacheDir,
280
- setupBuidlerNetwork,
281
254
setupHardhatNetwork,
282
255
getTestFilePaths,
283
256
setNetworkFrom,
0 commit comments