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: Allow to get balance by script hash only #3275

Open
cthulhu-rider opened this issue Dec 20, 2023 · 0 comments
Open

cli: Allow to get balance by script hash only #3275

cthulhu-rider opened this issue Dec 20, 2023 · 0 comments
Labels
cli Command line interface enhancement Improving existing functionality I3 Minimal impact S4 Routine U4 Nothing urgent

Comments

@cthulhu-rider
Copy link
Contributor

cthulhu-rider commented Dec 20, 2023

Is your feature request related to a problem? Please describe.

I'm always frustrated when i cannot get balance by script hash only using Neo Go CLI. This info is public, accessible over Neo RPC, but wallet is required:

$ neo-go wallet nep17 balance --token GAS -a NSrcuBX2mLspBwXaagz2fC9dqGu2W7YwDV -r http://localhost:30333
bad wallet: wallet path is mandatory and should be passed using (--wallet, -w) flags or via wallet config using --wallet-config flag

Describe the solution you'd like

do not require -w flag in the command reading balance and leave:

$ neo-go wallet nep17 balance --token GAS -a NSrcuBX2mLspBwXaagz2fC9dqGu2W7YwDV -r http://localhost:30333
Account NSrcuBX2mLspBwXaagz2fC9dqGu2W7YwDV
GAS: GasToken (d2a4cff31913016155e38e474a2c06d08be276cf)
	Amount : 194.0491845
	Updated: 3605

Describe alternatives you've considered

wallet command assumes working with wallets. So, taking into account

$ neo-go query -h
NAME:
   neo-go query - Query data from RPC node

and that data is requested over RPC, then

$ neo-go query nep17 balance <address>

could be good also

@cthulhu-rider cthulhu-rider added the enhancement Improving existing functionality label Dec 20, 2023
@AnnaShaleva AnnaShaleva added the cli Command line interface label Dec 20, 2023
@roman-khimov roman-khimov added I3 Minimal impact U4 Nothing urgent S4 Routine labels Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Command line interface enhancement Improving existing functionality I3 Minimal impact S4 Routine U4 Nothing urgent
Projects
None yet
Development

No branches or pull requests

3 participants