BTC入門

http://melanx.com/2018/03/19/%E4%BD%BF%E7%94%A8-go-ethereum-1-7-2%E6%90%AD%E5%BB%BA%E4%BB%A5%E5%A4%AA%E5%9D%8A%E7%A7%81%E6%9C%89%E9%93%BE/

https://blog.csdn.net/xc70203/article/details/77988473

https://github.com/ethereum/go-ethereum/

 

vim genesis.json
# 輸入以下內容,然後存盤退出
{
  "nonce": "0x0000000000000042",
  "timestamp": "0x00",
  "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "extraData": "0x00",
  "gasLimit": "0x80000000",
  "difficulty": "0x400",
  "mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "coinbase": "0x2D356ee3F5b8718d8690AFCD31Fe2CB5E602677e",
  "alloc": {},
  "config": {
    "chainId": 15,
    "homesteadBlock": 0,
    "eip155Block": 0,
    "eip158Block": 0
  }
}

cd root & geth --datadir "/home/ethbase/chain" init genesis.json

geth --dev console 2>> geth_dev_log

miner.setEtherbase(eth.accounts[0])

geth --networkid 57598955 --port 8955 --nodiscover --rpc --rpcaddr "0.0.0.0" --rpcport "8956" --rpccorsdomain "*" --rpcapi "eth,net,web3,personal" --datadir "/home/ethbase/chain" console 2>> /home/ethbase/geth_err.log

/home/wuxin/web/ether/ethereum-php

personal.newAccount("password")
eth.accounts
miner.setEtherbase(eth.accounts[0])

miner.start(1)


acc0 = web3.eth.accounts[0]
"0xbe323cc4fde114269a9513a27d3e985f82b9e25d"
> acc1 = web3.eth.accounts[1]
"0x3b0ec02b4193d14abdc9cc5b264b5e3f39624d70"
> web3.eth.getBalance(acc0)

web3.fromWei(web3.eth.getBalance(acc0))

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章