Is there a way to decode a transaction receipt which does not have an event log? In the case of an event log we have topics which we can decode, but what about the case when an event isn't triggered when a transaction takes place, how will such a receipt be decoded?

An example is:

AttributeDict({'blockHash': HexBytes('0x79c943cb77f647e0553a101d0c1df2d05645782b3a1ac8d3cabc593eb4fc3fa3'), 'blockNumber': 4605167, 'contractAddress': None, 'cumulativeGasUsed': 5980337, 'from': '0x52bc44d5378309EE2abF1539BF71dE1b7d7bE3b5', 'gasUsed': 21000, 'logs': [], 'logsBloom': HexBytes('0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'), 'status': 1, 'to': '0xDacEad08c11faCf6DFb53523fBf6A0f45864B97b', 'transactionHash': HexBytes('0xb1957a85976c18c5d1768dd5aad2c11cb079270e47f40262aefd6827a1106fc1'), 'transactionIndex': 69})

Since the address in from field is 0x52bc44d5378309EE2abF1539BF71dE1b7d7bE3b5 so I guess it will be counted as this addresses' transaction.

  • Please share the receipt, as well as the code of the relevant contract function. – goodvibration Jun 21 at 9:06
  • I have added an example. However, I don't know if a contract is being called or not. – mahamzaidi Jun 21 at 9:33
  • @mahamzaidi In provided receipt to is an external owned account (not an smart contract) so no event will be generated. – Ismael Jun 22 at 17:48
  • But I have read that it is isnt compulsory that a event is fired in a smart contract. It's up to the programmer. – mahamzaidi Jun 22 at 17:54
  • @mahamzaidi Yes, that is correct a contract may decide to not generate any event. In that case there's nothing to decode. If you are trying to study internal transactions the only option is to use something like traceTransaction. – Ismael Jun 22 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.