1. eos 版本 dawn-v4.0.0
  2. 前置条件 bios 已经设置好了,相关的 bp 也已经设置完毕
#  创建 token 对应的账号
./programs/cleos/cleos --wallet-url http://localhost:8899 --url http://127.0.0.1:8788 create account eosio eosio.token EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
# 部署 system 合约
./programs/cleos/cleos --wallet-url http://localhost:8899 --url http://127.0.0.1:8788 set contract eosio.token contracts/eosio.system -p eosio.token@active
# 部署token 合约
./programs/cleos/cleos --wallet-url http://localhost:8899 --url http://127.0.0.1:8788 set contract eosio.token contracts/eosio.token -p eosio.token@active
# 创建 eos token
./programs/cleos/cleos --wallet-url http://localhost:8899 --url http://127.0.0.1:8788 push action eosio.token create '{"issuer":"eosio.token", "maximum_supply":"1000000000.0000 EOS","can_freeze":0, "can_recall":0, "can_whitelist":0}' -p eosio.token@active
# 发放 eos token
./programs/cleos/cleos --wallet-url http://localhost:8899 --url http://127.0.0.1:8788 push action eosio.token issue '{"to":"eosio.token","quantity":"1000000000.0000 EOS","memo":"init"}' -p eosio.token@active

# 查询余额
./programs/cleos/cleos --wallet-url http://localhost:8899 --url http://127.0.0.1:8788 get currency balance eosio.token eosio.token EOS
# 转账
./programs/cleos/cleos --wallet-url http://localhost:8899 --url http://127.0.0.1:8788 push action eosio.token transfer '[ "eosio.token", "inita", "1.0000 EOS", "m" ]' -p eosio.token
# 查询余额
./programs/cleos/cleos --wallet-url http://localhost:8899 --url http://127.0.0.1:8788 get currency balance eosio.token inita EOS
# 查询余额
./programs/cleos/cleos --wallet-url http://localhost:8899 --url http://127.0.0.1:8788 get currency balance eosio.token eosio.token EOS

评论地址