Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ItsNickBarry/hardhat-log-remover
Remove Hardhat console.log imports and calls from Solidity source files 🪓
https://github.com/ItsNickBarry/hardhat-log-remover
blockchain buidler console console-log ethereum hardhat log smart-contracts solidity wow
Last synced: 9 days ago
JSON representation
Remove Hardhat console.log imports and calls from Solidity source files 🪓
- Host: GitHub
- URL: https://github.com/ItsNickBarry/hardhat-log-remover
- Owner: ItsNickBarry
- License: mit
- Created: 2020-09-12T03:11:17.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-12T19:28:35.000Z (almost 2 years ago)
- Last Synced: 2024-04-27T05:42:38.931Z (7 months ago)
- Topics: blockchain, buidler, console, console-log, ethereum, hardhat, log, smart-contracts, solidity, wow
- Language: JavaScript
- Homepage:
- Size: 132 KB
- Stars: 13
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Hardhat Log Remover
Remove Hardhat `console.log` imports and calls from Solidity source code.
This plugin is intended in part to keep version-controlled code free of log statements. To remove logs from compiled contracts while preserving them in source code, see [hardhat-preprocessor](https://github.com/wighawag/hardhat-preprocessor).
> Versions of this plugin prior to `2.0.0` were released as `buidler-log-remover`.
## Installation
```bash
npm install --save-dev hardhat-log-remover
# or
yarn add --dev hardhat-log-remover
```## Usage
Load plugin in Hardhat config:
```javascript
require('hardhat-log-remover');
```Run the Hardhat task manually:
```bash
npx hardhat remove-logs
```# or
```bash
yarn run hardhat remove-logs
```Before removing logs, the plugin will ensure that all contracts can be compiled successfully.
## Development
Install dependencies via Yarn:
```bash
yarn install
```Setup Husky to format code on commit:
```bash
yarn prepare
```