Skip to content

Commit

Permalink
Last version2
Browse files Browse the repository at this point in the history
  • Loading branch information
tsenovilla committed Oct 11, 2024
1 parent aac0713 commit 6fdc334
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions xcm-simulator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ pub fn para_ext(para_id: u32) -> sp_io::TestExternalities {
(parent_account_id(), INITIAL_BALANCE),
(sibling_account_id(PARA_A_ID), INITIAL_BALANCE),
(sibling_account_id(PARA_B_ID), INITIAL_BALANCE),
(sibling_account_id(PARA_TELEPORTER_ID), INITIAL_BALANCE),
(sibling_account_id(PARA_LAOSISH_ID), INITIAL_BALANCE),
],
}
Expand Down
24 changes: 12 additions & 12 deletions xcm-simulator/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,18 +716,18 @@ fn teleport_para_teleport_to_para_a() {
call: create_asset.encode().into(),
}]),
));
});

let amount = 1_000;

assert_ok!(ParachainTeleporterPalletXcm::limited_teleport_assets(
parachain_teleporter::RuntimeOrigin::signed(ALICE.into()),
Box::new(Parachain(PARA_A_ID).into()),
Box::new(AccountId32 { network: None, id: ALICE.into() }.into()),
Box::new((Here, amount).into()),
0,
WeightLimit::Limited(Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024)),
));
let amount = 1_000;

assert_eq!(parachain_teleporter::Balances::free_balance(ALICE), INITIAL_BALANCE - amount);
assert_ok!(ParachainTeleporterPalletXcm::limited_teleport_assets(
parachain_teleporter::RuntimeOrigin::signed(ALICE.into()),
Box::new(Parachain(PARA_A_ID).into()),
Box::new(AccountId32 { network: None, id: ALICE.into() }.into()),
Box::new((Here, amount).into()),
0,
WeightLimit::Limited(Weight::from_parts(INITIAL_BALANCE as u64, 1024 * 1024)),
));

assert_eq!(parachain_teleporter::Balances::free_balance(ALICE), INITIAL_BALANCE - amount);
});
}

0 comments on commit 6fdc334

Please sign in to comment.