@@ -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-
7852function setupHardhatNetwork ( env , api , ui ) {
7953 const { createProvider } = require ( "hardhat/internal/core/providers/construction" ) ;
8054 const { HARDHAT_NETWORK_NAME } = require ( "hardhat/plugins" )
@@ -227,7 +201,7 @@ function setNetworkFrom(networkConfig, accounts){
227201// TODO: Hardhat cacheing??
228202/**
229203 * Generates a path to a temporary compilation cache directory
230- * @param {BuidlerConfig } config
204+ * @param {HardhatConfig } config
231205 * @return {String } .../.coverage_cache
232206 */
233207function tempCacheDir ( config ) {
@@ -236,7 +210,7 @@ function tempCacheDir(config){
236210
237211/**
238212 * Silently removes temporary folders and calls api.finish to shut server down
239- * @param {Buidler/ HardhatConfig } config
213+ * @param {HardhatConfig } config
240214 * @param {SolidityCoverage } api
241215 * @return {Promise }
242216 */
@@ -260,7 +234,6 @@ module.exports = {
260234 normalizeConfig,
261235 finish,
262236 tempCacheDir,
263- setupBuidlerNetwork,
264237 setupHardhatNetwork,
265238 getTestFilePaths,
266239 setNetworkFrom,
0 commit comments