通过RPC推送交易后的返回数据,只为参考方便提取相关字段
const result = await api.transact({
actions: [{
account: "eosio.token",
name: 'transfer',
authorization: [
{
actor: "bcskillsell",
permission: 'active',
}],
data: {
from:"bcskillsell",
to:"bcskillbuy",
quantity: '12.00000000 EOS',
memo: 'bcskill.com'
},
}]
}, {
blocksBehind: 3,
expireSeconds: 30,
});
console.log('\n\nTransaction pushed!\n\n' + JSON.stringify(result, null, 2));
{
"transaction_id": "7c1f2e70f612bbeaaa1c6687b0da21dda85fb30de5d666f15baa092b70d55f2b",
"processed": {
"id": "7c1f2e70f612bbeaaa1c6687b0da21dda85fb30de5d666f15baa092b70d55f2b",
"block_num": 32815165,
"block_time": "2019-12-03T08:28:53.500",
"producer_block_id": null,
"receipt": {
"status": "executed",
"cpu_usage_us": 427,
"net_usage_words": 18
},
"elapsed": 427,
"net_usage": 144,
"scheduled": false,
"action_traces": [
{
"receipt": {
"receiver": "eosio.token",
"act_digest": "ce66f1905d2afbc792deaeca80a4e40576e25f3f8f3c204ac7d6ba4aef1fe437",
"global_sequence": 36674138,
"recv_sequence": 279646,
"auth_sequence": [
[
"bcskillsell",
205
]
],
"code_sequence": 1,
"abi_sequence": 1
},
"act": {
"account": "eosio.token",
"name": "transfer",
"authorization": [
{
"actor": "bcskillsell",
"permission": "active"
}
],
"data": {
"from": "bcskillsell",
"to": "bcskillbuy",
"quantity": "12.00000000 EOS",
"memo": "bcskill.com"
},
"hex_data": "00008851e1ae125e0000005e9fae125e008c8647000000000846534300000000137b227472616e736665725f74797065223a337d"
},
"context_free": false,
"elapsed": 166,
"console": "",
"trx_id": "7c1f2e70f612bbeaaa1c6687b0da21dda85fb30de5d666f15baa092b70d55f2b",
"block_num": 32815165,
"block_time": "2019-12-03T08:28:53.500",
"producer_block_id": null,
"account_ram_deltas": [],
"except": null,
"inline_traces": [
{
"receipt": {
"receiver": "bcskillsell",
"act_digest": "ce66f1905d2afbc792deaeca80a4e40576e25f3f8f3c204ac7d6ba4aef1fe437",
"global_sequence": 36674139,
"recv_sequence": 122,
"auth_sequence": [
[
"bcskillsell",
206
]
],
"code_sequence": 1,
"abi_sequence": 1
},
"act": {
"account": "eosio.token",
"name": "transfer",
"authorization": [
{
"actor": "bcskillsell",
"permission": "active"
}
],
"data": {
"from": "bcskillsell",
"to": "bcskillbuy",
"quantity": "12.00000000 EOS",
"memo": "bcskill.com"
},
"hex_data": "00008851e1ae125e0000005e9fae125e008c8647000000000846534300000000137b227472616e736665725f74797065223a337d"
},
"context_free": false,
"elapsed": 5,
"console": "",
"trx_id": "7c1f2e70f612bbeaaa1c6687b0da21dda85fb30de5d666f15baa092b70d55f2b",
"block_num": 32815165,
"block_time": "2019-12-03T08:28:53.500",
"producer_block_id": null,
"account_ram_deltas": [],
"except": null,
"inline_traces": []
},
{
"receipt": {
"receiver": "bcskillbuy",
"act_digest": "ce66f1905d2afbc792deaeca80a4e40576e25f3f8f3c204ac7d6ba4aef1fe437",
"global_sequence": 36674140,
"recv_sequence": 906,
"auth_sequence": [
[
"bcskillsell",
207
]
],
"code_sequence": 1,
"abi_sequence": 1
},
"act": {
"account": "eosio.token",
"name": "transfer",
"authorization": [
{
"actor": "bcskillsell",
"permission": "active"
}
],
"data": {
"from": "bcskillsell",
"to": "bcskillbuy",
"quantity": "12.00000000 EOS",
"memo": "bcskill.com"
},
"hex_data": "00008851e1ae125e0000005e9fae125e008c8647000000000846534300000000137b227472616e736665725f74797065223a337d"
},
"context_free": false,
"elapsed": 6,
"console": "",
"trx_id": "7c1f2e70f612bbeaaa1c6687b0da21dda85fb30de5d666f15baa092b70d55f2b",
"block_num": 32815165,
"block_time": "2019-12-03T08:28:53.500",
"producer_block_id": null,
"account_ram_deltas": [],
"except": null,
"inline_traces": []
}
]
}
],
"except": null
}
}
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »