Skip to content

Commit

Permalink
Rename test
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong committed Nov 29, 2024
1 parent e97e235 commit 992740b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mod claim_assets;
mod register_bridged_assets;
mod send_xcm;
mod snowbridge;
mod snowbridge_v2;
mod snowbridge_v2_outbound;
mod teleport;
mod transact;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ fn send_weth_asset_from_asset_hub_to_ethereum() {
});

BridgeHubWestend::execute_with(|| {
use bridge_hub_westend_runtime::xcm_config::TreasuryAccount;
type RuntimeEvent = <BridgeHubWestend as Chain>::RuntimeEvent;
// Check that the transfer token back to Ethereum message was queue in the Ethereum
// Outbound Queue
Expand All @@ -264,12 +265,21 @@ fn send_weth_asset_from_asset_hub_to_ethereum() {
vec![RuntimeEvent::EthereumOutboundQueue(snowbridge_pallet_outbound_queue::Event::MessageQueued{ .. }) => {},]
);
let events = BridgeHubWestend::events();
// Check that the local fee was credited to the Snowbridge sovereign account
assert!(
events.iter().any(|event| matches!(
event,
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount })
if *who == TreasuryAccount::get().into() && *amount == 5071000000
)),
"Snowbridge sovereign takes local fee."
);
// Check that the remote fee was credited to the AssetHub sovereign account
assert!(
events.iter().any(|event| matches!(
event,
RuntimeEvent::Balances(pallet_balances::Event::Minted { who,.. })
if *who == assethub_sovereign
RuntimeEvent::Balances(pallet_balances::Event::Minted { who, amount })
if *who == assethub_sovereign && *amount == 2680000000000,
)),
"AssetHub sovereign takes remote fee."
);
Expand Down

0 comments on commit 992740b

Please sign in to comment.