Unhandled Runtime Error Error: could not detect network (event="network", code=NETWORK_ERROR, version=providers/5.4.1)
// Check if you have config this logic or not, then update your .env file
// with your current network RPC
if (process.env.NEXT_PUBLIC_WORKSPACE_URL) {
rpcEndpoint = process.env.NEXT_PUBLIC_WORKSPACE_URL
}
// Or simply replace this code
const provider = new ethers.providers.JsonRpcProvider("YOUR_RPC_URI")