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

feat: add support for xTokens pallet #227

Merged
merged 41 commits into from
Aug 18, 2023
Merged

Conversation

marshacb
Copy link
Contributor

@marshacb marshacb commented Jul 25, 2023

TODO:

  • unit tests
  • integration tests
  • error validation layer
  • update examples
  • docs
  • fetch xcAsset registry/update asset-transfer-api-registry with xcAssets

closes: #221

add weight vars as CreateWeightLimitOpts
…Tokens pallet exists

updated foreignAssetMultiLocationExists to always query  the current relay registry asset hub rather than the current origin chains state to account for non system chain queries
added util function to create AssetHub api in order to query foreign assets pallet
@marshacb marshacb marked this pull request as ready for review August 5, 2023 01:29
@marshacb marshacb marked this pull request as draft August 5, 2023 01:31
temporarily remove asset hub assetId chain state queries
@marshacb marshacb marked this pull request as ready for review August 7, 2023 17:32
@marshacb marshacb requested a review from TarikGul August 7, 2023 17:32
@marshacb marshacb changed the title [WIP] feat: add support for xTokens pallet feat: add support for xTokens pallet Aug 15, 2023
src/types.ts Outdated
* Provided when creating limited txs, represents the allowed amount of computation time
* the tx can use
*/
refTime?: string;
Copy link
Member

Choose a reason for hiding this comment

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

Replace weightLimit: string with weightLimit: { refTime: string, proofSize: string }

@@ -659,6 +659,8 @@ describe('AssetTransferAPI', () => {
xcmVersion: 3,
weightLimit: '100000',
isLimited: true,
refTime: '1000',
Copy link
Member

Choose a reason for hiding this comment

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

Note this should be updated with the Weightlimit change.

@marshacb marshacb requested a review from TarikGul August 16, 2023 15:39
import { getChainIdBySpecName } from './getChainIdBySpecName';

/**
* Returns the correct asset id for a valid AssetHub token symbol integer id
Copy link
Member

Choose a reason for hiding this comment

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

This comment is a bit confusing. I think the punctuation just needs to be fixed and it will be perfect.

_specName,
registry,
{
Copy link
Member

Choose a reason for hiding this comment

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

If this is an option should it be at the end of the args? And I thinkxcmVersion, and paysWithFeeDest can be added to it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch. adding those to the options

Copy link
Member

@TarikGul TarikGul left a comment

Choose a reason for hiding this comment

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

Rockstart PR! Really impressive!

@marshacb marshacb merged commit d5cee21 into main Aug 18, 2023
3 checks passed
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 this pull request may close these issues.

Support for xTokens for ParaToSystem
2 participants