git.delta.rocks / unique-network / refs/commits / aa49f021671b

difftreelog

feat use pallet-configuration

Yaroslav Bolyukin2022-08-15parent: #a7efb3e.patch.diff
in: master

11 files changed

addedpallets/configuration/Cargo.tomldiffbeforeafterboth
--- /dev/null
+++ b/pallets/configuration/Cargo.toml
@@ -0,0 +1,33 @@
+[package]
+name = "pallet-configuration"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
+parity-scale-codec = { version = "3.1.5", features = [
+	"derive",
+], default-features = false }
+scale-info = { version = "2.0.1", default-features = false, features = [
+	"derive",
+] }
+frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
+frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
+sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
+sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
+sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
+sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.24" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }
+smallvec = "1.6.1"
+
+[features]
+default = ["std"]
+std = [
+	"parity-scale-codec/std",
+	"frame-support/std",
+	"frame-system/std",
+	"sp-runtime/std",
+	"sp-std/std",
+	"sp-core/std",
+	"sp-arithmetic/std",
+	"fp-evm/std",
+]
addedpallets/configuration/src/lib.rsdiffbeforeafterboth
--- /dev/null
+++ b/pallets/configuration/src/lib.rs
@@ -0,0 +1,124 @@
+// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.
+// This file is part of Unique Network.
+
+// Unique Network is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+
+// Unique Network is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
+
+#![cfg_attr(not(feature = "std"), no_std)]
+
+use core::marker::PhantomData;
+
+use frame_support::{
+	pallet,
+	weights::{WeightToFeePolynomial, WeightToFeeCoefficients, WeightToFeeCoefficient},
+	traits::Get,
+};
+use sp_arithmetic::traits::{BaseArithmetic, Unsigned};
+use smallvec::smallvec;
+
+pub use pallet::*;
+use sp_core::U256;
+use sp_runtime::Perbill;
+
+#[pallet]
+mod pallet {
+	use super::*;
+	use frame_support::{
+		traits::Get,
+		pallet_prelude::{StorageValue, ValueQuery, DispatchResult},
+	};
+	use frame_system::{pallet_prelude::OriginFor, ensure_root};
+
+	#[pallet::config]
+	pub trait Config: frame_system::Config {
+		#[pallet::constant]
+		type DefaultWeightToFeeCoefficient: Get<u32>;
+		#[pallet::constant]
+		type DefaultMinGasPrice: Get<u64>;
+	}
+
+	#[pallet::storage]
+	pub type WeightToFeeCoefficientOverride<T: Config> = StorageValue<
+		Value = u32,
+		QueryKind = ValueQuery,
+		OnEmpty = T::DefaultWeightToFeeCoefficient,
+	>;
+
+	#[pallet::storage]
+	pub type MinGasPriceOverride<T: Config> =
+		StorageValue<Value = u64, QueryKind = ValueQuery, OnEmpty = T::DefaultMinGasPrice>;
+
+	#[pallet::call]
+	impl<T: Config> Pallet<T> {
+		#[pallet::weight(T::DbWeight::get().writes(1))]
+		pub fn set_weight_to_fee_coefficient_override(
+			origin: OriginFor<T>,
+			coeff: Option<u32>,
+		) -> DispatchResult {
+			let _sender = ensure_root(origin)?;
+			if let Some(coeff) = coeff {
+				<WeightToFeeCoefficientOverride<T>>::set(coeff);
+			} else {
+				<WeightToFeeCoefficientOverride<T>>::kill();
+			}
+			Ok(())
+		}
+
+		#[pallet::weight(T::DbWeight::get().writes(1))]
+		pub fn set_min_gas_price_override(
+			origin: OriginFor<T>,
+			coeff: Option<u64>,
+		) -> DispatchResult {
+			let _sender = ensure_root(origin)?;
+			if let Some(coeff) = coeff {
+				<MinGasPriceOverride<T>>::set(coeff);
+			} else {
+				<MinGasPriceOverride<T>>::kill();
+			}
+			Ok(())
+		}
+	}
+
+	#[pallet::pallet]
+	#[pallet::generate_store(pub(super) trait Store)]
+	pub struct Pallet<T>(_);
+}
+
+pub struct WeightToFee<T, B>(PhantomData<(T, B)>);
+
+impl<T, B> WeightToFeePolynomial for WeightToFee<T, B>
+where
+	T: Config,
+	B: BaseArithmetic + From<u32> + Copy + Unsigned,
+{
+	type Balance = B;
+
+	fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
+		smallvec!(WeightToFeeCoefficient {
+			coeff_integer: <WeightToFeeCoefficientOverride<T>>::get().into(),
+			coeff_frac: Perbill::zero(),
+			negative: false,
+			degree: 1,
+		})
+	}
+}
+
+pub struct FeeCalculator<T>(PhantomData<T>);
+impl<T: Config> fp_evm::FeeCalculator for FeeCalculator<T> {
+	fn min_gas_price() -> (U256, u64) {
+		(
+			<MinGasPriceOverride<T>>::get().into(),
+			T::DbWeight::get().reads(1),
+		)
+	}
+}
modifiedprimitives/common/src/constants.rsdiffbeforeafterboth
--- a/primitives/common/src/constants.rs
+++ b/primitives/common/src/constants.rs
@@ -36,10 +36,10 @@
 pub const UNIQUE: Balance = 100 * CENTIUNIQUE;
 
 // Targeting 0.1 UNQ per transfer
