# 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 ](/developer/connect-to-chain.md)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.

![](/files/GjA8qQwvWkqTakahUKQT)&#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

![](/files/tOk026qjvX2y7QYVm3IX)

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.

![](/files/sOndWVXJvRDxLSMx7xLJ)

## 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="/files/SqxIPzYVHQcjeOZs2ULJ" alt="" width="563"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bit-rock.io/tutorial/smart-contract-deployment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
