This repository was archived by the owner on Mar 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Possible invalid gas check #2381
Labels
Bug
Addressing a bug
Comments
gabmontes
added a commit
to autonomoussoftware/metronome-wallet-core
that referenced
this issue
Feb 15, 2019
Thanks for submitting this issue. Will fix it next week after my vacation 👌🏻 |
12 tasks
nivida
referenced
this issue
Feb 19, 2019
Validation of the gas usage fixed in TransactionReceiptValidator
This was referenced Mar 31, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Up to version beta.37, there was an issue with checking the receipt for transaction execution status:
https://github.com/ethereum/web3.js/blob/1d9f6c0889c7f551b4ec1041cece0d50bc3ff2c8/packages/web3-core-method/src/index.js#L351
While
gasProvided
is a hex string,receipt.gasUsed
is a number, making the condition always fail -and therefore failing to do any check-. Proper comparison would be:It looks like after the refactor in version beta.38 and up, the condition is the same:
https://github.com/ethereum/web3.js/blob/599851753b4a35b5c11f902c7c592b111e190073/packages/web3-core-method/src/validators/TransactionReceiptValidator.js#L80
I was unable to check the latests versions yet as will remain in beta.37 for now but it is possible that the error persist.
The text was updated successfully, but these errors were encountered: