-
Notifications
You must be signed in to change notification settings - Fork 105
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: begin integration of IBC with transfer module #1162
Conversation
const asset = assetList.assets.find( | ||
(asset) => asset.base === current.denom | ||
); | ||
if (!asset) return prev; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll still want to display an asset even if we don't have information for it in the asset list. For example, NAM isn't going to show up in the asset list (although actually maybe we could add it), but we still want to support transferring NAM over IBC.
The easiest thing to do here might be to change TransferModule to specify the properties it needs for assets e.g. instead of Asset
, use Pick<Asset, "name" | "base">
or something like that. Then we can more easily construct what the TransferModule needs in these cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might be a bigger problem, because if the asset is not known in the asset list, maybe we will need to query some of its info from somewhere. Can we separate this into a new issue?
|
||
type QueryFn<T> = (rpc: string) => Promise<T>; | ||
|
||
export const queryAndStoreRpc = async <T>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool! I think you're right about using the RPCs sequentially instead of randomly. Just from brief testing, it seems hit or miss whether an RPC will actually work (and I'm hoping they are ordered roughly by reliability).
Co-authored-by: Pedro Rezende <[email protected]>
96d432c
to
2b36b2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm able to do an IBC transfer 🚀
https://explorer.polypore.xyz/theta-testnet-001/tx/495021E251E23B3B9C619F91383114DFBE654185106FBDF1142F1AEB93BDF416
I believe we can do more upgrades on future PRs
This is the first attempt at integration the prototype IBC form with the transfer module.
Some caveats:
Testing
Namadillo settings
Indexer: https://indexer.public.heliax.work/internal-devnet-44a.1bd3e6ca62
RPC: https://proxy.public.heliax.work/internal-devnet-44a.1bd3e6ca62
IBC transfer to Namada settings
Source channel: channel-4353
Destination channel: channel-0
(Note: destination channel is only needed for transfers to shielded accounts)
Instructions
a. Enter the source and destination channel IDs as above
b. Select the Cosmos testnet (the one called "[DEPRECATED] Cosmos Hub...")
c. Wait for assets to load and then select "Cosmos"
d. Enter an amount
e. Select "Transparent" for the Namada account
f. Click "Submit" and approve the Keplr popup