You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Revert reason is not returned while it shows on Alchemy dashboard #102
I'm trying to get the revert reason of a transaction on my frontend.
When using Alchemy I get the error on the screenshot and notice there is no revert reason.
But on the Alchemy dashboard, I can see the revert reason speed invalid as expected.
@laygir I dug into this some more, and the error reason is being dropped in the web3.js library.
In utils._fireError, the error string is being created without error.reason which contains the speed invalid error we hit in the contract (link).
Unfortunately, there's not much we can do here since we wrap web3. Happy to update the web3 dependency if web3.js comes out with a fix for the error. I'll leave this issue open in the meantime.
Hey @thebrianchen
Thank you for taking the time for it, really appreciate it! 🙏
Do you know how Alchemy dashboard handles this and able to display user friendly message on the dashboard?
Meanwhile just to create awareness, I also have an issue open on ChainSafe side, perhaps your finding could help anybody out there who could make a PR on this.
Activity
thebrianchen commentedon Mar 15, 2022
@laygir I dug into this some more, and the error reason is being dropped in the web3.js library.
In utils._fireError, the error string is being created without
error.reasonwhich contains thespeed invaliderror we hit in the contract (link).Unfortunately, there's not much we can do here since we wrap web3. Happy to update the web3 dependency if web3.js comes out with a fix for the error. I'll leave this issue open in the meantime.
laygir commentedon Mar 15, 2022
Hey @thebrianchen
Thank you for taking the time for it, really appreciate it! 🙏
Do you know how Alchemy dashboard handles this and able to display user friendly message on the dashboard?
Meanwhile just to create awareness, I also have an issue open on ChainSafe side, perhaps your finding could help anybody out there who could make a PR on this.
web3/web3.js#4787