How to Migrate from Goerli to Sepolia
As of The Merge, both Ethereum and Sepolia have transitioned to Proof-of-Stake. Sepolia is continuously maintained by the Ethereum community, making it a suitable environment for testing Ethereum-based projects. In our previous announcement on Sepolia we highlighted its benefits, such as improved scalability and lower gas fees; all attributes we think will ultimately lead to better application development.
What happens when a network is deprecated?
When a testnet is deprecated, like Ropsten, Rinkeby, and Kovan were in the past, it loses parity with the Ethereum Virtual Machine (EVM), making it unsafe and inaccurate for testing dApps and other web3 projects.
In other words, the deprecation of a network like Goerli signifies that it will no longer receive updates or maintenance, making it incompatible with the latest Ethereum Virtual Machine (EVM) changes.
This leads to a significant drawback for developers: Goerli will no longer mirror the mainnet environment accurately. It's akin to using an app that's no longer supported — it might work for a short time, but eventual glitches and incompatibilities will emerge, and there will be no fixes in sight.
Thankfully, all developers have to do to prevent disruptions is migrate from Goerli to Sepolia.
The migration to Sepolia represents a critical move to ensure that your development environment remains robust and reliable. While performing this migration may cause a temporary inconvenience, choosing to delay instead could lead to significant issues down the line, especially after the depreciation date for each network (see the table below).
To avoid any risk of issues, the Alchemy team strongly recommends to start planning and executing the migration to Sepolia as soon as possible. This proactive approach will safeguard your projects against future disruptions and ensure continuity in your development workflow.
What is the Sepolia Testnet?
Testing smart contracts is a critical part of the dapp development process. However, testing on the Ethereum mainnet is unnecessarily and prohibitively costly. Testnets like Sepolia exist to offer a cost-effective and smooth development experience.
Sepolia functions similar to Ethereum, allowing web3 developers to test their projects without spending real ETH tokens. With Sepolia, developers can confidently design, create, test, and monitor their project's performance before deploying it on the Ethereum mainnet.
Sepolia has a permissioned set of validators, and is relatively new meaning its state and history are small. These factors make running Sepolia nodes quick and easy for developers.
Sepolia testnets on Alchemy
Alchemy’s team is working to support Sepolia testnets on every EVM chain as soon as they are available.
How to Migrate from Goerli to Sepolia
To migrate from Goerli to Sepolia testnet, create a new app in the Alchemy dashboard with the following details:
This example uses Ethereum, but you can follow these steps for every EVM-compatible chain on Alchemy.
To get the Sepolia RPC URL for your app, follow these steps:
Click on the view key button
Copy the HTTPS URL that appears
The new Sepolia RPC URL will look like this: https://eth-sepolia.g.alchemy.com/v2/
How to Get Sepolia ETH
Once you've created a new Sepolia RPC URL, the next step is to get Sepolia ETH.
You can get Sepolia ETH from Alchemy’s Sepolia faucet, which allows you to receive a small amount of Sepolia ETH to your EOA or smart contract wallet.
Sepolia ETH is the currency used to complete transactions on the Sepolia testnet, similar to how ETH is used to pay gas for mainnet Ethereum transactions.
Go to the faucet: https://sepoliafaucet.com/
Enter your wallet address or ENS name in the provided box
Click on the “Send Me ETH” button to receive your Sepolia ETH
Open your Metamask wallet, go to the activity tab, and you can see all the transactions.
In this example, 1 Sepolia ETH was deposited to the MetaMask wallet from the Sepolia faucet.
Open the Activity Tab in Metamask
You can now start deploying and testing smart contracts on Sepolia testnet with your test ETH!
How to Access Sepolia Block Explorer
Web3 developers can use a Sepolia block explorer to access information such as the date and time of blocks, transaction fees, gas burned, and Sepolia testnet transaction data by looking up the transaction hash. For example, Etherscan’s Sepolia block explorer and Otterscan are two popular examples.
3 Things to Know When Migrating from Goerli to Sepolia
If you're a dapp developer planning to migrate smart contracts from Goerli to Sepolia, there are several things to consider to ensure a safe transition: dependencies, deadlines, and testing.
1. Smart contract dependencies
Review your smart contract dependencies on Goerli and make sure they are compatible with Sepolia's network. This can help you identify any potential issues that need to be addressed before migrating.
2. Impending Deadlines
Make sure to allocate the necessary resources and time to complete the migration before any impending deadlines. This can help you avoid any last-minute rushes or issues.
Our team is closely monitoring chain developments and as soon as we have new information on all deadlines, they will be integrated into this guide.
3. Testing and Verification
Determine the tests needed to validate a successful migration, such as verifying the compatibility of your smart contracts with Sepolia's network. This can help ensure that your dApp works as intended on Sepolia.
By considering these three areas, developers can complete their move from Goerli to Sepolia with confidence and ensure their decentralized application works on Sepolia.
Building on Base? Get free Sepolia ETH and start testing your dApp!
Migrating dApps and Bridging Goerli ETH to Optimism
Explore the Technical Differences, Benefits, and Tradeoffs of Testing Smart Contracts on Sepolia vs Goerli