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.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617pub mod config;18pub mod construct_runtime;19pub mod dispatch;20pub mod ethereum;21pub mod instance;22pub mod runtime_apis;2324#[cfg(feature = "scheduler")]25pub mod scheduler;2627pub mod sponsoring;28pub mod weights;2930#[cfg(test)]31pub mod tests;3233use sp_core::H160;34use frame_support::traits::{Currency, OnUnbalanced, Imbalance};35use sp_runtime::{36 generic,37 traits::{BlakeTwo256, BlockNumberProvider},38 impl_opaque_keys,39};40use sp_std::vec::Vec;4142#[cfg(feature = "std")]43use sp_version::NativeVersion;4445use crate::{46 Runtime, RuntimeCall, Balances, Treasury, Aura, Signature, AllPalletsWithSystem,47 InherentDataExt,48};49use up_common::types::{AccountId, BlockNumber};5051#[macro_export]52macro_rules! unsupported {53 () => {54 pallet_common::unsupported!($crate::Runtime)55 };56}5758/// The address format for describing accounts.59pub type Address = sp_runtime::MultiAddress<AccountId, ()>;60/// Block header type as expected by this runtime.61pub type Header = generic::Header<BlockNumber, BlakeTwo256>;62/// Block type as expected by this runtime.63pub type Block = generic::Block<Header, UncheckedExtrinsic>;64/// A Block signed with a Justification65pub type SignedBlock = generic::SignedBlock<Block>;66/// BlockId type as expected by this runtime.67pub type BlockId = generic::BlockId<Block>;6869impl_opaque_keys! {70 pub struct SessionKeys {71 pub aura: Aura,72 }73}7475/// The version information used to identify this runtime when compiled natively.76#[cfg(feature = "std")]77pub fn native_version() -> NativeVersion {78 NativeVersion {79 runtime_version: crate::VERSION,80 can_author_with: Default::default(),81 }82}8384pub type ChargeTransactionPayment = pallet_charge_transaction::ChargeTransactionPayment<Runtime>;8586pub type SignedExtra = (87 frame_system::CheckSpecVersion<Runtime>,88 frame_system::CheckTxVersion<Runtime>,89 frame_system::CheckGenesis<Runtime>,90 frame_system::CheckEra<Runtime>,91 frame_system::CheckNonce<Runtime>,92 frame_system::CheckWeight<Runtime>,93 ChargeTransactionPayment,94 //pallet_contract_helpers::ContractHelpersExtension<Runtime>,95 pallet_ethereum::FakeTransactionFinalizer<Runtime>,96);9798/// Unchecked extrinsic type as expected by this runtime.99pub type UncheckedExtrinsic =100 fp_self_contained::UncheckedExtrinsic<Address, RuntimeCall, Signature, SignedExtra>;101102/// Extrinsic type that has already been checked.103pub type CheckedExtrinsic =104 fp_self_contained::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra, H160>;105106/// Executive: handles dispatch to the various modules.107pub type Executive = frame_executive::Executive<108 Runtime,109 Block,110 frame_system::ChainContext<Runtime>,111 Runtime,112 AllPalletsWithSystem,113>;114115type NegativeImbalance = <Balances as Currency<AccountId>>::NegativeImbalance;116117pub struct DealWithFees;118impl OnUnbalanced<NegativeImbalance> for DealWithFees {119 fn on_unbalanceds<B>(mut fees_then_tips: impl Iterator<Item = NegativeImbalance>) {120 if let Some(fees) = fees_then_tips.next() {121 // for fees, 100% to treasury122 let mut split = fees.ration(100, 0);123 if let Some(tips) = fees_then_tips.next() {124 // for tips, if any, 100% to treasury125 tips.ration_merge_into(100, 0, &mut split);126 }127 Treasury::on_unbalanced(split.0);128 // Author::on_unbalanced(split.1);129 }130 }131}132133pub struct RelayChainBlockNumberProvider<T>(sp_std::marker::PhantomData<T>);134135impl<T: cumulus_pallet_parachain_system::Config> BlockNumberProvider136 for RelayChainBlockNumberProvider<T>137{138 type BlockNumber = BlockNumber;139140 fn current_block_number() -> Self::BlockNumber {141 cumulus_pallet_parachain_system::Pallet::<T>::validation_data()142 .map(|d| d.relay_parent_number)143 .unwrap_or_default()144 }145}146147pub(crate) struct CheckInherents;148149impl cumulus_pallet_parachain_system::CheckInherents<Block> for CheckInherents {150 fn check_inherents(151 block: &Block,152 relay_state_proof: &cumulus_pallet_parachain_system::RelayChainStateProof,153 ) -> sp_inherents::CheckInherentsResult {154 let relay_chain_slot = relay_state_proof155 .read_slot()156 .expect("Could not read the relay chain slot from the proof");157158 let inherent_data =159 cumulus_primitives_timestamp::InherentDataProvider::from_relay_chain_slot_and_duration(160 relay_chain_slot,161 sp_std::time::Duration::from_secs(6),162 )163 .create_inherent_data()164 .expect("Could not create the timestamp inherent data");165166 inherent_data.check_extrinsics(block)167 }168}169170#[derive(codec::Encode, codec::Decode)]171pub enum XCMPMessage<XAccountId, XBalance> {172 /// Transfer tokens to the given account from the Parachain account.173 TransferToken(XAccountId, XBalance),174}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.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -45,6 +45,7 @@
'pallet-xcm/runtime-benchmarks',
'sp-runtime/runtime-benchmarks',
'xcm-builder/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',
'pallet-test-utils?/try-runtime',
]
std = [
@@ -169,6 +171,7 @@
"orml-traits/std",
"pallet-foreign-assets/std",
+ 'pallet-maintenance/std',
'pallet-test-utils?/std',
]
limit-testing = ['pallet-unique/limit-testing', 'up-data-structs/limit-testing']
@@ -485,6 +488,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" }
################################################################################
# Test dependencies
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