forked from open-web3-stack/polkadot-ecosystem-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcoretimeKusama.kusama.test.ts
31 lines (26 loc) · 1.05 KB
/
coretimeKusama.kusama.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 { coretimeKusama, kusama } from '@e2e-test/networks/chains'
import { query, tx } from '@e2e-test/shared/api'
import { runXcmPalletDown, runXcmPalletUp } from '@e2e-test/shared/xcm'
import { setupNetworks } from '@e2e-test/shared'
describe('kusama & coretimeKusama', async () => {
const [kusamaClient, coretimeClient] = await setupNetworks(kusama, coretimeKusama)
const coretimeKSM = coretimeKusama.custom.ksm
const kusamaKSM = kusama.custom.ksm
runXcmPalletDown('kusama transfer KSM to coretimeKusama', async () => {
return {
fromChain: kusamaClient,
toChain: coretimeClient,
balance: query.balances,
tx: tx.xcmPallet.teleportAssetsV3(kusamaKSM, 1e12, tx.xcmPallet.parachainV3(0, coretimeKusama.paraId!)),
}
})
runXcmPalletUp('coretimeKusama transfer KSM to kusama', async () => {
return {
fromChain: coretimeClient,
toChain: kusamaClient,
balance: query.balances,
tx: tx.xcmPallet.teleportAssetsV3(coretimeKSM, 1e12, tx.xcmPallet.relaychainV4),
}
})
})