-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Support of custom-errors on ABI #3656
Comments
there are probably ways to traverse the ast to get all possible errors, however that still would not become a part of the ABI. if anything, that would be an auxiliary output. closing this issue as won't do |
@rkrasiuk I think I agree with you about "auxiliary output". It doesn't have to be the ABI itself, but an "ABI-like" file that describes all of the errors accessible by calling a contract. I think events are easier to deal with because a user has to actively "subscribe" to an event - pick something of interest and filter for it in the log, ignoring things they don't care about. With errors, there's no "subscribing" - you just get an error and you are forced to parse it, even if you have no clue where it came from. Would you be open to an auxiliary output for that? Something like |
@KholdStare agreed that it's a candidate for forge inspect. reopened this issue, but we'll prob keep it as a low prio. always appreciate contributions if anyone wants to pick it up! |
i think i'm running into this when trying to deploy contracts via a script in my case the "contract A" is the this means that any constructor errors are not decoded, which makes deploying via script much less ergonomic than it should be |
#5228 should help here. |
Component
Forge
Describe the feature you would like
I would like to have in the ABI of my contracts all the possible errors that are thrown through reverts on the called contracts.
For example:
I would like that the ABI of contract
A
knows aboutcustomErrorB()
.I think this is the responsibility of the Solidity compiler rather than Foundry, even though, in the meantime, is there something implemented on Foundry to enable this support on the ABIs?
Additional context
No response
The text was updated successfully, but these errors were encountered: