BOSagora
  • Agora
    • What is BOSagora
      • Why BOSagora
      • BOSagora Chain
      • Consensus mechanism (POS)
      • Agora staking economics
  • BOSagora Chain info
  • Upgrades
    • The withdrawals upgrade for Mainnet
      • Withdraw your validator
    • The withdrawals upgrade for Testnet
  • Validator Start
    • Check list to be Validator
    • Running an Agora node and Validator
      • Agora Testnet
      • Agora Mainnet
  • VOTERA
    • Introduction
    • How to Vote
    • Business Proposal
    • System Proposal
  • Getting Started
    • Deploy Smart Contract
      • Using Remix
      • Using Hardhat
      • Using Truffle
    • ERC-20 Tokens
    • Deploy NFTs
      • NFT Metadata Standard
  • Tools
    • Wallets
      • Key Management
    • Block explorer
    • SDK
    • IDE
  • dAPPs
    • Get started
    • BOASwap
    • Bridge (BOASwap)
      • How to use a Bridge
Powered by GitBook
On this page
Edit on GitHub
Export as PDF
  1. Getting Started
  2. Deploy Smart Contract

Using Remix

PreviousDeploy Smart ContractNextUsing Hardhat

Last updated 2 years ago

Deploys a ERC20 smart contract with a message, and renders it in the front-end. You can interact with the smart contract easily!

This dApp implements a "Hello World" style application that echoes a message passed to the contract to the front end. This tutorial is intended to be followed using the online IDE available at .

Setting Up

  • Remix is an online IDE to develop smart contracts.

  • You need to choose Solidity Compiler and Deploy and Run Transactions.

  • Go to File Explorers, And Create a new file, Name it ERC20Token.sol

  • Copy/Paste the Smart contract below into the newly created file ERC20Token.sol

Writing the Smart Contract

  • Create a new contract ERC20Token.sol and copy the contract code from the ERC20 token template

  • Modify "TOKEN_NAME", "TOKEN_SYMBOL", "DECIMALS" and "TOTAL_SUPPLY" according to your requirements.

Compile Smart Contract

  • Step1: Click the button to switch to compile page

  • Step2: Select the "ERC20Token" contract

  • Step3: Enable "Auto compile" and "optimization"

  • Step4: Click "ABI" to copy contract ABI and save it.

Deploy Smart Contract Using TestNet

Now, We have to deploy our smart contract on BizNet Network. For that, we have to connect to web3 world, We will be using Metamask.

  • Copy your address from Metamask

  • Now, let's Deploy the Smart Contract on Testnet

  • Select "Injected Web3" in the ENVIRONMENT dropdown and your contract

  • Metamask accepts the Connection Request!

  • From the CONTRACT dropdown menu, select the ERC20Token.sol you created earlier.

  • Click the Deploy button in Remix and accept another Metamask popup that requires transaction confirmation once connected!

In the first line, pragma solidity ^0.8.0 specifies that the source code is for a Solidity version greater than 0.8.0. are common instructions for compilers about how to treat the source code (e.g., pragma once).

A contract in the sense of Solidity is a collection of code (its functions) and data (its state) that resides at a specific address on the Ethereum blockchain. Learn more about the and in the docs.

Head over to Faucet - and request test BOA

Congratulations! You have successfully deployed an ERC20 Contract. Now you can interact with the Smart Contract. Check the deployment status here:

Pragmas
constructor
memory
https://faucet.bosagora.org/request/boa/your-address
https://testnet-scan.bosagora.org
Remix IDE
Remix IDE
here