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

feat: return a human readable denomination for IBC vouchers when querying bank balances #14181

Closed
crodriguezvega opened this issue Dec 6, 2022 · 0 comments · Fixed by #14894 or cosmos/ibc-go#3104
Labels
C:x/bank T: Client UX T: Dev UX UX for SDK developers (i.e. how to call our code) T: UX

Comments

@crodriguezvega
Copy link

crodriguezvega commented Dec 6, 2022

Summary

Return a human readable denomination for IBC vouchers when querying bank balances.

Problem Definition

Currently when the account balance of an address is queried and it has IBC vouchers, then the denomination for those vouchers will be the hashed IBC denom, which is not very human readable friendly. In order to get a human readable denom, a second query needs to be performed to translate the hashed IBC denom to the full trace path.

Issue #1480 was opened in ibc-go to address this issue. A potential solution was explored in the issue to expose in ibc-go a new query endpoint that would return the same result as the regular balances query, but incorporating an extra field with the full trace path trace in case the balance of the account included IBC vouchers. This solution is not idea, though, since clients would need to switch to this new query endpoint.

Proposal

In ibc-go we could use x/bank's Metadata to set metadata for an IBC voucher when it is minted for the first time. If the metadata is present for an IBC voucher, the query for bank balances could make use of the metadata to display a human readable denom (this translation could be done based on the value of a flag). If metadata is not present or the flag is not enabled, then the query for bank balances would return the regular hashed IBC denom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/bank T: Client UX T: Dev UX UX for SDK developers (i.e. how to call our code) T: UX
Projects
None yet
2 participants