Skip to content

Parse denoms of incoming ICS-20 transfers #11374

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

Closed
anilhelvaci opened this issue May 14, 2025 · 0 comments · Fixed by #11375
Closed

Parse denoms of incoming ICS-20 transfers #11374

anilhelvaci opened this issue May 14, 2025 · 0 comments · Fixed by #11375
Assignees

Comments

@anilhelvaci
Copy link
Collaborator

What is the Problem Being Solved?

When ics-20 transfers are received in an address hook (receiveUpcall), we should be able to tell the local denom for the token being received. For example, transfer/channel-0/transfer/channel-1/uatom. We must also handle the case for receiving token that are local to Agoric. Currently we cannot solve the problem of receiving BLD over multiple hops in a generic way, like transfer/channel-0/transfer/channel-1/uatom.

Description of the Design

@michaelfig came up with the idea that we can make a query to learn the ibc/ prefixed hash for a given trace information. Of course we need to handle the denoms that are native to Agoric.

The design is a standalone method placed under orchestration/src/exos/local-orchestration-account.js which accepts an VTransferIBCEvent.packet to extract transfer information including the denom and checks;

  • Is this denom local to Agoric?
    • If the incoming denom is prefixed with source_port/source_channel that mean the base denom is local to receiving chain. See ICS-20 Spec
  • If the incoming denom is not Agoric native, than query the hash that represents the voucher token in bank module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant