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 a Chain section for details.

1. What is Remix?

Remix 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 and copy paste this code below.
counter.sol
1
// SPDX-License-Identifier: MIT
2
pragma solidity ^0.8.4;
3
4
contract TestBitRockSimpleCounter {
5
int private count = 0;
6
function incrementCounter() public {
7
count += 1;
8
}
9
function decrementCounter() public {
10
count -= 1;
11
}
12
13
function getCount() public view returns (int) {
14
return count;
15
}
16
}

2. Compile Code

After the code is written, compile it using Solidity version based on the code written.
Once the code is compiled, a green Check will be shown.

3. Deploy and view on Bitrock Explorer

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.

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.