@@ -18,16 +18,16 @@ const util = require('util')
1818function getTestFilePaths ( files ) {
1919 const target = globby . sync ( [ files ] )
2020
21- // Buidler/ Hardhat supports js & ts
21+ // Hardhat supports js & ts
2222 const testregex = / .* \. ( j s | t s ) $ / ;
2323 return target . filter ( f => f . match ( testregex ) != null ) ;
2424}
2525
2626/**
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
2828 * 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
3131 */
3232function normalizeConfig ( config , args = { } ) {
3333 config . workingDir = config . paths . root ;
@@ -49,32 +49,6 @@ function normalizeConfig(config, args={}){
4949 return config ;
5050}
5151
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-
7852async function setupHardhatNetwork ( env , api , ui ) {
7953 const hardhatPackage = require ( 'hardhat/package.json' ) ;
8054 const { createProvider } = require ( "hardhat/internal/core/providers/construction" ) ;
@@ -244,7 +218,7 @@ function setNetworkFrom(networkConfig, accounts){
244218// TODO: Hardhat cacheing??
245219/**
246220 * Generates a path to a temporary compilation cache directory
247- * @param {BuidlerConfig } config
221+ * @param {HardhatConfig } config
248222 * @return {String } .../.coverage_cache
249223 */
250224function tempCacheDir ( config ) {
@@ -253,7 +227,7 @@ function tempCacheDir(config){
253227
254228/**
255229 * Silently removes temporary folders and calls api.finish to shut server down
256- * @param {Buidler/ HardhatConfig } config
230+ * @param {HardhatConfig } config
257231 * @param {SolidityCoverage } api
258232 * @return {Promise }
259233 */
@@ -277,7 +251,6 @@ module.exports = {
277251 normalizeConfig,
278252 finish,
279253 tempCacheDir,
280- setupBuidlerNetwork,
281254 setupHardhatNetwork,
282255 getTestFilePaths,
283256 setNetworkFrom,
0 commit comments