-pub const WEIGHT_TO_FEE_COEFF: u32 = 207_890_902;
+pub const WEIGHT_TO_FEE_COEFF: u32 = /*<weight2fee>*/207_890_902/*</weight2fee>*/;
 
 // Targeting 0.15 UNQ per transfer via ETH
-pub const MIN_GAS_PRICE: u64 = 1_019_493_469_850;
+pub const MIN_GAS_PRICE: u64 = /*<mingasprice>*/1_019_493_469_850/*</mingasprice>*/;
 
 /// We assume that ~10% of the block weight is consumed by `on_initalize` handlers.
 /// This is used to limit the maximal weight of a single extrinsic.
modifiedruntime/common/config/ethereum.rsdiffbeforeafterboth
--- a/runtime/common/config/ethereum.rs
+++ b/runtime/common/config/ethereum.rs
@@ -50,13 +50,6 @@
 	}
 }
 
-pub struct FixedFee;
-impl pallet_evm::FeeCalculator for FixedFee {
-	fn min_gas_price() -> (U256, u64) {
-		(MIN_GAS_PRICE.into(), 0)
-	}
-}
-
 pub struct EthereumFindAuthor<F>(core::marker::PhantomData<F>);
 impl<F: FindAuthor<u32>> FindAuthor<H160> for EthereumFindAuthor<F> {
 	fn find_author<'a, I>(digests: I) -> Option<H160>
@@ -73,7 +66,7 @@
 
 impl pallet_evm::Config for Runtime {
 	type BlockGasLimit = BlockGasLimit;
-	type FeeCalculator = FixedFee;
+	type FeeCalculator = pallet_configuration::FeeCalculator<Self>;
 	type GasWeightMapping = FixedGasWeightMapping;
 	type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping<Self>;
 	type CallOrigin = EnsureAddressTruncated<Self>;
modifiedruntime/common/config/pallets/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -25,6 +25,7 @@
 	},
 	Runtime, Event, Call, Balances,
 };
+use frame_support::traits::{ConstU32, ConstU64};
 use up_common::{
 	types::{AccountId, Balance, BlockNumber},
 	constants::*,
@@ -91,3 +92,8 @@
 	type CommonWeightInfo = CommonWeights<Self>;
 	type RefungibleExtensionsWeightInfo = CommonWeights<Self>;
 }
+
+impl pallet_configuration::Config for Runtime {
+	type DefaultWeightToFeeCoefficient = ConstU32<{ up_common::constants::WEIGHT_TO_FEE_COEFF }>;
+	type DefaultMinGasPrice = ConstU64<{ up_common::constants::MIN_GAS_PRICE }>;
+}
modifiedruntime/common/config/substrate.rsdiffbeforeafterboth
--- a/runtime/common/config/substrate.rs
+++ b/runtime/common/config/substrate.rs
@@ -18,8 +18,7 @@
 	traits::{Everything, ConstU32},
 	weights::{
 		constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight},
-		DispatchClass, WeightToFeePolynomial, WeightToFeeCoefficients, ConstantMultiplier,
-		WeightToFeeCoefficient,
+		DispatchClass, ConstantMultiplier,
 	},
 	parameter_types, PalletId,
 };
@@ -32,8 +31,6 @@
 	limits::{BlockLength, BlockWeights},
 	EnsureRoot,
 };
-use sp_arithmetic::traits::{BaseArithmetic, Unsigned};
-use smallvec::smallvec;
 use crate::{
 	runtime_common::DealWithFees, Runtime, Event, Call, Origin, PalletInfo, System, Balances,
 	Treasury, SS58Prefix, Version,
@@ -154,32 +151,13 @@
 	/// This value increases the priority of `Operational` transactions by adding
 	/// a "virtual tip" that's equal to the `OperationalFeeMultiplier * final_fee`.
 	pub const OperationalFeeMultiplier: u8 = 5;
-}
-
-/// Linear implementor of `WeightToFeePolynomial`
-pub struct LinearFee<T>(sp_std::marker::PhantomData<T>);
-
-impl<T> WeightToFeePolynomial for LinearFee<T>
-where
-	T: BaseArithmetic + From<u32> + Copy + Unsigned,
-{
-	type Balance = T;
-
-	fn polynomial() -> WeightToFeeCoefficients<Self::Balance> {
-		smallvec!(WeightToFeeCoefficient {
-			coeff_integer: WEIGHT_TO_FEE_COEFF.into(),
-			coeff_frac: Perbill::zero(),
-			negative: false,
-			degree: 1,
-		})
-	}
 }
 
 impl pallet_transaction_payment::Config for Runtime {
 	type OnChargeTransaction = pallet_transaction_payment::CurrencyAdapter<Balances, DealWithFees>;
 	type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
 	type OperationalFeeMultiplier = OperationalFeeMultiplier;
-	type WeightToFee = LinearFee<Balance>;
+	type WeightToFee = pallet_configuration::WeightToFee<Self, Balance>;
 	type FeeMultiplierUpdate = ();
 }
 
