HelloWorld.sol
🟩 This is a beginner track.
Last updated
🟩 This is a beginner track.
Last updated
In this tutorial, we will utilize Remix IDE, a versatile, open-source web-based platform, to develop and deploy our smart contract onto Hemi testnet.
This guide is tested to work with Solidity version 0.8.26. If you experience any issues, try setting this version explicitly in the Solidity Compiler tab on Remix.
Earn and track Hemi Miles for completing this tutorial!
Remix IDE is a powerful, open-source web application for developing, compiling, and deploying Ethereum smart contracts with ease.
In Remix IDE, start by creating a new file named HelloWorld.sol
.
The following contract is a basic example designed for interaction. Copy the code below and paste it into the file HelloWorld.sol
.
Select Compile HelloWorld.sol
button to use the Remix IDE's Solidity compiler. Check for any compilation errors and fix them.
The address you choose to connect MUST have some ETH (recommended at least 0.01 ETH) to pay for contract deployment fees. Refer back to earlier documentation to fund your Hemi address with ETH.
Choose Injected Provider - MetaMask
under "Environment".
A pop-up from MetaMask will appear to confirm the connection. Select Next
.
Select Connect
Link to the relevant Hemi account in the "Account" drop-down.
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, you may ignore it and proceed.
Select Deploy
Your MetaMask will pop-up 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.