forked from open-web3-stack/polkadot-ecosystem-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kusama.shiden.test.ts
31 lines (26 loc) · 1 KB
/
kusama.shiden.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { describe } from 'vitest'
import { kusama, shiden } from '@e2e-test/networks/chains'
import { query, tx } from '@e2e-test/shared/api'
import { runXcmPalletDown, runXtokensUp } from '@e2e-test/shared/xcm'
import { setupNetworks } from '@e2e-test/shared'
describe('kusama & shiden', async () => {
const [kusamaClient, shidenClient] = await setupNetworks(kusama, shiden)
const shidenKSM = shiden.custom.ksm
const kusamaKSM = kusama.custom.ksm
runXtokensUp('shiden transfer KSM to kusama', async () => {
return {
fromChain: shidenClient,
toChain: kusamaClient,
balance: query.assets(shidenKSM),
tx: tx.xtokens.transfer(shidenKSM, 1e12, tx.xtokens.relaychainV3),
}
})
runXcmPalletDown('kusama transfer KSM to shiden', async () => {
return {
fromChain: kusamaClient,
toChain: shidenClient,
balance: query.assets(shidenKSM),
tx: tx.xcmPallet.limitedReserveTransferAssetsV3(kusamaKSM, 1e12, tx.xcmPallet.parachainV3(0, shiden.paraId!)),
}
})
})