-
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
CLI subcommands for reading any program account in a workspace #1
Labels
Comments
It would be nice if this used the on-chain IDL, if none is given. |
Open
could also have an |
Surprised that issue number 1 is still up for grabs! |
vadorovsky
added a commit
to vadorovsky/anchor
that referenced
this issue
May 12, 2023
The IDL parser used to look specifically for attribute macros (e.g. for accounts). But that way doesn't allow expanding macros before generating IDL, which prevents writing macros which extend accounts with additional fields. For that reason, this change always expands macros before generating IDL and changes the way the code is parsed: * Instead for parsing attribute macros (`#[account]`, `#[derive(Accounts)]`), it parses expanded `impl` blocks (e.g. `impl anchor_lang::Accounts`). * Explicitly omits expanded code which is not supposed to be included as a part of IDL definitions (e.g. modules starting with `__`).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We should add an
anchor account <program>.<account> <address>
command that allows one to fetch any account in the workspace via CLI (by reading all IDLs).The text was updated successfully, but these errors were encountered: