KCC Documents
  • Quickstart
  • Overview
    • Introduction
    • Features
    • Our Goal
    • Consensus Engine
    • Marketing Guide
      • Requirements
      • KCC Official Website Resource
      • KCC Social Media Promotion
      • PR & Third-Party Marketing Support
  • Developers
    • Network Endpoints
    • Deploy Smart Contract
      • Using Hardhat
      • Using Remix
    • Verify Smart Contract
      • Using Hardhat
      • Using Foundry
      • Using Remix
    • Issue ERC20 Token
    • Deploy NFTs
      • Create A Foundry Project
      • Create Your ERC721 Contract
      • Add Metadata
    • Run a Node
      • Hardware & System Requirements
      • Install KCC
      • Run A Full Node
      • Run A Validator Node
        • Block Rewards
        • Apply For Running A Validator
        • Manager Account And Validator Account
        • Run A Validator
      • Troubleshooting
    • Explorer
    • Oracles
      • KCC Oracle
    • Bridge
    • Dev Toolkit
    • Data
      • Indexing and Querying
        • The Graph
        • Using KCC's hosted subgraph
    • Gas Revenue Program
      • Rules for Calculation of Gas Revenue
      • How to Join the KCC Gas Revenue Program
  • Individuals
    • Wallet
      • Supported Wallet
      • Tutorial on how to set up wallet
      • Mutisig Wallet
        • Create New Safe
        • Send KCS From Your Safe
        • Use A DApp With Your Safe
    • Network Configuration
      • Configure Value
      • Tutorial on how to config KCC network in Metamask
      • Tutorial on how to config KCC network in Chainlist
    • Bridge Assets
      • Bridge assets from others chains
      • KCC Bridge
      • Bridge assets form Exchange
    • Find a dApp
      • Add Your dAPP
    • KCS Token
      • Get KCS
      • Stake KCS
        • How to participate in KCS Staking
        • How to redeem staked KCS
        • How to check or claim staking rewards
  • FAQs
    • FAQs
      • General FAQs
      • KCS and Staking FAQs
      • Validator FAQs
  • Future Developments
    • Milestone
  • CONTACT US
    • Contact Us
  • Disclosure
    • Disclaimers
    • Risk Statement
    • Media Kit
Powered by GitBook
On this page
  • Overview
  • Pre-requisites
  • What you will do
  • Getting started with Remix IDE
  • Writing smart contract
  • Compile smart contract
  • Configure KCC Testnet on Metamask
  • Deploy Smart Contract to KCC Testnet
  1. Developers
  2. Deploy Smart Contract

Using Remix

PreviousUsing HardhatNextVerify Smart Contract

Last updated 2 years ago

Overview

This tutorial will show you how to compile and deploy an existing smart contract using Remix.

Remix IDE is a no-setup smart contract development tool with a GUI. Beginners and experts alike will benefit from Remix. Remix plays well with other tools, and allows for a simple deployment process to the chain of your choice. The Remix Project also can serve as a learning lab for teaching and experimenting with EVM-compatible chains.

Pre-requisites

  • Install Metamask

  • Configure KuCoin Community Chain Testnet on Metamask

  • Get Testnet token

What you will do

  • Create a file on Remix

  • Upload or code the smart contract to the IDE

  • Compile the smart contract

  • Connect the application to KCC Testnet via Metamask

  • Deploy the smart contract

To start building a smart contract, click on New File and name it as HelloWorld.sol.

Writing smart contract

Copy the code given below to HelloWorld.sol file

// SPDX-License-Identifier: MIT
// Specifies that the source code is for a version
// of Solidity greater than 0.8.15
pragma solidity ^0.8.15;

contract HelloWorld {

    // A publicly accessible function that takes a string as a parameter
    // and echoes the `message`
    function echo(string memory message) public pure returns (string memory) {
        return message;
    }
}

Compile smart contract

  • Switch to the Compiler tab

  • Select compiler version 0.8.15

  • Now, compile HelloWorld.sol

  • After successful compilation, it will show a green tick mark on the Compiler tab button

Configure KCC Testnet on Metamask

Deploy Smart Contract to KCC Testnet

In both Testnet and Mainnet, you do the below to deploy your smart contract using Remix.

  • Navigate to the Deployment tab

  • Select Injected Provider Metamask in the Environment dropdown, and your contract

  • Accept the Connect request received in MetaMask. You can also manually launch MetaMask if the popup doesn't open by default

  • In MetaMask, once a transaction is deployed, you will receive another MetaMask pop-up that requires you to confirm the transaction. You just need to confirm the transaction

Getting started with

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

Congratulations! You have successfully deployed the Smart Contract to the KuCoin Community Chain Testnet. You can start interacting with your Smart Contract. Check the deployment status at

Remix IDE
Pragmas
Network Configuration
HelloWorld
https://scan-testnet.kcc.network/