From 84d3a3063178e6cd060282383f29a3ec43f60783 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Wed, 27 Nov 2024 12:32:22 +0100 Subject: [PATCH 01/21] Remove externalId & origin from Asset, use location instead --- CONTRIBUTING.md | 2 +- README.md | 28 ++++++++++++++------------ examples/xcm-transfer/src/externals.ts | 10 ++++----- packages/sdk/src/api/Router.ts | 2 -- packages/sdk/src/client/AssetClient.ts | 21 +------------------ packages/sdk/src/types.ts | 3 +-- 6 files changed, 23 insertions(+), 43 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f0816aed..d6818c03 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ ## Requirements -- [Node.js](https://nodejs.org/) (**version 18 or higher**) +- [Node.js](https://nodejs.org/) (**version 20 or higher**) ## Local development diff --git a/README.md b/README.md index bfd0e559..38e4b6e5 100644 --- a/README.md +++ b/README.md @@ -6,19 +6,19 @@ Collection of SDK(s) crafted to ease Hydration & Basilisk chains integration. ## Project Structure -| Package | Version | Changelog | Description | -|:----------------------|:--------------------|:-----------------------|:-----------------------| -| [`@galacticcouncil/sdk`](./packages/sdk) | [![version](https://img.shields.io/npm/v/@galacticcouncil/sdk.svg)](https://www.npmjs.com/package/@galacticcouncil/sdk) | [changelog](./packages/sdk/CHANGELOG.md) | Trade router & pool utilities -| [`@galacticcouncil/xcm-core`](./packages/xcm-core) | [![version](https://img.shields.io/npm/v/@galacticcouncil/xcm-core.svg)](https://www.npmjs.com/package/@galacticcouncil/xcm-core) | [changelog](./packages/xcm-core/CHANGELOG.md) | Cross-chain definitions & types -| [`@galacticcouncil/xcm-cfg`](./packages/xcm-cfg) | [![version](https://img.shields.io/npm/v/@galacticcouncil/xcm-cfg.svg)](https://www.npmjs.com/package/@galacticcouncil/xcm-cfg) | [changelog](./packages/xcm-cfg/CHANGELOG.md) | Cross-chain routes & configs -| [`@galacticcouncil/xcm-sdk`](./packages/xcm-sdk) | [![version](https://img.shields.io/npm/v/@galacticcouncil/xcm-sdk.svg)](https://www.npmjs.com/package/@galacticcouncil/xcm-sdk) | [changelog](./packages/xcm-sdk/CHANGELOG.md) | Cross-chain transfer sdk -| [`@galacticcouncil/math-ema`](./packages/math-ema) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-ema.svg)](https://www.npmjs.com/package/@galacticcouncil/math-ema) | [changelog](./packages/math-ema/CHANGELOG.md) | EMA math -| [`@galacticcouncil/math-lbp`](./packages/math-lbp) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-lbp.svg)](https://www.npmjs.com/package/@galacticcouncil/math-lbp) | [changelog](./packages/math-lbp/CHANGELOG.md) | LBP math -| [`@galacticcouncil/math-liquidity-mining`](./packages/math-liquidity-mining) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-liquidity-mining.svg)](https://www.npmjs.com/package/@galacticcouncil/math-liquidity-mining) | [changelog](./packages/math-liquidity-mining/CHANGELOG.md) | Liquidity mining math -| [`@galacticcouncil/math-omnipool`](./packages/math-omnipool) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-omnipool.svg)](https://www.npmjs.com/package/@galacticcouncil/math-omnipool) | [changelog](./packages/math-omnipool/CHANGELOG.md) | Omnipool math -| [`@galacticcouncil/math-stableswap`](./packages/math-stableswap) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-stableswap.svg)](https://www.npmjs.com/package/@galacticcouncil/math-stableswap) | [changelog](./packages/math-stableswap/CHANGELOG.md) | Stableswap math -| [`@galacticcouncil/math-staking`](./packages/math-staking) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-staking.svg)](https://www.npmjs.com/package/@galacticcouncil/math-staking) | [changelog](./packages/math-staking/CHANGELOG.md) | Staking math -| [`@galacticcouncil/math-xyk`](./packages/math-xyk) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-xyk.svg)](https://www.npmjs.com/package/@galacticcouncil/math-xyk) | [changelog](./packages/math-xyk/CHANGELOG.md) | XYK math +| Package | Version | Changelog | Description | +| :--------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------- | :------------------------------ | +| [`@galacticcouncil/sdk`](./packages/sdk) | [![version](https://img.shields.io/npm/v/@galacticcouncil/sdk.svg)](https://www.npmjs.com/package/@galacticcouncil/sdk) | [changelog](./packages/sdk/CHANGELOG.md) | Trade router & pool utilities | +| [`@galacticcouncil/xcm-core`](./packages/xcm-core) | [![version](https://img.shields.io/npm/v/@galacticcouncil/xcm-core.svg)](https://www.npmjs.com/package/@galacticcouncil/xcm-core) | [changelog](./packages/xcm-core/CHANGELOG.md) | Cross-chain definitions & types | +| [`@galacticcouncil/xcm-cfg`](./packages/xcm-cfg) | [![version](https://img.shields.io/npm/v/@galacticcouncil/xcm-cfg.svg)](https://www.npmjs.com/package/@galacticcouncil/xcm-cfg) | [changelog](./packages/xcm-cfg/CHANGELOG.md) | Cross-chain route configs | +| [`@galacticcouncil/xcm-sdk`](./packages/xcm-sdk) | [![version](https://img.shields.io/npm/v/@galacticcouncil/xcm-sdk.svg)](https://www.npmjs.com/package/@galacticcouncil/xcm-sdk) | [changelog](./packages/xcm-sdk/CHANGELOG.md) | Cross-chain transfer sdk | +| [`@galacticcouncil/math-ema`](./packages/math-ema) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-ema.svg)](https://www.npmjs.com/package/@galacticcouncil/math-ema) | [changelog](./packages/math-ema/CHANGELOG.md) | EMA math | +| [`@galacticcouncil/math-lbp`](./packages/math-lbp) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-lbp.svg)](https://www.npmjs.com/package/@galacticcouncil/math-lbp) | [changelog](./packages/math-lbp/CHANGELOG.md) | LBP math | +| [`@galacticcouncil/math-liquidity-mining`](./packages/math-liquidity-mining) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-liquidity-mining.svg)](https://www.npmjs.com/package/@galacticcouncil/math-liquidity-mining) | [changelog](./packages/math-liquidity-mining/CHANGELOG.md) | Liquidity mining math | +| [`@galacticcouncil/math-omnipool`](./packages/math-omnipool) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-omnipool.svg)](https://www.npmjs.com/package/@galacticcouncil/math-omnipool) | [changelog](./packages/math-omnipool/CHANGELOG.md) | Omnipool math | +| [`@galacticcouncil/math-stableswap`](./packages/math-stableswap) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-stableswap.svg)](https://www.npmjs.com/package/@galacticcouncil/math-stableswap) | [changelog](./packages/math-stableswap/CHANGELOG.md) | Stableswap math | +| [`@galacticcouncil/math-staking`](./packages/math-staking) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-staking.svg)](https://www.npmjs.com/package/@galacticcouncil/math-staking) | [changelog](./packages/math-staking/CHANGELOG.md) | Staking math | +| [`@galacticcouncil/math-xyk`](./packages/math-xyk) | [![version](https://img.shields.io/npm/v/@galacticcouncil/math-xyk.svg)](https://www.npmjs.com/package/@galacticcouncil/math-xyk) | [changelog](./packages/math-xyk/CHANGELOG.md) | XYK math | ## Contributing @@ -29,6 +29,7 @@ Everything about building, setting up development environment & releasing can be In case of unexpected sdk behaviour, please create well-written issue [here](https://github.com/galacticcouncil/sdk/issues/new). It makes it easier to find & fix the problem accordingly. ## Legal +
 This file is part of https://github.com/galacticcouncil/*
                              
@@ -58,4 +59,5 @@ This file is part of https://github.com/galacticcouncil/*
                   $$         $$$$$               $$$$$     $$          $$$$             
                 $$$                     
 
