buidler-abi-exporter
v1.0.1
Published
Export Solidity contract ABIs on compilation
Downloads
9
Maintainers
Readme
Buidler ABI Exporter
Export Solidity contract ABIs on compilation via Buidler.
Installation
yarn add --dev buidler-abi-exporter
Usage
Load plugin in Buidler config:
usePlugin('buidler-abi-exporter');
Add configuration under the abiExporter
key:
| option | description | default |
|-|-|-|
| path
| path to ABI export directory (relative to Buidler root) | './abi'
| only
| Array
of contracts to include (case sensitive), defaults to all contracts if length
is 0 | []
|
| except
| Array
of contracts to exclude (case sensitive) | []
|
| clear
| whether to delete old files in path
on | false
|
abiExporter: {
path: './data/abi',
only: ['ERC20'],
clear: true,
}
The path
directory will be created if it does not exist.
The clear
option is set to false
by default because it represents a destructive action, but should be set to true
in most cases.
ABIs files are saved in the format [CONTRACT_NAME].json
.
TypeScript Support
For TypeScript compatibility, add 'node_modules/buidler-abi-exporter/type-extensions.d.ts'
to the files
array in tsconfig.json
.