gpt4 book ai didi

ethereum - 混音 |无法连接到 Web3 提供程序

转载 作者:行者123 更新时间:2023-12-01 09:14:26 26 4
gpt4 key购买 nike

我在 web3 提供程序 (localhost:8545) 上运行时出错

Not possible to connect to the Web3 provider. Make sure the provider is running and a connection is open (via IPC or RPC).

所以我想出如下。

我在本地运行 geth,并提供了一些连接 remix 和 testnet 的选项。
$ geth —testnet —rpc —rpcapi “db, net, web3, personal” —rpccorsdomain “https://remix.ethereum.org” console

我给了 -rpccorsdomain 因为混音是在 https 上。

无论如何,请检查 remix IDE 中“运行”选项卡上的“web3 证明者”。

然后,修改地址,如' http://127.0.0.1:8545 '不是' http://localhost:8545 '。

我不知道为什么,但是当我这样修复时它仍然有效。
我做了我的帐户并做了一些事情。

但是,由于某种原因,我不得不再次重新下载 geth。 (我已经改变了我的电脑)。我现在正在同步块(synchronized block)。
我认为同步尚未完成,因为 blockNumber 为 0。
> eth.blockNumber
0

所以...我现在正在等待,但我想知道当 eth.syncing 未完全完成时可能会发生错误。

最佳答案

HTTPS 不允许您连接到在 HTTP 上运行的 TestRPC。
因此,您需要使用 HTTP 运行 IDE。

http://remix.ethereum.org/

关于ethereum - 混音 |无法连接到 Web3 提供程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48273500/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com