mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 16:51:02 +00:00
Xcm emulator nits (#1649)
# Desription ## Summary This PR introduces several nits and tweaks to xcm emulator tests for system parachains. ## Explanation **Deduplicate `XcmPallet::send(` with root origin code** - Introduced `send_transact_to_parachain` which could be easily reuse for scenarios like _governance call from relay chain to parachain_. **Refactor `send_transact_sudo_from_relay_to_system_para_works`** - Test covered just one use-case which was moved to the `do_force_create_asset_from_relay_to_system_para`, so now we can extend this test with more _governance-like_ senarios. - Renamed to `send_transact_as_superuser_from_relay_to_system_para_works`. **Remove `send_transact_native_from_relay_to_system_para_fails` test** - This test and/or description is kind of misleading, because system paras support Native from relay chain by `RelayChainAsNative` with correct xcm origin. - It tested only sending on relay chain which should go directly to the relay chain unit-tests (does not even need to be in xcm emulator level). ## Future directions Check restructure parachains integration tests [issue](https://github.com/paritytech/polkadot-sdk/issues/1389) and [PR with more TODOs](https://github.com/paritytech/polkadot-sdk/pull/1693). --------- Co-authored-by: Ignacio Palacios <ignacio.palacios.santos@gmail.com>
This commit is contained in:
@@ -250,30 +250,22 @@ decl_test_bridges! {
|
||||
target = BridgeHubRococo,
|
||||
handler = WococoRococoMessageHandler
|
||||
}
|
||||
// TODO: uncomment when https://github.com/paritytech/polkadot-sdk/pull/1352 is merged
|
||||
// pub struct PolkadotKusamaMockBridge {
|
||||
// source = BridgeHubPolkadot,
|
||||
// target = BridgeHubKusama,
|
||||
// handler = PolkadotKusamaMessageHandler
|
||||
// },
|
||||
// pub struct KusamaPolkadotMockBridge {
|
||||
// source = BridgeHubKusama,
|
||||
// target = BridgeHubPolkadot,
|
||||
// handler = KusamaPolkadotMessageHandler
|
||||
// }
|
||||
}
|
||||
|
||||
// Westend implementation
|
||||
impl_accounts_helpers_for_relay_chain!(Westend);
|
||||
impl_assert_events_helpers_for_relay_chain!(Westend);
|
||||
impl_send_transact_helpers_for_relay_chain!(Westend);
|
||||
|
||||
// Rococo implementation
|
||||
impl_accounts_helpers_for_relay_chain!(Rococo);
|
||||
impl_assert_events_helpers_for_relay_chain!(Rococo);
|
||||
impl_send_transact_helpers_for_relay_chain!(Rococo);
|
||||
|
||||
// Wococo implementation
|
||||
impl_accounts_helpers_for_relay_chain!(Wococo);
|
||||
impl_assert_events_helpers_for_relay_chain!(Wococo);
|
||||
impl_send_transact_helpers_for_relay_chain!(Wococo);
|
||||
|
||||
// AssetHubWestend implementation
|
||||
impl_accounts_helpers_for_parachain!(AssetHubWestend);
|
||||
|
||||
Reference in New Issue
Block a user