Parsing eth.getTransactionReceipt

dave123124dave123124 Member Posts: 11
How can I parse out the log information from the web3.eth.getTransactionReceipt() function.

For example:

var receipt = web3.eth.getTransactionReceipt('0x4e1e08f4dbb5df80b3de71e18f7a04db226cb9afbe58de6bc623dd876118705a');
{
"transactionHash":"0x4e1e08f4dbb5df80b3de71e18f7a04db226cb9afbe58de6bc623dd876118705a",
"transactionIndex":5,
"blockNumber":1573847,
"blockHash":"0x634c388f10b17da3973444ab8525fb317b025360b89a2abe6c105969baad88a9",
"cumulativeGasUsed":218099,
"gasUsed":53139,
"contractAddress":null,
"logs":[
{
"address":"0xbb9bc244d798123fde783fcc1c72d3bb8c189413",
"topics":[
"0xdbccb92686efceafb9bb7e0394df7f58f71b954061b81afb57109bf247d3d75a",
"0x00000000000000000000000012139fecc2d7deeb6150a72e50e0b8dee2b85b98"
],
"data":"0x00000000000000000000000000000000000000000000000001cd8e68c0e4f69e",
"blockNumber":1573847,
"logIndex":1,
"blockHash":"0x634c388f10b17da3973444ab8525fb317b025360b89a2abe6c105969baad88a9",
"transactionHash":"0x4e1e08f4dbb5df80b3de71e18f7a04db226cb9afbe58de6bc623dd876118705a",
"transactionIndex":5
}
]
}
How do I parse the logs into meaningful information?
Sign In or Register to comment.