5.4.4.7 Retrieving Transaction Receipt API

After the smart contract executes one transaction, this interface can be used to retrieve the transaction receipt information according to the transaction HASH value.

1. Interface address:

https://PCNGatewayAddress/api/fiscobcos/v1/node/getTxReceiptByTxHash

2. Call Method: POST

3. Signature algorithm: required and refer to Section 5.4.4.1

4. Call parameters

No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature Value mac String Y
header
1 user unique ID userCode String Y
2 DApp unique ID appCode String Y
body
2 Transaction Hash txHash string Y

Example:

{"header":{"appCode":"cl0006202003181926573677572","userCode":"USER0006202003181951281835816"},"body":{"txHash":"0x755f3e7833778f674e1b025f513f05722ba7248be43a3c9168b880847814021a"},"mac":"MEYCIQCe6sI9zqspsy1bS6Ka9Q8O+pE7TEDWdsWj4UBSg6FM7AIhAJrud/EoxnURQcDc47iwTdh7OdxJEJPE+raK9UaHjNaJ"}

5. Response parameters

No. Field name Field Type Required Remarks
1 Header header Map Y
2 Body body Map Y
3 Signature Value mac String Y
header
1 Response ID code int Y 0: authentication successful -1: authentication failed
2 Response Message msg String N if code=0 then can be null
Body
1 Transaction Receipt Info txId string N If code is not 0, then leave blank
Block HASH blockHash
Block Number blockNumber
Gas Used gasUsed
From account from
To account to
Smart Contract Address contractAddress

Example:

{
    "header": {
        "code": 0,
        "msg": "Transaction successful"
    },
    "mac": "MEUCIQCUlhnvH9a4HN/YITf4OWgTuHmmz6qMEO89I4effHdcIwIgStdeb/dVplhn3/FoCjeScVRyiEUhpkbze9bVm1gaXqs=",
    "body": {
        "blockHash": "0x199eca276b60473dd65f8b36641684456694b419d89ef41b4953a9cdac848305",
        "gasUsed": 2154887,
        "blockNumber": 1,
        "txId": "0x8ee0c68e222742b5b70878265d3fdbd3a8e0d549da42a298a4ae872ca4fbfd89",
        "contractAddress": "0x20453db36c492fa49da9fab1b80db7fa5f46b01e",
        "from": "0x08ac3132a6c7e6ca5a7fbaf0521bb8b6f370ed35",
        "to": "0x0000000000000000000000000000000000000000"
    }
}
© 2019-2020 Red Date (Hong Kong) Technology Limited. all right reserved,powered by GitbookFile Modify: 2021-01-22 11:14:51

results matching ""

    No results matching ""

    results matching ""

      No results matching ""