Bitrock Documentation
  • ▶️Get Started
    • Bitrock Blockchain
    • Security Audit
  • 👨‍💻Developer
    • Consensus Algorithm
    • Running Full Node
    • Connect to Chain
    • API Method
  • 🚩Tutorial
    • How to Get Bitrock Token
    • Bitrock Bridge
    • Smart Contract Deployment
  • ⚡Ecosystem & Tools
    • Rockswap
      • Swap
      • Stake
      • Farm
      • Locker
      • Token Builder
      • Multichain
      • Rockport
    • Network Explorer
    • Bitrock x Gnosis Safe
    • Ongoing Developments / Future Plans
  • 🔮RESOURCES
    • Company
    • Brand Kit
    • Community
    • GitHub
Powered by GitBook
On this page
  • 1. What is Remix?
  • 2. Compile Code
  • 3. Deploy and view on Bitrock Explorer
  • 4. The smart contract is ready to be used
  1. Tutorial

Smart Contract Deployment

PreviousBitrock BridgeNextRockswap

Last updated 7 months ago

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

1. What is 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 and copy paste this code below.

counter.sol
// 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;
    }
}

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

🚩
Connect to Chain
Remix
https://remix.ethereum.org
Bitrock explorer.