Using Remix IDE
This page describes how to deploy smart contracts using Remix IDE.
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: https://remix.ethereum.org
Steps
Add 'Kroma Mainnet' to your wallet, you can refer to the Wallet Configuration.
Click the run icon (
).
Select the Environment
Injected Provider - MetaMask
.Accept the connection in the wallet.
Make sure your environment is Injected Web3 and the network ID is '255'.
Click the File explorer icon (
).
Click the Create New File (
).
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;
}
}
this icon means that there is no problem compiling.(), Click the run icon (
).
The constructor of
testContract
needs a parameter (of typeuint256
). Input a uint256 and click onDeploy
.Confirm the transaction in the wallet.

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.
You can view your transactions through Block Explorer.
Last updated
Was this helpful?