eos 智能合约 , 代币发行。

1.eos智能合约代币发行。使用官方智能合约下面的代码。

2.创建钱包, 创建用户test1, test2, 导入key, 否则会报错。

3.部署智能合约

./cleos set contract test1 /eos/build/contracts/eosio.token/ -p test1

4.创建代币

./cleos push action test1 create '["test1", "1000000.0000 TST"]' -p test1@active

5.发给代币到账户下面。

./cleos push action test1 issue '[ "test2", "100.0000 SYS", "memo" ]' -p test1@active
executed transaction: af53e6501be86e22fa96c30f9269340aecd5f6ce8c554a8b1b3ab0a4bb56e94e  128 bytes  1246 us
#         test1 <= test1::issue                 {"to":"test2","quantity":"100.0000 TST","memo":"memo"}
#         test1 <= test1::transfer              {"from":"test1","to":"test2","quantity":"100.0000 TST","memo":"memo"}
#         test2 <= test1::transfer              {"from":"test1","to":"test2","quantity":"100.0000 TST","memo":"memo"

6.查询账户信息,显示数值可能不一样

./cleos get table test1  test1 accounts
{
  "rows": [{
      "balance": "10.0000 TST"
    }
  ],
  "more": false
}

 

你可能感兴趣的:(c++)