Development Setup Guide for Morph: The Optimistic zkEVM Scaling Solution

·

Introduction to Developing on Morph

Building on Morph L2 chains mirrors Ethereum's development experience. With seamless compatibility across popular frameworks like Hardhat, Foundry, and ethers.js, deploying contracts requires minimal adjustments. This guide provides step-by-step network configurations for both Morph Mainnet and Holesky Testnet, along with optimized code snippets for each development tool.

👉 Discover Morph's RPC endpoints


Mainnet Development Setup

Network Configuration

Essential parameters for connecting to Morph Mainnet:

ParameterMorph MainnetEthereum Mainnet
RPC URLhttps://rpc-quicknode.morphl2.iohttps://ethereum-rpc.publicnode.com/
Chain ID28181
Currency SymbolETHETH
Block ExplorerMorph ExplorerEtherscan

WebSocket Connection:
wss://rpc-quicknode.morphl2.io


Framework-Specific Setup

Hardhat Configuration

Update hardhat.config.ts to target Morph Mainnet:

const config: HardhatUserConfig = {
  networks: {
    morphl2: {
      url: 'https://rpc-quicknode.morphl2.io',
      accounts: [process.env.PRIVATE_KEY || ''],
      gasPrice: 1000000000
    }
  }
};

Foundry Deployment

Deploy contracts using:

forge create --rpc-url=https://rpc-quicknode.morphl2.io --legacy

ethers.js Provider

Instantiate a Morph provider:

import { ethers } from 'ethers';
const provider = new ethers.providers.JsonRpcProvider(
  'https://rpc-quicknode.morphl2.io'
);

Holesky Testnet Setup

Network Configuration

Testnet parameters for development and debugging:

ParameterMorph HoleskyHolesky Testnet
RPC URLhttps://rpc-quicknode-holesky.morphl2.iohttps://ethereum-holesky-rpc.publicnode.com/
Chain ID281017000
Currency SymbolETHETH
Block ExplorerMorph Holesky ExplorerHolesky Etherscan

WebSocket Connection:
wss://rpc-quicknode-holesky.morphl2.io


Framework-Specific Testnet Setup

Hardhat Configuration

const config: HardhatUserConfig = {
  networks: {
    morphl2: {
      url: 'https://rpc-quicknode-holesky.morphl2.io',
      accounts: [process.env.PRIVATE_KEY || ''],
      gasPrice: 2000000000
    }
  }
};

Foundry Deployment

forge create --rpc-url=https://rpc-quicknode-holesky.morphl2.io --legacy

ethers.js Provider

const provider = new ethers.providers.JsonRpcProvider(
  'https://rpc-quicknode-holesky.morphl2.io'
);

Acquiring Testnet ETH

To fuel your Holesky Testnet transactions:

  1. Use Faucets:

  2. Morph-Specific Options:

👉 Bridge Holesky ETH to Morph


FAQ

Q: Why does Morph use zkEVM?
A: zkEVM enables Ethereum-level security with L2 scalability, allowing developers to use existing Ethereum tooling.

Q: Can I reuse my Ethereum private keys on Morph?
A: Yes! Morph is EVM-compatible—your existing keys work without modification.

Q: How do I check my Holesky transaction status?
A: Use the Holesky Etherscan block explorer.

Q: Is there a gas fee difference between Mainnet and Testnet?
A: Testnet fees are simulated (often lower) for development purposes.


Key Takeaways

For advanced documentation, refer to Morph’s official docs.