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
}