git.delta.rocks / unique-network / refs/commits / 1e3b7029ba27

difftreelog

refactor drop unused pallet

Yaroslav Bolyukin2021-11-18parent: #51e104f.patch.diff
in: master

5 files changed

deletedpallets/nft-transaction-payment/Cargo.tomldiffbeforeafterboth
--- a/pallets/nft-transaction-payment/Cargo.toml
+++ /dev/null
@@ -1,51 +0,0 @@
-[package]
-authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
-description = 'Unqiue pallet nft specific transaction payment'
-edition = '2018'
-homepage = 'https://substrate.io'
-license = 'Unlicense'
-name = 'pallet-nft-transaction-payment'
-repository = 'https://github.com/usetech-llc/nft_private/'
-version = '3.0.0'
-
-[package.metadata.docs.rs]
-targets = ['x86_64-unknown-linux-gnu']
-
-# alias "parity-scale-code" to "codec"
-[dependencies.codec]
-default-features = false
-features = ['derive']
-package = 'parity-scale-codec'
-version = '2.3.0'
-
-[dependencies]
-scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
-serde = { version = "1.0.130", default-features = false }
-frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
-frame-system = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
-pallet-transaction-payment = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
-sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
-frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
-sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
-sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
-sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
-
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" } 
-
-[features]
-default = ['std']
-std = [
-    'codec/std',
-    'serde/std',
-    'frame-support/std',
-    'frame-system/std',
-    'sp-core/std',
-    'sp-io/std',
-    'pallet-transaction-payment/std',
-    'sp-std/std',
-    'sp-runtime/std',
-    'frame-benchmarking/std',
-
-    'up-sponsorship/std',
-]
-runtime-benchmarks = ["frame-benchmarking"]
deletedpallets/nft-transaction-payment/README.mddiffbeforeafterboth
--- a/pallets/nft-transaction-payment/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# Nft Transaction Payment
-
-## Overview
-
-A module containing the sponsoring logic for paying for sponsored collections
-
-**NOTE:** The scheduled calls will be dispatched with the default filter
-for the origin: namely `frame_system::Config::BaseCallFilter` for all origin
-except root which will get no filter. And not the filter contained in origin
-use to call `fn schedule`.
-
-If a call is scheduled using proxy or whatever mecanism which adds filter,
-then those filter will not be used when dispatching the schedule call.
deletedpallets/nft-transaction-payment/src/lib.rsdiffbeforeafterboth
--- a/pallets/nft-transaction-payment/src/lib.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// This file is subject to the terms and conditions defined in
-// file 'LICENSE', which is part of this source code package.
-//
-
-#![cfg_attr(not(feature = "std"), no_std)]
-
-#[cfg(feature = "std")]
-pub use std::*;
-
-#[cfg(feature = "std")]
-pub use serde::*;
-
-use frame_support::{decl_module, decl_storage};
-use sp_std::prelude::*;
-use up_sponsorship::SponsorshipHandler;
-
-pub trait Config: frame_system::Config + pallet_transaction_payment::Config {
-	type SponsorshipHandler: SponsorshipHandler<Self::AccountId, Self::Call>;
-}
-
-decl_storage! {
-	trait Store for Module<T: Config> as NftTransactionPayment{
-	}
-}
-
-decl_module! {
-	pub struct Module<T: Config> for enum Call
-	where
-		origin: T::Origin,
-	{
-	}
-}
-
-impl<T: Config> Module<T> {
-	pub fn withdraw_type(who: &T::AccountId, call: &T::Call) -> Option<T::AccountId> {
-		T::SponsorshipHandler::get_sponsor(who, call)
-	}
-}
modifiedruntime/Cargo.tomldiffbeforeafterboth
80 'pallet-nft/std',80 'pallet-nft/std',
81 'pallet-unq-scheduler/std',81 'pallet-unq-scheduler/std',
82 'pallet-nft-charge-transaction/std',82 'pallet-nft-charge-transaction/std',
83 'pallet-nft-transaction-payment/std',
84 'nft-data-structs/std',83 'nft-data-structs/std',
85 'sp-api/std',84 'sp-api/std',
86 'sp-block-builder/std',85 'sp-block-builder/std',
384pallet-nonfungible = { default-features = false, path = "../pallets/nonfungible" }383pallet-nonfungible = { default-features = false, path = "../pallets/nonfungible" }
385pallet-unq-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }384pallet-unq-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }
386# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }385# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
387pallet-nft-transaction-payment = { path = '../pallets/nft-transaction-payment', default-features = false, version = '3.0.0' }
388pallet-nft-charge-transaction = {git = "https://github.com/UniqueNetwork/pallet-sponsoring", package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }386pallet-nft-charge-transaction = { git = "https://github.com/UniqueNetwork/pallet-sponsoring", package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }
389pallet-evm-migration = { path = '../pallets/evm-migration', default-features = false }387pallet-evm-migration = { path = '../pallets/evm-migration', default-features = false }
390pallet-evm-contract-helpers = { path = '../pallets/evm-contract-helpers', default-features = false }388pallet-evm-contract-helpers = { path = '../pallets/evm-contract-helpers', default-features = false }
modifiedruntime/src/lib.rsdiffbeforeafterboth
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -805,10 +805,6 @@
 	type WeightInfo = ();
 }
 
-impl pallet_nft_transaction_payment::Config for Runtime {
-	type SponsorshipHandler = SponsorshipHandler;
-}
-
 impl pallet_evm_transaction_payment::Config for Runtime {
 	type SponsorshipHandler = (
 		pallet_nft::NftEthSponsorshipHandler<Self>,
@@ -870,7 +866,7 @@
 		Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,
 		Nft: pallet_nft::{Pallet, Call, Storage} = 61,
 		Scheduler: pallet_unq_scheduler::{Pallet, Call, Storage, Event<T>} = 62,
-		NftPayment: pallet_nft_transaction_payment::{Pallet, Call, Storage} = 63,
+		// free = 63
 		Charging: pallet_nft_charge_transaction::{Pallet, Call, Storage } = 64,
 		// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,
 		Common: pallet_common::{Pallet, Storage, Event<T>} = 66,