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: anchor idl fetch should work outside workspaces #1453

Closed
paul-schaaf opened this issue Feb 16, 2022 · 5 comments · Fixed by #1509
Closed

cli: anchor idl fetch should work outside workspaces #1453

paul-schaaf opened this issue Feb 16, 2022 · 5 comments · Fixed by #1509
Assignees
Labels
cli good first issue Good for newcomers help wanted Extra attention is needed

Comments

@paul-schaaf
Copy link
Contributor

No description provided.

@paul-schaaf paul-schaaf added good first issue Good for newcomers cli labels Feb 16, 2022
@armaniferrante armaniferrante added the help wanted Extra attention is needed label Feb 16, 2022
@NBNARADHYA
Copy link
Contributor

@paul-schaaf @armaniferrante I would like to take on this issue! Could you please elaborate more on this ?

@paul-schaaf
Copy link
Contributor Author

anchor idl fetch fetches an idl from the chain and you have the option to save it to a file with the -o myFile.json option.

but currently you can only do this from inside a workspace. so if youre just interestrd in getting an idl you have to create a temporary workspace cd into it and then call it from there. afterwards you can delete the temp workspace. this shouldnt be necessary. you should be able to call it from anywhere

@NBNARADHYA
Copy link
Contributor

Aah! Got it. So, the desired changes:

  1. anchor idl fetch if run inside workspaces should work as it is now.
  2. anchor idl fetch if run outside workspaces should use default rpc url found in solana config file and should let users override the rpc url in the command

Did I get it right ? @paul-schaaf

@paul-schaaf
Copy link
Contributor Author

yes exactly!

theres already an option to choose the cluster. e.g. --provider.cluster mainnet. but again, this currently only works if youre inside a workspace

@NBNARADHYA
Copy link
Contributor

@paul-schaaf Thanks for the clarification! I am on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants