# Installing and Configuring the Hardhat Contract Sizer Plugin

&#x20;         The Hardhat Contract Sizer is a plugin developed by the community that helps you measure the size of your smart contracts by displaying their compiled bytecode size directly in the terminal. This is particularly useful during development, as it allows you to quickly spot contracts that may exceed the permitted size limit.

&#x20;         Keep in mind that, on the Ethereum mainnet, the maximum allowed size for a deployed smart contract is **24 KiB (24,576 bytes)**. Exceeding this limit will cause deployment to fail.

&#x20;         To install the plugin, run the following command:

```bash
npm install --save-dev hardhat-contract-sizer
```

&#x20;         Next, import the plugin in your `hardhat.config.js` file:

```javascript
require("hardhat-contract-sizer");
```
