eth rpc 搭建
同步 + rpc
http
1
geth --datadir /mnt/eth/data --rpc --rpcaddr 0.0.0.0 --rpcport 28545 --rpcapi personal???db,eth,net,web3
ws
1
geth --datadir ./geth-data --dev --ws --ws.port 13334 --ws.api eth,net,web3,miner,personal --verbosity 3
--dev 开发模式--allow-insecure-unlock 允许本地解锁,线上需关闭--verbosity 3 日志等级 默认3
常用命令
1 | geth attach ./geth-data/geth.ipc |
1 | eth.accounts // 查看账户 |
