📌  相关文章
📜  未处理的运行时错误错误:无法检测到网络(event="network",code=NETWORK_ERROR,version=providers 5.4.1) - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:26.980000             🧑  作者: Mango

代码示例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")