16

What does it mean line by line?

   Result: {
    "blockHash": "0xe6b110c9167d9aabeb13b02a7b9358d879426474a79170403d67da33a391dbdc",
      "blockNumber": 665,
      "contractAddress": null,
      "cumulativeGasUsed": 68527,
      "from": "0x0fd8cd36bebcee2bcb35e24c925af5cf7ea9475d",
      "gasUsed": 68527,
      "logs": [
        {
          "address": "0x91067b439e1be22196a5f64ee61e803670ba5be9",
          "blockHash": "0xe6b110c9167d9aabeb13b02a7b9358d879426474a79170403d67da33a391dbdc",
          "blockNumber": 665,
          "data": "0x00000000000000000000000000000000000000000000000000000000576eca940000000000000000000000000fd8cd36bebcee2bcb35e24c925af5cf7ea9475d0100000000000000000000000000000000000000000000000000000000000000",
          "logIndex": 0,
          "topics": [
            "0x72d0d212148041614162a44c61fef731170dd7cccc35d1974690989386be0999"
          ],
          "transactionHash": "0xad62c939b2e865f13c61eebcb221d2c9737955e506b69fb624210d3fd4e0035b",
          "transactionIndex": 0
        }
      ],
      "root": "7583254379574ee8eb2943c3ee41582a0041156215e2c7d82e363098c89fe21b",
      "to": "0x91067b439e1be22196a5f64ee61e803670ba5be9",
      "transactionHash": "0xad62c939b2e865f13c61eebcb221d2c9737955e506b69fb624210d3fd4e0035b",
      "transactionIndex": 0
    }
    Transaction cost: 68527 gas. 

1 Answer 1

15

https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt

Returns

Object - A transaction receipt object, or null when no receipt was found:

blockHash: String, 32 Bytes - hash of the block where this transaction was in.
blockNumber: Number - block number where this transaction was in.
transactionHash: String, 32 Bytes - hash of the transaction.
transactionIndex: Number - integer of the transactions index position in the block.
from: String, 20 Bytes - address of the sender.
to: String, 20 Bytes - address of the receiver. null when its a contract creation transaction.
cumulativeGasUsed: Number - The total amount of gas used when this transaction was executed in the block.
gasUsed: Number - The amount of gas used by this specific transaction alone.
contractAddress: String - 20 Bytes - The contract address created, if the transaction was a contract creation, otherwise null.
logs: Array - Array of log objects, which this transaction generated.
status : String - '0x0' indicates transaction failure , '0x1' indicates transaction succeeded.

Here are some other details for properties that aren't as clear:

cumulativeGasUsed see What is and how to calculate 'cumulative gas used'?

For using logs, see How do I parse the transaction receipt log with web3.js?

The wiki doesn't mention anything about root, but root is the hash of the root of the intermediate state trie after this specific transaction has been applied, see What is the 'root' of a transaction receipt?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.