Skip to content

feat-add: anchor cli balance#3939

Closed
dotslashapaar wants to merge 1 commit intosolana-foundation:masterfrom
dotslashapaar:feat/anchor-cli-balance
Closed

feat-add: anchor cli balance#3939
dotslashapaar wants to merge 1 commit intosolana-foundation:masterfrom
dotslashapaar:feat/anchor-cli-balance

Conversation

@dotslashapaar
Copy link
Copy Markdown

Implement anchor balance command to reduce Solana CLI dependency (#3866 )

  • Adds native balance querying functionality to Anchor CLI, eliminating the need to shell out to solana balance.

  • Command also works outside the workspace

@vercel
Copy link
Copy Markdown

vercel bot commented Sep 12, 2025

@dotslashapaar is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@jamie-osec jamie-osec added enhancement New feature or request cli labels Oct 29, 2025
.to_string_lossy()
.to_string()
})
.unwrap_or_else(|| "~/.config/solana/id.json".to_string());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~ will not be expanded by read_from_file, so this is unhelpful and should fail earlier

#[clap(value_enum)]
shell: clap_complete::Shell,
},
#[clap(name = "balance", alias = "balance")]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[clap(name = "balance", alias = "balance")]

Comment on lines +357 to +358
#[clap(index = 1, value_name = "ACCOUNT_ADDRESS")]
pubkey: Option<Pubkey>,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[clap(index = 1, value_name = "ACCOUNT_ADDRESS")]
pubkey: Option<Pubkey>,
#[clap(short, long]
account: Option<Pubkey>,

For consistency with other options

@jamie-osec
Copy link
Copy Markdown
Collaborator

Actually sorry, closing in favour of #3963

@jamie-osec jamie-osec closed this Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants