Skip to main content
Production Deployment: Mainnet deployment involves real assets and irreversible transactions. Follow this guide carefully and ensure thorough testing on testnets before proceeding.

Pre-Deployment Checklist

Before deploying to mainnet, ensure you have:
1

Completed Testnet Deployment

Successfully deployed and tested on testnets with the same configuration.
2

Security Audit

Conducted security audits of any custom modifications to the protocol.
3

Verified Bridge Contracts

Confirmed bridge contract addresses on all target mainnets.
4

Secure Key Management

Set up secure private key management (hardware wallet, multisig, etc.).
5

Sufficient Funds

Ensured deployer account has sufficient native tokens for gas on all chains.
6

Backup Plan

Prepared contingency plans for deployment failures.

Supported Mainnet Chains

Eco Routes can be deployed to any EVM-compatible mainnet:
  • Ethereum Mainnet
  • Base
  • Optimism
  • Arbitrum One
  • Polygon
  • BSC (Binance Smart Chain)
  • Avalanche C-Chain
  • TRON Mainnet (special support)

Environment Configuration

Secure .env Setup

Never commit mainnet .env files to version control. Use .gitignore to exclude .env files.
Create a production .env file:
.env.production

Bridge Contract Addresses

Hyperlane Mailbox (Ethereum Mainnet) LayerZero Endpoint (Ethereum Mainnet)
  • Ethereum: 0x66A71Dcef29A0fFBDBE3c6a460a3B5BC225Cd675
  • Check LayerZero Docs for other chains
Chainlink CCIP Router
  • Ethereum Mainnet: 0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D
  • Base: 0x881e3A65B4d4a04dD529061dd0071cf975F58bCD

Verification Keys Configuration

Create verification-keys-mainnet.json:
verification-keys-mainnet.json
Chain IDs:
  • Ethereum Mainnet: 1
  • Base: 8453
  • Optimism: 10
  • Arbitrum One: 42161
  • Polygon: 137
  • BSC: 56
  • Avalanche C-Chain: 43114

Deployment Process

Pre-Flight Verification

Before deployment, verify your configuration:

Single Chain Deployment

Deploy to a single mainnet:
Gas Price Monitoring: Monitor gas prices before deployment. Consider using --with-gas-price flag to set maximum gas price.

Multi-Chain Deployment

Deploy to multiple mainnets using the deployment script:
1

Prepare Chain Data

Ensure your chain data includes all target mainnets with correct bridge addresses.
2

Load Environment

3

Execute Deployment

The script will:
  • Deploy CREATE3 factory if needed
  • Deploy Portal contract (if not using existing)
  • Deploy configured Prover contracts
  • Record all deployments to CSV
  • Use same SALT for deterministic addresses
4

Monitor Deployment

Watch the deployment output carefully. The script will show:
  • Deployer wallet address
  • SALT value being used
  • Deployment status for each chain
  • Deployed contract addresses

Alternative: Using Deployment Script Directly

Cross-VM Deployment

For cross-chain deployment including non-EVM chains:
Cross-VM prover addresses must be in bytes32 format:

Post-Deployment Verification

Verify Deployment Output

Expected format:

Verify Deterministic Addresses

Critical: Verify that Portal addresses match across all chains. This is essential for cross-chain operations.

Contract Verification on Block Explorers

Verify all deployed contracts:
The script will:
  • Read deployment data from CSV
  • Verify each contract on respective block explorers
  • Retry failed verifications automatically
  • Provide verification summary
Manual verification example:

Security Best Practices

Private Key Management

Never expose mainnet private keys. Use hardware wallets or multisig contracts for production deployments.
Recommended approaches: Hardware Wallet (Ledger/Trezor)
Multisig Deployment
  • Deploy using a multisig wallet like Gnosis Safe
  • Create deployment transaction proposal
  • Gather required signatures
  • Execute deployment through multisig

Gas Price Management

Monitor gas prices during deployment. Mainnet gas costs can be significant.

Deployment Validation

After deployment, validate critical configurations:

Rollback Procedures

If Deployment Fails

If deployment fails mid-process:
  1. Don’t Panic: Contracts are deployed atomically
  2. Check Deployment File: See which contracts were deployed
  3. Set PORTAL_CONTRACT: Use deployed Portal address for subsequent attempts
  4. Retry: Re-run deployment script - it will skip already deployed contracts

If Wrong Configuration Deployed

Contracts are immutable. If deployed with wrong configuration, you must deploy new contracts with a different SALT.

Post-Deployment Tasks

1

Verify All Contracts

Ensure all contracts are verified on block explorers.
2

Update Documentation

Document deployed addresses for integrators and users.
3

Configure Monitoring

Set up monitoring for contract events and transactions.
4

Test Cross-Chain Flow

Execute test intents to verify cross-chain functionality.
5

Announce Deployment

Publish deployment addresses and contract verification links.

Deployment Costs Estimation

Estimated gas costs (may vary with network conditions):
Actual costs vary with gas prices and network conditions. Always maintain sufficient funds in deployer account.

Troubleshooting

Insufficient Funds Error

Ensure deployer has sufficient balance:

Nonce Too Low/High

If nonce errors occur:

Contract Already Deployed

If contracts are already deployed at expected addresses:
  • Deployment script will skip and log existing deployment
  • Verify the existing deployment is correct
  • Use PORTAL_CONTRACT env var to reference existing Portal

Next Steps

Contract Verification

Complete guide to verifying deployed contracts

Integration Guide

Integrate Eco Routes into your application