Remove all mentions to buidler (#778)

pull/812/head
Franco Victorio 1 year ago committed by GitHub
parent b56f2093ba
commit dea15cd825
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .circleci/config.yml
  2. 1
      HARDHAT_README.md
  3. 5
      README.md
  4. 2
      docs/api.md
  5. 39
      plugins/resources/nomiclabs.utils.js
  6. 2
      scripts/run-nomiclabs.sh

@ -56,7 +56,7 @@ jobs:
- checkout
- <<: *step_install_nvm
- run:
name: Buidler & Hardhat E2E
name: Hardhat E2E
command: |
./scripts/run-nomiclabs.sh
workflows:

@ -128,7 +128,6 @@ More documentation, including FAQ and information about solidity-coverage's API
[29]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/upgrade.md#upgrading-from-06x-to-070
[30]: https://github.com/sc-forks/solidity-coverage/tree/0.6.x-final#solidity-coverage
[31]: https://github.com/sc-forks/solidity-coverage/releases/tag/v0.7.0
[32]: https://github.com/sc-forks/buidler-e2e/tree/coverage
[33]: https://github.com/sc-forks/moloch
[34]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/advanced.md#reducing-the-instrumentation-footprint

@ -4,7 +4,7 @@
![npm (tag)](https://img.shields.io/npm/v/solidity-coverage/latest)
[![CircleCI](https://circleci.com/gh/sc-forks/solidity-coverage.svg?style=svg)][20]
[![codecov](https://codecov.io/gh/sc-forks/solidity-coverage/branch/master/graph/badge.svg)][21]
[![buidler](https://buidler.dev/buidler-plugin-badge.svg?1)][26]
[![Hardhat](https://hardhat.org/buidler-plugin-badge.svg?1)][26]
## Code coverage for Solidity testing
@ -197,13 +197,12 @@ $ yarn
[23]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/advanced.md#workflow-hooks
[24]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/advanced.md#skipping-tests
[25]: https://github.com/sc-forks/solidity-coverage/issues/417
[26]: https://buidler.dev/
[26]: https://hardhat.org/
[27]: https://www.trufflesuite.com/docs
[28]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/api.md
[29]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/upgrade.md#upgrading-from-06x-to-070
[30]: https://github.com/sc-forks/solidity-coverage/tree/0.6.x-final#solidity-coverage
[31]: https://github.com/sc-forks/solidity-coverage/releases/tag/v0.7.0
[32]: https://github.com/sc-forks/buidler-e2e/tree/coverage
[33]: https://github.com/sc-forks/moloch
[34]: https://github.com/sc-forks/solidity-coverage/blob/master/docs/advanced.md#reducing-the-instrumentation-footprint
[35]: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/e5fbbda9bac49039847a7ed20c1d966766ecc64a/scripts/coverage.js

@ -20,7 +20,7 @@ table below shows how its core methods relate to the stages of a test run:
disposable set of contracts/artifacts which coverage must use in lieu of the 'real' (uninstrumented)
contracts.
+ there are two complete [coverage tool/plugin implementations][5] (for Buidler and Truffle)
+ there are two complete [coverage tool/plugin implementations][5] (for Hardhat and Truffle)
which can be used as sources if you're building something similar.
[5]: https://github.com/sc-forks/solidity-coverage/tree/master/plugins

@ -18,16 +18,16 @@ const util = require('util')
function getTestFilePaths(files){
const target = globby.sync([files])
// Buidler/Hardhat supports js & ts
// Hardhat supports js & ts
const testregex = /.*\.(js|ts)$/;
return target.filter(f => f.match(testregex) != null);
}
/**
* Normalizes Buidler/Hardhat paths / logging for use by the plugin utilities and
* Normalizes Hardhat paths / logging for use by the plugin utilities and
* attaches them to the config
* @param {Buidler/HardhatConfig} config
* @return {Buidler/HardhatConfig} updated config
* @param {HardhatConfig} config
* @return {HardhatConfig} updated config
*/
function normalizeConfig(config, args={}){
config.workingDir = config.paths.root;
@ -49,32 +49,6 @@ function normalizeConfig(config, args={}){
return config;
}
function setupBuidlerNetwork(env, api, ui){
const { createProvider } = require("@nomiclabs/buidler/internal/core/providers/construction");
let networkConfig = {};
let networkName = (env.buidlerArguments.network !== 'buidlerevm')
? env.buidlerArguments.network
: api.defaultNetworkName;
if (networkName !== api.defaultNetworkName){
networkConfig = env.config.networks[networkName];
configureHttpProvider(networkConfig, api, ui)
} else {
networkConfig.url = `http://${api.host}:${api.port}`
}
const provider = createProvider(networkName, networkConfig);
return configureNetworkEnv(
env,
networkName,
networkConfig,
provider
)
}
async function setupHardhatNetwork(env, api, ui){
const hardhatPackage = require('hardhat/package.json');
const { createProvider } = require("hardhat/internal/core/providers/construction");
@ -244,7 +218,7 @@ function setNetworkFrom(networkConfig, accounts){
// TODO: Hardhat cacheing??
/**
* Generates a path to a temporary compilation cache directory
* @param {BuidlerConfig} config
* @param {HardhatConfig} config
* @return {String} .../.coverage_cache
*/
function tempCacheDir(config){
@ -253,7 +227,7 @@ function tempCacheDir(config){
/**
* Silently removes temporary folders and calls api.finish to shut server down
* @param {Buidler/HardhatConfig} config
* @param {HardhatConfig} config
* @param {SolidityCoverage} api
* @return {Promise}
*/
@ -277,7 +251,6 @@ module.exports = {
normalizeConfig,
finish,
tempCacheDir,
setupBuidlerNetwork,
setupHardhatNetwork,
getTestFilePaths,
setNetworkFrom,

@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# E2E CI: installs PR candidate on sc-forks/buidler-e2e (a simple example,
# E2E CI: installs PR candidate on sc-forks/hardhat-e2e (a simple example,
# similar to Metacoin) and runs coverage
#

Loading…
Cancel
Save