diff --git a/Cargo.lock b/Cargo.lock index 31a899f..6343a4a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4288,7 +4288,7 @@ dependencies = [ [[package]] name = "integritee-collator" -version = "1.13.1" +version = "1.13.2" dependencies = [ "assert_cmd", "async-trait", @@ -4395,7 +4395,7 @@ dependencies = [ [[package]] name = "integritee-runtime" -version = "1.13.540" +version = "1.13.550" dependencies = [ "assets-common", "cumulus-pallet-aura-ext", diff --git a/polkadot-parachains/Cargo.toml b/polkadot-parachains/Cargo.toml index 83d6722..0cd9f27 100644 --- a/polkadot-parachains/Cargo.toml +++ b/polkadot-parachains/Cargo.toml @@ -2,7 +2,7 @@ name = "integritee-collator" description = "The Integritee parachain collator binary" # align major.minor revision with polkadot SDK. bump patch revision ad lib. make this the github release tag -version = "1.13.1" +version = "1.13.2" authors = ["Integritee AG "] homepage = "https://integritee.network/" repository = "https://github.com/integritee-network/parachain" diff --git a/polkadot-parachains/integritee-runtime/Cargo.toml b/polkadot-parachains/integritee-runtime/Cargo.toml index 0b1f5eb..a501b4b 100644 --- a/polkadot-parachains/integritee-runtime/Cargo.toml +++ b/polkadot-parachains/integritee-runtime/Cargo.toml @@ -2,7 +2,7 @@ name = "integritee-runtime" description = "The Integritee parachain runtime" # align major.minor revision with polkadot SDK. patch revision must match runtime spec_version -version = "1.13.540" +version = "1.13.550" authors = ["Integritee AG "] homepage = "https://integritee.network/" repository = "https://github.com/integritee-network/parachain" diff --git a/polkadot-parachains/integritee-runtime/src/lib.rs b/polkadot-parachains/integritee-runtime/src/lib.rs index 990ff0f..f5ae81c 100644 --- a/polkadot-parachains/integritee-runtime/src/lib.rs +++ b/polkadot-parachains/integritee-runtime/src/lib.rs @@ -44,8 +44,11 @@ pub use frame_support::{ use frame_support::{ derive_impl, ord_parameter_types, traits::{ - fungible::{HoldConsideration, NativeFromLeft, NativeOrWithId, UnionOf}, - tokens::{imbalance::ResolveAssetTo, ConversionFromAssetBalance, PayFromAccount}, + fungible::{Credit, HoldConsideration, NativeFromLeft, NativeOrWithId, UnionOf}, + tokens::{ + imbalance::{ResolveAssetTo, ResolveTo}, + ConversionFromAssetBalance, PayFromAccount, + }, AsEnsureOriginWithArg, ConstBool, EnsureOriginWithArg, EqualPrivilegeOnly, Imbalance, InstanceFilter, LinearStoragePrice, OnUnbalanced, }, @@ -73,6 +76,7 @@ pub use pallet_sidechain; pub use pallet_teeracle; pub use pallet_teerex::Call as TeerexCall; pub use pallet_timestamp::Call as TimestampCall; +use pallet_treasury::TreasuryAccountId; use parachains_common::{message_queue::NarrowOriginToSibling, AssetIdForTrustBackedAssets}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; @@ -119,7 +123,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("integritee-parachain"), impl_name: create_runtime_str!("integritee-full"), authoring_version: 2, - spec_version: 540, + spec_version: 550, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 8, @@ -144,11 +148,16 @@ pub fn native_version() -> NativeVersion { NativeVersion { runtime_version: VERSION, can_author_with: Default::default() } } -pub struct DealWithFees; +pub struct DealWithFees(sp_std::marker::PhantomData); -impl OnUnbalanced> for DealWithFees { +impl OnUnbalanced>> for DealWithFees +where + R: pallet_balances::Config + pallet_authorship::Config + pallet_treasury::Config, + ::AccountId: From, + ::AccountId: Into, +{ fn on_unbalanceds( - mut fees_then_tips: impl Iterator>, + mut fees_then_tips: impl Iterator>>, ) { if let Some(fees) = fees_then_tips.next() { // for fees, 1% to treasury, 99% burned @@ -159,7 +168,7 @@ impl OnUnbalanced> for DealWithFees if let Some(tips) = fees_then_tips.next() { tips.merge_into(&mut split.0); } - Treasury::on_unbalanced(split.0); + ResolveTo::, pallet_balances::Pallet>::on_unbalanced(split.0); // burn remainder by not assigning imbalance to someone } } @@ -255,7 +264,8 @@ impl pallet_balances::Config for Runtime { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; + type OnChargeTransaction = + pallet_transaction_payment::FungibleAdapter>; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate; diff --git a/polkadot-parachains/integritee-runtime/src/xcm_config.rs b/polkadot-parachains/integritee-runtime/src/xcm_config.rs index 1ebbb94..e0dcc8c 100644 --- a/polkadot-parachains/integritee-runtime/src/xcm_config.rs +++ b/polkadot-parachains/integritee-runtime/src/xcm_config.rs @@ -51,17 +51,15 @@ use sp_std::{ prelude::*, }; use staging_xcm::latest::prelude::*; -#[allow(deprecated)] -use staging_xcm_builder::CurrencyAdapter; use staging_xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, DescribeAllTerminal, DescribeFamily, EnsureXcmOrigin, FixedRateOfFungible, - FixedWeightBounds, FrameTransactionalProcessor, FungiblesAdapter, HashedDescription, - NativeAsset, NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, - SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - WithComputedOrigin, + FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, FungiblesAdapter, + HashedDescription, NativeAsset, NoChecking, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + TrailingSetTopicAsId, WithComputedOrigin, }; use staging_xcm_executor::{traits::JustTry, XcmExecutor}; use xcm_primitives::{AsAssetLocation, ConvertedRegisteredAssetId}; @@ -141,8 +139,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting TEER only. -#[allow(deprecated)] -pub type LocalNativeTransactor = CurrencyAdapter< +pub type LocalNativeTransactor = FungibleAdapter< // Use this currency: Balances, // Matcher: matches concrete fungible assets whose `id` could be converted into `CurrencyId`. diff --git a/polkadot-parachains/shell-runtime/src/lib.rs b/polkadot-parachains/shell-runtime/src/lib.rs index 914254e..1735e41 100644 --- a/polkadot-parachains/shell-runtime/src/lib.rs +++ b/polkadot-parachains/shell-runtime/src/lib.rs @@ -216,7 +216,7 @@ impl pallet_balances::Config for Runtime { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter; + type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter; type WeightToFee = IdentityFee; type FeeMultiplierUpdate = (); type LengthToFee = ConstantMultiplier; diff --git a/polkadot-parachains/shell-runtime/src/xcm_config.rs b/polkadot-parachains/shell-runtime/src/xcm_config.rs index 4087dbe..e997a5c 100644 --- a/polkadot-parachains/shell-runtime/src/xcm_config.rs +++ b/polkadot-parachains/shell-runtime/src/xcm_config.rs @@ -47,13 +47,11 @@ use sp_std::{ prelude::*, }; use staging_xcm::latest::prelude::*; -#[allow(deprecated)] -use staging_xcm_builder::CurrencyAdapter; use staging_xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, DenyReserveTransferToRelayChain, DenyThenTry, EnsureXcmOrigin, - FixedWeightBounds, FrameTransactionalProcessor, ParentAsSuperuser, ParentIsPreset, - RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + FixedWeightBounds, FrameTransactionalProcessor, FungibleAdapter, ParentAsSuperuser, + ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, }; @@ -160,8 +158,7 @@ pub type LocationToAccountId = ( ); /// Means for transacting assets on this chain. -#[allow(deprecated)] -pub type LocalAssetTransactor = CurrencyAdapter< +pub type LocalAssetTransactor = FungibleAdapter< // Use this currency: Balances, // Matcher: matches concrete fungible assets whose `id` could be converted into `CurrencyId`.