Refactoring Checkpoint: (WIP)
This commit is contained in:
+11
-11
@@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "bridge-hub-zagros-integration-tests"
|
||||
name = "pezbridge-hub-zagros-integration-tests"
|
||||
version = "1.0.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license = "Apache-2.0"
|
||||
description = "Bridge Hub Zagros runtime integration tests with xcm-emulator"
|
||||
description = "Bridge Hub Zagros runtime integration tests with xcm-pez-emulator"
|
||||
publish = false
|
||||
documentation = "https://docs.rs/bridge-hub-zagros-integration-tests"
|
||||
documentation = "https://docs.rs/pezbridge-hub-zagros-integration-tests"
|
||||
repository = { workspace = true }
|
||||
homepage = { workspace = true }
|
||||
|
||||
@@ -42,7 +42,7 @@ pezpallet-bridge-relayers = { workspace = true }
|
||||
asset-hub-zagros-runtime = { workspace = true }
|
||||
bp-asset-hub-zagros = { workspace = true }
|
||||
bridge-hub-common = { workspace = true }
|
||||
bridge-hub-zagros-runtime = { workspace = true }
|
||||
pezbridge-hub-zagros-runtime = { workspace = true }
|
||||
pezcumulus-pezpallet-teyrchain-system = { workspace = true }
|
||||
pezcumulus-pezpallet-xcmp-queue = { workspace = true }
|
||||
emulated-integration-tests-common = { workspace = true }
|
||||
@@ -54,9 +54,9 @@ testnet-teyrchains-constants = { features = [
|
||||
teyrchains-common = { workspace = true, default-features = true }
|
||||
|
||||
# Snowbridge
|
||||
snowbridge-core = { workspace = true }
|
||||
snowbridge-inbound-queue-primitives = { workspace = true }
|
||||
snowbridge-outbound-queue-primitives = { workspace = true }
|
||||
pezsnowbridge-core = { workspace = true }
|
||||
pezsnowbridge-inbound-queue-primitives = { workspace = true }
|
||||
pezsnowbridge-outbound-queue-primitives = { workspace = true }
|
||||
snowbridge-pezpallet-inbound-queue = { workspace = true }
|
||||
snowbridge-pezpallet-inbound-queue-fixtures = { workspace = true }
|
||||
snowbridge-pezpallet-inbound-queue-v2 = { workspace = true }
|
||||
@@ -70,7 +70,7 @@ runtime-benchmarks = [
|
||||
"asset-hub-zagros-runtime/runtime-benchmarks",
|
||||
"bp-asset-hub-zagros/runtime-benchmarks",
|
||||
"bridge-hub-common/runtime-benchmarks",
|
||||
"bridge-hub-zagros-runtime/runtime-benchmarks",
|
||||
"pezbridge-hub-zagros-runtime/runtime-benchmarks",
|
||||
"pezcumulus-pezpallet-teyrchain-system/runtime-benchmarks",
|
||||
"pezcumulus-pezpallet-xcmp-queue/runtime-benchmarks",
|
||||
"emulated-integration-tests-common/runtime-benchmarks",
|
||||
@@ -83,9 +83,9 @@ runtime-benchmarks = [
|
||||
"pezpallet-message-queue/runtime-benchmarks",
|
||||
"pezpallet-xcm/runtime-benchmarks",
|
||||
"pezkuwichain-zagros-system-emulated-network/runtime-benchmarks",
|
||||
"snowbridge-core/runtime-benchmarks",
|
||||
"snowbridge-inbound-queue-primitives/runtime-benchmarks",
|
||||
"snowbridge-outbound-queue-primitives/runtime-benchmarks",
|
||||
"pezsnowbridge-core/runtime-benchmarks",
|
||||
"pezsnowbridge-inbound-queue-primitives/runtime-benchmarks",
|
||||
"pezsnowbridge-outbound-queue-primitives/runtime-benchmarks",
|
||||
"snowbridge-pezpallet-inbound-queue-fixtures/runtime-benchmarks",
|
||||
"snowbridge-pezpallet-inbound-queue-v2/runtime-benchmarks",
|
||||
"snowbridge-pezpallet-inbound-queue/runtime-benchmarks",
|
||||
|
||||
+5
-5
@@ -37,7 +37,7 @@ mod imports {
|
||||
impls::Inspect,
|
||||
test_dry_run_transfer_across_pk_bridge, test_relay_is_trusted_teleporter,
|
||||
test_teyrchain_is_trusted_teleporter, test_teyrchain_is_trusted_teleporter_for_relay,
|
||||
xcm_emulator::{
|
||||
xcm_pez_emulator::{
|
||||
assert_expected_events, bx, Chain, RelayChain as Relay, TestExt, Teyrchain as Para,
|
||||
},
|
||||
xcm_helpers::xcm_transact_paid_execution,
|
||||
@@ -55,14 +55,14 @@ mod imports {
|
||||
genesis::{AssetHubZagrosAssetOwner, ED as ASSET_HUB_ZAGROS_ED},
|
||||
AssetHubZagrosParaPallet as AssetHubZagrosPallet,
|
||||
},
|
||||
bridge_hub_zagros_emulated_chain::{
|
||||
bridge_hub_zagros_runtime, genesis::ED as BRIDGE_HUB_ZAGROS_ED,
|
||||
pezbridge_hub_zagros_emulated_chain::{
|
||||
pezbridge_hub_zagros_runtime, genesis::ED as BRIDGE_HUB_ZAGROS_ED,
|
||||
BridgeHubZagrosExistentialDeposit, BridgeHubZagrosParaPallet as BridgeHubZagrosPallet,
|
||||
BridgeHubZagrosRuntimeOrigin,
|
||||
},
|
||||
penpal_emulated_chain::{
|
||||
pez_penpal_emulated_chain::{
|
||||
self,
|
||||
penpal_runtime::xcm_config::{
|
||||
pez_penpal_runtime::xcm_config::{
|
||||
CustomizableAssetFromSystemAssetHub as PenpalCustomizableAssetFromSystemAssetHub,
|
||||
LocalTeleportableToAssetHub as PenpalLocalTeleportableToAssetHub,
|
||||
UniversalLocation as PenpalUniversalLocation,
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
//! Tests related to XCM aliasing.
|
||||
|
||||
use crate::imports::*;
|
||||
use bridge_hub_zagros_runtime::xcm_config::XcmConfig;
|
||||
use pezbridge_hub_zagros_runtime::xcm_config::XcmConfig;
|
||||
use emulated_integration_tests_common::{macros::AccountId, test_cross_chain_alias};
|
||||
use pezframe_support::traits::ContainsPair;
|
||||
use xcm::latest::Junctions::*;
|
||||
|
||||
+8
-8
@@ -17,7 +17,7 @@ use crate::tests::{snowbridge_common::snowbridge_sovereign, *};
|
||||
use emulated_integration_tests_common::{
|
||||
macros::Dmp,
|
||||
xcm_helpers::{find_all_mq_processed_ids, find_mq_processed_id, find_xcm_sent_message_id},
|
||||
xcm_simulator::helpers::TopicIdTracker,
|
||||
xcm_pez_simulator::helpers::TopicIdTracker,
|
||||
};
|
||||
use xcm::latest::AssetTransferFilter;
|
||||
|
||||
@@ -109,7 +109,7 @@ fn send_assets_from_penpal_zagros_through_zagros_ah_to_pezkuwichain_ah(
|
||||
who: *who == TreasuryAccount::get(),
|
||||
},
|
||||
RuntimeEvent::XcmpQueue(
|
||||
pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
) => {},
|
||||
]
|
||||
);
|
||||
@@ -699,7 +699,7 @@ fn send_wnds_from_zagros_relay_through_asset_hub_zagros_to_asset_hub_pezkuwichai
|
||||
who: *who == sov_ahr_on_ahw.clone().into(),
|
||||
},
|
||||
RuntimeEvent::XcmpQueue(
|
||||
pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
) => {},
|
||||
]
|
||||
);
|
||||
@@ -1008,7 +1008,7 @@ fn send_back_rocs_from_penpal_zagros_through_asset_hub_zagros_to_asset_hub_pezku
|
||||
owner: owner == &sov_penpal_on_ahw,
|
||||
},
|
||||
RuntimeEvent::XcmpQueue(
|
||||
pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
) => {},
|
||||
// message processed successfully
|
||||
RuntimeEvent::MessageQueue(
|
||||
@@ -1034,7 +1034,7 @@ fn send_back_rocs_from_penpal_zagros_through_asset_hub_zagros_to_asset_hub_pezku
|
||||
},
|
||||
// sent message to sibling Penpal
|
||||
RuntimeEvent::XcmpQueue(
|
||||
pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
) => {},
|
||||
// message processed successfully
|
||||
RuntimeEvent::MessageQueue(
|
||||
@@ -1206,7 +1206,7 @@ fn send_back_rocs_from_penpal_zagros_through_asset_hub_zagros_to_asset_hub_pezku
|
||||
owner: owner == &sov_penpal_on_ahw,
|
||||
},
|
||||
RuntimeEvent::XcmpQueue(
|
||||
pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
) => {},
|
||||
// message processed successfully
|
||||
RuntimeEvent::MessageQueue(
|
||||
@@ -1235,7 +1235,7 @@ fn send_back_rocs_from_penpal_zagros_through_asset_hub_zagros_to_asset_hub_pezku
|
||||
},
|
||||
// sent message to Pezkuwichain Relay
|
||||
RuntimeEvent::TeyrchainSystem(
|
||||
pezcumulus_pallet_teyrchain_system::Event::UpwardMessageSent { .. }
|
||||
pezcumulus_pezpallet_teyrchain_system::Event::UpwardMessageSent { .. }
|
||||
) => {},
|
||||
// message processed successfully
|
||||
RuntimeEvent::MessageQueue(
|
||||
@@ -1400,7 +1400,7 @@ fn do_send_pens_and_wnds_from_penpal_zagros_via_ahw_to_asset_hub_pezkuwichain(
|
||||
who: *who == sov_ahr_on_ahw.clone().into(),
|
||||
},
|
||||
RuntimeEvent::XcmpQueue(
|
||||
pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
) => {},
|
||||
]
|
||||
);
|
||||
|
||||
+1
-1
@@ -233,7 +233,7 @@ pub(crate) fn assert_bridge_hub_pezkuwichain_message_received() {
|
||||
vec![
|
||||
// message sent to destination
|
||||
RuntimeEvent::XcmpQueue(
|
||||
pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
) => {},
|
||||
]
|
||||
);
|
||||
|
||||
+38
-38
@@ -14,7 +14,7 @@
|
||||
// limitations under the License.
|
||||
use crate::{
|
||||
imports::{
|
||||
penpal_emulated_chain::penpal_runtime::xcm_config::{
|
||||
pez_penpal_emulated_chain::pez_penpal_runtime::xcm_config::{
|
||||
CheckingAccount, TELEPORTABLE_ASSET_ID,
|
||||
},
|
||||
*,
|
||||
@@ -24,7 +24,7 @@ use crate::{
|
||||
asset_hub_pezkuwichain_location, asset_hub_zagros_global_location,
|
||||
bridged_roc_at_ah_zagros, bridged_wnd_at_ah_pezkuwichain,
|
||||
create_foreign_on_ah_pezkuwichain, create_foreign_on_ah_zagros,
|
||||
penpal_emulated_chain::penpal_runtime,
|
||||
pez_penpal_emulated_chain::pez_penpal_runtime,
|
||||
snowbridge_common::{bridge_hub, ethereum, register_roc_on_bh, snowbridge_sovereign},
|
||||
},
|
||||
};
|
||||
@@ -32,7 +32,7 @@ use asset_hub_zagros_runtime::xcm_config::{
|
||||
bridging::to_ethereum::DefaultBridgeHubEthereumBaseFee,
|
||||
UniversalLocation as AssetHubZagrosUniversalLocation,
|
||||
};
|
||||
use bridge_hub_zagros_runtime::{
|
||||
use pezbridge_hub_zagros_runtime::{
|
||||
bridge_to_ethereum_config::EthereumGatewayAddress, EthereumBeaconClient, EthereumInboundQueue,
|
||||
};
|
||||
use codec::Encode;
|
||||
@@ -44,14 +44,14 @@ use pezframe_support::traits::fungibles::Mutate;
|
||||
use hex_literal::hex;
|
||||
use pezkuwichain_zagros_system_emulated_network::{
|
||||
asset_hub_zagros_emulated_chain::genesis::AssetHubZagrosAssetOwner,
|
||||
penpal_emulated_chain::PARA_ID_B, zagros_emulated_chain::zagros_runtime::Dmp,
|
||||
pez_penpal_emulated_chain::PARA_ID_B, zagros_emulated_chain::zagros_runtime::Dmp,
|
||||
};
|
||||
use snowbridge_core::{AssetMetadata, TokenIdOf};
|
||||
use snowbridge_inbound_queue_primitives::{
|
||||
use pezsnowbridge_core::{AssetMetadata, TokenIdOf};
|
||||
use pezsnowbridge_inbound_queue_primitives::{
|
||||
v1::{Command, Destination, MessageV1, VersionedMessage},
|
||||
EventFixture,
|
||||
};
|
||||
use snowbridge_pallet_inbound_queue_fixtures::send_native_eth::make_send_native_eth_message;
|
||||
use snowbridge_pezpallet_inbound_queue_fixtures::send_native_eth::make_send_native_eth_message;
|
||||
use pezsp_core::{H160, H256};
|
||||
use testnet_teyrchains_constants::zagros::snowbridge::EthereumNetwork;
|
||||
use xcm_builder::ExternalConsensusLocationsConverterFor;
|
||||
@@ -98,7 +98,7 @@ fn register_token_from_ethereum_to_asset_hub() {
|
||||
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -147,7 +147,7 @@ fn send_weth_token_from_ethereum_to_asset_hub() {
|
||||
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -186,7 +186,7 @@ fn send_weth_from_ethereum_to_penpal() {
|
||||
<PenpalB as Chain>::RuntimeOrigin::signed(PenpalAssetOwner::get()),
|
||||
native_id,
|
||||
receiver,
|
||||
penpal_runtime::EXISTENTIAL_DEPOSIT,
|
||||
pez_penpal_runtime::EXISTENTIAL_DEPOSIT,
|
||||
);
|
||||
|
||||
PenpalB::execute_with(|| {
|
||||
@@ -251,7 +251,7 @@ fn send_weth_from_ethereum_to_penpal() {
|
||||
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -262,7 +262,7 @@ fn send_weth_from_ethereum_to_penpal() {
|
||||
AssetHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::ForeignAssets(pezpallet_assets::Event::Issued { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
]
|
||||
);
|
||||
});
|
||||
@@ -324,7 +324,7 @@ fn send_eth_asset_from_asset_hub_to_ethereum_and_back() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
]
|
||||
);
|
||||
});
|
||||
@@ -403,8 +403,8 @@ fn send_eth_asset_from_asset_hub_to_ethereum_and_back() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageAccepted {..}) => {},
|
||||
RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued {..}) => {},
|
||||
RuntimeEvent::EthereumOutboundQueue(snowbridge_pezpallet_outbound_queue::Event::MessageAccepted {..}) => {},
|
||||
RuntimeEvent::EthereumOutboundQueue(snowbridge_pezpallet_outbound_queue::Event::MessageQueued {..}) => {},
|
||||
]
|
||||
);
|
||||
});
|
||||
@@ -433,7 +433,7 @@ fn register_weth_token_in_asset_hub_fail_for_insufficient_fee() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
]
|
||||
);
|
||||
});
|
||||
@@ -481,7 +481,7 @@ fn send_weth_from_ethereum_to_asset_hub_with_fee(account_id: [u8; 32], fee: u128
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
]
|
||||
);
|
||||
});
|
||||
@@ -590,7 +590,7 @@ fn send_token_from_ethereum_to_asset_hub() {
|
||||
// Check that the message was sent
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -634,7 +634,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() {
|
||||
// Check that the send token message was sent using xcm
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) =>{},]
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) =>{},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -703,7 +703,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() {
|
||||
// Outbound Queue
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pezpallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -778,7 +778,7 @@ fn send_token_from_ethereum_to_penpal() {
|
||||
// Check that the send token message was sent using xcm
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) =>{},]
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) =>{},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -789,7 +789,7 @@ fn send_token_from_ethereum_to_penpal() {
|
||||
AssetHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::ForeignAssets(pezpallet_assets::Event::Issued { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
]
|
||||
);
|
||||
});
|
||||
@@ -844,7 +844,7 @@ fn transfer_relay_token() {
|
||||
// Check that a message was sent to Ethereum to create the agent
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumSystem(snowbridge_pallet_system::Event::RegisterToken { .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumSystem(snowbridge_pezpallet_system::Event::RegisterToken { .. }) => {},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -901,7 +901,7 @@ fn transfer_relay_token() {
|
||||
// Outbound Queue
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pezpallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
|
||||
// Send relay token back to AH
|
||||
@@ -922,7 +922,7 @@ fn transfer_relay_token() {
|
||||
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1068,7 +1068,7 @@ fn transfer_ah_token() {
|
||||
// Outbound Queue
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pezpallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
|
||||
let message = VersionedMessage::V1(MessageV1 {
|
||||
@@ -1087,7 +1087,7 @@ fn transfer_ah_token() {
|
||||
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1192,7 +1192,7 @@ fn send_weth_from_ethereum_to_ahw_to_ahr_back_to_ahw_and_ethereum() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
]
|
||||
);
|
||||
});
|
||||
@@ -1333,7 +1333,7 @@ fn send_weth_from_ethereum_to_ahw_to_ahr_back_to_ahw_and_ethereum() {
|
||||
vec![
|
||||
// message sent to destination
|
||||
RuntimeEvent::XcmpQueue(
|
||||
pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
) => {},
|
||||
]
|
||||
);
|
||||
@@ -1426,7 +1426,7 @@ fn send_weth_from_ethereum_to_ahw_to_ahr_back_to_ahw_and_ethereum() {
|
||||
// Outbound Queue
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pezpallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -1558,7 +1558,7 @@ fn transfer_penpal_native_asset() {
|
||||
type RuntimeEvent = <BridgeHubZagros as Chain>::RuntimeEvent;
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pezpallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1582,7 +1582,7 @@ fn transfer_penpal_native_asset() {
|
||||
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1771,7 +1771,7 @@ fn transfer_penpal_teleport_enabled_asset() {
|
||||
type RuntimeEvent = <BridgeHubZagros as Chain>::RuntimeEvent;
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pezpallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1795,7 +1795,7 @@ fn transfer_penpal_teleport_enabled_asset() {
|
||||
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) =>
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) =>
|
||||
{},]
|
||||
);
|
||||
});
|
||||
@@ -2125,7 +2125,7 @@ fn transfer_roc_from_ah_with_transfer_and_then() {
|
||||
// Outbound Queue
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pezpallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -2148,7 +2148,7 @@ fn transfer_roc_from_ah_with_transfer_and_then() {
|
||||
let _ = EthereumInboundQueue::send_xcm(xcm, AssetHubZagros::para_id().into()).unwrap();
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
vec![RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -2222,7 +2222,7 @@ fn register_pna_in_v5_while_transfer_in_v4_should_work() {
|
||||
// Check that a message was sent to Ethereum to create the agent
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumSystem(snowbridge_pallet_system::Event::RegisterToken { .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumSystem(snowbridge_pezpallet_system::Event::RegisterToken { .. }) => {},]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -2288,7 +2288,7 @@ fn register_pna_in_v5_while_transfer_in_v4_should_work() {
|
||||
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pezpallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
+7
-7
@@ -21,11 +21,11 @@ use emulated_integration_tests_common::{
|
||||
};
|
||||
use pezframe_support::traits::fungibles::Mutate;
|
||||
use hex_literal::hex;
|
||||
use pezkuwichain_zagros_system_emulated_network::penpal_emulated_chain::{
|
||||
penpal_runtime::xcm_config::{CheckingAccount, TELEPORTABLE_ASSET_ID},
|
||||
use pezkuwichain_zagros_system_emulated_network::pez_penpal_emulated_chain::{
|
||||
pez_penpal_runtime::xcm_config::{CheckingAccount, TELEPORTABLE_ASSET_ID},
|
||||
PenpalAssetOwner,
|
||||
};
|
||||
use snowbridge_core::AssetMetadata;
|
||||
use pezsnowbridge_core::AssetMetadata;
|
||||
use pezsp_core::H160;
|
||||
use testnet_teyrchains_constants::zagros::snowbridge::EthereumNetwork;
|
||||
use xcm_builder::ExternalConsensusLocationsConverterFor;
|
||||
@@ -75,7 +75,7 @@ pub fn register_relay_token_on_bh() {
|
||||
));
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumSystem(snowbridge_pallet_system::Event::RegisterToken { .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumSystem(snowbridge_pezpallet_system::Event::RegisterToken { .. }) => {},]
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -157,7 +157,7 @@ pub fn register_pal_on_ah() {
|
||||
|
||||
pub fn penpal_root_sovereign() -> pezsp_runtime::AccountId32 {
|
||||
let penpal_root_sovereign: AccountId = PenpalB::execute_with(|| {
|
||||
use pezkuwichain_zagros_system_emulated_network::penpal_emulated_chain::penpal_runtime::xcm_config;
|
||||
use pezkuwichain_zagros_system_emulated_network::pez_penpal_emulated_chain::pez_penpal_runtime::xcm_config;
|
||||
xcm_config::LocationToAccountId::convert_location(&xcm_config::RootLocation::get())
|
||||
.unwrap()
|
||||
.into()
|
||||
@@ -390,7 +390,7 @@ pub fn register_pal_on_bh() {
|
||||
));
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumSystem(snowbridge_pallet_system::Event::RegisterToken { .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumSystem(snowbridge_pezpallet_system::Event::RegisterToken { .. }) => {},]
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -519,7 +519,7 @@ pub fn register_roc_on_bh() {
|
||||
));
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumSystem(snowbridge_pallet_system::Event::RegisterToken { .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumSystem(snowbridge_pezpallet_system::Event::RegisterToken { .. }) => {},]
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
+3
-3
@@ -14,10 +14,10 @@
|
||||
// limitations under the License.
|
||||
|
||||
use crate::{imports::*, tests::snowbridge_common::*};
|
||||
use bridge_hub_zagros_runtime::xcm_config::LocationToAccountId;
|
||||
use pezbridge_hub_zagros_runtime::xcm_config::LocationToAccountId;
|
||||
use emulated_integration_tests_common::snowbridge::{SEPOLIA_ID, WETH};
|
||||
use snowbridge_core::AssetMetadata;
|
||||
use snowbridge_pallet_system::Error;
|
||||
use pezsnowbridge_core::AssetMetadata;
|
||||
use snowbridge_pezpallet_system::Error;
|
||||
use testnet_teyrchains_constants::zagros::snowbridge::EthereumNetwork;
|
||||
use xcm_executor::traits::ConvertLocation;
|
||||
|
||||
|
||||
+15
-15
@@ -21,7 +21,7 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use asset_hub_zagros_runtime::ForeignAssets;
|
||||
use bridge_hub_zagros_runtime::{
|
||||
use pezbridge_hub_zagros_runtime::{
|
||||
bridge_common_config::BridgeReward,
|
||||
bridge_to_ethereum_config::{
|
||||
CreateAssetCallIndex, EthereumGatewayAddress, SetReservesCallIndex,
|
||||
@@ -34,9 +34,9 @@ use emulated_integration_tests_common::{
|
||||
RESERVABLE_ASSET_ID,
|
||||
};
|
||||
use hex_literal::hex;
|
||||
use pezkuwichain_zagros_system_emulated_network::penpal_emulated_chain::PARA_ID_B;
|
||||
use snowbridge_core::{reward::MessageId, AssetMetadata, TokenIdOf};
|
||||
use snowbridge_inbound_queue_primitives::v2::{
|
||||
use pezkuwichain_zagros_system_emulated_network::pez_penpal_emulated_chain::PARA_ID_B;
|
||||
use pezsnowbridge_core::{reward::MessageId, AssetMetadata, TokenIdOf};
|
||||
use pezsnowbridge_inbound_queue_primitives::v2::{
|
||||
EthereumAsset::{ForeignTokenERC20, NativeTokenERC20},
|
||||
Message, Network, XcmPayload,
|
||||
};
|
||||
@@ -92,7 +92,7 @@ fn register_token_v2() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
// Check that the relayer reward was registered.
|
||||
RuntimeEvent::BridgeRelayers(pezpallet_bridge_relayers::Event::RewardRegistered { relayer, reward_kind, reward_balance }) => {
|
||||
relayer: *relayer == relayer_account,
|
||||
@@ -203,14 +203,14 @@ fn send_token_v2() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
// Check that the relayer reward was registered.
|
||||
RuntimeEvent::BridgeRelayers(pezpallet_bridge_relayers::Event::RewardRegistered { relayer, reward_kind, reward_balance }) => {
|
||||
relayer: *relayer == relayer_account,
|
||||
reward_kind: *reward_kind == BridgeReward::Snowbridge,
|
||||
reward_balance: *reward_balance == relayer_reward,
|
||||
},
|
||||
RuntimeEvent::EthereumInboundQueueV2(snowbridge_pallet_inbound_queue_v2::Event::MessageReceived { message_id, .. }) => {
|
||||
RuntimeEvent::EthereumInboundQueueV2(snowbridge_pezpallet_inbound_queue_v2::Event::MessageReceived { message_id, .. }) => {
|
||||
message_id: *message_id == topic_id,
|
||||
},
|
||||
]
|
||||
@@ -312,7 +312,7 @@ fn send_weth_v2() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
// Check that the relayer reward was registered.
|
||||
RuntimeEvent::BridgeRelayers(pezpallet_bridge_relayers::Event::RewardRegistered { relayer, reward_kind, reward_balance }) => {
|
||||
relayer: *relayer == relayer_account,
|
||||
@@ -469,7 +469,7 @@ fn register_and_send_token_in_one_transaction_fails() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
// Check that the relayer reward was registered.
|
||||
RuntimeEvent::BridgeRelayers(pezpallet_bridge_relayers::Event::RewardRegistered { relayer, reward_kind, reward_balance }) => {
|
||||
relayer: *relayer == relayer_account,
|
||||
@@ -622,7 +622,7 @@ fn send_token_to_penpal_v2() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
// Check that the relayer reward was registered.
|
||||
RuntimeEvent::BridgeRelayers(pezpallet_bridge_relayers::Event::RewardRegistered { relayer, reward_kind, reward_balance }) => {
|
||||
relayer: *relayer == relayer_account,
|
||||
@@ -658,7 +658,7 @@ fn send_token_to_penpal_v2() {
|
||||
asset_id: *asset_id == token_location,
|
||||
owner: *owner == penpal_sov_on_ah,
|
||||
},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
]
|
||||
);
|
||||
|
||||
@@ -806,7 +806,7 @@ fn send_foreign_erc20_token_back_to_pezkuwi() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
// Check that the relayer reward was registered.
|
||||
RuntimeEvent::BridgeRelayers(pezpallet_bridge_relayers::Event::RewardRegistered { relayer, reward_kind, reward_balance }) => {
|
||||
relayer: *relayer == relayer_account,
|
||||
@@ -902,7 +902,7 @@ fn invalid_xcm_traps_funds_on_ah() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
// Check that the relayer reward was registered.
|
||||
RuntimeEvent::BridgeRelayers(pezpallet_bridge_relayers::Event::RewardRegistered { relayer, reward_kind, reward_balance }) => {
|
||||
relayer: *relayer == relayer_account,
|
||||
@@ -970,7 +970,7 @@ fn invalid_claimer_does_not_fail_the_message() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
// Check that the relayer reward was registered.
|
||||
RuntimeEvent::BridgeRelayers(pezpallet_bridge_relayers::Event::RewardRegistered { relayer, reward_kind, reward_balance }) => {
|
||||
relayer: *relayer == relayer_account,
|
||||
@@ -1059,7 +1059,7 @@ pub fn add_tip_from_asset_hub_user_origin() {
|
||||
assert!(
|
||||
events.iter().any(|event| matches!(
|
||||
event,
|
||||
RuntimeEvent::EthereumSystemV2(snowbridge_pallet_system_v2::Event::TipProcessed { sender, message_id, success, ..})
|
||||
RuntimeEvent::EthereumSystemV2(snowbridge_pezpallet_system_v2::Event::TipProcessed { sender, message_id, success, ..})
|
||||
if *sender == relayer &&*message_id == tip_message_id.clone() && *success, // expect success
|
||||
)),
|
||||
"tip added event found"
|
||||
|
||||
+8
-8
@@ -26,14 +26,14 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use asset_hub_zagros_runtime::ForeignAssets;
|
||||
use bridge_hub_zagros_runtime::{
|
||||
use pezbridge_hub_zagros_runtime::{
|
||||
bridge_common_config::BridgeReward, bridge_to_ethereum_config::EthereumGatewayAddress,
|
||||
EthereumInboundQueueV2,
|
||||
};
|
||||
use codec::Encode;
|
||||
use hex_literal::hex;
|
||||
use snowbridge_core::TokenIdOf;
|
||||
use snowbridge_inbound_queue_primitives::v2::{
|
||||
use pezsnowbridge_core::TokenIdOf;
|
||||
use pezsnowbridge_inbound_queue_primitives::v2::{
|
||||
EthereumAsset::{ForeignTokenERC20, NativeTokenERC20},
|
||||
Message, XcmPayload,
|
||||
};
|
||||
@@ -168,7 +168,7 @@ fn send_token_to_pezkuwichain_v2() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
// Check that the relayer reward was registered.
|
||||
RuntimeEvent::BridgeRelayers(pezpallet_bridge_relayers::Event::RewardRegistered { relayer, reward_kind, reward_balance }) => {
|
||||
relayer: *relayer == relayer_account,
|
||||
@@ -189,7 +189,7 @@ fn send_token_to_pezkuwichain_v2() {
|
||||
RuntimeEvent::MessageQueue(
|
||||
pezpallet_message_queue::Event::Processed { success: true, .. }
|
||||
) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
]
|
||||
);
|
||||
|
||||
@@ -333,7 +333,7 @@ fn send_ether_to_pezkuwichain_v2() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
// Check that the relayer reward was registered.
|
||||
RuntimeEvent::BridgeRelayers(pezpallet_bridge_relayers::Event::RewardRegistered { relayer, reward_kind, reward_balance }) => {
|
||||
relayer: *relayer == relayer_account,
|
||||
@@ -354,7 +354,7 @@ fn send_ether_to_pezkuwichain_v2() {
|
||||
RuntimeEvent::MessageQueue(
|
||||
pezpallet_message_queue::Event::Processed { success: true, .. }
|
||||
) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
]
|
||||
);
|
||||
|
||||
@@ -536,7 +536,7 @@ fn send_roc_from_ethereum_to_pezkuwichain() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
RuntimeEvent::XcmpQueue(pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }) => {},
|
||||
// Check that the relayer reward was registered.
|
||||
RuntimeEvent::BridgeRelayers(pezpallet_bridge_relayers::Event::RewardRegistered { relayer, reward_kind, reward_balance }) => {
|
||||
relayer: *relayer == relayer_account,
|
||||
|
||||
+19
-19
@@ -17,16 +17,16 @@ use crate::{
|
||||
imports::*,
|
||||
tests::{snowbridge_common::*, usdt_at_ah_zagros},
|
||||
};
|
||||
use bridge_hub_zagros_runtime::{
|
||||
use pezbridge_hub_zagros_runtime::{
|
||||
bridge_to_ethereum_config::EthereumGatewayAddress, EthereumOutboundQueueV2,
|
||||
};
|
||||
use emulated_integration_tests_common::{impls::Decode, PenpalBTeleportableAssetLocation};
|
||||
use pezframe_support::{assert_err_ignore_postinfo, pezpallet_prelude::TypeInfo};
|
||||
use pezkuwichain_zagros_system_emulated_network::penpal_emulated_chain::penpal_runtime::xcm_config::LocalTeleportableToAssetHub;
|
||||
use snowbridge_core::{reward::MessageId, AssetMetadata, BasicOperatingMode};
|
||||
use snowbridge_outbound_queue_primitives::v2::{ContractCall, DeliveryReceipt};
|
||||
use snowbridge_pallet_outbound_queue_v2::Error;
|
||||
use snowbridge_pallet_system_v2::LostTips;
|
||||
use pezkuwichain_zagros_system_emulated_network::pez_penpal_emulated_chain::pez_penpal_runtime::xcm_config::LocalTeleportableToAssetHub;
|
||||
use pezsnowbridge_core::{reward::MessageId, AssetMetadata, BasicOperatingMode};
|
||||
use pezsnowbridge_outbound_queue_primitives::v2::{ContractCall, DeliveryReceipt};
|
||||
use snowbridge_pezpallet_outbound_queue_v2::Error;
|
||||
use snowbridge_pezpallet_system_v2::LostTips;
|
||||
use pezsp_core::H256;
|
||||
use xcm::v5::AssetTransferFilter;
|
||||
|
||||
@@ -98,7 +98,7 @@ fn send_weth_from_asset_hub_to_ethereum() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},
|
||||
RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pezpallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},
|
||||
]
|
||||
);
|
||||
|
||||
@@ -152,7 +152,7 @@ pub fn register_relay_token_from_asset_hub_with_sudo() {
|
||||
type RuntimeEvent = <BridgeHubZagros as Chain>::RuntimeEvent;
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pezpallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -192,7 +192,7 @@ pub fn register_usdt_from_owner_on_asset_hub() {
|
||||
type RuntimeEvent = <BridgeHubZagros as Chain>::RuntimeEvent;
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pezpallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -268,7 +268,7 @@ pub fn add_tip_from_asset_hub_user_origin() {
|
||||
assert!(
|
||||
events.iter().any(|event| matches!(
|
||||
event,
|
||||
RuntimeEvent::EthereumSystemV2(snowbridge_pallet_system_v2::Event::TipProcessed { sender, message_id, success, ..})
|
||||
RuntimeEvent::EthereumSystemV2(snowbridge_pezpallet_system_v2::Event::TipProcessed { sender, message_id, success, ..})
|
||||
if *sender == relayer && *message_id == tip_message_id.clone() && *success, // expect success
|
||||
)),
|
||||
"tip added event found"
|
||||
@@ -307,13 +307,13 @@ pub fn tip_to_invalid_nonce_is_added_to_lost_tips() {
|
||||
assert!(
|
||||
events.iter().any(|event| matches!(
|
||||
event,
|
||||
RuntimeEvent::EthereumSystemV2(snowbridge_pallet_system_v2::Event::TipProcessed { sender, message_id, success, ..})
|
||||
RuntimeEvent::EthereumSystemV2(snowbridge_pezpallet_system_v2::Event::TipProcessed { sender, message_id, success, ..})
|
||||
if *sender == relayer && *message_id == tip_message_id.clone() && !(*success), // expect a failure
|
||||
)),
|
||||
"tip added event found"
|
||||
);
|
||||
|
||||
let relayer_lost_tip = LostTips::<bridge_hub_zagros_runtime::Runtime>::get::<
|
||||
let relayer_lost_tip = LostTips::<pezbridge_hub_zagros_runtime::Runtime>::get::<
|
||||
pezsp_runtime::AccountId32,
|
||||
>(relayer.into());
|
||||
// Assert a tip was added to storage.
|
||||
@@ -403,7 +403,7 @@ fn transfer_relay_token_from_ah() {
|
||||
// Check that the Ethereum message was queue in the Outbound Queue
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pezpallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
|
||||
let relayer = BridgeHubZagrosSender::get();
|
||||
@@ -490,7 +490,7 @@ fn send_weth_and_hez_from_asset_hub_to_ethereum() {
|
||||
// Check that Ethereum message was queue in the Outbound Queue
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pezpallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
|
||||
let relayer = BridgeHubZagrosSender::get();
|
||||
@@ -586,7 +586,7 @@ fn transact_with_agent_from_asset_hub() {
|
||||
// Check that Ethereum message was queue in the Outbound Queue
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pezpallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
|
||||
let relayer = BridgeHubZagrosSender::get();
|
||||
@@ -670,7 +670,7 @@ fn transact_with_agent_from_asset_hub_without_any_asset_transfer() {
|
||||
// Check that Ethereum message was queue in the Outbound Queue
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pezpallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
|
||||
let relayer = BridgeHubZagrosSender::get();
|
||||
@@ -789,7 +789,7 @@ fn register_token_from_penpal() {
|
||||
type RuntimeEvent = <BridgeHubZagros as Chain>::RuntimeEvent;
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pezpallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
|
||||
let relayer = BridgeHubZagrosSender::get();
|
||||
@@ -808,7 +808,7 @@ fn register_token_from_penpal() {
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![
|
||||
RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pallet_outbound_queue_v2::Event::MessageDelivered { .. }) => {},
|
||||
RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pezpallet_outbound_queue_v2::Event::MessageDelivered { .. }) => {},
|
||||
]
|
||||
);
|
||||
});
|
||||
@@ -937,7 +937,7 @@ fn send_message_from_penpal_to_ethereum(sudo: bool) {
|
||||
type RuntimeEvent = <BridgeHubZagros as Chain>::RuntimeEvent;
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pezpallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ use crate::{
|
||||
};
|
||||
use emulated_integration_tests_common::snowbridge::{SEPOLIA_ID, WETH};
|
||||
use pezframe_support::assert_noop;
|
||||
use snowbridge_core::AssetMetadata;
|
||||
use pezsnowbridge_core::AssetMetadata;
|
||||
use pezsp_runtime::DispatchError::BadOrigin;
|
||||
use xcm::v5::AssetTransferFilter;
|
||||
|
||||
|
||||
+3
-3
@@ -129,7 +129,7 @@ pub(crate) fn assert_bridge_hub_zagros_message_received() {
|
||||
vec![
|
||||
// message sent to destination
|
||||
RuntimeEvent::XcmpQueue(
|
||||
pezcumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { .. }
|
||||
) => {},
|
||||
]
|
||||
);
|
||||
@@ -270,7 +270,7 @@ fn send_roc_from_asset_hub_pezkuwichain_to_ethereum() {
|
||||
// Check that the Ethereum message was queue in the Outbound Queue
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pezpallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -366,7 +366,7 @@ fn register_pezkuwichain_asset_on_ethereum_from_rah() {
|
||||
// Check that the Ethereum message was queue in the Outbound Queue
|
||||
assert_expected_events!(
|
||||
BridgeHubZagros,
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
vec![RuntimeEvent::EthereumOutboundQueueV2(snowbridge_pezpallet_outbound_queue_v2::Event::MessageQueued{ .. }) => {},]
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
use crate::tests::snowbridge_common::{eth_location, set_up_eth_and_hez_pool};
|
||||
use bridge_hub_zagros_runtime::bridge_common_config::{BridgeReward, BridgeRewardBeneficiaries};
|
||||
use pezbridge_hub_zagros_runtime::bridge_common_config::{BridgeReward, BridgeRewardBeneficiaries};
|
||||
use emulated_integration_tests_common::snowbridge::ETHER_MIN_BALANCE;
|
||||
use pezpallet_bridge_relayers::{Error::FailedToPayReward, RewardLedger};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user