New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOS eosio.system 和 eosio.token 合约部署 #12

Closed
kaidiren opened this Issue May 17, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@kaidiren
Owner

kaidiren commented May 17, 2018

  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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment