Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden authored and claravanstaden committed Oct 24, 2023
1 parent c4f4ad6 commit 0c56e96
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
4 changes: 2 additions & 2 deletions smoketest/tests/send_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ use snowbridge_smoketest::{
contracts::{i_gateway, weth9},
parachains::assethub::api::{
foreign_assets::events::Issued,
runtime_types::staging_xcm::v3::{
runtime_types::staging_xcm::v3::multilocation::MultiLocation,
runtime_types::xcm::v3::{
junction::{
Junction::{AccountKey20, GlobalConsensus},
NetworkId,
},
junctions::Junctions::X3,
multilocation::MultiLocation,
},
},
};
Expand Down
2 changes: 1 addition & 1 deletion smoketest/tests/transfer_native_from_agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async fn transfer_native_from_agent() {
TRANSFER_AMOUNT,
)
.await
.expect("construct innner call."),
.expect("construct inner call."),
);

let result = send_xcm_transact(&test_clients.template_client, message)
Expand Down
20 changes: 16 additions & 4 deletions smoketest/tests/transfer_token.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use assethub::api::bridge_transfer::calls::TransactionApi;
use assethub::api::polkadot_xcm::calls::TransactionApi;
use ethers::prelude::Middleware;
use ethers::{
providers::{Provider, Ws},
Expand All @@ -14,12 +14,12 @@ use snowbridge_smoketest::helper::AssetHubConfig;
use snowbridge_smoketest::{
contracts::weth9::TransferFilter,
parachains::{
assethub::api::runtime_types::staging_xcm::{
assethub::api::runtime_types::staging_xcm::v3::multilocation::MultiLocation,
assethub::api::runtime_types::xcm::{
v3::{
junction::{Junction, NetworkId},
junctions::Junctions,
multiasset::{AssetId, Fungibility, MultiAsset, MultiAssets},
multilocation::MultiLocation,
},
VersionedMultiAssets, VersionedMultiLocation,
},
Expand Down Expand Up @@ -87,7 +87,19 @@ async fn transfer_token() {
),
});

let bridge_transfer_call = TransactionApi.transfer_asset_via_bridge(assets, destination);
let beneficiary = VersionedMultiLocation::V3(MultiLocation {
parents: 2,
interior: Junctions::X2(
Junction::GlobalConsensus(NetworkId::Ethereum { chain_id: 15 }),
Junction::AccountKey20 {
network: None,
key: DESTINATION_ADDRESS.into(),
},
),
});

let bridge_transfer_call =
TransactionApi.reserve_transfer_assets(destination, beneficiary, assets, 0);

let result = assethub
.tx()
Expand Down
8 changes: 3 additions & 5 deletions smoketest/tests/upgrade_gateway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ use snowbridge_smoketest::{
pallet_xcm::pallet::Call,
rococo_runtime::RuntimeCall,
sp_weights::weight_v2::Weight,
staging_xcm::{
staging_xcm::v3::multilocation::MultiLocation,
xcm::{
double_encoded::DoubleEncoded,
v2::OriginKind,
v3::{
junction::Junction, junctions::Junctions, multilocation::MultiLocation,
Instruction, WeightLimit, Xcm,
},
v3::{junction::Junction, junctions::Junctions, Instruction, WeightLimit, Xcm},
VersionedMultiLocation, VersionedXcm,
},
},
Expand Down

0 comments on commit 0c56e96

Please sign in to comment.