diff --git a/runtime/bajun/src/lib.rs b/runtime/bajun/src/lib.rs index e6e0a7a..09040bd 100644 --- a/runtime/bajun/src/lib.rs +++ b/runtime/bajun/src/lib.rs @@ -54,7 +54,7 @@ use frame_support::{ parameter_types, traits::{ fungible::HoldConsideration, - tokens::{PayFromAccount, UnityAssetBalanceConversion}, + tokens::{imbalance::ResolveTo, PayFromAccount, UnityAssetBalanceConversion}, AsEnsureOriginWithArg, ConstBool, Contains, LinearStoragePrice, }, weights::{ @@ -69,15 +69,11 @@ use frame_system::{ EnsureRoot, EnsureSigned, EnsureWithSuccess, }; use pallet_identity::legacy::IdentityInfo; +use pallet_transaction_payment::FungibleAdapter; use scale_info::TypeInfo; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; -// Wait until more upstream code has migrated, see: -// https://github.com/paritytech/polkadot-sdk/pull/2292 -#[allow(deprecated)] -use pallet_transaction_payment::CurrencyAdapter; - #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -329,22 +325,35 @@ impl Contains for BaseCallFilter { } impl frame_system::Config for Runtime { - /// The identifier used to distinguish between accounts. - type AccountId = AccountId; + /// The ubiquitous event type. + type RuntimeEvent = RuntimeEvent; + /// The basic call filter to use in dispatchable. + type BaseCallFilter = BaseCallFilter; + /// Block & extrinsics weights: base values and limits. + type BlockWeights = RuntimeBlockWeights; + /// The maximum length of a block (in bytes). + type BlockLength = RuntimeBlockLength; + /// The ubiquitous origin type. + type RuntimeOrigin = RuntimeOrigin; /// The aggregated dispatch type that is available for extrinsics. type RuntimeCall = RuntimeCall; - /// The lookup mechanism to get account ID from whatever is passed in dispatchers. - type Lookup = AccountIdLookup; + type RuntimeTask = RuntimeTask; + /// The Nonce value type + type Nonce = Nonce; /// The type for hashing blocks and tries. type Hash = Hash; /// The hashing algorithm used. type Hashing = BlakeTwo256; - /// The ubiquitous event type. - type RuntimeEvent = RuntimeEvent; - /// The ubiquitous origin type. - type RuntimeOrigin = RuntimeOrigin; + /// The identifier used to distinguish between accounts. + type AccountId = AccountId; + /// The lookup mechanism to get account ID from whatever is passed in dispatchers. + type Lookup = AccountIdLookup; + /// The Block provider type + type Block = Block; /// Maximum number of block number to block hash mappings to keep (oldest pruned first). type BlockHashCount = BlockHashCount; + /// The weight of database operations that the runtime can invoke. + type DbWeight = RocksDbWeight; /// Runtime version. type Version = Version; /// Converts a module to an index of this module in the runtime. @@ -355,26 +364,13 @@ impl frame_system::Config for Runtime { type OnNewAccount = (); /// What to do if an account is fully reaped from the system. type OnKilledAccount = (); - /// The weight of database operations that the runtime can invoke. - type DbWeight = RocksDbWeight; - /// The basic call filter to use in dispatchable. - type BaseCallFilter = BaseCallFilter; /// Weight information for the extrinsics of this pallet. type SystemWeightInfo = weights::frame_system::WeightInfo; - /// Block & extrinsics weights: base values and limits. - type BlockWeights = RuntimeBlockWeights; - /// The maximum length of a block (in bytes). - type BlockLength = RuntimeBlockLength; /// This is used as an identifier of the chain. 42 is the generic substrate prefix. type SS58Prefix = SS58Prefix; /// The action to take on a Runtime Upgrade type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode; type MaxConsumers = frame_support::traits::ConstU32<16>; - /// The Nonce value type - type Nonce = Nonce; - /// The Block provider type - type Block = Block; - type RuntimeTask = RuntimeTask; // Note: Single block migrations are currently run in the classical way in the `Executive` // because try-runtime doesn't support the pallet-migrations yet. // @@ -485,10 +481,7 @@ parameter_types! { impl pallet_transaction_payment::Config for Runtime { type RuntimeEvent = RuntimeEvent; - // Wait until more upstream code has migrated, see: - // https://github.com/paritytech/polkadot-sdk/pull/2292 - #[allow(deprecated)] - type OnChargeTransaction = CurrencyAdapter; + type OnChargeTransaction = FungibleAdapter>; type WeightToFee = WeightToFee; type LengthToFee = ConstantMultiplier; type FeeMultiplierUpdate = SlowAdjustingFeeUpdate;