新手问答 调用 eosjs2 transfer API,返回数据成功,但测试链上查询不到

xJi · 2018年09月12日 · 最后由 strahe 回复于 2018年09月12日 · 3824 次阅读
const result = await api.transact({
            actions: [{
                account: 'eosio.token',
                name: 'transfer',
                authorization: [{
                    actor:  config.producer,
                    permission: 'active',
                }],
                data: {
                    from:  config.producer,
                    to: 'haoqi1111111',
                    quantity: '5.0000 EOS',
                    memo: '',
                },
            }]
        }, {
            broadcast:true,
            blocksBehind: 3,
            expireSeconds: 30,
        });

返回:

{
  "transaction_id": "c073fa4e02c9b98927ecd462ee9854d19b28c687d912b6859bc9b3bdd1d18c37",
  "processed": {
    "id": "c073fa4e02c9b98927ecd462ee9854d19b28c687d912b6859bc9b3bdd1d18c37",
    "receipt": {
      "status": "executed",
      "cpu_usage_us": 911,
      "net_usage_words": 16
    },
    "elapsed": 911,
    "net_usage": 128,
    "scheduled": false,
    "action_traces": [
      {
        "receipt": {
          "receiver": "eosio.token",
          "act_digest": "f483fdccb6d371f99aa944ce4b760df078c0868239efef8b2f48c1fb7d6c3144",
          "global_sequence": 27444097,
          "recv_sequence": 1161147,
          "auth_sequence": [
            [
              "wwhjiaparts2",
              38
            ]
          ],
          "code_sequence": 2,
          "abi_sequence": 2
        },
        "act": {
          "account": "eosio.token",
          "name": "transfer",
          "authorization": [
            {
              "actor": "wwhjiaparts2",
              "permission": "active"
            }
          ],
          "data": {
            "from": "wwhjiaparts2",
            "to": "haoqi1111111",
            "quantity": "5.0000 EOS",
            "memo": ""
          },
          "hex_data": "2070bea61af71ae7104208210467a96950c300000000000004454f530000000000"
        },
        "elapsed": 641,
        "cpu_usage": 0,
        "console": "",
        "total_cpu_usage": 0,
        "trx_id": "c073fa4e02c9b98927ecd462ee9854d19b28c687d912b6859bc9b3bdd1d18c37",
        "inline_traces": [
          {
            "receipt": {
              "receiver": "wwhjiaparts2",
              "act_digest": "f483fdccb6d371f99aa944ce4b760df078c0868239efef8b2f48c1fb7d6c3144",
              "global_sequence": 27444098,
              "recv_sequence": 21,
              "auth_sequence": [
                [
                  "wwhjiaparts2",
                  39
                ]
              ],
              "code_sequence": 2,
              "abi_sequence": 2
            },
            "act": {
              "account": "eosio.token",
              "name": "transfer",
              "authorization": [
                {
                  "actor": "wwhjiaparts2",
                  "permission": "active"
                }
              ],
              "data": {
                "from": "wwhjiaparts2",
                "to": "haoqi1111111",
                "quantity": "5.0000 EOS",
                "memo": ""
              },
              "hex_data": "2070bea61af71ae7104208210467a96950c300000000000004454f530000000000"
            },
            "elapsed": 7,
            "cpu_usage": 0,
            "console": "",
            "total_cpu_usage": 0,
            "trx_id": "c073fa4e02c9b98927ecd462ee9854d19b28c687d912b6859bc9b3bdd1d18c37",
            "inline_traces": []
          },
          {
            "receipt": {
              "receiver": "haoqi1111111",
              "act_digest": "f483fdccb6d371f99aa944ce4b760df078c0868239efef8b2f48c1fb7d6c3144",
              "global_sequence": 27444099,
              "recv_sequence": 1,
              "auth_sequence": [
                [
                  "wwhjiaparts2",
                  40
                ]
              ],
              "code_sequence": 2,
              "abi_sequence": 2
            },
            "act": {
              "account": "eosio.token",
              "name": "transfer",
              "authorization": [
                {
                  "actor": "wwhjiaparts2",
                  "permission": "active"
                }
              ],
              "data": {
                "from": "wwhjiaparts2",
                "to": "haoqi1111111",
                "quantity": "5.0000 EOS",
                "memo": ""
              },
              "hex_data": "2070bea61af71ae7104208210467a96950c300000000000004454f530000000000"
            },
            "elapsed": 13,
            "cpu_usage": 0,
            "console": "",
            "total_cpu_usage": 0,
            "trx_id": "c073fa4e02c9b98927ecd462ee9854d19b28c687d912b6859bc9b3bdd1d18c37",
            "inline_traces": []
          }
        ]
      }
    ],
    "except": null
  }
}

共收到 3 条回复

创建账号也是,transact返回了newaccount的交易数据,调用get_account查询账号的时候返回Caught exception: Error: unknown key

测试链CryptoKylin Testnet

可能交易被回滚了,

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册