Deploying Solidity Smart Contracts on M1 using Fractal EVM runtime and Remix IDE

This tutorial demonstrates how to deploy EVM smart contracts on M1 using fractal.

In this tutorial you will learn how to:

Background

Note: The Fractal EVM runtime is still under development. We've provided an RPC at https://mevm.devnet.m1.movementlabs.xyz for early stage demoing.

Fractal is an interpreter, transpiler, and runtime stack that enables the deployment of EVM smart contracts on M1 and other Move-based chains. The endpoint https://mevm.devnet.m1.movementlabs.xyz serves an ETH JSON-RPC which under the hood communicates with our on-chain EVM runtime implementation.

Fractal is the first technology to bring EVM compatibility to a Move-based chain. With Fractal, you can deploy Solidity contracts on M1 and other Move-based chains.

Pre-requisites

  1. An EVM-compatible wallet like MetaMask.

  2. Some familiarity with Solidity is helpful, but not necessary.

  3. Use our faucet or use a dedicated bridge to move funds from M1 to your EVM wallet using the our EVM-Bridge

Setup

  • Add the move-evm network to your EVM-compatible wallet.

    PropertyValue

    Network Name

    move-evm

    Network RPC

    https://mevm.devnet.m1.movementlabs.xyz

    Network ID

    0x0150

    Network Currency

    MOV

  • Ensure you have switched your Wallet network to the network added above, i.e., move-evm

Deploy Solidity Smart Contract on MoveVM

  1. Open Remix.

  1. Create a new Solidity Smart Contract. For example:

/// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.18;

contract HelloMovement{
    string public message = "Hello Movement. Let's keep moving.";

    function sayHi() public view returns(string memory) {
        return message;
    }

    function changeMessage(string memory _newMessage) external {
        message = _newMessage;
    }
}
  1. Compile your smart contract.

  1. Change Remix provider to Injected Provider - Metamask.

  1. Your account should already have 0.1 MOV balance that you can use to test.

  1. 🚀 Deploy.

  1. Confirm the MetaMask pop-up to deploy the new contract.

  1. 🔥 Give yourself a pat on the back! You've become one of the few developers who have deployed a Solidity smart contract on Move VM.

  1. To check your transaction, click on 'Debug'. Your transaction hash should be available for copying in the debugger section.

  1. Now visit explorer.devnet.m1.movementlabs.xyz to view your EVM transaction on the MoveVM!

Last updated