Remix

Remix IDE, is a no-setup tool with a GUI for developing smart contracts. Used by experts and beginners alike, Remix will get you going in double time. Remix plays well with other tools, and allows for a simple deployment process to the chain of your choice. Remix is famous for our visual debugger.

1. Layout

Following images are the layout of Remix IDE.

  • A : Icon Pannel to select plug-in for Side Pannel(B)

  • B : Pannel to display plug-in. GUI of most plug-ins are displayed

  • C : Main pannel. Able to edit files to compile

  • D : A terminal section to see result or run script

2. Modules

Basic modules of Remix IDE are File Explorer, Plugin Manager and Editor

File Explorer

File Explorer icon is at the top.

Plugin Manager

Remix IDE is run based on the plugin. To use various features, module needs to be activated by plugin admin. Icon pannel's basic module is File Explorer, compile, deploy and run.

Code Editor

In basic pannel, you can write/edit codes. If you are editing the original code, you need to compile again.

Create MEVerseGreeter.sol in directory with Code Editor

// SPDX-License-Identifier: MIT
pragma solidity ^0.5.6;
contract Mortal {
    /* Define Variable owner of the type address */
    address payable owner;
    /* This function is executed at initialization and sets the owner of the contract */
    constructor () public { owner = msg.sender; }
    /* Function to recover the funds on the contract */
    function kill() public payable { if (msg.sender == owner) selfdestruct(owner); }
}

contract MEVerseGreeter is Mortal {
    /* Define variable greeting of the type string */
    string greeting;
    /* This runs when the contract is executed */
    constructor (string memory _greeting) public {
        greeting = _greeting;
    }
    /* Main function */
    function greet() public view returns (string memory) {
        return greeting;
    }
}

Terminal

You can check the result, status, and information of transaction in Terminal. To see more details, click the icon.

3. Solidity Compiler

If you have finished writing code, check if there is any error or warning.

4. DEPLOY & RUN TRANSACTIONS

If the contract is compiled, click Ethereum icon in Icon pannel to deploy.

  • ENVIRONMENT : Setting up development environment. Choose Injected Provider - MetaMask when deploying in MEVerse Network.

  • ACCOUNT : Account information that deploys smart contract

  • CONTRACT : Contract that you wish to deploy. Only compiled contracts can be selected.

Deploy

After checking Environment, Account, and Contract, click Deploy button to deploy contract. After checking the network fee, it completes contract deployment.

You can see whether the contract has been successfully deployed or not by checking and Deployed Contract. Greet button will let you see the results by calling greet function in smart contract.

[block:28755068 txIndex:0]from: 0x193...449E7to: value: 0 weidata: 60806...00000logs: 0hash: 0x96a...d0065
status	                true Transaction mined and execution succeed
transaction hash	0xab577d01c5583bea3971eca8ae132713c5ad23157a318183fbfb45328066f4b9
from	                0x19368fCd2F0EE8d2C788b754F6504FD49de449E7
gas	                500000000 gas
transaction cost	223369 gas 
input	                60806...00000
decoded output	         - 
val	                0 wei
MetaMask Tx Signature: User denied transaction signature.. Execution failed at 0

Last updated