README
Hardhat ABI Generator
Export Solidity smart contract ABIs and generate javascript objects on compilation via Hardhat.
Installation
yarn add --dev @symblox/hardhat-abi-gen
Usage
Load plugin in Hardhat config:
require('@symblox/hardhat-abi-gen');
Add configuration under the abiExporter
key:
| option | description | default |
|-|-|-|
| path
| path to ABI export directory (relative to Hardhat root) | './abi'
|
| clear
| whether to delete old files in path
on compilation | false
|
| flat
| whether to flatten output directory (may cause name collisions) | false
|
| only
| Array
of String
matchers used to select included contracts, defaults to all contracts if length
is 0 | []
|
| except
| Array
of String
matchers used to exclude contracts | []
|
| spacing
| number of spaces per indentation level of formatted output | 2
|
abiExporter: {
path: './data/abi',
clear: true,
flat: true,
only: [':ERC20