Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test build issues
  • Loading branch information
b-yap committed Jul 6, 2023
commit ffe9f8b06817238ff6b8f2a569a9b235ba3c7367
15 changes: 9 additions & 6 deletions runtime/integration-tests/pendulum/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ use frame_support::{
};
use pendulum_runtime::{Balances, PendulumCurrencyId, RuntimeOrigin, Tokens, XTokens};
use sp_runtime::{traits::AccountIdConversion, MultiAddress};
use xcm::latest::{Junction, Junction::*, Junctions::*, MultiLocation, NetworkId, WeightLimit};
use xcm::latest::{Junction, Junction::*, Junctions::*, MultiLocation, WeightLimit};
use xcm_emulator::TestExt;


use pendulum_runtime::{RuntimeEvent, System};
use polkadot_core_primitives::{AccountId, Balance};
use polkadot_parachain::primitives::Sibling;
use xcm::{v3::Weight, VersionedMultiLocation};
use xcm::v3::Weight;

const DOT_FEE_WHEN_TRANSFER_TO_PARACHAIN: Balance = 3200000000; //The fees that relay chain will charge when transfer DOT to parachain. sovereign account of some parachain will receive transfer_amount - DOT_FEE
const ASSET_ID: u32 = 1984; //Real USDT Asset ID from Statemint
Expand All @@ -33,13 +34,15 @@ fn transfer_dot_from_relay_chain_to_pendulum() {
);
});

let dest: MultiLocation = Junction::AccountId32 { network: None, id: ALICE }.into();

Relay::execute_with(|| {
assert_ok!(polkadot_runtime::XcmPallet::reserve_transfer_assets(
polkadot_runtime::RuntimeOrigin::signed(ALICE.into()),
Box::new(X1(Parachain(2094)).into()),
Box::new(VersionedMultiLocation::V3(dest).clone().into()),

Box::new(Parachain(2094).into()),
Box::new(
Junction::AccountId32 { network: None, id: ALICE }.into_location()
.into_versioned()
),
Box::new((Here, transfer_amount).into()),
0
));
Expand Down