difftreelog
fix quartz xcm tests for kusama 0.9.38
in: master
3 files changed
tests/src/util/playgrounds/unique.tsdiffbeforeafterboth2959 await this.helper.executeExtrinsic(signer, `api.tx.${this.palletName}.teleportAssets`, [destination, beneficiary, assets, feeAssetItem], true);2959 await this.helper.executeExtrinsic(signer, `api.tx.${this.palletName}.teleportAssets`, [destination, beneficiary, assets, feeAssetItem], true);2960 }2960 }296129612962 async teleportNativeAsset(signer: TSigner, destinationParaId: number, targetAccount: Uint8Array, amount: bigint) {2962 async teleportNativeAsset(signer: TSigner, destinationParaId: number, targetAccount: Uint8Array, amount: bigint, xcmVersion: number = 3) {2963 const destination = {2963 const destinationContent = {2964 V1: {2965 parents: 0,2964 parents: 0,2966 interior: {2965 interior: {2967 X1: {2966 X1: {2968 Parachain: destinationParaId,2967 Parachain: destinationParaId,2969 },2968 },2970 },2969 },2971 },2972 };2970 };297329712974 const beneficiary = {2972 const beneficiaryContent = {2975 V1: {2976 parents: 0,2973 parents: 0,2977 interior: {2974 interior: {2978 X1: {2975 X1: {2982 },2979 },2983 },2980 },2984 },2981 },2985 },2986 };2982 };298729832988 const assets = {2984 const assetsContent = [2989 V1: [2990 {2985 {2991 id: {2986 id: {2992 Concrete: {2987 Concrete: {2998 Fungible: amount,2993 Fungible: amount,2999 },2994 },3000 },2995 },3001 ],2996 ];3002 };29972998 let destination;2999 let beneficiary;3000 let assets;30013002 if (xcmVersion == 2) {3003 destination = { V1: destinationContent };3004 beneficiary = { V1: beneficiaryContent };3005 assets = { V1: assetsContent };30063007 } else if (xcmVersion == 3) {3008 destination = { V2: destinationContent };3009 beneficiary = { V2: beneficiaryContent };3010 assets = { V2: assetsContent };30113012 } else {3013 throw Error("Unknown XCM version: " + xcmVersion);3014 }300330153004 const feeAssetItem = 0;3016 const feeAssetItem = 0;30053017tests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth154 // (fee for USDT XCM are paid in relay tokens)154 // (fee for USDT XCM are paid in relay tokens)155 await usingRelayPlaygrounds(relayUrl, async (helper) => {155 await usingRelayPlaygrounds(relayUrl, async (helper) => {156 const destination = {156 const destination = {157 V1: {157 V2: {158 parents: 0,158 parents: 0,159 interior: {X1: {159 interior: {X1: {160 Parachain: QUARTZ_CHAIN,160 Parachain: QUARTZ_CHAIN,163 }};163 }};164164165 const beneficiary = {165 const beneficiary = {166 V1: {166 V2: {167 parents: 0,167 parents: 0,168 interior: {X1: {168 interior: {X1: {169 AccountId32: {169 AccountId32: {175 };175 };176176177 const assets = {177 const assets = {178 V1: [178 V2: [179 {179 {180 id: {180 id: {181 Concrete: {181 Concrete: {200 itSub('Should connect and send USDT from Statemine to Quartz', async ({helper}) => {200 itSub('Should connect and send USDT from Statemine to Quartz', async ({helper}) => {201 await usingStateminePlaygrounds(statemineUrl, async (helper) => {201 await usingStateminePlaygrounds(statemineUrl, async (helper) => {202 const dest = {202 const dest = {203 V1: {203 V2: {204 parents: 1,204 parents: 1,205 interior: {X1: {205 interior: {X1: {206 Parachain: QUARTZ_CHAIN,206 Parachain: QUARTZ_CHAIN,209 }};209 }};210210211 const beneficiary = {211 const beneficiary = {212 V1: {212 V2: {213 parents: 0,213 parents: 0,214 interior: {X1: {214 interior: {X1: {215 AccountId32: {215 AccountId32: {221 };221 };222222223 const assets = {223 const assets = {224 V1: [224 V2: [225 {225 {226 id: {226 id: {227 Concrete: {227 Concrete: {341341342 await usingRelayPlaygrounds(relayUrl, async (helper) => {342 await usingRelayPlaygrounds(relayUrl, async (helper) => {343 const destination = {343 const destination = {344 V1: {344 V2: {345 parents: 0,345 parents: 0,346 interior: {X1: {346 interior: {X1: {347 Parachain: QUARTZ_CHAIN,347 Parachain: QUARTZ_CHAIN,350 }};350 }};351351352 const beneficiary = {352 const beneficiary = {353 V1: {353 V2: {354 parents: 0,354 parents: 0,355 interior: {X1: {355 interior: {X1: {356 AccountId32: {356 AccountId32: {362 };362 };363363364 const assets = {364 const assets = {365 V1: [365 V2: [366 {366 {367 id: {367 id: {368 Concrete: {368 Concrete: {tests/src/xcm/xcmUnique.test.tsdiffbeforeafterboth858586 await usingRelayPlaygrounds(relayUrl, async (helper) => {86 await usingRelayPlaygrounds(relayUrl, async (helper) => {87 // Fund accounts on Statemint87 // Fund accounts on Statemint88 const relayXcmVersion = 2;88 await helper.xcm.teleportNativeAsset(alice, STATEMINT_CHAIN, alice.addressRaw, FUNDING_AMOUNT);89 await helper.xcm.teleportNativeAsset(alice, STATEMINT_CHAIN, alice.addressRaw, FUNDING_AMOUNT, relayXcmVersion);89 await helper.xcm.teleportNativeAsset(alice, STATEMINT_CHAIN, bob.addressRaw, FUNDING_AMOUNT);90 await helper.xcm.teleportNativeAsset(alice, STATEMINT_CHAIN, bob.addressRaw, FUNDING_AMOUNT, relayXcmVersion);90 });91 });919292 await usingStatemintPlaygrounds(statemintUrl, async (helper) => {93 await usingStatemintPlaygrounds(statemintUrl, async (helper) => {