一、下载GO语言安装包:https://storage.googleapis.com/golang/go1.10.darwin-amd64.pkghtml
GO语言开发环境参考
http://www.javashuo.com/article/p-fmysmcus-b.htmlgit
二、安装以太坊github
brew install ethereum
三、钱包下载页面:golang
http://ethfans.org/wikis/Ethereum-Wallet-Mirrorweb
https://github.com/ethereum/mist/releasesjson
==Mac以太坊构建本地私有网络 https://segmentfault.com/a/1190000013635759==segmentfault
#开发 geth --dev #全部用户信息 personal.listAccounts #解锁用户 personal.unlockAccount(eth.accounts[0]) #查询当前获取币的账户 eth.coinbase # 查询区块高度 eth.blockNumber #查询全部账户信息 eth.accounts # 查询账户金额 eth.getBalance(eth.accounts[0]) #友好显示账户金额 web3.fromWei(eth.getBalance(eth.accounts[0]),"ether") #请求交易 eth.sendTransaction({from: "0x4008c676edcd32167d751ff8034eba8722ff9442", to: "0x0076b9c28a1ef05e85d59369c4410a097e6a1437", value: web3.toWei(1, "ether")}) 另一种语法 eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei(1, "ether")}) #设置挖矿获取收益账户 miner.setEtherbase(eth.accounts[1]) # MAC 钱包打开私有链 /workspace/ethereum/gw/geth.ipc 私有链地址 ./Ethereum\ Wallet.app/Contents/MacOS/Ethereum\ Wallet --rpc "/workspace/ethereum/gw/geth.ipc"
#启动 geth --datadir="/workspace/ethereum/my" --dev console 2>> b
<!--命令--> geth attach http://10.8.42.91:8545 <!--报错--> Fatal: Failed to start the JavaScript console: api modules: Post http://10.8.42.91:8545: context deadline exceeded ====解决方法==== 关闭91服务器防火墙
<!--命令--> geth --datadir "/workspace/ethereum/gw" init genesis.json <!--报错--> Failed to write genesis block: genesis has no chain configuration
解决方法:修改genesis.json,增长config节点。api
修改后内容以下(genesis.json):服务器
{ "config": { "chainId": 10, "homesteadBlock": 0, "eip155Block": 0, "eip158Block": 0 }, "nonce": "0x0000000000000042", "timestamp": "0x0", "parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000", "gasLimit": "0x80000000", "difficulty": "0x400", "mixhash":"0x0000000000000000000000000000000000000000000000000000000000000000", "coinbase": "0x3333333333333333333333333333333333333333", "alloc": { } }
参考:http://blog.csdn.net/superswords/article/details/75049323网络