-
Notifications
You must be signed in to change notification settings - Fork 41
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
Decode transaction errors #346
Comments
/start |
Tip
|
This library needs ethers v6, so we need to upgrade ethers from v5 to v6. Shall we upgrade ethers to v6? |
I think retaining v5 is more maintainable because LLMs are trained on it but not v6. |
We've just recently downgraded from v6 to v5. Perhaps there're other libs. |
I see. |
One potentially hacky method but it would give better insight maybe is the 4byte API where we can search for fn signatures and log them to the console on tx fail. Obv there are collisions and sometimes the sig has not been uploaded but it's something we can setup internally and it's free to use. I personally copy paste into 4byte when I'm debugging errors so this would make my life easier at least lmao |
Do you still have the result from 4byte? Curious how it looks like |
Copy the selector from the start of the data and then paste it into the function signature search feature on 4byte and it'll show you. You'll need to write logic to deal with the API for my suggestion ofc I do this when I'm writing tests, debugging, etc that sort of thing. It's tedious manually as sometimes there are 10-15 calls you need to manually track not always in the same order etc. I don't have any stored results or anything, whatever I gather at the time I comment in the code then remove it after I've fixed it. |
I am not sure why we need to use function search feature from 4byte. I tried the I thought what we need is to decode the transaction error and not function signature. The transaction error can be decoded by simply using this library ethers-decode-error/. I think it is sufficient. Did I miss something? |
They both help when debugging in my opinion but both are not required. The spec says to use the lib and decode, so do that and ignore my suggestion. My suggestion to implement it that way and then to embed it into our official
No, both approaches were suggested but the spec only lists one. My comment was given a thumbs-up which is usually a sign of approval but only I've mentioned it beyond that. Implement the spec unless someone explicitly approves my suggestion. |
Passed the deadline and no activity is detected, removing assignees: @ariesgun. |
There's this package which is able to decode transaction errors which really helps in finding out the root cause of why permit or card minting is throwing an error.
As a part of this issue we should decode and show the decoded error to a user on:
Original comment
The text was updated successfully, but these errors were encountered: