EOS - 常用命令(获取余额、创建账户、发送EOS Token)

前言

运行环境为Jungle Testnet网内。

https://forums.eosgo.io/discussion/493/jungle-testnet

http://dev.cryptolions.io/

https://developers.eos.io/eosio-cleos/reference

可用节点地址:http://193.93.219.219:8888

获取余额(get balance)

命令格式:

./cleos.sh get currency balance eosio.token <account name>

实际运行:

cleos --url http://193.93.219.219:8888 get currency balance eosio.token biezhihua

运行结果:

29799.8032 EOS
30000.0000 JUNGLE

创建账户(create account)

命令格式:

也可以使用cleos create account命令:https://developers.eos.io/eosio-cleos/reference#cleos-create-account

./cleos.sh system newaccount --stake-net "100.0000 EOS" --stake-cpu "100.0000 EOS" --buy-ram-kbytes 4 <your accountr> <new account> <owner_pup_key> <active_pub_key>

实际运行:
创建huyuqiong521的账户

cleos --url http://193.93.219.219:8888 system newaccount --stake-net "100.0000 EOS" --stake-cpu "100.0000 EOS" --buy-ram-kbytes 4 biezhihua huyuqiong521  EOS6ivwcgQop3qsyYrWv79ACnjWmSxBnMsYUNvZnLrQitKjuZgrBr EOS6ivwcgQop3qsyYrWv79ACnjWmSxBnMsYUNvZnLrQitKjuZgrBr

注意:100.0000 EOS之间必须有空格,否则会报如下错误 Invalid asset
Asset's amount and symbol should be separated with space

2018-08-18T02:44:02.968 thread-0   asset.cpp:79                  from_string          ] 3010011 asset_type_exception: Invalid asset
Asset's amount and symbol should be separated with space
    {}
    thread-0  asset.cpp:42 from_string
2018-08-18T02:44:02.968 thread-0   asset.cpp:79                  from_string          ] from: 100.0000EOS 
Error 3010011: Invalid asset
Error Details:
Asset's amount and symbol should be separated with space
rethrow

运行结果:

executed transaction: 552ee5cbb6426b3d39ec17d1334746905346058e2168fa8f2ad9b2b6e05760f5  336 bytes  11476 us
#         eosio <= eosio::newaccount            {"creator":"biezhihua","name":"huyuqiong521","owner":{"threshold":1,"keys":[{"key":"EOS6ivwcgQop3qsy...
#         eosio <= eosio::buyrambytes           {"payer":"biezhihua","receiver":"huyuqiong521","bytes":4096}
#   eosio.token <= eosio.token::transfer        {"from":"biezhihua","to":"eosio.ram","quantity":"0.1958 EOS","memo":"buy ram"}
#     biezhihua <= eosio.token::transfer        {"from":"biezhihua","to":"eosio.ram","quantity":"0.1958 EOS","memo":"buy ram"}
#     eosio.ram <= eosio.token::transfer        {"from":"biezhihua","to":"eosio.ram","quantity":"0.1958 EOS","memo":"buy ram"}
#   eosio.token <= eosio.token::transfer        {"from":"biezhihua","to":"eosio.ramfee","quantity":"0.0010 EOS","memo":"ram fee"}
#     biezhihua <= eosio.token::transfer        {"from":"biezhihua","to":"eosio.ramfee","quantity":"0.0010 EOS","memo":"ram fee"}
#  eosio.ramfee <= eosio.token::transfer        {"from":"biezhihua","to":"eosio.ramfee","quantity":"0.0010 EOS","memo":"ram fee"}
#         eosio <= eosio::delegatebw            {"from":"biezhihua","receiver":"huyuqiong521","stake_net_quantity":"100.0000 EOS","stake_cpu_quantit...
#   eosio.token <= eosio.token::transfer        {"from":"biezhihua","to":"eosio.stake","quantity":"200.0000 EOS","memo":"stake bandwidth"}
#     biezhihua <= eosio.token::transfer        {"from":"biezhihua","to":"eosio.stake","quantity":"200.0000 EOS","memo":"stake bandwidth"}
#   eosio.stake <= eosio.token::transfer        {"from":"biezhihua","to":"eosio.stake","quantity":"200.0000 EOS","memo":"stake bandwidth"}
warning: transaction executed locally, but may not be confirmed by the network yet    ] 

发送Token

命令格式:

./cleos.sh transfer <your account>  <receiver account> "1.0000 EOS" "test memo text"

实际运行:

cleos -u http://193.93.219.219:8888 transfer biezhihua huyuqiong521 "1 EOS" "胡玉琼是逗逼"

运行结果:

executed transaction: 10bb27c41eeac1c91ed7c247886a845a3849458ee07d751b99d4f7602b6c16fc  144 bytes  1103 us
#   eosio.token <= eosio.token::transfer        {"from":"biezhihua","to":"huyuqiong521","quantity":"1.0000 EOS","memo":"胡玉琼是逗逼"}
#     biezhihua <= eosio.token::transfer        {"from":"biezhihua","to":"huyuqiong521","quantity":"1.0000 EOS","memo":"胡玉琼是逗逼"}
#  huyuqiong521 <= eosio.token::transfer        {"from":"biezhihua","to":"huyuqiong521","quantity":"1.0000 EOS","memo":"胡玉琼是逗逼"}
warning: transaction executed locally, but may not be confirmed by the network yet    ] 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值