-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reasoning of optional fields in TransactionReceipt #497
Comments
Yes, this has been an issue in the case of Ganache, which is generally not very standards compliant, and depending on the version would return and fail to return certain fields. I do not recall the specifics of this (as the fields were made option quite some time ago), but it was for a reason. Something was failing if we forced those things to be present. It may have been orphaned transactions. I'll scratch my head a bit and try to remember more of the details. :) |
Ah, that's good to know. If this ist just about a development blockchain I might consider to |
I've made this change in v5, if you'd like to check it out: The |
I think this is now taken care of (in v5)? I'm going to close this now, but please feel free to re-open if there are any issues. Thanks! :) |
ethers.js/packages/providers/src.ts/formatter.ts Lines 111 to 129 in 608864f
Is the ethers.js/packages/providers/src.ts/formatter.ts Lines 418 to 420 in 608864f
btw why the |
Hi,
the TransactionReceipt interface is currently defined as
AFAIK, we can only receive a receipt when the transaction in question has been mined. With this axiom, I'd expect to always have a value on most of the receipts fields (all?).
Are there any edge cases where some of those fields are missing in a receipt? Has this to do with different node implementations? Or will a node produce an incomplete receipt if a previously mined transaction has been removed due to a chain reorganization?
I'd be glad if anyone could shed some light on this.
Thank you!
Patrick
The text was updated successfully, but these errors were encountered: