這篇“EOS推送操作怎么實現(xiàn)”文章的知識點大部分人都不太理解,所以小編給大家總結(jié)了以下內(nèi)容,內(nèi)容詳細,步驟清晰,具有一定的借鑒價值,希望大家閱讀完這篇文章能有所收獲,下面我們一起來看看這篇“EOS推送操作怎么實現(xiàn)”文章吧。

成都創(chuàng)新互聯(lián)專注于尼木網(wǎng)站建設服務及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供尼木營銷型網(wǎng)站建設,尼木網(wǎng)站制作、尼木網(wǎng)頁設計、尼木網(wǎng)站官網(wǎng)定制、重慶小程序開發(fā)服務,打造尼木網(wǎng)絡公司原創(chuàng)品牌,更為您提供尼木網(wǎng)站排名全網(wǎng)營銷落地服務。
根據(jù)合約ABI,消息應該是合約。
例如,貨幣合約的ABI被構(gòu)造如下。
$ cleos get code -a currency.abi currency
code hash: 9b9db1a7940503a88535517049e64467a6e8f4e9e03af15e9968ec89dd794975
saving abi to currency.abi
$ cat currency.abi
{
"types": [{
"newTypeName": "AccountName",
"type": "Name"
}
],
"structs": [{
"name": "transfer",
"base": "",
"fields": {
"from": "AccountName",
"to": "AccountName",
"amount": "UInt64"
}
},{
"name": "account",
"base": "",
"fields": {
"account": "Name",
"balance": "UInt64"
}
}
],
"actions": [{
"action": "transfer",
"type": "transfer"
}
],
"tables": [{
"table": "account",
"indextype": "i64",
"keynames": [
"account"
],
"keytype": [],
"type": "account"
}
]
}從上面的abi中,我們可以看到貨幣合約接受一個叫做transfer的操作,它接受帶有from,to和amount字段的消息。
$ ./cleos push message currency transfer '{"from":"currency","to":"tester","amount":50}' -S currency -S tester -p currency@active
1589302ms thread-0 main.cpp:271 operator() ] Converting argument to binary...
1589304ms thread-0 main.cpp:290 operator() ] Transaction result:
{
"transaction_id": "1c4911c0b277566dce4217edbbca0f688f7bdef761ed445ff31b31f286720057",
"processed": {
"refBlockNum": 1173,
"refBlockPrefix": 2184027244,
"expiration": "2017-08-24T18:28:07",
"scope": [
"currency",
"tester"
],
"signatures": [],
"messages": [{
"code": "currency",
"type": "transfer",
"authorization": [{
"account": "currency",
"permission": "active"
}
],
"data": {
"from": "currency",
"to": "tester",
"quantity": 50
},
"hex_data": "00000079b822651d00000000c84267a13200000000000000"
}
],
"output": [{
"notify": [{
"name": "tester",
"output": {
"notify": [],
"sync_transactions": [],
"async_transactions": []
}
}
],
"sync_transactions": [],
"async_transactions": []
}
]
}
}以上就是關于“EOS推送操作怎么實現(xiàn)”這篇文章的內(nèi)容,相信大家都有了一定的了解,希望小編分享的內(nèi)容對大家有幫助,若想了解更多相關的知識內(nèi)容,請關注創(chuàng)新互聯(lián)行業(yè)資訊頻道。
網(wǎng)站題目:EOS推送操作怎么實現(xiàn)
網(wǎng)頁網(wǎng)址:http://chinadenli.net/article44/jpsche.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站制作、網(wǎng)站制作、網(wǎng)站設計、微信小程序、全網(wǎng)營銷推廣、網(wǎng)站內(nèi)鏈
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)