5.4.4.8 Retrieving Transaction information API

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

1. Interface address:

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

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
1 Transaction HASH txHash string Y

Example:

{"header":{"appCode":"cl0006202003181926573677572","userCode":"USER0006202003181951281835816"},"body":{"txHash":"0x755f3e7833778f674e1b025f513f05722ba7248be43a3c9168b880847814021a"},"mac":"MEUCIQDDQudQBvHkI5tIpeTDGkQA+LPRMTA2k9u7hCZAYVobvQIgNseUfaVw8d/LxooPPWyQSo2O4EUt6wmEISgtnTcUO7k="}

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
Transaction HASH txId String
Block HASH blockHash String
Block Number blockNumber Int
Gas Used gasUserd Int
From account from String
To account to String
value Int
input String

Example:

{
    "header": {
        "code": 0,
        "msg": "Transaction Successful"
    },
    "mac": "MEQCIBMqntmqQqZXkBbrLhmXEcuOqTG4YWvlfGJmebzEDbzcAiAKKHut9MBShqpSAEo8ts2MEQCIBMqntmqQqZXkBbrLhmXEcuOqTG4YWvlfGJmebzEDbzcAiAKKHut9MBShqpSAEo8ts2+OBIRmEEbedjihix5FZZvrw==",
    "body": {
        "blockHash": "0x199eca276b60473dd65f8b36641684456694b419d89ef41b4953a9cdac848305",
        "input": "0x60806040523480156200001157600080fd5b506110016000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c92a78016040805190810160405280600681526020017f745f6261736500000000000000000000000000000000000000000000000000008152506040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016200010191906200024a565b602060405180830381600087803b1580156200011c57600080fd5b505af115801562000131573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525062000157919081019062000174565b50620002f4565b60006200016c8251620002a3565b905092915050565b6000602082840312156200018757600080fd5b600062000197848285016200015e565b91505092915050565b6000620001ad8262000298565b808452620001c3816020860160208601620002ad565b620001ce81620002e3565b602085010191505092915050565b6000601382527f626173655f6b65792c626173655f76616c7565000000000000000000000000006020830152604082019050919050565b6000600782527f626173655f6964000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006060820190508181036000830152620002668184620001a0565b9050818103",
        "gasUsed": 100000000,
        "blockNumber": 1,
        "txId": "0x8ee0c68e222742b5b70878265d3fdbd3a8e0d549da42a298a4ae872ca4fbfd89",
        "from": "0x08ac3132a6c7e6ca5a7fbaf0521bb8b6f370ed35",
        "to": "0x0000000000000000000000000000000000000000",
        "value": 0
    }
}
© 2019-2021 Red Date (Hong Kong) Technology Limited. all right reserved,powered by GitbookFile Modify: 2021-06-02 09:20:35

results matching ""

    No results matching ""

    results matching ""

      No results matching ""