以太坊geth客户端基本命令

1、eth.accounts     查看账户

2、eth.sendTransaction({from:"",to"",value:web3.toWei(2,"ether")})      从一个地址给另一个地址发送代币

3、eth.getTransaction("txid")    通过txid查询一个交易的信息

4、personal.newAccount("123456")      新建一个账户,密码为123456

5、personal.unlockAccount("address","password")      解锁账户

6、miner.start();admin.sleepBlocks(13);miner.stop();      挖矿,挖13个块之后停止挖矿

7、eth.estimateGas({from:"",to:"",value:5000})    计算一笔交易所需要的gas

8、geth --datadir "目录" --keystore "目录" console

--datadir   指定以太坊数据和密钥目录,在开启私有链时需要指定私有链目录,默认为公有链目录

--keystore   指定keystore文件(账户密钥文件)目录,默认值在datadir目录下

在开启一个geth客户端的情况下,如果想要再开一个geth客户端,可以使用geth attach命令。


猜你喜欢

转载自blog.csdn.net/MisshqZzz/article/details/78532693