hardhat-flat-exporter
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

npm version Build Status buidler

hardhat-flat-exporter

Export flat contract on compilation via Hardhat.

👾 Additional supplement to the official flatten command

Installation

npm install --save-dev hardhat-flat-exporter
# or
yarn add --dev hardhat-flat-exporter

And add the following to your hardhat.config.js:

require("hardhat-flat-exporter");

Or, if you are using TypeScript, add this to your hardhat.config.ts:

import "hardhat-flat-exporter";

Configuration

Configuration is optional.

module.exports = {
  flattenExporter: {
    src: "./contracts",
    path: "./flat",
    clear: true,
  },
};

Options

option description default
src folder path of the target contracts (relative to Hardhat root) './contracts'
path path to flat sol export directory (relative to Hardhat root) './flat'
clear whether to delete old flat sol files in path on compilation true

Usage

The included Hardhat tasks may be run manually:

npx hardhat export-flat
# or
yarn run hardhat export-flat

Package Sidebar

Install

npm i hardhat-flat-exporter

Weekly Downloads

5

Version

1.0.1

License

MIT

Unpacked Size

51.8 kB

Total Files

11

Last publish

Collaborators

  • saszr