# Smart Contract Deployment

Anyone can build a smart contract application on the Bitrock network. Below is a step-by-step walkthrough on how to deploy a simple smart contract counter using Remix.

Note: Before you start deploying using Remix, make sure you are connected Bitrock network in your Metamask. See the [Connect to Chain ](https://docs.bit-rock.io/developer/connect-to-chain)section for details.

## 1. **What is Remix?**

[Remix](https://remix-project.org/) is open-source Ethereum IDE you can use to write, compile and debug Solidity code. As such, Remix can be a hugely important tool in Web3 and dApps development.

You can jump to the Remix text editor [https://remix.ethereum.org](https://remix.ethereum.org/#lang=en\&optimize=true\&runs=200\&evmVersion=null\&version=soljson-v0.8.20+commit.a1b79de6.js\&language=Solidity) and copy paste this code below.

{% code title="counter.sol" overflow="wrap" lineNumbers="true" %}

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

contract TestBitRockSimpleCounter {
    int private count = 0;
    function incrementCounter() public {
        count += 1;
    }
    function decrementCounter() public {
        count -= 1;
    }

    function getCount() public view returns (int) {
        return count;
    }
}
```

{% endcode %}

## 2. Compile Code

After the code is written, compile it using Solidity version based on the code written.

![](https://4038204926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi2DMEZmmK1I0XeD5wJot%2Fuploads%2F5ZWZ5iJrRB9iN4PkNjea%2FScreenshot%202023-07-17%20at%2017.14.57.png?alt=media\&token=4d733550-7ff1-4931-aefa-1201a3295008)&#x20;

Once the code is compiled, a <mark style="color:green;">**green Check**</mark> <mark style="color:green;"></mark><mark style="color:green;">will be shown.</mark> &#x20;

## 3. Deploy and view on Bitrock Explorer

![](https://4038204926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi2DMEZmmK1I0XeD5wJot%2Fuploads%2FxkxfDIDbBQfaBVEqVqop%2FScreenshot%202023-07-17%20at%2017.10.19.png?alt=media\&token=16fe82d2-d84d-4ff5-9205-a05531cefa04)

After the code is compiled, it is ready to be deployed on the Bitrock Network. Click the Deploy button and a Metamask confirmation window will pop up.

Note: Bitrock Blockchain smart contract deployment fees are near-zero.

![](https://4038204926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi2DMEZmmK1I0XeD5wJot%2Fuploads%2FWA811IDJa7MsaiU3tZLm%2FScreenshot%202023-07-17%20at%2017.16.26.png?alt=media\&token=198f7bd8-63b0-484f-b1cc-c11b5ec35137)

## 4. The smart contract is ready to be used

After the smart contract is deployed, the contract address can be seen and explored on [Bitrock explorer. ](https://scan.bit-rock.io/)

<figure><img src="https://4038204926-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fi2DMEZmmK1I0XeD5wJot%2Fuploads%2FkXskhRtMutXXkSJNGtN4%2FScreenshot%202023-07-17%20at%2017.18.47.png?alt=media&#x26;token=c15f78a3-e68e-4cc4-be9e-8d92f4403f09" alt="" width="563"><figcaption></figcaption></figure>
