Skip to content
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 Hadrian, the public testnet chain. Rubicon is the mainnet chain, where gas is real USDC; try everything on a test chain first.

Prerequisites

  • Node.js v22.13+

  • MetaMask browser extension

  • A Solana wallet set to Devnet, only if you fund from Solana (step 2). Calling contracts from a Solana wallet needs one that signs Solana v1 transactions, which is covered in Open your contract to Solana users.

1. Add Hadrian to MetaMask

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

Field
Value

Network Name

Rome Hadrian

RPC URL

https://hadrian.testnet.romeprotocol.xyz/

Chain ID

200010

Currency Symbol

USDC

Block Explorer

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

2. Fund your wallet

Gas is paid in the chain's gas token, which is USDC on Hadrian. On Hadrian it is backed by Circle's Solana Devnet USDC (mint 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU), so devnet SOL is not gas. There is no Rome faucet. Two ways to get USDC onto Hadrian:

From Solana — get Solana Devnet USDC from the Circle faucet (choose Solana Devnet) and a little devnet SOL for Solana fees from the Solana faucet, with your Solana wallet set to Devnet. Then use the Rome Bridge with Hadrian as the destination and its Solana route, with your EVM wallet's address as the recipient; the bridge asks that EVM wallet to sign a claim transaction on Hadrian, which turns the USDC into gas.

By bridging in from an EVM chain — 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? A write on Rome costs more than Ethereum intuition suggests, because most of its gas pays for creating Solana accounts: a recipient that has never been used, a new token account, a deployed contract. Use eth_estimateGas, which standard tooling does, and never hardcode 21,000. The estimate includes the account creation, Rome charges the gas a transaction actually uses (in measurements on Hadrian that was never more than the estimate), and the SDK's submitRomeTx pads the estimate by 1.3x as a margin, which costs nothing because only the gas used is charged. Fund at least 0.5 USDC of gas; 1 USDC leaves comfortable headroom. Numbers in JSON-RPC Support show what individual writes cost.

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 Hadrian:

Expected output (your address will differ):

Open the deployed address in the explorer to see your transaction, and follow its "Settled in" link to the Solana transaction that settled it. Your Solidity contract is now running on Solana.

What's Next

Common Errors

Error
Cause
Fix

insufficient funds

Not enough gas token for the gas limit times the gas price

Fund at least 0.5 USDC of gas (see step 2) with the Rome 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?