difftreelog
chore remove unique-scheduler leftovers
in: master
10 files changed
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,5 @@
[workspace]
default-members = ['client/*', 'node/*', 'runtime/opal']
-exclude = ['pallets/scheduler-v2']
members = [
'client/*',
'crates/*',
@@ -54,7 +53,6 @@
pallet-structure = { default-features = false, path = "pallets/structure" }
pallet-test-utils = { default-features = false, path = "test-pallets/utils" }
pallet-unique = { path = "pallets/unique", default-features = false }
-# pallet-unique-scheduler-v2 = { path = "pallets/scheduler-v2", default-features = false }
precompile-utils-macro = { path = "runtime/common/ethereum/precompiles/utils/macro" }
struct-versioning = { path = "crates/struct-versioning" }
uc-rpc = { path = "client/rpc" }
Makefilediffbeforeafterboth1.PHONY: _help2_help:3 @echo "regenerate_solidity - generate stubs/interfaces for contracts defined in native (via evm-coder)"4 @echo "evm_stubs - recompile contract stubs and ABI"5 @echo "bench - run frame-benchmarking"6 @echo " bench-evm-migration"7 @echo " bench-unique"89NATIVE_FUNGIBLE_EVM_STUBS=./pallets/balances-adapter/src/stubs10NATIVE_FUNGIBLE_EVM_ABI=./tests/src/eth/abi/nativeFungible.json1112FUNGIBLE_EVM_STUBS=./pallets/fungible/src/stubs13FUNGIBLE_EVM_ABI=./tests/src/eth/abi/fungible.json1415NONFUNGIBLE_EVM_STUBS=./pallets/nonfungible/src/stubs16NONFUNGIBLE_EVM_ABI=./tests/src/eth/abi/nonFungible.json1718REFUNGIBLE_EVM_STUBS=./pallets/refungible/src/stubs19REFUNGIBLE_EVM_ABI=./tests/src/eth/abi/reFungible.json20REFUNGIBLE_TOKEN_EVM_ABI=./tests/src/eth/abi/reFungibleToken.json2122CONTRACT_HELPERS_STUBS=./pallets/evm-contract-helpers/src/stubs/23CONTRACT_HELPERS_ABI=./tests/src/eth/abi/contractHelpers.json2425COLLECTION_HELPER_STUBS=./pallets/unique/src/eth/stubs/26COLLECTION_HELPER_ABI=./tests/src/eth/abi/collectionHelpers.json2728TESTS_API=./tests/src/eth/api/2930.PHONY: regenerate_solidity31regenerate_solidity: UniqueFungible.sol UniqueNFT.sol UniqueRefungible.sol UniqueRefungibleToken.sol ContractHelpers.sol CollectionHelpers.sol3233UniqueNativeFungible.sol:34 PACKAGE=pallet-balances-adapter NAME=erc::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh35 PACKAGE=pallet-balances-adapter NAME=erc::gen_impl OUTPUT=$(NATIVE_FUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh36 37UniqueFungible.sol:38 PACKAGE=pallet-fungible NAME=erc::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh39 PACKAGE=pallet-fungible NAME=erc::gen_impl OUTPUT=$(FUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh4041UniqueNFT.sol:42 PACKAGE=pallet-nonfungible NAME=erc::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh43 PACKAGE=pallet-nonfungible NAME=erc::gen_impl OUTPUT=$(NONFUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh4445UniqueRefungible.sol:46 PACKAGE=pallet-refungible NAME=erc::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh47 PACKAGE=pallet-refungible NAME=erc::gen_impl OUTPUT=$(REFUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh4849UniqueRefungibleToken.sol:50 PACKAGE=pallet-refungible NAME=erc_token::gen_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh51 PACKAGE=pallet-refungible NAME=erc_token::gen_impl OUTPUT=$(REFUNGIBLE_EVM_STUBS)/$@ ./.maintain/scripts/generate_sol.sh5253ContractHelpers.sol:54 PACKAGE=pallet-evm-contract-helpers NAME=eth::contract_helpers_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh55 PACKAGE=pallet-evm-contract-helpers NAME=eth::contract_helpers_impl OUTPUT=$(CONTRACT_HELPERS_STUBS)/$@ ./.maintain/scripts/generate_sol.sh5657CollectionHelpers.sol:58 PACKAGE=pallet-unique NAME=eth::collection_helper_iface OUTPUT=$(TESTS_API)/$@ ./.maintain/scripts/generate_sol.sh59 PACKAGE=pallet-unique NAME=eth::collection_helper_impl OUTPUT=$(COLLECTION_HELPER_STUBS)/$@ ./.maintain/scripts/generate_sol.sh6061UniqueNativeFungible: UniqueNativeFungible.sol62 INPUT=$(NATIVE_FUNGIBLE_EVM_STUBS)/$< OUTPUT=$(NATIVE_FUNGIBLE_EVM_STUBS)/UniqueNativeFungible.raw ./.maintain/scripts/compile_stub.sh63 INPUT=$(NATIVE_FUNGIBLE_EVM_STUBS)/$< OUTPUT=$(NATIVE_FUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh64 65UniqueFungible: UniqueFungible.sol66 INPUT=$(FUNGIBLE_EVM_STUBS)/$< OUTPUT=$(FUNGIBLE_EVM_STUBS)/UniqueFungible.raw ./.maintain/scripts/compile_stub.sh67 INPUT=$(FUNGIBLE_EVM_STUBS)/$< OUTPUT=$(FUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh6869UniqueNFT: UniqueNFT.sol70 INPUT=$(NONFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(NONFUNGIBLE_EVM_STUBS)/UniqueNFT.raw ./.maintain/scripts/compile_stub.sh71 INPUT=$(NONFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(NONFUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh7273UniqueRefungible: UniqueRefungible.sol74 INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_EVM_STUBS)/UniqueRefungible.raw ./.maintain/scripts/compile_stub.sh75 INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_EVM_ABI) ./.maintain/scripts/generate_abi.sh7677UniqueRefungibleToken: UniqueRefungibleToken.sol78 INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_EVM_STUBS)/UniqueRefungibleToken.raw ./.maintain/scripts/compile_stub.sh79 INPUT=$(REFUNGIBLE_EVM_STUBS)/$< OUTPUT=$(REFUNGIBLE_TOKEN_EVM_ABI) ./.maintain/scripts/generate_abi.sh8081ContractHelpers: ContractHelpers.sol82 INPUT=$(CONTRACT_HELPERS_STUBS)/$< OUTPUT=$(CONTRACT_HELPERS_STUBS)/ContractHelpers.raw ./.maintain/scripts/compile_stub.sh83 INPUT=$(CONTRACT_HELPERS_STUBS)/$< OUTPUT=$(CONTRACT_HELPERS_ABI) ./.maintain/scripts/generate_abi.sh8485CollectionHelpers: CollectionHelpers.sol86 INPUT=$(COLLECTION_HELPER_STUBS)/$< OUTPUT=$(COLLECTION_HELPER_STUBS)/CollectionHelpers.raw ./.maintain/scripts/compile_stub.sh87 INPUT=$(COLLECTION_HELPER_STUBS)/$< OUTPUT=$(COLLECTION_HELPER_ABI) ./.maintain/scripts/generate_abi.sh8889evm_stubs: UniqueFungible UniqueNFT UniqueRefungible UniqueRefungibleToken ContractHelpers CollectionHelpers9091.PHONY: _bench92_bench:93 cargo run --profile production --features runtime-benchmarks,$(RUNTIME) -- \94 benchmark pallet --pallet pallet-$(if $(PALLET),$(PALLET),$(error Must set PALLET)) \95 --wasm-execution compiled --extrinsic '*' \96 $(if $(TEMPLATE),$(TEMPLATE),--template=.maintain/frame-weight-template.hbs) --steps=50 --repeat=80 --heap-pages=4096 \97 --output=$(if $(OUTPUT),$(OUTPUT),./pallets/$(if $(PALLET_DIR),$(PALLET_DIR),$(PALLET))/src/weights.rs)9899.PHONY: bench-evm-migration100bench-evm-migration:101 make _bench PALLET=evm-migration102103.PHONY: bench-configuration104bench-configuration:105 make _bench PALLET=configuration106107.PHONY: bench-common108bench-common:109 make _bench PALLET=common110111.PHONY: bench-unique112bench-unique:113 make _bench PALLET=unique114115.PHONY: bench-fungible116bench-fungible:117 make _bench PALLET=fungible118119.PHONY: bench-refungible120bench-refungible:121 make _bench PALLET=refungible122123.PHONY: bench-nonfungible124bench-nonfungible:125 make _bench PALLET=nonfungible126127.PHONY: bench-structure128bench-structure:129 make _bench PALLET=structure130131.PHONY: bench-scheduler132bench-scheduler:133 make _bench PALLET=unique-scheduler-v2 PALLET_DIR=scheduler-v2134135.PHONY: bench-foreign-assets136bench-foreign-assets:137 make _bench PALLET=foreign-assets138139.PHONY: bench-collator-selection140bench-collator-selection:141 make _bench PALLET=collator-selection142143.PHONY: bench-identity144bench-identity:145 make _bench PALLET=identity146147.PHONY: bench-app-promotion148bench-app-promotion:149 make _bench PALLET=app-promotion150151.PHONY: bench-maintenance152bench-maintenance:153 make _bench PALLET=maintenance154155.PHONY: bench-xcm156bench-xcm:157 make _bench PALLET=xcm OUTPUT=./runtime/common/weights/xcm.rs TEMPLATE="--template=.maintain/external-weight-template.hbs"158159.PHONY: bench160# Disabled: bench-scheduler161bench: bench-app-promotion bench-common bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-configuration bench-foreign-assets bench-maintenance bench-xcm bench-collator-selection bench-identity162163.PHONY: check164check:165 SKIP_WASM_BUILD=1 cargo check --features=quartz-runtime,unique-runtime,try-runtime,runtime-benchmarks --tests166167.PHONY: clippy168clippy:169 cargo clippy --features=quartz-runtime,unique-runtime,try-runtime,runtime-benchmarks --tests170171.PHONY: git-hooks172git-hooks:173 cp .githooks/pre-commit .git/hooks/pre-commit174175.PHONY: init176init:177 make git-hooks178 cd tests179 yarn installruntime/common/config/pallets/mod.rsdiffbeforeafterboth--- a/runtime/common/config/pallets/mod.rs
+++ b/runtime/common/config/pallets/mod.rs
@@ -40,9 +40,6 @@
Balances, Runtime, RuntimeCall, RuntimeEvent, DECIMALS, TOKEN_SYMBOL, VERSION,
};
-#[cfg(feature = "unique-scheduler")]
-pub mod scheduler;
-
#[cfg(feature = "foreign-assets")]
pub mod foreign_asset;
runtime/common/config/pallets/scheduler.rsdiffbeforeafterboth--- a/runtime/common/config/pallets/scheduler.rs
+++ /dev/null
@@ -1,88 +0,0 @@
-// 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 core::cmp::Ordering;
-
-use frame_support::{
- parameter_types,
- traits::{EnsureOrigin, PrivilegeCmp},
- weights::Weight,
-};
-use frame_system::{EnsureRoot, RawOrigin};
-use pallet_unique_scheduler_v2::ScheduledEnsureOriginSuccess;
-use parity_scale_codec::Decode;
-use sp_runtime::Perbill;
-use up_common::types::AccountId;
-
-use crate::{
- runtime_common::{config::substrate::RuntimeBlockWeights, scheduler::SchedulerPaymentExecutor},
- OriginCaller, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin,
-};
-
-parameter_types! {
- pub MaximumSchedulerWeight: Weight = Perbill::from_percent(50) *
- RuntimeBlockWeights::get().max_block;
- pub const MaxScheduledPerBlock: u32 = 50;
-
- pub const NoPreimagePostponement: Option<u32> = Some(10);
- pub const Preimage: Option<u32> = Some(10);
-}
-
-pub struct EnsureSignedOrRoot<AccountId>(sp_std::marker::PhantomData<AccountId>);
-impl<O: Into<Result<RawOrigin<AccountId>, O>> + From<RawOrigin<AccountId>>, AccountId: Decode>
- EnsureOrigin<O> for EnsureSignedOrRoot<AccountId>
-{
- type Success = ScheduledEnsureOriginSuccess<AccountId>;
- fn try_origin(o: O) -> Result<Self::Success, O> {
- o.into().and_then(|o| match o {
- RawOrigin::Root => Ok(ScheduledEnsureOriginSuccess::Root),
- RawOrigin::Signed(who) => Ok(ScheduledEnsureOriginSuccess::Signed(who)),
- r => Err(O::from(r)),
- })
- }
-}
-
-pub struct EqualOrRootOnly;
-impl PrivilegeCmp<OriginCaller> for EqualOrRootOnly {
- fn cmp_privilege(left: &OriginCaller, right: &OriginCaller) -> Option<Ordering> {
- use RawOrigin::*;
-
- let left = left.clone().try_into().ok()?;
- let right = right.clone().try_into().ok()?;
-
- match (left, right) {
- (Root, Root) => Some(Ordering::Equal),
- (Root, _) => Some(Ordering::Greater),
- (_, Root) => Some(Ordering::Less),
- lr @ _ => (lr.0 == lr.1).then(|| Ordering::Equal),
- }
- }
-}
-
-impl pallet_unique_scheduler_v2::Config for Runtime {
- type RuntimeEvent = RuntimeEvent;
- type RuntimeOrigin = RuntimeOrigin;
- type PalletsOrigin = OriginCaller;
- type RuntimeCall = RuntimeCall;
- type MaximumWeight = MaximumSchedulerWeight;
- type ScheduleOrigin = EnsureSignedOrRoot<AccountId>;
- type OriginPrivilegeCmp = EqualOrRootOnly;
- type MaxScheduledPerBlock = MaxScheduledPerBlock;
- type WeightInfo = ();
- type Preimages = ();
- type CallExecutor = SchedulerPaymentExecutor;
- type PrioritySetOrigin = EnsureRoot<AccountId>;
-}
runtime/common/maintenance.rsdiffbeforeafterboth--- a/runtime/common/maintenance.rs
+++ b/runtime/common/maintenance.rs
@@ -67,9 +67,6 @@
| RuntimeCall::Structure(_)
| RuntimeCall::Unique(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
- #[cfg(feature = "unique-scheduler")]
- RuntimeCall::Scheduler(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
-
#[cfg(feature = "app-promotion")]
RuntimeCall::AppPromotion(_) => {
Err(TransactionValidityError::Invalid(InvalidTransaction::Call))
runtime/common/mod.rsdiffbeforeafterboth--- a/runtime/common/mod.rs
+++ b/runtime/common/mod.rs
@@ -23,9 +23,6 @@
pub mod maintenance;
pub mod runtime_apis;
-#[cfg(feature = "unique-scheduler")]
-pub mod scheduler;
-
pub mod sponsoring;
#[allow(missing_docs)]
pub mod weights;
runtime/common/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -548,9 +548,6 @@
#[cfg(feature = "refungible")]
list_benchmark!(list, extra, pallet_refungible, Refungible);
- #[cfg(feature = "unique-scheduler")]
- list_benchmark!(list, extra, pallet_unique_scheduler_v2, Scheduler);
-
#[cfg(feature = "collator-selection")]
list_benchmark!(list, extra, pallet_collator_selection, CollatorSelection);
@@ -613,9 +610,6 @@
#[cfg(feature = "refungible")]
add_benchmark!(params, batches, pallet_refungible, Refungible);
-
- #[cfg(feature = "unique-scheduler")]
- add_benchmark!(params, batches, pallet_unique_scheduler_v2, Scheduler);
#[cfg(feature = "collator-selection")]
add_benchmark!(params, batches, pallet_collator_selection, CollatorSelection);
runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -229,7 +229,6 @@
preimage = []
refungible = []
session-test-timings = []
-unique-scheduler = []
################################################################################
# local dependencies
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -221,7 +221,6 @@
preimage = []
refungible = []
session-test-timings = []
-unique-scheduler = []
################################################################################
# local dependencies
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -224,7 +224,6 @@
preimage = []
refungible = []
session-test-timings = []
-unique-scheduler = []
################################################################################
# local dependencies