0

In short: I'd love to understand how to detect if a transaction failed before the Byzantium fork.

Explanation: After the Byzantium fork it's easy to understand if a transaction failed or not, I just need to check the property 'status' which is 1 if successful or 0 if not.

But before Byzantium it looks quite complicated (or not possible at all with 100% certainty?). I saw explanations suggesting to check the 'root' property in the transaction receipt or compare the gas in the transaction receipt and the transaction but I do not think it's reliable.

Any idea on how to do it?

1
  • The only feasible way to detect an error was to trace the transaction execution. You could save resources by checking only those transactions where gasUsed == gasLimit because at that time an error would consume all the remaining gas. You still had some successful transactions that consumed the whole available gas, for those you could only use the trace to detect errors.
    – Ismael
    May 19, 2023 at 1:30

1 Answer 1

0

You should check out Tenderly. It enables you to fork a specific chain and simulate transactions at a specific block. They have a free trial, which should be more than enough for your needs.

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