以太坊这东西太奇怪,remix Web3 provider连接不上探究
- 欢迎使用Markdown编辑器
- 连不上
- 连上了
 
欢迎使用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/ 打不开可能是服务器的原因。