Deploy Solidity Contracts

This guide covers deploying Solidity smart contracts on Rome EVM using Hardhat and Foundry.

Prerequisites

  • Node.js v18+ (Hardhat) or Foundry installed

  • A funded Rome EVM address (see Quickstart)

  • Your private key exported as an environment variable

export PRIVATE_KEY="0xYOUR_PRIVATE_KEY"

Network Configuration

Network
RPC URL
Chain ID

Local

http://localhost:9090

1001

Devnet (montispl)

https://montispl.devnet.romeprotocol.xyz

200002

Testnet (Martius)

https://martius-i.testnet.romeprotocol.xyz

121214

Testnet (Caelian)

https://caelian-i.testnet.romeprotocol.xyz

121215

Hardhat

Setup

mkdir my-rome-project && cd my-rome-project
npm init -y
npm install --save-dev hardhat @nomicfoundation/hardhat-toolbox
npx hardhat init

hardhat.config.js

Deploy

Verify on Block Explorer

Foundry

Setup

Deploy

Call Deployed Contract

Using the Rome Solidity SDK

For contracts that interact with Solana programs, install the Rome Solidity SDK:

Deployment Constraints

Constraint
Limit
Notes

Max contract size

480 KB

Raised from Ethereum's 24 KB for OP-Geth mode

Transaction size limit

80 KB per holder

Large deploys are split across holder accounts transparently

Compute budget

~1.4M CU (atomic)

Use iterative mode for heavy contracts

Solidity version

0.8.28 recommended

Earlier versions work but 0.8.28 matches the SDK

Common Errors

Error
Cause
Fix

insufficient funds for gas

EVM address has no balance

Deposit SOL via the deposit UI

nonce too low

Stale nonce in wallet

Reset MetaMask account or specify nonce manually

execution reverted

Contract logic failed

Debug with eth_call or forge test --fork-url

transaction underpriced

Gas price below minimum

Increase gas price in transaction

What's Next

Last updated

Was this helpful?