For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quickstart

Deploy your first Solidity contract on Rome in under 5 minutes.

Deploy your first Solidity contract on Rome in under 5 minutes. This guide targets Martius, the public testnet chain; the same steps work on Hadrian (devnet) by swapping the network values.

Prerequisites

  • Node.js v22.13+

  • MetaMask browser extension

  • A Solana wallet (e.g. Phantom) set to Devnet

1. Add Martius to MetaMask

Add it manually (Settings → Networks → Add network):

Field
Value

Network Name

Rome Martius

RPC URL

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

Chain ID

121214

Currency Symbol

USDC

Block Explorer

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

2. Fund your wallet

Gas is paid in the chain's SPL gas token (USDC on Martius). Two ways to get it:

From Solana — get devnet SOL from the Solana faucet (set your Solana wallet to Devnet), then open the Rome App, connect both wallets, and wrap into the gas token.

By bridging in — mint test USDC on Ethereum Sepolia from the Circle faucet, then bring it to Rome with the Rome Bridge (CCTP). You'll need a little Sepolia ETH for the source-side transaction — see Faucets for every faucet.

How much? Contract deploys on Rome carry Solana-side account costs, so gas estimates run well above Ethereum intuition — the quickstart contract estimates ~20M gas and costs about 0.2 USDC to deploy, and wallets pre-check roughly double the estimate up front. Fund at least 0.5 USDC of gas; 1 USDC leaves comfortable headroom.

If a Solana-side deposit fails with an "insufficient SOL" warning despite a funded wallet, set your Solana wallet to Testnet Mode / Devnet (see the FAQ).

3. Create a Hardhat project

Accept the defaults when prompted — Hardhat 3, the current directory, and the TypeScript + Node Test Runner + viem template — and let it install dependencies. The template ships an example Counter contract with tests; they don't interfere with this guide.

4. Configure Hardhat for Rome

Edit the generated hardhat.config.ts and add the Rome networks inside defineConfig({ ... }):

configVariable("PRIVATE_KEY") resolves from the environment, so export your MetaMask private key:

(For anything beyond a throwaway key, prefer the encrypted keystore that ships with the toolbox: npx hardhat keystore set PRIVATE_KEY.)

5. Write a contract

Create contracts/HelloRome.sol:

6. Deploy

Create scripts/deploy.ts:

Deploy to Martius:

Expected output (your address will differ):

Open the deployed address in the explorer to see the Solana instructions behind your transaction. Your Solidity contract is now running on Solana.

What's Next

Common Errors

Error
Cause
Fix

insufficient funds

Not enough gas token — wallets pre-check ~2× the gas estimate

Fund at least 0.5 USDC of gas (see step 2) via the Rome App or bridge

nonce too low

Transaction nonce mismatch

Reset the account (MetaMask → Settings → Advanced → Clear activity)

execution reverted

Contract execution failed

Check contract logic; use eth_call to debug

Connection timeout

RPC unreachable

Verify the RPC URL

Last updated

Was this helpful?