How to Migrate from Kovan to Goerli on Optimism
Written by Alchemy
Reviewed by Brady Werkheiser
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.
Deprecation Notice
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.
Why is Optimism migrating from Kovan to the Goerli testnet?
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.
When will Optimism and Alchemy end support for Kovan?
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.
How will the migration from Kovan to Goerli be rolled out on Optimism?
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."
Things to Consider Before Migrating from Opt-Kovan to Goerli
Before migrating smart contracts from Kovan to Goerli, dApp developers should consider their:
Product roadmap - identify competing initiatives to plan the migration timing accordingly
Upcoming deadlines - ensure the proper time of energy is available to migrate successfully
Testing and verification needs - determine what testing and QA must be completed
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.
How to Migrate from Kovan to Goerli on Optimism
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.
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/
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).
Before you can start testing smart contracts on the Opt-Goerli network, you need to bridge your test ETH from Ethereum to Optimism.
How to Bridge Goerli ETH 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
Additional Optimism Goerli Resources
For more information on the Optimism testnet migration from Kovan to Goerli, refer to these resources:
Read the Optimism team's official announcement.
Follow migration progress updates on the phased rollout
Review the official Twitter post from the Optimism team
Check the Opt-Goerli testnet status
Explore transactions on the Opt-Goerli block explorer
Related overviews
Building on Base? Get free Sepolia ETH and start testing your dApp!
Learn How to Migrate to the New Ethereum Testnet Sepolia From Goerli
Explore the Technical Differences, Benefits, and Tradeoffs of Testing Smart Contracts on Sepolia vs Goerli