I had the same problem but using the Sepolia network as Goerli now requires you to have real ETH.
The problem you are facing is related to your network/chainId.
### Step 1.
In your ```hardhat.config.js```, have your defaultNetwork as Sepolia, and make sure you have the correct rpc. [Thirdweb has provided one here](https://thirdweb.com/sepolia), or copy below.
```js
defaultNetwork: "sepolia",
networks: {
hardhat: {},
sepolia: {
url: "https://sepolia.rpc.thirdweb.com",
accounts: [`0x${process.env.PRIVATE_KEY}`],
},
```
### Step 2
In your ```main.jsx```, you need to import Sepolia from thirdweb dev chains, then set the activeChain as Sepolia. [See how to get started with Sepolia](https://thirdweb.com/sepolia).
```js
import { Sepolia } from "@thirdweb-dev/chains";
...
<ThirdwebProvider
activeChain={ Sepolia }
clientId="YOUR_CLIENT_ID" // You can get a client id from dashboard settings
>
<Router>
<StateContextProvider>
<App />
</StateContextProvider>
</Router>
</ThirdwebProvider>
```
This is what worked for me.
I had the same problem but using the Sepolia network as Goerli now requires you to have real ETH.
The problem you are facing is related to your network/chainId.
### Step 1.
In your ```hardhat.config.js```, have your defaultNetwork as Sepolia, and make sure you have the correct rpc. [Thirdweb has provided one here](https://thirdweb.com/sepolia), or copy below.
```js
defaultNetwork: "sepolia",
networks: {
hardhat: {},
sepolia: {
url: "https://sepolia.rpc.thirdweb.com",
accounts: [`0x${process.env.PRIVATE_KEY}`],
},
```
### Step 2
In your ```main.jsx```, you need to import Sepolia from thirdweb dev chains, then set the activeChain as Sepolia. [See how to get started with Sepolia](https://thirdweb.com/sepolia).
```js
import { Sepolia } from "@thirdweb-dev/chains";
...
<ThirdwebProvider activeChain={Sepolia}>
<Router>
<StateContextProvider>
<App />
</StateContextProvider>
</Router>
</ThirdwebProvider>
```
This is what worked for me.