buidler-contract-sizer
v1.0.2
Published
Output Solidity contract sizes with Buidler
Downloads
22
Maintainers
Readme
Buidler Contract Sizer
Output Solidity contract sizes with Buidler.
Installation
yarn add --dev buidler-contract-sizer
Usage
Load plugin in Buidler config:
usePlugin('buidler-contract-sizer');
Add configuration under the contractSizer
key:
| option | description | default |
|-|-|-|
| alphaSort
| whether to sort results table alphabetically (default sort is by contract size) | false
| runOnCompile
| whether to output contract sizes automatically after compilation | false
|
contractSizer: {
alphaSort: true,
runOnCompile: true,
}
Run the included Buidler task to output compiled contract sizes:
yarn run buidler size-contracts
TypeScript Support
For TypeScript compatibility, add 'node_modules/buidler-contract-sizer/type-extensions.d.ts'
to the files
array in tsconfig.json
.