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 AssetConversionApi #5694

Merged
merged 2 commits into from
Jul 24, 2023

Conversation

jsidorenko
Copy link
Contributor

@jsidorenko jsidorenko commented Jul 18, 2023

@jsidorenko
Copy link
Contributor Author

jsidorenko commented Jul 19, 2023

It looks like we would need to use Box<MultiLocation> instead of MultiAssetId to query the AssetHub API. Or even the VersionedMultiLocation once this gets changed on the node side in this PR: paritytech/cumulus#2860 .

How could we support both MultiAssetId and VersionedMultiLocation versions to query both the local node and the AssetHub?

params: [
{
name: 'asset1',
type: 'MultiAssetId'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsidorenko
I think, primary, we use asset-conversion on AssetHubs, so lets make them work at least,
so I would change it here to Box<XcmV3MultiLocation> (please, try it locally, should work),

and then lets solve: https://github.com/paritytech/cumulus/issues/2915
and then lets find solution how to dynamically support: MultiAssetId (substrate node) vs MultiLocation (asset-hub),
because this could require some dynamic loading or some switch for node kind (substrate -> MultiAssetId, asset-hubs -> MultiLocation)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tried, the Box<XcmV3MultiLocation> works well

Copy link
Member

@jacogr jacogr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@jacogr jacogr merged commit c2944f2 into polkadot-js:master Jul 24, 2023
@jsidorenko
Copy link
Contributor Author

jsidorenko commented Jul 24, 2023

@jacogr shall I change from MultiAssetId to Box<XcmV3MultiLocation> as on Westmint? I can open a separate PR

@polkadot-js-bot
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Jul 26, 2023
@jsidorenko jsidorenko deleted the js/add-asset-conversion-api branch August 13, 2023 06:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[asset-conversion] Add runtime api to polkadot-js/api
4 participants