区块链(三)--常用命令(2)
来源:互联网 发布:读写器软件 编辑:程序博客网 时间:2024/06/04 23:24
承接区块链(三)–常用命令(1)
6.两个账户间转账
> acc1=eth.accounts[0] "0xa0aee14352a0f3f5dcde30a45be6b06003c88073" > acc2=eth.accounts[1] "0xfd6f9c291fb6137f7809d13f6717baf691dc6bf1" //转账需要对账户进行解锁 >personal.unlockAccount(acc1,'1') true >eth.sendTransaction({from:acc1,to:acc2,value:web3.toWei(10,"ether")}) INFO [08-16|09:08:41] Submitted transaction fullhash=0xd00eb2613476be17b43784d8ea24cc5aadb686d7696f6633ab954853ade90490 recipient=0xfd6f9c291fb6137f7809d13f6717baf691dc6bf1 "0xd00eb2613476be17b43784d8ea24cc5aadb686d7696f6633ab954853ade90490"
7.账户交易产生,产生后等待挖矿,进行转账,返回的有交易Hash
> miner.start()INFO [08-16|09:10:46] Starting mining operation (CPU=4 TOT=5)true> INFO [08-16|09:10:46] commit new work on block 118 with 1 txs & 0 uncles. Took 3.768493ms > INFO [08-16|09:10:51]
8.查询当前区块数,与之前的做对比
>eth.blockNumber117> eth.blockNumber120
9.查询当前账户余额,与之前的对比
//账户1> eth.getBalance(eth.accounts[0])579531250000000000000> eth.getBalance(eth.accounts[0])584531250000000000000//账户2> eth.getBalance(eth.accounts[1])10000000000000000000> eth.getBalance(eth.accounts[1])20000000000000000000
阅读全文
1 0
- 区块链(三)--常用命令(2)
- 区块链(三)--常用命令(1)
- 基于区块链的融合通信初探(三)
- 区块链(三)--Bitcoin、Ethereum、Hyperledger Fabric
- 区块链读书笔记三
- 区块链(Blockchain)
- 常用命令(三)
- Linux常用命令(三)
- Linux常用命令(三)
- Linux常用命令(三)
- Linux 常用命令(三)
- Linux常用命令(三)
- Linux常用命令(三)
- linux常用命令(三)
- Linux常用命令(三)
- Hadoop常用命令(三)
- Linux常用命令(三)
- docker常用命令(三)
- Spring+mybatis框架搭建(2)
- Count the string kmp next数组应用
- 学习记录--颤抖吧,hadoop(四)---安装Linux系统
- 20170816_new和delete的使用
- NULL和0的区别
- 区块链(三)--常用命令(2)
- Sudoku POJ
- poj1195二维线段树,区间求和,单点跟新
- 手欠--Executioin failed for task 的问题
- jsp笔记——内置对象
- 小白学分布式程序开发11-PAXOS算法1
- ZOJ 2006 Glass Beads
- 嗨!我的第一篇博客
- python metaclass 和 __new__方法