# How to Migrate a DApp from Goerli to Sepolia Using QuickNode

In this tutorial, you will learn how to migrate your DApp from Goerli to Sepolia using QuickNode, a fast and reliable RPC node provider. 

As you may know, the Goerli network has faced several issues recently, from the low availability of test funds to network downtime. Considering this, it makes perfect sense to take your testing from Goerli to Sepolia.

[![D_D Newsletter CTA](https://sitemedia.ams3.digitaloceanspaces.com/blog_banner_v1_d1653cce08.png)](https://devdao.to/blog-newsletter-1)

## 1. Updating the RPC node

The first step for migrating your DApp is to get the RPC node of the new test network. For our example, we will use the Sepolia test network and [QuickNode](https://www.quicknode.com/) as the node provider.

Go to their RPC Endpoints Service section by clicking on this [link](https://www.quicknode.com/endpoints) and click on the "Create an endpoint" button.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679755121181/7ca86966-c7fb-4c7c-b5ed-856b12256456.png align="center")

Select the chain. In our case, we will be selecting Ethereum.
    
![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679755321094/6cc68dd0-a8c6-4622-9113-0f498500fbcd.png align="center")

Select the network, and click "continue".
    
![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679755536151/09124fd2-213d-4486-8742-9106314e2265.png align="center")

Click on the "Create endpoint" button.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679755846928/27833538-12fb-4bbf-b3dc-10a9dca381bb.png align="center")

Go to the HTTP provider and copy the RPC URL.
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679756019797/af166924-1105-48f3-a929-1c7247000583.png align="center")

That's it. You now have the RPC node. With this at hand, we can now replace the old Goerli RPC URL in our DApp with the new Sepolia RPC URL. Let's go!

I assume you are using **Hardhat** as your Solidity development framework. If you are following any quality tutorial or documentation, you most likely store your RPC key in a `.env` file. In this case, you must replace it with a new Sepolia RPC node.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679757438077/7bb5d276-d5d4-436c-9030-0c447a29d9e6.png align="center")

In your `hardhat.config.js` file, replace `goerli` with `sepolia` inside the `networks` and `etherscan` sections.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679757858056/0f15d466-0306-4370-a104-c5172ae634e2.png align="center")

## 2. Deploying the contract on the new chain

First, ensure that you have some test ETH in your wallet, which you will use to deploy the smart contract. You can obtain some test ETH using the [Sepolia Faucet](https://faucet.quicknode.com/ethereum/sepolia).

Run the command to deploy your smart contract.

```javascript
yarn hardhat run scripts/deploy.js --network sepolia
```

You will receive an updated contract address if everything works according to plan. If you added `console.log` in your deploy script, you would receive an output similar to this:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679764703119/272eba7d-59d0-4363-b354-dda60f01a62a.png align="center")

## 3.  Adjusting the frontend

Update your smart contract address in your `frontend` folder or `index` file.

Set the `chainId` to `11155111`, as in `chainId == 11155111`, and replace the word 'Goerli' with 'Sepolia'.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1679765342073/821ed625-eeeb-42ff-85e6-62d8d2543e5f.png align="center")

Remember to push your code to GitHub, so all the world can see your fantastic work.

I hope you learned something new and solved the problem. Thanks for reading. Have fun!

[![D_D Newsletter CTA](https://sitemedia.ams3.digitaloceanspaces.com/blog_banner_v1_d1653cce08.png)](https://devdao.to/blog-newsletter-1)

You can follow me on [**Twitter**](https://twitter.com/Aayush_gupta_ji), [**GitHub**](https://github.com/AAYUSH-GUPTA-coder)**,** and [**Linkedin**](https://www.linkedin.com/in/aayush-gupta-20023b183/). Keep your suggestions and comments coming!
