etherenum钱包安装
https://github.com/ethereum/go-ethereum/archive/v1.5.4.tar.gz
geth
geth -datadir "D:ethereum"
geth account new
geth account list
geth wallet import
geth console
get attach
net.listening
net.peerCount
admin.peers
admin.nodeInfo
eth.blockNumber
eth.accounts
创建用户:
personal.newAccount("111111")
其中参数为此账户的密码。
也可以先创建账户,然后输入密码:
personal.newAccount()
查看账户余额
其中参数为区块链地址
eth.getBalance("0x7d1f7be4112ce63b9de04a0bf95c1e87e430bd1b")
eth.getBalance(eth.accounts[0])
personal.unlockAccount(eth.accounts[0], '123456')
启动挖矿
miner.start()
miner.stop()
首先,输入geth console,回车。
方法一:
然后,解锁账户。输入personal.unlockAccount(addr, passwd, duration),addr是你的地址,passwd是账户密码,duration是账户处于解锁状态的时间,例如300表示在300秒内无需再次解锁。建议在记事本中写完此命令,复制到geth中。成功解锁账户,界面会返回 true。
testrpc. 用geth可以创建一个测试网络,另一种更快的创建测试网络的方法是使用testrpc. Testrpc可以在启动时帮你创建一堆存有资金的测试账户。它的运行速度也更快因此更适合开发和测试。你可以从testrpc起步,然后随着合约慢慢成型,转移到geth创建的测试网络上 - 启动方法很简单,只需要指定一个networkid:geth --networkid "12345"。这里是testrpc的代码仓库,下文我们还会再讲到它。