Goerli ➡️ Sepolia transition

What’s happening with Goerli?

After starting as a hackathon project at ETH-Berlin, Goerli eventually transformed into a popular proof-of-authority (PoA) based Ethereum testnet that allowed DApp developers to test their smart contracts thoroughly before deploying them on the Ethereum mainnet.

Goerli had its day in the limelight when it served as the last testnet to test out The Merge—the transition of the Ethereum mainnet towards a proof-of-stake (PoS) consensus mechanism.

With all that being said, it must be noted that Goerli was never meant to be the network for testing out your DApps/smart contracts. The network boasts of a permissionless validator set, which makes it ideal for validators and stakers to test out protocol upgrades and client-side updates.

Goerli is set to be sunset in Q4 2023, and we highly recommend our customers and DApp developers, in general, to consider migrating to Sepolia.

Goerli will be replaced by the Holešovice testnet, which will probably launch in the second half of 2023.

Why Sepolia?

Named after a neighborhood in Athens, Sepolia launched in October 2021. Sepolia has a closed validator set and a relatively small state and history. This means that the network has a low gas fee, and is quick to sync a node. This makes Sepolia the ideal network to test out DApps and smart contracts.

Considering the Ethereum testnet cycle, Sepolia will be the go-to testnet for DApp developers for at least 3 more years. As usual, we will keep you updated with the latest developments in the space as and when they happen.

How to migrate from Goerli to Sepolia?

With Chainstack, your process of migration to Sepolia will be entirely seamless. Just follow the following steps to update your DApp testing environment.

Create a Sepolia endpoint with Chainstack

  1. Go to the Chainstack console.
  2. Navigate to your project, or create a new one.
  3. Click Join network.
  4. Click Ethereum and create an endpoint for Sepolia.

That’s it. You now have an HTTPS and a WSS endpoint in your Chainstack console that will allow you to connect to a fully synced Sepolia testnet node.

Get some Sepolia ether

To read and write data to the blockchain, you need two things:

  1. An RPC URL to connect to the network. You got that from your Chainstack console.
  2. You must also have an EVM wallet address that holds some Sepolia ETH. You need this address to sign transactions and spend gas to change the blockchain state.
  3. Get up to 0.5 Sepolia ETH every 24 hours with the Chainstack faucet.
  4. Alternatively, you could tag us on Twitter and we will be happy to help you out with some ETH 🤑

Update the env variables

If you’re working on a project of any considerable size, you probably manage your sensitive credentials using an env file or an online secret manager. If you are unsure about the best ways to store sensitive information like RPC URLs or private keys, feel free to check out our guide on the proper ways of storing environment variables.

For now, just remember to carefully update your environment variables, especially the RPC URL and the private key.

Redeploy your smart contract

At this point, it is good practice to check if your smart contract logic depends on any global variables like block.difficulty or block.chainid. These values change from one network to another. You can check out Sepolia’s metadata on GitHub.

Once you have made sure that your smart contract is ready to go, just redeploy your smart contract on Sepolia.

Make sure your frontend is up-to-date

A DApp’s front end will usually have code that uses the env variables to interact with the blockchain or sign transactions. Make sure that your frontend code is up to date and that it refers back to the new env variables.

Developer Resources

As Sepolia continues to become mainstream, more and more protocols will deploy their products on the testnet to make it convenient for developers to test their DApps thoroughly.

This table will be updated regularly to map common platforms and tokens from Goerli to Sepolia for developers looking to test on Sepolia:

Conclusion

In a few simple steps, you have migrated your DApp to Sepolia, and with Chainstack, you can rest assured that you will have a functioning endpoint for as long as the Ethereum community is using Sepolia.

📘

See also

About the author

Priyank Gupta

🥑 Developer Advocate @ Chainstack
🛠️ BUIDLs on Ethereum, zkEVMs, The Graph protocol, and IPFS
🦀 Part-time Rust aficionado
Priyank Gupta | GitHub Priyank Gupta | Twitter Priyank Gupta | LinkedIN