@@ -6,74 +6,7 @@ import { statemine as statemineUtil } from '../../networks/statemint'
66
77describe ( 'Shiden & AssetHub' , ( ) => {
88 given ( 'shiden' , 'statemine' ) (
9- '001: AssetHub transfer USDT to Shiden' ,
10- async ( { networks : { shiden, statemine } , keyring : { alice, bob } } ) => {
11- await statemine . dev . setStorage ( {
12- Assets : {
13- account : [ [ [ statemineUtil . usdtIndex , alice . address ] , { balance : 100e6 } ] ] ,
14- } ,
15- } )
16-
17- await tx . xcmPallet
18- . limitedReserveTransferAssetsV3 ( statemineUtil . usdt , 10e6 , tx . xcmPallet . parachainV3 (
19- 1 ,
20- shidenUtil . paraId ,
21- ) ) ( statemine , bob . addressRaw )
22- . signAndSend ( alice )
23-
24- await statemine . chain . newBlock ( )
25-
26- await checkHrmp ( statemine )
27- . redact ( { redactKeys : / s e t T o p i c / } )
28- . toMatchSnapshot ( '001: statemine ump messages' )
29-
30- await shiden . chain . newBlock ( )
31-
32- const bobBalance = await query . assets ( shidenUtil . usdt ) ( shiden , bob . address )
33- expect ( bobBalance . unwrap ( ) . balance . toNumber ( ) ) . closeTo (
34- 10_000_000 ,
35- 10_000 , // some fee
36- 'Expected amount was not received' ,
37- )
38-
39- await checkSystemEvents ( shiden , 'xcmpQueue' , 'messageQueue' ) . toMatchSnapshot ( '002: shiden event' )
40- } ,
41- )
42-
43- given ( 'shiden' , 'statemine' ) (
44- '002: Shiden transfer USDT to AssetHub' ,
45- async ( { networks : { shiden, statemine } , keyring : { alice, bob } } ) => {
46- await shiden . dev . setStorage ( {
47- Assets : {
48- account : [ [ [ shidenUtil . usdt , alice . address ] , { balance : 100e6 } ] ] ,
49- } ,
50- } )
51-
52- await tx . xtokens
53- . transfer ( shidenUtil . usdt , 10e6 , tx . xtokens . parachainV3 ( statemineUtil . paraId ) ) ( shiden , bob . addressRaw )
54- . signAndSend ( alice )
55-
56- await shiden . chain . newBlock ( )
57-
58- await checkHrmp ( shiden )
59- . redact ( { redactKeys : / s e t T o p i c / } )
60- . toMatchSnapshot ( '001: shiden ump messages' )
61-
62- await statemine . chain . newBlock ( )
63-
64- const bobBalance = await query . assets ( statemineUtil . usdtIndex ) ( statemine , bob . address )
65- expect ( bobBalance . unwrap ( ) . balance . toNumber ( ) ) . closeTo (
66- 10_000_000 ,
67- 20_000 , // some fee
68- 'Expected amount was not received' ,
69- )
70-
71- await checkSystemEvents ( statemine , 'xcmpQueue' , 'messageQueue' ) . toMatchSnapshot ( '002: statemine event' )
72- } ,
73- )
74-
75- given ( 'shiden' , 'statemine' ) (
76- '003: Transfer KSM from AssetHub (statemine) to Shiden' ,
9+ '001: Transfer KSM from AssetHub (statemine) to Shiden' ,
7710 async ( { networks : { shiden, statemine } , keyring : { alice, bob } } ) => {
7811 await tx . xcmPallet
7912 . limitedReserveTransferAssetsV3 ( statemineUtil . ksm , 1e12 , tx . xcmPallet . parachainV3 (
@@ -86,7 +19,7 @@ describe('Shiden & AssetHub', () => {
8619
8720 await checkHrmp ( statemine )
8821 . redact ( { redactKeys : / s e t T o p i c / } )
89- . toMatchSnapshot ( '003 : statemine ump messages' )
22+ . toMatchSnapshot ( '001 : statemine ump messages' )
9023
9124 await shiden . chain . newBlock ( )
9225
@@ -97,7 +30,7 @@ describe('Shiden & AssetHub', () => {
9730 'Expected amount was not received' ,
9831 )
9932
100- await checkSystemEvents ( shiden , 'xcmpQueue' , 'messageQueue' ) . toMatchSnapshot ( '003 : shiden event' )
33+ await checkSystemEvents ( shiden , 'xcmpQueue' , 'messageQueue' ) . toMatchSnapshot ( '001 : shiden event' )
10134 } ,
10235 )
10336} )
0 commit comments