Skip to main content

Start Developing on Morph

Developing on Morph is as straightforward as developing on Ethereum.

To deploy contracts onto a MorphL2 chain, simply set the RPC endpoint of your target MorphL2 chain and deploy using your preferred Ethereum development framework:

...it all just works!

Mainnet:

Step 1: Network Configuration

Before you start, ensure you are connected to the following networks:

Network NameMorph MainnetEthereum Mainnet
RPC URLhttps://rpc-quicknode.morphl2.iohttps://ethereum-rpc.publicnode.com/
Chain ID28181
Currency SymbolETHETH
Block Explorer URLhttps://explorer.morphl2.io/https://etherscan.io/
Websocket Connection

wss://rpc-quicknode.morphl2.io

Step 2: Set up your developing framework

Hardhat

Modify your Hardhat config file hardhat.config.ts to point at the Morph public RPC.

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

Foundry

To deploy using Morph Public RPC, run:

forge create ... --rpc-url= --legacy

ethers.js

Setting up a Morph provider in an ethers script:

import { ethers } from 'ethers';

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

Holesky Testnet:

Step 1: Network Configuration

Before you start, ensure you are connected to the following networks:

Network NameMorph Holesky TestnetHolesky Testnet
RPC URLhttps://rpc-quicknode-holesky.morphl2.iohttps://ethereum-holesky-rpc.publicnode.com/
Chain ID281017000
Currency SymbolETHETH
Block Explorer URLhttps://explorer-holesky.morphl2.io/https://holesky.etherscan.io/
Websocket Connection

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

Step 2: Set up your developing framework

Hardhat

Modify your Hardhat config file hardhat.config.ts to point at the Morph public RPC.

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

Foundry

To deploy using Morph Public RPC, run:

forge create ... --rpc-url= --legacy

ethers.js

Setting up a Morph provider in an ethers script:

import { ethers } from 'ethers';

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

Step 3: Acquire Ether

To start building on Morph, you may need some testnet ETH. Use a faucet to acquire holesky Ether, then bridge the test Ethereum Ether to the Morph testnet.

Each faucet has its own rules and requirements, so you may need to try a few before finding one that works for you.

Holesky ETH faucet websites:

https://stakely.io/en/faucet/ethereum-holesky-testnet-eth

https://faucet.quicknode.com/ethereum/holesky

https://holesky-faucet.pk910.de/

https://cloud.google.com/application/web3/faucet/ethereum (needs a Google account)

We have our own website faucet that can claim ETH & USDT for you initial usage.

Morph also offers a Discord faucet to obtain Morph Holesky USDT & Morph Holesky ETH.

Once you receive ETH on Holesky, you should see it in your wallet on the Holesky Network. It may take a few seconds for them to appear, but you can check the status by looking for a transaction to your address on a Holesky Block Explorer.