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

Add a command to the CLI to get a denom hash from a trace path (port/channel) and base denom #497

Closed
2 of 3 tasks
andynog opened this issue Oct 14, 2021 · 7 comments · Fixed by #679
Closed
2 of 3 tasks
Assignees
Labels
client-UX good first issue Good for newcomers type: feature New features, sub-features or integrations

Comments

@andynog
Copy link

andynog commented Oct 14, 2021

Summary

It would be very helpful for debug and validation purposes to have a command that can return the Hash out of a Denom Trace.

Problem Definition

As a user I want to find the hash of a denom trace if I only have the [port_id]/[channel_id] and [base_denom] information.

This would be the reverse of a query ibc-transfer denom-trace command.

Proposal

The proposed command would be something like:

$ simd ibc-transfer denom-hash [port_id] [channel_id] [base_denom]

For example:

$ simd ibc-transfer denom-hash transfer channel-0 uatom
27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@crodriguezvega
Copy link
Contributor

Thanks for the suggestion, @andynog!

As explained in this ADR the path of the denom trace consists of the chain of port/channel identifiers used for tracing the source of the fungible token. So if a token has travelled through multiples chains then the path will contain more than one port/channel pair. Should the proposed command then support (if possible) an arbitrary number of [port_id] [channel_id] pairs as input to generate the hash?

@andynog
Copy link
Author

andynog commented Nov 3, 2021

hi @crodriguezvega, yes that is a good point. The command would have to accept multiple paths. What if instead of a [port_id] [channel_id] you have to specify the full path instead like:

$ simd ibc-transfer denom-hash [denom_path]

where [denom_path] could be something like:
[port_id]/[channel_id]/[denom]
[port_id]/[channel_id]/[port_id]/[channel_id2]/[denom]

for example:
transfer/channel_0/uatom
transfer/channel_0/transfer/channel_1/uatom

@crodriguezvega
Copy link
Contributor

Yes, I think that will work!

@crodriguezvega crodriguezvega added this to the v2.0.2 milestone Nov 23, 2021
@nir1218
Copy link
Contributor

nir1218 commented Jan 2, 2022

Hi @crodriguezvega I would like to take on this issue, this will be my first issue. Please let me know if this issue is still planned or it ought to be cancelled. Thanks.

@crodriguezvega
Copy link
Contributor

Thank you very much, @nir1218. Yes, we still want to work on this (it's actually planned for a release end of this month, if possible). Don't hesitate to ask us any questions you may have as you work through it.

@crodriguezvega crodriguezvega added the needs discussion Issues that need discussion before they can be worked on label Jan 3, 2022
@nir1218
Copy link
Contributor

nir1218 commented Jan 3, 2022

@crodriguezvega please assign it to me.

@crodriguezvega crodriguezvega moved this to In progress in ibc-go Jan 4, 2022
@crodriguezvega crodriguezvega moved this from In progress to In review in ibc-go Jan 4, 2022
@crodriguezvega crodriguezvega moved this from In review to Todo in ibc-go Jan 4, 2022
@crodriguezvega crodriguezvega added type: feature New features, sub-features or integrations and removed needs discussion Issues that need discussion before they can be worked on labels Jan 5, 2022
@crodriguezvega crodriguezvega moved this from Todo to In review in ibc-go Jan 5, 2022
Repository owner moved this from In review to Done in ibc-go Jan 10, 2022
@crodriguezvega
Copy link
Contributor

Thank you, @nir1218!

faddat pushed a commit to notional-labs/ibc-go that referenced this issue Feb 23, 2022
Improve list contracts by code query
faddat pushed a commit to notional-labs/ibc-go that referenced this issue Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-UX good first issue Good for newcomers type: feature New features, sub-features or integrations
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants