0%
Overview page background
HomeOverviewsTestnets
How to Migrate from Kovan to Goerli on Optimism

How to Migrate from Kovan to Goerli on Optimism

Alchemy headshot

Written by Alchemy

Brady Werkheiser headshot

Reviewed by Brady Werkheiser

Published on August 8, 20233 min read

The Optimism team recently announced the migration from Kovan to Goerli for their testnet. This article will explain why web3 developers building on Optimism should migrate their dApps to Goerli, and how to migrate with Alchemy, a developer platform that supports Optimism applications.

While you can use the Goerli testnet, we caution against it as the Ethereum Foundation has announced that Goerli will soon be deprecated. Therefore, we recommend using Sepolia testnet as Alchemy has full Sepolia support and a free Sepolia faucet.

Kovan is a Proof-of-Authority (PoA) test network, and it has been deprecated for over a year. As of this announcement, there are only two remaining validators left supporting the Kovan testnet. 

To keep parity with the Ethereum network throughout The Merge roadmap, Optimism applications should migrate to Goerli, another Proof-of-Authority testnet that was maintained after The Merge was completed last year.

Other Ethereum testnets like Ropsten, Rinkeby, Kiln, and Prater have already been deprecated.

For more information on Ethereum’s testnet deprecation and merge timeline, refer to the official Ethereum blog.

Optimism aimed for all projects to be completely migrated to Goerli by August 15th, 2022, and Alchemy ended support for the Kovan testnet on October 5th, 2022

Toward the deadline for the end of Kovan support, Alchemy informed current users through in-app alerts, email notifications, and direct messages to Enterprise customers about upcoming deadlines.

The migration from Kovan to Goerli will be rolled out in three phases:

  • Wave P0 - Infrastructure

  • Wave P1 - Projects (Building Block Apps)

  • Wave P2 - Projects (End-user Apps)

Because the migration happened in phases, the Optimism team recommended that teams use Optimism Goerli for testing that didn't require a hard dependency on anything not yet supported."

Before migrating smart contracts from Kovan to Goerli, dApp developers should consider their:

  1. Product roadmap - identify competing initiatives to plan the migration timing accordingly

  2. Upcoming deadlines - ensure the proper time of energy is available to migrate successfully

  3. Testing and verification needs - determine what testing and QA must be completed 

  4. Smart contract dependencies - review Kovan smart contract dependencies such as Aave v2

Web3 developers can ensure their Optimism dApps work as intended on Goerli by considering these areas and completing their migration to the new Opt-Goerli test network as soon as possible.

To migrate from Kovan to the Goerli testnet on Optimism, create a new app in the Alchemy dashboard with the “Chain” set to “Optimism” and the “Network” set to “Goerli.”

If you don’t already have an account, create a free Alchemy account to start testing on Optimism’s Goerli testnet.

Create a new Goerli app on Optimism from the Alchemy dashboard.
Create a new Goerli app on Optimism from the Alchemy dashboard.

Next, copy the Optimism-Goerli RPC URL for your app. 

This is what the new Goerli RPC URL will look like: https://opt-goerli.g.alchemy.com/v2/

Copy the Optimism Goerli RPC URL from the Alchemy dashboard’s HTTPS section.
Copy the Optimism Goerli RPC URL from the Alchemy dashboard’s HTTPS section.

After you create a new Opt-Goerli RPC endpoint URL, you can request 0.02 Goerli ETH per day from Alchemy’s faucet. If you need more goETH, please email support at faucet@alchemy.com. (Note: The Goerli faucet requires a minimum mainnet balance of 0.001 ETH on the wallet address used to prevent bots and abuse).

Goerli faucet for getting test ETH.
Goerli faucet for getting test ETH.

Before you can start testing smart contracts on the Opt-Goerli network, you need to bridge your test ETH from Ethereum to Optimism. 

There is no public bridge to transfer Goerli ETH to Optimism yet, but it can be accomplished using Cast from Foundry, a toolkit for Ethereum application development. There is no user interface (UI) yet, but it is expected shortly.

Here is what an example code snippet would look like:

cast send --legacy --rpc-url=$ALCHEMY-OPT-GOERLI-ENDPOINT --value=0.001ether --private-key=<REDACTED> 0x636Af16bf2f682dD3109e60102b8E1A089FedAa8

Now that you have Goerli ETH on Optimism, deploy your Optimism smart contracts in the new Opt-Goerli app within Alchemy the same way you deployed your Kovan application.

Once your Optimism dApp is deployed on the Opt-Goerli testnet, you can continue running tests, debugging code, and iterating on your product the same way you did when testing it on Kovan

For more information on the Optimism testnet migration from Kovan to Goerli, refer to these resources:

Overview cards background graphic
Section background image

Build blockchain magic

Alchemy combines the most powerful web3 developer products and tools with resources, community and legendary support.

Get your API key