区块链21-区块链去中心化应用开发14-DAPP运行-总结-The endpoint returned a different chain ID: 0x539.-js文件修改后无效

 

metamask钱包,自定义测试网络,不知道链id,报以下错

 error The endpoint returned a different chain ID: 0x539.

 

Local chains running on Ganache CLI are also breaking after upgrading Metamask to 8.1.3.
When adding custom networks to Metamask we started receiving the error The endpoint returned a different chain ID: 0x539.
In case it's helpful for anyone, the issue was caused by Ganache chain_id defaulting to 1337. Upgrading Ganache CLI to v6.11.0 and passing the option --chainId with the correct value fixed the problem.

 

默认为1337,输入1337就对了。

----------------------

js文件修改后无效

 

解决方法
浏览器会缓存某个网站的js文件,在开发web项目中,由于先前的js文件被缓存,所以在IDE中改变js文件后,浏览器还是继续引用浏览器缓存的先前那个js文件。所以只要把浏览器之前缓存的js文件删掉即可。以谷歌浏览器为例,在更多工具中选择清除浏览数据,把缓存的图片和文件删掉即可。如果想要不缓存js文件,可以在谷歌开发者工具中选择禁用js缓存。

参考https://blog.csdn.net/weixin_38997311/article/details/79513025?biz_id=102&utm_term=%E5%89%8D%E7%AB%AF%E4%BB%A3%E7%A0%81%E4%BF%AE%E6%94%B9%EF%BC%8C%E5%BC%80%E5%8F%91%E8%80%85%E5%B7%A5%E5%85%B7%E6%B2%A1%E5%8F%98&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-5-79513025&spm=1018.2118.3001.4449

 

操作图片https://blog.csdn.net/wood2016/article/details/77389255?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522160597368119724836731741%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=160597368119724836731741&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~baidu_landing_v2~default-1-77389255.first_rank_ecpm_v3_pc_rank_v2&utm_term=%E8%B0%B7%E6%AD%8C%E5%BC%80%E5%8F%91%E8%80%85%E5%B7%A5%E5%85%B7%E4%B8%AD%E9%80%89%E6%8B%A9%E7%A6%81%E7%94%A8js%E7%BC%93%E5%AD%98%E3%80%82&spm=1018.2118.3001.4449

 

还是没有解决

-----------------------又取消了,没解决,我把src文件中的代码拷贝到了我的里面

后面这个 dapp有太多不懂的地方,不知到哪里错了,也没什么意义,就算成功,也还是对这一块没有系统的认识

慢慢处理吧

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

百战成王

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值