geth
>geth --networkid 123 --dev --datadir "d:/blockchain/project/ethereum" --rpc --rpcaddr 172.16.12.11 --rpcport 8989 --port 3000
1.在geth安装目录下,配置genesis.json文件:
{ "config": { "chainId": 15, "homesteadBlock": 0, "eip155Block": 0, "eip158Block": 0 }, "difficulty": "200000000", "gasLimit": "2100000", "alloc": { "7df9a875a174b3bc565e6424a0050ebc1b2d1d82": { "balance": "300000" }, "f41c74c9ae680c1aa78f42e5647a62f353b7bdde": { "balance": "400000" } } }
2.初始化
geth --datadir "d:/blockchain/geth/chain" genesis.json
3.进入控制台
geth --datadir "d:/blockchain/geth/chain" console
3.常用命令
1.personal.listAccounts
personal.listAccounts[0]
2.personal.newAccount("pwd")
3.web3.eth.coinbase :当前使用的账户
4.eth.getBalance(personal.listAccounts[0])
end