区块链(三)--常用命令(1)
来源:互联网 发布:淘宝买东西怎么分期 编辑:程序博客网 时间:2024/06/10 05:37
Ethereum Geth客户端命令操作
1.启动自己的私有链
geth --rpc --rpccorsdomain "*" --rpcapi "personal,web3,eth" console
~xue$ geth --rpc --rpccorsdomain "*" --rpcapi "personal,web3,eth" consoleINFO [08-16|08:54:48] instance:Geth/v1.6.0-unstable-105b37f1/darwin/go1.8 INFO [08-16|08:54:48] Allocated cache and file handles database=/Users/xue/Library/Ethereum/geth/chaindata cache=128 handles=1024INFO [08-16|08:54:48] Initialised chain configuration config="{ChainID: 0 Homestead: <nil> DAO: <nil> DAOSupport: false EIP150: <nil> EIP155: <nil> EIP158: <nil>}"INFO [08-16|08:54:48] Disk storage enabled for ethash caches dir=/Users/xue/Library/Ethereum/geth/ethash count=3INFO [08-16|08:54:48] Disk storage enabled for ethash DAGs dir=/Users/xue/.ethash count=2INFO [08-16|08:54:48] Initialising Ethereum protocol versions="[63 62]" network=1INFO [08-16|08:54:48] Loaded most recent local header number=117 hash=852594…295309 td=15753221INFO [08-16|08:54:48] Loaded most recent local full block number=117 hash=852594…295309 td=15753221INFO [08-16|08:54:48] Loaded most recent local fast block number=117 hash=852594…295309 td=15753221INFO [08-16|08:54:48] Starting P2P networking INFO [08-16|08:54:50] RLPx listener up self=enode://b2c6d6accc789106c2a05233704111ff0723d74733f0e2814e6a434a04b781e632a771721b5e1a5d85c05f1ed7c36f81bb4c07e15762b6518c591d6a5b9109ab@[::]:30303INFO [08-16|08:54:50] IPC endpoint opened: /Users/xue/Library/Ethereum/geth.ipc INFO [08-16|08:54:50] HTTP endpoint opened: http://localhost:8545 Welcome to the Geth JavaScript console!instance: Geth/v1.6.0-unstable-105b37f1/darwin/go1.8coinbase: 0xa0aee14352a0f3f5dcde30a45be6b06003c88073at block: 117 (Tue, 15 Aug 2017 16:30:09 CST) datadir: /Users/xue/Library/Ethereum modules: admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0> //私有链启动成功
2.查看当前账户信息
>eth.accounts>["0xa0aee14352a0f3f5dcde30a45be6b06003c88073", "0xfd6f9c291fb6137f7809d13f6717baf691dc6bf1"]
3.创建新的账户
//引号内是账户密码>personal.newAccount('1')>INFO [08-16|08:58:27] New wallet appeared url=keystore:///Users/xue/Library/E… status=Locked"0x9b23d981e7d7655c9483202c2404e8d8e638e19c"
4.查看当前链上区块数
>eth.blockNumber117
5.查询当前账户余额
//账户1> eth.getBalance(eth.accounts[0])579531250000000000000
//账户2> eth.getBalance(eth.accounts[1])10000000000000000000
阅读全文
1 0
- 区块链(三)--常用命令(1)
- 区块链(三)--常用命令(2)
- 区块链读书笔记三
- 区块链学堂(1):区块链引子
- 基于区块链的融合通信初探(三)
- 区块链(三)--Bitcoin、Ethereum、Hyperledger Fabric
- 【区块链系列1】区块链科普
- 解决区块链三大问题的利器
- 解决区块链三大问题的利器
- 解决区块链三大问题的设想
- 4.三分钟了解什么是区块链?
- 区块链相关技术学习总结(1)——区块链以及区块链技术入门详解
- 从零开始学习区块链(1)
- 区块链(Blockchain)
- 区块链入门(一)1: 区块链是什么 (大叔思维)
- 《Linux 三》 常用命令 [ 1 ]
- 《Linux 三》 常用命令 [ 1 ]
- [Linux] 三, 常用命令 [ 1 ]
- SQL复杂语句
- windows下安装配置mongodb
- Thinking In Java习题作业集
- Spring中的@scope注解
- 论理想中的技术团队——领导力
- 区块链(三)--常用命令(1)
- JS无缝滚动,form表单获取数据异常多,符号
- python的time.time()处理方法
- string 转换成 char*
- struts2中action执行两次
- h5项目如何打成war包
- java入门-构造函数和构造代码块功能
- summary about laysnc(little details)
- C语言超出类型数值范围的表示方法