Rome Docs
  • Getting Started
  • Overview of Rome
    • Rome Scales Bitcoin
      • How Rome Scales Bitcoin
    • Rome Scales Ethereum
      • How Rome Scales Ethereum
    • Rome Scales Rollups
      • How Rome Scales Rollups
    • Rome Provides Interop with Cosmos
      • How Rome Provides Interop with Cosmos
  • Nexus: Rome's Based Sequencer
    • How Nexus Works
    • Transaction Flow
  • Rome Interop
    • Rome SDK
    • Rome SDK Setup
      • Prepare Environment
      • Set Configuration
      • Run Rhea Example
      • Run Remus Example
      • Run Romulus Example
    • Remus: Cross-Rollup Atomicity
    • Romulus: Cross-Chain Atomicity
  • L2 EVM Setup
    • Prepare Config
    • Download Repos
    • Register your L2
    • Initialize your L2
    • Setup OP Geth Node
    • Run Block Explorer
    • Airdrop & Metamask
    • Check L2 State
    • Simple Transfers
    • Uniswap
    • Run on Remote Server
      • Setup AWS Server
      • Setup Certificate
  • Rome EVM
    • How to use Rome EVM
    • RPC Information
    • Tutorial to deploy a smart contract on Rome EVM
  • Shared Sequencer
    • Atomicity
    • Rome Transactions
    • Rhea
    • Hercules
    • Data Availability
    • Settlement
Powered by GitBook
On this page
  • Prerequisites
  • Set-up Rome Network in Metamask
  • Obtain Rome Tokens for Gas Fees
  • Write your Smart Contract
  • Here's a video to guide you in deploying a smart contract on Rome EVM

Was this helpful?

  1. Rome EVM

Tutorial to deploy a smart contract on Rome EVM

PreviousRPC InformationNextShared Sequencer

Last updated 5 months ago

Was this helpful?

This guide provides step-by-step instructions for deploying a smart contract on the Rome EVM network using MetaMask and Remix IDE.

Prerequisites

  • MetaMask: Ensure the MetaMask browser extension is installed and configured.

  • Remix IDE: We will be utilizing Remix for deploying the smart contract directly.

  • Foundational Knowledge: A basic understanding of smart contracts and Ethereum-compatible networks will be helpful to follow along.

Set-up Rome Network in Metamask

  1. Open MetaMask and click on the network dropdown at the top.

  2. Select "Add a custom network".

  3. Fill in the .

  4. Click "Save" and switch to the Rome network.

Obtain Rome Tokens for Gas Fees

  1. Visit the Rome network faucet: .

  2. Request testnet tokens for your MetaMask address.

  3. Wait for the tokens to appear in your MetaMask wallet.

Write your Smart Contract

  1. Open Remix IDE in your browser.

  2. Create a new file or open an existing one with your smart contract code.

  3. For this example, we'll use a simple "Hello World" contract using Solidity

// SPDX-License-Identifier: MIT
// compiler version must be greater than or equal to 0.8.26 and less than 0.9.0
pragma solidity ^0.8.26;
contract HelloWorld {
    string public greet = "Hello World!";
}
  1. Compile the smart contract.

  2. In Remix IDE, go to the "Deploy & Run Transactions" tab.

  3. In the "Environment" dropdown, select "Injected Provider - MetaMask". Ensure MetaMask

    is connected to the Rome network.

  4. Click Deploy.

  5. MetaMask will prompt you to confirm the transaction. Review the details and approve it. Wait for the transaction to be confirmed on the Rome network.

  6. Once the transaction is confirmed, Remix will display the deployed contract address, somewhat like this.

Voila 🎉! You have successfully deployed your first smart contract on the Rome EVM network.

Here's a video to guide you in deploying a smart contract on Rome EVM

To view the transaction details, visit the Rome network block explorer and search for your contract address or transaction hash.

Note: The video above uses outdated RPC details for setting up Metamask and doing the airdrop. Make sure to use the .

Rome network details
https://rome.testnet.romeprotocol.xyz/request_airdrop
https://rome.testnet.romeprotocol.xyz:1000
new RPC details and airdrop URL
LogoFrame.ioweb-client