metamask-使用React JS切换到Ropsten网络

发布于 2025-01-28 17:01:36 字数 507 浏览 4 评论 0 原文

我正在开发一个Web 3.0应用程序,当用户连接到那里的metAmask时,我想要的是,如果我不ropsten的网络,则MetAmask要求他们将其切换,因为我的智能合约已将我的智能合约部署到Ropsten网络中,并且我希望所有交易通过Ropsten Network,但是我遇到了一些问题,但在其他任何地方都没有找到解决方案 [在此处输入图像描述] [1]

这是处理交换机网络功能的函数: https:https:https:https:https:https:https:https:https:https:// i.sstatic.net/r6qpy.png

这是我面临的错误:

任何帮助pleaaaase!

i'm developping a web 3.0 app and i want when users connect there metamask, if the network i not ropsten then metamask ask them to switch it cause my smart contract was deployed into ropsten network and i want all the transactions pass in ropsten network, but i faced some problemes and i didn't found the solution anywhere else
[enter image description here][1]

This is the function which handle the switch network function : https://i.sstatic.net/R6QpY.png

This is the error that i faced : https://i.sstatic.net/76DbN.png

Any Help pleaaaase !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文