> For the complete documentation index, see [llms.txt](https://docs.icb.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.icb.network/build-on-icb-network/hardhat/compiling-the-smart-contract.md).

# Compiling the Smart Contract

&#x20;         Here’s a basic Counter smart contract implemented using the Solidity programming language:

```solidity
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

contract Counter {
    uint256 public number;

    function setNumber(uint256 newNumber) public {
        number = newNumber;
    }

    function increment() public {
        number++;
    }
}
```

&#x20;         The Solidity code shown above declares a smart contract called `Counter`.

&#x20;         To compile the contract with Hardhat, execute the following command:

```bash
npx hardhat compile
```
