Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

[Feature] XCM-Emulator #2447

Merged
merged 23 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,14 @@ members = [
"parachains/runtimes/contracts/contracts-rococo",
"parachains/runtimes/glutton/glutton-kusama",
"parachains/runtimes/testing/penpal",
"parachains/integration-tests/emulated/common",
"parachains/integration-tests/emulated/assets/statemint",
"test/client",
"test/relay-sproof-builder",
"test/relay-validation-worker-provider",
"test/runtime",
"test/service",
"xcm/xcm-emulator",
]

[profile.release]
Expand All @@ -67,4 +70,3 @@ opt-level = 3
inherits = "release"
lto = true
codegen-units = 1

Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ settings:
paraId: &pp_id 2000
variables:
common:
xcm_verison: &xcm_version '2'
require_weight_at_most: &weight_at_most 1000000000
xcm_version: &xcm_version '3'
require_weight_at_most: &weight_at_most {refTime: 1000000000, proofSize: 200000}
chains:
relay_chain:
signer: &rc_signer //Alice
assets_parachain_destination: &ap_dest { v1: { 0, interior: { x1: { parachain: *ap_id }}}}
assets_parachain_destination: &ap_dest { v3: { 0, interior: { x1: { parachain: *ap_id }}}}
penpal_parachain:
signer: &pp_signer //Alice
decodedCalls:
Expand All @@ -37,7 +37,7 @@ tests:
its:
- name: XCM supported versions between chains
actions:
- extrinsics: # Relay Chain sets supported version for Assset Parachain
- extrinsics: # Relay Chain sets supported version for Asset Parachain
- chain: *relay_chain
sudo: true
signer: *rc_signer
Expand All @@ -56,13 +56,13 @@ tests:
]
events:
- name: sudo.Sudid
attribute:
type: Result<Null, SpRuntimeDispatchError>
value: Ok
attributes:
- type: Result<Null, SpRuntimeDispatchError>
value: Ok
- name: xcmPallet.SupportedVersionChanged
attribute:
type: u32
value: *xcm_version
attributes:
- type: u32
value: *xcm_version
- extrinsics: # Relay Chain sets supported version for Penpal Parachain
- chain: *relay_chain
sudo: true
Expand All @@ -82,14 +82,14 @@ tests:
]
events:
- name: sudo.Sudid
attribute:
type: Result<Null, SpRuntimeDispatchError>
value: Ok
attributes:
- type: Result<Null, SpRuntimeDispatchError>
value: Ok
- name: xcmPallet.SupportedVersionChanged
attribute:
type: u32
value: *xcm_version
- extrinsics: # Assset Parachain sets supported version for Relay Chain through it
attributes:
- type: u32
value: *xcm_version
- extrinsics: # Asset Parachain sets supported version for Relay Chain through it
- chain: *relay_chain
signer: *rc_signer
sudo: true
Expand All @@ -98,10 +98,20 @@ tests:
args: [
*ap_dest, # destination
{
v2: [ #message
v3: [ #message
{
UnpaidExecution: {
weightLimit: {
limited: {
refTime: 2200000000,
proofSize: 200000
}
}
}
},
{
Transact: {
originType: Superuser,
originKind: Superuser,
requireWeightAtMost: *weight_at_most,
call: $ap_force_xcm_version
}
Expand All @@ -111,15 +121,15 @@ tests:
]
events:
- name: sudo.Sudid
attribute:
type: Result<Null, SpRuntimeDispatchError>
value: Ok
attributes:
- type: Result<Null, SpRuntimeDispatchError>
value: Ok
- name: xcmPallet.Sent
- name: polkadotXcm.SupportedVersionChanged
chain: *assets_parachain
attribute:
type: u32
value: *xcm_version
attributes:
- type: u32
value: *xcm_version
- extrinsics: # Penpal Parachain sets supported version for Relay Chain
- chain: *penpal_parachain
signer: *pp_signer
Expand All @@ -135,10 +145,10 @@ tests:
]
events:
- name: sudo.Sudid
attribute:
type: Result<Null, SpRuntimeDispatchError>
value: Ok
attributes:
- type: Result<Null, SpRuntimeDispatchError>
value: Ok
- name: polkadotXcm.SupportedVersionChanged
attribute:
type: u32
value: *xcm_version
attributes:
- type: u32
value: *xcm_version
Loading