From a70b599d2f6ca27af0ae0f08eda9094351dba528 Mon Sep 17 00:00:00 2001 From: dmoka Date: Thu, 23 May 2024 14:56:17 +0200 Subject: [PATCH 1/7] fix ignored test with explicitly triggering the processing of horizontal messages of parachains --- integration-tests/src/exchange_asset.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/integration-tests/src/exchange_asset.rs b/integration-tests/src/exchange_asset.rs index 37defd7b5..6a9a14d05 100644 --- a/integration-tests/src/exchange_asset.rs +++ b/integration-tests/src/exchange_asset.rs @@ -171,7 +171,6 @@ fn hydra_should_swap_assets_when_receiving_from_acala_with_buy() { } //We swap GLMR for iBTC, sent from ACALA and executed on Hydradx, resultin in 4 hops -#[ignore] #[test] fn transfer_and_swap_should_work_with_4_hops() { //Arrange @@ -282,18 +281,22 @@ fn transfer_and_swap_should_work_with_4_hops() { }); }); - let fees = 400641025641; + + //We need these executions to trigger the processing of horizontal messages of each parachain + Moonbeam::execute_with(|| {}); + Hydra::execute_with(|| {}); + Interlay::execute_with(|| {}); + Acala::execute_with(|| { //hydradx_run_to_block(5); assert_eq!( hydradx_runtime::Currencies::free_balance(IBTC, &AccountId::from(BOB)), - 549198717948718 - ); - assert_eq!( - hydradx_runtime::Tokens::free_balance(IBTC, &hydradx_runtime::Treasury::account_id()), - fees + 549839246387064 ); + let fee = hydradx_runtime::Tokens::free_balance(IBTC, &hydradx_runtime::Treasury::account_id()); + + assert!(fee > 0, "treasury should have received fees, but it didn't"); }); } From 25042e33dbd74f2586828e1b543df9cff97116cc Mon Sep 17 00:00:00 2001 From: dmoka Date: Fri, 24 May 2024 13:44:06 +0200 Subject: [PATCH 2/7] add test for remote swap two native tokens --- integration-tests/src/exchange_asset.rs | 228 ++++++++++++++++++++- integration-tests/src/polkadot_test_net.rs | 20 ++ 2 files changed, 240 insertions(+), 8 deletions(-) diff --git a/integration-tests/src/exchange_asset.rs b/integration-tests/src/exchange_asset.rs index 6a9a14d05..bef46b39f 100644 --- a/integration-tests/src/exchange_asset.rs +++ b/integration-tests/src/exchange_asset.rs @@ -28,6 +28,9 @@ pub const BUY: bool = false; pub const ACA: u32 = 1234; pub const GLMR: u32 = 4567; pub const IBTC: u32 = 7890; +pub const ZTG: u32 = 5001; + +pub const HDX_ON_OTHER_PARACHAIN: u32 = 5002; #[test] fn hydra_should_swap_assets_when_receiving_from_acala_with_sell() { @@ -281,7 +284,6 @@ fn transfer_and_swap_should_work_with_4_hops() { }); }); - //We need these executions to trigger the processing of horizontal messages of each parachain Moonbeam::execute_with(|| {}); Hydra::execute_with(|| {}); @@ -300,6 +302,188 @@ fn transfer_and_swap_should_work_with_4_hops() { }); } +pub mod zeitgeist_use_cases { + use super::*; + + use primitives::constants::chain::CORE_ASSET_ID; + + #[test] + fn remote_swap_sell_ztg_for_hdx_on_hydra() { + //Register tokens and init omnipool on hydra + Hydra::execute_with(|| { + let _ = with_transaction(|| { + crate::exchange_asset::register_ztg(); + crate::exchange_asset::add_currency_price(crate::exchange_asset::ZTG, FixedU128::from(1)); + + init_omnipool(); + let omnipool_account = hydradx_runtime::Omnipool::protocol_account(); + + let token_price = FixedU128::from_float(1.0); + assert_ok!(hydradx_runtime::Tokens::deposit( + ZTG, + &omnipool_account, + 1000000 * UNITS + )); + + assert_ok!(hydradx_runtime::Omnipool::add_token( + hydradx_runtime::RuntimeOrigin::root(), + ZTG, + token_price, + Permill::from_percent(100), + AccountId::from(BOB), + )); + + TransactionOutcome::Commit(DispatchResult::Ok(())) + }); + }); + + //Construct and send XCM zeitgeist -> hydra + Zeitgeist::execute_with(|| { + let _ = with_transaction(|| { + crate::exchange_asset::register_hdx_in_sibling_chain(); + crate::exchange_asset::add_currency_price(HDX_ON_OTHER_PARACHAIN, FixedU128::from(1)); + + TransactionOutcome::Commit(DispatchResult::Ok(())) + }); + + let give_reserve_chain = Location::new( + 1, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::Parachain(ZEITGEIST_PARA_ID)] + .try_into() + .unwrap(), + )), + ); + let swap_chain = Location::new( + 1, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::Parachain(HYDRA_PARA_ID)] + .try_into() + .unwrap(), + )), + ); + let want_reserve_chain = swap_chain.clone(); + let dest = give_reserve_chain.clone(); + + let beneficiary = Location::new( + 0, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::AccountId32 { id: BOB, network: None }] + .try_into() + .unwrap(), + )), + ); + let assets: Assets = Asset { + id: cumulus_primitives_core::AssetId(Location::new( + 0, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::GeneralIndex(0)] + .try_into() + .unwrap(), + )), + )), + fun: Fungible(100 * UNITS), + } + .into(); + let max_assets = assets.len() as u32 + 1; + + let give_amount = 10 * UNITS; + let give_asset = Asset::from((hydradx_runtime::CurrencyIdConvert::convert(0).unwrap(), give_amount)); + let want_asset = Asset::from(( + Location::new( + 1, + cumulus_primitives_core::Junctions::X2(Arc::new( + vec![ + cumulus_primitives_core::Junction::Parachain(HYDRA_PARA_ID), + cumulus_primitives_core::Junction::GeneralIndex(0), + ] + .try_into() + .unwrap(), + )), + ), + 100 * UNITS, + )); + + let want: Assets = want_asset.clone().into(); + + let fees = give_asset + .clone() + .reanchored(&swap_chain, &give_reserve_chain.interior) + .expect("should reanchor"); + + let destination_fee = want_asset + .reanchored(&dest, &want_reserve_chain.interior) + .expect("should reanchor"); + + let weight_limit = Limited(Weight::from_parts(u64::MAX, u64::MAX)); + + // executed on local (zeitgeist) + let message = Xcm(vec![ + WithdrawAsset(give_asset.clone().into()), + DepositReserveAsset { + assets: AllCounted(max_assets).into(), + dest: swap_chain, + // executed on remote (on hydra) + xcm: Xcm(vec![ + BuyExecution { + fees: crate::exchange_asset::half(&fees), + weight_limit: weight_limit.clone(), + }, + ExchangeAsset { + give: give_asset.into(), + want: want.clone(), + maximal: true, + }, + DepositReserveAsset { + assets: Wild(AllCounted(max_assets)), + dest, + xcm: Xcm(vec![ + //Executed on Zeitgeist + BuyExecution { + fees: crate::exchange_asset::half(&destination_fee), + weight_limit: weight_limit.clone(), + }, + DepositAsset { + assets: Wild(AllCounted(max_assets)), + beneficiary, + }, + ]), + }, + ]), + }, + ]); + let xcm = VersionedXcm::from(message); + + assert_ok!(hydradx_runtime::PolkadotXcm::execute( + hydradx_runtime::RuntimeOrigin::signed(ALICE.into()), + Box::new(xcm), + Weight::from_parts(899_600_000_000, 0), + )); + + //Assert + pretty_assertions::assert_eq!( + hydradx_runtime::Currencies::free_balance(CORE_ASSET_ID, &AccountId::from(ALICE)), + 1000 * UNITS - give_amount + ); + + assert!(matches!( + last_hydra_events(2).first(), + Some(hydradx_runtime::RuntimeEvent::XcmpQueue( + cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. } + )) + )); + }); + + //Trigger the processing of horizontal xcm messages + Hydra::execute_with(|| {}); + + //Assert that swap amount out is sent back to Zeitgeist + Zeitgeist::execute_with(|| { + pretty_assertions::assert_eq!(hydradx_runtime::Tokens::free_balance(HDX_ON_OTHER_PARACHAIN, &AccountId::from(BOB)), 8142821444432895); + }); + } +} + fn register_glmr() { assert_ok!(AssetRegistry::register_sufficient_asset( Some(GLMR), @@ -348,6 +532,38 @@ fn register_ibtc() { )); } +fn register_ztg() { + assert_ok!(AssetRegistry::register_sufficient_asset( + Some(ZTG), + Some(b"ZTG".to_vec().try_into().unwrap()), + AssetKind::Token, + 1_000_000, + None, + None, + Some(hydradx_runtime::AssetLocation(MultiLocation::new( + 1, + X2(Junction::Parachain(ZEITGEIST_PARA_ID), Junction::GeneralIndex(0)) + ))), + None, + )); +} + +fn register_hdx_in_sibling_chain() { + assert_ok!(AssetRegistry::register_sufficient_asset( + Some(HDX_ON_OTHER_PARACHAIN), + Some(b"vHDX".to_vec().try_into().unwrap()), + AssetKind::Token, + 1_000_000, + None, + None, + Some(hydradx_runtime::AssetLocation(MultiLocation::new( + 1, + X2(Junction::Parachain(HYDRA_PARA_ID), Junction::GeneralIndex(0)) + ))), + None, + )); +} + fn add_currency_price(asset_id: u32, price: FixedU128) { assert_ok!(hydradx_runtime::MultiTransactionPayment::add_currency( hydradx_runtime::RuntimeOrigin::root(), @@ -377,15 +593,15 @@ fn half(asset: &Asset) -> Asset { id: asset.clone().id, } } +use rococo_runtime::xcm_config::BaseXcmWeight; +use xcm_builder::FixedWeightBounds; +use xcm_executor::traits::WeightBounds; fn craft_transfer_and_swap_xcm_with_4_hops( give_asset: Asset, want_asset: Asset, is_sell: bool, ) -> VersionedXcm { - use rococo_runtime::xcm_config::BaseXcmWeight; - use xcm_builder::FixedWeightBounds; - use xcm_executor::traits::WeightBounds; type Weigher = FixedWeightBounds>; @@ -587,10 +803,6 @@ fn craft_exchange_asset_xcm, RC: Decode + GetDispatchInfo>( want: M, is_sell: bool, ) -> VersionedXcm { - use rococo_runtime::xcm_config::BaseXcmWeight; - use xcm_builder::FixedWeightBounds; - use xcm_executor::traits::WeightBounds; - type Weigher = FixedWeightBounds>; let dest = Location::new( diff --git a/integration-tests/src/polkadot_test_net.rs b/integration-tests/src/polkadot_test_net.rs index c14f75609..327dd066a 100644 --- a/integration-tests/src/polkadot_test_net.rs +++ b/integration-tests/src/polkadot_test_net.rs @@ -66,6 +66,7 @@ pub const ACALA_PARA_ID: u32 = 2_000; pub const HYDRA_PARA_ID: u32 = 2_034; pub const MOONBEAM_PARA_ID: u32 = 2_004; pub const INTERLAY_PARA_ID: u32 = 2_032; +pub const ZEITGEIST_PARA_ID: u32 = 2_092; pub const ALICE_INITIAL_NATIVE_BALANCE: Balance = 1_000 * UNITS; pub const ALICE_INITIAL_DAI_BALANCE: Balance = 2_000 * UNITS; @@ -100,6 +101,7 @@ pub type Acala = AcalaParachain; pub type Moonbeam = MoonbeamParachain; pub type Interlay = InterlayParachain; pub type AssetHub = AssetHubParachain; +pub type Zeitgeist = ZeitgeistParachain; decl_test_networks! { pub struct TestNet { @@ -110,6 +112,7 @@ decl_test_networks! { MoonbeamParachain, InterlayParachain, AssetHubParachain, + ZeitgeistParachain, ], bridge = () }, @@ -224,6 +227,23 @@ decl_test_parachains! { Balances: hydradx_runtime::Balances, } }, + pub struct ZeitgeistParachain { + genesis = para::genesis(ZEITGEIST_PARA_ID), + on_init = { + hydradx_runtime::System::set_block_number(1); + }, + runtime = hydradx_runtime, + core = { + XcmpMessageHandler: hydradx_runtime::XcmpQueue, + LocationToAccountId: hydradx_runtime::xcm::LocationToAccountId, + ParachainInfo: hydradx_runtime::ParachainInfo, + MessageOrigin: cumulus_primitives_core::AggregateMessageOrigin, + }, + pallets = { + PolkadotXcm: hydradx_runtime::PolkadotXcm, + Balances: hydradx_runtime::Balances, + } + } } pub mod rococo { From 3d048a4b656c6b54fc9bd72521c548ff1ab13df8 Mon Sep 17 00:00:00 2001 From: dmoka Date: Mon, 27 May 2024 10:04:57 +0200 Subject: [PATCH 3/7] add test for remote swap ztg for ibtc --- integration-tests/src/exchange_asset.rs | 230 ++++++++++++++++++++++++ 1 file changed, 230 insertions(+) diff --git a/integration-tests/src/exchange_asset.rs b/integration-tests/src/exchange_asset.rs index bef46b39f..af22b5eb9 100644 --- a/integration-tests/src/exchange_asset.rs +++ b/integration-tests/src/exchange_asset.rs @@ -482,6 +482,236 @@ pub mod zeitgeist_use_cases { pretty_assertions::assert_eq!(hydradx_runtime::Tokens::free_balance(HDX_ON_OTHER_PARACHAIN, &AccountId::from(BOB)), 8142821444432895); }); } + + #[test] + fn remote_swap_sell_ztg_for_ibtc_on_hydra() { + //Register tokens and init omnipool on hydra + Hydra::execute_with(|| { + let _ = with_transaction(|| { + crate::exchange_asset::register_ztg(); + register_ibtc(); + crate::exchange_asset::add_currency_price(crate::exchange_asset::ZTG, FixedU128::from(1)); + + init_omnipool(); + let omnipool_account = hydradx_runtime::Omnipool::protocol_account(); + + let token_price = FixedU128::from_float(1.0); + assert_ok!(hydradx_runtime::Tokens::deposit( + ZTG, + &omnipool_account, + 100000 * UNITS + )); + assert_ok!(hydradx_runtime::Tokens::deposit(IBTC, &omnipool_account, 100000 * UNITS)); + assert_ok!(hydradx_runtime::Omnipool::add_token( + hydradx_runtime::RuntimeOrigin::root(), + IBTC, + token_price, + Permill::from_percent(100), + AccountId::from(BOB), + )); + + assert_ok!(hydradx_runtime::Omnipool::add_token( + hydradx_runtime::RuntimeOrigin::root(), + ZTG, + token_price, + Permill::from_percent(100), + AccountId::from(BOB), + )); + + TransactionOutcome::Commit(DispatchResult::Ok(())) + }); + }); + + + //Deposit IBTC reserve for hydra + Interlay::execute_with(|| { + //set_zero_reward_for_referrals(IBTC); + use xcm_executor::traits::ConvertLocation; + let para_account = + hydradx_runtime::LocationToAccountId::convert_location(&(Parent, Parachain(HYDRA_PARA_ID)).into()).unwrap(); + let _ = hydradx_runtime::Balances::deposit(¶_account, 1000 * UNITS, Precision::Exact) + .expect("Failed to deposit"); + }); + + //Construct and send XCM zeitgeist -> hydra + Zeitgeist::execute_with(|| { + let _ = with_transaction(|| { + crate::exchange_asset::register_hdx_in_sibling_chain(); + register_ibtc(); + TransactionOutcome::Commit(DispatchResult::Ok(())) + }); + + crate::exchange_asset::add_currency_price(HDX_ON_OTHER_PARACHAIN, FixedU128::from(1)); + crate::exchange_asset::add_currency_price(IBTC, FixedU128::from(1)); + let alice_init_ibtc_balance = 3000 * UNITS; + assert_ok!(hydradx_runtime::Tokens::deposit( + IBTC, + &ALICE.into(), + alice_init_ibtc_balance + )); + + let give_reserve_chain = Location::new( + 1, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::Parachain(ZEITGEIST_PARA_ID)] + .try_into() + .unwrap(), + )), + ); + let swap_chain = Location::new( + 1, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::Parachain(HYDRA_PARA_ID)] + .try_into() + .unwrap(), + )), + ); + let want_reserve_chain = Location::new( + 1, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::Parachain(INTERLAY_PARA_ID)] + .try_into() + .unwrap(), + )), + ); + let dest = give_reserve_chain.clone(); + + let beneficiary = Location::new( + 0, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::AccountId32 { id: BOB, network: None }] + .try_into() + .unwrap(), + )), + ); + let assets: Assets = Asset { + id: cumulus_primitives_core::AssetId(Location::new( + 0, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::GeneralIndex(0)] + .try_into() + .unwrap(), + )), + )), + fun: Fungible(10 * UNITS), + } + .into(); + let max_assets = assets.len() as u32 + 1; + + let give_amount = 10 * UNITS; + let give_asset = Asset::from((hydradx_runtime::CurrencyIdConvert::convert(0).unwrap(), give_amount)); + let want_asset = Asset::from(( + Location::new( + 1, + cumulus_primitives_core::Junctions::X2(Arc::new( + vec![ + cumulus_primitives_core::Junction::Parachain(INTERLAY_PARA_ID), + cumulus_primitives_core::Junction::GeneralIndex(0), + ] + .try_into() + .unwrap(), + )), + ), + 1 * UNITS, + )); + + let want: Assets = want_asset.clone().into(); + + let fees = give_asset + .clone() + .reanchored(&swap_chain, &give_reserve_chain.interior) + .expect("should reanchor"); + + let destination_fee = want_asset.clone() + .reanchored(&dest, &want_reserve_chain.interior) + .expect("should reanchor"); + + let reserve_fees = want_asset + .clone() + .reanchored(&want_reserve_chain, &swap_chain.interior) + .expect("should reanchor"); + + + let weight_limit = Limited(Weight::from_parts(u64::MAX, u64::MAX)); + + // executed on local (zeitgeist) + let message = Xcm(vec![ + WithdrawAsset(give_asset.clone().into()), + DepositReserveAsset { + assets: AllCounted(max_assets).into(), + dest: swap_chain, + // executed on remote (on hydra) + xcm: Xcm(vec![ + BuyExecution { + fees: crate::exchange_asset::half(&fees), + weight_limit: weight_limit.clone(), + }, + ExchangeAsset { + give: give_asset.into(), + want: want.clone(), + maximal: true, + }, + InitiateReserveWithdraw { + assets: want.into(), + reserve: want_reserve_chain, + xcm: Xcm(vec![ + //Executed on interlay + BuyExecution { + fees: half(&reserve_fees), + weight_limit: weight_limit.clone(), + }, + DepositReserveAsset { + assets: Wild(AllCounted(max_assets)), + dest, + xcm: Xcm(vec![ + //Executed on acala + BuyExecution { + fees: half(&destination_fee), + weight_limit: weight_limit.clone(), + }, + DepositAsset { + assets: Wild(AllCounted(max_assets)), + beneficiary, + }, + ]), + }, + ]), + }, + ]), + }, + ]); + let xcm = VersionedXcm::from(message); + + assert_ok!(hydradx_runtime::PolkadotXcm::execute( + hydradx_runtime::RuntimeOrigin::signed(ALICE.into()), + Box::new(xcm), + Weight::from_parts(899_600_000_000, 0), + )); + + //Assert + pretty_assertions::assert_eq!( + hydradx_runtime::Currencies::free_balance(CORE_ASSET_ID, &AccountId::from(ALICE)), + 1000 * UNITS - give_amount + ); + + assert!(matches!( + last_hydra_events(2).first(), + Some(hydradx_runtime::RuntimeEvent::XcmpQueue( + cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. } + )) + )); + }); + + //Trigger the processing of horizontal xcm messages + Hydra::execute_with(|| {}); + Interlay::execute_with(|| {}); + + //Assert that swap amount out is sent back to Zeitgeist + Zeitgeist::execute_with(|| { + pretty_assertions::assert_eq!(hydradx_runtime::Tokens::free_balance(IBTC, &AccountId::from(BOB)), 0); + }); + } + } fn register_glmr() { From 15daeb5461081dec9b73d629f9b75b20a84a1aef Mon Sep 17 00:00:00 2001 From: dmoka Date: Mon, 27 May 2024 10:26:47 +0200 Subject: [PATCH 4/7] add test with 2 reserve withdraw --- integration-tests/src/exchange_asset.rs | 334 ++++++++++++++++++++++-- 1 file changed, 317 insertions(+), 17 deletions(-) diff --git a/integration-tests/src/exchange_asset.rs b/integration-tests/src/exchange_asset.rs index af22b5eb9..6393efe12 100644 --- a/integration-tests/src/exchange_asset.rs +++ b/integration-tests/src/exchange_asset.rs @@ -303,12 +303,16 @@ fn transfer_and_swap_should_work_with_4_hops() { } pub mod zeitgeist_use_cases { + use std::sync::Arc; use super::*; + use frame_support::traits::tokens::Precision; + use polkadot_xcm::latest::{NetworkId, Parent}; + use polkadot_xcm::prelude::Parachain; use primitives::constants::chain::CORE_ASSET_ID; #[test] - fn remote_swap_sell_ztg_for_hdx_on_hydra() { + fn remote_swap_sell_native_ztg_for_native_hdx_on_hydra() { //Register tokens and init omnipool on hydra Hydra::execute_with(|| { let _ = with_transaction(|| { @@ -479,12 +483,15 @@ pub mod zeitgeist_use_cases { //Assert that swap amount out is sent back to Zeitgeist Zeitgeist::execute_with(|| { - pretty_assertions::assert_eq!(hydradx_runtime::Tokens::free_balance(HDX_ON_OTHER_PARACHAIN, &AccountId::from(BOB)), 8142821444432895); + pretty_assertions::assert_eq!( + hydradx_runtime::Tokens::free_balance(HDX_ON_OTHER_PARACHAIN, &AccountId::from(BOB)), + 8142821444432895 + ); }); } #[test] - fn remote_swap_sell_ztg_for_ibtc_on_hydra() { + fn remote_swap_sell_native_ztg_for_nonnative_ibtc_on_hydra() { //Register tokens and init omnipool on hydra Hydra::execute_with(|| { let _ = with_transaction(|| { @@ -496,12 +503,12 @@ pub mod zeitgeist_use_cases { let omnipool_account = hydradx_runtime::Omnipool::protocol_account(); let token_price = FixedU128::from_float(1.0); + assert_ok!(hydradx_runtime::Tokens::deposit(ZTG, &omnipool_account, 100000 * UNITS)); assert_ok!(hydradx_runtime::Tokens::deposit( - ZTG, + IBTC, &omnipool_account, 100000 * UNITS )); - assert_ok!(hydradx_runtime::Tokens::deposit(IBTC, &omnipool_account, 100000 * UNITS)); assert_ok!(hydradx_runtime::Omnipool::add_token( hydradx_runtime::RuntimeOrigin::root(), IBTC, @@ -522,13 +529,13 @@ pub mod zeitgeist_use_cases { }); }); - //Deposit IBTC reserve for hydra Interlay::execute_with(|| { //set_zero_reward_for_referrals(IBTC); use xcm_executor::traits::ConvertLocation; let para_account = - hydradx_runtime::LocationToAccountId::convert_location(&(Parent, Parachain(HYDRA_PARA_ID)).into()).unwrap(); + hydradx_runtime::LocationToAccountId::convert_location(&(Parent, Parachain(HYDRA_PARA_ID)).into()) + .unwrap(); let _ = hydradx_runtime::Balances::deposit(¶_account, 1000 * UNITS, Precision::Exact) .expect("Failed to deposit"); }); @@ -595,10 +602,10 @@ pub mod zeitgeist_use_cases { )), fun: Fungible(10 * UNITS), } - .into(); + .into(); let max_assets = assets.len() as u32 + 1; - let give_amount = 10 * UNITS; + let give_amount = 100 * UNITS; let give_asset = Asset::from((hydradx_runtime::CurrencyIdConvert::convert(0).unwrap(), give_amount)); let want_asset = Asset::from(( Location::new( @@ -608,11 +615,11 @@ pub mod zeitgeist_use_cases { cumulus_primitives_core::Junction::Parachain(INTERLAY_PARA_ID), cumulus_primitives_core::Junction::GeneralIndex(0), ] - .try_into() - .unwrap(), + .try_into() + .unwrap(), )), ), - 1 * UNITS, + 10 * UNITS, )); let want: Assets = want_asset.clone().into(); @@ -622,7 +629,8 @@ pub mod zeitgeist_use_cases { .reanchored(&swap_chain, &give_reserve_chain.interior) .expect("should reanchor"); - let destination_fee = want_asset.clone() + let destination_fee = want_asset + .clone() .reanchored(&dest, &want_reserve_chain.interior) .expect("should reanchor"); @@ -631,7 +639,6 @@ pub mod zeitgeist_use_cases { .reanchored(&want_reserve_chain, &swap_chain.interior) .expect("should reanchor"); - let weight_limit = Limited(Weight::from_parts(u64::MAX, u64::MAX)); // executed on local (zeitgeist) @@ -706,12 +713,306 @@ pub mod zeitgeist_use_cases { Hydra::execute_with(|| {}); Interlay::execute_with(|| {}); - //Assert that swap amount out is sent back to Zeitgeist + //Assert that swap amount out of IBTC is sent back to Zeitgeist Zeitgeist::execute_with(|| { - pretty_assertions::assert_eq!(hydradx_runtime::Tokens::free_balance(IBTC, &AccountId::from(BOB)), 0); + pretty_assertions::assert_eq!( + hydradx_runtime::Tokens::free_balance(IBTC, &AccountId::from(BOB)), + 9839246387064 + ); }); } + #[test] + fn remote_swap_sell_nonnative_glmr_for_nonnative_ibtc_on_hydra() { + //Register tokens and init omnipool on hydra + Hydra::execute_with(|| { + let _ = with_transaction(|| { + crate::exchange_asset::register_ztg(); + + register_ibtc(); + crate::exchange_asset::add_currency_price(crate::exchange_asset::ZTG, FixedU128::from(1)); + + register_glmr(); + crate::exchange_asset::add_currency_price(crate::exchange_asset::GLMR, FixedU128::from(1)); + + init_omnipool(); + let omnipool_account = hydradx_runtime::Omnipool::protocol_account(); + + let token_price = FixedU128::from_float(1.0); + assert_ok!(hydradx_runtime::Tokens::deposit(GLMR, &omnipool_account, 100000 * UNITS)); + assert_ok!(hydradx_runtime::Tokens::deposit( + IBTC, + &omnipool_account, + 100000 * UNITS + )); + assert_ok!(hydradx_runtime::Omnipool::add_token( + hydradx_runtime::RuntimeOrigin::root(), + IBTC, + token_price, + Permill::from_percent(100), + AccountId::from(BOB), + )); + + assert_ok!(hydradx_runtime::Omnipool::add_token( + hydradx_runtime::RuntimeOrigin::root(), + GLMR, + token_price, + Permill::from_percent(100), + AccountId::from(BOB), + )); + + TransactionOutcome::Commit(DispatchResult::Ok(())) + }); + }); + + //Deposit IBTC reserve for hydra + Interlay::execute_with(|| { + //set_zero_reward_for_referrals(IBTC); + use xcm_executor::traits::ConvertLocation; + let para_account = + hydradx_runtime::LocationToAccountId::convert_location(&(Parent, Parachain(HYDRA_PARA_ID)).into()) + .unwrap(); + let _ = hydradx_runtime::Balances::deposit(¶_account, 1000 * UNITS, Precision::Exact) + .expect("Failed to deposit"); + }); + + //Deposit GLMR reserve for Zeitgeist + Moonbeam::execute_with(|| { + use xcm_executor::traits::ConvertLocation; + let para_account = + hydradx_runtime::LocationToAccountId::convert_location(&(Parent, Parachain(ZEITGEIST_PARA_ID)).into()) + .unwrap(); + let _ = hydradx_runtime::Balances::deposit(¶_account, 1000 * UNITS, Precision::Exact) + .expect("Failed to deposit"); + }); + + //Construct and send XCM zeitgeist -> hydra + Zeitgeist::execute_with(|| { + let _ = with_transaction(|| { + crate::exchange_asset::register_hdx_in_sibling_chain(); + register_ibtc(); + register_glmr(); + TransactionOutcome::Commit(DispatchResult::Ok(())) + }); + + crate::exchange_asset::add_currency_price(IBTC, FixedU128::from(1)); + crate::exchange_asset::add_currency_price(GLMR, FixedU128::from(1)); + let alice_init_glmr_balance = 3000 * UNITS; + assert_ok!(hydradx_runtime::Tokens::deposit( + GLMR, + &ALICE.into(), + alice_init_glmr_balance + )); + + let give_reserve_chain = Location::new( + 1, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::Parachain(MOONBEAM_PARA_ID)] + .try_into() + .unwrap(), + )), + ); + let swap_chain = Location::new( + 1, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::Parachain(HYDRA_PARA_ID)] + .try_into() + .unwrap(), + )), + ); + let want_reserve_chain = Location::new( + 1, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::Parachain(INTERLAY_PARA_ID)] + .try_into() + .unwrap(), + )), + ); + let dest = Location::new( + 1, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::Parachain(ZEITGEIST_PARA_ID)] + .try_into() + .unwrap(), + )), + ); + + let beneficiary = Location::new( + 0, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::AccountId32 { id: BOB, network: None }] + .try_into() + .unwrap(), + )), + ); + let assets: Assets = Asset { + id: cumulus_primitives_core::AssetId(Location::new( + 0, + cumulus_primitives_core::Junctions::X1(Arc::new( + vec![cumulus_primitives_core::Junction::GeneralIndex(0)] + .try_into() + .unwrap(), + )), + )), + fun: Fungible(10 * UNITS), + } + .into(); + let max_assets = assets.len() as u32 + 1; + + let give_amount = 100 * UNITS; + let give_asset = Asset::from(( + Location::new( + 1, + cumulus_primitives_core::Junctions::X2(Arc::new( + vec![ + cumulus_primitives_core::Junction::Parachain(MOONBEAM_PARA_ID), + cumulus_primitives_core::Junction::GeneralIndex(0), + ] + .try_into() + .unwrap(), + )), + ), + give_amount, + )); + let want_asset = Asset::from(( + Location::new( + 1, + cumulus_primitives_core::Junctions::X2(Arc::new( + vec![ + cumulus_primitives_core::Junction::Parachain(INTERLAY_PARA_ID), + cumulus_primitives_core::Junction::GeneralIndex(0), + ] + .try_into() + .unwrap(), + )), + ), + 10 * UNITS, + )); + + let want: Assets = want_asset.clone().into(); + + let fees = give_asset + .clone() + .reanchored(&swap_chain, &give_reserve_chain.interior) + .expect("should reanchor"); + + let destination_fee = want_asset + .clone() + .reanchored(&dest, &want_reserve_chain.interior) + .expect("should reanchor"); + + let origin_context = cumulus_primitives_core::Junctions::X2(Arc::new( + vec![ + cumulus_primitives_core::Junction::GlobalConsensus(NetworkId::Polkadot), + cumulus_primitives_core::Junction::Parachain(ZEITGEIST_PARA_ID), + ] + .try_into() + .unwrap(), + )); + let give_reserve_fees = give_asset + .clone() + .reanchored(&give_reserve_chain, &origin_context) + .expect("should reanchor"); + + let reserve_fees = want_asset + .clone() + .reanchored(&want_reserve_chain, &swap_chain.interior) + .expect("should reanchor"); + + let weight_limit = Limited(Weight::from_parts(u64::MAX, u64::MAX)); + + // executed on local (zeitgeist) + let message = Xcm(vec![ + WithdrawAsset(give_asset.clone().into()), + InitiateReserveWithdraw { + assets: All.into(), + reserve: give_reserve_chain, + xcm: Xcm(vec![ + //Executed on moonbeam + BuyExecution { + fees: half(&give_reserve_fees), + weight_limit: weight_limit.clone(), + }, + DepositReserveAsset { + assets: AllCounted(max_assets).into(), + dest: swap_chain, + // executed on remote (on hydra) + xcm: Xcm(vec![ + BuyExecution { + fees: crate::exchange_asset::half(&fees), + weight_limit: weight_limit.clone(), + }, + ExchangeAsset { + give: give_asset.into(), + want: want.clone(), + maximal: true, + }, + InitiateReserveWithdraw { + assets: want.into(), + reserve: want_reserve_chain, + xcm: Xcm(vec![ + //Executed on interlay + BuyExecution { + fees: half(&reserve_fees), + weight_limit: weight_limit.clone(), + }, + DepositReserveAsset { + assets: Wild(AllCounted(max_assets)), + dest, + xcm: Xcm(vec![ + //Executed on zetigeist + BuyExecution { + fees: half(&destination_fee), + weight_limit: weight_limit.clone(), + }, + DepositAsset { + assets: Wild(AllCounted(max_assets)), + beneficiary, + }, + ]), + }, + ]), + }, + ]), + }, + ]), + }, + ]); + let xcm = VersionedXcm::from(message); + + assert_ok!(hydradx_runtime::PolkadotXcm::execute( + hydradx_runtime::RuntimeOrigin::signed(ALICE.into()), + Box::new(xcm), + Weight::from_parts(899_600_000_000, 0), + )); + + //Assert + pretty_assertions::assert_eq!( + hydradx_runtime::Currencies::free_balance(GLMR, &AccountId::from(ALICE)), + alice_init_glmr_balance - give_amount + ); + + assert!(matches!( + last_hydra_events(2).first(), + Some(hydradx_runtime::RuntimeEvent::XcmpQueue( + cumulus_pallet_xcmp_queue::Event::XcmpMessageSent { .. } + )) + )); + }); + + //Trigger the processing of horizontal xcm messages + Moonbeam::execute_with(|| {}); + Hydra::execute_with(|| {}); + Interlay::execute_with(|| {}); + + //Assert that swap amount out of IBTC is sent back to Zeitgeist + Zeitgeist::execute_with(|| { + pretty_assertions::assert_eq!( + hydradx_runtime::Tokens::free_balance(IBTC, &AccountId::from(BOB)), + 9839246387064 + ); + }); + } } fn register_glmr() { @@ -832,7 +1133,6 @@ fn craft_transfer_and_swap_xcm_with_4_hops( want_asset: Asset, is_sell: bool, ) -> VersionedXcm { - type Weigher = FixedWeightBounds>; let give_reserve_chain = Location::new( From 94b206c6f3aafdf0dbd4c5ad4bc350d97f8aee11 Mon Sep 17 00:00:00 2001 From: dmoka Date: Mon, 27 May 2024 10:52:19 +0200 Subject: [PATCH 5/7] change tests to send funds back to origin sender alice --- integration-tests/src/exchange_asset.rs | 28 ++++++++++++++----------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/integration-tests/src/exchange_asset.rs b/integration-tests/src/exchange_asset.rs index 6393efe12..2b31de610 100644 --- a/integration-tests/src/exchange_asset.rs +++ b/integration-tests/src/exchange_asset.rs @@ -350,6 +350,11 @@ pub mod zeitgeist_use_cases { TransactionOutcome::Commit(DispatchResult::Ok(())) }); + pretty_assertions::assert_eq!( + hydradx_runtime::Tokens::free_balance(HDX_ON_OTHER_PARACHAIN, &AccountId::from(ALICE)), + 0 + ); + let give_reserve_chain = Location::new( 1, cumulus_primitives_core::Junctions::X1(Arc::new( @@ -372,7 +377,7 @@ pub mod zeitgeist_use_cases { let beneficiary = Location::new( 0, cumulus_primitives_core::Junctions::X1(Arc::new( - vec![cumulus_primitives_core::Junction::AccountId32 { id: BOB, network: None }] + vec![cumulus_primitives_core::Junction::AccountId32 { id: ALICE, network: None }] .try_into() .unwrap(), )), @@ -484,7 +489,7 @@ pub mod zeitgeist_use_cases { //Assert that swap amount out is sent back to Zeitgeist Zeitgeist::execute_with(|| { pretty_assertions::assert_eq!( - hydradx_runtime::Tokens::free_balance(HDX_ON_OTHER_PARACHAIN, &AccountId::from(BOB)), + hydradx_runtime::Tokens::free_balance(HDX_ON_OTHER_PARACHAIN, &AccountId::from(ALICE)), 8142821444432895 ); }); @@ -550,12 +555,11 @@ pub mod zeitgeist_use_cases { crate::exchange_asset::add_currency_price(HDX_ON_OTHER_PARACHAIN, FixedU128::from(1)); crate::exchange_asset::add_currency_price(IBTC, FixedU128::from(1)); - let alice_init_ibtc_balance = 3000 * UNITS; - assert_ok!(hydradx_runtime::Tokens::deposit( - IBTC, - &ALICE.into(), - alice_init_ibtc_balance - )); + + pretty_assertions::assert_eq!( + hydradx_runtime::Tokens::free_balance(IBTC, &AccountId::from(ALICE)), + 0 + ); let give_reserve_chain = Location::new( 1, @@ -586,7 +590,7 @@ pub mod zeitgeist_use_cases { let beneficiary = Location::new( 0, cumulus_primitives_core::Junctions::X1(Arc::new( - vec![cumulus_primitives_core::Junction::AccountId32 { id: BOB, network: None }] + vec![cumulus_primitives_core::Junction::AccountId32 { id: ALICE, network: None }] .try_into() .unwrap(), )), @@ -716,7 +720,7 @@ pub mod zeitgeist_use_cases { //Assert that swap amount out of IBTC is sent back to Zeitgeist Zeitgeist::execute_with(|| { pretty_assertions::assert_eq!( - hydradx_runtime::Tokens::free_balance(IBTC, &AccountId::from(BOB)), + hydradx_runtime::Tokens::free_balance(IBTC, &AccountId::from(ALICE)), 9839246387064 ); }); @@ -840,7 +844,7 @@ pub mod zeitgeist_use_cases { let beneficiary = Location::new( 0, cumulus_primitives_core::Junctions::X1(Arc::new( - vec![cumulus_primitives_core::Junction::AccountId32 { id: BOB, network: None }] + vec![cumulus_primitives_core::Junction::AccountId32 { id: ALICE, network: None }] .try_into() .unwrap(), )), @@ -1008,7 +1012,7 @@ pub mod zeitgeist_use_cases { //Assert that swap amount out of IBTC is sent back to Zeitgeist Zeitgeist::execute_with(|| { pretty_assertions::assert_eq!( - hydradx_runtime::Tokens::free_balance(IBTC, &AccountId::from(BOB)), + hydradx_runtime::Tokens::free_balance(IBTC, &AccountId::from(ALICE)), 9839246387064 ); }); From a6114dd8bb1510780f62061e454923369dbb0a92 Mon Sep 17 00:00:00 2001 From: dmoka Date: Mon, 27 May 2024 12:08:05 +0200 Subject: [PATCH 6/7] make assets more explicit --- integration-tests/src/exchange_asset.rs | 152 +++++++++++++++--------- 1 file changed, 94 insertions(+), 58 deletions(-) diff --git a/integration-tests/src/exchange_asset.rs b/integration-tests/src/exchange_asset.rs index 2b31de610..29f53ba24 100644 --- a/integration-tests/src/exchange_asset.rs +++ b/integration-tests/src/exchange_asset.rs @@ -65,11 +65,37 @@ fn hydra_should_swap_assets_when_receiving_from_acala_with_sell() { }); Acala::execute_with(|| { - let xcm = craft_exchange_asset_xcm::<_, hydradx_runtime::RuntimeCall>( - Asset::from((GeneralIndex(0), 50 * UNITS)), - Asset::from((GeneralIndex(CORE_ASSET_ID.into()), 300 * UNITS)), - SELL, - ); + let give = Asset::from(( + Location::new( + 1, + cumulus_primitives_core::Junctions::X2(Arc::new( + vec![ + cumulus_primitives_core::Junction::Parachain(ACALA_PARA_ID), + cumulus_primitives_core::Junction::GeneralIndex(0), + ] + .try_into() + .unwrap(), + )), + ), + 50 * UNITS, + )); + + let want = Asset::from(( + Location::new( + 1, + cumulus_primitives_core::Junctions::X2(Arc::new( + vec![ + cumulus_primitives_core::Junction::Parachain(HYDRA_PARA_ID), + cumulus_primitives_core::Junction::GeneralIndex(0), + ] + .try_into() + .unwrap(), + )), + ), + 300 * UNITS, + )); + + let xcm = craft_exchange_asset_xcm::(give, want, SELL); //Act let res = hydradx_runtime::PolkadotXcm::execute( hydradx_runtime::RuntimeOrigin::signed(ALICE.into()), @@ -136,11 +162,37 @@ fn hydra_should_swap_assets_when_receiving_from_acala_with_buy() { let amount_out = 300 * UNITS; Acala::execute_with(|| { - let xcm = craft_exchange_asset_xcm::<_, hydradx_runtime::RuntimeCall>( - Asset::from((GeneralIndex(0), 50 * UNITS)), - Asset::from((GeneralIndex(CORE_ASSET_ID.into()), amount_out)), - BUY, - ); + let give = Asset::from(( + Location::new( + 1, + cumulus_primitives_core::Junctions::X2(Arc::new( + vec![ + cumulus_primitives_core::Junction::Parachain(ACALA_PARA_ID), + cumulus_primitives_core::Junction::GeneralIndex(0), + ] + .try_into() + .unwrap(), + )), + ), + 50 * UNITS, + )); + + let want = Asset::from(( + Location::new( + 1, + cumulus_primitives_core::Junctions::X2(Arc::new( + vec![ + cumulus_primitives_core::Junction::Parachain(HYDRA_PARA_ID), + cumulus_primitives_core::Junction::GeneralIndex(0), + ] + .try_into() + .unwrap(), + )), + ), + amount_out, + )); + + let xcm = craft_exchange_asset_xcm::(give, want, BUY); //Act let res = hydradx_runtime::PolkadotXcm::execute( hydradx_runtime::RuntimeOrigin::signed(ALICE.into()), @@ -303,11 +355,11 @@ fn transfer_and_swap_should_work_with_4_hops() { } pub mod zeitgeist_use_cases { - use std::sync::Arc; use super::*; use frame_support::traits::tokens::Precision; use polkadot_xcm::latest::{NetworkId, Parent}; use polkadot_xcm::prelude::Parachain; + use std::sync::Arc; use primitives::constants::chain::CORE_ASSET_ID; @@ -377,9 +429,12 @@ pub mod zeitgeist_use_cases { let beneficiary = Location::new( 0, cumulus_primitives_core::Junctions::X1(Arc::new( - vec![cumulus_primitives_core::Junction::AccountId32 { id: ALICE, network: None }] - .try_into() - .unwrap(), + vec![cumulus_primitives_core::Junction::AccountId32 { + id: ALICE, + network: None, + }] + .try_into() + .unwrap(), )), ); let assets: Assets = Asset { @@ -556,10 +611,7 @@ pub mod zeitgeist_use_cases { crate::exchange_asset::add_currency_price(HDX_ON_OTHER_PARACHAIN, FixedU128::from(1)); crate::exchange_asset::add_currency_price(IBTC, FixedU128::from(1)); - pretty_assertions::assert_eq!( - hydradx_runtime::Tokens::free_balance(IBTC, &AccountId::from(ALICE)), - 0 - ); + pretty_assertions::assert_eq!(hydradx_runtime::Tokens::free_balance(IBTC, &AccountId::from(ALICE)), 0); let give_reserve_chain = Location::new( 1, @@ -590,9 +642,12 @@ pub mod zeitgeist_use_cases { let beneficiary = Location::new( 0, cumulus_primitives_core::Junctions::X1(Arc::new( - vec![cumulus_primitives_core::Junction::AccountId32 { id: ALICE, network: None }] - .try_into() - .unwrap(), + vec![cumulus_primitives_core::Junction::AccountId32 { + id: ALICE, + network: None, + }] + .try_into() + .unwrap(), )), ); let assets: Assets = Asset { @@ -743,7 +798,11 @@ pub mod zeitgeist_use_cases { let omnipool_account = hydradx_runtime::Omnipool::protocol_account(); let token_price = FixedU128::from_float(1.0); - assert_ok!(hydradx_runtime::Tokens::deposit(GLMR, &omnipool_account, 100000 * UNITS)); + assert_ok!(hydradx_runtime::Tokens::deposit( + GLMR, + &omnipool_account, + 100000 * UNITS + )); assert_ok!(hydradx_runtime::Tokens::deposit( IBTC, &omnipool_account, @@ -844,9 +903,12 @@ pub mod zeitgeist_use_cases { let beneficiary = Location::new( 0, cumulus_primitives_core::Junctions::X1(Arc::new( - vec![cumulus_primitives_core::Junction::AccountId32 { id: ALICE, network: None }] - .try_into() - .unwrap(), + vec![cumulus_primitives_core::Junction::AccountId32 { + id: ALICE, + network: None, + }] + .try_into() + .unwrap(), )), ); let assets: Assets = Asset { @@ -872,8 +934,8 @@ pub mod zeitgeist_use_cases { cumulus_primitives_core::Junction::Parachain(MOONBEAM_PARA_ID), cumulus_primitives_core::Junction::GeneralIndex(0), ] - .try_into() - .unwrap(), + .try_into() + .unwrap(), )), ), give_amount, @@ -910,8 +972,8 @@ pub mod zeitgeist_use_cases { cumulus_primitives_core::Junction::GlobalConsensus(NetworkId::Polkadot), cumulus_primitives_core::Junction::Parachain(ZEITGEIST_PARA_ID), ] - .try_into() - .unwrap(), + .try_into() + .unwrap(), )); let give_reserve_fees = give_asset .clone() @@ -1332,11 +1394,7 @@ fn craft_transfer_and_swap_xcm_with_4_hops( VersionedXcm::from(message) } -fn craft_exchange_asset_xcm, RC: Decode + GetDispatchInfo>( - give: Asset, - want: M, - is_sell: bool, -) -> VersionedXcm { +fn craft_exchange_asset_xcm(give: Asset, want: Asset, is_sell: bool) -> VersionedXcm { type Weigher = FixedWeightBounds>; let dest = Location::new( @@ -1382,32 +1440,10 @@ fn craft_exchange_asset_xcm, RC: Decode + GetDispatchInfo>( .clone() .reanchored(&dest, &context) .expect("should reanchor"); - let give = give.reanchored(&dest, &context).expect("should reanchor give"); let give: AssetFilter = Definite(give.into()); let want = want.into(); - let weight_limit = { - let fees = fees.clone(); - let mut remote_message = Xcm(vec![ - ReserveAssetDeposited::(assets.clone()), - ClearOrigin, - BuyExecution { - fees, - weight_limit: Limited(Weight::zero()), - }, - ExchangeAsset { - give: give.clone(), - want: want.clone(), - maximal: is_sell, - }, - DepositAsset { - assets: Wild(AllCounted(max_assets)), - beneficiary: beneficiary.clone(), - }, - ]); - // use local weight for remote message and hope for the best. - let remote_weight = Weigher::weight(&mut remote_message).expect("weighing should not fail"); - Limited(remote_weight) - }; + let weight_limit = Limited(Weight::from_parts(u64::MAX, u64::MAX)); + // executed on remote (on hydra) let xcm = Xcm(vec![ BuyExecution { fees, weight_limit }, From b2dbfab7f7420660c876e22b1e8aefadc9059874 Mon Sep 17 00:00:00 2001 From: dmoka Date: Fri, 7 Jun 2024 10:56:17 +0200 Subject: [PATCH 7/7] bump versions --- Cargo.lock | 2 +- integration-tests/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1cf171b7d..201263f6b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11913,7 +11913,7 @@ dependencies = [ [[package]] name = "runtime-integration-tests" -version = "1.22.3" +version = "1.22.4" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-parachain-system", diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index 72b46d7e1..490fc62d0 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "runtime-integration-tests" -version = "1.22.3" +version = "1.22.4" description = "Integration tests" authors = ["GalacticCouncil"] edition = "2021"