difftreelog
feat use pallet-configuration
in: master
11 files changed
pallets/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",
+]
pallets/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),
+ )
+ }
+}
primitives/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.
runtime/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>;
runtime/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 }>;
+}
runtime/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 = ();
}
runtime/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>;
}
runtime/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,
runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/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',
@@ -414,6 +415,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" }
runtime/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" }
runtime/unique/Cargo.tomldiffbeforeafterboth1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Unique Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'unique-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', 'unique-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 'up-data-structs/runtime-benchmarks',45]46try-runtime = [47 'frame-try-runtime',48 'frame-executive/try-runtime',49 'frame-system/try-runtime',50]51std = [52 'codec/std',53 'cumulus-pallet-aura-ext/std',54 'cumulus-pallet-parachain-system/std',55 'cumulus-pallet-xcm/std',56 'cumulus-pallet-xcmp-queue/std',57 'cumulus-primitives-core/std',58 'cumulus-primitives-utility/std',59 'frame-try-runtime/std',60 'frame-executive/std',61 'frame-support/std',62 'frame-system/std',63 'frame-system-rpc-runtime-api/std',64 'pallet-aura/std',65 'pallet-balances/std',66 # 'pallet-contracts/std',67 # 'pallet-contracts-primitives/std',68 # 'pallet-contracts-rpc-runtime-api/std',69 # 'pallet-contract-helpers/std',70 'pallet-randomness-collective-flip/std',71 'pallet-sudo/std',72 'pallet-timestamp/std',73 'pallet-transaction-payment/std',74 'pallet-transaction-payment-rpc-runtime-api/std',75 'pallet-treasury/std',76 # 'pallet-vesting/std',77 'pallet-evm/std',78 'pallet-evm-migration/std',79 'pallet-evm-contract-helpers/std',80 'pallet-evm-transaction-payment/std',81 'pallet-evm-coder-substrate/std',82 'pallet-ethereum/std',83 'pallet-base-fee/std',84 'fp-rpc/std',85 'up-rpc/std',86 'fp-evm-mapping/std',87 'fp-self-contained/std',88 'parachain-info/std',89 'serde',90 'pallet-inflation/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',118119 "orml-vesting/std",120]121limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']122unique-runtime = []123124refungible = []125scheduler = []126rmrk = []127128################################################################################129# Substrate Dependencies130131[dependencies.codec]132default-features = false133features = ['derive']134package = 'parity-scale-codec'135version = '3.1.2'136137[dependencies.frame-benchmarking]138default-features = false139git = "https://github.com/paritytech/substrate"140optional = true141branch = "polkadot-v0.9.24"142143[dependencies.frame-try-runtime]144default-features = false145git = 'https://github.com/paritytech/substrate'146optional = true147branch = 'polkadot-v0.9.24'148149[dependencies.frame-executive]150default-features = false151git = "https://github.com/paritytech/substrate"152branch = "polkadot-v0.9.24"153154[dependencies.frame-support]155default-features = false156git = "https://github.com/paritytech/substrate"157branch = "polkadot-v0.9.24"158159[dependencies.frame-system]160default-features = false161git = "https://github.com/paritytech/substrate"162branch = "polkadot-v0.9.24"163164[dependencies.frame-system-benchmarking]165default-features = false166git = "https://github.com/paritytech/substrate"167optional = true168branch = "polkadot-v0.9.24"169170[dependencies.frame-system-rpc-runtime-api]171default-features = false172git = "https://github.com/paritytech/substrate"173branch = "polkadot-v0.9.24"174175[dependencies.hex-literal]176optional = true177version = '0.3.3'178179[dependencies.serde]180default-features = false181features = ['derive']182optional = true183version = '1.0.130'184185[dependencies.pallet-aura]186default-features = false187git = "https://github.com/paritytech/substrate"188branch = "polkadot-v0.9.24"189190[dependencies.pallet-balances]191default-features = false192git = "https://github.com/paritytech/substrate"193branch = "polkadot-v0.9.24"194195# Contracts specific packages196# [dependencies.pallet-contracts]197# git = 'https://github.com/paritytech/substrate'198# default-features = false199# branch = 'master'200# version = '4.0.0-dev'201202# [dependencies.pallet-contracts-primitives]203# git = 'https://github.com/paritytech/substrate'204# default-features = false205# branch = 'master'206# version = '4.0.0-dev'207208# [dependencies.pallet-contracts-rpc-runtime-api]209# git = 'https://github.com/paritytech/substrate'210# default-features = false211# branch = 'master'212# version = '4.0.0-dev'213214[dependencies.pallet-randomness-collective-flip]215default-features = false216git = "https://github.com/paritytech/substrate"217branch = "polkadot-v0.9.24"218219[dependencies.pallet-sudo]220default-features = false221git = "https://github.com/paritytech/substrate"222branch = "polkadot-v0.9.24"223224[dependencies.pallet-timestamp]225default-features = false226git = "https://github.com/paritytech/substrate"227branch = "polkadot-v0.9.24"228229[dependencies.pallet-transaction-payment]230default-features = false231git = "https://github.com/paritytech/substrate"232branch = "polkadot-v0.9.24"233234[dependencies.pallet-transaction-payment-rpc-runtime-api]235default-features = false236git = "https://github.com/paritytech/substrate"237branch = "polkadot-v0.9.24"238239[dependencies.pallet-treasury]240default-features = false241git = "https://github.com/paritytech/substrate"242branch = "polkadot-v0.9.24"243244# [dependencies.pallet-vesting]245# default-features = false246# git = 'https://github.com/paritytech/substrate'247# branch = 'master'248249[dependencies.sp-arithmetic]250default-features = false251git = "https://github.com/paritytech/substrate"252branch = "polkadot-v0.9.24"253254[dependencies.sp-api]255default-features = false256git = "https://github.com/paritytech/substrate"257branch = "polkadot-v0.9.24"258259[dependencies.sp-block-builder]260default-features = false261git = "https://github.com/paritytech/substrate"262branch = "polkadot-v0.9.24"263264[dependencies.sp-core]265default-features = false266git = "https://github.com/paritytech/substrate"267branch = "polkadot-v0.9.24"268269[dependencies.sp-consensus-aura]270default-features = false271git = "https://github.com/paritytech/substrate"272branch = "polkadot-v0.9.24"273274[dependencies.sp-inherents]275default-features = false276git = "https://github.com/paritytech/substrate"277branch = "polkadot-v0.9.24"278279[dependencies.sp-io]280default-features = false281git = "https://github.com/paritytech/substrate"282branch = "polkadot-v0.9.24"283284[dependencies.sp-offchain]285default-features = false286git = "https://github.com/paritytech/substrate"287branch = "polkadot-v0.9.24"288289[dependencies.sp-runtime]290default-features = false291git = "https://github.com/paritytech/substrate"292branch = "polkadot-v0.9.24"293294[dependencies.sp-session]295default-features = false296git = "https://github.com/paritytech/substrate"297branch = "polkadot-v0.9.24"298299[dependencies.sp-std]300default-features = false301git = "https://github.com/paritytech/substrate"302branch = "polkadot-v0.9.24"303304[dependencies.sp-transaction-pool]305default-features = false306git = "https://github.com/paritytech/substrate"307branch = "polkadot-v0.9.24"308309[dependencies.sp-version]310default-features = false311git = "https://github.com/paritytech/substrate"312branch = "polkadot-v0.9.24"313314[dependencies.smallvec]315version = '1.6.1'316317################################################################################318# Cumulus dependencies319320[dependencies.parachain-info]321default-features = false322git = "https://github.com/paritytech/cumulus"323branch = "polkadot-v0.9.24"324325[dependencies.cumulus-pallet-aura-ext]326git = "https://github.com/paritytech/cumulus"327branch = "polkadot-v0.9.24"328default-features = false329330[dependencies.cumulus-pallet-parachain-system]331git = "https://github.com/paritytech/cumulus"332branch = "polkadot-v0.9.24"333default-features = false334335[dependencies.cumulus-primitives-core]336git = "https://github.com/paritytech/cumulus"337branch = "polkadot-v0.9.24"338default-features = false339340[dependencies.cumulus-pallet-xcm]341git = "https://github.com/paritytech/cumulus"342branch = "polkadot-v0.9.24"343default-features = false344345[dependencies.cumulus-pallet-dmp-queue]346git = "https://github.com/paritytech/cumulus"347branch = "polkadot-v0.9.24"348default-features = false349350[dependencies.cumulus-pallet-xcmp-queue]351git = "https://github.com/paritytech/cumulus"352branch = "polkadot-v0.9.24"353default-features = false354355[dependencies.cumulus-primitives-utility]356git = "https://github.com/paritytech/cumulus"357branch = "polkadot-v0.9.24"358default-features = false359360[dependencies.cumulus-primitives-timestamp]361git = "https://github.com/paritytech/cumulus"362branch = "polkadot-v0.9.24"363default-features = false364365################################################################################366# Polkadot dependencies367368[dependencies.polkadot-parachain]369git = "https://github.com/paritytech/polkadot"370branch = "release-v0.9.24"371default-features = false372373[dependencies.xcm]374git = "https://github.com/paritytech/polkadot"375branch = "release-v0.9.24"376default-features = false377378[dependencies.xcm-builder]379git = "https://github.com/paritytech/polkadot"380branch = "release-v0.9.24"381default-features = false382383[dependencies.xcm-executor]384git = "https://github.com/paritytech/polkadot"385branch = "release-v0.9.24"386default-features = false387388[dependencies.pallet-xcm]389git = "https://github.com/paritytech/polkadot"390branch = "release-v0.9.24"391default-features = false392393[dependencies.orml-vesting]394git = "https://github.com/uniquenetwork/open-runtime-module-library"395branch = "unique-polkadot-v0.9.24"396version = "0.4.1-dev"397default-features = false398399################################################################################400# local dependencies401402[dependencies]403log = { version = "0.4.16", default-features = false }404up-common = { path = "../../primitives/common", default-features = false }405scale-info = { version = "2.0.1", default-features = false, features = [406 "derive",407] }408derivative = "2.2.0"409pallet-unique = { path = '../../pallets/unique', default-features = false }410up-rpc = { path = "../../primitives/rpc", default-features = false }411rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }412pallet-inflation = { path = '../../pallets/inflation', default-features = false }413up-data-structs = { path = '../../primitives/data-structs', default-features = false }414pallet-common = { default-features = false, path = "../../pallets/common" }415pallet-structure = { default-features = false, path = "../../pallets/structure" }416pallet-fungible = { default-features = false, path = "../../pallets/fungible" }417pallet-refungible = { default-features = false, path = "../../pallets/refungible" }418pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }419pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }420pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }421pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }422# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }423pallet-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" }424pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }425pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }426pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }427pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }428pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }429pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }430pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }431fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }432fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }433fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }434evm-coder = { default-features = false, path = '../../crates/evm-coder' }435up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.24' }436437################################################################################438# Build Dependencies439440[build-dependencies.substrate-wasm-builder]441git = "https://github.com/paritytech/substrate"442branch = "polkadot-v0.9.24"1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Unique Runtime'8edition = '2021'9homepage = 'https://unique.network'10license = 'GPLv3'11name = 'unique-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', 'unique-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 'up-data-structs/runtime-benchmarks',45]46try-runtime = [47 'frame-try-runtime',48 'frame-executive/try-runtime',49 'frame-system/try-runtime',50]51std = [52 'codec/std',53 'cumulus-pallet-aura-ext/std',54 'cumulus-pallet-parachain-system/std',55 'cumulus-pallet-xcm/std',56 'cumulus-pallet-xcmp-queue/std',57 'cumulus-primitives-core/std',58 'cumulus-primitives-utility/std',59 'frame-try-runtime/std',60 'frame-executive/std',61 'frame-support/std',62 'frame-system/std',63 'frame-system-rpc-runtime-api/std',64 'pallet-aura/std',65 'pallet-balances/std',66 # 'pallet-contracts/std',67 # 'pallet-contracts-primitives/std',68 # 'pallet-contracts-rpc-runtime-api/std',69 # 'pallet-contract-helpers/std',70 'pallet-randomness-collective-flip/std',71 'pallet-sudo/std',72 'pallet-timestamp/std',73 'pallet-transaction-payment/std',74 'pallet-transaction-payment-rpc-runtime-api/std',75 'pallet-treasury/std',76 # 'pallet-vesting/std',77 'pallet-evm/std',78 'pallet-evm-migration/std',79 'pallet-evm-contract-helpers/std',80 'pallet-evm-transaction-payment/std',81 'pallet-evm-coder-substrate/std',82 'pallet-ethereum/std',83 'pallet-base-fee/std',84 'fp-rpc/std',85 'up-rpc/std',86 'fp-evm-mapping/std',87 'fp-self-contained/std',88 'parachain-info/std',89 'serde',90 'pallet-inflation/std',91 'pallet-configuration/std',92 'pallet-common/std',93 'pallet-structure/std',94 'pallet-fungible/std',95 'pallet-refungible/std',96 'pallet-nonfungible/std',97 'pallet-proxy-rmrk-core/std',98 'pallet-proxy-rmrk-equip/std',99 'pallet-unique/std',100 'pallet-unique-scheduler/std',101 'pallet-charge-transaction/std',102 'up-data-structs/std',103 'sp-api/std',104 'sp-block-builder/std',105 "sp-consensus-aura/std",106 'sp-core/std',107 'sp-inherents/std',108 'sp-io/std',109 'sp-offchain/std',110 'sp-runtime/std',111 'sp-session/std',112 'sp-std/std',113 'sp-transaction-pool/std',114 'sp-version/std',115 'xcm/std',116 'xcm-builder/std',117 'xcm-executor/std',118 'up-common/std',119120 "orml-vesting/std",121]122limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']123unique-runtime = []124125refungible = []126scheduler = []127rmrk = []128129################################################################################130# Substrate Dependencies131132[dependencies.codec]133default-features = false134features = ['derive']135package = 'parity-scale-codec'136version = '3.1.2'137138[dependencies.frame-benchmarking]139default-features = false140git = "https://github.com/paritytech/substrate"141optional = true142branch = "polkadot-v0.9.24"143144[dependencies.frame-try-runtime]145default-features = false146git = 'https://github.com/paritytech/substrate'147optional = true148branch = 'polkadot-v0.9.24'149150[dependencies.frame-executive]151default-features = false152git = "https://github.com/paritytech/substrate"153branch = "polkadot-v0.9.24"154155[dependencies.frame-support]156default-features = false157git = "https://github.com/paritytech/substrate"158branch = "polkadot-v0.9.24"159160[dependencies.frame-system]161default-features = false162git = "https://github.com/paritytech/substrate"163branch = "polkadot-v0.9.24"164165[dependencies.frame-system-benchmarking]166default-features = false167git = "https://github.com/paritytech/substrate"168optional = true169branch = "polkadot-v0.9.24"170171[dependencies.frame-system-rpc-runtime-api]172default-features = false173git = "https://github.com/paritytech/substrate"174branch = "polkadot-v0.9.24"175176[dependencies.hex-literal]177optional = true178version = '0.3.3'179180[dependencies.serde]181default-features = false182features = ['derive']183optional = true184version = '1.0.130'185186[dependencies.pallet-aura]187default-features = false188git = "https://github.com/paritytech/substrate"189branch = "polkadot-v0.9.24"190191[dependencies.pallet-balances]192default-features = false193git = "https://github.com/paritytech/substrate"194branch = "polkadot-v0.9.24"195196# Contracts specific packages197# [dependencies.pallet-contracts]198# git = 'https://github.com/paritytech/substrate'199# default-features = false200# branch = 'master'201# version = '4.0.0-dev'202203# [dependencies.pallet-contracts-primitives]204# git = 'https://github.com/paritytech/substrate'205# default-features = false206# branch = 'master'207# version = '4.0.0-dev'208209# [dependencies.pallet-contracts-rpc-runtime-api]210# git = 'https://github.com/paritytech/substrate'211# default-features = false212# branch = 'master'213# version = '4.0.0-dev'214215[dependencies.pallet-randomness-collective-flip]216default-features = false217git = "https://github.com/paritytech/substrate"218branch = "polkadot-v0.9.24"219220[dependencies.pallet-sudo]221default-features = false222git = "https://github.com/paritytech/substrate"223branch = "polkadot-v0.9.24"224225[dependencies.pallet-timestamp]226default-features = false227git = "https://github.com/paritytech/substrate"228branch = "polkadot-v0.9.24"229230[dependencies.pallet-transaction-payment]231default-features = false232git = "https://github.com/paritytech/substrate"233branch = "polkadot-v0.9.24"234235[dependencies.pallet-transaction-payment-rpc-runtime-api]236default-features = false237git = "https://github.com/paritytech/substrate"238branch = "polkadot-v0.9.24"239240[dependencies.pallet-treasury]241default-features = false242git = "https://github.com/paritytech/substrate"243branch = "polkadot-v0.9.24"244245# [dependencies.pallet-vesting]246# default-features = false247# git = 'https://github.com/paritytech/substrate'248# branch = 'master'249250[dependencies.sp-arithmetic]251default-features = false252git = "https://github.com/paritytech/substrate"253branch = "polkadot-v0.9.24"254255[dependencies.sp-api]256default-features = false257git = "https://github.com/paritytech/substrate"258branch = "polkadot-v0.9.24"259260[dependencies.sp-block-builder]261default-features = false262git = "https://github.com/paritytech/substrate"263branch = "polkadot-v0.9.24"264265[dependencies.sp-core]266default-features = false267git = "https://github.com/paritytech/substrate"268branch = "polkadot-v0.9.24"269270[dependencies.sp-consensus-aura]271default-features = false272git = "https://github.com/paritytech/substrate"273branch = "polkadot-v0.9.24"274275[dependencies.sp-inherents]276default-features = false277git = "https://github.com/paritytech/substrate"278branch = "polkadot-v0.9.24"279280[dependencies.sp-io]281default-features = false282git = "https://github.com/paritytech/substrate"283branch = "polkadot-v0.9.24"284285[dependencies.sp-offchain]286default-features = false287git = "https://github.com/paritytech/substrate"288branch = "polkadot-v0.9.24"289290[dependencies.sp-runtime]291default-features = false292git = "https://github.com/paritytech/substrate"293branch = "polkadot-v0.9.24"294295[dependencies.sp-session]296default-features = false297git = "https://github.com/paritytech/substrate"298branch = "polkadot-v0.9.24"299300[dependencies.sp-std]301default-features = false302git = "https://github.com/paritytech/substrate"303branch = "polkadot-v0.9.24"304305[dependencies.sp-transaction-pool]306default-features = false307git = "https://github.com/paritytech/substrate"308branch = "polkadot-v0.9.24"309310[dependencies.sp-version]311default-features = false312git = "https://github.com/paritytech/substrate"313branch = "polkadot-v0.9.24"314315[dependencies.smallvec]316version = '1.6.1'317318################################################################################319# Cumulus dependencies320321[dependencies.parachain-info]322default-features = false323git = "https://github.com/paritytech/cumulus"324branch = "polkadot-v0.9.24"325326[dependencies.cumulus-pallet-aura-ext]327git = "https://github.com/paritytech/cumulus"328branch = "polkadot-v0.9.24"329default-features = false330331[dependencies.cumulus-pallet-parachain-system]332git = "https://github.com/paritytech/cumulus"333branch = "polkadot-v0.9.24"334default-features = false335336[dependencies.cumulus-primitives-core]337git = "https://github.com/paritytech/cumulus"338branch = "polkadot-v0.9.24"339default-features = false340341[dependencies.cumulus-pallet-xcm]342git = "https://github.com/paritytech/cumulus"343branch = "polkadot-v0.9.24"344default-features = false345346[dependencies.cumulus-pallet-dmp-queue]347git = "https://github.com/paritytech/cumulus"348branch = "polkadot-v0.9.24"349default-features = false350351[dependencies.cumulus-pallet-xcmp-queue]352git = "https://github.com/paritytech/cumulus"353branch = "polkadot-v0.9.24"354default-features = false355356[dependencies.cumulus-primitives-utility]357git = "https://github.com/paritytech/cumulus"358branch = "polkadot-v0.9.24"359default-features = false360361[dependencies.cumulus-primitives-timestamp]362git = "https://github.com/paritytech/cumulus"363branch = "polkadot-v0.9.24"364default-features = false365366################################################################################367# Polkadot dependencies368369[dependencies.polkadot-parachain]370git = "https://github.com/paritytech/polkadot"371branch = "release-v0.9.24"372default-features = false373374[dependencies.xcm]375git = "https://github.com/paritytech/polkadot"376branch = "release-v0.9.24"377default-features = false378379[dependencies.xcm-builder]380git = "https://github.com/paritytech/polkadot"381branch = "release-v0.9.24"382default-features = false383384[dependencies.xcm-executor]385git = "https://github.com/paritytech/polkadot"386branch = "release-v0.9.24"387default-features = false388389[dependencies.pallet-xcm]390git = "https://github.com/paritytech/polkadot"391branch = "release-v0.9.24"392default-features = false393394[dependencies.orml-vesting]395git = "https://github.com/uniquenetwork/open-runtime-module-library"396branch = "unique-polkadot-v0.9.24"397version = "0.4.1-dev"398default-features = false399400################################################################################401# local dependencies402403[dependencies]404log = { version = "0.4.16", default-features = false }405up-common = { path = "../../primitives/common", default-features = false }406scale-info = { version = "2.0.1", default-features = false, features = [407 "derive",408] }409derivative = "2.2.0"410pallet-unique = { path = '../../pallets/unique', default-features = false }411up-rpc = { path = "../../primitives/rpc", default-features = false }412rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }413pallet-inflation = { path = '../../pallets/inflation', default-features = false }414up-data-structs = { path = '../../primitives/data-structs', default-features = false }415pallet-configuration = { default-features = false, path = "../../pallets/configuration" }416pallet-common = { default-features = false, path = "../../pallets/common" }417pallet-structure = { default-features = false, path = "../../pallets/structure" }418pallet-fungible = { default-features = false, path = "../../pallets/fungible" }419pallet-refungible = { default-features = false, path = "../../pallets/refungible" }420pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }421pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }422pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }423pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }424# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }425pallet-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" }426pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }427pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }428pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }429pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }430pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }431pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }432pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }433fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }434fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.24" }435fp-evm-mapping = { 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"