difftreelog
feat preimage + execute preimage in maintenance pallet
in: master
13 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5541,6 +5541,7 @@
"pallet-inflation",
"pallet-maintenance",
"pallet-nonfungible",
+ "pallet-preimage",
"pallet-randomness-collective-flip",
"pallet-refungible",
"pallet-session",
@@ -6480,6 +6481,7 @@
"frame-system",
"parity-scale-codec",
"scale-info",
+ "sp-core",
"sp-std",
]
@@ -8968,6 +8970,7 @@
"pallet-inflation",
"pallet-maintenance",
"pallet-nonfungible",
+ "pallet-preimage",
"pallet-randomness-collective-flip",
"pallet-refungible",
"pallet-session",
@@ -13198,6 +13201,7 @@
"pallet-inflation",
"pallet-maintenance",
"pallet-nonfungible",
+ "pallet-preimage",
"pallet-randomness-collective-flip",
"pallet-refungible",
"pallet-session",
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -98,6 +98,7 @@
pallet-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
+pallet-preimage = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
pallets/maintenance/Cargo.tomldiffbeforeafterboth--- a/pallets/maintenance/Cargo.toml
+++ b/pallets/maintenance/Cargo.toml
@@ -18,10 +18,11 @@
frame-benchmarking = { workspace = true, optional = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
+sp-core = { workspace = true }
sp-std = { workspace = true }
[features]
default = ["std"]
runtime-benchmarks = ["frame-benchmarking", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks"]
-std = ["codec/std", "frame-benchmarking/std", "frame-support/std", "frame-system/std", "scale-info/std", "sp-std/std"]
+std = ["codec/std", "frame-benchmarking/std", "frame-support/std", "frame-system/std", "scale-info/std", "sp-core/std", "sp-std/std"]
try-runtime = ["frame-support/try-runtime"]
pallets/maintenance/src/lib.rsdiffbeforeafterboth--- a/pallets/maintenance/src/lib.rs
+++ b/pallets/maintenance/src/lib.rs
@@ -25,13 +25,37 @@
#[frame_support::pallet]
pub mod pallet {
- use frame_support::pallet_prelude::*;
+ use frame_support::{
+ dispatch::*,
+ pallet_prelude::*,
+ traits::{QueryPreimage, StorePreimage},
+ };
use frame_system::pallet_prelude::*;
+ use sp_core::H256;
+
use crate::weights::WeightInfo;
#[pallet::config]
pub trait Config: frame_system::Config {
+ /// The overarching event type.
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
+
+ /// The runtime origin type.
+ type RuntimeOrigin: From<RawOrigin<Self::AccountId>>
+ + IsType<<Self as frame_system::Config>::RuntimeOrigin>;
+
+ /// The aggregated call type.
+ type RuntimeCall: Parameter
+ + Dispatchable<
+ RuntimeOrigin = <Self as Config>::RuntimeOrigin,
+ PostInfo = PostDispatchInfo,
+ > + GetDispatchInfo
+ + From<frame_system::Call<Self>>;
+
+ /// The preimage provider with which we look up call hashes to get the call.
+ type Preimages: QueryPreimage + StorePreimage;
+
+ /// Weight information for extrinsics in this pallet.
type WeightInfo: WeightInfo;
}
@@ -78,5 +102,23 @@
Ok(())
}
+
+ #[pallet::call_index(2)]
+ #[pallet::weight(<T as Config>::WeightInfo::execute_preimage())]
+ pub fn execute_preimage(origin: OriginFor<T>, hash: H256) -> DispatchResult {
+ ensure_root(origin)?;
+
+ let len = T::Preimages::len(&hash).ok_or(DispatchError::Unavailable)?;
+ let bounded = T::Preimages::pick::<<T as Config>::RuntimeCall>(hash, len);
+ let (call, _) =
+ T::Preimages::realize(&bounded).map_err(|_| DispatchError::Unavailable)?;
+
+ let result = match call.dispatch(frame_system::RawOrigin::Root.into()) {
+ Ok(_) => Ok(()),
+ Err(error_and_info) => Err(error_and_info.error),
+ };
+
+ result
+ }
}
}
pallets/scheduler-v2/Cargo.tomldiffbeforeafterboth--- a/pallets/scheduler-v2/Cargo.toml
+++ b/pallets/scheduler-v2/Cargo.toml
@@ -24,7 +24,7 @@
sp-std = { workspace = true }
[dev-dependencies]
-pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
+pallet-preimage = { workspace = true }
substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
[features]
runtime/common/config/pallets/governance.rsdiffbeforeafterboth--- /dev/null
+++ b/runtime/common/config/pallets/governance.rs
@@ -0,0 +1,34 @@
+// 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/>.
+
+use frame_support::parameter_types;
+use frame_system::EnsureRoot;
+use crate::{AccountId, Balance, Balances, Runtime, RuntimeEvent};
+use up_common::constants::*;
+
+parameter_types! {
+ pub PreimageBaseDeposit: Balance = 1000 * UNIQUE; // deposit(2, 64);
+ // pub PreimageByteDeposit: Balance = 1 * CENTIUNIQUE; // deposit(0, 1);
+}
+
+impl pallet_preimage::Config for Runtime {
+ type WeightInfo = pallet_preimage::weights::SubstrateWeight<Runtime>;
+ type RuntimeEvent = RuntimeEvent;
+ type Currency = Balances;
+ type ManagerOrigin = EnsureRoot<AccountId>;
+ type BaseDeposit = PreimageBaseDeposit;
+ type ByteDeposit = TransactionByteFee;
+}
runtime/common/config/pallets/mod.rsdiffbeforeafterboth--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -23,7 +23,7 @@
weights::CommonWeights,
RelayChainBlockNumberProvider,
},
- Runtime, RuntimeEvent, RuntimeCall, Balances,
+ Runtime, RuntimeEvent, RuntimeCall, RuntimeOrigin, Balances, Preimage,
};
use frame_support::traits::{ConstU32, ConstU64};
use up_common::{
@@ -47,6 +47,10 @@
#[cfg(feature = "collator-selection")]
pub mod collator_selection;
+// todo:governance replace the feature with governance
+#[cfg(feature = "collator-selection")]
+pub mod governance;
+
parameter_types! {
pub TreasuryAccountId: AccountId = TreasuryModuleId::get().into_account_truncating();
pub const CollectionCreationPrice: Balance = 2 * UNIQUE;
@@ -123,5 +127,8 @@
impl pallet_maintenance::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
+ type RuntimeOrigin = RuntimeOrigin;
+ type RuntimeCall = RuntimeCall;
+ type Preimages = Preimage;
type WeightInfo = pallet_maintenance::weights::SubstrateWeight<Self>;
}
runtime/common/construct_runtime.rsdiffbeforeafterboth--- a/runtime/common/construct_runtime.rs
+++ b/runtime/common/construct_runtime.rs
@@ -56,6 +56,10 @@
#[cfg(feature = "collator-selection")]
Identity: pallet_identity::{Pallet, Call, Storage, Event<T>} = 40,
+ // todo:governance switch feature to governance
+ #[cfg(feature = "collator-selection")]
+ Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 41,
+
// XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50,
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin} = 51,
runtime/common/maintenance.rsdiffbeforeafterboth--- a/runtime/common/maintenance.rs
+++ b/runtime/common/maintenance.rs
@@ -86,6 +86,10 @@
| RuntimeCall::Session(_)
| RuntimeCall::Identity(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
+ // todo:governance switch the feature to governance
+ #[cfg(feature = "collator-selection")]
+ RuntimeCall::Preimage(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
+
#[cfg(feature = "pallet-test-utils")]
RuntimeCall::TestUtils(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
runtime/common/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -565,6 +565,10 @@
#[cfg(feature = "collator-selection")]
list_benchmark!(list, extra, pallet_identity, Identity);
+ // todo:governance switch feature to governance
+ #[cfg(feature = "collator-selection")]
+ list_benchmark!(list, extra, pallet_preimage, Preimage);
+
#[cfg(feature = "foreign-assets")]
list_benchmark!(list, extra, pallet_foreign_assets, ForeignAssets);
@@ -629,6 +633,10 @@
#[cfg(feature = "collator-selection")]
add_benchmark!(params, batches, pallet_identity, Identity);
+ // todo:governance switch feature to governance
+ #[cfg(feature = "collator-selection")]
+ add_benchmark!(params, batches, pallet_preimage, Preimage);
+
#[cfg(feature = "foreign-assets")]
add_benchmark!(params, batches, pallet_foreign_assets, ForeignAssets);
runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -41,6 +41,7 @@
'pallet-inflation/runtime-benchmarks',
'pallet-maintenance/runtime-benchmarks',
'pallet-nonfungible/runtime-benchmarks',
+ "pallet-preimage/runtime-benchmarks",
'pallet-refungible/runtime-benchmarks',
'pallet-structure/runtime-benchmarks',
'pallet-timestamp/runtime-benchmarks',
@@ -69,6 +70,7 @@
# 'pallet-contracts-primitives/std',
# 'pallet-contracts-rpc-runtime-api/std',
# 'pallet-contract-helpers/std',
+ "pallet-preimage/std",
"pallet-authorship/std",
"pallet-session/std",
"sp-consensus-aura/std",
@@ -139,6 +141,7 @@
"pallet-collator-selection/try-runtime",
"pallet-identity/try-runtime",
"pallet-session/try-runtime",
+ "pallet-preimage/try-runtime",
'cumulus-pallet-aura-ext/try-runtime',
'cumulus-pallet-dmp-queue/try-runtime',
'cumulus-pallet-parachain-system/try-runtime',
@@ -218,6 +221,7 @@
pallet-aura = { workspace = true }
pallet-authorship = { workspace = true }
pallet-balances = { workspace = true }
+pallet-preimage = { workspace = true }
pallet-randomness-collective-flip = { workspace = true }
pallet-session = { workspace = true }
pallet-sudo = { workspace = true }
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -42,6 +42,7 @@
'pallet-inflation/runtime-benchmarks',
'pallet-maintenance/runtime-benchmarks',
'pallet-nonfungible/runtime-benchmarks',
+ "pallet-preimage/runtime-benchmarks",
'pallet-refungible/runtime-benchmarks',
'pallet-structure/runtime-benchmarks',
'pallet-timestamp/runtime-benchmarks',
@@ -69,6 +70,7 @@
# 'pallet-contracts-primitives/std',
# 'pallet-contracts-rpc-runtime-api/std',
# 'pallet-contract-helpers/std',
+ "pallet-preimage/std",
"pallet-authorship/std",
"pallet-identity/std",
"pallet-session/std",
@@ -136,6 +138,7 @@
"pallet-collator-selection/try-runtime",
"pallet-identity/try-runtime",
"pallet-session/try-runtime",
+ "pallet-preimage/try-runtime",
'cumulus-pallet-aura-ext/try-runtime',
'cumulus-pallet-dmp-queue/try-runtime',
'cumulus-pallet-parachain-system/try-runtime',
@@ -210,6 +213,7 @@
pallet-aura = { workspace = true }
pallet-authorship = { workspace = true }
pallet-balances = { workspace = true }
+pallet-preimage = { workspace = true }
pallet-randomness-collective-flip = { workspace = true }
pallet-session = { workspace = true }
pallet-sudo = { workspace = true }
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.workspace = true1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std', 'unique-runtime']20limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']21pov-estimate = []22runtime-benchmarks = [23 'frame-benchmarking',24 'frame-support/runtime-benchmarks',25 'frame-system-benchmarking',26 'frame-system/runtime-benchmarks',27 'hex-literal',28 'pallet-app-promotion/runtime-benchmarks',29 'pallet-balances/runtime-benchmarks',30 'pallet-collator-selection/runtime-benchmarks',31 'pallet-common/runtime-benchmarks',32 'pallet-configuration/runtime-benchmarks',33 'pallet-ethereum/runtime-benchmarks',34 'pallet-evm-coder-substrate/runtime-benchmarks',35 'pallet-evm-migration/runtime-benchmarks',36 'pallet-foreign-assets/runtime-benchmarks',37 'pallet-fungible/runtime-benchmarks',38 'pallet-identity/runtime-benchmarks',39 'pallet-inflation/runtime-benchmarks',40 'pallet-maintenance/runtime-benchmarks',41 'pallet-nonfungible/runtime-benchmarks',42 'pallet-refungible/runtime-benchmarks',43 'pallet-structure/runtime-benchmarks',44 'pallet-timestamp/runtime-benchmarks',45 'pallet-unique/runtime-benchmarks',46 'pallet-xcm/runtime-benchmarks',47 'sp-runtime/runtime-benchmarks',48 'up-data-structs/runtime-benchmarks',49 'xcm-builder/runtime-benchmarks',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-executive/std',60 'frame-support/std',61 'frame-system-rpc-runtime-api/std',62 'frame-system/std',63 'frame-try-runtime/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-authorship/std",71 "pallet-identity/std",72 "pallet-session/std",73 "sp-consensus-aura/std",74 'app-promotion-rpc/std',75 'evm-coder/std',76 'fp-evm-mapping/std',77 'fp-rpc/std',78 'fp-self-contained/std',79 'pallet-app-promotion/std',80 'pallet-base-fee/std',81 'pallet-charge-transaction/std',82 'pallet-collator-selection/std',83 'pallet-common/std',84 'pallet-configuration/std',85 'pallet-ethereum/std',86 'pallet-evm-coder-substrate/std',87 'pallet-evm-contract-helpers/std',88 'pallet-evm-migration/std',89 'pallet-evm-transaction-payment/std',90 'pallet-evm/std',91 'pallet-fungible/std',92 'pallet-inflation/std',93 'pallet-nonfungible/std',94 'pallet-randomness-collective-flip/std',95 'pallet-refungible/std',96 'pallet-structure/std',97 'pallet-sudo/std',98 'pallet-timestamp/std',99 'pallet-transaction-payment-rpc-runtime-api/std',100 'pallet-transaction-payment/std',101 'pallet-treasury/std',102 'pallet-unique/std',103 'parachain-info/std',104 'sp-api/std',105 'sp-block-builder/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 'up-common/std',116 'up-data-structs/std',117 'up-pov-estimate-rpc/std',118 'up-rpc/std',119 'up-sponsorship/std',120 'xcm-builder/std',121 'xcm-executor/std',122 'xcm/std',123124 "orml-tokens/std",125 "orml-traits/std",126 "orml-vesting/std",127 "orml-xtokens/std",128 "pallet-foreign-assets/std",129 "pallet-maintenance/std",130]131stubgen = ["evm-coder/stubgen"]132try-runtime = [133 "pallet-authorship/try-runtime",134 "pallet-collator-selection/try-runtime",135 "pallet-identity/try-runtime",136 "pallet-session/try-runtime",137 'cumulus-pallet-aura-ext/try-runtime',138 'cumulus-pallet-dmp-queue/try-runtime',139 'cumulus-pallet-parachain-system/try-runtime',140 'cumulus-pallet-xcm/try-runtime',141 'cumulus-pallet-xcmp-queue/try-runtime',142 'fp-self-contained/try-runtime',143 'frame-executive/try-runtime',144 'frame-support/try-runtime',145 'frame-system/try-runtime',146 'frame-try-runtime',147 'orml-tokens/try-runtime',148 'orml-vesting/try-runtime',149 'orml-xtokens/try-runtime',150 'pallet-app-promotion/try-runtime',151 'pallet-aura/try-runtime',152 'pallet-balances/try-runtime',153 'pallet-charge-transaction/try-runtime',154 'pallet-common/try-runtime',155 'pallet-configuration/try-runtime',156 'pallet-ethereum/try-runtime',157 'pallet-evm-coder-substrate/try-runtime',158 'pallet-evm-contract-helpers/try-runtime',159 'pallet-evm-migration/try-runtime',160 'pallet-evm-transaction-payment/try-runtime',161 'pallet-evm/try-runtime',162 'pallet-foreign-assets/try-runtime',163 'pallet-fungible/try-runtime',164 'pallet-inflation/try-runtime',165 'pallet-maintenance/try-runtime',166 'pallet-nonfungible/try-runtime',167 'pallet-randomness-collective-flip/try-runtime',168 'pallet-refungible/try-runtime',169 'pallet-structure/try-runtime',170 'pallet-sudo/try-runtime',171 'pallet-timestamp/try-runtime',172 'pallet-transaction-payment/try-runtime',173 'pallet-treasury/try-runtime',174 'pallet-unique/try-runtime',175 'pallet-xcm/try-runtime',176 'parachain-info/try-runtime',177]178unique-runtime = ['app-promotion', 'foreign-assets', 'refungible']179180app-promotion = []181collator-selection = []182foreign-assets = []183refungible = []184scheduler = []185186################################################################################187# local dependencies188189[dependencies]190# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.191codec = { workspace = true, package = "parity-scale-codec" }192193cumulus-pallet-aura-ext = { workspace = true }194cumulus-pallet-dmp-queue = { workspace = true }195cumulus-pallet-parachain-system = { workspace = true }196cumulus-pallet-xcm = { workspace = true }197cumulus-pallet-xcmp-queue = { workspace = true }198cumulus-primitives-core = { workspace = true }199cumulus-primitives-timestamp = { workspace = true }200cumulus-primitives-utility = { workspace = true }201frame-executive = { workspace = true }202frame-support = { workspace = true }203frame-system = { workspace = true }204frame-system-rpc-runtime-api = { workspace = true }205orml-tokens = { workspace = true }206orml-traits = { workspace = true }207orml-vesting = { workspace = true }208orml-xtokens = { workspace = true }209pallet-aura = { workspace = true }210pallet-authorship = { workspace = true }211pallet-balances = { workspace = true }212pallet-randomness-collective-flip = { workspace = true }213pallet-session = { workspace = true }214pallet-sudo = { workspace = true }215pallet-timestamp = { workspace = true }216pallet-transaction-payment = { workspace = true }217pallet-transaction-payment-rpc-runtime-api = { workspace = true }218pallet-treasury = { workspace = true }219pallet-xcm = { workspace = true }220parachain-info = { workspace = true }221polkadot-parachain = { workspace = true }222smallvec = { workspace = true }223sp-api = { workspace = true }224sp-arithmetic = { workspace = true }225sp-block-builder = { workspace = true }226sp-consensus-aura = { workspace = true }227sp-core = { workspace = true }228sp-inherents = { workspace = true }229sp-io = { workspace = true }230sp-offchain = { workspace = true }231sp-runtime = { workspace = true }232sp-session = { workspace = true }233sp-std = { workspace = true }234sp-transaction-pool = { workspace = true }235sp-version = { workspace = true }236xcm = { workspace = true }237xcm-builder = { workspace = true }238xcm-executor = { workspace = true }239240app-promotion-rpc = { workspace = true }241derivative = { workspace = true }242log = { workspace = true }243pallet-app-promotion = { workspace = true }244pallet-collator-selection = { workspace = true }245pallet-common = { workspace = true }246pallet-configuration = { workspace = true }247pallet-fungible = { workspace = true }248pallet-identity = { workspace = true }249pallet-inflation = { workspace = true }250pallet-nonfungible = { workspace = true }251pallet-refungible = { workspace = true }252pallet-structure = { workspace = true }253pallet-unique = { workspace = true }254scale-info = { workspace = true }255up-common = { workspace = true }256up-data-structs = { workspace = true }257up-pov-estimate-rpc = { workspace = true }258up-rpc = { workspace = true }259# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }260evm-coder = { workspace = true }261fp-evm = { workspace = true }262fp-evm-mapping = { workspace = true }263fp-rpc = { workspace = true }264fp-self-contained = { workspace = true }265num_enum = { workspace = true }266pallet-base-fee = { workspace = true }267pallet-charge-transaction = { workspace = true }268pallet-ethereum = { workspace = true }269pallet-evm = { workspace = true }270pallet-evm-coder-substrate = { workspace = true }271pallet-evm-contract-helpers = { workspace = true }272pallet-evm-migration = { workspace = true }273pallet-evm-precompile-simple = { workspace = true }274pallet-evm-transaction-payment = { workspace = true }275pallet-foreign-assets = { workspace = true }276pallet-maintenance = { workspace = true }277precompile-utils-macro = { workspace = true }278up-sponsorship = { workspace = true }279280################################################################################281# Optional dependencies282283frame-system-benchmarking = { workspace = true, optional = true }284frame-benchmarking = { workspace = true, optional = true }285frame-try-runtime = { workspace = true, optional = true }286serde = { workspace = true, optional = true }287hex-literal = { workspace = true, optional = true }288289################################################################################290# Test dependencies291292pallet-test-utils = { workspace = true }293294################################################################################295# Other Dependencies296297impl-trait-for-tuples = { workspace = true }298299[dev-dependencies]300logtest = { workspace = true }301302[build-dependencies]303substrate-wasm-builder = { workspace = true }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.workspace = true1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std', 'unique-runtime']20limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']21pov-estimate = []22runtime-benchmarks = [23 'frame-benchmarking',24 'frame-support/runtime-benchmarks',25 'frame-system-benchmarking',26 'frame-system/runtime-benchmarks',27 'hex-literal',28 'pallet-app-promotion/runtime-benchmarks',29 'pallet-balances/runtime-benchmarks',30 'pallet-collator-selection/runtime-benchmarks',31 'pallet-common/runtime-benchmarks',32 'pallet-configuration/runtime-benchmarks',33 'pallet-ethereum/runtime-benchmarks',34 'pallet-evm-coder-substrate/runtime-benchmarks',35 'pallet-evm-migration/runtime-benchmarks',36 'pallet-foreign-assets/runtime-benchmarks',37 'pallet-fungible/runtime-benchmarks',38 'pallet-identity/runtime-benchmarks',39 'pallet-inflation/runtime-benchmarks',40 'pallet-maintenance/runtime-benchmarks',41 'pallet-nonfungible/runtime-benchmarks',42 "pallet-preimage/runtime-benchmarks",43 'pallet-refungible/runtime-benchmarks',44 'pallet-structure/runtime-benchmarks',45 'pallet-timestamp/runtime-benchmarks',46 'pallet-unique/runtime-benchmarks',47 'pallet-xcm/runtime-benchmarks',48 'sp-runtime/runtime-benchmarks',49 'up-data-structs/runtime-benchmarks',50 'xcm-builder/runtime-benchmarks',51]52std = [53 'codec/std',54 'cumulus-pallet-aura-ext/std',55 'cumulus-pallet-parachain-system/std',56 'cumulus-pallet-xcm/std',57 'cumulus-pallet-xcmp-queue/std',58 'cumulus-primitives-core/std',59 'cumulus-primitives-utility/std',60 'frame-executive/std',61 'frame-support/std',62 'frame-system-rpc-runtime-api/std',63 'frame-system/std',64 'frame-try-runtime/std',65 'pallet-aura/std',66 'pallet-balances/std',67 # 'pallet-contracts/std',68 # 'pallet-contracts-primitives/std',69 # 'pallet-contracts-rpc-runtime-api/std',70 # 'pallet-contract-helpers/std',71 "pallet-preimage/std",72 "pallet-authorship/std",73 "pallet-identity/std",74 "pallet-session/std",75 "sp-consensus-aura/std",76 'app-promotion-rpc/std',77 'evm-coder/std',78 'fp-evm-mapping/std',79 'fp-rpc/std',80 'fp-self-contained/std',81 'pallet-app-promotion/std',82 'pallet-base-fee/std',83 'pallet-charge-transaction/std',84 'pallet-collator-selection/std',85 'pallet-common/std',86 'pallet-configuration/std',87 'pallet-ethereum/std',88 'pallet-evm-coder-substrate/std',89 'pallet-evm-contract-helpers/std',90 'pallet-evm-migration/std',91 'pallet-evm-transaction-payment/std',92 'pallet-evm/std',93 'pallet-fungible/std',94 'pallet-inflation/std',95 'pallet-nonfungible/std',96 'pallet-randomness-collective-flip/std',97 'pallet-refungible/std',98 'pallet-structure/std',99 'pallet-sudo/std',100 'pallet-timestamp/std',101 'pallet-transaction-payment-rpc-runtime-api/std',102 'pallet-transaction-payment/std',103 'pallet-treasury/std',104 'pallet-unique/std',105 'parachain-info/std',106 'sp-api/std',107 'sp-block-builder/std',108 'sp-core/std',109 'sp-inherents/std',110 'sp-io/std',111 'sp-offchain/std',112 'sp-runtime/std',113 'sp-session/std',114 'sp-std/std',115 'sp-transaction-pool/std',116 'sp-version/std',117 'up-common/std',118 'up-data-structs/std',119 'up-pov-estimate-rpc/std',120 'up-rpc/std',121 'up-sponsorship/std',122 'xcm-builder/std',123 'xcm-executor/std',124 'xcm/std',125126 "orml-tokens/std",127 "orml-traits/std",128 "orml-vesting/std",129 "orml-xtokens/std",130 "pallet-foreign-assets/std",131 "pallet-maintenance/std",132]133stubgen = ["evm-coder/stubgen"]134try-runtime = [135 "pallet-authorship/try-runtime",136 "pallet-collator-selection/try-runtime",137 "pallet-identity/try-runtime",138 "pallet-session/try-runtime",139 "pallet-preimage/try-runtime",140 'cumulus-pallet-aura-ext/try-runtime',141 'cumulus-pallet-dmp-queue/try-runtime',142 'cumulus-pallet-parachain-system/try-runtime',143 'cumulus-pallet-xcm/try-runtime',144 'cumulus-pallet-xcmp-queue/try-runtime',145 'fp-self-contained/try-runtime',146 'frame-executive/try-runtime',147 'frame-support/try-runtime',148 'frame-system/try-runtime',149 'frame-try-runtime',150 'orml-tokens/try-runtime',151 'orml-vesting/try-runtime',152 'orml-xtokens/try-runtime',153 'pallet-app-promotion/try-runtime',154 'pallet-aura/try-runtime',155 'pallet-balances/try-runtime',156 'pallet-charge-transaction/try-runtime',157 'pallet-common/try-runtime',158 'pallet-configuration/try-runtime',159 'pallet-ethereum/try-runtime',160 'pallet-evm-coder-substrate/try-runtime',161 'pallet-evm-contract-helpers/try-runtime',162 'pallet-evm-migration/try-runtime',163 'pallet-evm-transaction-payment/try-runtime',164 'pallet-evm/try-runtime',165 'pallet-foreign-assets/try-runtime',166 'pallet-fungible/try-runtime',167 'pallet-inflation/try-runtime',168 'pallet-maintenance/try-runtime',169 'pallet-nonfungible/try-runtime',170 'pallet-randomness-collective-flip/try-runtime',171 'pallet-refungible/try-runtime',172 'pallet-structure/try-runtime',173 'pallet-sudo/try-runtime',174 'pallet-timestamp/try-runtime',175 'pallet-transaction-payment/try-runtime',176 'pallet-treasury/try-runtime',177 'pallet-unique/try-runtime',178 'pallet-xcm/try-runtime',179 'parachain-info/try-runtime',180]181unique-runtime = ['app-promotion', 'foreign-assets', 'refungible']182183app-promotion = []184collator-selection = []185foreign-assets = []186refungible = []187scheduler = []188189################################################################################190# local dependencies191192[dependencies]193# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.194codec = { workspace = true, package = "parity-scale-codec" }195196cumulus-pallet-aura-ext = { workspace = true }197cumulus-pallet-dmp-queue = { workspace = true }198cumulus-pallet-parachain-system = { workspace = true }199cumulus-pallet-xcm = { workspace = true }200cumulus-pallet-xcmp-queue = { workspace = true }201cumulus-primitives-core = { workspace = true }202cumulus-primitives-timestamp = { workspace = true }203cumulus-primitives-utility = { workspace = true }204frame-executive = { workspace = true }205frame-support = { workspace = true }206frame-system = { workspace = true }207frame-system-rpc-runtime-api = { workspace = true }208orml-tokens = { workspace = true }209orml-traits = { workspace = true }210orml-vesting = { workspace = true }211orml-xtokens = { workspace = true }212pallet-aura = { workspace = true }213pallet-authorship = { workspace = true }214pallet-balances = { workspace = true }215pallet-preimage = { workspace = true }216pallet-randomness-collective-flip = { workspace = true }217pallet-session = { workspace = true }218pallet-sudo = { workspace = true }219pallet-timestamp = { workspace = true }220pallet-transaction-payment = { workspace = true }221pallet-transaction-payment-rpc-runtime-api = { workspace = true }222pallet-treasury = { workspace = true }223pallet-xcm = { workspace = true }224parachain-info = { workspace = true }225polkadot-parachain = { workspace = true }226smallvec = { workspace = true }227sp-api = { workspace = true }228sp-arithmetic = { workspace = true }229sp-block-builder = { workspace = true }230sp-consensus-aura = { workspace = true }231sp-core = { workspace = true }232sp-inherents = { workspace = true }233sp-io = { workspace = true }234sp-offchain = { workspace = true }235sp-runtime = { workspace = true }236sp-session = { workspace = true }237sp-std = { workspace = true }238sp-transaction-pool = { workspace = true }239sp-version = { workspace = true }240xcm = { workspace = true }241xcm-builder = { workspace = true }242xcm-executor = { workspace = true }243244app-promotion-rpc = { workspace = true }245derivative = { workspace = true }246log = { workspace = true }247pallet-app-promotion = { workspace = true }248pallet-collator-selection = { workspace = true }249pallet-common = { workspace = true }250pallet-configuration = { workspace = true }251pallet-fungible = { workspace = true }252pallet-identity = { workspace = true }253pallet-inflation = { workspace = true }254pallet-nonfungible = { workspace = true }255pallet-refungible = { workspace = true }256pallet-structure = { workspace = true }257pallet-unique = { workspace = true }258scale-info = { workspace = true }259up-common = { workspace = true }260up-data-structs = { workspace = true }261up-pov-estimate-rpc = { workspace = true }262up-rpc = { workspace = true }263# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }264evm-coder = { workspace = true }265fp-evm = { workspace = true }266fp-evm-mapping = { workspace = true }267fp-rpc = { workspace = true }268fp-self-contained = { workspace = true }269num_enum = { workspace = true }270pallet-base-fee = { workspace = true }271pallet-charge-transaction = { workspace = true }272pallet-ethereum = { workspace = true }273pallet-evm = { workspace = true }274pallet-evm-coder-substrate = { workspace = true }275pallet-evm-contract-helpers = { workspace = true }276pallet-evm-migration = { workspace = true }277pallet-evm-precompile-simple = { workspace = true }278pallet-evm-transaction-payment = { workspace = true }279pallet-foreign-assets = { workspace = true }280pallet-maintenance = { workspace = true }281precompile-utils-macro = { workspace = true }282up-sponsorship = { workspace = true }283284################################################################################285# Optional dependencies286287frame-system-benchmarking = { workspace = true, optional = true }288frame-benchmarking = { workspace = true, optional = true }289frame-try-runtime = { workspace = true, optional = true }290serde = { workspace = true, optional = true }291hex-literal = { workspace = true, optional = true }292293################################################################################294# Test dependencies295296pallet-test-utils = { workspace = true }297298################################################################################299# Other Dependencies300301impl-trait-for-tuples = { workspace = true }302303[dev-dependencies]304logtest = { workspace = true }305306[build-dependencies]307substrate-wasm-builder = { workspace = true }