-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Forc ABI generation doesn't fail for scripts #526
Comments
For posterity, libraries could have their ABI dumped with a flag, but by default settings to prevent user error the compiler should error if a non-contract tries to dump ABI. |
@adlerjohn can you think of any other instance where the |
Empty, or error? |
Maybe I'm misinterpreting, it is giving an empty |
Essentially, I'm asking if we actually need to check if it's a script, or if we can assume based on the empty output that it's a |
You have to check that it's a script or a predicate. It may be the case that a contract with no ABI produces an empty ABI file. That could happen if the contract is meant to be an upgradable implementation for example. |
Forc version: v0.1.6
Running
forc json-abi
for ascript
project gives the following output instead of an error:Only contracts have an ABI, so
forc json-abi
should fail with an explanative error otherwise.The text was updated successfully, but these errors were encountered: