-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Possible incorrect parsing of receipt status #2183
Comments
Thanks for submitting this issue. That's true will change it as soon as possible. |
@alcuadrado @cgewecke this issue was patched in 1ac78d1 @ #2429 on the
Issue #3070 says "change causes many 1.x test failures" but it looks like applying this patch on top of
Of course some tests should be added to cover the case of a receipt being returned as |
@gabmontes Ok excellent. |
The Byzantinum fork, IIRC, enabled adding the
status
to the transaction receipts. But for chains that did not activate it, thestatus
is stillnull
instead of0x0
or0x1
. Following is the code that parses it to boolean:https://github.com/ethereum/web3.js/blob/1bbfc5a36f4422a79bb0abfdd4b30aba6b3dc340/packages/web3-core-helpers/src/formatters.js#L219-L221
When testing with some transactions in a chain that did not fork, we saw the
status
field was incorrectly parsed asfalse
for receipts withstatus
coming asnull
, which might not be correct asstatus
is actually not provided. This is not enough to say the transaction failed or not.The condition might be changed to something like the following to properly account for
null
,0x0
and0x1
values:@frozeman & team, can you please provide your thoughts?
The text was updated successfully, but these errors were encountered: