Buidler Contract Sizer
Output Solidity contract sizes with Buidler.
Installation
yarn add --dev buidler-contract-sizer
Usage
Load plugin in Buidler config:
;
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
.