mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 18:11:03 +00:00
b7082d1a9d
* [Feature] XCM-Emulator * ".git/.scripts/commands/fmt/fmt.sh" * rename * readme * more rename * rename directory * implement AssetTransactor * Update xcm/xcm-emulator/README.md Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> * address review comments (#2502) * Update xcm/xcm-emulator/example/src/lib.rs Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update xcm/xcm-emulator/README.md * Use 2d weights. * Point out nearer the failure why it should fail * Move test-runtime to under examples * Walk through how to use it * proof needs to be non-zero * Apply suggestions from code review * Update xcm/xcm-emulator/README.md Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Improve xcm emulator (#2593) * folder restructutre * common created * make macros repetitions * messenger traits for relay and para * default Messenger impls * messenger traits refactor * declared two networks * init network approach works * queues use HashMap but relay block number * init and reset refactor * messengers trait name changed * relay block number suboptimal * fix reset hashmap keys * genesis added * test ext added for parachains * genesis added relay chains * genesis to storage * new_ext replaced by on_init * new relay block number approach * ext_wrapper added * added types to Parachain trait * relay chain with types * restructure * para_ids working * replace para_id getter * replace para_id getter 2 * tests restructure + common variables * added sovereign and balances helpers * more helpers + tess pass * expected events macro added * added events trait method * expect_events macro improve * expect_events macro done * network traits added * reserve_transfer test added * para & relay macro inputs redefined * added collectives & BH paras * test restructure * statemine removed * nitpick * rename test folder + events logs * clean * weight threshold helper * update readme * remove cumulus-test-service dependancy * fmt * comment docs * update e2e tests to xcm v3 * clippy + runtime-benchmark + clean docs --------- Co-authored-by: command-bot <> Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com> Co-authored-by: Squirrel <gilescope@gmail.com> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Co-authored-by: Ignacio Palacios <ignacio.palacios.santos@gmail.com>
155 lines
4.9 KiB
YAML
155 lines
4.9 KiB
YAML
---
|
|
settings:
|
|
chains:
|
|
relay_chain: &relay_chain
|
|
wsPort: 9800
|
|
assets_parachain: &assets_parachain
|
|
wsPort: 9810
|
|
paraId: &ap_id 1000
|
|
penpal_parachain: &penpal_parachain
|
|
wsPort: 9820
|
|
paraId: &pp_id 2000
|
|
variables:
|
|
common:
|
|
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 { v3: { 0, interior: { x1: { parachain: *ap_id }}}}
|
|
penpal_parachain:
|
|
signer: &pp_signer //Alice
|
|
decodedCalls:
|
|
ap_force_xcm_version:
|
|
chain: *assets_parachain
|
|
pallet: polkadotXcm
|
|
call: forceXcmVersion
|
|
args: [
|
|
{ # location
|
|
parents: 1,
|
|
interior: Here
|
|
},
|
|
*xcm_version # xcmVersion
|
|
]
|
|
|
|
tests:
|
|
- name: Initialize Chains
|
|
its:
|
|
- name: XCM supported versions between chains
|
|
actions:
|
|
- extrinsics: # Relay Chain sets supported version for Asset Parachain
|
|
- chain: *relay_chain
|
|
sudo: true
|
|
signer: *rc_signer
|
|
pallet: xcmPallet
|
|
call: forceXcmVersion
|
|
args: [
|
|
{ # location
|
|
parents: 0,
|
|
interior: {
|
|
X1: {
|
|
Parachain: *ap_id
|
|
}
|
|
}
|
|
},
|
|
*xcm_version # xcmVersion
|
|
]
|
|
events:
|
|
- name: sudo.Sudid
|
|
attributes:
|
|
- type: Result<Null, SpRuntimeDispatchError>
|
|
value: Ok
|
|
- name: xcmPallet.SupportedVersionChanged
|
|
attributes:
|
|
- type: u32
|
|
value: *xcm_version
|
|
- extrinsics: # Relay Chain sets supported version for Penpal Parachain
|
|
- chain: *relay_chain
|
|
sudo: true
|
|
signer: *rc_signer
|
|
pallet: xcmPallet
|
|
call: forceXcmVersion
|
|
args: [
|
|
{ # location
|
|
parents: 0,
|
|
interior: {
|
|
X1: {
|
|
Parachain: *pp_id
|
|
}
|
|
}
|
|
},
|
|
*xcm_version # xcmVersion
|
|
]
|
|
events:
|
|
- name: sudo.Sudid
|
|
attributes:
|
|
- type: Result<Null, SpRuntimeDispatchError>
|
|
value: Ok
|
|
- name: xcmPallet.SupportedVersionChanged
|
|
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
|
|
pallet: xcmPallet
|
|
call: send
|
|
args: [
|
|
*ap_dest, # destination
|
|
{
|
|
v3: [ #message
|
|
{
|
|
UnpaidExecution: {
|
|
weightLimit: {
|
|
limited: {
|
|
refTime: 3200000000,
|
|
proofSize: 200000
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
Transact: {
|
|
originKind: Superuser,
|
|
requireWeightAtMost: *weight_at_most,
|
|
call: $ap_force_xcm_version
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
events:
|
|
- name: sudo.Sudid
|
|
attributes:
|
|
- type: Result<Null, SpRuntimeDispatchError>
|
|
value: Ok
|
|
- name: xcmPallet.Sent
|
|
- name: polkadotXcm.SupportedVersionChanged
|
|
chain: *assets_parachain
|
|
attributes:
|
|
- type: u32
|
|
value: *xcm_version
|
|
- extrinsics: # Penpal Parachain sets supported version for Relay Chain
|
|
- chain: *penpal_parachain
|
|
signer: *pp_signer
|
|
sudo: true
|
|
pallet: polkadotXcm
|
|
call: forceXcmVersion
|
|
args: [
|
|
{ # location
|
|
parents: 1,
|
|
interior: Here
|
|
},
|
|
*xcm_version # xcmVersion
|
|
]
|
|
events:
|
|
- name: sudo.Sudid
|
|
attributes:
|
|
- type: Result<Null, SpRuntimeDispatchError>
|
|
value: Ok
|
|
- name: polkadotXcm.SupportedVersionChanged
|
|
attributes:
|
|
- type: u32
|
|
value: *xcm_version
|