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

Deploy Solidity Contracts

Deploy Solidity smart contracts on Solana with Hardhat or Foundry — Rome network configuration, funded accounts, and step-by-step deployment.

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

Prerequisites

  • Node.js v22.13+ (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

Hadrian (devnet)

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

200010

Martius (testnet)

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

121214

Hardhat

Setup

mkdir my-rome-project && cd my-rome-project
npx hardhat --init

Accept the defaults (Hardhat 3, current directory, TypeScript + viem template); dependencies install automatically.

hardhat.config.ts

configVariable("PRIVATE_KEY") resolves from the environment (or the encrypted keystore — npx hardhat keystore set PRIVATE_KEY).

Deploy

Verify on Block Explorer

Needs the Sourcify verifier config from Verify Contracts in your hardhat.config.ts.

Foundry

Setup

Deploy

Call Deployed Contract

Using the Rome Solidity SDK

For contracts that interact with Solana programs, use the interfaces from the public rome-solidity repo (npm publish pending):

Bring an existing protocol

Any Solidity contract deploys on Rome unmodified — a compliance contract, a DeFi protocol, or an existing hardened application. Two production examples you can fork and deploy with the same Hardhat / Foundry flow above:

Both gain Solana execution and CPI composability with no contract changes.

Deployment Constraints

Constraint
Limit
Notes

Max contract size

24 KB

Same as Ethereum (EIP-170, 24,576 bytes)

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 gas token

Wrap gas via the Rome App (see Quickstart)

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?