OJA Coin
  • OJA Coin Intro
  • Guides
    • ☕Get Started
    • 🛣️Roadmap
    • 📃Whitepaper
    • 🤝Coinomics
    • 🔗Official Links
    • 💹Buy OJA Coin
    • ✨OJX Node Installation
  • PRODUCTS
    • ⚡OJA Blockchain (OJX)
    • 👨‍💻OJA Wallet
    • 🏆OJA Rewards
    • 📈OJA Trading / Exchange
    • 🪙OJA Payment
  • OJA SMART CHAIN (OJX20)
    • ☕Get Started (OJX20)
    • 🌟OJA Coin Smart Chain
      • Concepts
        • Consensus
        • Genesis File
      • Source Code
      • Main Network Explorer
      • Test Network Explorer
      • OJX20 Wallet
    • 💻Developers
      • General
        • Create Wallet
        • Smart Contract
        • Remix
        • Web3JS
        • Truffle
      • Deploy
        • Remix
        • Truffle
        • HardHat
      • Tools
      • BRC20 Tokens
        • Introduction
        • Issue Token
      • Blockchain Details
        • OJX Chain Fullnode
        • RPC
      • Tutorial
        • Deploy NFT
        • Local OJX Network
    • 🚰OJX Faucet
    • ❔FAQ
      • OJA Coin Smart Chain FAQ
        • General
          • Info
          • OJA Coin Smart Chain (OJX20)
          • Ecosystem
        • Token
          • Intro
      • Contributing
  • OJA COIN MINING
    • ☕Get Started
    • 💸Sole Mining (CPU)
    • 💰Masternode Mining
    • 🖥️GPU Mining
  • Others
    • OJA Brand Assets
    • Support
  • Terms
    • Privacy Policy
    • Terms and User Agreement
Powered by GitBook
On this page
  1. OJA SMART CHAIN (OJX20)
  2. Developers
  3. Deploy

Remix

Using Remix

PreviousDeployNextTruffle

Last updated 3 years ago

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

This dApps 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.

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

  • Copy and Paste the Smart contract below into the newly created file MegaCoin.sol

The smart contract

  • Modify “name”, “symbol”, “decimals” and “totalSupply” according to your requirements.

Compile Smart Contract

  • Step1: Click button to switch to compile page

  • Step2: Select “NRC20Token” contract

  • Step3: Enable “Auto compile” and “optimization”

  • Step4: Click “ABI” to copy the contract abi and save it.

  • Open Metamask and select Custom RPC from the networks dropdown

  • Go to setting page

  • Add a new network

  • Go ahead and click save

  • Copy your address from Metamask

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

  • Select Injected Web3 in the Environment dropdown and your contract

  • Accept the Connection Request!

  • Once Metamask is connected to Remix, the ‘Deploy’ transaction would generate another metamask popup that requires transaction confirmation.

Create new contract NRC20Token.sol and copy contract code from the bep20 token template

img

The first line, pragma solidity ^0.5.16 specifies that the source code is for a Solidity version greater than 0.5.16. 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.

img

Now, We have to deploy our smart contract on OJA Coin Smart Chain Network. For that, we have to connect to web3 world, this can be done my many services like Metamask, Brave, Portis etc. We will be using Metamask. Please follow this .

img

Testnet * * ChainID: 11512 * Symbol: OJX * Block Explorer:

Mainnet * * ChainID: 11513 * Symbol: OJX * Block Explorer: https://ojxscan.com

Head over to and request test OJX

img
img
img

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

💻
here
Pragmas
constructor
memory
tutorial to setup a Metamask Account
RPC URLs
https://testnet-explorer.ojxscan.com/
RPC URLs
Faucet
https://testnet.ojxscan.com/
Remix IDE
Remix IDE
img