Kroma
GithubCommunity
  • Introduction
    • Overview
    • KRO Tokenomics
      • Token Allocation
      • Token Distribution
      • Token Utilities
      • Airdrops
        • Initial Airdrop
    • Official Links
  • BUILDERS
    • Developers
      • Contract Deployment Tutorial
        • Using Foundry
        • Using Remix IDE
        • Using Hardhat
      • JSON-RPC API
      • Oracles
    • Node Operators
      • Kroma MPT Migration Guide
      • Running a Full Node
      • Running a Kroma v2 Validator Node
        • How to Migrate Your Validator to KRO-based Validator System
      • How to Sync Blocks Using a Snapshot
      • FAQ
      • [Deprecated] Running a Kroma v1 Validator Node
        • How to Check and Claim the Validator Reward
    • Network Information
    • Protocol Contracts
    • Testnet
      • Setup
      • Faucet
      • Bridge
      • Contract Addresses
  • USERS
    • Wallet Configuration
    • Bridge
    • Block Explorer
    • How to Swap legacy USDC to upgradable USDC
  • Governance
    • Kroma Security Council
  • Kroma Guardian House
    • Overview
    • Philosophy
    • KRO & KGH NFT Staking
      • Validator Boosting by KGH NFT
      • How to Get KRO
      • FAQ
    • KGH NFT Migration & KYC
      • KGH NFT Migration
      • How to Complete KYC with Argos
    • KGH NFT Sales (Ended)
      • KGH Utilities
      • Referral Program: Expand Your Impact
      • Estimated Reward Value
    • Notice
  • Resources
    • Security
    • Brand Kit
    • FAQs
    • Glossary
Powered by GitBook
On this page
  • Remix IDE
  • Steps

Was this helpful?

  1. BUILDERS
  2. Developers
  3. Contract Deployment Tutorial

Using Remix IDE

This page describes how to deploy smart contracts using Remix IDE.

PreviousUsing FoundryNextUsing Hardhat

Last updated 10 months ago

Was this helpful?

Remix IDE

Remix IDE is used for the entire journey of smart contract development by users at every knowledge level. It requires no setup, fosters a fast development cycle, and has a rich set of plugins with intuitive GUIs. The IDE comes in two flavors (web app or desktop app) and as a VSCode extension.

Remix Online IDE, see:

Steps

  1. Add 'Kroma Mainnet' to your wallet, you can refer to the Wallet Configuration.

  2. Click the run icon ().

  3. Select the Environment Injected Provider - MetaMask.

  4. Accept the connection in the wallet.

  1. Make sure your environment is Injected Web3 and the network ID is '255'.

  2. Click the File explorer icon ().

  3. Click the Create New File ().

  4. Write the source code - testContract.sol.

// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

contract testContract {

    uint256 value;

    constructor (uint256 _p) {
        value = _p;
    }

    function setP(uint256 _n) payable public {
        value = _n;
    }

    function setNP(uint256 _n) public {
        value = _n;
    }

    function get () view public returns (uint256) {
        return value;
    }
}
  1. The constructor of testContract needs a parameter (of type uint256). Input a uint256 and click on Deploy.

  2. Confirm the transaction in the wallet.

  1. Scroll down. In the At Address field, type the contract address. Then, click At Address. Expand the contract to see you can interact with it.

e.g - Deploy ERC20 Token Contract
// contracts/GLDToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract GLDToken is ERC20 {
    constructor(uint256 initialSupply) ERC20("Gold", "GLD") {
        _mint(msg.sender, initialSupply);
    }
}

Input value 1000000000000000000000, click 'Deploy' button.

this icon means that there is no problem compiling.(), Click the run icon ().

You can view your transactions through .

Reference:

Block Explorer
OpenZeppelin Docs
https://remix.ethereum.org