> For the complete documentation index, see [llms.txt](https://meversedex.gitbook.io/meverse-dev-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://meversedex.gitbook.io/meverse-dev-docs/smart-contract/ide-and-tools/remix.md).

# 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.

* <https://remix.ethereum.org/>

## 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

<figure><img src="/files/X96bJCvLfDlqaxRHu0so" alt=""><figcaption><p>Remix Layout</p></figcaption></figure>

## 2. Modules&#x20;

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

### File Explorer

File Explorer icon is at the top.

<figure><img src="/files/jqH2vwPw7lPYpFiID27T" alt=""><figcaption><p>File Explorer</p></figcaption></figure>

### Plugin Manager <a href="#plugin-manager" id="plugin-manager"></a>

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.

<figure><img src="/files/24P0RSWrno8N5vHIYdVj" alt=""><figcaption><p>Plugin Manager</p></figcaption></figure>

### Code Editor <a href="#code-editor" id="code-editor"></a>

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

<figure><img src="/files/FkWCEzBe4OEddR35oH9r" alt=""><figcaption><p>Code Editor</p></figcaption></figure>

Create `MEVerseGreeter.sol` in directory with Code Editor

```solidity
// 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 <a href="#terminal" id="terminal"></a>

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

<figure><img src="/files/9QYdBU53LISgPkBdKpvv" alt=""><figcaption><p>Terminal</p></figcaption></figure>

## 3. Solidity Compiler

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

<figure><img src="/files/OmQQrQjcaC330bEXO8vI" alt=""><figcaption><p>Solidity Compiler</p></figcaption></figure>

## 4. DEPLOY & RUN TRANSACTIONS

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

<figure><img src="/files/ruAxyl9ACDvUnBUwz1Kd" alt=""><figcaption><p>Deploy &#x26; Run</p></figcaption></figure>

* **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.

<figure><img src="/files/fIpj09IlJ1pdtKlwvYod" alt=""><figcaption><p>Remix - MetaMask</p></figcaption></figure>

<figure><img src="/files/FLSDCZJ5iBRJgEM2VWmX" alt=""><figcaption><p>Injected Provider - MetaMask Integration Screen</p></figcaption></figure>

### Deploy

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

<figure><img src="/files/sbmudumVa2PDcKhC36ij" alt=""><figcaption><p>MetaMask - Approve for Contract Deployment</p></figcaption></figure>

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.

<figure><img src="/files/ozKacw2Aq3hNmiccJ9cg" alt=""><figcaption><p>Checking delpoyed contract</p></figcaption></figure>

```shell
[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
```

<figure><img src="/files/TnIo4tkePgE6SPMAEObo" alt=""><figcaption><p>Testnet Scan - view with tx hash</p></figcaption></figure>
