[Feature] XCM-Emulator (#2447)

* [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>
This commit is contained in:
Roman Useinov
2023-05-19 19:53:41 +02:00
committed by GitHub
parent 8425e2a5c0
commit 944ab483d5
40 changed files with 3848 additions and 1859 deletions
@@ -0,0 +1,54 @@
[package]
name = "integration-tests-common"
version = "1.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
description = "Common resources for integration testing with xcm-emulator"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false }
# Substrate
grandpa = { package = "sc-consensus-grandpa", git = "https://github.com/paritytech/substrate", branch = "master" }
sp-authority-discovery = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
sp-weights = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
sp-consensus-babe = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-assets = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-staking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-im-online = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
# Polkadot
polkadot-core-primitives = { default-features = false, git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-parachain = { default-features = false, git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-service = { default-features = false, git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-primitives = { default-features = false, git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-runtime = { git = "https://github.com/paritytech/polkadot", branch = "master" }
polkadot-runtime-constants = { git = "https://github.com/paritytech/polkadot", branch = "master" }
kusama-runtime = { git = "https://github.com/paritytech/polkadot", branch = "master" }
kusama-runtime-constants = { git = "https://github.com/paritytech/polkadot", branch = "master" }
xcm = { default-features = false, git = "https://github.com/paritytech/polkadot", branch = "master" }
xcm-executor = { default-features = false, git = "https://github.com/paritytech/polkadot", branch = "master" }
pallet-xcm = { default-features = false, git = "https://github.com/paritytech/polkadot", branch = "master" }
# Cumulus
parachains-common = { path = "../../../common" }
parachain-info = { path = "../../../pallets/parachain-info" }
cumulus-primitives-core = { path = "../../../../primitives/core" }
penpal-runtime = { path = "../../../runtimes/testing/penpal" }
statemint-runtime = { path = "../../../runtimes/assets/statemint" }
statemine-runtime = { path = "../../../runtimes/assets/statemine" }
collectives-polkadot-runtime = { path = "../../../runtimes/collectives/collectives-polkadot" }
bridge-hub-kusama-runtime = { path = "../../../runtimes/bridge-hubs/bridge-hub-kusama" }
bridge-hub-polkadot-runtime = { path = "../../../runtimes/bridge-hubs/bridge-hub-polkadot" }
xcm-emulator = { default-features = false, path = "../../../../xcm/xcm-emulator" }
[features]
runtime-benchmarks = [
"kusama-runtime/runtime-benchmarks",
]