Skip to content
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

Closed
armaniferrante opened this issue Jan 5, 2021 · 3 comments · Fixed by #1923
Closed

CLI subcommands for reading any program account in a workspace #1

armaniferrante opened this issue Jan 5, 2021 · 3 comments · Fixed by #1923
Labels

Comments

@armaniferrante
Copy link
Member

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).

@armaniferrante
Copy link
Member Author

It would be nice if this used the on-chain IDL, if none is given.

@paul-schaaf
Copy link
Contributor

could also have an --idl option to specify the filepath to an idl file so that it cna be used outside a workspace

@AdithyaNarayan
Copy link
Contributor

Surprised that issue number 1 is still up for grabs!

gitbook-com bot pushed a commit to askibin/anchor that referenced this issue Jun 24, 2022
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 `__`).
ochaloup referenced this issue in marinade-finance/anchor May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants