【EOS智能合约】-测试网络(三)

#查看测速网络账户信息
./cleos -u "https://api-kylin.eoslaomao.com" get account terryaccount
#terryaccount如下:
permissions: 
     owner     1:    1 EOS5wq7yM9TwpJNnbc3hiWnV6wAEw7LJ9xHDs4o6Xydg5T2oU3Wuz
     active     1:    1 EOS8AkRW6PnvNLUQNmA5j588cSbg9CWetyn9JedBV2WTQPC1zigyf
memory: 
     quota:     3.812 MiB    used:     188.9 KiB  

net bandwidth: 
     delegated:       1.0000 EOS           (total staked delegated to account from others)
     used:             8.146 KiB  
     available:        738.6 KiB  
     limit:            746.8 KiB  

cpu bandwidth:
     delegated:       1.0000 EOS           (total staked delegated to account from others)
     used:             5.623 ms   
     available:        106.6 ms   
     limit:            112.2 ms   

EOS balances: 
     liquid:         1600.0000 EOS
     staked:            0.0000 EOS
     unstaking:         0.0000 EOS
     total:          1600.0000 EOS

#导入两对私钥到钱包
./cleos wallet import --private-key 5Khp4LAcKbZ4ECEkiAycEnB5Hb8zSE5UkH6BeKo8JyP5wHymtgr  -n terrywallet
./cleos wallet import --private-key 5JtMGYCVjRNvBpJFZAB6pNXtBe3gkuYxFpgHFf5ePHxiriAbNhF  -n terrywallet

#部署合约
./cleos -u "https://api-kylin.eoslaomao.com"  set contract terryaccount ~/eos/build/contracts/eosio.token/ -p terryaccount

#当RAM余额不足时会提示:
Reading WASM from /home/terry/eos/build/contracts/eosio.token/eosio.token.wasm...
Publishing contract...
Error 3080001: Account using more than allotted RAM usage
Error Details:
account terrybyeos11 has insufficient ram; needs 193082 bytes has 9546 bytes
#成本:按照当前的ram价格,大约需要4.82个EOS,1EOS=40080.16bytes


#EOS转账
./cleos  --print-request --print-response  -u "https://api-kylin.eoslaomao.com"  transfer terryaccount terrybyeos11 "1.0000 EOS" "命令行里远程连接测试环境:from terryaccount to terrybyeos11 for 1EOS,在交易上记录这句话。"


#创建代币WTY
./cleos -u "https://api-kylin.eoslaomao.com"  push action terryaccount create '["terryaccount", "100000000.0000 WTY", 0, 0, 0]' -p terryaccount@owner
####成本:消耗0.257kb,0.0065EOS

#成功提示
executed transaction: d24fc6511655023ff962f4cdb3c910cdad7a8cdce235187b1ece1e6e7ee04073  120 bytes  1102 us
#  terryaccount <= terryaccount::create         {"issuer":"terryaccount","maximum_supply":"100000000.0000 WTY"}
warning: transaction executed locally, but may not be confirmed by the network yet    ] 

#发行代币到发行账户
./cleos -u  https://api-kylin.eoslaomao.com push action terryaccount issue '["terryaccount", "100000000.0000 WTY", "contract to terryaccount 1个亿WTY"]' -p terryaccount@owner

#成功提示
executed transaction: 30d4df615dc8bff963673067144966f7d7a478f45526c89864dd58b73b19511b  152 bytes  1338 us
#  terryaccount <= terryaccount::issue          {"to":"terryaccount","quantity":"100000000.0000 WTY","memo":"contract to terryaccount 1个亿WTY"}
warning: transaction executed locally, but may not be confirmed by the network yet    ] 

#转账
./cleos -u  https://api-kylin.eoslaomao.com  push action terryaccount transfer '["terryaccount","terrybyeos11","1000.0000 WTY","terryaccount to terrybyeos11 1000 WTY"]' -p terryaccount@owner

#成功提示
executed transaction: 16ec08cd7059f80526578ec0f8a34e37cc7baa171c93397df4add684844d37d6  168 bytes  1626 us
#  terryaccount <= terryaccount::transfer       {"from":"terryaccount","to":"terrybyeos11","quantity":"1000.0000 WTY","memo":"terryaccount to terryb...
#  terrybyeos11 <= terryaccount::transfer       {"from":"terryaccount","to":"terrybyeos11","quantity":"1000.0000 WTY","memo":"terryaccount to terryb...
warning: transaction executed locally, but may not be confirmed by the network yet    ] 

#查余额
./cleos  -u  https://api-kylin.eoslaomao.com  get currency balance terryaccount terryaccount WTY

你可能感兴趣的:(【EOS智能合约】-测试网络(三))