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

Hermes feature: Query the balance for a key #912

Closed
2 of 5 tasks
andynog opened this issue May 6, 2021 · 1 comment · Fixed by #2232
Closed
2 of 5 tasks

Hermes feature: Query the balance for a key #912

andynog opened this issue May 6, 2021 · 1 comment · Fixed by #2232
Assignees
Labels
A: good-first-issue Admin: good for newcomers I: CLI Internal: related to the relayer's CLI O: new-feature Objective: cause to add a new feature or support
Milestone

Comments

@andynog
Copy link
Contributor

andynog commented May 6, 2021

Crate

ibc-relayer-cli

Summary

It would be nice to be able to query a balance for a key used in the relayer directly from hermes

Problem Definition

A user needs to track the balance remaining in a account (for a key) configured in the relayer. This will make it easier to know when you need to add more funds to the key or even switch to a different account that has enough funds to submit transactions.

Proposal

Implement a command such as keys balance [chain-id] [keyname]. This probably can be accomplished using a GRPC call to the bank module.

Acceptance Criteria

The balance for the account associated with the key is returned.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@andynog andynog added O: new-feature Objective: cause to add a new feature or support I: CLI Internal: related to the relayer's CLI labels May 6, 2021
@adizere adizere added this to the 09.2021 milestone Aug 3, 2021
@adizere adizere modified the milestones: 09.2021, 12.2021 Sep 27, 2021
@adizere adizere moved this to Needs Triage in IBC-rs: the road to v1 Feb 25, 2022
@romac romac added the A: good-first-issue Admin: good for newcomers label Mar 25, 2022
@adizere adizere modified the milestones: v1.0.0, v1.2 May 9, 2022
@adizere adizere changed the title Have a command to query the balance for an account (key) configured in the relayer Hermes feature: Query the balance for an account (key) May 11, 2022
@adizere adizere changed the title Hermes feature: Query the balance for an account (key) Hermes feature: Query the balance for a key May 11, 2022
@ljoss17 ljoss17 self-assigned this May 20, 2022
@ljoss17
Copy link
Contributor

ljoss17 commented May 20, 2022

I'm looking at this issue and stumbled upon a detail which could be interesting for future improvement of this feature.
At the moment, it is possible to query the balance using the CosmosSdkChain method query_balance, but this will query the balance of the gas price denom only, which is defined inside the config file.
Since the main interest is to be able to see if there are enough funds to pay the transaction, this shouldn't be a problem at the moment. But might it be useful to be able to list all the balances associated to a key in a future improvement ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: good-first-issue Admin: good for newcomers I: CLI Internal: related to the relayer's CLI O: new-feature Objective: cause to add a new feature or support
Projects
No open projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

4 participants