-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Refine view of popup for reverted tx #4626
Conversation
23cc0d1
to
f1b4399
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest displaying the value of error
property in the message and text after Error:
and before {
in the title of the popup.
In case of this response:
Error: Transaction has been reverted by the EVM:
{
"transactionHash": "0x9a692646d37e4ae600110ee417350e0a5f9ceda27baa8cd57985f15f52f3025c",
"transactionIndex": 0,
"blockHash": "0x20d379795ecd7aa58df04699ba9b9047fda96cdfd2aacffd08f1e948abef48dc",
"blockNumber": 22684317,
"cumulativeGasUsed": 21925,
"gasUsed": 21925,
"effectiveGasPrice": "0x4a817c800",
"from": "0xf36045454f66c7318adcddf3b801e3bf8cfbc6a1",
"to": "0x0def93bcd70dab8932447275c5f2b8fcba0c005e",
"contractAddress": null,
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"status": false,
"error": "Reverted 0x50289a9f0000000000000000000000000def93bcd70dab8932447275c5f2b8fcba0c005e0000000000000000000000000000000000000000000000000000000000000002",
"type": "0x0",
"events": {}
}
- title would be
Transaction has been reverted by the EVM
- message would be
Reverted 0x50289a9f0000000000000000000000000def93bcd70dab8932447275c5f2b8fcba0c005e0000000000000000000000000000000000000000000000000000000000000002
.
Ideally, we should decode the error. But probably, it is better to implement in a separate PR.
6a5857a
to
bf031f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
23033c6
to
049b55a
Compare
049b55a
to
6b07db8
Compare
Close #4506
Changelog
Enhancements
Checklist for your Pull Request (PR)
CHANGELOG.md
with this PRmaster
in the Version column. Changes will be reflected in this table: https://docs.blockscout.com/for-developers/information-and-settings/env-variables.