+ For more details read [LICENSE.md](LICENSE.md) diff --git a/examples/xcm-transfer/src/externals.ts b/examples/xcm-transfer/src/externals.ts index 74e54a81..40d496bc 100644 --- a/examples/xcm-transfer/src/externals.ts +++ b/examples/xcm-transfer/src/externals.ts @@ -89,18 +89,18 @@ export function configureExternal( ) { external.forEach((ext) => { if (ext.origin === 1000 && !defaultExternals.includes(ext.id)) { - const assetData = toAssetData(ext, '_ah_'); - console.log('Registering ' + assetData.asset.key); + const assetData = toAssetData(ext); + console.log('💀 Registering ' + assetData.asset.key); configService.addExternalHubRoute(assetData); } }); } -function toAssetData(external: ExternalAsset, suffix: string): ChainAssetData { - const { decimals, id, symbol, internalId } = external; +function toAssetData(external: ExternalAsset): ChainAssetData { + const { decimals, id, internalId, origin, symbol } = external; const key = symbol.toLowerCase(); const asset = new Asset({ - key: key + suffix + id, + key: [key, origin, id].join('_'), originSymbol: symbol, }); diff --git a/packages/sdk/src/api/Router.ts b/packages/sdk/src/api/Router.ts index 1c2d21d6..a0a1b998 100644 --- a/packages/sdk/src/api/Router.ts +++ b/packages/sdk/src/api/Router.ts @@ -99,9 +99,7 @@ export class Router { type: t.type, isSufficient: t.isSufficient, existentialDeposit: t.existentialDeposit, - origin: t.origin, meta: t.meta, - externalId: t.externalId, isWhiteListed: t.isWhiteListed, } as Asset; }) diff --git a/packages/sdk/src/client/AssetClient.ts b/packages/sdk/src/client/AssetClient.ts index 4ea07b74..48f09448 100644 --- a/packages/sdk/src/client/AssetClient.ts +++ b/packages/sdk/src/client/AssetClient.ts @@ -10,7 +10,6 @@ import { Option, StorageKey } from '@polkadot/types'; import { ApiPromise } from '@polkadot/api'; import { SYSTEM_ASSET_ID } from '../consts'; import { Asset, AssetMetadata, Bond, ExternalAsset } from '../types'; -import { findNestedKey } from '../utils/json'; import { PolkadotApiClient } from './PolkadotApi'; @@ -149,8 +148,6 @@ export class AssetClient extends PolkadotApiClient { const { name, assetType, isSufficient, existentialDeposit } = details; const { symbol, decimals } = metadata.get(tokenKey) ?? {}; - const origin = this.parseLocation('parachain', location); - const pendulumId = 2094; return { id: tokenKey, name: name.toHuman(), @@ -159,11 +156,7 @@ export class AssetClient extends PolkadotApiClient { icon: symbol, type: assetType.toHuman(), isSufficient: isSufficient ? isSufficient.toHuman() : true, - origin, - externalId: this.parseLocation( - pendulumId === origin ? 'generalKey' : 'generalIndex', - location - ), + location: location?.toJSON(), existentialDeposit: existentialDeposit.toString(), } as Asset; } @@ -345,16 +338,4 @@ export class AssetClient extends PolkadotApiClient { const type = details.assetType.toString(); return this.SUPPORTED_TYPES.includes(type); } - - private parseLocation( - key: string, - location?: HydradxRuntimeXcmAssetLocation - ): any | undefined { - if (location) { - const entry = findNestedKey(location.toJSON(), key); - return entry && entry[key]; - } else { - return undefined; - } - } } diff --git a/packages/sdk/src/types.ts b/packages/sdk/src/types.ts index 3f3b3bda..d8f7702a 100644 --- a/packages/sdk/src/types.ts +++ b/packages/sdk/src/types.ts @@ -174,8 +174,7 @@ export interface Asset extends AssetMetadata { type: string; existentialDeposit: string; isSufficient: boolean; - origin?: number; - externalId?: number; + location?: any; meta?: Record; isWhiteListed?: boolean; } From 986b1cb227ae750d92073735a3577d9ad16ed2e0 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Wed, 27 Nov 2024 12:36:23 +0100 Subject: [PATCH 02/21] RELEASE: Releasing 2 package(s) Releases: @galacticcouncil/sdk@5.0.0 @galacticcouncil/xcm-sdk@7.0.0 --- examples/sdk-cjs/package.json | 4 ++-- examples/sdk-esm/package.json | 2 +- examples/xcm-transfer/package.json | 4 ++-- integration-tests/xcm-test/package.json | 2 +- package-lock.json | 20 ++++++++++---------- packages/sdk/CHANGELOG.md | 6 ++++++ packages/sdk/package.json | 2 +- packages/xcm-sdk/CHANGELOG.md | 7 +++++++ packages/xcm-sdk/package.json | 4 ++-- 9 files changed, 32 insertions(+), 19 deletions(-) diff --git a/examples/sdk-cjs/package.json b/examples/sdk-cjs/package.json index 4f867d3d..56d2731b 100644 --- a/examples/sdk-cjs/package.json +++ b/examples/sdk-cjs/package.json @@ -11,8 +11,8 @@ "node": "^21.6.0" }, "dependencies": { - "@galacticcouncil/sdk": "^4.6.1", - "@galacticcouncil/xcm-sdk": "^6.3.3", + "@galacticcouncil/sdk": "^5.0.0", + "@galacticcouncil/xcm-sdk": "^7.0.0", "@galacticcouncil/xcm-cfg": "^5.5.0" } } diff --git a/examples/sdk-esm/package.json b/examples/sdk-esm/package.json index 53fddcec..42b084fb 100644 --- a/examples/sdk-esm/package.json +++ b/examples/sdk-esm/package.json @@ -11,6 +11,6 @@ "esbuild": "^0.17.11" }, "dependencies": { - "@galacticcouncil/sdk": "^4.6.1" + "@galacticcouncil/sdk": "^5.0.0" } } diff --git a/examples/xcm-transfer/package.json b/examples/xcm-transfer/package.json index 5e824ac1..2c868e60 100644 --- a/examples/xcm-transfer/package.json +++ b/examples/xcm-transfer/package.json @@ -12,9 +12,9 @@ "esbuild-plugin-wasm": "^1.0.0" }, "dependencies": { - "@galacticcouncil/sdk": "^4.6.1", + "@galacticcouncil/sdk": "^5.0.0", "@galacticcouncil/xcm-cfg": "^5.5.0", - "@galacticcouncil/xcm-sdk": "^6.3.3", + "@galacticcouncil/xcm-sdk": "^7.0.0", "@talismn/connect-wallets": "^1.2.5" } } diff --git a/integration-tests/xcm-test/package.json b/integration-tests/xcm-test/package.json index e76683e0..b11c5c02 100644 --- a/integration-tests/xcm-test/package.json +++ b/integration-tests/xcm-test/package.json @@ -19,6 +19,6 @@ }, "dependencies": { "@galacticcouncil/xcm-cfg": "^5.5.0", - "@galacticcouncil/xcm-sdk": "^6.3.3" + "@galacticcouncil/xcm-sdk": "^7.0.0" } } diff --git a/package-lock.json b/package-lock.json index 00b52248..f933f722 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,9 +34,9 @@ }, "examples/sdk-cjs": { "dependencies": { - "@galacticcouncil/sdk": "^4.6.1", + "@galacticcouncil/sdk": "^5.0.0", "@galacticcouncil/xcm-cfg": "^5.5.0", - "@galacticcouncil/xcm-sdk": "^6.3.3" + "@galacticcouncil/xcm-sdk": "^7.0.0" }, "devDependencies": { "node": "^21.6.0" @@ -44,7 +44,7 @@ }, "examples/sdk-esm": { "dependencies": { - "@galacticcouncil/sdk": "^4.6.1" + "@galacticcouncil/sdk": "^5.0.0" }, "devDependencies": { "esbuild": "^0.17.11" @@ -104,9 +104,9 @@ }, "examples/xcm-transfer": { "dependencies": { - "@galacticcouncil/sdk": "^4.6.1", + "@galacticcouncil/sdk": "^5.0.0", "@galacticcouncil/xcm-cfg": "^5.5.0", - "@galacticcouncil/xcm-sdk": "^6.3.3", + "@galacticcouncil/xcm-sdk": "^7.0.0", "@talismn/connect-wallets": "^1.2.5" }, "devDependencies": { @@ -169,7 +169,7 @@ "integration-tests/xcm-test": { "dependencies": { "@galacticcouncil/xcm-cfg": "^5.5.0", - "@galacticcouncil/xcm-sdk": "^6.3.3" + "@galacticcouncil/xcm-sdk": "^7.0.0" }, "devDependencies": { "@acala-network/chopsticks-testing": "1.0.1" @@ -11594,7 +11594,7 @@ }, "packages/sdk": { "name": "@galacticcouncil/sdk", - "version": "4.6.1", + "version": "5.0.0", "dependencies": { "@galacticcouncil/math-lbp": "^1.0.0", "@galacticcouncil/math-liquidity-mining": "^1.0.0", @@ -11662,12 +11662,12 @@ }, "packages/xcm-sdk": { "name": "@galacticcouncil/xcm-sdk", - "version": "6.3.3", + "version": "7.0.0", "dependencies": { - "@galacticcouncil/xcm-core": "^5.3.1" + "@galacticcouncil/xcm-core": "^5.4.0" }, "peerDependencies": { - "@galacticcouncil/sdk": "^4.6.0" + "@galacticcouncil/sdk": "^5.0.0" } } } diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index ef9c4927..166f11fd 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,5 +1,11 @@ # @galacticcouncil/sdk +## 5.0.0 + +### Major Changes + +- Removing externalId & origin from Asset, using location instead (breaking change) + ## 4.6.1 ### Patch Changes diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 74acf07d..0d067bad 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@galacticcouncil/sdk", - "version": "4.6.1", + "version": "5.0.0", "description": "Galactic off-chain routing & optimization of orders across pools for best price execution", "author": "GalacticCouncil", "repository": { diff --git a/packages/xcm-sdk/CHANGELOG.md b/packages/xcm-sdk/CHANGELOG.md index c8948cab..33329ded 100644 --- a/packages/xcm-sdk/CHANGELOG.md +++ b/packages/xcm-sdk/CHANGELOG.md @@ -1,5 +1,12 @@ # @galacticcouncil/xcm-sdk +## 7.0.0 + +### Patch Changes + +- Updated dependencies + - @galacticcouncil/sdk@5.0.0 + ## 6.3.3 ### Patch Changes diff --git a/packages/xcm-sdk/package.json b/packages/xcm-sdk/package.json index e3a570d1..f29ea751 100644 --- a/packages/xcm-sdk/package.json +++ b/packages/xcm-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@galacticcouncil/xcm-sdk", - "version": "6.3.3", + "version": "7.0.0", "description": "Cross-chain sdk", "author": "GalacticCouncil", "repository": { @@ -35,6 +35,6 @@ "@galacticcouncil/xcm-core": "^5.4.0" }, "peerDependencies": { - "@galacticcouncil/sdk": "^4.6.0" + "@galacticcouncil/sdk": "^5.0.0" } } From e12b84b5d3e0f94f673bf045ebb750ef61b71cea Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Wed, 27 Nov 2024 12:42:27 +0100 Subject: [PATCH 03/21] fix tests --- packages/sdk/test/api/router.spec.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/sdk/test/api/router.spec.ts b/packages/sdk/test/api/router.spec.ts index 73169fec..c4a4dde4 100644 --- a/packages/sdk/test/api/router.spec.ts +++ b/packages/sdk/test/api/router.spec.ts @@ -58,9 +58,7 @@ describe('Router with mocked XYK pool service', () => { type: 'Token', isSufficient: true, existentialDeposit: '1000', - origin: undefined, meta: undefined, - externalId: undefined, isWhiteListed: undefined, }, { @@ -72,9 +70,7 @@ describe('Router with mocked XYK pool service', () => { type: 'Token', isSufficient: true, existentialDeposit: '1000', - origin: undefined, meta: undefined, - externalId: undefined, isWhiteListed: undefined, }, { @@ -86,9 +82,7 @@ describe('Router with mocked XYK pool service', () => { type: 'Token', isSufficient: true, existentialDeposit: '1000', - origin: undefined, meta: undefined, - externalId: undefined, isWhiteListed: undefined, }, ]); @@ -108,9 +102,7 @@ describe('Router with mocked XYK pool service', () => { type: 'Token', isSufficient: true, existentialDeposit: '1000', - origin: undefined, meta: undefined, - externalId: undefined, isWhiteListed: undefined, }, { @@ -122,9 +114,7 @@ describe('Router with mocked XYK pool service', () => { type: 'Token', isSufficient: true, existentialDeposit: '1000', - origin: undefined, meta: undefined, - externalId: undefined, isWhiteListed: undefined, }, ]); From e8fe824c9aff7a29527a5cca9611ce25ef238485 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Wed, 27 Nov 2024 13:01:37 +0100 Subject: [PATCH 04/21] fix asset location in router api --- packages/sdk/src/api/Router.ts | 1 + packages/sdk/test/api/router.spec.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/packages/sdk/src/api/Router.ts b/packages/sdk/src/api/Router.ts index a0a1b998..217043a1 100644 --- a/packages/sdk/src/api/Router.ts +++ b/packages/sdk/src/api/Router.ts @@ -100,6 +100,7 @@ export class Router { isSufficient: t.isSufficient, existentialDeposit: t.existentialDeposit, meta: t.meta, + location: t.location, isWhiteListed: t.isWhiteListed, } as Asset; }) diff --git a/packages/sdk/test/api/router.spec.ts b/packages/sdk/test/api/router.spec.ts index c4a4dde4..45bad472 100644 --- a/packages/sdk/test/api/router.spec.ts +++ b/packages/sdk/test/api/router.spec.ts @@ -58,6 +58,7 @@ describe('Router with mocked XYK pool service', () => { type: 'Token', isSufficient: true, existentialDeposit: '1000', + location: undefined, meta: undefined, isWhiteListed: undefined, }, @@ -70,6 +71,7 @@ describe('Router with mocked XYK pool service', () => { type: 'Token', isSufficient: true, existentialDeposit: '1000', + location: undefined, meta: undefined, isWhiteListed: undefined, }, @@ -82,6 +84,7 @@ describe('Router with mocked XYK pool service', () => { type: 'Token', isSufficient: true, existentialDeposit: '1000', + location: undefined, meta: undefined, isWhiteListed: undefined, }, @@ -102,6 +105,7 @@ describe('Router with mocked XYK pool service', () => { type: 'Token', isSufficient: true, existentialDeposit: '1000', + location: undefined, meta: undefined, isWhiteListed: undefined, }, @@ -114,6 +118,7 @@ describe('Router with mocked XYK pool service', () => { type: 'Token', isSufficient: true, existentialDeposit: '1000', + location: undefined, meta: undefined, isWhiteListed: undefined, }, From 327ec619b71aef123d537a74360b1826e16c06c8 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Wed, 27 Nov 2024 13:02:07 +0100 Subject: [PATCH 05/21] RELEASE: Releasing 1 package(s) Releases: @galacticcouncil/sdk@5.0.1 --- examples/sdk-cjs/package.json | 2 +- examples/sdk-esm/package.json | 2 +- examples/xcm-transfer/package.json | 2 +- package-lock.json | 8 ++++---- packages/sdk/CHANGELOG.md | 6 ++++++ packages/sdk/package.json | 2 +- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/examples/sdk-cjs/package.json b/examples/sdk-cjs/package.json index 56d2731b..8857ceb8 100644 --- a/examples/sdk-cjs/package.json +++ b/examples/sdk-cjs/package.json @@ -11,7 +11,7 @@ "node": "^21.6.0" }, "dependencies": { - "@galacticcouncil/sdk": "^5.0.0", + "@galacticcouncil/sdk": "^5.0.1", "@galacticcouncil/xcm-sdk": "^7.0.0", "@galacticcouncil/xcm-cfg": "^5.5.0" } diff --git a/examples/sdk-esm/package.json b/examples/sdk-esm/package.json index 42b084fb..6d716c34 100644 --- a/examples/sdk-esm/package.json +++ b/examples/sdk-esm/package.json @@ -11,6 +11,6 @@ "esbuild": "^0.17.11" }, "dependencies": { - "@galacticcouncil/sdk": "^5.0.0" + "@galacticcouncil/sdk": "^5.0.1" } } diff --git a/examples/xcm-transfer/package.json b/examples/xcm-transfer/package.json index 2c868e60..d56fd22d 100644 --- a/examples/xcm-transfer/package.json +++ b/examples/xcm-transfer/package.json @@ -12,7 +12,7 @@ "esbuild-plugin-wasm": "^1.0.0" }, "dependencies": { - "@galacticcouncil/sdk": "^5.0.0", + "@galacticcouncil/sdk": "^5.0.1", "@galacticcouncil/xcm-cfg": "^5.5.0", "@galacticcouncil/xcm-sdk": "^7.0.0", "@talismn/connect-wallets": "^1.2.5" diff --git a/package-lock.json b/package-lock.json index f933f722..90a0b2e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ }, "examples/sdk-cjs": { "dependencies": { - "@galacticcouncil/sdk": "^5.0.0", + "@galacticcouncil/sdk": "^5.0.1", "@galacticcouncil/xcm-cfg": "^5.5.0", "@galacticcouncil/xcm-sdk": "^7.0.0" }, @@ -44,7 +44,7 @@ }, "examples/sdk-esm": { "dependencies": { - "@galacticcouncil/sdk": "^5.0.0" + "@galacticcouncil/sdk": "^5.0.1" }, "devDependencies": { "esbuild": "^0.17.11" @@ -104,7 +104,7 @@ }, "examples/xcm-transfer": { "dependencies": { - "@galacticcouncil/sdk": "^5.0.0", + "@galacticcouncil/sdk": "^5.0.1", "@galacticcouncil/xcm-cfg": "^5.5.0", "@galacticcouncil/xcm-sdk": "^7.0.0", "@talismn/connect-wallets": "^1.2.5" @@ -11594,7 +11594,7 @@ }, "packages/sdk": { "name": "@galacticcouncil/sdk", - "version": "5.0.0", + "version": "5.0.1", "dependencies": { "@galacticcouncil/math-lbp": "^1.0.0", "@galacticcouncil/math-liquidity-mining": "^1.0.0", diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index 166f11fd..33dd7388 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,5 +1,11 @@ # @galacticcouncil/sdk +## 5.0.1 + +### Patch Changes + +- Fix asset location in router api + ## 5.0.0 ### Major Changes diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 0d067bad..fa7b43c9 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@galacticcouncil/sdk", - "version": "5.0.0", + "version": "5.0.1", "description": "Galactic off-chain routing & optimization of orders across pools for best price execution", "author": "GalacticCouncil", "repository": { From cd253313f1bee10e1e1d08c9e6bbb90451263dfb Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Thu, 28 Nov 2024 18:57:30 +0100 Subject: [PATCH 06/21] update call.spec, blacklist nodle --- .../src/__snapshots__/call.spec.ts.snap | 121 ++++++++++++++++-- integration-tests/xcm-test/src/call.spec.ts | 4 +- integration-tests/xcm-test/src/mock/xcm.ts | 13 +- 3 files changed, 124 insertions(+), 14 deletions(-) diff --git a/integration-tests/xcm-test/src/__snapshots__/call.spec.ts.snap b/integration-tests/xcm-test/src/__snapshots__/call.spec.ts.snap index 0f5471e0..fc9cdb73 100644 --- a/integration-tests/xcm-test/src/__snapshots__/call.spec.ts.snap +++ b/integration-tests/xcm-test/src/__snapshots__/call.spec.ts.snap @@ -1,5 +1,12 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Wallet with XCM config should return valid Kusama calldata for AssetHub -> Basilisk USDT [usdt] transfer 1`] = ` +Array [ + "kusama-assethub-basilisk-usdt", + "0x0901041f0803010100a9200300010100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d0304000002043205011f0002093d000000000000", +] +`; + exports[`Wallet with XCM config should return valid Kusama calldata for AssetHub -> Karura USDT [usdt] transfer 1`] = ` Array [ "kusama-assethub-karura-usdt", @@ -14,6 +21,55 @@ Array [ ] `; +exports[`Wallet with XCM config should return valid Kusama calldata for Basilisk -> AssetHub USDT [usdt] transfer 1`] = ` +Array [ + "basilisk-kusama-assethub-usdt", + "0xf4049a010300010300a10f043205011f0002093d0003010200a10f0100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d00", +] +`; + +exports[`Wallet with XCM config should return valid Kusama calldata for Basilisk -> Integritee TEER [teer] transfer 1`] = ` +Array [ + "basilisk-integritee-teer", + "0x0101049a00110000000010a5d4e80000000000000000000000030102007d1f0100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d00", +] +`; + +exports[`Wallet with XCM config should return valid Kusama calldata for Basilisk -> Karura BSX [bsx] transfer 1`] = ` +Array [ + "basilisk-karura-bsx", + "0x0101049a00000000000010a5d4e8000000000000000000000003010200411f0100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d00", +] +`; + +exports[`Wallet with XCM config should return valid Kusama calldata for Basilisk -> Kusama KSM [ksm] transfer 1`] = ` +Array [ + "basilisk-kusama-ksm", + "0xf4049a00010000000010a5d4e800000000000000000000000301010100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d00", +] +`; + +exports[`Wallet with XCM config should return valid Kusama calldata for Basilisk -> Robonomics XRT [xrt] transfer 1`] = ` +Array [ + "basilisk-robonomics-xrt", + "0x0101049a001000000000ca9a3b0000000000000000000000000301020001200100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d00", +] +`; + +exports[`Wallet with XCM config should return valid Kusama calldata for Basilisk -> Tinkernet TNKR [tnkr] transfer 1`] = ` +Array [ + "basilisk-tinkernet-tnkr", + "0x0101049a00060000000010a5d4e800000000000000000000000301020035210100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d00", +] +`; + +exports[`Wallet with XCM config should return valid Kusama calldata for Integritee -> Basilisk TEER [teer] transfer 1`] = ` +Array [ + "integritee-basilisk-teer", + "0xf4042200000010a5d4e8000000000000000000000003010200a9200100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d00", +] +`; + exports[`Wallet with XCM config should return valid Kusama calldata for Karura -> AssetHub USDT [usdt] transfer 1`] = ` Array [ "karura-kusama-assethub-usdt", @@ -21,6 +77,13 @@ Array [ ] `; +exports[`Wallet with XCM config should return valid Kusama calldata for Karura -> Basilisk BSX [bsx] transfer 1`] = ` +Array [ + "karura-basilisk-bsx", + "0xfc043600050b000010a5d4e8000000000000000000000003010200a9200100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d00", +] +`; + exports[`Wallet with XCM config should return valid Kusama calldata for Karura -> Kusama KSM [ksm] transfer 1`] = ` Array [ "karura-kusama-ksm", @@ -35,6 +98,13 @@ Array [ ] `; +exports[`Wallet with XCM config should return valid Kusama calldata for Kusama -> Basilisk KSM [ksm] transfer 1`] = ` +Array [ + "kusama-basilisk-ksm", + "0xfc04630803000100a9200300010100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d030400000000070010a5d4e80000000000", +] +`; + exports[`Wallet with XCM config should return valid Kusama calldata for Kusama -> Karura KSM [ksm] transfer 1`] = ` Array [ "kusama-karura-ksm", @@ -42,6 +112,20 @@ Array [ ] `; +exports[`Wallet with XCM config should return valid Kusama calldata for Robonomics -> Basilisk XRT [xrt] transfer 1`] = ` +Array [ + "robonomics-basilisk-xrt", + "0xf404470803010100a9200300010100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d03040000000002286bee0000000000", +] +`; + +exports[`Wallet with XCM config should return valid Kusama calldata for Tinkernet -> Basilisk TNKR [tnkr] transfer 1`] = ` +Array [ + "tinkernet-basilisk-tnkr", + "0x0101045c00000000000010a5d4e8000000000000000000000003010200a9200100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d00", +] +`; + exports[`Wallet with XCM config should return valid Polkadot calldata for Acala -> Hydration ACA [aca] transfer 1`] = ` Array [ "acala-hydration-aca", @@ -157,7 +241,7 @@ Array [ exports[`Wallet with XCM config should return valid Polkadot calldata for AssetHub -> Moonbeam PINK [pink] transfer 1`] = ` Array [ "assethub-moonbeam-pink", - "0x1101041f0803010100511f0300010300000000000000000000000000000000000000000003080000020432055c000700e40b5402000002043205011f00c2d401000100000000", + "0x1101041f0803010100511f0300010300000000000000000000000000000000000000000003080000020432055c000700e40b5402000002043205011f00c22709000100000000", ] `; @@ -280,6 +364,13 @@ Array [ ] `; +exports[`Wallet with XCM config should return valid Polkadot calldata for Ethereum -> Hydration AAVE [aave] transfer 1`] = ` +Array [ + "ethereum-hydration-aave", + "0x520548340000000000000000000000007fc66500c84a76ad7e9c93437bfc5ac33e2ddae900000000000000000000000000000000000000000000000000000000000007f200000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000005f5e1000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000020d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d", +] +`; + exports[`Wallet with XCM config should return valid Polkadot calldata for Ethereum -> Hydration DAI [dai] transfer 1`] = ` Array [ "ethereum-hydration-dai", @@ -315,6 +406,13 @@ Array [ ] `; +exports[`Wallet with XCM config should return valid Polkadot calldata for Ethereum -> Hydration sUSDe [susde] transfer 1`] = ` +Array [ + "ethereum-hydration-susde", + "0x520548340000000000000000000000009d39a5de30e57443bff2a8307a4256c8797a349700000000000000000000000000000000000000000000000000000000000007f200000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000005f5e1000000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000020d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d", +] +`; + exports[`Wallet with XCM config should return valid Polkadot calldata for Hydration -> Acala ACA [aca] transfer 1`] = ` Array [ "hydration-acala-aca", @@ -469,6 +567,13 @@ Array [ ] `; +exports[`Wallet with XCM config should return valid Polkadot calldata for Hydration -> Ethereum AAVE [aave] transfer 1`] = ` +Array [ + "hydration-ethereum-aave", + "0x1d03046b0d04010100a10f040801000007641212150f020209070403007fc66500c84a76ad7e9c93437bfc5ac33e2ddae90013000064a7b3b6e00d0204010002040816040d010000010100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d100101020209070403007fc66500c84a76ad7e9c93437bfc5ac33e2ddae90002010907040813000103007fc66500c84a76ad7e9c93437bfc5ac33e2ddae90004000d01020400010300000000000000000000000000000000000000000000", +] +`; + exports[`Wallet with XCM config should return valid Polkadot calldata for Hydration -> Ethereum DAI [dai_mwh] transfer 1`] = ` Array [ "hydration-ethereum-dai_mwh", @@ -504,6 +609,13 @@ Array [ ] `; +exports[`Wallet with XCM config should return valid Polkadot calldata for Hydration -> Ethereum sUSDe [susde] transfer 1`] = ` +Array [ + "hydration-ethereum-susde", + "0x1d03046b0d04010100a10f040801000007641212150f020209070403009d39a5de30e57443bff2a8307a4256c8797a34970013000064a7b3b6e00d0204010002040816040d010000010100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d100101020209070403009d39a5de30e57443bff2a8307a4256c8797a34970002010907040813000103009d39a5de30e57443bff2a8307a4256c8797a34970004000d01020400010300000000000000000000000000000000000000000000", +] +`; + exports[`Wallet with XCM config should return valid Polkadot calldata for Hydration -> Interlay DOT [dot] transfer 1`] = ` Array [ "hydration-interlay-dot", @@ -602,13 +714,6 @@ Array [ ] `; -exports[`Wallet with XCM config should return valid Polkadot calldata for Hydration -> Nodle NODL [nodl] transfer 1`] = ` -Array [ - "hydration-nodle-nodl", - "0x01010489001a00000000e8764817000000000000000000000003010200a91f0100d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d00", -] -`; - exports[`Wallet with XCM config should return valid Polkadot calldata for Hydration -> Pendulum PEN [pen] transfer 1`] = ` Array [ "hydration-pendulum-pen", diff --git a/integration-tests/xcm-test/src/call.spec.ts b/integration-tests/xcm-test/src/call.spec.ts index 87fcf3e9..739f6773 100644 --- a/integration-tests/xcm-test/src/call.spec.ts +++ b/integration-tests/xcm-test/src/call.spec.ts @@ -12,7 +12,7 @@ const { configService, init } = setup; const { runXcm } = xcm; const getPolkadotChains = () => { - const blacklist: string[] = ['acala-evm']; + const blacklist: string[] = ['acala-evm', 'nodle']; const chains = Array.from(configService.chains.values()) .filter( (c) => @@ -28,7 +28,7 @@ const getPolkadotChains = () => { }; const getKusamaChains = () => { - const blacklist: string[] = ['basilisk']; + const blacklist: string[] = []; const chains = Array.from(configService.chains.values()) .filter((c) => c.ecosystem === ChainEcosystem.Kusama) .filter((c) => !blacklist.includes(c.key)); diff --git a/integration-tests/xcm-test/src/mock/xcm.ts b/integration-tests/xcm-test/src/mock/xcm.ts index 771667b2..676ac34e 100644 --- a/integration-tests/xcm-test/src/mock/xcm.ts +++ b/integration-tests/xcm-test/src/mock/xcm.ts @@ -37,10 +37,15 @@ export const runXcm = ( const key = getRouteKey(chain, route); - const transfer = await getTransfer(wallet, chain, route); - const { data } = await transfer.buildCall(TRANSFER_AMOUNT); - - expect([key, data]).toMatchSnapshot(); + try { + const transfer = await getTransfer(wallet, chain, route); + const { data } = await transfer.buildCall(TRANSFER_AMOUNT); + expect([key, data]).toMatchSnapshot(); + } catch (e) { + const error = e as Error; + console.log('Ups, something went wrong...', error.message); + return; + } }, 1 * 60 * 1000 ); From 2863da1ae52c5da5c3582becc469d092178b3966 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Thu, 28 Nov 2024 18:57:54 +0100 Subject: [PATCH 07/21] fix snowbridge dest fee balance --- packages/xcm-cfg/src/configs/ethereum/templates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/xcm-cfg/src/configs/ethereum/templates.ts b/packages/xcm-cfg/src/configs/ethereum/templates.ts index 7755eaec..273992f8 100644 --- a/packages/xcm-cfg/src/configs/ethereum/templates.ts +++ b/packages/xcm-cfg/src/configs/ethereum/templates.ts @@ -56,7 +56,7 @@ export function toHydrationViaSnowbridgeTemplate( balance: BalanceBuilder().evm().native(), }, destinationFee: { - balance: BalanceBuilder().evm().erc20(), + balance: BalanceBuilder().evm().native(), }, }, destination: { From fd96a7ea4a37acfd61fc72d840cc72d13cbcf2c8 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Thu, 28 Nov 2024 18:58:03 +0100 Subject: [PATCH 08/21] export tags --- packages/xcm-cfg/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/xcm-cfg/src/index.ts b/packages/xcm-cfg/src/index.ts index 90f90df7..f91a0e76 100644 --- a/packages/xcm-cfg/src/index.ts +++ b/packages/xcm-cfg/src/index.ts @@ -6,5 +6,6 @@ export { validations } from './validations'; export * as builders from './builders'; export * as clients from './clients'; export * as utils from './utils'; +export * as tags from './tags'; export { HydrationConfigService } from './configs/HydrationConfigService'; From 002619f51b9544571a895fa6368dc189111625fc Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Thu, 28 Nov 2024 18:58:14 +0100 Subject: [PATCH 09/21] update lock --- package-lock.json | 372 +++++++++++++++++++++++++++++----------------- 1 file changed, 234 insertions(+), 138 deletions(-) diff --git a/package-lock.json b/package-lock.json index 90a0b2e6..6d11915c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -169,6 +169,7 @@ "integration-tests/xcm-test": { "dependencies": { "@galacticcouncil/xcm-cfg": "^5.5.0", + "@galacticcouncil/xcm-core": "^5.4.0", "@galacticcouncil/xcm-sdk": "^7.0.0" }, "devDependencies": { @@ -2758,11 +2759,11 @@ } }, "node_modules/@noble/curves": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", - "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.7.0.tgz", + "integrity": "sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==", "dependencies": { - "@noble/hashes": "1.5.0" + "@noble/hashes": "1.6.0" }, "engines": { "node": "^14.21.3 || >=16" @@ -2771,10 +2772,21 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@noble/curves/node_modules/@noble/hashes": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.0.tgz", + "integrity": "sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ==", + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@noble/hashes": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", - "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.6.1.tgz", + "integrity": "sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==", "engines": { "node": "^14.21.3 || >=16" }, @@ -3947,9 +3959,9 @@ } }, "node_modules/@scure/base": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", - "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.1.tgz", + "integrity": "sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ==", "funding": { "url": "https://paulmillr.com/funding/" } @@ -3968,6 +3980,42 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@scure/bip32/node_modules/@noble/curves": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", + "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", + "peer": true, + "dependencies": { + "@noble/hashes": "1.5.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@noble/hashes": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip32/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "peer": true, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@scure/bip39": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.4.0.tgz", @@ -3981,6 +4029,27 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@scure/bip39/node_modules/@noble/hashes": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@scure/bip39/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "peer": true, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@sinclair/typebox": { "version": "0.24.51", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.51.tgz", @@ -4033,9 +4102,9 @@ "optional": true }, "node_modules/@substrate/connect-known-chains": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/@substrate/connect-known-chains/-/connect-known-chains-1.7.0.tgz", - "integrity": "sha512-Qf+alxEPmNycUyrPkXWrlFA97punnBCGxSWqiLG1CNu+jQoFYqi8x7gZYfqmdUHDY4nG1F84KHPPk7Zy4ngSfg==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@substrate/connect-known-chains/-/connect-known-chains-1.8.0.tgz", + "integrity": "sha512-sl7WfeDgnZuPvUl5Xw0XIziOTe8rEBJ3uugyDETGnafxEbjYMv5aJL0ilq5djhnQ7l9OuMJCN3Ckved2yINeeQ==", "optional": true }, "node_modules/@substrate/light-client-extension-helpers": { @@ -4071,9 +4140,9 @@ } }, "node_modules/@thi.ng/api": { - "version": "8.11.12", - "resolved": "https://registry.npmjs.org/@thi.ng/api/-/api-8.11.12.tgz", - "integrity": "sha512-qSOeCu1unXFF3NRQFEqdxgMlSAty/4G58rhjugW7IVEP/N8kuKuzfqxYrHRsZ3k1G8b/UtxSUBqgYH2OmLnbsw==", + "version": "8.11.13", + "resolved": "https://registry.npmjs.org/@thi.ng/api/-/api-8.11.13.tgz", + "integrity": "sha512-/BI1M8dIazn/6TJbV4v9lQ6KhswObw2xpcZ5FlAa2sZgiOdvSvYxeLr5NzUGWbs8O/bWRSQNU7dv2e12Yrpjfw==", "funding": [ { "type": "github", @@ -4089,9 +4158,9 @@ } }, "node_modules/@thi.ng/arrays": { - "version": "2.10.5", - "resolved": "https://registry.npmjs.org/@thi.ng/arrays/-/arrays-2.10.5.tgz", - "integrity": "sha512-SysSABBUMTK28wDwbfgdF/J5Q9k/4EQOcQE4D+7M7khGKn0Eae14APGX3lT0yfVKiTRQlFNzYDM133N4lWRw+A==", + "version": "2.10.6", + "resolved": "https://registry.npmjs.org/@thi.ng/arrays/-/arrays-2.10.6.tgz", + "integrity": "sha512-lRYu0f3TO1VCqenmLLpNgGWBgkNks+7JdBa3G+JOgqOO54fFaBPBEuiMC7ENV2gs6VPgIDJKvXTfaEfsO4Ec1Q==", "funding": [ { "type": "github", @@ -4103,21 +4172,21 @@ } ], "dependencies": { - "@thi.ng/api": "^8.11.12", - "@thi.ng/checks": "^3.6.14", - "@thi.ng/compare": "^2.4.4", - "@thi.ng/equiv": "^2.1.68", - "@thi.ng/errors": "^2.5.18", - "@thi.ng/random": "^4.1.3" + "@thi.ng/api": "^8.11.13", + "@thi.ng/checks": "^3.6.15", + "@thi.ng/compare": "^2.4.5", + "@thi.ng/equiv": "^2.1.69", + "@thi.ng/errors": "^2.5.19", + "@thi.ng/random": "^4.1.4" }, "engines": { "node": ">=18" } }, "node_modules/@thi.ng/cache": { - "version": "2.3.13", - "resolved": "https://registry.npmjs.org/@thi.ng/cache/-/cache-2.3.13.tgz", - "integrity": "sha512-QU/9igLKkP0587LAJ5Lkd37zSiS5wrfn1JI9epSh+UkbUZByUPC7unuBcrqTaVbuloqS1lYd2rajaUaIYmkaVQ==", + "version": "2.3.14", + "resolved": "https://registry.npmjs.org/@thi.ng/cache/-/cache-2.3.14.tgz", + "integrity": "sha512-ZuUMP7jJZip/a9YYMgijWLoYIervpqfdvBE0ijGGhTGnwm6alvY5xSKFZe/oSaGPKmi5xauvmAR6L/Mpg98fAg==", "funding": [ { "type": "github", @@ -4129,17 +4198,17 @@ } ], "dependencies": { - "@thi.ng/api": "^8.11.12", - "@thi.ng/dcons": "^3.2.132" + "@thi.ng/api": "^8.11.13", + "@thi.ng/dcons": "^3.2.133" }, "engines": { "node": ">=18" } }, "node_modules/@thi.ng/checks": { - "version": "3.6.14", - "resolved": "https://registry.npmjs.org/@thi.ng/checks/-/checks-3.6.14.tgz", - "integrity": "sha512-2z/XbdoTyPfQivc9Fga3kHLOv0PkGsahnbFjYmKV/xHyuK0lo2jZBNn1iaVsx42eiv5pxK7BTxx4AcaW4Mwm2Q==", + "version": "3.6.15", + "resolved": "https://registry.npmjs.org/@thi.ng/checks/-/checks-3.6.15.tgz", + "integrity": "sha512-Tk7ktk5IFXImEbnI/mGF+tSL8mUuS23EWz0D1xwJE0bC6WIUyXAfbj35CBQ3ycZ+yycR3Co0jxNQASZ0ohiEdQ==", "funding": [ { "type": "github", @@ -4151,16 +4220,16 @@ } ], "dependencies": { - "tslib": "^2.7.0" + "tslib": "^2.8.1" }, "engines": { "node": ">=18" } }, "node_modules/@thi.ng/compare": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/@thi.ng/compare/-/compare-2.4.4.tgz", - "integrity": "sha512-QPkjdgzOFcGwLI171kBQftN2895EHXJGujhS0Mf9Jwp2DogyDDwDgjJVQXkq7V5Ls1mPjbVgkk/tIXBwURsHyg==", + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/@thi.ng/compare/-/compare-2.4.5.tgz", + "integrity": "sha512-bEzLPQo3D2KE4/Xw9XN9NvxJQ2lTwGyIfXg+dXS49imbLpGVWoZPyNzV2mcJ2HlZQ8a/7AQyaECgpXQLtyFaVQ==", "funding": [ { "type": "github", @@ -4172,16 +4241,16 @@ } ], "dependencies": { - "@thi.ng/api": "^8.11.12" + "@thi.ng/api": "^8.11.13" }, "engines": { "node": ">=18" } }, "node_modules/@thi.ng/compose": { - "version": "3.0.15", - "resolved": "https://registry.npmjs.org/@thi.ng/compose/-/compose-3.0.15.tgz", - "integrity": "sha512-CIDDdTp7w2sqDpsiFJIXn1nf0dqBBZTkT9CNIVWy4QlCVGwgI6KmZb3raNlZrE2sTeHJkjPRX/gFdPNizlPisA==", + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/@thi.ng/compose/-/compose-3.0.16.tgz", + "integrity": "sha512-AKmkGHVUFH8guoWa09DdZ6SME3jT8g/wfGlpdMmHABd2pgdqKxhYxHiEi0yPA/ORjfYTxLyzSRWcdcoT6TjAaQ==", "funding": [ { "type": "github", @@ -4193,17 +4262,17 @@ } ], "dependencies": { - "@thi.ng/api": "^8.11.12", - "@thi.ng/errors": "^2.5.18" + "@thi.ng/api": "^8.11.13", + "@thi.ng/errors": "^2.5.19" }, "engines": { "node": ">=18" } }, "node_modules/@thi.ng/dcons": { - "version": "3.2.132", - "resolved": "https://registry.npmjs.org/@thi.ng/dcons/-/dcons-3.2.132.tgz", - "integrity": "sha512-2poQwcPYBcY8Zcx2OoJ6ip83DMMm538/cysFBCx1fY3Th2FKvGdOZYboQmgFS4JShQRhtlEgrniFu+X+PGRM+g==", + "version": "3.2.133", + "resolved": "https://registry.npmjs.org/@thi.ng/dcons/-/dcons-3.2.133.tgz", + "integrity": "sha512-X4pmhO9aOZdq3yIFcYakOQVpVNrUTBhWZEEMwm0YaRueO63REmQYB6tTIlpyriEXiAWZwZipWMN9eYZZbqjz3A==", "funding": [ { "type": "github", @@ -4215,22 +4284,22 @@ } ], "dependencies": { - "@thi.ng/api": "^8.11.12", - "@thi.ng/checks": "^3.6.14", - "@thi.ng/compare": "^2.4.4", - "@thi.ng/equiv": "^2.1.68", - "@thi.ng/errors": "^2.5.18", - "@thi.ng/random": "^4.1.3", - "@thi.ng/transducers": "^9.2.8" + "@thi.ng/api": "^8.11.13", + "@thi.ng/checks": "^3.6.15", + "@thi.ng/compare": "^2.4.5", + "@thi.ng/equiv": "^2.1.69", + "@thi.ng/errors": "^2.5.19", + "@thi.ng/random": "^4.1.4", + "@thi.ng/transducers": "^9.2.9" }, "engines": { "node": ">=18" } }, "node_modules/@thi.ng/equiv": { - "version": "2.1.68", - "resolved": "https://registry.npmjs.org/@thi.ng/equiv/-/equiv-2.1.68.tgz", - "integrity": "sha512-N/NNqr15DITptVW9GWTcjfF3jCLk7MArGJhhob0bXc2GMGyIJtVNQK+FHU1ycczo3qyhsG+NrCXjj5ZyeKexPQ==", + "version": "2.1.69", + "resolved": "https://registry.npmjs.org/@thi.ng/equiv/-/equiv-2.1.69.tgz", + "integrity": "sha512-HCE/mwlVsag0SddWTQWS/WEHWMxMYOpo9ysUUGjhvRUXsHhSgBRBdui0YJX8+vP704HXMCiqzla3bi8cYirf+g==", "funding": [ { "type": "github", @@ -4246,9 +4315,9 @@ } }, "node_modules/@thi.ng/errors": { - "version": "2.5.18", - "resolved": "https://registry.npmjs.org/@thi.ng/errors/-/errors-2.5.18.tgz", - "integrity": "sha512-9/r4yjhpeuQr4lDWOkrXAc57DWKBB9Vl15zBdkYjbIcsqpjw8o/B6Cqqtiw5lR6NQrXdGxrscxXNjphdwQ1m6A==", + "version": "2.5.19", + "resolved": "https://registry.npmjs.org/@thi.ng/errors/-/errors-2.5.19.tgz", + "integrity": "sha512-3+agBHA+jPM90BLj+wmptHZGGl6yMT+MYEbeTFWMDZuDBVhtzreQsLjYCRa3elZt8LMqTWcCTURmgLO7bJRQMQ==", "funding": [ { "type": "github", @@ -4264,9 +4333,9 @@ } }, "node_modules/@thi.ng/math": { - "version": "5.11.12", - "resolved": "https://registry.npmjs.org/@thi.ng/math/-/math-5.11.12.tgz", - "integrity": "sha512-PSLAJb4gCP0jqn/RzTEZRzg53kvDmEgWWXHXyZNtaNsMx22epQYZx3UD3hfoLF3YB/VmQ9ePXYmGntS2rDBMjA==", + "version": "5.11.13", + "resolved": "https://registry.npmjs.org/@thi.ng/math/-/math-5.11.13.tgz", + "integrity": "sha512-Df03PMfpnlUB6vfVf4K3NM4BIzhE2npW/6HYtuuuJ+mGGzlD4nxiwpnhAqsG7Fih9PgyKg9bosKHomm6LHHSmA==", "funding": [ { "type": "github", @@ -4278,16 +4347,16 @@ } ], "dependencies": { - "@thi.ng/api": "^8.11.12" + "@thi.ng/api": "^8.11.13" }, "engines": { "node": ">=18" } }, "node_modules/@thi.ng/memoize": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@thi.ng/memoize/-/memoize-4.0.2.tgz", - "integrity": "sha512-PuYKQ6qDRwEahTX2mpT18j5+qE7QPBw0KRKWA6fdUPtif4nzkpk5N1tYy9P1/oMEww5FAY5FhAnCQqFB1jg6gw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@thi.ng/memoize/-/memoize-4.0.3.tgz", + "integrity": "sha512-J/aBY19TfUwzRArylqxsVyEsxoPi20AGGkuP6lqRKzkh+f/XYQ1uNoyO3JiAmCT2G21h0UDT0vgzDEWgIZcIyw==", "funding": [ { "type": "github", @@ -4299,16 +4368,16 @@ } ], "dependencies": { - "@thi.ng/api": "^8.11.12" + "@thi.ng/api": "^8.11.13" }, "engines": { "node": ">=18" } }, "node_modules/@thi.ng/random": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@thi.ng/random/-/random-4.1.3.tgz", - "integrity": "sha512-horF/PSUUwzrQRY0/VBNL1EULj35R2ZoLxzusJj53FkT9B3v2OMNdONp7zVxfhiGpJGdR8pzmIZIvLJ1vG83Cw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@thi.ng/random/-/random-4.1.4.tgz", + "integrity": "sha512-a4FwyIGAJEgJHMfi4+ymdrhUtdFRwHyUa0Tam93Tx3iz3Ngsceo+tvyxuG3j56xOo6TUJSQdP+x+LuvoVmQqxA==", "funding": [ { "type": "github", @@ -4320,17 +4389,17 @@ } ], "dependencies": { - "@thi.ng/api": "^8.11.12", - "@thi.ng/errors": "^2.5.18" + "@thi.ng/api": "^8.11.13", + "@thi.ng/errors": "^2.5.19" }, "engines": { "node": ">=18" } }, "node_modules/@thi.ng/transducers": { - "version": "9.2.8", - "resolved": "https://registry.npmjs.org/@thi.ng/transducers/-/transducers-9.2.8.tgz", - "integrity": "sha512-C+Ij+KjANGqBHKzVjr6IOuRTdftQYP9jzZtxMQBLPU3eicLKD//MKQRidPXBysL+ZfTMhRZDYN9KDnoYpskW4Q==", + "version": "9.2.9", + "resolved": "https://registry.npmjs.org/@thi.ng/transducers/-/transducers-9.2.9.tgz", + "integrity": "sha512-6ZR7Inc8qDSmTuPhSxUQCLPb2VrKRUfiBFeuxXxcUZwdayHbxMyQdbUw5vH2R4D3JIkhim7St+4LkMMiBoNruQ==", "funding": [ { "type": "github", @@ -4342,14 +4411,14 @@ } ], "dependencies": { - "@thi.ng/api": "^8.11.12", - "@thi.ng/arrays": "^2.10.5", - "@thi.ng/checks": "^3.6.14", - "@thi.ng/compare": "^2.4.4", - "@thi.ng/compose": "^3.0.15", - "@thi.ng/errors": "^2.5.18", - "@thi.ng/math": "^5.11.12", - "@thi.ng/random": "^4.1.3" + "@thi.ng/api": "^8.11.13", + "@thi.ng/arrays": "^2.10.6", + "@thi.ng/checks": "^3.6.15", + "@thi.ng/compare": "^2.4.5", + "@thi.ng/compose": "^3.0.16", + "@thi.ng/errors": "^2.5.19", + "@thi.ng/math": "^5.11.13", + "@thi.ng/random": "^4.1.4" }, "engines": { "node": ">=18" @@ -4493,11 +4562,11 @@ } }, "node_modules/@types/node": { - "version": "22.9.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.1.tgz", - "integrity": "sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==", + "version": "22.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", + "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", "dependencies": { - "undici-types": "~6.19.8" + "undici-types": "~6.20.0" } }, "node_modules/@types/prettier": { @@ -4816,9 +4885,9 @@ } }, "node_modules/axios": { - "version": "1.7.7", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", - "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.8.tgz", + "integrity": "sha512-Uu0wb7KNqK2t5K+YQyVCLM76prD5sRFjKHbJYCP1J7JFGEQ6nN7HWn9+04LAeiJ3ji54lgS/gZCH1oxyrf1SPw==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -5256,9 +5325,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001680", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001680.tgz", - "integrity": "sha512-rPQy70G6AGUMnbwS1z6Xg+RkHYPAi18ihs47GH0jcxIG7wArmPgY3XbS2sRdBbxJljp3thdT8BIqv9ccCypiPA==", + "version": "1.0.30001684", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001684.tgz", + "integrity": "sha512-G1LRwLIQjBQoyq0ZJGqGIJUXzJ8irpbjHLpVRXDvBEScFJ9b17sgK6vlx0GAJFE21okD7zXl08rRRUfq6HdoEQ==", "dev": true, "funding": [ { @@ -5786,9 +5855,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.5.63", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.63.tgz", - "integrity": "sha512-ddeXKuY9BHo/mw145axlyWjlJ1UBt4WK3AlvkT7W2AbqfRQoacVoRUCF6wL3uIx/8wT9oLKXzI+rFqHHscByaA==", + "version": "1.5.66", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.66.tgz", + "integrity": "sha512-pI2QF6+i+zjPbqRzJwkMvtvkdI7MjVbSh2g8dlMguDJIXEPw+kwasS1Jl+YGPEBfGVxsVgGUratAKymPdPo2vQ==", "dev": true, "peer": true }, @@ -8976,9 +9045,9 @@ "dev": true }, "node_modules/package-manager-detector": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.4.tgz", - "integrity": "sha512-H/OUu9/zUfP89z1APcBf2X8Us0tt8dUK4lUmKqz12QNXif3DxAs1/YqjGtcutZi1zQqeNQRWr9C+EbQnnvSSFA==", + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-0.2.5.tgz", + "integrity": "sha512-3dS7y28uua+UDbRCLBqltMBrbI+A5U2mI9YuxHRxIWYmLj3DwntEBmERYzIAQ4DMeuCUOBSak7dBHHoXKpOTYQ==", "dev": true }, "node_modules/parse-json": { @@ -9234,9 +9303,9 @@ } }, "node_modules/prettier": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", - "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.1.tgz", + "integrity": "sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -10873,26 +10942,26 @@ } }, "node_modules/turbo": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/turbo/-/turbo-2.3.0.tgz", - "integrity": "sha512-/uOq5o2jwRPyaUDnwBpOR5k9mQq4c3wziBgWNWttiYQPmbhDtrKYPRBxTvA2WpgQwRIbt8UM612RMN8n/TvmHA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/turbo/-/turbo-2.3.3.tgz", + "integrity": "sha512-DUHWQAcC8BTiUZDRzAYGvpSpGLiaOQPfYXlCieQbwUvmml/LRGIe3raKdrOPOoiX0DYlzxs2nH6BoWJoZrj8hA==", "dev": true, "bin": { "turbo": "bin/turbo" }, "optionalDependencies": { - "turbo-darwin-64": "2.3.0", - "turbo-darwin-arm64": "2.3.0", - "turbo-linux-64": "2.3.0", - "turbo-linux-arm64": "2.3.0", - "turbo-windows-64": "2.3.0", - "turbo-windows-arm64": "2.3.0" + "turbo-darwin-64": "2.3.3", + "turbo-darwin-arm64": "2.3.3", + "turbo-linux-64": "2.3.3", + "turbo-linux-arm64": "2.3.3", + "turbo-windows-64": "2.3.3", + "turbo-windows-arm64": "2.3.3" } }, "node_modules/turbo-darwin-64": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.3.0.tgz", - "integrity": "sha512-pji+D49PhFItyQjf2QVoLZw2d3oRGo8gJgKyOiRzvip78Rzie74quA8XNwSg/DuzM7xx6gJ3p2/LylTTlgZXxQ==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.3.3.tgz", + "integrity": "sha512-bxX82xe6du/3rPmm4aCC5RdEilIN99VUld4HkFQuw+mvFg6darNBuQxyWSHZTtc25XgYjQrjsV05888w1grpaA==", "cpu": [ "x64" ], @@ -10903,9 +10972,9 @@ ] }, "node_modules/turbo-darwin-arm64": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-2.3.0.tgz", - "integrity": "sha512-AJrGIL9BO41mwDF/IBHsNGwvtdyB911vp8f5mbNo1wG66gWTvOBg7WCtYQBvCo11XTenTfXPRSsAb7w3WAZb6w==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-2.3.3.tgz", + "integrity": "sha512-DYbQwa3NsAuWkCUYVzfOUBbSUBVQzH5HWUFy2Kgi3fGjIWVZOFk86ss+xsWu//rlEAfYwEmopigsPYSmW4X15A==", "cpu": [ "arm64" ], @@ -10916,9 +10985,9 @@ ] }, "node_modules/turbo-linux-64": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.3.0.tgz", - "integrity": "sha512-jZqW6vc2sPJT3M/3ZmV1Cg4ecQVPqsbHncG/RnogHpBu783KCSXIndgxvUQNm9qfgBYbZDBnP1md63O4UTElhw==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.3.3.tgz", + "integrity": "sha512-eHj9OIB0dFaP6BxB88jSuaCLsOQSYWBgmhy2ErCu6D2GG6xW3b6e2UWHl/1Ho9FsTg4uVgo4DB9wGsKa5erjUA==", "cpu": [ "x64" ], @@ -10929,9 +10998,9 @@ ] }, "node_modules/turbo-linux-arm64": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.3.0.tgz", - "integrity": "sha512-HUbDLJlvd/hxuyCNO0BmEWYQj0TugRMvSQeG8vHJH+Lq8qOgDAe7J0K73bFNbZejZQxW3C3XEiZFB3pnpO78+A==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.3.3.tgz", + "integrity": "sha512-NmDE/NjZoDj1UWBhMtOPmqFLEBKhzGS61KObfrDEbXvU3lekwHeoPvAMfcovzswzch+kN2DrtbNIlz+/rp8OCg==", "cpu": [ "arm64" ], @@ -10942,9 +11011,9 @@ ] }, "node_modules/turbo-windows-64": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.3.0.tgz", - "integrity": "sha512-c5rxrGNTYDWX9QeMzWLFE9frOXnKjHGEvQMp1SfldDlbZYsloX9UKs31TzUThzfTgTiz8NYuShaXJ2UvTMnV/g==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.3.3.tgz", + "integrity": "sha512-O2+BS4QqjK3dOERscXqv7N2GXNcqHr9hXumkMxDj/oGx9oCatIwnnwx34UmzodloSnJpgSqjl8iRWiY65SmYoQ==", "cpu": [ "x64" ], @@ -10955,9 +11024,9 @@ ] }, "node_modules/turbo-windows-arm64": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.3.0.tgz", - "integrity": "sha512-7qfUuYhfIVb1AZgs89DxhXK+zZez6O2ocmixEQ4hXZK7ytnBt5vaz2zGNJJKFNYIL5HX1C3tuHolnpNgDNCUIg==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.3.3.tgz", + "integrity": "sha512-dW4ZK1r6XLPNYLIKjC4o87HxYidtRRcBeo/hZ9Wng2XM/MqqYkAyzJXJGgRMsc0MMEN9z4+ZIfnSNBrA0b08ag==", "cpu": [ "arm64" ], @@ -11177,9 +11246,9 @@ } }, "node_modules/typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "devOptional": true, "bin": { "tsc": "bin/tsc", @@ -11190,9 +11259,9 @@ } }, "node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==" }, "node_modules/unique-filename": { "version": "1.1.1", @@ -11302,9 +11371,9 @@ "peer": true }, "node_modules/viem": { - "version": "2.21.48", - "resolved": "https://registry.npmjs.org/viem/-/viem-2.21.48.tgz", - "integrity": "sha512-/hBHyG1gdIIuiQv0z9YmzXl5eWJa0UCZGwkeuQzH2Bmg6FIEwZeEcxgiytXZydip+p2wMBFa1jdr7o5O1+mrIg==", + "version": "2.21.52", + "resolved": "https://registry.npmjs.org/viem/-/viem-2.21.52.tgz", + "integrity": "sha512-O53JhgVhp9CB0T3afy79O5ixNr8XXRGYQtlGYerzttnP56Oh2NBx4+Otz8IFd9N5DVPywf6tmYxHP1RVA99xJA==", "funding": [ { "type": "github", @@ -11332,6 +11401,33 @@ } } }, + "node_modules/viem/node_modules/@noble/curves": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.6.0.tgz", + "integrity": "sha512-TlaHRXDehJuRNR9TfZDNQ45mMEd5dwUwmicsafcIX4SsNiqnCHKjE/1alYPd/lDRVhxdhUAlv8uEhMCI5zjIJQ==", + "peer": true, + "dependencies": { + "@noble/hashes": "1.5.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/viem/node_modules/@noble/hashes": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.5.0.tgz", + "integrity": "sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA==", + "peer": true, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", From 72b13e06186d379578eeeef98ee5223e8c26f089 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Fri, 29 Nov 2024 10:41:43 +0100 Subject: [PATCH 10/21] fix testi ng acala evm --- examples/xcm-transfer/src/index.ts | 4 +- .../xcm-cfg/src/configs/polkadot/acala-evm.ts | 6 +-- .../src/configs/polkadot/hydration/index.ts | 52 +++++++++++++++++++ 3 files changed, 57 insertions(+), 5 deletions(-) diff --git a/examples/xcm-transfer/src/index.ts b/examples/xcm-transfer/src/index.ts index 010fc255..dda7b858 100644 --- a/examples/xcm-transfer/src/index.ts +++ b/examples/xcm-transfer/src/index.ts @@ -95,13 +95,13 @@ const xTransfer = await wallet.transfer( const status = await xTransfer.validate(); // Construct calldata with transfer amount -const fee: AssetAmount = await xTransfer.estimateFee('0.0001'); +const fee: AssetAmount = await xTransfer.estimateFee('0.1'); const feeInfo = [ 'Estimated fee:', fee.toDecimal(fee.decimals), fee.originSymbol, ].join(' '); -const call: XCall = await xTransfer.buildCall('0.0001'); +const call: XCall = await xTransfer.buildCall('0.1'); // Dump transfer info console.log(xTransfer); diff --git a/packages/xcm-cfg/src/configs/polkadot/acala-evm.ts b/packages/xcm-cfg/src/configs/polkadot/acala-evm.ts index 93d6511f..1c2685e1 100644 --- a/packages/xcm-cfg/src/configs/polkadot/acala-evm.ts +++ b/packages/xcm-cfg/src/configs/polkadot/acala-evm.ts @@ -1,6 +1,6 @@ import { AssetRoute, ChainRoutes } from '@galacticcouncil/xcm-core'; -import { aca, dai_awh } from '../../assets'; +import { aca, dai_awh, dai_mwh } from '../../assets'; import { hydration, moonbeam, acala_evm } from '../../chains'; import { BalanceBuilder, ContractBuilder } from '../../builders'; @@ -20,10 +20,10 @@ const toHydrationViaWormhole: AssetRoute[] = [ }, destination: { chain: hydration, - asset: dai_awh, + asset: dai_mwh, fee: { amount: 0, - asset: dai_awh, + asset: dai_mwh, }, }, contract: ContractBuilder() diff --git a/packages/xcm-cfg/src/configs/polkadot/hydration/index.ts b/packages/xcm-cfg/src/configs/polkadot/hydration/index.ts index 359281b5..77b5ff38 100644 --- a/packages/xcm-cfg/src/configs/polkadot/hydration/index.ts +++ b/packages/xcm-cfg/src/configs/polkadot/hydration/index.ts @@ -46,6 +46,7 @@ import { } from '../../../assets'; import { acala, + acala_evm, ajuna, assetHub, astar, @@ -67,6 +68,7 @@ import { zeitgeist, } from '../../../chains'; import { + ContractBuilder, ExtrinsicBuilder, ExtrinsicBuilderV4, XcmTransferType, @@ -79,6 +81,8 @@ import { toEthereumViaWormholeTemplate, toMoonbeamErc20Template, toZeitgeistErc20Template, + MRL_EXECUTION_FEE, + MRL_XCM_FEE, } from './templates'; const toAcala: AssetRoute[] = [ @@ -817,6 +821,53 @@ const toAjuna: AssetRoute[] = [ }), ]; +const toAcalaViaWormhole: AssetRoute[] = [ + new AssetRoute({ + source: { + asset: dai_mwh, + balance: balance(), + fee: fee(), + destinationFee: { + balance: balance(), + }, + }, + destination: { + chain: acala_evm, + asset: dai_awh, + fee: { + amount: 0.06, + asset: aca, + }, + }, + extrinsic: ExtrinsicBuilder() + .utility() + .batchAll([ + ExtrinsicBuilder().xTokens().transferMultiCurrencies(), + ExtrinsicBuilder().polkadotXcm().send().transact({ + fee: MRL_EXECUTION_FEE, + }), + ]), + transact: { + chain: moonbeam, + fee: { + amount: MRL_XCM_FEE, + asset: glmr, + balance: balance(), + }, + extrinsic: ExtrinsicBuilder() + .ethereumXcm() + .transact( + ContractBuilder() + .Batch() + .batchAll([ + ContractBuilder().Erc20().approve(), + ContractBuilder().Wormhole().TokenBridge().transferTokens(), + ]) + ), + }, + }), +]; + const toEthereumViaWormhole: AssetRoute[] = [ toEthereumViaWormholeTemplate(dai_mwh, dai), toEthereumViaWormholeTemplate(weth_mwh, eth), @@ -834,6 +885,7 @@ export const hydrationConfig = new ChainRoutes({ chain: hydration, routes: [ ...toAcala, + ...toAcalaViaWormhole, ...toAjuna, ...toAssetHub, ...toAstar, From 13ca792111e1a9a0f51d477688dfc7333ec9bd3c Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Fri, 29 Nov 2024 10:45:10 +0100 Subject: [PATCH 11/21] RELEASE: Releasing 1 package(s) Releases: @galacticcouncil/xcm-cfg@5.5.1 --- examples/sdk-cjs/package.json | 2 +- examples/xcm-transfer/package.json | 2 +- integration-tests/xcm-test/package.json | 2 +- package-lock.json | 9 ++++----- packages/xcm-cfg/CHANGELOG.md | 6 ++++++ packages/xcm-cfg/package.json | 2 +- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/examples/sdk-cjs/package.json b/examples/sdk-cjs/package.json index 8857ceb8..d95b596d 100644 --- a/examples/sdk-cjs/package.json +++ b/examples/sdk-cjs/package.json @@ -13,6 +13,6 @@ "dependencies": { "@galacticcouncil/sdk": "^5.0.1", "@galacticcouncil/xcm-sdk": "^7.0.0", - "@galacticcouncil/xcm-cfg": "^5.5.0" + "@galacticcouncil/xcm-cfg": "^5.5.1" } } diff --git a/examples/xcm-transfer/package.json b/examples/xcm-transfer/package.json index d56fd22d..d6b8bd2c 100644 --- a/examples/xcm-transfer/package.json +++ b/examples/xcm-transfer/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@galacticcouncil/sdk": "^5.0.1", - "@galacticcouncil/xcm-cfg": "^5.5.0", + "@galacticcouncil/xcm-cfg": "^5.5.1", "@galacticcouncil/xcm-sdk": "^7.0.0", "@talismn/connect-wallets": "^1.2.5" } diff --git a/integration-tests/xcm-test/package.json b/integration-tests/xcm-test/package.json index b11c5c02..2f889cac 100644 --- a/integration-tests/xcm-test/package.json +++ b/integration-tests/xcm-test/package.json @@ -18,7 +18,7 @@ "@acala-network/chopsticks-testing": "1.0.1" }, "dependencies": { - "@galacticcouncil/xcm-cfg": "^5.5.0", + "@galacticcouncil/xcm-cfg": "^5.5.1", "@galacticcouncil/xcm-sdk": "^7.0.0" } } diff --git a/package-lock.json b/package-lock.json index 6d11915c..d03b3c63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,7 +35,7 @@ "examples/sdk-cjs": { "dependencies": { "@galacticcouncil/sdk": "^5.0.1", - "@galacticcouncil/xcm-cfg": "^5.5.0", + "@galacticcouncil/xcm-cfg": "^5.5.1", "@galacticcouncil/xcm-sdk": "^7.0.0" }, "devDependencies": { @@ -105,7 +105,7 @@ "examples/xcm-transfer": { "dependencies": { "@galacticcouncil/sdk": "^5.0.1", - "@galacticcouncil/xcm-cfg": "^5.5.0", + "@galacticcouncil/xcm-cfg": "^5.5.1", "@galacticcouncil/xcm-sdk": "^7.0.0", "@talismn/connect-wallets": "^1.2.5" }, @@ -168,8 +168,7 @@ }, "integration-tests/xcm-test": { "dependencies": { - "@galacticcouncil/xcm-cfg": "^5.5.0", - "@galacticcouncil/xcm-core": "^5.4.0", + "@galacticcouncil/xcm-cfg": "^5.5.1", "@galacticcouncil/xcm-sdk": "^7.0.0" }, "devDependencies": { @@ -11722,7 +11721,7 @@ }, "packages/xcm-cfg": { "name": "@galacticcouncil/xcm-cfg", - "version": "5.5.0", + "version": "5.5.1", "dependencies": { "@galacticcouncil/xcm-core": "^5.4.0" } diff --git a/packages/xcm-cfg/CHANGELOG.md b/packages/xcm-cfg/CHANGELOG.md index 0d489fbb..c54837a8 100644 --- a/packages/xcm-cfg/CHANGELOG.md +++ b/packages/xcm-cfg/CHANGELOG.md @@ -1,5 +1,11 @@ # @galacticcouncil/xcm-cfg +## 5.5.1 + +### Patch Changes + +- Fix snowbridge dest fee balance config + ## 5.5.0 ### Minor Changes diff --git a/packages/xcm-cfg/package.json b/packages/xcm-cfg/package.json index 1ac73e45..9586e0c9 100644 --- a/packages/xcm-cfg/package.json +++ b/packages/xcm-cfg/package.json @@ -1,6 +1,6 @@ { "name": "@galacticcouncil/xcm-cfg", - "version": "5.5.0", + "version": "5.5.1", "description": "Cross-chain hydradx & basilisk dapp configuration", "author": "GalacticCouncil", "repository": { From 3fbf1dde455a166ef8516a9641d27989a49b8e6f Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Sun, 1 Dec 2024 14:14:05 +0100 Subject: [PATCH 12/21] update xcm tests --- integration-tests/xcm-test/package.json | 4 +- .../xcm-test/src/__db__/metadata.db.json | 666 ++++++++++++++++++ .../src/__snapshots__/e2e.spec.ts.snap | 581 +++++++++++++++ integration-tests/xcm-test/src/call.spec.ts | 25 +- .../src/{mock => ctx/call}/account.ts | 0 .../xcm-test/src/{mock => ctx/call}/amount.ts | 0 .../xcm-test/src/{mock => ctx/call}/index.ts | 0 .../xcm-test/src/{mock => ctx/call}/setup.ts | 0 .../xcm-test/src/{mock => ctx/call}/xcm.ts | 2 +- .../xcm-test/src/{ => ctx}/e2e/account.ts | 0 .../xcm-test/src/{ => ctx}/e2e/amount.ts | 0 .../xcm-test/src/{ => ctx}/e2e/events.ts | 2 +- .../xcm-test/src/{ => ctx}/e2e/hooks/index.ts | 0 .../src/{ => ctx}/e2e/hooks/moonbeam.ts | 2 +- .../xcm-test/src/{ => ctx}/e2e/index.ts | 0 .../xcm-test/src/{ => ctx}/e2e/network.ts | 0 .../xcm-test/src/{ => ctx}/e2e/setup.ts | 0 .../xcm-test/src/{ => ctx}/e2e/storage.ts | 62 +- .../xcm-test/src/{ => ctx}/e2e/types.ts | 0 .../xcm-test/src/{ => ctx}/e2e/xcm.ts | 26 +- .../xcm-test/src/{ => ctx}/e2e/xcm.utils.ts | 0 integration-tests/xcm-test/src/e2e.spec.ts | 34 +- integration-tests/xcm-test/src/exec.spec.ts | 103 +++ integration-tests/xcm-test/src/utils/cmd.ts | 13 + .../xcm-test/src/{ => utils}/file.ts | 2 +- integration-tests/xcm-test/src/utils/json.ts | 14 + .../xcm-test/src/{utils.ts => utils/route.ts} | 17 - 27 files changed, 1484 insertions(+), 69 deletions(-) create mode 100644 integration-tests/xcm-test/src/__db__/metadata.db.json rename integration-tests/xcm-test/src/{mock => ctx/call}/account.ts (100%) rename integration-tests/xcm-test/src/{mock => ctx/call}/amount.ts (100%) rename integration-tests/xcm-test/src/{mock => ctx/call}/index.ts (100%) rename integration-tests/xcm-test/src/{mock => ctx/call}/setup.ts (100%) rename integration-tests/xcm-test/src/{mock => ctx/call}/xcm.ts (98%) rename integration-tests/xcm-test/src/{ => ctx}/e2e/account.ts (100%) rename integration-tests/xcm-test/src/{ => ctx}/e2e/amount.ts (100%) rename integration-tests/xcm-test/src/{ => ctx}/e2e/events.ts (97%) rename integration-tests/xcm-test/src/{ => ctx}/e2e/hooks/index.ts (100%) rename integration-tests/xcm-test/src/{ => ctx}/e2e/hooks/moonbeam.ts (97%) rename integration-tests/xcm-test/src/{ => ctx}/e2e/index.ts (100%) rename integration-tests/xcm-test/src/{ => ctx}/e2e/network.ts (100%) rename integration-tests/xcm-test/src/{ => ctx}/e2e/setup.ts (100%) rename integration-tests/xcm-test/src/{ => ctx}/e2e/storage.ts (68%) rename integration-tests/xcm-test/src/{ => ctx}/e2e/types.ts (100%) rename integration-tests/xcm-test/src/{ => ctx}/e2e/xcm.ts (91%) rename integration-tests/xcm-test/src/{ => ctx}/e2e/xcm.utils.ts (100%) create mode 100644 integration-tests/xcm-test/src/exec.spec.ts create mode 100644 integration-tests/xcm-test/src/utils/cmd.ts rename integration-tests/xcm-test/src/{ => utils}/file.ts (94%) create mode 100644 integration-tests/xcm-test/src/utils/json.ts rename integration-tests/xcm-test/src/{utils.ts => utils/route.ts} (57%) diff --git a/integration-tests/xcm-test/package.json b/integration-tests/xcm-test/package.json index 2f889cac..090d8beb 100644 --- a/integration-tests/xcm-test/package.json +++ b/integration-tests/xcm-test/package.json @@ -11,8 +11,8 @@ ], "scripts": { "test:call": "jest call.spec.ts", - "test:call:update": "jest --updateSnapshot call.spec.ts", - "test:e2e": "jest e2e.spec.ts" + "test:e2e": "jest --forceExit e2e.spec.ts", + "test:exec": "jest --forceExit exec.spec.ts" }, "devDependencies": { "@acala-network/chopsticks-testing": "1.0.1" diff --git a/integration-tests/xcm-test/src/__db__/metadata.db.json b/integration-tests/xcm-test/src/__db__/metadata.db.json new file mode 100644 index 00000000..334628b4 --- /dev/null +++ b/integration-tests/xcm-test/src/__db__/metadata.db.json @@ -0,0 +1,666 @@ +{ + "acala-hydration-aca": { + "updated": 1733052045002, + "destination": { + "fee": "0.008078835878", + "feeAsset": "ACA", + "feeNative": "8078835878" + } + }, + "acala-hydration-ldot": { + "updated": 1733052058146, + "destination": { + "fee": "0.0008920718", + "feeAsset": "LDOT", + "feeNative": "8920718" + } + }, + "ajuna-hydration-ajun": { + "updated": 1733052065923, + "destination": { + "fee": "0.000067081566", + "feeAsset": "AJUN", + "feeNative": "67081566" + } + }, + "assethub-hydration-dot": { + "updated": 1733052086375, + "destination": { + "fee": "0.0001195269", + "feeAsset": "DOT", + "feeNative": "1195269" + } + }, + "assethub-hydration-usdt": { + "updated": 1733052090985, + "destination": { + "fee": "0.001087", + "feeAsset": "USDT", + "feeNative": "1087" + } + }, + "assethub-hydration-usdc": { + "updated": 1733052095664, + "destination": { + "fee": "0.001088", + "feeAsset": "USDC", + "feeNative": "1088" + } + }, + "assethub-hydration-pink": { + "updated": 1733052100268, + "destination": { + "fee": "0.02", + "feeAsset": "USDT", + "feeNative": "20000" + } + }, + "assethub-hydration-ded": { + "updated": 1733052104969, + "destination": { + "fee": "0.02", + "feeAsset": "USDT", + "feeNative": "20000" + } + }, + "assethub-hydration-dota": { + "updated": 1733052109544, + "destination": { + "fee": "0.02", + "feeAsset": "USDT", + "feeNative": "20000" + } + }, + "assethub-polkadot-dot": { + "updated": 1733052116191, + "destination": { + "fee": "0.0021267087", + "feeAsset": "DOT", + "feeNative": "21267087" + } + }, + "assethub-moonbeam-usdt": { + "updated": 1733052129281, + "destination": { + "fee": "0.083585", + "feeAsset": "USDT", + "feeNative": "83585" + } + }, + "assethub-moonbeam-usdc": { + "updated": 1733052140315, + "destination": { + "fee": "10", + "feeAsset": "USDC", + "feeNative": "10000000" + } + }, + "assethub-bifrost-usdt": { + "updated": 1733052203313, + "destination": { + "fee": "0.056145", + "feeAsset": "USDT", + "feeNative": "56145" + } + }, + "assethub-bifrost-usdc": { + "updated": 1733052209041, + "destination": { + "fee": "0.056145", + "feeAsset": "USDC", + "feeNative": "56145" + } + }, + "astar-hydration-astr": { + "updated": 1733052220933, + "destination": { + "fee": "0.010478314008834501", + "feeAsset": "ASTR", + "feeNative": "10478314008834501" + } + }, + "astar-hydration-dot": { + "updated": 1733052227760, + "destination": { + "fee": "0.0442526198", + "feeAsset": "DOT", + "feeNative": "442526198" + } + }, + "bifrost-hydration-bnc": { + "updated": 1733052237876, + "destination": { + "fee": "0.002850509311", + "feeAsset": "BNC", + "feeNative": "2850509311" + } + }, + "bifrost-hydration-vdot": { + "updated": 1733052245509, + "destination": { + "fee": "0.0000693933", + "feeAsset": "vDOT", + "feeNative": "693933" + } + }, + "bifrost-hydration-vastr": { + "updated": 1733052258967, + "destination": { + "fee": "0.008951224627863061", + "feeAsset": "vASTR", + "feeNative": "8951224627863061" + } + }, + "bifrost-hydration-dot": { + "updated": 1733052267141, + "destination": { + "fee": "0.0442526313", + "feeAsset": "DOT", + "feeNative": "442526313" + } + }, + "bifrost-polkadot-dot": { + "updated": 1733052271107, + "destination": { + "fee": "0.0021232099", + "feeAsset": "DOT", + "feeNative": "21232099" + } + }, + "bifrost-assethub-pink": { + "updated": 1733052277851, + "destination": { + "fee": "0.18", + "feeAsset": "USDT", + "feeNative": "180000" + } + }, + "bifrost-assethub-usdt": { + "updated": 1733052282055, + "destination": { + "fee": "0.03219", + "feeAsset": "USDT", + "feeNative": "32190" + } + }, + "bifrost-assethub-usdc": { + "updated": 1733052286595, + "destination": { + "fee": "0.032621", + "feeAsset": "USDC", + "feeNative": "32621" + } + }, + "centrifuge-hydration-cfg": { + "updated": 1733052294872, + "destination": { + "fee": "0.002058201047786664", + "feeAsset": "CFG", + "feeNative": "2058201047786664" + } + }, + "crust-hydration-cru": { + "updated": 1733052316482, + "destination": { + "fee": "0.001231657586", + "feeAsset": "CRU", + "feeNative": "1231657586" + } + }, + "darwinia-hydration-ring": { + "updated": 1733052336352, + "destination": { + "fee": "0.419631906530614329", + "feeAsset": "RING", + "feeNative": "419631906530614329" + } + }, + "hydration-acala-aca": { + "updated": 1733052342909, + "destination": { + "fee": "0.0074712", + "feeAsset": "ACA", + "feeNative": "7471200000" + } + }, + "hydration-acala-ldot": { + "updated": 1733052348280, + "destination": { + "fee": "0.0005854634", + "feeAsset": "LDOT", + "feeNative": "5854634" + } + }, + "hydration-ajuna-ajun": { + "updated": 1733052353339, + "destination": { + "fee": "0.00028", + "feeAsset": "AJUN", + "feeNative": "280000000" + } + }, + "hydration-assethub-dot": { + "updated": 1733052358712, + "destination": { + "fee": "0.1814465", + "feeAsset": "DOT", + "feeNative": "1814465000" + } + }, + "hydration-assethub-usdt": { + "updated": 1733052362542, + "destination": { + "fee": "0.032191", + "feeAsset": "USDT", + "feeNative": "32191" + } + }, + "hydration-assethub-usdc": { + "updated": 1733052366338, + "destination": { + "fee": "0.032621", + "feeAsset": "USDC", + "feeNative": "32621" + } + }, + "hydration-assethub-pink": { + "updated": 1733052370082, + "destination": { + "fee": "0.18", + "feeAsset": "USDT", + "feeNative": "180000" + } + }, + "hydration-assethub-ded": { + "updated": 1733052373807, + "destination": { + "fee": "0.18", + "feeAsset": "USDT", + "feeNative": "180000" + } + }, + "hydration-assethub-dota": { + "updated": 1733052377427, + "destination": { + "fee": "0.18", + "feeAsset": "USDT", + "feeNative": "180000" + } + }, + "hydration-assethub-wud": { + "updated": 1733052381415, + "destination": { + "fee": "0.18", + "feeAsset": "USDT", + "feeNative": "180000" + } + }, + "hydration-astar-astr": { + "updated": 1733052387334, + "destination": { + "fee": "0.038541720104787343", + "feeAsset": "ASTR", + "feeNative": "38541720104787343" + } + }, + "hydration-astar-dot": { + "updated": 1733052393001, + "destination": { + "fee": "0.0442215927", + "feeAsset": "DOT", + "feeNative": "442215927" + } + }, + "hydration-bifrost-bnc": { + "updated": 1733052400688, + "destination": { + "fee": "0.149429366457", + "feeAsset": "BNC", + "feeNative": "149429366457" + } + }, + "hydration-bifrost-vdot": { + "updated": 1733052405398, + "destination": { + "fee": "0.0034644245", + "feeAsset": "vDOT", + "feeNative": "34644245" + } + }, + "hydration-bifrost-vastr": { + "updated": 1733052411250, + "destination": { + "fee": "0.701812389625", + "feeAsset": "vASTR", + "feeNative": "701812389625000000" + } + }, + "hydration-bifrost-dot": { + "updated": 1733052417963, + "destination": { + "fee": "0.0503237563", + "feeAsset": "DOT", + "feeNative": "503237563" + } + }, + "hydration-centrifuge-cfg": { + "updated": 1733052423604, + "destination": { + "fee": "0.0064296", + "feeAsset": "CFG", + "feeNative": "6429600000000000" + } + }, + "hydration-crust-cru": { + "updated": 1733052428766, + "destination": { + "fee": "0.04", + "feeAsset": "CRU", + "feeNative": "40000000000" + } + }, + "hydration-darwinia-ring": { + "updated": 1733052438257, + "destination": { + "fee": "0.040188403234362692", + "feeAsset": "RING", + "feeNative": "40188403234362692" + } + }, + "hydration-interlay-ibtc": { + "updated": 1733052460853, + "destination": { + "fee": "0.00000063", + "feeAsset": "IBTC", + "feeNative": "63" + } + }, + "hydration-interlay-intr": { + "updated": 1733052465574, + "destination": { + "fee": "0.0019213457", + "feeAsset": "INTR", + "feeNative": "19213457" + } + }, + "hydration-interlay-dot": { + "updated": 1733052472738, + "destination": { + "fee": "0.045934345", + "feeAsset": "DOT", + "feeNative": "459343450" + } + }, + "hydration-interlay-hdx": { + "updated": 1733052477039, + "destination": { + "fee": "0.405777777777", + "feeAsset": "HDX", + "feeNative": "405777777777" + } + }, + "hydration-kilt-kilt": { + "updated": 1733052485143, + "destination": { + "fee": "0.000000000027609", + "feeAsset": "KILT", + "feeNative": "27609" + } + }, + "hydration-moonbeam-hdx": { + "updated": 1733052497109, + "destination": { + "fee": "3.488962557199", + "feeAsset": "HDX", + "feeNative": "3488962557199" + } + }, + "hydration-moonbeam-glmr": { + "updated": 1733052509129, + "destination": { + "fee": "0.0095040525", + "feeAsset": "GLMR", + "feeNative": "9504052500000000" + } + }, + "hydration-moonbeam-dot": { + "updated": 1733052521428, + "destination": { + "fee": "0.0513335994", + "feeAsset": "DOT", + "feeNative": "513335994" + } + }, + "hydration-moonbeam-dai_mwh": { + "updated": 1733052549864, + "destination": { + "fee": "0.08", + "feeAsset": "GLMR", + "feeNative": "80000000000000000" + } + }, + "hydration-moonbeam-usdc_mwh": { + "updated": 1733052580192, + "destination": { + "fee": "0.08", + "feeAsset": "GLMR", + "feeNative": "80000000000000000" + } + }, + "hydration-moonbeam-usdt_mwh": { + "updated": 1733052616013, + "destination": { + "fee": "0.08", + "feeAsset": "GLMR", + "feeNative": "80000000000000000" + } + }, + "hydration-moonbeam-wbtc_mwh": { + "updated": 1733052640488, + "destination": { + "fee": "0.08", + "feeAsset": "GLMR", + "feeNative": "80000000000000000" + } + }, + "hydration-moonbeam-weth_mwh": { + "updated": 1733052670217, + "destination": { + "fee": "0.08", + "feeAsset": "GLMR", + "feeNative": "80000000000000000" + } + }, + "hydration-mythos-myth": { + "updated": 1733052676814, + "destination": { + "fee": "0.262144", + "feeAsset": "MYTH", + "feeNative": "262144000000000000" + } + }, + "hydration-polkadot-dot": { + "updated": 1733052680598, + "destination": { + "fee": "0.0021232099", + "feeAsset": "DOT", + "feeNative": "21232099" + } + }, + "hydration-pendulum-pen": { + "updated": 1733052698653, + "destination": { + "fee": "1", + "feeAsset": "PEN", + "feeNative": "1000000000000" + } + }, + "hydration-subsocial-sub": { + "updated": 1733052713080, + "destination": { + "fee": "0.64", + "feeAsset": "SUB", + "feeNative": "6400000000" + } + }, + "hydration-unique-unq": { + "updated": 1733052722275, + "destination": { + "fee": "0", + "feeAsset": "UNQ", + "feeNative": "0" + } + }, + "hydration-zeitgeist-ztg": { + "updated": 1733052727901, + "destination": { + "fee": "0.0064296", + "feeAsset": "ZTG", + "feeNative": "64296000" + } + }, + "hydration-zeitgeist-glmr": { + "updated": 1733052740699, + "destination": { + "fee": "0.0062726556", + "feeAsset": "GLMR", + "feeNative": "6272655600000000" + } + }, + "hydration-zeitgeist-usdc_mwh": { + "updated": 1733052753318, + "destination": { + "fee": "0.1", + "feeAsset": "GLMR", + "feeNative": "100000000000000000" + } + }, + "kilt-hydration-kilt": { + "updated": 1733052758512, + "destination": { + "fee": "0.005859321444802", + "feeAsset": "KILT", + "feeNative": "5859321444802" + } + }, + "interlay-hydration-intr": { + "updated": 1733052764018, + "destination": { + "fee": "0.058615515", + "feeAsset": "INTR", + "feeNative": "586155150" + } + }, + "interlay-hydration-ibtc": { + "updated": 1733052769063, + "destination": { + "fee": "0.01137864", + "feeAsset": "INTR", + "feeNative": "113786400" + } + }, + "interlay-hydration-dot": { + "updated": 1733052775210, + "destination": { + "fee": "0.044252679", + "feeAsset": "DOT", + "feeNative": "442526790" + } + }, + "interlay-hydration-hdx": { + "updated": 1733052780380, + "destination": { + "fee": "0.062262236086", + "feeAsset": "HDX", + "feeNative": "62262236086" + } + }, + "mythos-hydration-myth": { + "updated": 1733052785382, + "destination": { + "fee": "0.00309415802553245", + "feeAsset": "MYTH", + "feeNative": "3094158025532450" + } + }, + "mythos-assethub-myth": { + "updated": 1733052788075, + "destination": { + "fee": "0.045957304441075014", + "feeAsset": "MYTH", + "feeNative": "45957304441075014" + } + }, + "pendulum-hydration-pen": { + "updated": 1733052796768, + "destination": { + "fee": "0.014885684029", + "feeAsset": "PEN", + "feeNative": "14885684029" + } + }, + "polkadot-hydration-dot": { + "updated": 1733052801864, + "destination": { + "fee": "0.0001196119", + "feeAsset": "DOT", + "feeNative": "1196119" + } + }, + "polkadot-bifrost-dot": { + "updated": 1733052805886, + "destination": { + "fee": "0.0061906729", + "feeAsset": "DOT", + "feeNative": "61906729" + } + }, + "polkadot-assethub-dot": { + "updated": 1733052808886, + "destination": { + "fee": "0.0017965", + "feeAsset": "DOT", + "feeNative": "17965000" + } + }, + "subsocial-hydration-sub": { + "updated": 1733052814849, + "destination": { + "fee": "0.6530672671", + "feeAsset": "SUB", + "feeNative": "6530672671" + } + }, + "unique-hydration-unq": { + "updated": 1733052824284, + "destination": { + "fee": "0.13710473938737098", + "feeAsset": "UNQ", + "feeNative": "137104739387370980" + } + }, + "zeitgeist-hydration-ztg": { + "updated": 1733052829260, + "destination": { + "fee": "0.0619517587", + "feeAsset": "ZTG", + "feeNative": "619517587" + } + }, + "zeitgeist-hydration-glmr": { + "updated": 1733052843040, + "destination": { + "fee": "0.00791297870452645", + "feeAsset": "GLMR", + "feeNative": "7912978704526450" + } + }, + "zeitgeist-hydration-usdc_mwh": { + "updated": 1733052864479, + "destination": { + "fee": "0.1", + "feeAsset": "GLMR", + "feeNative": "100000000000000000" + } + } +} \ No newline at end of file diff --git a/integration-tests/xcm-test/src/__snapshots__/e2e.spec.ts.snap b/integration-tests/xcm-test/src/__snapshots__/e2e.spec.ts.snap index 294634bd..e1807ce8 100644 --- a/integration-tests/xcm-test/src/__snapshots__/e2e.spec.ts.snap +++ b/integration-tests/xcm-test/src/__snapshots__/e2e.spec.ts.snap @@ -1,5 +1,586 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Wallet with XCM config should result in valid Polkadot transfer for Acala -> Hydration ACA [aca] transfer 1`] = ` +Array [ + "acala-hydration-aca", + "0xf8043600000000a0724e18090000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Acala -> Hydration LDOT [ldot] transfer 1`] = ` +Array [ + "acala-hydration-ldot", + "0xf8043600000300e8764817000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Ajuna -> Hydration AJUN [ajun] transfer 1`] = ` +Array [ + "ajuna-hydration-ajun", + "0xf40423000000a0724e18090000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Bifrost USDC [usdc] transfer 1`] = ` +Array [ + "assethub-bifrost-usdc", + "0x0901041f0803010100b91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000002043205e51400025a62020000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Bifrost USDT [usdt] transfer 1`] = ` +Array [ + "assethub-bifrost-usdt", + "0x0901041f0803010100b91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000002043205011f00025a62020000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Hydration DED [ded] transfer 1`] = ` +Array [ + "assethub-hydration-ded", + "0x4101041f0803010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee030800000204320578000700e8764817000002043205011f00823801000100000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Hydration DOT [dot] transfer 1`] = ` +Array [ + "assethub-hydration-dot", + "0xfc041f0803010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000100000700e87648170000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Hydration DOTA [dota] transfer 1`] = ` +Array [ + "assethub-hydration-dota", + "0x3901041f0803010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee03080000020432054800821a0600000002043205011f00823801000100000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Hydration PINK [pink] transfer 1`] = ` +Array [ + "assethub-hydration-pink", + "0x4101041f0803010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee03080000020432055c000700e8764817000002043205011f00823801000100000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Hydration USDC [usdc] transfer 1`] = ` +Array [ + "assethub-hydration-usdc", + "0x0901041f0803010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000002043205e51400025a62020000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Hydration USDT [usdt] transfer 1`] = ` +Array [ + "assethub-hydration-usdt", + "0x0901041f0803010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000002043205011f00025a62020000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Moonbeam USDC [usdc] transfer 1`] = ` +Array [ + "assethub-moonbeam-usdc", + "0xd8041f0803010100511f0300010300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac0304000002043205e51400025a62020000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Moonbeam USDT [usdt] transfer 1`] = ` +Array [ + "assethub-moonbeam-usdt", + "0xd8041f0803010100511f0300010300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac0304000002043205011f00025a62020000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Polkadot DOT [dot] transfer 1`] = ` +Array [ + "assethub-polkadot-dot", + "0xf0041f09010100010001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0104000100000700e87648170000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Astar -> Hydration ASTR [astr] transfer 1`] = ` +Array [ + "astar-hydration-astr", + "0x050104330203010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee030400000000130000e8890423c78a00000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Astar -> Hydration DOT [dot] transfer 1`] = ` +Array [ + "astar-hydration-dot", + "0x3101043700ffffffffffffffffffffffffffffffff00e8764817000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Bifrost -> AssetHub PINK [pink] transfer 1`] = ` +Array [ + "bifrost-assethub-pink", + "0x4d01044605030800010300a10f0432055c000700e876481700010300a10f043205011f0082fc0a000100000003010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Bifrost -> AssetHub USDC [usdc] transfer 1`] = ` +Array [ + "bifrost-assethub-usdc", + "0x0901044605030400010300a10f043205e51400025a62020000000003010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Bifrost -> AssetHub USDT [usdt] transfer 1`] = ` +Array [ + "bifrost-assethub-usdt", + "0x0901044605030400010300a10f043205011f00025a62020000000003010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Bifrost -> Hydration BNC [bnc] transfer 1`] = ` +Array [ + "bifrost-hydration-bnc", + "0xf8044600000100a0724e18090000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Bifrost -> Hydration DOT [dot] transfer 1`] = ` +Array [ + "bifrost-hydration-dot", + "0xf8044600080000e8764817000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Bifrost -> Hydration vASTR [vastr] transfer 1`] = ` +Array [ + "bifrost-hydration-vastr", + "0xf804460009030000e8890423c78a000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Bifrost -> Hydration vDOT [vdot] transfer 1`] = ` +Array [ + "bifrost-hydration-vdot", + "0xf8044600090000e8764817000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Bifrost -> Polkadot DOT [dot] transfer 1`] = ` +Array [ + "bifrost-polkadot-dot", + "0xec044600080000e87648170000000000000000000000030101010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Centrifuge -> Hydration CFG [cfg] transfer 1`] = ` +Array [ + "centrifuge-hydration-cfg", + "0xf4047c00000000e8890423c78a000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Crust network -> Hydration CRU [cru] transfer 1`] = ` +Array [ + "crust-hydration-cru", + "0xf4047d000000a0724e18090000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Darwinia -> Hydration RING [ring] transfer 1`] = ` +Array [ + "darwinia-hydration-ring", + "0xf4042e00000000e8890423c78a000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Acala ACA [aca] transfer 1`] = ` +Array [ + "hydration-acala-aca", + "0x0101048900a3420f0000a0724e18090000000000000000000003010200411f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Acala LDOT [ldot] transfer 1`] = ` +Array [ + "hydration-acala-ldot", + "0x0101048900a4420f0000e8764817000000000000000000000003010200411f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Ajuna AJUN [ajun] transfer 1`] = ` +Array [ + "hydration-ajuna-ajun", + "0x01010489002000000000a0724e180900000000000000000000030102000d20010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> AssetHub DED [ded] transfer 1`] = ` +Array [ + "hydration-assethub-ded", + "0x4d01048905030800010300a10f04320578000700e876481700010300a10f043205011f0082fc0a000100000003010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> AssetHub DOT [dot] transfer 1`] = ` +Array [ + "hydration-assethub-dot", + "0x0d01046b0d04010100a10f04040100000700e8764817020401000204040d01000001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> AssetHub DOTA [dota] transfer 1`] = ` +Array [ + "hydration-assethub-dota", + "0x4501048905030800010300a10f0432054800821a060000010300a10f043205011f0082fc0a000100000003010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> AssetHub PINK [pink] transfer 1`] = ` +Array [ + "hydration-assethub-pink", + "0x4d01048905030800010300a10f0432055c000700e876481700010300a10f043205011f0082fc0a000100000003010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> AssetHub USDC [usdc] transfer 1`] = ` +Array [ + "hydration-assethub-usdc", + "0xf40489010300010300a10f043205e51400025a620203010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> AssetHub USDT [usdt] transfer 1`] = ` +Array [ + "hydration-assethub-usdt", + "0xf40489010300010300a10f043205011f00025a620203010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> AssetHub WUD [wud] transfer 1`] = ` +Array [ + "hydration-assethub-wud", + "0x5901048905030800010300a10f043205011f0082fc0a0000010300a10f043205a6e90100000700e87648170000000003010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Astar ASTR [astr] transfer 1`] = ` +Array [ + "hydration-astar-astr", + "0x0101048900090000000000e8890423c78a000000000000000003010200591f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Astar DOT [dot] transfer 1`] = ` +Array [ + "hydration-astar-dot", + "0x01010489000500000000e8764817000000000000000000000003010200591f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Bifrost BNC [bnc] transfer 1`] = ` +Array [ + "hydration-bifrost-bnc", + "0x01010489000e00000000a0724e18090000000000000000000003010200b91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Bifrost DOT [dot] transfer 1`] = ` +Array [ + "hydration-bifrost-dot", + "0x01010489000500000000e8764817000000000000000000000003010200b91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Bifrost vASTR [vastr] transfer 1`] = ` +Array [ + "hydration-bifrost-vastr", + "0x0101048900210000000000e8890423c78a000000000000000003010200b91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Bifrost vDOT [vdot] transfer 1`] = ` +Array [ + "hydration-bifrost-vdot", + "0x01010489000f00000000e8764817000000000000000000000003010200b91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Centrifuge CFG [cfg] transfer 1`] = ` +Array [ + "hydration-centrifuge-cfg", + "0x01010489000d0000000000e8890423c78a000000000000000003010200bd1f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Crust network CRU [cru] transfer 1`] = ` +Array [ + "hydration-crust-cru", + "0x01010489001b00000000a0724e18090000000000000000000003010200611f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Darwinia RING [ring] transfer 1`] = ` +Array [ + "hydration-darwinia-ring", + "0xd00489001f0000000000e8890423c78a000000000000000003010200f91f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Interlay DOT [dot] transfer 1`] = ` +Array [ + "hydration-interlay-dot", + "0x01010489000500000000e8764817000000000000000000000003010200c11f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Interlay HDX [hdx] transfer 1`] = ` +Array [ + "hydration-interlay-hdx", + "0x01010489000000000000a0724e18090000000000000000000003010200c11f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Interlay IBTC [ibtc] transfer 1`] = ` +Array [ + "hydration-interlay-ibtc", + "0x01010489000b00000000ca9a3b00000000000000000000000003010200c11f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Interlay INTR [intr] transfer 1`] = ` +Array [ + "hydration-interlay-intr", + "0x01010489001100000000e8764817000000000000000000000003010200c11f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Kilt KILT [kilt] transfer 1`] = ` +Array [ + "hydration-kilt-kilt", + "0x01010489001c0000000000c16ff28623000000000000000000030102009920010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Moonbeam DAI [dai_mwh] transfer 1`] = ` +Array [ + "hydration-moonbeam-dai_mwh", + "0x350104890408120000000000e8890423c78a0000000000000000100000000000087e93371c0100000000000000000100000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Moonbeam DOT [dot] transfer 1`] = ` +Array [ + "hydration-moonbeam-dot", + "0xd00489000500000000e8764817000000000000000000000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Moonbeam GLMR [glmr] transfer 1`] = ` +Array [ + "hydration-moonbeam-glmr", + "0xd0048900100000000000e8890423c78a000000000000000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Moonbeam HDX [hdx] transfer 1`] = ` +Array [ + "hydration-moonbeam-hdx", + "0xd00489000000000000a0724e18090000000000000000000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Moonbeam USDC [usdc_mwh] transfer 1`] = ` +Array [ + "hydration-moonbeam-usdc_mwh", + "0x3501048904081500000080969800000000000000000000000000100000000000087e93371c0100000000000000000100000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Moonbeam USDT [usdt_mwh] transfer 1`] = ` +Array [ + "hydration-moonbeam-usdt_mwh", + "0x3501048904081700000080969800000000000000000000000000100000000000087e93371c0100000000000000000100000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Moonbeam WBTC [wbtc_mwh] transfer 1`] = ` +Array [ + "hydration-moonbeam-wbtc_mwh", + "0x3501048904081300000000ca9a3b000000000000000000000000100000000000087e93371c0100000000000000000100000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Moonbeam WETH [weth_mwh] transfer 1`] = ` +Array [ + "hydration-moonbeam-weth_mwh", + "0x350104890408140000000000e8890423c78a0000000000000000100000000000087e93371c0100000000000000000100000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Mythos MYTH [myth] transfer 1`] = ` +Array [ + "hydration-mythos-myth", + "0xd00489001e0000000000e8890423c78a000000000000000003010200a5340300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Pendulum PEN [pen] transfer 1`] = ` +Array [ + "hydration-pendulum-pen", + "0x010104890091420f0000a0724e18090000000000000000000003010200b920010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Polkadot DOT [dot] transfer 1`] = ` +Array [ + "hydration-polkadot-dot", + "0xf40489000500000000e87648170000000000000000000000030101010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Subsocial SUB [sub] transfer 1`] = ` +Array [ + "hydration-subsocial-sub", + "0x01010489001800000000e8764817000000000000000000000003010200d520010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Unique network UNQ [unq] transfer 1`] = ` +Array [ + "hydration-unique-unq", + "0x0101048900190000000000e8890423c78a000000000000000003010200d51f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Zeitgeist GLMR [glmr] transfer 1`] = ` +Array [ + "hydration-zeitgeist-glmr", + "0x0101048900100000000000e8890423c78a000000000000000003010200b120010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Zeitgeist USDC [usdc_mwh] transfer 1`] = ` +Array [ + "hydration-zeitgeist-usdc_mwh", + "0x65010489040815000000809698000000000000000000000000001000000000008a5d7845630100000000000000000100000003010200b120010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Hydration -> Zeitgeist ZTG [ztg] transfer 1`] = ` +Array [ + "hydration-zeitgeist-ztg", + "0x01010489000c00000000e8764817000000000000000000000003010200b120010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Interlay -> Hydration DOT [dot] transfer 1`] = ` +Array [ + "interlay-hydration-dot", + "0xf8045e00000000e8764817000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Interlay -> Hydration HDX [hdx] transfer 1`] = ` +Array [ + "interlay-hydration-hdx", + "0x0501045e00010d00000000a0724e18090000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Interlay -> Hydration IBTC [ibtc] transfer 1`] = ` +Array [ + "interlay-hydration-ibtc", + "0xf8045e00000100ca9a3b00000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Interlay -> Hydration INTR [intr] transfer 1`] = ` +Array [ + "interlay-hydration-intr", + "0xf8045e00000200e8764817000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Kilt -> Hydration KILT [kilt] transfer 1`] = ` +Array [ + "kilt-hydration-kilt", + "0x050104530803010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000000000f0000c16ff286230000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Mythos -> AssetHub MYTH [myth] transfer 1`] = ` +Array [ + "mythos-assethub-myth", + "0x0501041f0904010100a10f040001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0404000000130000e8890423c78a0000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Mythos -> Hydration MYTH [myth] transfer 1`] = ` +Array [ + "mythos-hydration-myth", + "0x0901041f0803010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee030400000000130000e8890423c78a0000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Pendulum -> Hydration PEN [pen] transfer 1`] = ` +Array [ + "pendulum-hydration-pen", + "0xf40436000000a0724e18090000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Polkadot -> AssetHub DOT [dot] transfer 1`] = ` +Array [ + "polkadot-assethub-dot", + "0xfc04630903000100a10f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000000000700e87648170000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Polkadot -> Bifrost DOT [dot] transfer 1`] = ` +Array [ + "polkadot-bifrost-dot", + "0xfc04630803000100b91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000000000700e87648170000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Polkadot -> Hydration DOT [dot] transfer 1`] = ` +Array [ + "polkadot-hydration-dot", + "0xfc04630803000100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000000000700e87648170000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Subsocial -> Hydration SUB [sub] transfer 1`] = ` +Array [ + "subsocial-hydration-sub", + "0xfc041f0803010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000000000700e87648170000000000", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Unique network -> Hydration UNQ [unq] transfer 1`] = ` +Array [ + "unique-hydration-unq", + "0x0101042600000000000000e8890423c78a000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Zeitgeist -> Hydration GLMR [glmr] transfer 1`] = ` +Array [ + "zeitgeist-hydration-glmr", + "0x0501047e0005030000000000e8890423c78a000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Zeitgeist -> Hydration USDC [usdc_mwh] transfer 1`] = ` +Array [ + "zeitgeist-hydration-usdc_mwh", + "0x6d01047e0408050100000080969800000000000000000000000000050300000000008a5d7845630100000000000000000100000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + +exports[`Wallet with XCM config should result in valid Polkadot transfer for Zeitgeist -> Hydration ZTG [ztg] transfer 1`] = ` +Array [ + "zeitgeist-hydration-ztg", + "0xf4047e000400e8764817000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", +] +`; + exports[`Wallet with XCM config should result in valid transfer for Ajuna -> Hydration AJUN [ajun] transfer 1`] = ` Array [ "ajuna-hydration-ajun", diff --git a/integration-tests/xcm-test/src/call.spec.ts b/integration-tests/xcm-test/src/call.spec.ts index 739f6773..256b7e31 100644 --- a/integration-tests/xcm-test/src/call.spec.ts +++ b/integration-tests/xcm-test/src/call.spec.ts @@ -3,8 +3,9 @@ import { Wallet } from '@galacticcouncil/xcm-sdk'; import console from 'console'; -import { setup, xcm } from './mock'; -import { getRouteInfo } from './utils'; +import { setup, xcm } from './ctx/call'; + +import { getRouteInfo } from './utils/route'; const jestConsole = console; @@ -12,29 +13,29 @@ const { configService, init } = setup; const { runXcm } = xcm; const getPolkadotChains = () => { - const blacklist: string[] = ['acala-evm', 'nodle']; + const skipFor: string[] = ['acala-evm', 'nodle']; const chains = Array.from(configService.chains.values()) .filter( (c) => c.ecosystem === ChainEcosystem.Polkadot || c.ecosystem === ChainEcosystem.Ethereum ) - .filter((c) => !blacklist.includes(c.key)); + .filter((c) => !skipFor.includes(c.key)); return { - blacklist, + skipFor, chains, }; }; const getKusamaChains = () => { - const blacklist: string[] = []; + const skipFor: string[] = []; const chains = Array.from(configService.chains.values()) .filter((c) => c.ecosystem === ChainEcosystem.Kusama) - .filter((c) => !blacklist.includes(c.key)); + .filter((c) => !skipFor.includes(c.key)); return { - blacklist, + skipFor, chains, }; }; @@ -69,10 +70,10 @@ describe('Wallet with XCM config', () => { const { chain, routes } = config; for (const route of Array.from(routes.values())) { - const { blacklist } = polkadot; + const { skipFor } = polkadot; const { destination } = route; - if (blacklist.includes(destination.chain.key)) { + if (skipFor.includes(destination.chain.key)) { continue; } @@ -102,10 +103,10 @@ describe('Wallet with XCM config', () => { const { chain, routes } = config; for (const route of Array.from(routes.values())) { - const { blacklist } = kusama; + const { skipFor } = kusama; const { destination } = route; - if (blacklist.includes(destination.chain.key)) { + if (skipFor.includes(destination.chain.key)) { continue; } diff --git a/integration-tests/xcm-test/src/mock/account.ts b/integration-tests/xcm-test/src/ctx/call/account.ts similarity index 100% rename from integration-tests/xcm-test/src/mock/account.ts rename to integration-tests/xcm-test/src/ctx/call/account.ts diff --git a/integration-tests/xcm-test/src/mock/amount.ts b/integration-tests/xcm-test/src/ctx/call/amount.ts similarity index 100% rename from integration-tests/xcm-test/src/mock/amount.ts rename to integration-tests/xcm-test/src/ctx/call/amount.ts diff --git a/integration-tests/xcm-test/src/mock/index.ts b/integration-tests/xcm-test/src/ctx/call/index.ts similarity index 100% rename from integration-tests/xcm-test/src/mock/index.ts rename to integration-tests/xcm-test/src/ctx/call/index.ts diff --git a/integration-tests/xcm-test/src/mock/setup.ts b/integration-tests/xcm-test/src/ctx/call/setup.ts similarity index 100% rename from integration-tests/xcm-test/src/mock/setup.ts rename to integration-tests/xcm-test/src/ctx/call/setup.ts diff --git a/integration-tests/xcm-test/src/mock/xcm.ts b/integration-tests/xcm-test/src/ctx/call/xcm.ts similarity index 98% rename from integration-tests/xcm-test/src/mock/xcm.ts rename to integration-tests/xcm-test/src/ctx/call/xcm.ts index 676ac34e..0309304f 100644 --- a/integration-tests/xcm-test/src/mock/xcm.ts +++ b/integration-tests/xcm-test/src/ctx/call/xcm.ts @@ -11,7 +11,7 @@ import { import { getAddress } from './account'; import { getAmount } from './amount'; -import { getRouteKey } from '../utils'; +import { getRouteKey } from '../../utils/route'; const BALANCE = 10; const FEE = 0.1; diff --git a/integration-tests/xcm-test/src/e2e/account.ts b/integration-tests/xcm-test/src/ctx/e2e/account.ts similarity index 100% rename from integration-tests/xcm-test/src/e2e/account.ts rename to integration-tests/xcm-test/src/ctx/e2e/account.ts diff --git a/integration-tests/xcm-test/src/e2e/amount.ts b/integration-tests/xcm-test/src/ctx/e2e/amount.ts similarity index 100% rename from integration-tests/xcm-test/src/e2e/amount.ts rename to integration-tests/xcm-test/src/ctx/e2e/amount.ts diff --git a/integration-tests/xcm-test/src/e2e/events.ts b/integration-tests/xcm-test/src/ctx/e2e/events.ts similarity index 97% rename from integration-tests/xcm-test/src/e2e/events.ts rename to integration-tests/xcm-test/src/ctx/e2e/events.ts index 89699d95..6ad1bd2c 100644 --- a/integration-tests/xcm-test/src/e2e/events.ts +++ b/integration-tests/xcm-test/src/ctx/e2e/events.ts @@ -5,7 +5,7 @@ import type { import type { AnyJson } from '@polkadot/types-codec/types'; import { ApiPromise } from '@polkadot/api'; -import { findNestedKey } from '../utils'; +import { findNestedKey } from '../../utils/json'; export function checkIfFailed(api: ApiPromise, events: EventRecord[]): boolean { return events.some(({ event: { method, section, data } }) => { diff --git a/integration-tests/xcm-test/src/e2e/hooks/index.ts b/integration-tests/xcm-test/src/ctx/e2e/hooks/index.ts similarity index 100% rename from integration-tests/xcm-test/src/e2e/hooks/index.ts rename to integration-tests/xcm-test/src/ctx/e2e/hooks/index.ts diff --git a/integration-tests/xcm-test/src/e2e/hooks/moonbeam.ts b/integration-tests/xcm-test/src/ctx/e2e/hooks/moonbeam.ts similarity index 97% rename from integration-tests/xcm-test/src/e2e/hooks/moonbeam.ts rename to integration-tests/xcm-test/src/ctx/e2e/hooks/moonbeam.ts index f5f1e918..b474fbb2 100644 --- a/integration-tests/xcm-test/src/e2e/hooks/moonbeam.ts +++ b/integration-tests/xcm-test/src/ctx/e2e/hooks/moonbeam.ts @@ -5,7 +5,7 @@ import { SubmittableExtrinsic } from '@polkadot/api/promise/types'; import { decodeFunctionData } from 'viem'; -import { jsonFormatter } from '../../utils'; +import { jsonFormatter } from '../../../utils/route'; const NATIVE = '0x0000000000000000000000000000000000000802'; const FOREIGN_PREFIX = '0xffffffff'; diff --git a/integration-tests/xcm-test/src/e2e/index.ts b/integration-tests/xcm-test/src/ctx/e2e/index.ts similarity index 100% rename from integration-tests/xcm-test/src/e2e/index.ts rename to integration-tests/xcm-test/src/ctx/e2e/index.ts diff --git a/integration-tests/xcm-test/src/e2e/network.ts b/integration-tests/xcm-test/src/ctx/e2e/network.ts similarity index 100% rename from integration-tests/xcm-test/src/e2e/network.ts rename to integration-tests/xcm-test/src/ctx/e2e/network.ts diff --git a/integration-tests/xcm-test/src/e2e/setup.ts b/integration-tests/xcm-test/src/ctx/e2e/setup.ts similarity index 100% rename from integration-tests/xcm-test/src/e2e/setup.ts rename to integration-tests/xcm-test/src/ctx/e2e/setup.ts diff --git a/integration-tests/xcm-test/src/e2e/storage.ts b/integration-tests/xcm-test/src/ctx/e2e/storage.ts similarity index 68% rename from integration-tests/xcm-test/src/e2e/storage.ts rename to integration-tests/xcm-test/src/ctx/e2e/storage.ts index ddcb4794..728fde27 100644 --- a/integration-tests/xcm-test/src/e2e/storage.ts +++ b/integration-tests/xcm-test/src/ctx/e2e/storage.ts @@ -7,6 +7,7 @@ import { import { ApiPromise } from '@polkadot/api'; import { getAccount } from './account'; +import { jsonFormatter } from '../../utils/json'; const BALANCE = 1000n; @@ -14,7 +15,7 @@ export const initStorage = async (api: ApiPromise, chain: Parachain) => { const chainDecimals = api.registry.chainDecimals[0]; const chainAssets = Array.from(chain.assetsData.values()); - const system = { + let storage = { System: { Account: populateSystem(chain, chainDecimals), }, @@ -22,28 +23,45 @@ export const initStorage = async (api: ApiPromise, chain: Parachain) => { // Single asset (system only) if (chainAssets.length === 1) { - return system; + return storage; } + /* if (chain.key === 'moonbeam') { + storage = Object.assign( + { + EVM: { + AccountStorages: populateErc20(chain, chainAssets, chainDecimals), + }, + }, + storage + ); + } */ + if (useTokensPallet(api)) { - return { - ...system, - Tokens: { - Accounts: populateTokens(chain, chainAssets, chainDecimals), + storage = Object.assign( + { + Tokens: { + Accounts: populateTokens(chain, chainAssets, chainDecimals), + }, }, - }; + storage + ); } if (useAssetsPallet(api)) { - return { - ...system, - Assets: { - Account: populateAssets(chain, chainAssets, chainDecimals), + storage = Object.assign( + { + Assets: { + Account: populateAssets(chain, chainAssets, chainDecimals), + }, }, - }; + storage + ); } - return system; + //console.log(JSON.stringify(storage, jsonFormatter, 2)); + + return storage; }; const useAssetsPallet = (api: ApiPromise): boolean => { @@ -68,6 +86,24 @@ const useNormalizedBalance = ( return assetMinFmt > assetBalance ? assetMinFmt + assetBalance : assetBalance; }; +const populateErc20 = ( + chain: Parachain, + assets: ParachainAssetData[], + decimals: number +) => { + const acc = getAccount(chain); + return assets + .filter((a) => a.asset.key.toString().endsWith('_mwh')) + .map((a) => { + const assetId = chain.getBalanceAssetId(a.asset); + const balance = useNormalizedBalance(chain, decimals, a.asset); + return [ + [assetId, acc.address], + `0x${balance.toString(16).toUpperCase()}`, + ]; + }); +}; + const populateAssets = ( chain: Parachain, assets: ParachainAssetData[], diff --git a/integration-tests/xcm-test/src/e2e/types.ts b/integration-tests/xcm-test/src/ctx/e2e/types.ts similarity index 100% rename from integration-tests/xcm-test/src/e2e/types.ts rename to integration-tests/xcm-test/src/ctx/e2e/types.ts diff --git a/integration-tests/xcm-test/src/e2e/xcm.ts b/integration-tests/xcm-test/src/ctx/e2e/xcm.ts similarity index 91% rename from integration-tests/xcm-test/src/e2e/xcm.ts rename to integration-tests/xcm-test/src/ctx/e2e/xcm.ts index afd01b50..7fc66515 100644 --- a/integration-tests/xcm-test/src/e2e/xcm.ts +++ b/integration-tests/xcm-test/src/ctx/e2e/xcm.ts @@ -23,7 +23,7 @@ import { } from './xcm.utils'; import { SetupCtx } from './types'; -import { getRouteKey } from '../utils'; +import { getRouteKey } from '../../utils/route'; const TRANSFER_AMOUNT = '10'; @@ -38,9 +38,10 @@ export const runXcm = ( networks: SetupCtx[]; wallet: Wallet; }>, - options: { skip?: boolean } = {} + options: { skip?: boolean; sync?: boolean } = {} ) => { const itfn = options.skip ? it.skip : it; + const shouldSync = options.sync || false; itfn( name, async () => { @@ -68,6 +69,7 @@ export const runXcm = ( let extrinsic; if (calldata.type === CallType.Evm && chain.key === 'moonbeam') { + return; // Skipped for now extrinsic = moonbeam.toTransferExtrinsic( srcNetwork.api, @@ -98,7 +100,8 @@ export const runXcm = ( await destNetwork.chain.newBlock(); const destEvents = await destNetwork.api.query.system.events(); expect(checkIfProcessed(destEvents)).toBeTruthy(); - expect([key, calldata.data]).toMatchSnapshot(); + + shouldSync && expect([key, calldata.data]).toMatchSnapshot(); const postTransfer = await getTransfer( wallet, @@ -113,14 +116,15 @@ export const runXcm = ( postTransfer ); - report.set(key, { - updated: Date.now(), - destination: { - fee: destinationFee.delta, - feeAsset: destinationFee.asset, - feeNative: destinationFee.deltaBn, - }, - }); + shouldSync && + report.set(key, { + updated: Date.now(), + destination: { + fee: destinationFee.delta, + feeAsset: destinationFee.asset, + feeNative: destinationFee.deltaBn, + }, + }); console.table( [ diff --git a/integration-tests/xcm-test/src/e2e/xcm.utils.ts b/integration-tests/xcm-test/src/ctx/e2e/xcm.utils.ts similarity index 100% rename from integration-tests/xcm-test/src/e2e/xcm.utils.ts rename to integration-tests/xcm-test/src/ctx/e2e/xcm.utils.ts diff --git a/integration-tests/xcm-test/src/e2e.spec.ts b/integration-tests/xcm-test/src/e2e.spec.ts index 8977c805..1ec8ca43 100644 --- a/integration-tests/xcm-test/src/e2e.spec.ts +++ b/integration-tests/xcm-test/src/e2e.spec.ts @@ -7,9 +7,10 @@ import { Wallet } from '@galacticcouncil/xcm-sdk'; import console from 'console'; -import { setup, network, xcm, SetupCtx } from './e2e'; -import { getRouteInfo } from './utils'; -import { write, loadExisting } from './file'; +import { setup, network, xcm, SetupCtx } from './ctx/e2e'; + +import { getRouteInfo } from './utils/route'; +import { write, loadExisting } from './utils/file'; const jestConsole = console; const DB = 'metadata.db.json'; @@ -18,16 +19,27 @@ const { configService, initWithCtx } = setup; const { createNetworks } = network; const { runXcm } = xcm; +/** + * Supported polkadot consensus ctx. + * + * Constraints: + * 1) Bridge transfers are not executed. + * 2) Acala EVM is skipped (testing chain) + * 2) Nodle is skipped (unstable rpc's) + * 3) Phala is skipped (unstable rpc's) + * + * @returns chains execution ctx + */ const getPolkadotChains = () => { const bridge: string[] = ['ethereum']; - const blacklist: string[] = bridge.concat(['acala-evm', 'nodle']); + const skipFor: string[] = bridge.concat(['acala-evm', 'nodle', 'phala']); const chains: Parachain[] = Array.from(configService.chains.values()) .filter((c) => c instanceof Parachain) .filter((c) => c.ecosystem === ChainEcosystem.Polkadot) - .filter((c) => !blacklist.includes(c.key)); + .filter((c) => !skipFor.includes(c.key)); return { - blacklist, + skipFor, bridge, chains, }; @@ -67,14 +79,15 @@ describe('Wallet with XCM config', () => { const { chain, routes } = config; for (const route of Array.from(routes.values())) { - const { blacklist } = polkadot; - const { destination } = route; + const { skipFor } = polkadot; + const { source, destination } = route; - if (blacklist.includes(destination.chain.key)) { + if (skipFor.includes(destination.chain.key)) { continue; } const isContractTransfer = !!route.contract; + const isAcalaErc20Transfer = source.asset.key.endsWith('_awh'); const info = getRouteInfo(chain, route); runXcm( @@ -93,7 +106,8 @@ describe('Wallet with XCM config', () => { }; }, { - skip: isContractTransfer, + skip: isContractTransfer || isAcalaErc20Transfer, + sync: true, } ); } diff --git a/integration-tests/xcm-test/src/exec.spec.ts b/integration-tests/xcm-test/src/exec.spec.ts new file mode 100644 index 00000000..87cd52ed --- /dev/null +++ b/integration-tests/xcm-test/src/exec.spec.ts @@ -0,0 +1,103 @@ +import { + ConfigBuilder, + Parachain, + SubstrateApis, +} from '@galacticcouncil/xcm-core'; +import { Wallet } from '@galacticcouncil/xcm-sdk'; + +import console from 'console'; + +import { setup, network, xcm, SetupCtx } from './ctx/e2e'; + +import { parseArgs } from './utils/cmd'; +import { write, loadExisting } from './utils/file'; +import { getRouteInfo } from './utils/route'; + +const jestConsole = console; +const DB = 'metadata.db.json'; + +const { configService, initWithCtx } = setup; +const { createNetworks } = network; +const { runXcm } = xcm; + +const getKey = () => { + const args = process.argv.slice(2); + const params = parseArgs(args); + const key = params['key']; + + if (!key) { + console.error( + 'Please specify transfer key.\n Example: npm run test:exec -- -key hydration-assethub-ded' + ); + process.exit(1); + } + + return key; +}; + +describe('Wallet with XCM config', () => { + jest.setTimeout(3 * 60 * 1000); // Execution time <= 3 min + + let wallet: Wallet; + let networks: SetupCtx[] = []; + + const reportCtx = loadExisting(DB); + + const key = getKey(); + const [srcChainKey, destChainKey, assetKey] = key.split('-'); + const relay = configService.getChain('polkadot'); + const srcChain = configService.getChain(srcChainKey); + const destChain = configService.getChain(destChainKey); + const asset = configService.getAsset(assetKey); + + beforeAll(async () => { + global.console = console; + networks = await createNetworks([ + srcChain, + destChain, + relay, + ] as Parachain[]); + const ctx = networks.find((n) => n.config.key === 'hydration')!; + wallet = await initWithCtx(ctx); + }); + + afterAll(async () => { + global.console = jestConsole; + await SubstrateApis.getInstance().release(); + await Promise.all(networks.map((network) => network.teardown())); + write(reportCtx, DB); + }); + + it('is defined', () => { + expect(configService).toBeDefined(); + }); + + describe('should result in valid Polkadot transfer for', () => { + const transfer = ConfigBuilder(configService) + .assets() + .asset(asset) + .source(srcChain) + .destination(destChain) + .build(); + + const { chain, route } = transfer.origin; + const info = getRouteInfo(chain, route); + + runXcm( + `${info} transfer`, + async () => { + return { + chain: chain, + route: route, + }; + }, + async () => { + return { + report: new Map(), + networks: networks, + wallet: wallet, + }; + } + ); + }); +}); diff --git a/integration-tests/xcm-test/src/utils/cmd.ts b/integration-tests/xcm-test/src/utils/cmd.ts new file mode 100644 index 00000000..5b882694 --- /dev/null +++ b/integration-tests/xcm-test/src/utils/cmd.ts @@ -0,0 +1,13 @@ +const PARAM_PREFIX = '-'; + +export const parseArgs = (args: string[]) => { + const parsedArgs: { [key: string]: string } = {}; + + args.forEach((arg, i) => { + if (arg.startsWith(PARAM_PREFIX)) { + const key = arg.replace(PARAM_PREFIX, ''); + parsedArgs[key] = args[++i]; + } + }); + return parsedArgs; +}; diff --git a/integration-tests/xcm-test/src/file.ts b/integration-tests/xcm-test/src/utils/file.ts similarity index 94% rename from integration-tests/xcm-test/src/file.ts rename to integration-tests/xcm-test/src/utils/file.ts index e09ba0eb..4f4d575f 100644 --- a/integration-tests/xcm-test/src/file.ts +++ b/integration-tests/xcm-test/src/utils/file.ts @@ -1,6 +1,6 @@ import { readFileSync, writeFileSync } from 'fs'; -import { jsonFormatter } from './utils'; +import { jsonFormatter } from './json'; const DB_PATH = './src/__db__/'; diff --git a/integration-tests/xcm-test/src/utils/json.ts b/integration-tests/xcm-test/src/utils/json.ts new file mode 100644 index 00000000..84978154 --- /dev/null +++ b/integration-tests/xcm-test/src/utils/json.ts @@ -0,0 +1,14 @@ +export const jsonFormatter = (_: any, nestedValue: any) => { + return typeof nestedValue === 'bigint' ? nestedValue.toString() : nestedValue; +}; + +export const findNestedKey = (obj: any, keyToFind: any) => { + const foundObj: any[] = []; + JSON.stringify(obj, (_, nestedValue) => { + if (nestedValue && nestedValue[keyToFind]) { + foundObj.push(nestedValue); + } + return nestedValue; + }); + return foundObj[0]; +}; diff --git a/integration-tests/xcm-test/src/utils.ts b/integration-tests/xcm-test/src/utils/route.ts similarity index 57% rename from integration-tests/xcm-test/src/utils.ts rename to integration-tests/xcm-test/src/utils/route.ts index 4b96303a..9a83c05c 100644 --- a/integration-tests/xcm-test/src/utils.ts +++ b/integration-tests/xcm-test/src/utils/route.ts @@ -1,7 +1,5 @@ import { AnyChain, AssetRoute } from '@galacticcouncil/xcm-core'; -import { writeFileSync } from 'fs'; - export const getRouteKey = (chain: AnyChain, route: AssetRoute) => { const { source, destination } = route; return [chain.key, destination.chain.key, source.asset.key].join('-'); @@ -20,18 +18,3 @@ export const getRouteInfo = (chain: AnyChain, route: AssetRoute) => { `[${transferAsset.key}]`, ].join(' '); }; - -export const jsonFormatter = (_: any, nestedValue: any) => { - return typeof nestedValue === 'bigint' ? nestedValue.toString() : nestedValue; -}; - -export const findNestedKey = (obj: any, keyToFind: any) => { - const foundObj: any[] = []; - JSON.stringify(obj, (_, nestedValue) => { - if (nestedValue && nestedValue[keyToFind]) { - foundObj.push(nestedValue); - } - return nestedValue; - }); - return foundObj[0]; -}; From cbf3b86e96e6bf7114c3ecbb99fa7dbb7890f427 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Mon, 2 Dec 2024 13:22:56 +0100 Subject: [PATCH 13/21] bump moonbeam ah fees --- .../src/configs/polkadot/assethub/index.ts | 32 ++----------------- .../configs/polkadot/assethub/templates.ts | 2 +- .../xcm-cfg/src/configs/polkadot/bifrost.ts | 24 +------------- 3 files changed, 4 insertions(+), 54 deletions(-) diff --git a/packages/xcm-cfg/src/configs/polkadot/assethub/index.ts b/packages/xcm-cfg/src/configs/polkadot/assethub/index.ts index 8fe7f77a..d06f67b8 100644 --- a/packages/xcm-cfg/src/configs/polkadot/assethub/index.ts +++ b/packages/xcm-cfg/src/configs/polkadot/assethub/index.ts @@ -14,7 +14,6 @@ import { BalanceBuilder, ExtrinsicBuilder, ExtrinsicBuilderV4, - XcmTransferType, } from '../../../builders'; import { @@ -157,7 +156,7 @@ const toMoonbeam: AssetRoute[] = [ chain: moonbeam, asset: usdt, fee: { - amount: 0.15, + amount: 0.25, asset: usdt, }, }, @@ -184,7 +183,7 @@ const toMoonbeam: AssetRoute[] = [ chain: moonbeam, asset: usdc, fee: { - amount: 0.15, + amount: 0.25, asset: usdc, }, }, @@ -223,33 +222,6 @@ const toMythos: AssetRoute[] = [ ]; const toBifrost: AssetRoute[] = [ - new AssetRoute({ - source: { - asset: pink, - balance: BalanceBuilder().substrate().assets().account(), - fee: { - asset: dot, - balance: BalanceBuilder().substrate().system().account(), - extra: xcmDeliveryFee, - }, - destinationFee: { - balance: BalanceBuilder().substrate().assets().account(), - }, - min: AssetMinBuilder().assets().asset(), - }, - destination: { - chain: bifrost, - asset: pink, - fee: { - amount: 0.0001, - asset: pink, - }, - }, - extrinsic: ExtrinsicBuilder() - .polkadotXcm() - .limitedReserveTransferAssets() - .X2(), - }), new AssetRoute({ source: { asset: usdt, diff --git a/packages/xcm-cfg/src/configs/polkadot/assethub/templates.ts b/packages/xcm-cfg/src/configs/polkadot/assethub/templates.ts index 150db9b6..306aa7c4 100644 --- a/packages/xcm-cfg/src/configs/polkadot/assethub/templates.ts +++ b/packages/xcm-cfg/src/configs/polkadot/assethub/templates.ts @@ -64,5 +64,5 @@ export function toHydrationExtTemplate(asset: Asset): AssetRoute { } export function toMoonbeamExtTemplate(asset: Asset): AssetRoute { - return toParachainExtTemplate(asset, moonbeam, 0.15); + return toParachainExtTemplate(asset, moonbeam, 0.25); } diff --git a/packages/xcm-cfg/src/configs/polkadot/bifrost.ts b/packages/xcm-cfg/src/configs/polkadot/bifrost.ts index 6b2faa30..e2b7e066 100644 --- a/packages/xcm-cfg/src/configs/polkadot/bifrost.ts +++ b/packages/xcm-cfg/src/configs/polkadot/bifrost.ts @@ -1,6 +1,6 @@ import { AssetRoute, ChainRoutes } from '@galacticcouncil/xcm-core'; -import { bnc, dot, pink, usdc, usdt, vdot, vastr } from '../../assets'; +import { bnc, dot, usdc, usdt, vdot, vastr } from '../../assets'; import { assetHub, bifrost, hydration, polkadot } from '../../chains'; import { BalanceBuilder, ExtrinsicBuilder } from '../../builders'; @@ -117,28 +117,6 @@ const toPolkadot: AssetRoute[] = [ ]; const toAssetHub: AssetRoute[] = [ - new AssetRoute({ - source: { - asset: pink, - balance: BalanceBuilder().substrate().tokens().accounts(), - fee: { - asset: bnc, - balance: BalanceBuilder().substrate().system().account(), - }, - destinationFee: { - balance: BalanceBuilder().substrate().tokens().accounts(), - }, - }, - destination: { - chain: assetHub, - asset: pink, - fee: { - amount: 0.18, - asset: usdt, - }, - }, - extrinsic: ExtrinsicBuilder().xTokens().transferMultiassets().X3(), - }), new AssetRoute({ source: { asset: usdt, From 933945b5fcbe49cd3e407be5ea19359e56d3b4a8 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Mon, 2 Dec 2024 16:38:54 +0100 Subject: [PATCH 14/21] chopsticks env variables --- integration-tests/xcm-test/jest.config.mjs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/integration-tests/xcm-test/jest.config.mjs b/integration-tests/xcm-test/jest.config.mjs index 3dcf2372..a827d9db 100644 --- a/integration-tests/xcm-test/jest.config.mjs +++ b/integration-tests/xcm-test/jest.config.mjs @@ -1,3 +1,19 @@ import { config } from '../../jest.config.mjs'; +/** + * Chopsticks log level, "fatal" | "error" | "warn" | "info" | "debug" | "trace". + * Default is "info". + */ +process.env.LOG_LEVEL = 'info'; + +/** + * Don't log objects. Default is `false`. + */ +process.env.LOG_COMPACT = 'false'; + +/** + * Don't truncate log messages, show full log output. Default is `false`. + */ +process.env.VERBOSE_LOG = 'false'; + export default config; From 76a8589210b70c3f647016be4a7c1fa13a29464d Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Mon, 2 Dec 2024 16:39:11 +0100 Subject: [PATCH 15/21] dump new fees --- .../xcm-test/src/__db__/metadata.db.json | 302 +++++++++--------- .../src/__snapshots__/e2e.spec.ts.snap | 7 + 2 files changed, 162 insertions(+), 147 deletions(-) diff --git a/integration-tests/xcm-test/src/__db__/metadata.db.json b/integration-tests/xcm-test/src/__db__/metadata.db.json index 334628b4..fa98b391 100644 --- a/integration-tests/xcm-test/src/__db__/metadata.db.json +++ b/integration-tests/xcm-test/src/__db__/metadata.db.json @@ -1,6 +1,6 @@ { "acala-hydration-aca": { - "updated": 1733052045002, + "updated": 1733063513183, "destination": { "fee": "0.008078835878", "feeAsset": "ACA", @@ -8,7 +8,7 @@ } }, "acala-hydration-ldot": { - "updated": 1733052058146, + "updated": 1733063519032, "destination": { "fee": "0.0008920718", "feeAsset": "LDOT", @@ -16,7 +16,7 @@ } }, "ajuna-hydration-ajun": { - "updated": 1733052065923, + "updated": 1733063526199, "destination": { "fee": "0.000067081566", "feeAsset": "AJUN", @@ -24,31 +24,31 @@ } }, "assethub-hydration-dot": { - "updated": 1733052086375, + "updated": 1733063550187, "destination": { - "fee": "0.0001195269", + "fee": "0.000120532", "feeAsset": "DOT", - "feeNative": "1195269" + "feeNative": "1205320" } }, "assethub-hydration-usdt": { - "updated": 1733052090985, + "updated": 1733063555604, "destination": { - "fee": "0.001087", + "fee": "0.001096", "feeAsset": "USDT", - "feeNative": "1087" + "feeNative": "1096" } }, "assethub-hydration-usdc": { - "updated": 1733052095664, + "updated": 1733063560427, "destination": { - "fee": "0.001088", + "fee": "0.001096", "feeAsset": "USDC", - "feeNative": "1088" + "feeNative": "1096" } }, "assethub-hydration-pink": { - "updated": 1733052100268, + "updated": 1733063565171, "destination": { "fee": "0.02", "feeAsset": "USDT", @@ -56,7 +56,7 @@ } }, "assethub-hydration-ded": { - "updated": 1733052104969, + "updated": 1733063570706, "destination": { "fee": "0.02", "feeAsset": "USDT", @@ -64,7 +64,7 @@ } }, "assethub-hydration-dota": { - "updated": 1733052109544, + "updated": 1733063589660, "destination": { "fee": "0.02", "feeAsset": "USDT", @@ -72,7 +72,7 @@ } }, "assethub-polkadot-dot": { - "updated": 1733052116191, + "updated": 1733063597608, "destination": { "fee": "0.0021267087", "feeAsset": "DOT", @@ -80,7 +80,7 @@ } }, "assethub-moonbeam-usdt": { - "updated": 1733052129281, + "updated": 1733063614098, "destination": { "fee": "0.083585", "feeAsset": "USDT", @@ -88,7 +88,7 @@ } }, "assethub-moonbeam-usdc": { - "updated": 1733052140315, + "updated": 1733063625325, "destination": { "fee": "10", "feeAsset": "USDC", @@ -96,71 +96,71 @@ } }, "assethub-bifrost-usdt": { - "updated": 1733052203313, + "updated": 1733063693080, "destination": { - "fee": "0.056145", + "fee": "0.056724", "feeAsset": "USDT", - "feeNative": "56145" + "feeNative": "56724" } }, "assethub-bifrost-usdc": { - "updated": 1733052209041, + "updated": 1733063698858, "destination": { - "fee": "0.056145", + "fee": "0.056724", "feeAsset": "USDC", - "feeNative": "56145" + "feeNative": "56724" } }, "astar-hydration-astr": { - "updated": 1733052220933, + "updated": 1733063719455, "destination": { - "fee": "0.010478314008834501", + "fee": "0.010341758692712396", "feeAsset": "ASTR", - "feeNative": "10478314008834501" + "feeNative": "10341758692712396" } }, "astar-hydration-dot": { - "updated": 1733052227760, + "updated": 1733063726986, "destination": { - "fee": "0.0442526198", + "fee": "0.0442536169", "feeAsset": "DOT", - "feeNative": "442526198" + "feeNative": "442536169" } }, "bifrost-hydration-bnc": { - "updated": 1733052237876, + "updated": 1733063735029, "destination": { - "fee": "0.002850509311", + "fee": "0.002877579653", "feeAsset": "BNC", - "feeNative": "2850509311" + "feeNative": "2877579653" } }, "bifrost-hydration-vdot": { - "updated": 1733052245509, + "updated": 1733063743519, "destination": { - "fee": "0.0000693933", + "fee": "0.0000699059", "feeAsset": "vDOT", - "feeNative": "693933" + "feeNative": "699059" } }, "bifrost-hydration-vastr": { - "updated": 1733052258967, + "updated": 1733063749602, "destination": { - "fee": "0.008951224627863061", + "fee": "0.008916923833903362", "feeAsset": "vASTR", - "feeNative": "8951224627863061" + "feeNative": "8916923833903362" } }, "bifrost-hydration-dot": { - "updated": 1733052267141, + "updated": 1733063757964, "destination": { - "fee": "0.0442526313", + "fee": "0.0442536204", "feeAsset": "DOT", - "feeNative": "442526313" + "feeNative": "442536204" } }, "bifrost-polkadot-dot": { - "updated": 1733052271107, + "updated": 1733063762187, "destination": { "fee": "0.0021232099", "feeAsset": "DOT", @@ -168,7 +168,7 @@ } }, "bifrost-assethub-pink": { - "updated": 1733052277851, + "updated": 1733063767822, "destination": { "fee": "0.18", "feeAsset": "USDT", @@ -176,47 +176,47 @@ } }, "bifrost-assethub-usdt": { - "updated": 1733052282055, + "updated": 1733063771947, "destination": { - "fee": "0.03219", + "fee": "0.033229", "feeAsset": "USDT", - "feeNative": "32190" + "feeNative": "33229" } }, "bifrost-assethub-usdc": { - "updated": 1733052286595, + "updated": 1733063776740, "destination": { - "fee": "0.032621", + "fee": "0.032623", "feeAsset": "USDC", - "feeNative": "32621" + "feeNative": "32623" } }, "centrifuge-hydration-cfg": { - "updated": 1733052294872, + "updated": 1733063784936, "destination": { - "fee": "0.002058201047786664", + "fee": "0.002066790211584813", "feeAsset": "CFG", - "feeNative": "2058201047786664" + "feeNative": "2066790211584813" } }, "crust-hydration-cru": { - "updated": 1733052316482, + "updated": 1733063799667, "destination": { - "fee": "0.001231657586", + "fee": "0.00124216395", "feeAsset": "CRU", - "feeNative": "1231657586" + "feeNative": "1242163950" } }, "darwinia-hydration-ring": { - "updated": 1733052336352, + "updated": 1733063820199, "destination": { - "fee": "0.419631906530614329", + "fee": "0.422535908243999995", "feeAsset": "RING", - "feeNative": "419631906530614329" + "feeNative": "422535908243999995" } }, "hydration-acala-aca": { - "updated": 1733052342909, + "updated": 1733063831273, "destination": { "fee": "0.0074712", "feeAsset": "ACA", @@ -224,7 +224,7 @@ } }, "hydration-acala-ldot": { - "updated": 1733052348280, + "updated": 1733063837434, "destination": { "fee": "0.0005854634", "feeAsset": "LDOT", @@ -232,7 +232,7 @@ } }, "hydration-ajuna-ajun": { - "updated": 1733052353339, + "updated": 1733063852571, "destination": { "fee": "0.00028", "feeAsset": "AJUN", @@ -240,7 +240,7 @@ } }, "hydration-assethub-dot": { - "updated": 1733052358712, + "updated": 1733063857272, "destination": { "fee": "0.1814465", "feeAsset": "DOT", @@ -248,23 +248,23 @@ } }, "hydration-assethub-usdt": { - "updated": 1733052362542, + "updated": 1733063860903, "destination": { - "fee": "0.032191", + "fee": "0.033229", "feeAsset": "USDT", - "feeNative": "32191" + "feeNative": "33229" } }, "hydration-assethub-usdc": { - "updated": 1733052366338, + "updated": 1733063864401, "destination": { - "fee": "0.032621", + "fee": "0.032623", "feeAsset": "USDC", - "feeNative": "32621" + "feeNative": "32623" } }, "hydration-assethub-pink": { - "updated": 1733052370082, + "updated": 1733063867960, "destination": { "fee": "0.18", "feeAsset": "USDT", @@ -272,7 +272,7 @@ } }, "hydration-assethub-ded": { - "updated": 1733052373807, + "updated": 1733063871659, "destination": { "fee": "0.18", "feeAsset": "USDT", @@ -280,7 +280,7 @@ } }, "hydration-assethub-dota": { - "updated": 1733052377427, + "updated": 1733063875466, "destination": { "fee": "0.18", "feeAsset": "USDT", @@ -288,7 +288,7 @@ } }, "hydration-assethub-wud": { - "updated": 1733052381415, + "updated": 1733063880477, "destination": { "fee": "0.18", "feeAsset": "USDT", @@ -296,7 +296,7 @@ } }, "hydration-astar-astr": { - "updated": 1733052387334, + "updated": 1733063888177, "destination": { "fee": "0.038541720104787343", "feeAsset": "ASTR", @@ -304,7 +304,7 @@ } }, "hydration-astar-dot": { - "updated": 1733052393001, + "updated": 1733063894498, "destination": { "fee": "0.0442215927", "feeAsset": "DOT", @@ -312,7 +312,7 @@ } }, "hydration-bifrost-bnc": { - "updated": 1733052400688, + "updated": 1733063900065, "destination": { "fee": "0.149429366457", "feeAsset": "BNC", @@ -320,31 +320,31 @@ } }, "hydration-bifrost-vdot": { - "updated": 1733052405398, + "updated": 1733063909410, "destination": { - "fee": "0.0034644245", + "fee": "0.0034911053", "feeAsset": "vDOT", - "feeNative": "34644245" + "feeNative": "34911053" } }, "hydration-bifrost-vastr": { - "updated": 1733052411250, + "updated": 1733063915561, "destination": { - "fee": "0.701812389625", + "fee": "0.70905087478125", "feeAsset": "vASTR", - "feeNative": "701812389625000000" + "feeNative": "709050874781250000" } }, "hydration-bifrost-dot": { - "updated": 1733052417963, + "updated": 1733063922823, "destination": { - "fee": "0.0503237563", + "fee": "0.0503733551", "feeAsset": "DOT", - "feeNative": "503237563" + "feeNative": "503733551" } }, "hydration-centrifuge-cfg": { - "updated": 1733052423604, + "updated": 1733063939109, "destination": { "fee": "0.0064296", "feeAsset": "CFG", @@ -352,7 +352,7 @@ } }, "hydration-crust-cru": { - "updated": 1733052428766, + "updated": 1733063943713, "destination": { "fee": "0.04", "feeAsset": "CRU", @@ -360,7 +360,7 @@ } }, "hydration-darwinia-ring": { - "updated": 1733052438257, + "updated": 1733063955311, "destination": { "fee": "0.040188403234362692", "feeAsset": "RING", @@ -368,7 +368,7 @@ } }, "hydration-interlay-ibtc": { - "updated": 1733052460853, + "updated": 1733063979360, "destination": { "fee": "0.00000063", "feeAsset": "IBTC", @@ -376,7 +376,7 @@ } }, "hydration-interlay-intr": { - "updated": 1733052465574, + "updated": 1733063986200, "destination": { "fee": "0.0019213457", "feeAsset": "INTR", @@ -384,7 +384,7 @@ } }, "hydration-interlay-dot": { - "updated": 1733052472738, + "updated": 1733063991730, "destination": { "fee": "0.045934345", "feeAsset": "DOT", @@ -392,7 +392,7 @@ } }, "hydration-interlay-hdx": { - "updated": 1733052477039, + "updated": 1733063996203, "destination": { "fee": "0.405777777777", "feeAsset": "HDX", @@ -400,7 +400,7 @@ } }, "hydration-kilt-kilt": { - "updated": 1733052485143, + "updated": 1733064004327, "destination": { "fee": "0.000000000027609", "feeAsset": "KILT", @@ -408,7 +408,7 @@ } }, "hydration-moonbeam-hdx": { - "updated": 1733052497109, + "updated": 1733064017435, "destination": { "fee": "3.488962557199", "feeAsset": "HDX", @@ -416,7 +416,7 @@ } }, "hydration-moonbeam-glmr": { - "updated": 1733052509129, + "updated": 1733064030841, "destination": { "fee": "0.0095040525", "feeAsset": "GLMR", @@ -424,7 +424,7 @@ } }, "hydration-moonbeam-dot": { - "updated": 1733052521428, + "updated": 1733064044694, "destination": { "fee": "0.0513335994", "feeAsset": "DOT", @@ -432,7 +432,7 @@ } }, "hydration-moonbeam-dai_mwh": { - "updated": 1733052549864, + "updated": 1733064070972, "destination": { "fee": "0.08", "feeAsset": "GLMR", @@ -440,7 +440,7 @@ } }, "hydration-moonbeam-usdc_mwh": { - "updated": 1733052580192, + "updated": 1733064101273, "destination": { "fee": "0.08", "feeAsset": "GLMR", @@ -448,7 +448,7 @@ } }, "hydration-moonbeam-usdt_mwh": { - "updated": 1733052616013, + "updated": 1733064131318, "destination": { "fee": "0.08", "feeAsset": "GLMR", @@ -456,7 +456,7 @@ } }, "hydration-moonbeam-wbtc_mwh": { - "updated": 1733052640488, + "updated": 1733064161438, "destination": { "fee": "0.08", "feeAsset": "GLMR", @@ -464,7 +464,7 @@ } }, "hydration-moonbeam-weth_mwh": { - "updated": 1733052670217, + "updated": 1733064191813, "destination": { "fee": "0.08", "feeAsset": "GLMR", @@ -472,7 +472,7 @@ } }, "hydration-mythos-myth": { - "updated": 1733052676814, + "updated": 1733064197972, "destination": { "fee": "0.262144", "feeAsset": "MYTH", @@ -480,7 +480,7 @@ } }, "hydration-polkadot-dot": { - "updated": 1733052680598, + "updated": 1733064201718, "destination": { "fee": "0.0021232099", "feeAsset": "DOT", @@ -488,7 +488,7 @@ } }, "hydration-pendulum-pen": { - "updated": 1733052698653, + "updated": 1733064219968, "destination": { "fee": "1", "feeAsset": "PEN", @@ -496,7 +496,7 @@ } }, "hydration-subsocial-sub": { - "updated": 1733052713080, + "updated": 1733064238252, "destination": { "fee": "0.64", "feeAsset": "SUB", @@ -504,7 +504,7 @@ } }, "hydration-unique-unq": { - "updated": 1733052722275, + "updated": 1733064259127, "destination": { "fee": "0", "feeAsset": "UNQ", @@ -512,7 +512,7 @@ } }, "hydration-zeitgeist-ztg": { - "updated": 1733052727901, + "updated": 1733064264714, "destination": { "fee": "0.0064296", "feeAsset": "ZTG", @@ -520,7 +520,7 @@ } }, "hydration-zeitgeist-glmr": { - "updated": 1733052740699, + "updated": 1733064277700, "destination": { "fee": "0.0062726556", "feeAsset": "GLMR", @@ -528,7 +528,7 @@ } }, "hydration-zeitgeist-usdc_mwh": { - "updated": 1733052753318, + "updated": 1733064290281, "destination": { "fee": "0.1", "feeAsset": "GLMR", @@ -536,23 +536,23 @@ } }, "kilt-hydration-kilt": { - "updated": 1733052758512, + "updated": 1733064295522, "destination": { - "fee": "0.005859321444802", + "fee": "0.005858405308471", "feeAsset": "KILT", - "feeNative": "5859321444802" + "feeNative": "5858405308471" } }, "interlay-hydration-intr": { - "updated": 1733052764018, + "updated": 1733064300865, "destination": { - "fee": "0.058615515", + "fee": "0.057549725", "feeAsset": "INTR", - "feeNative": "586155150" + "feeNative": "575497250" } }, "interlay-hydration-ibtc": { - "updated": 1733052769063, + "updated": 1733064305686, "destination": { "fee": "0.01137864", "feeAsset": "INTR", @@ -560,15 +560,15 @@ } }, "interlay-hydration-dot": { - "updated": 1733052775210, + "updated": 1733064312706, "destination": { - "fee": "0.044252679", + "fee": "0.0442536903", "feeAsset": "DOT", - "feeNative": "442526790" + "feeNative": "442536903" } }, "interlay-hydration-hdx": { - "updated": 1733052780380, + "updated": 1733064317768, "destination": { "fee": "0.062262236086", "feeAsset": "HDX", @@ -576,23 +576,23 @@ } }, "mythos-hydration-myth": { - "updated": 1733052785382, + "updated": 1733064328688, "destination": { - "fee": "0.00309415802553245", + "fee": "0.00315404891951223", "feeAsset": "MYTH", - "feeNative": "3094158025532450" + "feeNative": "3154048919512230" } }, "mythos-assethub-myth": { - "updated": 1733052788075, + "updated": 1733064331308, "destination": { - "fee": "0.045957304441075014", + "fee": "0.051754856532716448", "feeAsset": "MYTH", - "feeNative": "45957304441075014" + "feeNative": "51754856532716448" } }, "pendulum-hydration-pen": { - "updated": 1733052796768, + "updated": 1733064338600, "destination": { "fee": "0.014885684029", "feeAsset": "PEN", @@ -600,23 +600,23 @@ } }, "polkadot-hydration-dot": { - "updated": 1733052801864, + "updated": 1733064343334, "destination": { - "fee": "0.0001196119", + "fee": "0.000120622", "feeAsset": "DOT", - "feeNative": "1196119" + "feeNative": "1206220" } }, "polkadot-bifrost-dot": { - "updated": 1733052805886, + "updated": 1733064347073, "destination": { - "fee": "0.0061906729", + "fee": "0.0062402717", "feeAsset": "DOT", - "feeNative": "61906729" + "feeNative": "62402717" } }, "polkadot-assethub-dot": { - "updated": 1733052808886, + "updated": 1733064350506, "destination": { "fee": "0.0017965", "feeAsset": "DOT", @@ -624,43 +624,51 @@ } }, "subsocial-hydration-sub": { - "updated": 1733052814849, + "updated": 1733064356876, "destination": { - "fee": "0.6530672671", + "fee": "0.6587642258", "feeAsset": "SUB", - "feeNative": "6530672671" + "feeNative": "6587642258" } }, "unique-hydration-unq": { - "updated": 1733052824284, + "updated": 1733064368766, "destination": { - "fee": "0.13710473938737098", + "fee": "0.142758713876999205", "feeAsset": "UNQ", - "feeNative": "137104739387370980" + "feeNative": "142758713876999205" } }, "zeitgeist-hydration-ztg": { - "updated": 1733052829260, + "updated": 1733064376872, "destination": { - "fee": "0.0619517587", + "fee": "0.0623190896", "feeAsset": "ZTG", - "feeNative": "619517587" + "feeNative": "623190896" } }, "zeitgeist-hydration-glmr": { - "updated": 1733052843040, + "updated": 1733064390238, "destination": { - "fee": "0.00791297870452645", + "fee": "0.007937339454491052", "feeAsset": "GLMR", - "feeNative": "7912978704526450" + "feeNative": "7937339454491052" } }, "zeitgeist-hydration-usdc_mwh": { - "updated": 1733052864479, + "updated": 1733064403646, "destination": { "fee": "0.1", "feeAsset": "GLMR", "feeNative": "100000000000000000" } + }, + "assethub-hydration-wud": { + "updated": 1733063594290, + "destination": { + "fee": "0.02", + "feeAsset": "USDT", + "feeNative": "20000" + } } } \ No newline at end of file diff --git a/integration-tests/xcm-test/src/__snapshots__/e2e.spec.ts.snap b/integration-tests/xcm-test/src/__snapshots__/e2e.spec.ts.snap index e1807ce8..a3f83996 100644 --- a/integration-tests/xcm-test/src/__snapshots__/e2e.spec.ts.snap +++ b/integration-tests/xcm-test/src/__snapshots__/e2e.spec.ts.snap @@ -77,6 +77,13 @@ Array [ ] `; +exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Hydration WUD [wud] transfer 1`] = ` +Array [ + "assethub-hydration-wud", + "0x4d01041f0803010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0308000002043205011f0082380100000002043205a6e90100000700e87648170000000000", +] +`; + exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Moonbeam USDC [usdc] transfer 1`] = ` Array [ "assethub-moonbeam-usdc", From 77c6b79db72552679e2fc37c34a24df97fc73eeb Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Mon, 2 Dec 2024 16:40:11 +0100 Subject: [PATCH 16/21] normalize hub x1 keys --- packages/xcm-cfg/src/builders/BalanceBuilder.ts | 8 +------- packages/xcm-cfg/src/builders/ExtrinsicBuilder.utils.ts | 2 +- .../xcm-cfg/src/builders/extrinsics/v4/polkadotXcm.ts | 1 - packages/xcm-cfg/src/chains.ts | 8 +++++--- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/packages/xcm-cfg/src/builders/BalanceBuilder.ts b/packages/xcm-cfg/src/builders/BalanceBuilder.ts index 3ce15a52..a7d71e9b 100644 --- a/packages/xcm-cfg/src/builders/BalanceBuilder.ts +++ b/packages/xcm-cfg/src/builders/BalanceBuilder.ts @@ -98,13 +98,7 @@ function foreignAssets() { build: ({ address, asset, chain }) => { const ctx = chain as Parachain; - // TODO - use v4 locations const assetLocation = ctx.getAssetXcmLocation(asset); - const normalizeAssetLocation = normalizeInterior( - assetLocation!, - XcmVersion.v4 - ); - if (!assetLocation) { throw new Error('Missing asset xcm location for ' + asset.key); } @@ -112,7 +106,7 @@ function foreignAssets() { return new SubstrateQueryConfig({ module: 'foreignAssets', func: 'account', - args: [normalizeAssetLocation, address], + args: [assetLocation, address], transform: async ( response: Option ): Promise => response.unwrapOrDefault().balance.toBigInt(), diff --git a/packages/xcm-cfg/src/builders/ExtrinsicBuilder.utils.ts b/packages/xcm-cfg/src/builders/ExtrinsicBuilder.utils.ts index c2ff453c..27c2128b 100644 --- a/packages/xcm-cfg/src/builders/ExtrinsicBuilder.utils.ts +++ b/packages/xcm-cfg/src/builders/ExtrinsicBuilder.utils.ts @@ -86,7 +86,7 @@ export function normalizeInterior( return { parents, interior: { - X1: [interior.X1], + X1: Array.isArray(interior.X1) ? interior.X1 : [interior.X1], }, }; } diff --git a/packages/xcm-cfg/src/builders/extrinsics/v4/polkadotXcm.ts b/packages/xcm-cfg/src/builders/extrinsics/v4/polkadotXcm.ts index ee35d121..25d80dde 100644 --- a/packages/xcm-cfg/src/builders/extrinsics/v4/polkadotXcm.ts +++ b/packages/xcm-cfg/src/builders/extrinsics/v4/polkadotXcm.ts @@ -44,7 +44,6 @@ const limitedTeleportAssets = (): ExtrinsicConfigBuilder => ({ const assets = { [version]: [transferAsset], }; - return [dest, beneficiary, assets, 0, 'Unlimited']; }, }), diff --git a/packages/xcm-cfg/src/chains.ts b/packages/xcm-cfg/src/chains.ts index b7951c4f..a0cebf1c 100644 --- a/packages/xcm-cfg/src/chains.ts +++ b/packages/xcm-cfg/src/chains.ts @@ -234,9 +234,11 @@ export const assetHub = new Parachain({ xcmLocation: { parents: 1, interior: { - X1: { - Parachain: 3369, - }, + X1: [ + { + Parachain: 3369, + }, + ], }, }, }, From b43bda1ed8ada5f510871f59d05e76c26218d925 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Mon, 2 Dec 2024 16:40:36 +0100 Subject: [PATCH 17/21] bump hydration - moonbeam hdx fee --- packages/xcm-cfg/src/configs/polkadot/hydration/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/xcm-cfg/src/configs/polkadot/hydration/index.ts b/packages/xcm-cfg/src/configs/polkadot/hydration/index.ts index 77b5ff38..aa477019 100644 --- a/packages/xcm-cfg/src/configs/polkadot/hydration/index.ts +++ b/packages/xcm-cfg/src/configs/polkadot/hydration/index.ts @@ -486,7 +486,7 @@ const toMoonbeam: AssetRoute[] = [ chain: moonbeam, asset: hdx, fee: { - amount: 0.835, + amount: 5, asset: hdx, }, }, From 25e5feae34f0db5698a35b0116749c2372a02767 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Mon, 2 Dec 2024 16:40:46 +0100 Subject: [PATCH 18/21] fix events npe --- integration-tests/xcm-test/src/ctx/e2e/events.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/xcm-test/src/ctx/e2e/events.ts b/integration-tests/xcm-test/src/ctx/e2e/events.ts index 6ad1bd2c..4c242475 100644 --- a/integration-tests/xcm-test/src/ctx/e2e/events.ts +++ b/integration-tests/xcm-test/src/ctx/e2e/events.ts @@ -53,7 +53,7 @@ export function checkIfProcessed(events: EventRecord[]): boolean { function checkProcessedStatus(data: AnyJson): boolean { const dataEntry = findNestedKey(data, 'success'); - return dataEntry['success'] === true; + return dataEntry && dataEntry['success'] === true; } function logEvent(section: string, method: string, data: AnyJson) { From bc5b5b96d47d2e8305e58f4ab95709f3698cbda1 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Mon, 2 Dec 2024 16:40:58 +0100 Subject: [PATCH 19/21] update exec spec --- integration-tests/xcm-test/src/exec.spec.ts | 24 +++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/integration-tests/xcm-test/src/exec.spec.ts b/integration-tests/xcm-test/src/exec.spec.ts index 87cd52ed..5fd9064b 100644 --- a/integration-tests/xcm-test/src/exec.spec.ts +++ b/integration-tests/xcm-test/src/exec.spec.ts @@ -1,4 +1,5 @@ import { + AnyChain, ConfigBuilder, Parachain, SubstrateApis, @@ -35,6 +36,17 @@ const getKey = () => { return key; }; +const getChainsCtx = (source: AnyChain, destination: AnyChain) => { + const relay = configService.getChain('polkadot'); + const dex = configService.getChain('hydration'); + + const isDexTransfer = source.key === dex.key || destination.key === dex.key; + if (isDexTransfer) { + return [source, destination, relay] as Parachain[]; + } + return [source, destination, relay, dex] as Parachain[]; +}; + describe('Wallet with XCM config', () => { jest.setTimeout(3 * 60 * 1000); // Execution time <= 3 min @@ -45,18 +57,15 @@ describe('Wallet with XCM config', () => { const key = getKey(); const [srcChainKey, destChainKey, assetKey] = key.split('-'); - const relay = configService.getChain('polkadot'); + const srcChain = configService.getChain(srcChainKey); const destChain = configService.getChain(destChainKey); const asset = configService.getAsset(assetKey); beforeAll(async () => { global.console = console; - networks = await createNetworks([ - srcChain, - destChain, - relay, - ] as Parachain[]); + const chains = getChainsCtx(srcChain, destChain); + networks = await createNetworks(chains); const ctx = networks.find((n) => n.config.key === 'hydration')!; wallet = await initWithCtx(ctx); }); @@ -97,6 +106,9 @@ describe('Wallet with XCM config', () => { networks: networks, wallet: wallet, }; + }, + { + sync: true, } ); }); From 6ba4fc1dc98ddff5bf0f4fe2a2c5a73f251a8fe1 Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Mon, 2 Dec 2024 19:32:09 +0100 Subject: [PATCH 20/21] update storage (foreign support) --- .../xcm-test/src/__db__/_1_metadata.db.json | 268 --------- .../xcm-test/src/__db__/_2_metadata.db.json | 205 ------- .../xcm-test/src/__db__/_3_metadata.db.json | 30 - .../xcm-test/src/__db__/metadata.db.json | 256 +++++---- .../src/__snapshots__/e2e.spec.ts.snap | 525 +----------------- .../xcm-test/src/ctx/e2e/storage.ts | 57 +- integration-tests/xcm-test/src/ctx/e2e/xcm.ts | 8 +- integration-tests/xcm-test/src/e2e.spec.ts | 1 + integration-tests/xcm-test/src/exec.spec.ts | 3 +- 9 files changed, 204 insertions(+), 1149 deletions(-) delete mode 100644 integration-tests/xcm-test/src/__db__/_1_metadata.db.json delete mode 100644 integration-tests/xcm-test/src/__db__/_2_metadata.db.json delete mode 100644 integration-tests/xcm-test/src/__db__/_3_metadata.db.json diff --git a/integration-tests/xcm-test/src/__db__/_1_metadata.db.json b/integration-tests/xcm-test/src/__db__/_1_metadata.db.json deleted file mode 100644 index 26072f61..00000000 --- a/integration-tests/xcm-test/src/__db__/_1_metadata.db.json +++ /dev/null @@ -1,268 +0,0 @@ -{ - "hydration-ajuna-ajun": { - "destination": { - "fee": "0.00028", - "feeAsset": "AJUN", - "feeNative": "280000000" - } - }, - "hydration-assethub-dot": { - "destination": { - "fee": "0.181447", - "feeAsset": "DOT", - "feeNative": "1814465000" - } - }, - "hydration-assethub-usdt": { - "destination": { - "fee": "0.019406", - "feeAsset": "USDT", - "feeNative": "19406" - } - }, - "hydration-assethub-usdc": { - "destination": { - "fee": "0.019571", - "feeAsset": "USDC", - "feeNative": "19571" - } - }, - "hydration-assethub-pink": { - "destination": { - "fee": "0.18", - "feeAsset": "USDT", - "feeNative": "180000" - } - }, - "hydration-assethub-ded": { - "destination": { - "fee": "0.18", - "feeAsset": "USDT", - "feeNative": "180000" - } - }, - "hydration-assethub-dota": { - "destination": { - "fee": "0.18", - "feeAsset": "USDT", - "feeNative": "180000" - } - }, - "hydration-assethub-wud": { - "destination": { - "fee": "0.18", - "feeAsset": "USDT", - "feeNative": "180000" - } - }, - "hydration-astar-astr": { - "destination": { - "fee": "0.038542", - "feeAsset": "ASTR", - "feeNative": "38541720104787343" - } - }, - "hydration-astar-dot": { - "destination": { - "fee": "0.044222", - "feeAsset": "DOT", - "feeNative": "442215927" - } - }, - "hydration-bifrost-bnc": { - "destination": { - "fee": "0.000598", - "feeAsset": "BNC", - "feeNative": "597696000" - } - }, - "hydration-bifrost-vdot": { - "destination": { - "fee": "0", - "feeAsset": "vDOT", - "feeNative": "747" - } - }, - "hydration-bifrost-vastr": { - "destination": { - "fee": "0.000007", - "feeAsset": "vASTR", - "feeNative": "7471200000000" - } - }, - "hydration-bifrost-dot": { - "destination": { - "fee": "0.045067", - "feeAsset": "DOT", - "feeNative": "450669834" - } - }, - "hydration-centrifuge-cfg": { - "destination": { - "fee": "0.00643", - "feeAsset": "CFG", - "feeNative": "6429600000000000" - } - }, - "hydration-crust-cru": { - "destination": { - "fee": "0.04", - "feeAsset": "CRU", - "feeNative": "40000000000" - } - }, - "hydration-darwinia-ring": { - "destination": { - "fee": "0.040188", - "feeAsset": "RING", - "feeNative": "40188403234362692" - } - }, - "hydration-interlay-ibtc": { - "destination": { - "fee": "0.000001", - "feeAsset": "IBTC", - "feeNative": "63" - } - }, - "hydration-interlay-intr": { - "destination": { - "fee": "0.001921", - "feeAsset": "INTR", - "feeNative": "19213457" - } - }, - "hydration-interlay-dot": { - "destination": { - "fee": "0.045934", - "feeAsset": "DOT", - "feeNative": "459343450" - } - }, - "hydration-interlay-hdx": { - "destination": { - "fee": "0.405778", - "feeAsset": "HDX", - "feeNative": "405777777777" - } - }, - "hydration-kilt-kilt": { - "destination": { - "fee": "0", - "feeAsset": "KILT", - "feeNative": "27609" - } - }, - "hydration-moonbeam-hdx": { - "destination": { - "fee": "3.488963", - "feeAsset": "HDX", - "feeNative": "3488962557199" - } - }, - "hydration-moonbeam-glmr": { - "destination": { - "fee": "0.009504", - "feeAsset": "GLMR", - "feeNative": "9504052500000000" - } - }, - "hydration-moonbeam-dot": { - "destination": { - "fee": "0.051334", - "feeAsset": "DOT", - "feeNative": "513335994" - } - }, - "hydration-moonbeam-dai_mwh": { - "destination": { - "fee": "0.08", - "feeAsset": "GLMR", - "feeNative": "80000000000000000" - } - }, - "hydration-moonbeam-usdc_mwh": { - "destination": { - "fee": "0.08", - "feeAsset": "GLMR", - "feeNative": "80000000000000000" - } - }, - "hydration-moonbeam-usdt_mwh": { - "destination": { - "fee": "0.08", - "feeAsset": "GLMR", - "feeNative": "80000000000000000" - } - }, - "hydration-moonbeam-wbtc_mwh": { - "destination": { - "fee": "0.08", - "feeAsset": "GLMR", - "feeNative": "80000000000000000" - } - }, - "hydration-moonbeam-weth_mwh": { - "destination": { - "fee": "0.08", - "feeAsset": "GLMR", - "feeNative": "80000000000000000" - } - }, - "hydration-mythos-myth": { - "destination": { - "fee": "0.262144", - "feeAsset": "MYTH", - "feeNative": "262144000000000000" - } - }, - "hydration-polkadot-dot": { - "destination": { - "fee": "0.002123", - "feeAsset": "DOT", - "feeNative": "21232099" - } - }, - "hydration-pendulum-pen": { - "destination": { - "fee": "1", - "feeAsset": "PEN", - "feeNative": "1000000000000" - } - }, - "hydration-subsocial-sub": { - "destination": { - "fee": "0.64", - "feeAsset": "SUB", - "feeNative": "6400000000" - } - }, - "hydration-unique-unq": { - "destination": { - "fee": "0", - "feeAsset": "UNQ", - "feeNative": "0" - } - }, - "hydration-zeitgeist-ztg": { - "destination": { - "fee": "0.00643", - "feeAsset": "ZTG", - "feeNative": "64296000" - } - }, - "hydration-zeitgeist-glmr": { - "destination": { - "fee": "0.006273", - "feeAsset": "GLMR", - "feeNative": "6272655600000000" - } - }, - "hydration-zeitgeist-usdc_mwh": { - "destination": { - "fee": "0.1", - "feeAsset": "GLMR", - "feeNative": "100000000000000000" - } - } -} \ No newline at end of file diff --git a/integration-tests/xcm-test/src/__db__/_2_metadata.db.json b/integration-tests/xcm-test/src/__db__/_2_metadata.db.json deleted file mode 100644 index 4ea55b84..00000000 --- a/integration-tests/xcm-test/src/__db__/_2_metadata.db.json +++ /dev/null @@ -1,205 +0,0 @@ -{ - "ajuna-hydration-ajun": { - "destination": { - "fee": "0.000067", - "feeAsset": "AJUN", - "feeNative": "67081566" - } - }, - "astar-hydration-astr": { - "destination": { - "fee": "0.010792", - "feeAsset": "ASTR", - "feeNative": "10792318458562647" - } - }, - "astar-hydration-dot": { - "destination": { - "fee": "0.044284", - "feeAsset": "DOT", - "feeNative": "442837894" - } - }, - "bifrost-hydration-bnc": { - "destination": { - "fee": "0.003294", - "feeAsset": "BNC", - "feeNative": "3293720297" - } - }, - "bifrost-hydration-vdot": { - "destination": { - "fee": "0.000087", - "feeAsset": "vDOT", - "feeNative": "869693" - } - }, - "bifrost-hydration-vastr": { - "destination": { - "fee": "0.009248", - "feeAsset": "vASTR", - "feeNative": "9248157413810034" - } - }, - "bifrost-hydration-dot": { - "destination": { - "fee": "0.044284", - "feeAsset": "DOT", - "feeNative": "442837723" - } - }, - "bifrost-polkadot-dot": { - "destination": { - "fee": "0.002123", - "feeAsset": "DOT", - "feeNative": "21232099" - } - }, - "bifrost-assethub-pink": { - "destination": { - "fee": "0.18", - "feeAsset": "USDT", - "feeNative": "180000" - } - }, - "bifrost-assethub-usdt": { - "destination": { - "fee": "0.019406", - "feeAsset": "USDT", - "feeNative": "19406" - } - }, - "centrifuge-hydration-cfg": { - "destination": { - "fee": "0.002033", - "feeAsset": "CFG", - "feeNative": "2033310578895362" - } - }, - "crust-hydration-cru": { - "destination": { - "fee": "0.001626", - "feeAsset": "CRU", - "feeNative": "1626063560" - } - }, - "darwinia-hydration-ring": { - "destination": { - "fee": "0.365245", - "feeAsset": "RING", - "feeNative": "365245224404506053" - } - }, - "kilt-hydration-kilt": { - "destination": { - "fee": "0.005493", - "feeAsset": "KILT", - "feeNative": "5492695180902" - } - }, - "interlay-hydration-intr": { - "destination": { - "fee": "0.061011", - "feeAsset": "INTR", - "feeNative": "610110895" - } - }, - "interlay-hydration-ibtc": { - "destination": { - "fee": "0", - "feeAsset": "IBTC", - "feeNative": "0" - } - }, - "interlay-hydration-dot": { - "destination": { - "fee": "0.044284", - "feeAsset": "DOT", - "feeNative": "442837755" - } - }, - "interlay-hydration-hdx": { - "destination": { - "fee": "0.062262", - "feeAsset": "HDX", - "feeNative": "62262236086" - } - }, - "mythos-hydration-myth": { - "destination": { - "fee": "0.004635", - "feeAsset": "MYTH", - "feeNative": "4635301348551696" - } - }, - "mythos-assethub-myth": { - "destination": { - "fee": "0.050744", - "feeAsset": "MYTH", - "feeNative": "50743760602955003" - } - }, - "pendulum-hydration-pen": { - "destination": { - "fee": "0.014886", - "feeAsset": "PEN", - "feeNative": "14885684029" - } - }, - "polkadot-hydration-dot": { - "destination": { - "fee": "0.000151", - "feeAsset": "DOT", - "feeNative": "1506939" - } - }, - "polkadot-bifrost-dot": { - "destination": { - "fee": "0.000934", - "feeAsset": "DOT", - "feeNative": "9339000" - } - }, - "polkadot-assethub-dot": { - "destination": { - "fee": "0.001797", - "feeAsset": "DOT", - "feeNative": "17965000" - } - }, - "subsocial-hydration-sub": { - "destination": { - "fee": "0.529919", - "feeAsset": "SUB", - "feeNative": "5299190968" - } - }, - "unique-hydration-unq": { - "destination": { - "fee": "0.119909", - "feeAsset": "UNQ", - "feeNative": "119908578533484926" - } - }, - "zeitgeist-hydration-ztg": { - "destination": { - "fee": "0.048282", - "feeAsset": "ZTG", - "feeNative": "482824664" - } - }, - "zeitgeist-hydration-glmr": { - "destination": { - "fee": "0.008833", - "feeAsset": "GLMR", - "feeNative": "8832708919466447" - } - }, - "zeitgeist-hydration-usdc_mwh": { - "destination": { - "fee": "0.1", - "feeAsset": "GLMR", - "feeNative": "100000000000000000" - } - } -} \ No newline at end of file diff --git a/integration-tests/xcm-test/src/__db__/_3_metadata.db.json b/integration-tests/xcm-test/src/__db__/_3_metadata.db.json deleted file mode 100644 index fb46607a..00000000 --- a/integration-tests/xcm-test/src/__db__/_3_metadata.db.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "interlay-hydration-intr": { - "destination": { - "fee": "0.060805", - "feeAsset": "INTR", - "feeNative": "608051075" - } - }, - "interlay-hydration-ibtc": { - "destination": { - "fee": "0.011379", - "feeAsset": "INTR", - "feeNative": "113786400" - } - }, - "interlay-hydration-dot": { - "destination": { - "fee": "0.044284", - "feeAsset": "DOT", - "feeNative": "442844305" - } - }, - "interlay-hydration-hdx": { - "destination": { - "fee": "0.062262", - "feeAsset": "HDX", - "feeNative": "62262236086" - } - } -} \ No newline at end of file diff --git a/integration-tests/xcm-test/src/__db__/metadata.db.json b/integration-tests/xcm-test/src/__db__/metadata.db.json index fa98b391..6d21a240 100644 --- a/integration-tests/xcm-test/src/__db__/metadata.db.json +++ b/integration-tests/xcm-test/src/__db__/metadata.db.json @@ -1,6 +1,6 @@ { "acala-hydration-aca": { - "updated": 1733063513183, + "updated": 1733156064074, "destination": { "fee": "0.008078835878", "feeAsset": "ACA", @@ -8,7 +8,7 @@ } }, "acala-hydration-ldot": { - "updated": 1733063519032, + "updated": 1733156069636, "destination": { "fee": "0.0008920718", "feeAsset": "LDOT", @@ -16,7 +16,7 @@ } }, "ajuna-hydration-ajun": { - "updated": 1733063526199, + "updated": 1733159404462, "destination": { "fee": "0.000067081566", "feeAsset": "AJUN", @@ -24,31 +24,31 @@ } }, "assethub-hydration-dot": { - "updated": 1733063550187, + "updated": 1733156216366, "destination": { - "fee": "0.000120532", + "fee": "0.000120827", "feeAsset": "DOT", - "feeNative": "1205320" + "feeNative": "1208270" } }, "assethub-hydration-usdt": { - "updated": 1733063555604, + "updated": 1733156220923, "destination": { - "fee": "0.001096", + "fee": "0.001099", "feeAsset": "USDT", - "feeNative": "1096" + "feeNative": "1099" } }, "assethub-hydration-usdc": { - "updated": 1733063560427, + "updated": 1733156227775, "destination": { - "fee": "0.001096", + "fee": "0.0011", "feeAsset": "USDC", - "feeNative": "1096" + "feeNative": "1100" } }, "assethub-hydration-pink": { - "updated": 1733063565171, + "updated": 1733156232296, "destination": { "fee": "0.02", "feeAsset": "USDT", @@ -56,7 +56,7 @@ } }, "assethub-hydration-ded": { - "updated": 1733063570706, + "updated": 1733156238680, "destination": { "fee": "0.02", "feeAsset": "USDT", @@ -64,7 +64,7 @@ } }, "assethub-hydration-dota": { - "updated": 1733063589660, + "updated": 1733156243241, "destination": { "fee": "0.02", "feeAsset": "USDT", @@ -72,7 +72,7 @@ } }, "assethub-polkadot-dot": { - "updated": 1733063597608, + "updated": 1733156251895, "destination": { "fee": "0.0021267087", "feeAsset": "DOT", @@ -80,7 +80,7 @@ } }, "assethub-moonbeam-usdt": { - "updated": 1733063614098, + "updated": 1733156267662, "destination": { "fee": "0.083585", "feeAsset": "USDT", @@ -88,7 +88,7 @@ } }, "assethub-moonbeam-usdc": { - "updated": 1733063625325, + "updated": 1733156280070, "destination": { "fee": "10", "feeAsset": "USDC", @@ -96,71 +96,71 @@ } }, "assethub-bifrost-usdt": { - "updated": 1733063693080, + "updated": 1733156317169, "destination": { - "fee": "0.056724", + "fee": "0.053965", "feeAsset": "USDT", - "feeNative": "56724" + "feeNative": "53965" } }, "assethub-bifrost-usdc": { - "updated": 1733063698858, + "updated": 1733156320634, "destination": { - "fee": "0.056724", + "fee": "0.053965", "feeAsset": "USDC", - "feeNative": "56724" + "feeNative": "53965" } }, "astar-hydration-astr": { - "updated": 1733063719455, + "updated": 1733156346180, "destination": { - "fee": "0.010341758692712396", + "fee": "0.010953357752110895", "feeAsset": "ASTR", - "feeNative": "10341758692712396" + "feeNative": "10953357752110895" } }, "astar-hydration-dot": { - "updated": 1733063726986, + "updated": 1733156354532, "destination": { - "fee": "0.0442536169", + "fee": "0.0442539182", "feeAsset": "DOT", - "feeNative": "442536169" + "feeNative": "442539182" } }, "bifrost-hydration-bnc": { - "updated": 1733063735029, + "updated": 1733156360987, "destination": { - "fee": "0.002877579653", + "fee": "0.002977302631", "feeAsset": "BNC", - "feeNative": "2877579653" + "feeNative": "2977302631" } }, "bifrost-hydration-vdot": { - "updated": 1733063743519, + "updated": 1733156368559, "destination": { - "fee": "0.0000699059", + "fee": "0.0000700362", "feeAsset": "vDOT", - "feeNative": "699059" + "feeNative": "700362" } }, "bifrost-hydration-vastr": { - "updated": 1733063749602, + "updated": 1733156374701, "destination": { - "fee": "0.008916923833903362", + "fee": "0.00943228310626571", "feeAsset": "vASTR", - "feeNative": "8916923833903362" + "feeNative": "9432283106265710" } }, "bifrost-hydration-dot": { - "updated": 1733063757964, + "updated": 1733156384016, "destination": { - "fee": "0.0442536204", + "fee": "0.0442539306", "feeAsset": "DOT", - "feeNative": "442536204" + "feeNative": "442539306" } }, "bifrost-polkadot-dot": { - "updated": 1733063762187, + "updated": 1733156388503, "destination": { "fee": "0.0021232099", "feeAsset": "DOT", @@ -176,47 +176,47 @@ } }, "bifrost-assethub-usdt": { - "updated": 1733063771947, + "updated": 1733156393779, "destination": { - "fee": "0.033229", + "fee": "0.032245", "feeAsset": "USDT", - "feeNative": "33229" + "feeNative": "32245" } }, "bifrost-assethub-usdc": { - "updated": 1733063776740, + "updated": 1733156397623, "destination": { - "fee": "0.032623", + "fee": "0.032339", "feeAsset": "USDC", - "feeNative": "32623" + "feeNative": "32339" } }, "centrifuge-hydration-cfg": { - "updated": 1733063784936, + "updated": 1733156406844, "destination": { - "fee": "0.002066790211584813", + "fee": "0.002129996479933514", "feeAsset": "CFG", - "feeNative": "2066790211584813" + "feeNative": "2129996479933514" } }, "crust-hydration-cru": { - "updated": 1733063799667, + "updated": 1733156422033, "destination": { - "fee": "0.00124216395", + "fee": "0.001281219233", "feeAsset": "CRU", - "feeNative": "1242163950" + "feeNative": "1281219233" } }, "darwinia-hydration-ring": { - "updated": 1733063820199, + "updated": 1733156431308, "destination": { - "fee": "0.422535908243999995", + "fee": "0.427949228921642917", "feeAsset": "RING", - "feeNative": "422535908243999995" + "feeNative": "427949228921642917" } }, "hydration-acala-aca": { - "updated": 1733063831273, + "updated": 1733156437625, "destination": { "fee": "0.0074712", "feeAsset": "ACA", @@ -224,11 +224,11 @@ } }, "hydration-acala-ldot": { - "updated": 1733063837434, + "updated": 1733156443040, "destination": { - "fee": "0.0005854634", + "fee": "0.0005535077", "feeAsset": "LDOT", - "feeNative": "5854634" + "feeNative": "5535077" } }, "hydration-ajuna-ajun": { @@ -240,7 +240,7 @@ } }, "hydration-assethub-dot": { - "updated": 1733063857272, + "updated": 1733156567945, "destination": { "fee": "0.1814465", "feeAsset": "DOT", @@ -248,23 +248,23 @@ } }, "hydration-assethub-usdt": { - "updated": 1733063860903, + "updated": 1733156572586, "destination": { - "fee": "0.033229", + "fee": "0.032246", "feeAsset": "USDT", - "feeNative": "33229" + "feeNative": "32246" } }, "hydration-assethub-usdc": { - "updated": 1733063864401, + "updated": 1733156576110, "destination": { - "fee": "0.032623", + "fee": "0.032339", "feeAsset": "USDC", - "feeNative": "32623" + "feeNative": "32339" } }, "hydration-assethub-pink": { - "updated": 1733063867960, + "updated": 1733156580032, "destination": { "fee": "0.18", "feeAsset": "USDT", @@ -272,7 +272,7 @@ } }, "hydration-assethub-ded": { - "updated": 1733063871659, + "updated": 1733156585402, "destination": { "fee": "0.18", "feeAsset": "USDT", @@ -280,7 +280,7 @@ } }, "hydration-assethub-dota": { - "updated": 1733063875466, + "updated": 1733156589100, "destination": { "fee": "0.18", "feeAsset": "USDT", @@ -288,7 +288,7 @@ } }, "hydration-assethub-wud": { - "updated": 1733063880477, + "updated": 1733156592805, "destination": { "fee": "0.18", "feeAsset": "USDT", @@ -296,7 +296,7 @@ } }, "hydration-astar-astr": { - "updated": 1733063888177, + "updated": 1733156603228, "destination": { "fee": "0.038541720104787343", "feeAsset": "ASTR", @@ -304,7 +304,7 @@ } }, "hydration-astar-dot": { - "updated": 1733063894498, + "updated": 1733156612487, "destination": { "fee": "0.0442215927", "feeAsset": "DOT", @@ -312,7 +312,7 @@ } }, "hydration-bifrost-bnc": { - "updated": 1733063900065, + "updated": 1733156617219, "destination": { "fee": "0.149429366457", "feeAsset": "BNC", @@ -320,31 +320,31 @@ } }, "hydration-bifrost-vdot": { - "updated": 1733063909410, + "updated": 1733156622540, "destination": { - "fee": "0.0034911053", + "fee": "0.0033105595", "feeAsset": "vDOT", - "feeNative": "34911053" + "feeNative": "33105595" } }, "hydration-bifrost-vastr": { - "updated": 1733063915561, + "updated": 1733156627112, "destination": { - "fee": "0.70905087478125", + "fee": "0.674563852359375", "feeAsset": "vASTR", - "feeNative": "709050874781250000" + "feeNative": "674563852359375000" } }, "hydration-bifrost-dot": { - "updated": 1733063922823, + "updated": 1733156636362, "destination": { - "fee": "0.0503733551", + "fee": "0.0500524423", "feeAsset": "DOT", - "feeNative": "503733551" + "feeNative": "500524423" } }, "hydration-centrifuge-cfg": { - "updated": 1733063939109, + "updated": 1733156642716, "destination": { "fee": "0.0064296", "feeAsset": "CFG", @@ -352,7 +352,7 @@ } }, "hydration-crust-cru": { - "updated": 1733063943713, + "updated": 1733156648250, "destination": { "fee": "0.04", "feeAsset": "CRU", @@ -360,7 +360,7 @@ } }, "hydration-darwinia-ring": { - "updated": 1733063955311, + "updated": 1733156653942, "destination": { "fee": "0.040188403234362692", "feeAsset": "RING", @@ -368,7 +368,7 @@ } }, "hydration-interlay-ibtc": { - "updated": 1733063979360, + "updated": 1733156677280, "destination": { "fee": "0.00000063", "feeAsset": "IBTC", @@ -376,7 +376,7 @@ } }, "hydration-interlay-intr": { - "updated": 1733063986200, + "updated": 1733156682769, "destination": { "fee": "0.0019213457", "feeAsset": "INTR", @@ -384,7 +384,7 @@ } }, "hydration-interlay-dot": { - "updated": 1733063991730, + "updated": 1733156688251, "destination": { "fee": "0.045934345", "feeAsset": "DOT", @@ -392,7 +392,7 @@ } }, "hydration-interlay-hdx": { - "updated": 1733063996203, + "updated": 1733156694036, "destination": { "fee": "0.405777777777", "feeAsset": "HDX", @@ -400,7 +400,7 @@ } }, "hydration-kilt-kilt": { - "updated": 1733064004327, + "updated": 1733156702456, "destination": { "fee": "0.000000000027609", "feeAsset": "KILT", @@ -408,7 +408,7 @@ } }, "hydration-moonbeam-hdx": { - "updated": 1733064017435, + "updated": 1733156716669, "destination": { "fee": "3.488962557199", "feeAsset": "HDX", @@ -416,7 +416,7 @@ } }, "hydration-moonbeam-glmr": { - "updated": 1733064030841, + "updated": 1733156729924, "destination": { "fee": "0.0095040525", "feeAsset": "GLMR", @@ -424,7 +424,7 @@ } }, "hydration-moonbeam-dot": { - "updated": 1733064044694, + "updated": 1733156744338, "destination": { "fee": "0.0513335994", "feeAsset": "DOT", @@ -432,7 +432,7 @@ } }, "hydration-moonbeam-dai_mwh": { - "updated": 1733064070972, + "updated": 1733156761409, "destination": { "fee": "0.08", "feeAsset": "GLMR", @@ -440,7 +440,7 @@ } }, "hydration-moonbeam-usdc_mwh": { - "updated": 1733064101273, + "updated": 1733156789831, "destination": { "fee": "0.08", "feeAsset": "GLMR", @@ -448,7 +448,7 @@ } }, "hydration-moonbeam-usdt_mwh": { - "updated": 1733064131318, + "updated": 1733156817932, "destination": { "fee": "0.08", "feeAsset": "GLMR", @@ -456,7 +456,7 @@ } }, "hydration-moonbeam-wbtc_mwh": { - "updated": 1733064161438, + "updated": 1733156853333, "destination": { "fee": "0.08", "feeAsset": "GLMR", @@ -464,7 +464,7 @@ } }, "hydration-moonbeam-weth_mwh": { - "updated": 1733064191813, + "updated": 1733156883729, "destination": { "fee": "0.08", "feeAsset": "GLMR", @@ -472,7 +472,7 @@ } }, "hydration-mythos-myth": { - "updated": 1733064197972, + "updated": 1733156889737, "destination": { "fee": "0.262144", "feeAsset": "MYTH", @@ -480,7 +480,7 @@ } }, "hydration-polkadot-dot": { - "updated": 1733064201718, + "updated": 1733156893574, "destination": { "fee": "0.0021232099", "feeAsset": "DOT", @@ -488,7 +488,7 @@ } }, "hydration-pendulum-pen": { - "updated": 1733064219968, + "updated": 1733156943243, "destination": { "fee": "1", "feeAsset": "PEN", @@ -496,7 +496,7 @@ } }, "hydration-subsocial-sub": { - "updated": 1733064238252, + "updated": 1733156959936, "destination": { "fee": "0.64", "feeAsset": "SUB", @@ -504,7 +504,7 @@ } }, "hydration-unique-unq": { - "updated": 1733064259127, + "updated": 1733156967416, "destination": { "fee": "0", "feeAsset": "UNQ", @@ -512,7 +512,7 @@ } }, "hydration-zeitgeist-ztg": { - "updated": 1733064264714, + "updated": 1733157013333, "destination": { "fee": "0.0064296", "feeAsset": "ZTG", @@ -520,7 +520,7 @@ } }, "hydration-zeitgeist-glmr": { - "updated": 1733064277700, + "updated": 1733157035280, "destination": { "fee": "0.0062726556", "feeAsset": "GLMR", @@ -528,7 +528,7 @@ } }, "hydration-zeitgeist-usdc_mwh": { - "updated": 1733064290281, + "updated": 1733157062218, "destination": { "fee": "0.1", "feeAsset": "GLMR", @@ -536,11 +536,11 @@ } }, "kilt-hydration-kilt": { - "updated": 1733064295522, + "updated": 1733157091250, "destination": { - "fee": "0.005858405308471", + "fee": "0.005921940840834", "feeAsset": "KILT", - "feeNative": "5858405308471" + "feeNative": "5921940840834" } }, "interlay-hydration-intr": { @@ -584,11 +584,11 @@ } }, "mythos-assethub-myth": { - "updated": 1733064331308, + "updated": 1733157693875, "destination": { - "fee": "0.051754856532716448", + "fee": "0.057649836168124849", "feeAsset": "MYTH", - "feeNative": "51754856532716448" + "feeNative": "57649836168124849" } }, "pendulum-hydration-pen": { @@ -608,15 +608,15 @@ } }, "polkadot-bifrost-dot": { - "updated": 1733064347073, + "updated": 1733157937400, "destination": { - "fee": "0.0062402717", + "fee": "0.0059193589", "feeAsset": "DOT", - "feeNative": "62402717" + "feeNative": "59193589" } }, "polkadot-assethub-dot": { - "updated": 1733064350506, + "updated": 1733157940649, "destination": { "fee": "0.0017965", "feeAsset": "DOT", @@ -664,11 +664,27 @@ } }, "assethub-hydration-wud": { - "updated": 1733063594290, + "updated": 1733156248830, "destination": { "fee": "0.02", "feeAsset": "USDT", "feeNative": "20000" } + }, + "assethub-mythos-myth": { + "updated": 1733156296860, + "destination": { + "fee": "0.32768", + "feeAsset": "MYTH", + "feeNative": "327680000000000000" + } + }, + "assethub-moonbeam-pink": { + "updated": 1733156292387, + "destination": { + "fee": "0.25", + "feeAsset": "USDT", + "feeNative": "250000" + } } } \ No newline at end of file diff --git a/integration-tests/xcm-test/src/__snapshots__/e2e.spec.ts.snap b/integration-tests/xcm-test/src/__snapshots__/e2e.spec.ts.snap index a3f83996..a2b80e7f 100644 --- a/integration-tests/xcm-test/src/__snapshots__/e2e.spec.ts.snap +++ b/integration-tests/xcm-test/src/__snapshots__/e2e.spec.ts.snap @@ -84,6 +84,13 @@ Array [ ] `; +exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Moonbeam PINK [pink] transfer 1`] = ` +Array [ + "assethub-moonbeam-pink", + "0x1101041f0803010100511f0300010300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac03080000020432055c000700e8764817000002043205011f0042420f000100000000", +] +`; + exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Moonbeam USDC [usdc] transfer 1`] = ` Array [ "assethub-moonbeam-usdc", @@ -98,6 +105,13 @@ Array [ ] `; +exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Mythos MYTH [myth] transfer 1`] = ` +Array [ + "assethub-mythos-myth", + "0xe0041f0904010100a5340400010300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac0404010100a53400130000e8890423c78a0000000000", +] +`; + exports[`Wallet with XCM config should result in valid Polkadot transfer for AssetHub -> Polkadot DOT [dot] transfer 1`] = ` Array [ "assethub-polkadot-dot", @@ -119,13 +133,6 @@ Array [ ] `; -exports[`Wallet with XCM config should result in valid Polkadot transfer for Bifrost -> AssetHub PINK [pink] transfer 1`] = ` -Array [ - "bifrost-assethub-pink", - "0x4d01044605030800010300a10f0432055c000700e876481700010300a10f043205011f0082fc0a000100000003010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - exports[`Wallet with XCM config should result in valid Polkadot transfer for Bifrost -> AssetHub USDC [usdc] transfer 1`] = ` Array [ "bifrost-assethub-usdc", @@ -587,507 +594,3 @@ Array [ "0xf4047e000400e8764817000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", ] `; - -exports[`Wallet with XCM config should result in valid transfer for Ajuna -> Hydration AJUN [ajun] transfer 1`] = ` -Array [ - "ajuna-hydration-ajun", - "0xf40423000000a0724e18090000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Astar -> Hydration ASTR [astr] transfer 1`] = ` -Array [ - "astar-hydration-astr", - "0x050104330203010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee030400000000130000e8890423c78a00000000", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Astar -> Hydration DOT [dot] transfer 1`] = ` -Array [ - "astar-hydration-dot", - "0x3101043700ffffffffffffffffffffffffffffffff00e8764817000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Bifrost -> AssetHub PINK [pink] transfer 1`] = ` -Array [ - "bifrost-assethub-pink", - "0x4d01044605030800010300a10f0432055c000700e876481700010300a10f043205011f0082fc0a000100000003010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Bifrost -> AssetHub USDT [usdt] transfer 1`] = ` -Array [ - "bifrost-assethub-usdt", - "0x0901044605030400010300a10f043205011f00025a62020000000003010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Bifrost -> Hydration BNC [bnc] transfer 1`] = ` -Array [ - "bifrost-hydration-bnc", - "0xf8044600000100a0724e18090000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Bifrost -> Hydration DOT [dot] transfer 1`] = ` -Array [ - "bifrost-hydration-dot", - "0xf8044600080000e8764817000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Bifrost -> Hydration vASTR [vastr] transfer 1`] = ` -Array [ - "bifrost-hydration-vastr", - "0xf804460009030000e8890423c78a000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Bifrost -> Hydration vDOT [vdot] transfer 1`] = ` -Array [ - "bifrost-hydration-vdot", - "0xf8044600090000e8764817000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Bifrost -> Polkadot DOT [dot] transfer 1`] = ` -Array [ - "bifrost-polkadot-dot", - "0xec044600080000e87648170000000000000000000000030101010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Centrifuge -> Hydration CFG [cfg] transfer 1`] = ` -Array [ - "centrifuge-hydration-cfg", - "0xf4047c00000000e8890423c78a000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Crust network -> Hydration CRU [cru] transfer 1`] = ` -Array [ - "crust-hydration-cru", - "0xf4047d000000a0724e18090000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Darwinia -> Hydration RING [ring] transfer 1`] = ` -Array [ - "darwinia-hydration-ring", - "0xf4042e00000000e8890423c78a000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Ajuna AJUN [ajun] transfer 1`] = ` -Array [ - "hydration-ajuna-ajun", - "0x01010489002000000000a0724e180900000000000000000000030102000d20010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> AssetHub DED [ded] transfer 1`] = ` -Array [ - "hydration-assethub-ded", - "0x4d01048905030800010300a10f04320578000700e876481700010300a10f043205011f0082fc0a000100000003010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> AssetHub DOT [dot] transfer 1`] = ` -Array [ - "hydration-assethub-dot", - "0x0d01046b0d04010100a10f04040100000700e8764817020401000204040d01000001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> AssetHub DOTA [dota] transfer 1`] = ` -Array [ - "hydration-assethub-dota", - "0x4501048905030800010300a10f0432054800821a060000010300a10f043205011f0082fc0a000100000003010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> AssetHub PINK [pink] transfer 1`] = ` -Array [ - "hydration-assethub-pink", - "0x4d01048905030800010300a10f0432055c000700e876481700010300a10f043205011f0082fc0a000100000003010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> AssetHub USDC [usdc] transfer 1`] = ` -Array [ - "hydration-assethub-usdc", - "0xf40489010300010300a10f043205e51400025a620203010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> AssetHub USDT [usdt] transfer 1`] = ` -Array [ - "hydration-assethub-usdt", - "0xf40489010300010300a10f043205011f00025a620203010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> AssetHub WUD [wud] transfer 1`] = ` -Array [ - "hydration-assethub-wud", - "0x5901048905030800010300a10f043205011f0082fc0a0000010300a10f043205a6e90100000700e87648170000000003010200a10f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Astar ASTR [astr] transfer 1`] = ` -Array [ - "hydration-astar-astr", - "0x0101048900090000000000e8890423c78a000000000000000003010200591f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Astar DOT [dot] transfer 1`] = ` -Array [ - "hydration-astar-dot", - "0x01010489000500000000e8764817000000000000000000000003010200591f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Bifrost BNC [bnc] transfer 1`] = ` -Array [ - "hydration-bifrost-bnc", - "0x01010489000e00000000a0724e18090000000000000000000003010200b91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Bifrost DOT [dot] transfer 1`] = ` -Array [ - "hydration-bifrost-dot", - "0x01010489000500000000e8764817000000000000000000000003010200b91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Bifrost vASTR [vastr] transfer 1`] = ` -Array [ - "hydration-bifrost-vastr", - "0x0101048900210000000000e8890423c78a000000000000000003010200b91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Bifrost vDOT [vdot] transfer 1`] = ` -Array [ - "hydration-bifrost-vdot", - "0x01010489000f00000000e8764817000000000000000000000003010200b91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Centrifuge CFG [cfg] transfer 1`] = ` -Array [ - "hydration-centrifuge-cfg", - "0x01010489000d0000000000e8890423c78a000000000000000003010200bd1f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Crust network CRU [cru] transfer 1`] = ` -Array [ - "hydration-crust-cru", - "0x01010489001b00000000a0724e18090000000000000000000003010200611f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Darwinia RING [ring] transfer 1`] = ` -Array [ - "hydration-darwinia-ring", - "0xd00489001f0000000000e8890423c78a000000000000000003010200f91f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Interlay DOT [dot] transfer 1`] = ` -Array [ - "hydration-interlay-dot", - "0x01010489000500000000e8764817000000000000000000000003010200c11f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Interlay HDX [hdx] transfer 1`] = ` -Array [ - "hydration-interlay-hdx", - "0x01010489000000000000a0724e18090000000000000000000003010200c11f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Interlay IBTC [ibtc] transfer 1`] = ` -Array [ - "hydration-interlay-ibtc", - "0x01010489000b00000000ca9a3b00000000000000000000000003010200c11f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Interlay INTR [intr] transfer 1`] = ` -Array [ - "hydration-interlay-intr", - "0x01010489001100000000e8764817000000000000000000000003010200c11f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Kilt KILT [kilt] transfer 1`] = ` -Array [ - "hydration-kilt-kilt", - "0x01010489001c0000000000c16ff28623000000000000000000030102009920010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Moonbeam DAI [dai_mwh] transfer 1`] = ` -Array [ - "hydration-moonbeam-dai_mwh", - "0x350104890408120000000000e8890423c78a0000000000000000100000000000087e93371c0100000000000000000100000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Moonbeam DOT [dot] transfer 1`] = ` -Array [ - "hydration-moonbeam-dot", - "0xd00489000500000000e8764817000000000000000000000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Moonbeam GLMR [glmr] transfer 1`] = ` -Array [ - "hydration-moonbeam-glmr", - "0xd0048900100000000000e8890423c78a000000000000000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Moonbeam HDX [hdx] transfer 1`] = ` -Array [ - "hydration-moonbeam-hdx", - "0xd00489000000000000a0724e18090000000000000000000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Moonbeam USDC [usdc_mwh] transfer 1`] = ` -Array [ - "hydration-moonbeam-usdc_mwh", - "0x3501048904081500000080969800000000000000000000000000100000000000087e93371c0100000000000000000100000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Moonbeam USDT [usdt_mwh] transfer 1`] = ` -Array [ - "hydration-moonbeam-usdt_mwh", - "0x3501048904081700000080969800000000000000000000000000100000000000087e93371c0100000000000000000100000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Moonbeam WBTC [wbtc_mwh] transfer 1`] = ` -Array [ - "hydration-moonbeam-wbtc_mwh", - "0x3501048904081300000000ca9a3b000000000000000000000000100000000000087e93371c0100000000000000000100000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Moonbeam WETH [weth_mwh] transfer 1`] = ` -Array [ - "hydration-moonbeam-weth_mwh", - "0x350104890408140000000000e8890423c78a0000000000000000100000000000087e93371c0100000000000000000100000003010200511f0300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Mythos MYTH [myth] transfer 1`] = ` -Array [ - "hydration-mythos-myth", - "0xd00489001e0000000000e8890423c78a000000000000000003010200a5340300f24ff3a9cf04c71dbc94d0b566f7a27b94566cac00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Pendulum PEN [pen] transfer 1`] = ` -Array [ - "hydration-pendulum-pen", - "0x010104890091420f0000a0724e18090000000000000000000003010200b920010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Phala PHA [pha] transfer 1`] = ` -Array [ - "hydration-phala-pha", - "0x01010489000800000000a0724e18090000000000000000000003010200cd1f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Polkadot DOT [dot] transfer 1`] = ` -Array [ - "hydration-polkadot-dot", - "0xf40489000500000000e87648170000000000000000000000030101010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Subsocial SUB [sub] transfer 1`] = ` -Array [ - "hydration-subsocial-sub", - "0x01010489001800000000e8764817000000000000000000000003010200d520010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Unique network UNQ [unq] transfer 1`] = ` -Array [ - "hydration-unique-unq", - "0x0101048900190000000000e8890423c78a000000000000000003010200d51f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Zeitgeist GLMR [glmr] transfer 1`] = ` -Array [ - "hydration-zeitgeist-glmr", - "0x0101048900100000000000e8890423c78a000000000000000003010200b120010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Zeitgeist USDC [usdc_mwh] transfer 1`] = ` -Array [ - "hydration-zeitgeist-usdc_mwh", - "0x65010489040815000000809698000000000000000000000000001000000000008a5d7845630100000000000000000100000003010200b120010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Hydration -> Zeitgeist ZTG [ztg] transfer 1`] = ` -Array [ - "hydration-zeitgeist-ztg", - "0x01010489000c00000000e8764817000000000000000000000003010200b120010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Interlay -> Hydration DOT [dot] transfer 1`] = ` -Array [ - "interlay-hydration-dot", - "0xf8045e00000000e8764817000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Interlay -> Hydration HDX [hdx] transfer 1`] = ` -Array [ - "interlay-hydration-hdx", - "0x0501045e00010d00000000a0724e18090000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Interlay -> Hydration HDX [hdx] transfer 2`] = ` -Array [ - "interlay-hydration-hdx", - "0x0501045e00010d00000000a0724e18090000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Interlay -> Hydration IBTC [ibtc] transfer 1`] = ` -Array [ - "interlay-hydration-ibtc", - "0xf8045e00000100ca9a3b00000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Interlay -> Hydration INTR [intr] transfer 1`] = ` -Array [ - "interlay-hydration-intr", - "0xf8045e00000200e8764817000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Kilt -> Hydration KILT [kilt] transfer 1`] = ` -Array [ - "kilt-hydration-kilt", - "0x050104530803010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000000000f0000c16ff286230000000000", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Moonbeam -> Hydration DAI [dai_mwh] transfer 1`] = ` -Array [ - "moonbeam-hydration-dai_mwh", - "0xb9f813ff00000000000000000000000006e605775296e851ff43b4daa541bb0984e9d6fd0000000000000000000000000000000000000000000000008ac7230489e800000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000ffffffffffffffff00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000500000007f200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220188dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00000000000000000000000000000000000000000000000000000000000000", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Moonbeam -> Hydration GLMR [glmr] transfer 1`] = ` -Array [ - "moonbeam-hydration-glmr", - "0xb9f813ff00000000000000000000000000000000000000000000000000000000000008020000000000000000000000000000000000000000000000008ac7230489e800000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000ffffffffffffffff00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000500000007f200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220188dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00000000000000000000000000000000000000000000000000000000000000", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Moonbeam -> Hydration HDX [hdx] transfer 1`] = ` -Array [ - "moonbeam-hydration-hdx", - "0xb9f813ff000000000000000000000000ffffffff345dc44ddae98df024eb494321e73fcc000000000000000000000000000000000000000000000000000009184e72a0000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000ffffffffffffffff00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000500000007f200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000220188dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00000000000000000000000000000000000000000000000000000000000000", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Mythos -> AssetHub MYTH [myth] transfer 1`] = ` -Array [ - "mythos-assethub-myth", - "0x0501041f0904010100a10f040001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0404000000130000e8890423c78a0000000000", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Mythos -> Hydration MYTH [myth] transfer 1`] = ` -Array [ - "mythos-hydration-myth", - "0x0901041f0803010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee030400000000130000e8890423c78a0000000000", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Pendulum -> Hydration PEN [pen] transfer 1`] = ` -Array [ - "pendulum-hydration-pen", - "0xf40436000000a0724e18090000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Polkadot -> AssetHub DOT [dot] transfer 1`] = ` -Array [ - "polkadot-assethub-dot", - "0xfc04630903000100a10f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000000000700e87648170000000000", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Polkadot -> Bifrost DOT [dot] transfer 1`] = ` -Array [ - "polkadot-bifrost-dot", - "0xfc04630803000100b91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000000000700e87648170000000000", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Polkadot -> Hydration DOT [dot] transfer 1`] = ` -Array [ - "polkadot-hydration-dot", - "0xfc04630803000100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000000000700e87648170000000000", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Subsocial -> Hydration SUB [sub] transfer 1`] = ` -Array [ - "subsocial-hydration-sub", - "0xfc041f0803010100c91f030001010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee0304000000000700e87648170000000000", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Unique network -> Hydration UNQ [unq] transfer 1`] = ` -Array [ - "unique-hydration-unq", - "0x0101042600000000000000e8890423c78a000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Zeitgeist -> Hydration GLMR [glmr] transfer 1`] = ` -Array [ - "zeitgeist-hydration-glmr", - "0x0501047e0005030000000000e8890423c78a000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Zeitgeist -> Hydration USDC [usdc_mwh] transfer 1`] = ` -Array [ - "zeitgeist-hydration-usdc_mwh", - "0x6d01047e0408050100000080969800000000000000000000000000050300000000008a5d7845630100000000000000000100000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; - -exports[`Wallet with XCM config should result in valid transfer for Zeitgeist -> Hydration ZTG [ztg] transfer 1`] = ` -Array [ - "zeitgeist-hydration-ztg", - "0xf4047e000400e8764817000000000000000000000003010200c91f010088dc3417d5058ec4b4503e0c12ea1a0a89be200fe98922423d4334014fa6b0ee00", -] -`; diff --git a/integration-tests/xcm-test/src/ctx/e2e/storage.ts b/integration-tests/xcm-test/src/ctx/e2e/storage.ts index 728fde27..fa1a0445 100644 --- a/integration-tests/xcm-test/src/ctx/e2e/storage.ts +++ b/integration-tests/xcm-test/src/ctx/e2e/storage.ts @@ -7,7 +7,7 @@ import { import { ApiPromise } from '@polkadot/api'; import { getAccount } from './account'; -import { jsonFormatter } from '../../utils/json'; +import { findNestedKey } from '../../utils/json'; const BALANCE = 1000n; @@ -26,40 +26,49 @@ export const initStorage = async (api: ApiPromise, chain: Parachain) => { return storage; } - /* if (chain.key === 'moonbeam') { + if (useTokensPallet(api)) { storage = Object.assign( { - EVM: { - AccountStorages: populateErc20(chain, chainAssets, chainDecimals), + Tokens: { + Accounts: populateTokens(chain, chainAssets, chainDecimals), }, }, storage ); - } */ + } - if (useTokensPallet(api)) { + if (useAssetsPallet(api)) { storage = Object.assign( { - Tokens: { - Accounts: populateTokens(chain, chainAssets, chainDecimals), + Assets: { + Account: populateAssets(chain, chainAssets, chainDecimals), }, }, storage ); } - if (useAssetsPallet(api)) { + if (useForeignAssetsPallet(api)) { storage = Object.assign( { - Assets: { - Account: populateAssets(chain, chainAssets, chainDecimals), + ForeignAssets: { + Account: populateForeignAssets(chain, chainAssets, chainDecimals), }, }, storage ); } - //console.log(JSON.stringify(storage, jsonFormatter, 2)); + if (useEvmAccountPallet(api)) { + storage = Object.assign( + { + EVM: { + AccountStorages: [], + }, + }, + storage + ); + } return storage; }; @@ -68,10 +77,18 @@ const useAssetsPallet = (api: ApiPromise): boolean => { return !!api.query.assets?.account; }; +const useForeignAssetsPallet = (api: ApiPromise): boolean => { + return !!api.query.foreignAssets?.account; +}; + const useTokensPallet = (api: ApiPromise): boolean => { return !!api.query.tokens?.accounts; }; +const useEvmAccountPallet = (api: ApiPromise): boolean => { + return !!api.query.evm?.accountStorages; +}; + const useNormalizedBalance = ( chain: Parachain, chainDecimals: number, @@ -120,6 +137,22 @@ const populateAssets = ( }); }; +const populateForeignAssets = ( + chain: Parachain, + assets: ParachainAssetData[], + decimals: number +) => { + const acc = getAccount(chain); + return assets + .filter((a) => !!a.xcmLocation) + .filter((a) => findNestedKey(a.xcmLocation, 'Parachain')) + .map((a) => { + const assetLocation = chain.getAssetXcmLocation(a.asset); + const balance = useNormalizedBalance(chain, decimals, a.asset); + return [[assetLocation, acc.address], { balance: balance }]; + }); +}; + const populateTokens = ( chain: Parachain, assets: ParachainAssetData[], diff --git a/integration-tests/xcm-test/src/ctx/e2e/xcm.ts b/integration-tests/xcm-test/src/ctx/e2e/xcm.ts index 7fc66515..b8a35019 100644 --- a/integration-tests/xcm-test/src/ctx/e2e/xcm.ts +++ b/integration-tests/xcm-test/src/ctx/e2e/xcm.ts @@ -25,6 +25,7 @@ import { SetupCtx } from './types'; import { getRouteKey } from '../../utils/route'; +const SNAPSHOT_NAME = '__snapshots__/e2e.spec.ts'; const TRANSFER_AMOUNT = '10'; export const runXcm = ( @@ -38,10 +39,12 @@ export const runXcm = ( networks: SetupCtx[]; wallet: Wallet; }>, - options: { skip?: boolean; sync?: boolean } = {} + options: { skip?: boolean; sync?: boolean; snapshot?: boolean } = {} ) => { const itfn = options.skip ? it.skip : it; const shouldSync = options.sync || false; + const shouldSnapshot = options.snapshot || false; + itfn( name, async () => { @@ -101,7 +104,8 @@ export const runXcm = ( const destEvents = await destNetwork.api.query.system.events(); expect(checkIfProcessed(destEvents)).toBeTruthy(); - shouldSync && expect([key, calldata.data]).toMatchSnapshot(); + shouldSnapshot && + expect([key, calldata.data]).toMatchSnapshot(SNAPSHOT_NAME); const postTransfer = await getTransfer( wallet, diff --git a/integration-tests/xcm-test/src/e2e.spec.ts b/integration-tests/xcm-test/src/e2e.spec.ts index 1ec8ca43..79832440 100644 --- a/integration-tests/xcm-test/src/e2e.spec.ts +++ b/integration-tests/xcm-test/src/e2e.spec.ts @@ -108,6 +108,7 @@ describe('Wallet with XCM config', () => { { skip: isContractTransfer || isAcalaErc20Transfer, sync: true, + snapshot: true, } ); } diff --git a/integration-tests/xcm-test/src/exec.spec.ts b/integration-tests/xcm-test/src/exec.spec.ts index 5fd9064b..f52b7e23 100644 --- a/integration-tests/xcm-test/src/exec.spec.ts +++ b/integration-tests/xcm-test/src/exec.spec.ts @@ -102,13 +102,14 @@ describe('Wallet with XCM config', () => { }, async () => { return { - report: new Map(), + report: reportCtx, networks: networks, wallet: wallet, }; }, { sync: true, + snapshot: true, } ); }); From e0d869fb44d509ec6985d770c273cc6d1243968a Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Mon, 2 Dec 2024 19:37:42 +0100 Subject: [PATCH 21/21] RELEASE: Releasing 1 package(s) Releases: @galacticcouncil/xcm-cfg@5.6.0 --- examples/sdk-cjs/package.json | 2 +- examples/xcm-transfer/package.json | 2 +- examples/xcm-transfer/src/index.ts | 10 +++++----- integration-tests/xcm-test/package.json | 2 +- package-lock.json | 8 ++++---- packages/xcm-cfg/CHANGELOG.md | 8 ++++++++ packages/xcm-cfg/package.json | 2 +- 7 files changed, 21 insertions(+), 13 deletions(-) diff --git a/examples/sdk-cjs/package.json b/examples/sdk-cjs/package.json index d95b596d..58817236 100644 --- a/examples/sdk-cjs/package.json +++ b/examples/sdk-cjs/package.json @@ -13,6 +13,6 @@ "dependencies": { "@galacticcouncil/sdk": "^5.0.1", "@galacticcouncil/xcm-sdk": "^7.0.0", - "@galacticcouncil/xcm-cfg": "^5.5.1" + "@galacticcouncil/xcm-cfg": "^5.6.0" } } diff --git a/examples/xcm-transfer/package.json b/examples/xcm-transfer/package.json index d6b8bd2c..72f8676f 100644 --- a/examples/xcm-transfer/package.json +++ b/examples/xcm-transfer/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@galacticcouncil/sdk": "^5.0.1", - "@galacticcouncil/xcm-cfg": "^5.5.1", + "@galacticcouncil/xcm-cfg": "^5.6.0", "@galacticcouncil/xcm-sdk": "^7.0.0", "@talismn/connect-wallets": "^1.2.5" } diff --git a/examples/xcm-transfer/src/index.ts b/examples/xcm-transfer/src/index.ts index dda7b858..fc787bbb 100644 --- a/examples/xcm-transfer/src/index.ts +++ b/examples/xcm-transfer/src/index.ts @@ -54,9 +54,9 @@ const wallet = new Wallet({ configureExternal(externals, configService); // Define transfer -const srcChain = configService.getChain('ethereum'); -const destChain = configService.getChain('hydration'); -const asset = configService.getAsset('eth'); +const srcChain = configService.getChain('hydration'); +const destChain = configService.getChain('ethereum'); +const asset = configService.getAsset('aave'); const configBuilder = ConfigBuilder(configService); const { sourceChains } = configBuilder.assets().asset(asset); @@ -71,8 +71,8 @@ logDestChains(asset.key, destinationChains); logSrcChains(asset.key, sourceChains); // Define source & dest accounts -const srcAddr = 'INSERT_ADDRESS'; -const destAddr = 'INSERT_ADDRESS'; +const srcAddr = '5HbftW2XCP77ypjeBEkL2iXHKw5rnRJoqKd3ySZCgxvxbxYj'; +const destAddr = '0x26f5C2370e563e9f4dDA435f03A63D7C109D8D04'; // Subscribe source chain token balance const balanceObserver = (balances: AssetAmount[]) => console.log(balances); diff --git a/integration-tests/xcm-test/package.json b/integration-tests/xcm-test/package.json index 090d8beb..f941c790 100644 --- a/integration-tests/xcm-test/package.json +++ b/integration-tests/xcm-test/package.json @@ -18,7 +18,7 @@ "@acala-network/chopsticks-testing": "1.0.1" }, "dependencies": { - "@galacticcouncil/xcm-cfg": "^5.5.1", + "@galacticcouncil/xcm-cfg": "^5.6.0", "@galacticcouncil/xcm-sdk": "^7.0.0" } } diff --git a/package-lock.json b/package-lock.json index d03b3c63..faf10fba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,7 +35,7 @@ "examples/sdk-cjs": { "dependencies": { "@galacticcouncil/sdk": "^5.0.1", - "@galacticcouncil/xcm-cfg": "^5.5.1", + "@galacticcouncil/xcm-cfg": "^5.6.0", "@galacticcouncil/xcm-sdk": "^7.0.0" }, "devDependencies": { @@ -105,7 +105,7 @@ "examples/xcm-transfer": { "dependencies": { "@galacticcouncil/sdk": "^5.0.1", - "@galacticcouncil/xcm-cfg": "^5.5.1", + "@galacticcouncil/xcm-cfg": "^5.6.0", "@galacticcouncil/xcm-sdk": "^7.0.0", "@talismn/connect-wallets": "^1.2.5" }, @@ -168,7 +168,7 @@ }, "integration-tests/xcm-test": { "dependencies": { - "@galacticcouncil/xcm-cfg": "^5.5.1", + "@galacticcouncil/xcm-cfg": "^5.6.0", "@galacticcouncil/xcm-sdk": "^7.0.0" }, "devDependencies": { @@ -11721,7 +11721,7 @@ }, "packages/xcm-cfg": { "name": "@galacticcouncil/xcm-cfg", - "version": "5.5.1", + "version": "5.6.0", "dependencies": { "@galacticcouncil/xcm-core": "^5.4.0" } diff --git a/packages/xcm-cfg/CHANGELOG.md b/packages/xcm-cfg/CHANGELOG.md index c54837a8..402aa2ef 100644 --- a/packages/xcm-cfg/CHANGELOG.md +++ b/packages/xcm-cfg/CHANGELOG.md @@ -1,5 +1,13 @@ # @galacticcouncil/xcm-cfg +## 5.6.0 + +### Minor Changes + +- Bump hub -> moonbeam fees +- Bump hydration -> moonbeam hdx fee +- Normalize hub x1 interior + ## 5.5.1 ### Patch Changes diff --git a/packages/xcm-cfg/package.json b/packages/xcm-cfg/package.json index 9586e0c9..25b060e6 100644 --- a/packages/xcm-cfg/package.json +++ b/packages/xcm-cfg/package.json @@ -1,6 +1,6 @@ { "name": "@galacticcouncil/xcm-cfg", - "version": "5.5.1", + "version": "5.6.0", "description": "Cross-chain hydradx & basilisk dapp configuration", "author": "GalacticCouncil", "repository": {