cosmos / cosmjs

The Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers.
https://cosmos.github.io/cosmjs/
Apache License 2.0
655 stars 344 forks source link

Can cosmjs be used to send ics20 tokens for IBC swaps to Osmosis ? #1567

Open phy-chain opened 8 months ago

phy-chain commented 8 months ago

I have seen announcement a few months ago that it was possible, by using "IBC hooks" from osmosis, to send some tokens from one chain, swap them automatically and get the result back : https://github.com/cosmos/ibc-apps/tree/main/modules/ibc-hooks

Is it possible to do that through cosmjs or would I be force to code some Rust / Go to implement this solution ? From what I get reading the link above, it's mainly a problematic of setting the proper message/memo structure, so it is detected by osmosis hooks.

Does that ring a bell ? Would that be possible to do with cosmjs ? Thanks !