Using Remix IDE

🟩 This is a beginner track.

📜 TL;DR:

  • In this tutorial, we will utilize Remix IDE, a versatile, open-source web-based platform, to develop and deploy our smart contract onto the Testnet.

  • Ensure to use Solidity version 0.8.19 or earlier for compatibility with the Hemi testnet environment.

🏁 Prerequisites

📚 Tutorial

1. Go to Remix IDE

Remix IDE is a powerful, open-source web application for developing, compiling, and deploying Ethereum smart contracts with ease.

2. Add the Smart Contract

In Remix IDE, start by creating a new file named HelloWorld.sol.

  • Create a file called HelloWorld.sol. The following contract is a basic example designed for interaction. Copy the code below and paste it into the file.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract HelloWorld {
    string public greeting = "Hello, World!";

    function getGreeting() public view returns (string memory) {
        return greeting;

    function setGreeting(string memory _greeting) public {
        greeting = _greeting;

3. Compile the Contract

Ensure that the Solidity Compiler is configured to version 0.8.19 or earlier. This is necessary for compatibility with the current smart contract requirements.

Select Compile HelloWorld.sol button to use the Remix IDE's Solidity compiler. Check for any compilation errors and fix them.

4. Connect Remix To MetaMask

The address you choose to connect MUST have a minimum balance of 0.10 thETH to pay for contract deployment fees.

Choose Injected Provider - MetaMask under "Environment".

5. Confirm the Connection

  • A popup from MetaMask will appear to confirm the connection. Select Next.

  • Select Connect

  • Link to the relevant Hemi account in the "Account" section.

7. Deploy

Execute the deployment of your smart contract to the Hemi network directly from Remix IDE.

Uncheck Publish to IPFS.Note: if you get a warning about Gas Limit, ignore it and proceed.

  • Select Deploy

  • Your MetaMask will popup to confirm the deployment of your smart contract. Select Confirm

🥳 Whoooo! If successful you should see a ✅ in the console.

⚠️ If it fails, double check that the Solidity version in the compiler is the correct version.

Last updated