truffle-contract-size
This Truffle plugin displays the contract size of all or a selection of your smart contracts in kilobytes.
Installation
- Install the plugin with npm
npm install truffle-contract-size
- Add the plugin to your
truffle.js
or truffle-config.js
file
module.exports = {
plugins: [
'truffle-contract-size'
]
}
Usage
The command can be executed without any arguments to display the size of all contracts in the projects.
truffle run contract-size
To show only certain contracts one or more contract names can be given as arguments
truffle run contract-size ExampleContract1 ExampleContract2