modifiedruntime/common/config/xcm.rsdiffbeforeafterboth
--- a/runtime/common/config/xcm.rs
+++ b/runtime/common/config/xcm.rs
@@ -44,8 +44,7 @@
 use xcm_executor::{Config, XcmExecutor, Assets};
 use sp_std::marker::PhantomData;
 use crate::{
-	runtime_common::config::substrate::LinearFee, Runtime, Call, Event, Origin, Balances,
-	ParachainInfo, ParachainSystem, PolkadotXcm, XcmpQueue,
+	Runtime, Call, Event, Origin, Balances, ParachainInfo, ParachainSystem, PolkadotXcm, XcmpQueue,
 };
 use up_common::{
 	types::{AccountId, Balance},
@@ -234,8 +233,11 @@
 	}
 }
 
-pub struct XcmConfig;
-impl Config for XcmConfig {
+pub struct XcmConfig<T>(PhantomData<T>);
+impl<T> Config for XcmConfig<T>
+where
+	T: pallet_configuration::Config,
+{
 	type Call = Call;
 	type XcmSender = XcmRouter;
 	// How to withdraw and deposit an asset.
@@ -246,8 +248,13 @@
 	type LocationInverter = LocationInverter<Ancestry>;
 	type Barrier = Barrier;
 	type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
-	type Trader =
-		UsingOnlySelfCurrencyComponents<LinearFee<Balance>, RelayLocation, AccountId, Balances, ()>;
+	type Trader = UsingOnlySelfCurrencyComponents<
+		pallet_configuration::WeightToFee<T, Balance>,
+		RelayLocation,
+		AccountId,
+		Balances,
+		(),
+	>;
 	type ResponseHandler = (); // Don't handle responses for now.
 	type SubscriptionService = PolkadotXcm;
 
@@ -261,7 +268,7 @@
 	type XcmRouter = XcmRouter;
 	type ExecuteXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
 	type XcmExecuteFilter = Everything;
-	type XcmExecutor = XcmExecutor<XcmConfig>;
+	type XcmExecutor = XcmExecutor<XcmConfig<Self>>;
 	type XcmTeleportFilter = Everything;
 	type XcmReserveTransferFilter = Everything;
 	type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
@@ -274,13 +281,13 @@
 
 impl cumulus_pallet_xcm::Config for Runtime {
 	type Event = Event;
-	type XcmExecutor = XcmExecutor<XcmConfig>;
+	type XcmExecutor = XcmExecutor<XcmConfig<Self>>;
 }
 
 impl cumulus_pallet_xcmp_queue::Config for Runtime {
 	type WeightInfo = ();
 	type Event = Event;
-	type XcmExecutor = XcmExecutor<XcmConfig>;
+	type XcmExecutor = XcmExecutor<XcmConfig<Self>>;
 	type ChannelInfo = ParachainSystem;
 	type VersionWrapper = ();
 	type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;
@@ -290,6 +297,6 @@
 
 impl cumulus_pallet_dmp_queue::Config for Runtime {
 	type Event = Event;
-	type XcmExecutor = XcmExecutor<XcmConfig>;
+	type XcmExecutor = XcmExecutor<XcmConfig<Self>>;
 	type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;
 }
modifiedruntime/common/construct_runtime/mod.rsdiffbeforeafterboth
--- a/runtime/common/construct_runtime/mod.rs
+++ b/runtime/common/construct_runtime/mod.rs
@@ -57,7 +57,7 @@
                 #[runtimes(opal)]
                 Scheduler: pallet_unique_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
 
-                // free = 63
+                Configuration: pallet_configuration::{Pallet, Call, Storage} = 63,
 
                 Charging: pallet_charge_transaction::{Pallet, Call, Storage } = 64,
                 // ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
before · runtime/opal/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Opal Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'opal-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version = '0.9.24'1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std', 'opal-runtime']20runtime-benchmarks = [21    'hex-literal',22    'frame-benchmarking',23    'frame-support/runtime-benchmarks',24    'frame-system-benchmarking',25    'frame-system/runtime-benchmarks',26    'pallet-ethereum/runtime-benchmarks',27    'pallet-evm-migration/runtime-benchmarks',28    'pallet-evm-coder-substrate/runtime-benchmarks',29    'pallet-balances/runtime-benchmarks',30    'pallet-timestamp/runtime-benchmarks',31    'pallet-common/runtime-benchmarks',32    'pallet-structure/runtime-benchmarks',33    'pallet-fungible/runtime-benchmarks',34    'pallet-refungible/runtime-benchmarks',35    'pallet-nonfungible/runtime-benchmarks',36    'pallet-proxy-rmrk-core/runtime-benchmarks',37    'pallet-proxy-rmrk-equip/runtime-benchmarks',38    'pallet-unique/runtime-benchmarks',39    'pallet-inflation/runtime-benchmarks',40    'pallet-unique-scheduler/runtime-benchmarks',41    'pallet-xcm/runtime-benchmarks',42    'sp-runtime/runtime-benchmarks',43    'xcm-builder/runtime-benchmarks',44]45try-runtime = [46    'frame-try-runtime',47    'frame-executive/try-runtime',48    'frame-system/try-runtime',49]50std = [51    'codec/std',52    'cumulus-pallet-aura-ext/std',53    'cumulus-pallet-parachain-system/std',54    'cumulus-pallet-xcm/std',55    'cumulus-pallet-xcmp-queue/std',56    'cumulus-primitives-core/std',57    'cumulus-primitives-utility/std',58    'frame-try-runtime/std',59    'frame-executive/std',60    'frame-support/std',61    'frame-system/std',62    'frame-system-rpc-runtime-api/std',63    'pallet-aura/std',64    'pallet-balances/std',65    # 'pallet-contracts/std',66    # 'pallet-contracts-primitives/std',67    # 'pallet-contracts-rpc-runtime-api/std',68    # 'pallet-contract-helpers/std',69    'pallet-randomness-collective-flip/std',70    'pallet-sudo/std',71    'pallet-timestamp/std',72    'pallet-transaction-payment/std',73    'pallet-transaction-payment-rpc-runtime-api/std',74    'pallet-treasury/std',75    # 'pallet-vesting/std',76    'pallet-evm/std',77    'pallet-evm-migration/std',78    'pallet-evm-contract-helpers/std',79    'pallet-evm-transaction-payment/std',80    'pallet-evm-coder-substrate/std',81    'pallet-ethereum/std',82    'pallet-base-fee/std',83    'fp-rpc/std',84    'up-rpc/std',85    'fp-evm-mapping/std',86    'fp-self-contained/std',87    'parachain-info/std',88    'serde',89    'pallet-inflation/std',90    'pallet-common/std',91    'pallet-structure/std',92    'pallet-fungible/std',93    'pallet-refungible/std',94    'pallet-nonfungible/std',95    'pallet-proxy-rmrk-core/std',96    'pallet-proxy-rmrk-equip/std',97    'pallet-unique/std',98    'pallet-unique-scheduler/std',99    'pallet-charge-transaction/std',100    'up-data-structs/std',101    'sp-api/std',102    'sp-block-builder/std',103    "sp-consensus-aura/std",104    'sp-core/std',105    'sp-inherents/std',106    'sp-io/std',107    'sp-offchain/std',108    'sp-runtime/std',109    'sp-session/std',110    'sp-std/std',111    'sp-transaction-pool/std',112    'sp-version/std',113    'xcm/std',114    'xcm-builder/std',115    'xcm-executor/std',116    'up-common/std',117    'rmrk-rpc/std',118    'evm-coder/std',119    'up-sponsorship/std',120121    "orml-vesting/std",122]123limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']124opal-runtime = ['refungible', 'scheduler', 'rmrk']125126refungible = []127scheduler = []128rmrk = []129130################################################################################131# Substrate Dependencies132133[dependencies.codec]134default-features = false135features = ['derive']136package = 'parity-scale-codec'137version = '3.1.2'138139[dependencies.frame-benchmarking]140default-features = false141git = "https://github.com/paritytech/substrate"142optional = true143branch = "polkadot-v0.9.24"144145[dependencies.frame-try-runtime]146default-features = false147git = 'https://github.com/paritytech/substrate'148optional = true149branch = 'polkadot-v0.9.24'150151[dependencies.frame-executive]152default-features = false153git = "https://github.com/paritytech/substrate"154branch = "polkadot-v0.9.24"155156[dependencies.frame-support]157default-features = false158git = "https://github.com/paritytech/substrate"159branch = "polkadot-v0.9.24"160161[dependencies.frame-system]162default-features = false163git = "https://github.com/paritytech/substrate"164branch = "polkadot-v0.9.24"165166[dependencies.frame-system-benchmarking]167default-features = false168git = "https://github.com/paritytech/substrate"169optional = true170branch = "polkadot-v0.9.24"171172[dependencies.frame-system-rpc-runtime-api]173default-features = false174git = "https://github.com/paritytech/substrate"175branch = "polkadot-v0.9.24"176177[dependencies.hex-literal]178optional = true179version = '0.3.3'180181[dependencies.serde]182default-features = false183features = ['derive']184optional = true185version = '1.0.130'186187[dependencies.pallet-aura]188default-features = false189git = "https://github.com/paritytech/substrate"190branch = "polkadot-v0.9.24"191192[dependencies.pallet-balances]193default-features = false194git = "https://github.com/paritytech/substrate"195branch = "polkadot-v0.9.24"196197# Contracts specific packages198# [dependencies.pallet-contracts]199# git = 'https://github.com/paritytech/substrate'200# default-features = false201# branch = 'master'202# version = '4.0.0-dev'203204# [dependencies.pallet-contracts-primitives]205# git = 'https://github.com/paritytech/substrate'206# default-features = false207# branch = 'master'208# version = '4.0.0-dev'209210# [dependencies.pallet-contracts-rpc-runtime-api]211# git = 'https://github.com/paritytech/substrate'212# default-features = false213# branch = 'master'214# version = '4.0.0-dev'215216[dependencies.pallet-randomness-collective-flip]217default-features = false218git = "https://github.com/paritytech/substrate"219branch = "polkadot-v0.9.24"220221[dependencies.pallet-sudo]222default-features = false223git = "https://github.com/paritytech/substrate"224branch = "polkadot-v0.9.24"225226[dependencies.pallet-timestamp]227default-features = false228git = "https://github.com/paritytech/substrate"229branch = "polkadot-v0.9.24"230231[dependencies.pallet-transaction-payment]232default-features = false233git = "https://github.com/paritytech/substrate"234branch = "polkadot-v0.9.24"235236[dependencies.pallet-transaction-payment-rpc-runtime-api]237default-features = false238git = "https://github.com/paritytech/substrate"239branch = "polkadot-v0.9.24"240241[dependencies.pallet-treasury]242default-features = false243git = "https://github.com/paritytech/substrate"244branch = "polkadot-v0.9.24"245246# [dependencies.pallet-vesting]247# default-features = false248# git = 'https://github.com/paritytech/substrate'249# branch = 'master'250251[dependencies.sp-arithmetic]252default-features = false253git = "https://github.com/paritytech/substrate"254branch = "polkadot-v0.9.24"255256[dependencies.sp-api]257default-features = false258git = "https://github.com/paritytech/substrate"259branch = "polkadot-v0.9.24"260261[dependencies.sp-block-builder]262default-features = false263git = "https://github.com/paritytech/substrate"264branch = "polkadot-v0.9.24"265266[dependencies.sp-core]267default-features = false268git = "https://github.com/paritytech/substrate"269branch = "polkadot-v0.9.24"270271[dependencies.sp-consensus-aura]272default-features = false273git = "https://github.com/paritytech/substrate"274branch = "polkadot-v0.9.24"275276[dependencies.sp-inherents]277default-features = false278git = "https://github.com/paritytech/substrate"279branch = "polkadot-v0.9.24"280281[dependencies.sp-io]282default-features = false283git = "https://github.com/paritytech/substrate"284branch = "polkadot-v0.9.24"285286[dependencies.sp-offchain]287default-features = false288git = "https://github.com/paritytech/substrate"289branch = "polkadot-v0.9.24"290291[dependencies.sp-runtime]292default-features = false293git = "https://github.com/paritytech/substrate"294branch = "polkadot-v0.9.24"295296[dependencies.sp-session]297default-features = false298git = "https://github.com/paritytech/substrate"299branch = "polkadot-v0.9.24"300301[dependencies.sp-std]302default-features = false303git = "https://github.com/paritytech/substrate"304branch = "polkadot-v0.9.24"305306[dependencies.sp-transaction-pool]307default-features = false308git = "https://github.com/paritytech/substrate"309branch = "polkadot-v0.9.24"310311[dependencies.sp-version]312default-features = false313git = "https://github.com/paritytech/substrate"314branch = "polkadot-v0.9.24"315316[dependencies.smallvec]317version = '1.6.1'318319################################################################################320# Cumulus dependencies321322[dependencies.parachain-info]323default-features = false324git = "https://github.com/paritytech/cumulus"325branch = "polkadot-v0.9.24"326327[dependencies.cumulus-pallet-aura-ext]328git = "https://github.com/paritytech/cumulus"329branch = "polkadot-v0.9.24"330default-features = false331332[dependencies.cumulus-pallet-parachain-system]333git = "https://github.com/paritytech/cumulus"334branch = "polkadot-v0.9.24"335default-features = false336337[dependencies.cumulus-primitives-core]338git = "https://github.com/paritytech/cumulus"339branch = "polkadot-v0.9.24"340default-features = false341342[dependencies.cumulus-pallet-xcm]343git = "https://github.com/paritytech/cumulus"344branch = "polkadot-v0.9.24"345default-features = false346347[dependencies.cumulus-pallet-dmp-queue]348git = "https://github.com/paritytech/cumulus"349branch = "polkadot-v0.9.24"350default-features = false351352[dependencies.cumulus-pallet-xcmp-queue]353git = "https://github.com/paritytech/cumulus"354branch = "polkadot-v0.9.24"355default-features = false356357[dependencies.cumulus-primitives-utility]358git = "https://github.com/paritytech/cumulus"359branch = "polkadot-v0.9.24"360default-features = false361362[dependencies.cumulus-primitives-timestamp]363git = "https://github.com/paritytech/cumulus"364branch = "polkadot-v0.9.24"365default-features = false366367################################################################################368# Polkadot dependencies369370[dependencies.polkadot-parachain]371git = "https://github.com/paritytech/polkadot"372branch = "release-v0.9.24"373default-features = false374375[dependencies.xcm]376git = "https://github.com/paritytech/polkadot"377branch = "release-v0.9.24"378default-features = false379380[dependencies.xcm-builder]381git = "https://github.com/paritytech/polkadot"382branch = "release-v0.9.24"383default-features = false384385[dependencies.xcm-executor]386git = "https://github.com/paritytech/polkadot"387branch = "release-v0.9.24"388default-features = false389390[dependencies.pallet-xcm]391git = "https://github.com/paritytech/polkadot"392branch = "release-v0.9.24"393default-features = false394395[dependencies.orml-vesting]396git = "https://github.com/uniquenetwork/open-runtime-module-library"397branch = "unique-polkadot-v0.9.24"398version = "0.4.1-dev"399default-features = false400401################################################################################402# local dependencies403404[dependencies]405log = { version = "0.4.16", default-features = false }406up-common = { path = "../../primitives/common", default-features = false }407scale-info = { version = "2.0.1", default-features = false, features = [408    "derive",409] }410derivative = "2.2.0"411pallet-unique = { path = '../../pallets/unique', default-features = false }412up-rpc = { path = "../../primitives/rpc", default-features = false }413rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }414fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }415pallet-inflation = { path = '../../pallets/inflation', default-features = false }416up-data-structs = { path = '../../primitives/data-structs', default-features = false }417pallet-common = { default-features = false, path = "../../pallets/common" }418pallet-structure = { default-features = false, path = "../../pallets/structure" }419pallet-fungible = { default-features = false, path = "../../pallets/fungible" }420pallet-refungible = { default-features = false, path = "../../pallets/refungible" }421pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }422pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }423pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }424pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }425# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }426pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.24", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }427pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }428pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }429pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }430pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }431pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }432pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }433pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }434fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }435fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }436evm-coder = { default-features = false, path = '../../crates/evm-coder' }437up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.24' }438439################################################################################440# Build Dependencies441442[build-dependencies.substrate-wasm-builder]443git = "https://github.com/paritytech/substrate"444branch = "polkadot-v0.9.24"
after · runtime/opal/Cargo.toml
1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Opal Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'opal-runtime'12repository = 'https://github.com/UniqueNetwork/unique-chain'13version = '0.9.24'1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std', 'opal-runtime']20runtime-benchmarks = [21    'hex-literal',22    'frame-benchmarking',23    'frame-support/runtime-benchmarks',24    'frame-system-benchmarking',25    'frame-system/runtime-benchmarks',26    'pallet-ethereum/runtime-benchmarks',27    'pallet-evm-migration/runtime-benchmarks',28    'pallet-evm-coder-substrate/runtime-benchmarks',29    'pallet-balances/runtime-benchmarks',30    'pallet-timestamp/runtime-benchmarks',31    'pallet-common/runtime-benchmarks',32    'pallet-structure/runtime-benchmarks',33    'pallet-fungible/runtime-benchmarks',34    'pallet-refungible/runtime-benchmarks',35    'pallet-nonfungible/runtime-benchmarks',36    'pallet-proxy-rmrk-core/runtime-benchmarks',37    'pallet-proxy-rmrk-equip/runtime-benchmarks',38    'pallet-unique/runtime-benchmarks',39    'pallet-inflation/runtime-benchmarks',40    'pallet-unique-scheduler/runtime-benchmarks',41    'pallet-xcm/runtime-benchmarks',42    'sp-runtime/runtime-benchmarks',43    'xcm-builder/runtime-benchmarks',44]45try-runtime = [46    'frame-try-runtime',47    'frame-executive/try-runtime',48    'frame-system/try-runtime',49]50std = [51    'codec/std',52    'cumulus-pallet-aura-ext/std',53    'cumulus-pallet-parachain-system/std',54    'cumulus-pallet-xcm/std',55    'cumulus-pallet-xcmp-queue/std',56    'cumulus-primitives-core/std',57    'cumulus-primitives-utility/std',58    'frame-try-runtime/std',59    'frame-executive/std',60    'frame-support/std',61    'frame-system/std',62    'frame-system-rpc-runtime-api/std',63    'pallet-aura/std',64    'pallet-balances/std',65    # 'pallet-contracts/std',66    # 'pallet-contracts-primitives/std',67    # 'pallet-contracts-rpc-runtime-api/std',68    # 'pallet-contract-helpers/std',69    'pallet-randomness-collective-flip/std',70    'pallet-sudo/std',71    'pallet-timestamp/std',72    'pallet-transaction-payment/std',73    'pallet-transaction-payment-rpc-runtime-api/std',74    'pallet-treasury/std',75    # 'pallet-vesting/std',76    'pallet-evm/std',77    'pallet-evm-migration/std',78    'pallet-evm-contract-helpers/std',79    'pallet-evm-transaction-payment/std',80    'pallet-evm-coder-substrate/std',81    'pallet-ethereum/std',82    'pallet-base-fee/std',83    'fp-rpc/std',84    'up-rpc/std',85    'fp-evm-mapping/std',86    'fp-self-contained/std',87    'parachain-info/std',88    'serde',89    'pallet-inflation/std',90    'pallet-configuration/std',91    'pallet-common/std',92    'pallet-structure/std',93    'pallet-fungible/std',94    'pallet-refungible/std',95    'pallet-nonfungible/std',96    'pallet-proxy-rmrk-core/std',97    'pallet-proxy-rmrk-equip/std',98    'pallet-unique/std',99    'pallet-unique-scheduler/std',100    'pallet-charge-transaction/std',101    'up-data-structs/std',102    'sp-api/std',103    'sp-block-builder/std',104    "sp-consensus-aura/std",105    'sp-core/std',106    'sp-inherents/std',107    'sp-io/std',108    'sp-offchain/std',109    'sp-runtime/std',110    'sp-session/std',111    'sp-std/std',112    'sp-transaction-pool/std',113    'sp-version/std',114    'xcm/std',115    'xcm-builder/std',116    'xcm-executor/std',117    'up-common/std',118    'rmrk-rpc/std',119    'evm-coder/std',120    'up-sponsorship/std',121122    "orml-vesting/std",123]124limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']125opal-runtime = ['refungible', 'scheduler', 'rmrk']126127refungible = []128scheduler = []129rmrk = []130131################################################################################132# Substrate Dependencies133134[dependencies.codec]135default-features = false136features = ['derive']137package = 'parity-scale-codec'138version = '3.1.2'139140[dependencies.frame-benchmarking]141default-features = false142git = "https://github.com/paritytech/substrate"143optional = true144branch = "polkadot-v0.9.24"145146[dependencies.frame-try-runtime]147default-features = false148git = 'https://github.com/paritytech/substrate'149optional = true150branch = 'polkadot-v0.9.24'151152[dependencies.frame-executive]153default-features = false154git = "https://github.com/paritytech/substrate"155branch = "polkadot-v0.9.24"156157[dependencies.frame-support]158default-features = false159git = "https://github.com/paritytech/substrate"160branch = "polkadot-v0.9.24"161162[dependencies.frame-system]163default-features = false164git = "https://github.com/paritytech/substrate"165branch = "polkadot-v0.9.24"166167[dependencies.frame-system-benchmarking]168default-features = false169git = "https://github.com/paritytech/substrate"170optional = true171branch = "polkadot-v0.9.24"172173[dependencies.frame-system-rpc-runtime-api]174default-features = false175git = "https://github.com/paritytech/substrate"176branch = "polkadot-v0.9.24"177178[dependencies.hex-literal]179optional = true180version = '0.3.3'181182[dependencies.serde]183default-features = false184features = ['derive']185optional = true186version = '1.0.130'187188[dependencies.pallet-aura]189default-features = false190git = "https://github.com/paritytech/substrate"191branch = "polkadot-v0.9.24"192193[dependencies.pallet-balances]194default-features = false195git = "https://github.com/paritytech/substrate"196branch = "polkadot-v0.9.24"197198# Contracts specific packages199# [dependencies.pallet-contracts]200# git = 'https://github.com/paritytech/substrate'201# default-features = false202# branch = 'master'203# version = '4.0.0-dev'204205# [dependencies.pallet-contracts-primitives]206# git = 'https://github.com/paritytech/substrate'207# default-features = false208# branch = 'master'209# version = '4.0.0-dev'210211# [dependencies.pallet-contracts-rpc-runtime-api]212# git = 'https://github.com/paritytech/substrate'213# default-features = false214# branch = 'master'215# version = '4.0.0-dev'216217[dependencies.pallet-randomness-collective-flip]218default-features = false219git = "https://github.com/paritytech/substrate"220branch = "polkadot-v0.9.24"221222[dependencies.pallet-sudo]223default-features = false224git = "https://github.com/paritytech/substrate"225branch = "polkadot-v0.9.24"226227[dependencies.pallet-timestamp]228default-features = false229git = "https://github.com/paritytech/substrate"230branch = "polkadot-v0.9.24"231232[dependencies.pallet-transaction-payment]233default-features = false234git = "https://github.com/paritytech/substrate"235branch = "polkadot-v0.9.24"236237[dependencies.pallet-transaction-payment-rpc-runtime-api]238default-features = false239git = "https://github.com/paritytech/substrate"240branch = "polkadot-v0.9.24"241242[dependencies.pallet-treasury]243default-features = false244git = "https://github.com/paritytech/substrate"245branch = "polkadot-v0.9.24"246247# [dependencies.pallet-vesting]248# default-features = false249# git = 'https://github.com/paritytech/substrate'250# branch = 'master'251252[dependencies.sp-arithmetic]253default-features = false254git = "https://github.com/paritytech/substrate"255branch = "polkadot-v0.9.24"256257[dependencies.sp-api]258default-features = false259git = "https://github.com/paritytech/substrate"260branch = "polkadot-v0.9.24"261262[dependencies.sp-block-builder]263default-features = false264git = "https://github.com/paritytech/substrate"265branch = "polkadot-v0.9.24"266267[dependencies.sp-core]268default-features = false269git = "https://github.com/paritytech/substrate"270branch = "polkadot-v0.9.24"271272[dependencies.sp-consensus-aura]273default-features = false274git = "https://github.com/paritytech/substrate"275branch = "polkadot-v0.9.24"276277[dependencies.sp-inherents]278default-features = false279git = "https://github.com/paritytech/substrate"280branch = "polkadot-v0.9.24"281282[dependencies.sp-io]283default-features = false284git = "https://github.com/paritytech/substrate"285branch = "polkadot-v0.9.24"286287[dependencies.sp-offchain]288default-features = false289git = "https://github.com/paritytech/substrate"290branch = "polkadot-v0.9.24"291292[dependencies.sp-runtime]293default-features = false294git = "https://github.com/paritytech/substrate"295branch = "polkadot-v0.9.24"296297[dependencies.sp-session]298default-features = false299git = "https://github.com/paritytech/substrate"300branch = "polkadot-v0.9.24"301302[dependencies.sp-std]303default-features = false304git = "https://github.com/paritytech/substrate"305branch = "polkadot-v0.9.24"306307[dependencies.sp-transaction-pool]308default-features = false309git = "https://github.com/paritytech/substrate"310branch = "polkadot-v0.9.24"311312[dependencies.sp-version]313default-features = false314git = "https://github.com/paritytech/substrate"315branch = "polkadot-v0.9.24"316317[dependencies.smallvec]318version = '1.6.1'319320################################################################################321# Cumulus dependencies322323[dependencies.parachain-info]324default-features = false325git = "https://github.com/paritytech/cumulus"326branch = "polkadot-v0.9.24"327328[dependencies.cumulus-pallet-aura-ext]329git = "https://github.com/paritytech/cumulus"330branch = "polkadot-v0.9.24"331default-features = false332333[dependencies.cumulus-pallet-parachain-system]334git = "https://github.com/paritytech/cumulus"335branch = "polkadot-v0.9.24"336default-features = false337338[dependencies.cumulus-primitives-core]339git = "https://github.com/paritytech/cumulus"340branch = "polkadot-v0.9.24"341default-features = false342343[dependencies.cumulus-pallet-xcm]344git = "https://github.com/paritytech/cumulus"345branch = "polkadot-v0.9.24"346default-features = false347348[dependencies.cumulus-pallet-dmp-queue]349git = "https://github.com/paritytech/cumulus"350branch = "polkadot-v0.9.24"351default-features = false352353[dependencies.cumulus-pallet-xcmp-queue]354git = "https://github.com/paritytech/cumulus"355branch = "polkadot-v0.9.24"356default-features = false357358[dependencies.cumulus-primitives-utility]359git = "https://github.com/paritytech/cumulus"360branch = "polkadot-v0.9.24"361default-features = false362363[dependencies.cumulus-primitives-timestamp]364git = "https://github.com/paritytech/cumulus"365branch = "polkadot-v0.9.24"366default-features = false367368################################################################################369# Polkadot dependencies370371[dependencies.polkadot-parachain]372git = "https://github.com/paritytech/polkadot"373branch = "release-v0.9.24"374default-features = false375376[dependencies.xcm]377git = "https://github.com/paritytech/polkadot"378branch = "release-v0.9.24"379default-features = false380381[dependencies.xcm-builder]382git = "https://github.com/paritytech/polkadot"383branch = "release-v0.9.24"384default-features = false385386[dependencies.xcm-executor]387git = "https://github.com/paritytech/polkadot"388branch = "release-v0.9.24"389default-features = false390391[dependencies.pallet-xcm]392git = "https://github.com/paritytech/polkadot"393branch = "release-v0.9.24"394default-features = false395396[dependencies.orml-vesting]397git = "https://github.com/uniquenetwork/open-runtime-module-library"398branch = "unique-polkadot-v0.9.24"399version = "0.4.1-dev"400default-features = false401402################################################################################403# local dependencies404405[dependencies]406log = { version = "0.4.16", default-features = false }407up-common = { path = "../../primitives/common", default-features = false }408scale-info = { version = "2.0.1", default-features = false, features = [409    "derive",410] }411derivative = "2.2.0"412pallet-unique = { path = '../../pallets/unique', default-features = false }413up-rpc = { path = "../../primitives/rpc", default-features = false }414rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }415fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }416pallet-inflation = { path = '../../pallets/inflation', default-features = false }417up-data-structs = { path = '../../primitives/data-structs', default-features = false }418pallet-configuration = { default-features = false, path = "../../pallets/configuration" }419pallet-common = { default-features = false, path = "../../pallets/common" }420pallet-structure = { default-features = false, path = "../../pallets/structure" }421pallet-fungible = { default-features = false, path = "../../pallets/fungible" }422pallet-refungible = { default-features = false, path = "../../pallets/refungible" }423pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }424pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }425pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }426pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }427# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }428pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.24", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }429pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }430pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }431pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }432pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }433pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }434pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }435pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }436fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }437fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }438evm-coder = { default-features = false, path = '../../crates/evm-coder' }439up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.24' }440441################################################################################442# Build Dependencies443444[build-dependencies.substrate-wasm-builder]445git = "https://github.com/paritytech/substrate"446branch = "polkadot-v0.9.24"
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -87,6 +87,7 @@
     'parachain-info/std',
     'serde',
     'pallet-inflation/std',
+    'pallet-configuration/std',
     'pallet-common/std',
     'pallet-structure/std',
     'pallet-fungible/std',
@@ -418,6 +419,7 @@
 fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }
 pallet-inflation = { path = '../../pallets/inflation', default-features = false }
 up-data-structs = { path = '../../primitives/data-structs', default-features = false }
+pallet-configuration = { default-features = false, path = "../../pallets/configuration" }
 pallet-common = { default-features = false, path = "../../pallets/common" }
 pallet-structure = { default-features = false, path = "../../pallets/structure" }
 pallet-fungible = { default-features = false, path = "../../pallets/fungible" }
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -88,6 +88,7 @@
     'parachain-info/std',
     'serde',
     'pallet-inflation/std',
+    'pallet-configuration/std',
     'pallet-common/std',
     'pallet-structure/std',
     'pallet-fungible/std',
@@ -411,6 +412,7 @@
 rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }
 pallet-inflation = { path = '../../pallets/inflation', default-features = false }
 up-data-structs = { path = '../../primitives/data-structs', default-features = false }
+pallet-configuration = { default-features = false, path = "../../pallets/configuration" }
 pallet-common = { default-features = false, path = "../../pallets/common" }
 pallet-structure = { default-features = false, path = "../../pallets/structure" }
 pallet-fungible = { default-features = false, path = "../../pallets/fungible" }