From 2642c2612792654fc93aac0a48399b19ed7d5333 Mon Sep 17 00:00:00 2001 From: Bryan Chen Date: Thu, 21 Nov 2024 12:41:06 +1300 Subject: [PATCH] disable moonbeam transfer test --- packages/polkadot/src/acala.moonbeam.test.ts | 132 ++++++++++-------- .../polkadot/src/hydration.moonbeam.test.ts | 40 +++--- .../shared/src/xcm/runXtokenstHorizontal.ts | 4 +- 3 files changed, 96 insertions(+), 80 deletions(-) diff --git a/packages/polkadot/src/acala.moonbeam.test.ts b/packages/polkadot/src/acala.moonbeam.test.ts index 178bde87..b3a91878 100644 --- a/packages/polkadot/src/acala.moonbeam.test.ts +++ b/packages/polkadot/src/acala.moonbeam.test.ts @@ -29,28 +29,32 @@ describe('acala & moonbeam', async () => { } }) - runXtokenstHorizontal('moonbeam transfer DOT to acala', async () => { - await moonbeamClient.dev.setStorage({ - Assets: { - account: [[[moonbeamDot, defaultAccounts.alith.address], { balance: 10e12 }]], - }, - }) - - return { - fromChain: moonbeamClient, - fromBalance: query.assets(moonbeamDot), - fromAccount: defaultAccounts.alith, - - toChain: acalaClient, - toBalance: query.tokens(acalaDot), - toAccount: defaultAccounts.alice, - - routeChain: polkadotClient, - isCheckUmp: true, - - tx: tx.xtokens.transfer({ ForeignAsset: moonbeamDot }, 1e12, tx.xtokens.parachainV3(acala.paraId!)), - } - }) + runXtokenstHorizontal( + 'moonbeam transfer DOT to acala', + async () => { + await moonbeamClient.dev.setStorage({ + Assets: { + account: [[[moonbeamDot, defaultAccounts.alith.address], { balance: 10e12 }]], + }, + }) + + return { + fromChain: moonbeamClient, + fromBalance: query.assets(moonbeamDot), + fromAccount: defaultAccounts.alith, + + toChain: acalaClient, + toBalance: query.tokens(acalaDot), + toAccount: defaultAccounts.alice, + + routeChain: polkadotClient, + isCheckUmp: true, + + tx: tx.xtokens.transfer({ ForeignAsset: moonbeamDot }, 1e12, tx.xtokens.parachainV3(acala.paraId!)), + } + }, + { skip: true }, // TODO: https://github.com/open-web3-stack/polkadot-ecosystem-tests/pull/109 + ) runXtokenstHorizontal('acala transfer ACA to moonbeam', async () => { return { @@ -66,25 +70,29 @@ describe('acala & moonbeam', async () => { } }) - runXtokenstHorizontal('moonbeam transfer ACA to acala', async () => { - await moonbeamClient.dev.setStorage({ - Assets: { - account: [[[moonbeam.custom.aca, defaultAccounts.alith.address], { balance: 10e12 }]], - }, - }) - - return { - fromChain: moonbeamClient, - fromBalance: query.assets(moonbeam.custom.aca), - fromAccount: defaultAccounts.alith, - - toChain: acalaClient, - toBalance: query.balances, - toAccount: defaultAccounts.bob, - - tx: tx.xtokens.transfer({ ForeignAsset: moonbeam.custom.aca }, 1e12, tx.xtokens.parachainV3(acala.paraId!)), - } - }) + runXtokenstHorizontal( + 'moonbeam transfer ACA to acala', + async () => { + await moonbeamClient.dev.setStorage({ + Assets: { + account: [[[moonbeam.custom.aca, defaultAccounts.alith.address], { balance: 10e12 }]], + }, + }) + + return { + fromChain: moonbeamClient, + fromBalance: query.assets(moonbeam.custom.aca), + fromAccount: defaultAccounts.alith, + + toChain: acalaClient, + toBalance: query.balances, + toAccount: defaultAccounts.bob, + + tx: tx.xtokens.transfer({ ForeignAsset: moonbeam.custom.aca }, 1e12, tx.xtokens.parachainV3(acala.paraId!)), + } + }, + { skip: true }, // TODO: https://github.com/open-web3-stack/polkadot-ecosystem-tests/pull/109 + ) runXtokenstHorizontal('acala transfer LDOT to moonbeam', async () => { return { @@ -100,23 +108,27 @@ describe('acala & moonbeam', async () => { } }) - runXtokenstHorizontal('moonbeam transfer LDOT to acala', async () => { - await moonbeamClient.dev.setStorage({ - Assets: { - account: [[[moonbeam.custom.ldot, defaultAccounts.alith.address], { balance: 10e12 }]], - }, - }) - - return { - fromChain: moonbeamClient, - fromBalance: query.assets(moonbeam.custom.ldot), - fromAccount: defaultAccounts.alith, - - toChain: acalaClient, - toBalance: query.tokens(acala.custom.ldot), - toAccount: defaultAccounts.bob, - - tx: tx.xtokens.transfer({ ForeignAsset: moonbeam.custom.ldot }, 1e12, tx.xtokens.parachainV3(acala.paraId!)), - } - }) + runXtokenstHorizontal( + 'moonbeam transfer LDOT to acala', + async () => { + await moonbeamClient.dev.setStorage({ + Assets: { + account: [[[moonbeam.custom.ldot, defaultAccounts.alith.address], { balance: 10e12 }]], + }, + }) + + return { + fromChain: moonbeamClient, + fromBalance: query.assets(moonbeam.custom.ldot), + fromAccount: defaultAccounts.alith, + + toChain: acalaClient, + toBalance: query.tokens(acala.custom.ldot), + toAccount: defaultAccounts.bob, + + tx: tx.xtokens.transfer({ ForeignAsset: moonbeam.custom.ldot }, 1e12, tx.xtokens.parachainV3(acala.paraId!)), + } + }, + { skip: true }, // TODO: https://github.com/open-web3-stack/polkadot-ecosystem-tests/pull/109 + ) }) diff --git a/packages/polkadot/src/hydration.moonbeam.test.ts b/packages/polkadot/src/hydration.moonbeam.test.ts index c8619076..6620f813 100644 --- a/packages/polkadot/src/hydration.moonbeam.test.ts +++ b/packages/polkadot/src/hydration.moonbeam.test.ts @@ -30,28 +30,32 @@ describe('hydration & moonbeam', async () => { } }) - runXtokenstHorizontal('moonbeam transfer DOT to hydration', async () => { - await moonbeamClient.dev.setStorage({ - Assets: { - account: [[[moonbeamDot, defaultAccounts.alith.address], { balance: 10e12 }]], - }, - }) + runXtokenstHorizontal( + 'moonbeam transfer DOT to hydration', + async () => { + await moonbeamClient.dev.setStorage({ + Assets: { + account: [[[moonbeamDot, defaultAccounts.alith.address], { balance: 10e12 }]], + }, + }) - return { - fromChain: moonbeamClient, - fromBalance: query.assets(moonbeamDot), - fromAccount: defaultAccounts.alith, + return { + fromChain: moonbeamClient, + fromBalance: query.assets(moonbeamDot), + fromAccount: defaultAccounts.alith, - toChain: hydrationClient, - toBalance: query.tokens(hydrationDot), - toAccount: defaultAccounts.bob, + toChain: hydrationClient, + toBalance: query.tokens(hydrationDot), + toAccount: defaultAccounts.bob, - routeChain: polkadotClient, - isCheckUmp: true, + routeChain: polkadotClient, + isCheckUmp: true, - tx: tx.xtokens.transfer({ ForeignAsset: moonbeamDot }, 2e10, tx.xtokens.parachainV3(hydration.paraId!)), - } - }) + tx: tx.xtokens.transfer({ ForeignAsset: moonbeamDot }, 2e10, tx.xtokens.parachainV3(hydration.paraId!)), + } + }, + { skip: true }, // TODO: https://github.com/open-web3-stack/polkadot-ecosystem-tests/pull/109 + ) runXtokenstHorizontal('hydration transfer GLMR to moonbeam', async () => { await hydrationClient.dev.setStorage({ diff --git a/packages/shared/src/xcm/runXtokenstHorizontal.ts b/packages/shared/src/xcm/runXtokenstHorizontal.ts index 5c885bb4..c4c5e235 100644 --- a/packages/shared/src/xcm/runXtokenstHorizontal.ts +++ b/packages/shared/src/xcm/runXtokenstHorizontal.ts @@ -21,9 +21,9 @@ export const runXtokenstHorizontal = ( isCheckUmp?: boolean precision?: number }>, - options: { only?: boolean } = {}, + options: { only?: boolean; skip?: boolean } = {}, ) => { - const itfn = options.only ? it.only : it + const itfn = options.only ? it.only : options.skip ? it.skip : it itfn( name, async () => {