-
Notifications
You must be signed in to change notification settings - Fork 1.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
Feature Request: Make accounts
tell me what accounts I need to pass
#3111
Comments
I'm not sure if there is a way to change this error message to show which accounts are missing when the error message is generated by the TypeScript compiler. The easiest way to see which accounts are potentially needed is to simply use |
What ends up happening if you pass the incorrect accounts is the error What could be done to make the error more helpful at least would be to log the account(s) it had trouble resolving. I found that my pda resolution was looping on https://github.com/coral-xyz/anchor/blob/master/ts/packages/anchor/src/program/accounts-resolver.ts#L291-L293 until it hit 16 because I didn't provide the right list of accounts required. It'd be nice to catch the |
By "incorrect accounts" do you mean missing accounts?
Yeah, we should be able to do this. |
|
I commonly am using
accounts
and getting a very ugly error:It is fantastic that it points out I am missing an account, however I spend a decent amount of time trying to figure out what that account is. If the error could tell me exact what is not being auto-resolved, I can move a lot faster as a developer.
The text was updated successfully, but these errors were encountered: