difftreelog
feat pallet maintenance
in: master
14 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5374,6 +5374,7 @@
"pallet-foreign-assets",
"pallet-fungible",
"pallet-inflation",
+ "pallet-maintenance",
"pallet-nonfungible",
"pallet-randomness-collective-flip",
"pallet-refungible",
@@ -6250,6 +6251,18 @@
]
[[package]]
+name = "pallet-maintenance"
+version = "0.1.0"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "parity-scale-codec 3.2.1",
+ "scale-info",
+ "sp-std",
+]
+
+[[package]]
name = "pallet-membership"
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.30#a3ed0119c45cdd0d571ad34e5b3ee7518c8cef8d"
@@ -8834,6 +8847,7 @@
"pallet-foreign-assets",
"pallet-fungible",
"pallet-inflation",
+ "pallet-maintenance",
"pallet-nonfungible",
"pallet-randomness-collective-flip",
"pallet-refungible",
@@ -12964,6 +12978,7 @@
"pallet-foreign-assets",
"pallet-fungible",
"pallet-inflation",
+ "pallet-maintenance",
"pallet-nonfungible",
"pallet-randomness-collective-flip",
"pallet-refungible",
pallets/maintenance/Cargo.tomldiffbeforeafterboth--- /dev/null
+++ b/pallets/maintenance/Cargo.toml
@@ -0,0 +1,35 @@
+[package]
+name = "pallet-maintenance"
+version = "0.1.0"
+authors = ["Unique Network <support@uniquenetwork.io>"]
+edition = "2021"
+license = "GPLv3"
+homepage = "https://unique.network"
+repository = "https://github.com/UniqueNetwork/unique-chain"
+description = "Unique Maintenance pallet"
+readme = "README.md"
+
+[dependencies]
+codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
+scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
+frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
+frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
+frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
+sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.30" }
+
+[features]
+default = ["std"]
+std = [
+ "codec/std",
+ "scale-info/std",
+ "frame-support/std",
+ "frame-system/std",
+ "frame-benchmarking/std",
+ "sp-std/std",
+]
+runtime-benchmarks = [
+ "frame-benchmarking",
+ "frame-support/runtime-benchmarks",
+ "frame-system/runtime-benchmarks",
+]
+try-runtime = ["frame-support/try-runtime"]
pallets/maintenance/src/benchmarking.rsdiffbeforeafterboth--- /dev/null
+++ b/pallets/maintenance/src/benchmarking.rs
@@ -0,0 +1,37 @@
+// 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 super::*;
+use crate::{Pallet as Maintenance, Config};
+
+use frame_benchmarking::benchmarks;
+use frame_system::RawOrigin;
+use frame_support::ensure;
+
+benchmarks! {
+ enable {
+ }: _(RawOrigin::Root)
+ verify {
+ ensure!(<Enabled<T>>::get(), "didn't enable the MM");
+ }
+
+ disable {
+ Maintenance::<T>::enable(RawOrigin::Root.into())?;
+ }: _(RawOrigin::Root)
+ verify {
+ ensure!(!<Enabled<T>>::get(), "didn't disable the MM");
+ }
+}
pallets/maintenance/src/lib.rsdiffbeforeafterboth--- /dev/null
+++ b/pallets/maintenance/src/lib.rs
@@ -0,0 +1,80 @@
+// 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)]
+
+pub use pallet::*;
+
+#[cfg(feature = "runtime-benchmarks")]
+pub mod benchmarking;
+
+pub mod weights;
+
+#[frame_support::pallet]
+pub mod pallet {
+ use frame_support::pallet_prelude::*;
+ use frame_system::pallet_prelude::*;
+ use crate::weights::WeightInfo;
+
+ #[pallet::config]
+ pub trait Config: frame_system::Config {
+ type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
+ type WeightInfo: WeightInfo;
+ }
+
+ #[pallet::event]
+ #[pallet::generate_deposit(pub(super) fn deposit_event)]
+ pub enum Event<T: Config> {
+ MaintenanceEnabled,
+ MaintenanceDisabled,
+ }
+
+ #[pallet::pallet]
+ #[pallet::generate_store(pub(super) trait Store)]
+ pub struct Pallet<T>(_);
+
+ #[pallet::storage]
+ #[pallet::getter(fn is_enabled)]
+ pub type Enabled<T> = StorageValue<_, bool, ValueQuery>;
+
+ #[pallet::error]
+ pub enum Error<T> {}
+
+ #[pallet::call]
+ impl<T: Config> Pallet<T> {
+ #[pallet::weight(<T as Config>::WeightInfo::enable())]
+ pub fn enable(origin: OriginFor<T>) -> DispatchResult {
+ ensure_root(origin)?;
+
+ <Enabled<T>>::set(true);
+
+ Self::deposit_event(Event::MaintenanceEnabled);
+
+ Ok(())
+ }
+
+ #[pallet::weight(<T as Config>::WeightInfo::disable())]
+ pub fn disable(origin: OriginFor<T>) -> DispatchResult {
+ ensure_root(origin)?;
+
+ <Enabled<T>>::set(false);
+
+ Self::deposit_event(Event::MaintenanceDisabled);
+
+ Ok(())
+ }
+ }
+}
pallets/maintenance/src/weights.rsdiffbeforeafterboth--- /dev/null
+++ b/pallets/maintenance/src/weights.rs
@@ -0,0 +1,67 @@
+// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs
+
+//! Autogenerated weights for pallet_maintenance
+//!
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
+//! DATE: 2022-11-01, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
+
+// Executed Command:
+// target/release/unique-collator
+// benchmark
+// pallet
+// --pallet
+// pallet-maintenance
+// --wasm-execution
+// compiled
+// --extrinsic
+// *
+// --template
+// .maintain/frame-weight-template.hbs
+// --steps=50
+// --repeat=80
+// --heap-pages=4096
+// --output=./pallets/maintenance/src/weights.rs
+
+#![cfg_attr(rustfmt, rustfmt_skip)]
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+#![allow(clippy::unnecessary_cast)]
+
+use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
+use sp_std::marker::PhantomData;
+
+/// Weight functions needed for pallet_maintenance.
+pub trait WeightInfo {
+ fn enable() -> Weight;
+ fn disable() -> Weight;
+}
+
+/// Weights for pallet_maintenance using the Substrate node and recommended hardware.
+pub struct SubstrateWeight<T>(PhantomData<T>);
+impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
+ // Storage: Maintenance Enabled (r:0 w:1)
+ fn enable() -> Weight {
+ Weight::from_ref_time(7_367_000)
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ // Storage: Maintenance Enabled (r:0 w:1)
+ fn disable() -> Weight {
+ Weight::from_ref_time(7_273_000)
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+}
+
+// For backwards compatibility and tests
+impl WeightInfo for () {
+ // Storage: Maintenance Enabled (r:0 w:1)
+ fn enable() -> Weight {
+ Weight::from_ref_time(7_367_000)
+ .saturating_add(RocksDbWeight::get().writes(1))
+ }
+ // Storage: Maintenance Enabled (r:0 w:1)
+ fn disable() -> Weight {
+ Weight::from_ref_time(7_273_000)
+ .saturating_add(RocksDbWeight::get().writes(1))
+ }
+}
runtime/common/config/pallets/mod.rsdiffbeforeafterboth--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -103,3 +103,8 @@
type DefaultWeightToFeeCoefficient = ConstU32<{ up_common::constants::WEIGHT_TO_FEE_COEFF }>;
type DefaultMinGasPrice = ConstU64<{ up_common::constants::MIN_GAS_PRICE }>;
}
+
+impl pallet_maintenance::Config for Runtime {
+ type RuntimeEvent = RuntimeEvent;
+ type WeightInfo = pallet_maintenance::weights::SubstrateWeight<Self>;
+}
runtime/common/construct_runtime/mod.rsdiffbeforeafterboth--- a/runtime/common/construct_runtime/mod.rs
+++ b/runtime/common/construct_runtime/mod.rs
@@ -94,6 +94,8 @@
EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,
EvmMigration: pallet_evm_migration::{Pallet, Call, Storage} = 153,
+ Maintenance: pallet_maintenance::{Pallet, Call, Storage, Event<T>} = 154,
+
#[runtimes(opal)]
TestUtils: pallet_test_utils = 255,
}
runtime/common/maintenance.rsdiffbeforeafterboth--- /dev/null
+++ b/runtime/common/maintenance.rs
@@ -0,0 +1,119 @@
+// 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 scale_info::TypeInfo;
+use codec::{Encode, Decode};
+use up_common::types::AccountId;
+use crate::{RuntimeCall, Maintenance};
+
+use sp_runtime::{
+ traits::{DispatchInfoOf, SignedExtension},
+ transaction_validity::{
+ TransactionValidity, ValidTransaction, InvalidTransaction, TransactionValidityError,
+ },
+};
+
+#[derive(Debug, Encode, Decode, PartialEq, Eq, Clone, TypeInfo)]
+pub struct CheckMaintenance;
+
+impl SignedExtension for CheckMaintenance {
+ type AccountId = AccountId;
+ type Call = RuntimeCall;
+ type AdditionalSigned = ();
+ type Pre = ();
+
+ const IDENTIFIER: &'static str = "CheckMaintenance";
+
+ fn additional_signed(&self) -> Result<Self::AdditionalSigned, TransactionValidityError> {
+ Ok(())
+ }
+
+ fn pre_dispatch(
+ self,
+ who: &Self::AccountId,
+ call: &Self::Call,
+ info: &DispatchInfoOf<Self::Call>,
+ len: usize,
+ ) -> Result<Self::Pre, TransactionValidityError> {
+ self.validate(who, call, info, len).map(|_| ())
+ }
+
+ fn validate(
+ &self,
+ _who: &Self::AccountId,
+ call: &Self::Call,
+ _info: &DispatchInfoOf<Self::Call>,
+ _len: usize,
+ ) -> TransactionValidity {
+ if Maintenance::is_enabled() {
+ match call {
+ RuntimeCall::EvmMigration(_)
+ | RuntimeCall::EVM(_)
+ | RuntimeCall::Ethereum(_)
+ | RuntimeCall::Inflation(_)
+ | RuntimeCall::Maintenance(_)
+ | RuntimeCall::Structure(_)
+ | RuntimeCall::Unique(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
+
+ #[cfg(feature = "scheduler")]
+ RuntimeCall::Scheduler(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
+
+ #[cfg(feature = "rmrk")]
+ RuntimeCall::RmrkCore(_) | RuntimeCall::RmrkEquip(_) => {
+ Err(TransactionValidityError::Invalid(InvalidTransaction::Call))
+ }
+
+ #[cfg(feature = "app-promotion")]
+ RuntimeCall::AppPromotion(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
+
+ #[cfg(feature = "foreign-assets")]
+ RuntimeCall::ForeignAssets(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
+
+ #[cfg(feature = "pallet-test-utils")]
+ RuntimeCall::TestUtils(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
+
+ _ => Ok(ValidTransaction::default()),
+ }
+ } else {
+ Ok(ValidTransaction::default())
+ }
+ }
+
+ fn pre_dispatch_unsigned(
+ call: &Self::Call,
+ info: &DispatchInfoOf<Self::Call>,
+ len: usize,
+ ) -> Result<(), TransactionValidityError> {
+ Self::validate_unsigned(call, info, len).map(|_| ())
+ }
+
+ fn validate_unsigned(
+ call: &Self::Call,
+ _info: &DispatchInfoOf<Self::Call>,
+ _len: usize,
+ ) -> TransactionValidity {
+ if Maintenance::is_enabled() {
+ match call {
+ RuntimeCall::EVM(_) | RuntimeCall::Ethereum(_) | RuntimeCall::EvmMigration(_) => {
+ Err(TransactionValidityError::Invalid(InvalidTransaction::Call))
+ }
+ _ => Ok(ValidTransaction::default()),
+ }
+ } else {
+ Ok(ValidTransaction::default())
+ }
+ }
+}
runtime/common/mod.rsdiffbeforeafterboth--- a/runtime/common/mod.rs
+++ b/runtime/common/mod.rs
@@ -20,6 +20,7 @@
pub mod ethereum;
pub mod instance;
pub mod runtime_apis;
+pub mod maintenance;
#[cfg(feature = "scheduler")]
pub mod scheduler;
@@ -90,6 +91,7 @@
frame_system::CheckEra<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
+ maintenance::CheckMaintenance,
ChargeTransactionPayment,
//pallet_contract_helpers::ContractHelpersExtension<Runtime>,
pallet_ethereum::FakeTransactionFinalizer<Runtime>,
runtime/common/scheduler.rsdiffbeforeafterboth--- a/runtime/common/scheduler.rs
+++ b/runtime/common/scheduler.rs
@@ -25,7 +25,7 @@
DispatchErrorWithPostInfo, DispatchError,
};
use codec::Encode;
-use crate::{Runtime, RuntimeCall, RuntimeOrigin, Balances};
+use crate::{Runtime, RuntimeCall, RuntimeOrigin, Balances, maintenance};
use up_common::types::{AccountId, Balance};
use fp_self_contained::SelfContainedCall;
use pallet_unique_scheduler::DispatchCall;
@@ -41,6 +41,7 @@
frame_system::CheckEra<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
+ maintenance::CheckMaintenance,
ChargeTransactionPayment<Runtime>,
);
@@ -53,6 +54,7 @@
from,
)),
frame_system::CheckWeight::<Runtime>::new(),
+ maintenance::CheckMaintenance,
ChargeTransactionPayment::<Runtime>::from(0),
)
}
runtime/opal/Cargo.tomldiffbeforeafterboth1################################################################################2# Package34cargo-features = ["workspace-inheritance"]56[package]7authors = ['Unique Network <support@uniquenetwork.io>']8build = 'build.rs'9description = 'Opal Runtime'10edition = '2021'11homepage = 'https://unique.network'12license = 'GPLv3'13name = 'opal-runtime'14repository = 'https://github.com/UniqueNetwork/unique-chain'15version = "0.9.30"1617[package.metadata.docs.rs]18targets = ['x86_64-unknown-linux-gnu']1920[features]21default = ['std', 'opal-runtime']22runtime-benchmarks = [23 'hex-literal',24 'frame-benchmarking',25 'frame-support/runtime-benchmarks',26 'frame-system-benchmarking',27 'frame-system/runtime-benchmarks',28 'pallet-ethereum/runtime-benchmarks',29 'pallet-evm-migration/runtime-benchmarks',30 'pallet-evm-coder-substrate/runtime-benchmarks',31 'pallet-balances/runtime-benchmarks',32 'pallet-timestamp/runtime-benchmarks',33 'pallet-common/runtime-benchmarks',34 'pallet-structure/runtime-benchmarks',35 'pallet-fungible/runtime-benchmarks',36 'pallet-refungible/runtime-benchmarks',37 'pallet-nonfungible/runtime-benchmarks',38 'pallet-proxy-rmrk-core/runtime-benchmarks',39 'pallet-proxy-rmrk-equip/runtime-benchmarks',40 'pallet-foreign-assets/runtime-benchmarks',41 'pallet-unique/runtime-benchmarks',42 'pallet-inflation/runtime-benchmarks',43 'pallet-app-promotion/runtime-benchmarks',44 'pallet-unique-scheduler/runtime-benchmarks',45 'pallet-xcm/runtime-benchmarks',46 'sp-runtime/runtime-benchmarks',47 'xcm-builder/runtime-benchmarks',48 'pallet-maintenance/runtime-benchmarks',49]50try-runtime = [51 'frame-try-runtime',52 'frame-executive/try-runtime',53 'frame-support/try-runtime',54 'frame-system/try-runtime',55 'cumulus-pallet-parachain-system/try-runtime',56 'parachain-info/try-runtime',57 'pallet-aura/try-runtime',58 'cumulus-pallet-aura-ext/try-runtime',59 'pallet-balances/try-runtime',60 'pallet-randomness-collective-flip/try-runtime',61 'pallet-timestamp/try-runtime',62 'pallet-transaction-payment/try-runtime',63 'pallet-treasury/try-runtime',64 'pallet-sudo/try-runtime',65 'orml-vesting/try-runtime',66 'orml-xtokens/try-runtime',67 'orml-tokens/try-runtime',68 'cumulus-pallet-xcmp-queue/try-runtime',69 'pallet-xcm/try-runtime',70 'cumulus-pallet-xcm/try-runtime',71 'cumulus-pallet-dmp-queue/try-runtime',72 'pallet-inflation/try-runtime',73 'pallet-unique/try-runtime',74 'pallet-unique-scheduler/try-runtime',75 'pallet-configuration/try-runtime',76 'pallet-charge-transaction/try-runtime',77 'pallet-common/try-runtime',78 'pallet-fungible/try-runtime',79 'pallet-refungible/try-runtime',80 'pallet-nonfungible/try-runtime',81 'pallet-structure/try-runtime',82 'pallet-proxy-rmrk-core/try-runtime',83 'pallet-proxy-rmrk-equip/try-runtime',84 'pallet-app-promotion/try-runtime',85 'pallet-foreign-assets/try-runtime',86 'pallet-evm/try-runtime',87 'pallet-ethereum/try-runtime',88 'pallet-evm-coder-substrate/try-runtime',89 'pallet-evm-contract-helpers/try-runtime',90 'pallet-evm-transaction-payment/try-runtime',91 'pallet-evm-migration/try-runtime',92 'pallet-maintenance/try-runtime',93 'pallet-test-utils?/try-runtime',94]95std = [96 'codec/std',97 'cumulus-pallet-aura-ext/std',98 'cumulus-pallet-parachain-system/std',99 'cumulus-pallet-xcm/std',100 'cumulus-pallet-xcmp-queue/std',101 'cumulus-primitives-core/std',102 'cumulus-primitives-utility/std',103 'frame-try-runtime/std',104 'frame-executive/std',105 'frame-support/std',106 'frame-system/std',107 'frame-system-rpc-runtime-api/std',108 'pallet-aura/std',109 'pallet-balances/std',110 # 'pallet-contracts/std',111 # 'pallet-contracts-primitives/std',112 # 'pallet-contracts-rpc-runtime-api/std',113 # 'pallet-contract-helpers/std',114 'pallet-randomness-collective-flip/std',115 'pallet-sudo/std',116 'pallet-timestamp/std',117 'pallet-transaction-payment/std',118 'pallet-transaction-payment-rpc-runtime-api/std',119 'pallet-treasury/std',120 'pallet-evm/std',121 'pallet-evm-migration/std',122 'pallet-evm-contract-helpers/std',123 'pallet-evm-transaction-payment/std',124 'pallet-evm-coder-substrate/std',125 'pallet-ethereum/std',126 'pallet-base-fee/std',127 'fp-rpc/std',128 'up-rpc/std',129 'app-promotion-rpc/std',130 'fp-evm-mapping/std',131 'fp-self-contained/std',132 'parachain-info/std',133 'serde',134 'pallet-inflation/std',135 'pallet-configuration/std',136 'pallet-app-promotion/std',137 'pallet-common/std',138 'pallet-structure/std',139 'pallet-fungible/std',140 'pallet-refungible/std',141 'pallet-nonfungible/std',142 'pallet-proxy-rmrk-core/std',143 'pallet-proxy-rmrk-equip/std',144 'pallet-unique/std',145 'pallet-unique-scheduler/std',146 'pallet-charge-transaction/std',147 'up-data-structs/std',148 'sp-api/std',149 'sp-block-builder/std',150 "sp-consensus-aura/std",151 'sp-core/std',152 'sp-inherents/std',153 'sp-io/std',154 'sp-offchain/std',155 'sp-runtime/std',156 'sp-session/std',157 'sp-std/std',158 'sp-transaction-pool/std',159 'sp-version/std',160 'xcm/std',161 'xcm-builder/std',162 'xcm-executor/std',163 'up-common/std',164 'rmrk-rpc/std',165 'evm-coder/std',166 'up-sponsorship/std',167168 "orml-vesting/std",169 "orml-tokens/std",170 "orml-xtokens/std",171 "orml-traits/std",172 "pallet-foreign-assets/std",173174 'pallet-maintenance/std',175 'pallet-test-utils?/std',176]177limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']178opal-runtime = ['refungible', 'scheduler', 'rmrk', 'app-promotion', 'foreign-assets', 'pallet-test-utils']179180refungible = []181scheduler = []182rmrk = []183foreign-assets = []184app-promotion = []185186################################################################################187# Substrate Dependencies188189[dependencies.codec]190default-features = false191features = ['derive']192package = 'parity-scale-codec'193version = '3.1.2'194195[dependencies.frame-benchmarking]196default-features = false197git = "https://github.com/paritytech/substrate"198optional = true199branch = "polkadot-v0.9.30"200201[dependencies.frame-try-runtime]202default-features = false203git = "https://github.com/paritytech/substrate"204optional = true205branch = "polkadot-v0.9.30"206207[dependencies.frame-executive]208default-features = false209git = "https://github.com/paritytech/substrate"210branch = "polkadot-v0.9.30"211212[dependencies.frame-support]213default-features = false214git = "https://github.com/paritytech/substrate"215branch = "polkadot-v0.9.30"216217[dependencies.frame-system]218default-features = false219git = "https://github.com/paritytech/substrate"220branch = "polkadot-v0.9.30"221222[dependencies.frame-system-benchmarking]223default-features = false224git = "https://github.com/paritytech/substrate"225optional = true226branch = "polkadot-v0.9.30"227228[dependencies.frame-system-rpc-runtime-api]229default-features = false230git = "https://github.com/paritytech/substrate"231branch = "polkadot-v0.9.30"232233[dependencies.hex-literal]234optional = true235version = '0.3.3'236237[dependencies.serde]238default-features = false239features = ['derive']240optional = true241version = '1.0.130'242243[dependencies.pallet-aura]244default-features = false245git = "https://github.com/paritytech/substrate"246branch = "polkadot-v0.9.30"247248[dependencies.pallet-balances]249default-features = false250git = "https://github.com/paritytech/substrate"251branch = "polkadot-v0.9.30"252253# Contracts specific packages254# [dependencies.pallet-contracts]255# git = 'https://github.com/paritytech/substrate'256# default-features = false257# branch = 'master'258# version = '4.0.0-dev'259260# [dependencies.pallet-contracts-primitives]261# git = 'https://github.com/paritytech/substrate'262# default-features = false263# branch = 'master'264# version = '4.0.0-dev'265266# [dependencies.pallet-contracts-rpc-runtime-api]267# git = 'https://github.com/paritytech/substrate'268# default-features = false269# branch = 'master'270# version = '4.0.0-dev'271272[dependencies.pallet-randomness-collective-flip]273default-features = false274git = "https://github.com/paritytech/substrate"275branch = "polkadot-v0.9.30"276277[dependencies.pallet-sudo]278default-features = false279git = "https://github.com/paritytech/substrate"280branch = "polkadot-v0.9.30"281282[dependencies.pallet-timestamp]283default-features = false284git = "https://github.com/paritytech/substrate"285branch = "polkadot-v0.9.30"286287[dependencies.pallet-transaction-payment]288default-features = false289git = "https://github.com/paritytech/substrate"290branch = "polkadot-v0.9.30"291292[dependencies.pallet-transaction-payment-rpc-runtime-api]293default-features = false294git = "https://github.com/paritytech/substrate"295branch = "polkadot-v0.9.30"296297[dependencies.pallet-treasury]298default-features = false299git = "https://github.com/paritytech/substrate"300branch = "polkadot-v0.9.30"301302[dependencies.sp-arithmetic]303default-features = false304git = "https://github.com/paritytech/substrate"305branch = "polkadot-v0.9.30"306307[dependencies.sp-api]308default-features = false309git = "https://github.com/paritytech/substrate"310branch = "polkadot-v0.9.30"311312[dependencies.sp-block-builder]313default-features = false314git = "https://github.com/paritytech/substrate"315branch = "polkadot-v0.9.30"316317[dependencies.sp-core]318default-features = false319git = "https://github.com/paritytech/substrate"320branch = "polkadot-v0.9.30"321322[dependencies.sp-consensus-aura]323default-features = false324git = "https://github.com/paritytech/substrate"325branch = "polkadot-v0.9.30"326327[dependencies.sp-inherents]328default-features = false329git = "https://github.com/paritytech/substrate"330branch = "polkadot-v0.9.30"331332[dependencies.sp-io]333default-features = false334git = "https://github.com/paritytech/substrate"335branch = "polkadot-v0.9.30"336337[dependencies.sp-offchain]338default-features = false339git = "https://github.com/paritytech/substrate"340branch = "polkadot-v0.9.30"341342[dependencies.sp-runtime]343default-features = false344git = "https://github.com/paritytech/substrate"345branch = "polkadot-v0.9.30"346347[dependencies.sp-session]348default-features = false349git = "https://github.com/paritytech/substrate"350branch = "polkadot-v0.9.30"351352[dependencies.sp-std]353default-features = false354git = "https://github.com/paritytech/substrate"355branch = "polkadot-v0.9.30"356357[dependencies.sp-transaction-pool]358default-features = false359git = "https://github.com/paritytech/substrate"360branch = "polkadot-v0.9.30"361362[dependencies.sp-version]363default-features = false364git = "https://github.com/paritytech/substrate"365branch = "polkadot-v0.9.30"366367[dependencies.smallvec]368version = '1.6.1'369370################################################################################371# Cumulus dependencies372373[dependencies.parachain-info]374default-features = false375git = "https://github.com/paritytech/cumulus"376branch = "polkadot-v0.9.30"377378[dependencies.cumulus-pallet-aura-ext]379git = "https://github.com/paritytech/cumulus"380branch = "polkadot-v0.9.30"381default-features = false382383[dependencies.cumulus-pallet-parachain-system]384git = "https://github.com/paritytech/cumulus"385branch = "polkadot-v0.9.30"386default-features = false387388[dependencies.cumulus-primitives-core]389git = "https://github.com/paritytech/cumulus"390branch = "polkadot-v0.9.30"391default-features = false392393[dependencies.cumulus-pallet-xcm]394git = "https://github.com/paritytech/cumulus"395branch = "polkadot-v0.9.30"396default-features = false397398[dependencies.cumulus-pallet-dmp-queue]399git = "https://github.com/paritytech/cumulus"400branch = "polkadot-v0.9.30"401default-features = false402403[dependencies.cumulus-pallet-xcmp-queue]404git = "https://github.com/paritytech/cumulus"405branch = "polkadot-v0.9.30"406default-features = false407408[dependencies.cumulus-primitives-utility]409git = "https://github.com/paritytech/cumulus"410branch = "polkadot-v0.9.30"411default-features = false412413[dependencies.cumulus-primitives-timestamp]414git = "https://github.com/paritytech/cumulus"415branch = "polkadot-v0.9.30"416default-features = false417418################################################################################419# Polkadot dependencies420421[dependencies.polkadot-parachain]422git = "https://github.com/paritytech/polkadot"423branch = "release-v0.9.30"424default-features = false425426[dependencies.xcm]427git = "https://github.com/paritytech/polkadot"428branch = "release-v0.9.30"429default-features = false430431[dependencies.xcm-builder]432git = "https://github.com/paritytech/polkadot"433branch = "release-v0.9.30"434default-features = false435436[dependencies.xcm-executor]437git = "https://github.com/paritytech/polkadot"438branch = "release-v0.9.30"439default-features = false440441[dependencies.pallet-xcm]442git = "https://github.com/paritytech/polkadot"443branch = "release-v0.9.30"444default-features = false445446################################################################################447# local dependencies448449[dependencies]450orml-vesting.workspace = true451orml-xtokens.workspace = true452orml-tokens.workspace = true453orml-traits.workspace = true454455log = { version = "0.4.16", default-features = false }456up-common = { path = "../../primitives/common", default-features = false }457scale-info = { version = "2.0.1", default-features = false, features = [458 "derive",459] }460derivative = "2.2.0"461pallet-unique = { path = '../../pallets/unique', default-features = false }462up-rpc = { path = "../../primitives/rpc", default-features = false }463app-promotion-rpc = { path = "../../primitives/app_promotion_rpc", default-features = false }464rmrk-rpc = { path = "../../primitives/rmrk-rpc", default-features = false }465fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }466pallet-inflation = { path = '../../pallets/inflation', default-features = false }467pallet-app-promotion = { path = '../../pallets/app-promotion', default-features = false }468up-data-structs = { path = '../../primitives/data-structs', default-features = false }469pallet-configuration = { default-features = false, path = "../../pallets/configuration" }470pallet-common = { default-features = false, path = "../../pallets/common" }471pallet-structure = { default-features = false, path = "../../pallets/structure" }472pallet-fungible = { default-features = false, path = "../../pallets/fungible" }473pallet-refungible = { default-features = false, path = "../../pallets/refungible" }474pallet-nonfungible = { default-features = false, path = "../../pallets/nonfungible" }475pallet-proxy-rmrk-core = { default-features = false, path = "../../pallets/proxy-rmrk-core", package = "pallet-rmrk-core" }476pallet-proxy-rmrk-equip = { default-features = false, path = "../../pallets/proxy-rmrk-equip", package = "pallet-rmrk-equip" }477pallet-unique-scheduler = { path = '../../pallets/scheduler', default-features = false }478pallet-charge-transaction = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.30", package = "pallet-template-transaction-payment", default-features = false, version = "3.0.0" }479pallet-evm-migration = { path = '../../pallets/evm-migration', default-features = false }480pallet-evm-contract-helpers = { path = '../../pallets/evm-contract-helpers', default-features = false }481pallet-evm-transaction-payment = { path = '../../pallets/evm-transaction-payment', default-features = false }482pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }483pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }484pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }485pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }486fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }487fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.30" }488evm-coder = { default-features = false, path = '../../crates/evm-coder' }489up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.30' }490pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" }491pallet-maintenance = { default-features = false, path = "../../pallets/maintenance" }492493################################################################################494# Test dependencies495496pallet-test-utils = { optional = true, default-features = false, path = "../../test-pallets/utils" }497498################################################################################499# Other Dependencies500501impl-trait-for-tuples = "0.2.2"502503################################################################################504# Dev Dependencies505506[dev-dependencies.logtest]507version = "2.0.0"508509################################################################################510# Build Dependencies511512[build-dependencies.substrate-wasm-builder]513git = "https://github.com/paritytech/substrate"514branch = "polkadot-v0.9.30"runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -44,6 +44,7 @@
'pallet-xcm/runtime-benchmarks',
'sp-runtime/runtime-benchmarks',
'xcm-builder/runtime-benchmarks',
+ 'pallet-maintenance/runtime-benchmarks',
]
try-runtime = [
'frame-try-runtime',
@@ -87,6 +88,7 @@
'pallet-evm-contract-helpers/try-runtime',
'pallet-evm-transaction-payment/try-runtime',
'pallet-evm-migration/try-runtime',
+ 'pallet-maintenance/try-runtime',
]
std = [
'codec/std',
@@ -165,6 +167,7 @@
"orml-xtokens/std",
"orml-traits/std",
"pallet-foreign-assets/std",
+ "pallet-maintenance/std",
]
limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
quartz-runtime = ['refungible']
@@ -487,6 +490,7 @@
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.30' }
pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" }
+pallet-maintenance = { default-features = false, path = "../../pallets/maintenance" }
################################################################################
# Other Dependencies
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -45,6 +45,7 @@
'sp-runtime/runtime-benchmarks',
'xcm-builder/runtime-benchmarks',
'up-data-structs/runtime-benchmarks',
+ 'pallet-maintenance/runtime-benchmarks',
]
try-runtime = [
'frame-try-runtime',
@@ -88,6 +89,7 @@
'pallet-evm-contract-helpers/try-runtime',
'pallet-evm-transaction-payment/try-runtime',
'pallet-evm-migration/try-runtime',
+ 'pallet-maintenance/try-runtime',
]
std = [
'codec/std',
@@ -166,6 +168,7 @@
"orml-xtokens/std",
"orml-traits/std",
"pallet-foreign-assets/std",
+ "pallet-maintenance/std",
]
limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
unique-runtime = []
@@ -482,6 +485,7 @@
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = 'polkadot-v0.9.30' }
pallet-foreign-assets = { default-features = false, path = "../../pallets/foreign-assets" }
+pallet-maintenance = { default-features = false, path = "../../pallets/maintenance" }
################################################################################
# Other Dependencies
tests/src/pallet-presence.test.tsdiffbeforeafterboth--- a/tests/src/pallet-presence.test.ts
+++ b/tests/src/pallet-presence.test.ts
@@ -47,6 +47,7 @@
'configuration',
'tokens',
'xtokens',
+ 'maintenance',
];
// Pallets that depend on consensus and governance configuration