[xcm-emulator] Improve hygiene and clean up (#1301)

* improve hygiene & clean up

* improve hygiene & clean up - xcm-emulator

* improve hygiene & clean up - common

* improve hygiene & clean up - tests

* improve hygiene & clean up - tests 2

* last hygiene bits

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: command-bot <>
This commit is contained in:
Ignacio Palacios
2023-09-01 12:44:06 +02:00
committed by GitHub
parent 12443589e3
commit 241601b1c1
18 changed files with 388 additions and 513 deletions
@@ -10,13 +10,7 @@ publish = false
codec = { package = "parity-scale-codec", version = "3.4.0", default-features = false }
# Substrate
sp-runtime = { path = "../../../../../../substrate/primitives/runtime", default-features = false}
frame-support = { path = "../../../../../../substrate/frame/support", default-features = false}
frame-system = { path = "../../../../../../substrate/frame/system", default-features = false}
sp-core = { path = "../../../../../../substrate/primitives/core", default-features = false}
sp-weights = { path = "../../../../../../substrate/primitives/weights", default-features = false}
pallet-balances = { path = "../../../../../../substrate/frame/balances", default-features = false}
pallet-assets = { path = "../../../../../../substrate/frame/assets", default-features = false}
# Polkadot
polkadot-core-primitives = { path = "../../../../../../polkadot/core-primitives", default-features = false}
@@ -24,13 +18,12 @@ polkadot-parachain-primitives = { path = "../../../../../../polkadot/parachain",
polkadot-runtime-parachains = { path = "../../../../../../polkadot/runtime/parachains" }
polkadot-runtime = { path = "../../../../../../polkadot/runtime/polkadot" }
xcm = { package = "staging-xcm", path = "../../../../../../polkadot/xcm", default-features = false}
xcm-executor = { package = "staging-xcm-executor", path = "../../../../../../polkadot/xcm/xcm-executor", default-features = false}
pallet-xcm = { path = "../../../../../../polkadot/xcm/pallet-xcm", default-features = false}
# Cumulus
parachains-common = { path = "../../../../common" }
cumulus-pallet-xcmp-queue = { path = "../../../../../pallets/xcmp-queue", default-features = false}
cumulus-pallet-parachain-system = { path = "../../../../../pallets/parachain-system" }
cumulus-pallet-dmp-queue = { path = "../../../../../pallets/dmp-queue", default-features = false}
pallet-bridge-messages = { path = "../../../../../bridges/modules/messages", default-features = false}
bp-messages = { path = "../../../../../bridges/primitives/messages", default-features = false}
@@ -15,48 +15,27 @@
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
pub use bp_messages::LaneId;
pub use codec::Encode;
pub use frame_support::{
assert_err, assert_ok,
instances::Instance1,
pallet_prelude::Weight,
sp_runtime::{AccountId32, DispatchError, DispatchResult, MultiAddress},
traits::{fungibles::Inspect, OriginTrait},
};
pub use frame_support::assert_ok;
pub use integration_tests_common::{
constants::{
accounts::{ALICE, BOB},
asset_hub_kusama::ED as ASSET_HUB_ROCOCO_ED,
kusama::ED as ROCOCO_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
asset_hub_kusama::ED as ASSET_HUB_ROCOCO_ED, kusama::ED as ROCOCO_ED, PROOF_SIZE_THRESHOLD,
REF_TIME_THRESHOLD, XCM_V3,
},
lazy_static::lazy_static,
xcm_transact_paid_execution, xcm_transact_unpaid_execution, AssetHubRococo,
AssetHubRococoPallet, AssetHubRococoReceiver, AssetHubRococoSender, AssetHubWococo,
AssetHubWococoPallet, AssetHubWococoReceiver, AssetHubWococoSender, BridgeHubRococo,
BridgeHubRococoPallet, BridgeHubRococoReceiver, BridgeHubRococoSender, BridgeHubWococo,
BridgeHubWococoPallet, BridgeHubWococoReceiver, BridgeHubWococoSender, Collectives,
CollectivesPallet, CollectivesReceiver, CollectivesSender, PenpalRococoA, PenpalRococoAPallet,
PenpalRococoAReceiver, PenpalRococoASender, Rococo, RococoMockNet, RococoPallet,
RococoReceiver, RococoSender, Wococo, WococoMockNet, WococoPallet, WococoReceiver,
WococoSender,
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
AssetHubRococo, AssetHubRococoReceiver, AssetHubWococo, BridgeHubRococo, BridgeHubWococo,
PenpalRococoA, Rococo, RococoPallet,
};
pub use parachains_common::{AccountId, Balance};
pub use polkadot_core_primitives::InboundDownwardMessage;
pub use polkadot_parachain_primitives::primitives::{HrmpChannelId, Id};
pub use polkadot_runtime_parachains::inclusion::{AggregateMessageOrigin, UmpQueueId};
pub use xcm::{
prelude::*,
prelude::{AccountId32 as AccountId32Junction, *},
v3::{
Error,
NetworkId::{Rococo as RococoId, Wococo as WococoId},
},
DoubleEncoded,
};
pub use xcm_emulator::{
assert_expected_events, bx, cumulus_pallet_dmp_queue, helpers::weight_within_threshold,
AccountId32Junction, Chain, ParaId, Parachain as Para, RelayChain as Relay, Test, TestArgs,
TestContext, TestExt, TestExternalities,
assert_expected_events, bx, helpers::weight_within_threshold, Chain, Parachain as Para,
RelayChain as Relay, Test, TestArgs, TestContext, TestExt,
};
pub const ASSET_ID: u32 = 1;