diff --git a/src/build_upgrade.rs b/src/build_upgrade.rs index 82fcb80..04c9d93 100644 --- a/src/build_upgrade.rs +++ b/src/build_upgrade.rs @@ -539,27 +539,24 @@ async fn send_as_superuser_from_polkadot(auth: &CallInfo) -> PolkadotRuntimeCall use polkadot_relay::runtime_types::{ pallet_xcm::pallet::Call as XcmCall, sp_weights::weight_v2::Weight as PolkadotWeight, - staging_xcm::v3::multilocation::MultiLocation, + staging_xcm::v4::{ + junction::Junction::Parachain, junctions::Junctions::X1, location::Location, + Instruction, Xcm, + }, xcm::{ - double_encoded::DoubleEncoded, - v2::OriginKind, - v3::{ - junction::Junction::Parachain, junctions::Junctions::X1, Instruction, WeightLimit, - Xcm, - }, - VersionedMultiLocation, - VersionedXcm::V3, + double_encoded::DoubleEncoded, v2::OriginKind, v3::WeightLimit, VersionedLocation, + VersionedXcm::V4, }, }; let (ref_time, proof_size) = get_weight(auth).await; let para_id = auth.network.get_para_id().unwrap(); PolkadotRuntimeCall::XcmPallet(XcmCall::send { - dest: Box::new(VersionedMultiLocation::V3(MultiLocation { + dest: Box::new(VersionedLocation::V4(Location { parents: 0, - interior: X1(Parachain(para_id)), + interior: X1([Parachain(para_id)]), })), - message: Box::new(V3(Xcm(vec![ + message: Box::new(V4(Xcm(vec![ Instruction::UnpaidExecution { weight_limit: WeightLimit::Unlimited, check_origin: None, diff --git a/src/submit_referendum.rs b/src/submit_referendum.rs index c242ee6..e16c88e 100644 --- a/src/submit_referendum.rs +++ b/src/submit_referendum.rs @@ -337,13 +337,10 @@ async fn polkadot_fellowship_referenda( pallet_preimage::pallet::Call as CollectivesPreimageCall, pallet_referenda::pallet::Call as FellowshipReferendaCall, pallet_xcm::pallet::Call as CollectivesXcmCall, - staging_xcm::v3::multilocation::MultiLocation, + staging_xcm::v4::{junctions::Junctions::Here, location::Location, Instruction, Xcm}, xcm::{ - double_encoded::DoubleEncoded, - v2::OriginKind, - v3::{junctions::Junctions::Here, Instruction, WeightLimit, Xcm}, - VersionedMultiLocation, - VersionedXcm::V3, + double_encoded::DoubleEncoded, v2::OriginKind, v3::WeightLimit, VersionedLocation, + VersionedXcm::V4, }, }; use polkadot_relay::runtime_types::{ @@ -410,11 +407,8 @@ async fn polkadot_fellowship_referenda( // This is what the Fellowship will actually vote on enacting. let whitelist_over_xcm = CallInfo::from_runtime_call(NetworkRuntimeCall::PolkadotCollectives( CollectivesRuntimeCall::PolkadotXcm(CollectivesXcmCall::send { - dest: Box::new(VersionedMultiLocation::V3(MultiLocation { - parents: 1, - interior: Here, - })), - message: Box::new(V3(Xcm(vec![ + dest: Box::new(VersionedLocation::V4(Location { parents: 1, interior: Here })), + message: Box::new(V4(Xcm(vec![ Instruction::UnpaidExecution { weight_limit: WeightLimit::Unlimited, check_origin: None, diff --git a/src/tests.rs b/src/tests.rs index cdfdf0a..783af01 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -251,8 +251,8 @@ async fn it_starts_polkadot_fellowship_referenda_correctly() { let proposal_details = polkadot_whitelist_remark_user_input(); let calls = generate_calls(&proposal_details).await; - let fellowship_preimage = hex::decode("0x2b00dc1f0003010003082f0000060302286bee02093d008817008821e8db19b8e34b62ee8bc618a5ed3eecb9761d7d81349b00aa5ce5dfca2534".trim_start_matches("0x")).expect("Valid call"); - let fellowship_referendum = hex::decode("0x3d003e0202adb9e4e4165f92f984690cac8816898978b7dfc8aff6db735ffd5ec9b043009737000000010a000000".trim_start_matches("0x")).expect("Valid call"); + let fellowship_preimage = hex::decode("0x2b00dc1f0004010004082f0000060302286bee02093d008817008821e8db19b8e34b62ee8bc618a5ed3eecb9761d7d81349b00aa5ce5dfca2534".trim_start_matches("0x")).expect("Valid call"); + let fellowship_referendum = hex::decode("0x3d003e020270ace20636863d9122dea540102dda7df4a52d3a0fe5eaf673e4eca7598aeeca37000000010a000000".trim_start_matches("0x")).expect("Valid call"); let public_preimage = hex::decode( "0x0a0060170300004c6f70656e676f762d7375626d69742074657374".trim_start_matches("0x"), ) diff --git a/src/types.rs b/src/types.rs index b0b7b1f..1de6763 100644 --- a/src/types.rs +++ b/src/types.rs @@ -21,7 +21,7 @@ pub(super) use kusama_asset_hub::runtime_types::asset_hub_kusama_runtime::Runtim pub mod kusama_bridge_hub {} pub(super) use kusama_bridge_hub::runtime_types::bridge_hub_kusama_runtime::RuntimeCall as KusamaBridgeHubRuntimeCall; -#[subxt::subxt(runtime_metadata_insecure_url = "wss://kusama.api.encointer.org:443")] +#[subxt::subxt(runtime_metadata_insecure_url = "wss://encointer-kusama-rpc.dwellir.com:443")] pub mod kusama_encointer {} pub(super) use kusama_encointer::runtime_types::encointer_kusama_runtime::RuntimeCall as KusamaEncointerRuntimeCall; @@ -382,7 +382,7 @@ impl CallInfo { Network::KusamaAssetHub => "wss://kusama-asset-hub-rpc.polkadot.io:443", Network::KusamaBridgeHub => "wss://kusama-bridge-hub-rpc.polkadot.io:443", Network::KusamaCoretime => "wss://kusama-coretime-rpc.polkadot.io:443", - Network::KusamaEncointer => "wss://kusama.api.encointer.org:443", + Network::KusamaEncointer => "wss://encointer-kusama-rpc.dwellir.com:443", Network::Polkadot => "wss://polkadot-rpc.dwellir.com:443", Network::PolkadotAssetHub => "wss://polkadot-asset-hub-rpc.polkadot.io:443", Network::PolkadotCollectives => "wss://polkadot-collectives-rpc.polkadot.io:443",