remix Web3 provider连接不上探究

本文探讨了以太坊开发中遇到的连接Remix平台问题,重点比较了http与https地址,并提供了geth的启动命令和可能的服务器原因。

以太坊这东西太奇怪,remix Web3 provider连接不上探究

欢迎使用Markdown编辑器

首先给一张,连接成功的图
在这里插入图片描述
注意两个地址,第一个http://… 没有s

http://remix.ethereum.org/#optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.7+commit.e28d00a7.js

注意两个地址,第二个https://… 有s
https://remix.ethereum.org/#optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.7+commit.e28d00a7.js

连不上

https://remix.ethereum.org/#optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.7+commit.e28d00a7.js
在这里插入图片描述
报错连不上!!!
在这里插入图片描述

连上了

使用这个页面
http://remix.ethereum.org/#optimize=false&runs=200&evmVersion=null&version=soljson-v0.8.7+commit.e28d00a7.js
在这里插入图片描述
在这里插入图片描述

给出开启geth的命令行:
这里我把执行命令写成了 shell 脚本

#!/bin/bash
nohup geth --datadir data --networkid 666 --http --http.corsdomain="*" --http.port 8545 --http.addr "0.0.0.0" --http.api db,web3,eth,debug,personal,net,miner,admin --allow-insecure-unlock --rpc.allow-unprotected-txs  --port 30303  2>./console.log &

如果不用shell脚本,只需要关注

 geth --datadir data --networkid 666 --http --http.corsdomain="*" --http.port 8545 --http.addr "0.0.0.0" --http.api db,web3,eth,debug,personal,net,miner,admin --allow-insecure-unlock --rpc.allow-unprotected-txs  --port 30303  2>./console.log

好了,就到这把,欢迎有学习以太坊的小伙伴有问题的留言。

注意:有时候
http://remix.ethereum.org/ 打不开可能是服务器的原因。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值