Cover photo

How to deploy a smart contract on Shardeum 📃

In this article, you will learn how to deploy a smart contract on the Shardeum Sphinx testnet. If you’re brand new to Shardeum, make sure to try out the dapps and deploy a node first.

Before we start:

post image
  • All set? Let’s begin the process then!

    First, go to Openzeppelin. Openzeppelin is a web-based application that allows developers to perform and automate smart contract operations in an easier & secure way.

    Contracts Wizard - OpenZeppelin Docs docs.openzeppelin.com Now give the name of your token, token symbol, and token supply. Eg. Token name = Shardeum, Symbol= SHM, Premint= 10000000

    And click on “Open in Remix” 👇🏻

post image
  • This page will open 👇🏻

post image
  • Go to the “Solidity Compiler” page (3rd option on the left)

    And click on the “Compile contract” button 👇🏻

post image
  • If there is no error, you’ll see a green check mark on the “Solidity Compiler” button 👇🏻

post image
  • Now go to the “Deploy” page (4th option on the left)

    • Choose “Injected Provider” on the ENVIRONMENT option.

    • Once selected, a popup will appear to connect your Metamask wallet. (If you used Remix before, it will auto-detect your wallet, no need to connect again)

    Now click on the “Deploy” button 👇🏻

post image
  • A Metamask pop-up will appear to confirm the transaction. Just approve it!

    Once the transaction is successful, you’ll see your deployed contract 👇🏻

post image
  • Congrats!!! 🎉🚀 You’ve successfully deployed a contract on the Shardeum Sphinx testnet!!! This may come in handy later when Shardeum launches on mainnet and do their token airdrop!

    P.S. If the transaction fails, try increasing the gas to 20 or even more. If the issue still remains, try after a few hours or days.

post image
  • That’s it for now.