difftreelog
Merge pull request #220 from UniqueNetwork/feature/core-195
in: master
CORE-195. Sponsoring
13 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5090,10 +5090,10 @@
"pallet-evm-transaction-payment",
"pallet-inflation",
"pallet-nft",
- "pallet-nft-charge-transaction",
"pallet-nft-transaction-payment",
"pallet-randomness-collective-flip",
"pallet-sudo",
+ "pallet-template-charge-transaction",
"pallet-timestamp",
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
@@ -6010,25 +6010,6 @@
"sp-runtime",
"sp-std",
"up-sponsorship",
-]
-
-[[package]]
-name = "pallet-nft-charge-transaction"
-version = "3.0.0"
-dependencies = [
- "frame-benchmarking",
- "frame-support",
- "frame-system",
- "pallet-balances",
- "pallet-nft-transaction-payment",
- "pallet-transaction-payment",
- "parity-scale-codec",
- "scale-info",
- "serde",
- "sp-core",
- "sp-io",
- "sp-runtime",
- "sp-std",
]
[[package]]
@@ -6271,6 +6252,26 @@
]
[[package]]
+name = "pallet-template-charge-transaction"
+version = "3.0.0"
+source = "git+https://github.com/UniqueNetwork/pallet-sponsoring#e5d3354ab68face1b2ef709dc7f629803f56598d"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "pallet-balances",
+ "pallet-transaction-payment",
+ "parity-scale-codec",
+ "scale-info",
+ "serde",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+ "up-sponsorship",
+]
+
+[[package]]
name = "pallet-timestamp"
version = "4.0.0-dev"
source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.12#d76f39995315ec36980908e4b99709bd14927044"
@@ -11597,7 +11598,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f559b464de2e2bdabcac6a210d12e9b5a5973c251e102c44c585c71d51bd78e"
dependencies = [
- "cfg-if 1.0.0",
+ "cfg-if 0.1.10",
"rand 0.8.4",
"static_assertions",
]
@@ -11717,6 +11718,7 @@
[[package]]
name = "up-sponsorship"
version = "0.1.0"
+source = "git+https://github.com/UniqueNetwork/pallet-sponsoring#e5d3354ab68face1b2ef709dc7f629803f56598d"
dependencies = [
"impl-trait-for-tuples 0.2.1",
]
pallets/contract-helpers/Cargo.tomldiffbeforeafterboth--- a/pallets/contract-helpers/Cargo.toml
+++ b/pallets/contract-helpers/Cargo.toml
@@ -9,11 +9,6 @@
package = 'parity-scale-codec'
version = '2.3.0'
-[dependencies.up-sponsorship]
-default-features = false
-path = '../../primitives/sponsorship'
-version = '0.1.0'
-
[dependencies]
scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }
frame-support = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
@@ -21,6 +16,7 @@
pallet-contracts = { 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' }
sp-std = { 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"]
pallets/evm-contract-helpers/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-contract-helpers/Cargo.toml
+++ b/pallets/evm-contract-helpers/Cargo.toml
@@ -13,7 +13,7 @@
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }
pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }
-up-sponsorship = { default-features = false, path = '../../primitives/sponsorship' }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" }
log = "0.4.14"
[dependencies.codec]
pallets/evm-transaction-payment/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-transaction-payment/Cargo.toml
+++ b/pallets/evm-transaction-payment/Cargo.toml
@@ -14,7 +14,7 @@
pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }
fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }
pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }
-up-sponsorship = { default-features = false, path = '../../primitives/sponsorship' }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" }
[dependencies.codec]
default-features = false
pallets/nft-charge-transaction/Cargo.tomldiffbeforeafterboth--- a/pallets/nft-charge-transaction/Cargo.toml
+++ /dev/null
@@ -1,50 +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-charge-transaction'
-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-balances = { 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' }
-
-pallet-nft-transaction-payment = { default-features = false, path = "../nft-transaction-payment" }
-
-[features]
-default = ['std']
-std = [
- 'codec/std',
- 'serde/std',
- 'frame-support/std',
- 'frame-system/std',
- 'pallet-balances/std',
- 'pallet-transaction-payment/std',
- 'pallet-nft-transaction-payment/std',
- 'sp-std/std',
- 'sp-runtime/std',
- 'frame-benchmarking/std',
-]
-runtime-benchmarks = ["frame-benchmarking"]
pallets/nft-charge-transaction/src/lib.rsdiffbeforeafterboth--- a/pallets/nft-charge-transaction/src/lib.rs
+++ /dev/null
@@ -1,196 +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::*;
-
-use scale_info::TypeInfo;
-#[cfg(feature = "std")]
-pub use serde::*;
-
-use codec::{Decode, Encode};
-use frame_support::traits::Get;
-use frame_support::{
- decl_module, decl_storage,
- weights::{DispatchInfo, PostDispatchInfo, DispatchClass},
-};
-use sp_runtime::{
- traits::{
- DispatchInfoOf, Dispatchable, PostDispatchInfoOf, Saturating, SaturatedConversion,
- SignedExtension, Zero,
- },
- transaction_validity::{
- TransactionPriority, TransactionValidity, TransactionValidityError, ValidTransaction,
- },
- FixedPointOperand, DispatchResult,
-};
-use pallet_transaction_payment::OnChargeTransaction;
-use sp_std::prelude::*;
-
-pub trait Config: frame_system::Config + pallet_nft_transaction_payment::Config + TypeInfo {}
-
-decl_storage! {
- trait Store for Module<T: Config> as NftTransactionPayment
- {}
-}
-
-decl_module! {
-
- pub struct Module<T: Config> for enum Call
- where
- origin: T::Origin,
- {}
-}
-
-type BalanceOf<T> = <<T as pallet_transaction_payment::Config>::OnChargeTransaction as pallet_transaction_payment::OnChargeTransaction<T>>::Balance;
-
-/// Require the transactor pay for themselves and maybe include a tip to gain additional priority
-/// in the queue.
-#[derive(Encode, Decode, Clone, Eq, PartialEq, scale_info::TypeInfo)]
-pub struct ChargeTransactionPayment<T: Config>(#[codec(compact)] BalanceOf<T>);
-
-impl<T: Config + Send + Sync> sp_std::fmt::Debug for ChargeTransactionPayment<T> {
- #[cfg(feature = "std")]
- fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
- write!(f, "ChargeTransactionPayment<{:?}>", self.0)
- }
- #[cfg(not(feature = "std"))]
- fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result {
- Ok(())
- }
-}
-
-impl<T: Config> ChargeTransactionPayment<T>
-where
- T::Call: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
- BalanceOf<T>: Send + Sync + From<u64> + FixedPointOperand,
-{
- fn traditional_fee(
- len: usize,
- info: &DispatchInfoOf<T::Call>,
- tip: BalanceOf<T>,
- ) -> BalanceOf<T>
- where
- T::Call: Dispatchable<Info = DispatchInfo>,
- {
- <pallet_transaction_payment::Pallet<T>>::compute_fee(len as u32, info, tip)
- }
-
- fn get_priority(
- len: usize,
- info: &DispatchInfoOf<T::Call>,
- final_fee: BalanceOf<T>,
- ) -> TransactionPriority {
- let weight_saturation = T::BlockWeights::get().max_block / info.weight.max(1);
- let max_block_length = *T::BlockLength::get().max.get(DispatchClass::Normal);
- let len_saturation = max_block_length as u64 / (len as u64).max(1);
- let coefficient: BalanceOf<T> = weight_saturation
- .min(len_saturation)
- .saturated_into::<BalanceOf<T>>();
- final_fee
- .saturating_mul(coefficient)
- .saturated_into::<TransactionPriority>()
- }
-
- #[allow(clippy::type_complexity)]
- fn withdraw_fee(
- &self,
- who: &T::AccountId,
- call: &T::Call,
- info: &DispatchInfoOf<T::Call>,
- len: usize,
- ) -> Result<
- (
- BalanceOf<T>,
- <<T as pallet_transaction_payment::Config>::OnChargeTransaction as pallet_transaction_payment::OnChargeTransaction<T>>::LiquidityInfo,
- ),
- TransactionValidityError,
- >{
- let tip = self.0;
-
- let fee = Self::traditional_fee(len, info, tip);
-
- // Only mess with balances if fee is not zero.
- if fee.is_zero() {
- return <<T as pallet_transaction_payment::Config>::OnChargeTransaction as pallet_transaction_payment::OnChargeTransaction<T>>::withdraw_fee(who, call, info, fee, tip)
- .map(|i| (fee, i));
- }
-
- // Determine who is paying transaction fee based on ecnomic model
- // Parse call to extract collection ID and access collection sponsor
- let sponsor = <pallet_nft_transaction_payment::Module<T>>::withdraw_type(who, call);
-
- let who_pays_fee = sponsor.unwrap_or_else(|| who.clone());
-
- <<T as pallet_transaction_payment::Config>::OnChargeTransaction as pallet_transaction_payment::OnChargeTransaction<T>>::withdraw_fee(&who_pays_fee, call, info, fee, tip)
- .map(|i| (fee, i))
- }
-}
-
-impl<T: Config + Send + Sync> SignedExtension for ChargeTransactionPayment<T>
-where
- BalanceOf<T>: Send + Sync + From<u64> + FixedPointOperand,
- T::Call: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
-{
- const IDENTIFIER: &'static str = "ChargeTransactionPayment";
- type AccountId = T::AccountId;
- type Call = T::Call;
- type AdditionalSigned = ();
- type Pre = (
- // tip
- BalanceOf<T>,
- // who pays fee
- Self::AccountId,
- // imbalance resulting from withdrawing the fee
- <<T as pallet_transaction_payment::Config>::OnChargeTransaction as pallet_transaction_payment::OnChargeTransaction<T>>::LiquidityInfo,
- );
- fn additional_signed(&self) -> sp_std::result::Result<(), TransactionValidityError> {
- Ok(())
- }
-
- fn validate(
- &self,
- who: &Self::AccountId,
- call: &Self::Call,
- info: &DispatchInfoOf<Self::Call>,
- len: usize,
- ) -> TransactionValidity {
- let (fee, _) = self.withdraw_fee(who, call, info, len)?;
- Ok(ValidTransaction {
- priority: Self::get_priority(len, info, fee),
- ..Default::default()
- })
- }
-
- fn pre_dispatch(
- self,
- who: &Self::AccountId,
- call: &Self::Call,
- info: &DispatchInfoOf<Self::Call>,
- len: usize,
- ) -> Result<Self::Pre, TransactionValidityError> {
- let (_fee, imbalance) = self.withdraw_fee(who, call, info, len)?;
- Ok((self.0, who.clone(), imbalance))
- }
-
- fn post_dispatch(
- pre: Self::Pre,
- info: &DispatchInfoOf<Self::Call>,
- post_info: &PostDispatchInfoOf<Self::Call>,
- len: usize,
- _result: &DispatchResult,
- ) -> Result<(), TransactionValidityError> {
- let (tip, who, imbalance) = pre;
- let actual_fee = pallet_transaction_payment::Pallet::<T>::compute_actual_fee(
- len as u32, info, post_info, tip,
- );
- <T as pallet_transaction_payment::Config>::OnChargeTransaction::correct_and_deposit_fee(
- &who, info, post_info, actual_fee, tip, imbalance,
- )?;
- Ok(())
- }
-}
pallets/nft-transaction-payment/Cargo.tomldiffbeforeafterboth--- a/pallets/nft-transaction-payment/Cargo.toml
+++ b/pallets/nft-transaction-payment/Cargo.toml
@@ -30,7 +30,7 @@
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 = { default-features = false, path = "../../primitives/sponsorship", version = "0.1.0" }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" }
[features]
default = ['std']
pallets/nft/Cargo.tomldiffbeforeafterboth--- a/pallets/nft/Cargo.toml
+++ b/pallets/nft/Cargo.toml
@@ -126,12 +126,6 @@
path = '../../primitives/nft'
version = '0.9.0'
-[dependencies.up-sponsorship]
-default-features = false
-path = '../../primitives/sponsorship'
-version = '0.1.0'
-
-
[dependencies]
scale-info = { version = "1.0.0", default-features = false, features = [
"derive",
@@ -140,6 +134,8 @@
rlp = { default-features = false, version = "0.5.0" }
sp-api = { 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" }
+
evm-coder = { default-features = false, path = "../../crates/evm-coder" }
pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }
primitive-types = { version = "0.10.1", default-features = false, features = [
pallets/scheduler/Cargo.tomldiffbeforeafterboth--- a/pallets/scheduler/Cargo.toml
+++ b/pallets/scheduler/Cargo.toml
@@ -20,7 +20,7 @@
sp-io = { 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' }
-up-sponsorship = { default-features = false, path = "../../primitives/sponsorship", version = "0.1.0" }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" }
log = { version = "0.4.14", default-features = false }
[dev-dependencies]
primitives/sponsorship/Cargo.tomldiffbeforeafterboth--- a/primitives/sponsorship/Cargo.toml
+++ /dev/null
@@ -1,11 +0,0 @@
-[package]
-name = "up-sponsorship"
-version = "0.1.0"
-edition = "2018"
-
-[dependencies]
-impl-trait-for-tuples = "0.2.1"
-
-[features]
-default = ["std"]
-std = []
\ No newline at end of file
primitives/sponsorship/src/lib.rsdiffbeforeafterboth--- a/primitives/sponsorship/src/lib.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-#![no_std]
-
-pub trait SponsorshipHandler<AccountId, Call> {
- fn get_sponsor(who: &AccountId, call: &Call) -> Option<AccountId>;
-}
-
-impl<A, C> SponsorshipHandler<A, C> for () {
- fn get_sponsor(_who: &A, _call: &C) -> Option<A> {
- None
- }
-}
-
-macro_rules! impl_tuples {
- ($($ident:ident)+) => {
- impl<AccountId, Call, $($ident),+> SponsorshipHandler<AccountId, Call> for ($($ident,)+)
- where
- $(
- $ident: SponsorshipHandler<AccountId, Call>
- ),+
- {
- fn get_sponsor(who: &AccountId, call: &Call) -> Option<AccountId> {
- $(
- if let Some(account) = $ident::get_sponsor(who, call) {
- return Some(account);
- }
- )+
- None
- }
- }
- }
-}
-
-impl_tuples! {A}
-impl_tuples! {A B}
-impl_tuples! {A B C}
-impl_tuples! {A B C D}
-impl_tuples! {A B C D E}
-impl_tuples! {A B C D E F}
-impl_tuples! {A B C D E F G}
-impl_tuples! {A B C D E F G H}
-impl_tuples! {A B C D E F G H I}
-impl_tuples! {A B C D E F G H I J}
runtime/Cargo.tomldiffbeforeafterboth1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Substrate node nft'8edition = '2018'9homepage = 'https://unique.network'10license = 'All Rights Reserved'11name = 'nft-runtime'12repository = 'https://github.com/usetech-llc/nft_private/'13version = '0.9.12'1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std']20runtime-benchmarks = [21 'hex-literal',22 'frame-benchmarking',23 'frame-support/runtime-benchmarks',24 'frame-system-benchmarking',25 'frame-system/runtime-benchmarks',26 'pallet-evm-migration/runtime-benchmarks',27 'pallet-balances/runtime-benchmarks',28 'pallet-timestamp/runtime-benchmarks',29 'pallet-common/runtime-benchmarks',30 'pallet-fungible/runtime-benchmarks',31 'pallet-refungible/runtime-benchmarks',32 'pallet-nonfungible/runtime-benchmarks',33 'pallet-nft/runtime-benchmarks',34 'pallet-inflation/runtime-benchmarks',35 'pallet-xcm/runtime-benchmarks',36 'sp-runtime/runtime-benchmarks',37 'xcm-builder/runtime-benchmarks',38]39std = [40 'codec/std',41 'cumulus-pallet-aura-ext/std',42 'cumulus-pallet-parachain-system/std',43 'cumulus-pallet-xcm/std',44 'cumulus-pallet-xcmp-queue/std',45 'cumulus-primitives-core/std',46 'cumulus-primitives-utility/std',47 'frame-executive/std',48 'frame-support/std',49 'frame-system/std',50 'frame-system-rpc-runtime-api/std',51 'pallet-aura/std',52 'pallet-balances/std',53 # 'pallet-contracts/std',54 # 'pallet-contracts-primitives/std',55 # 'pallet-contracts-rpc-runtime-api/std',56 # 'pallet-contract-helpers/std',57 'pallet-randomness-collective-flip/std',58 'pallet-sudo/std',59 'pallet-timestamp/std',60 'pallet-transaction-payment/std',61 'pallet-transaction-payment-rpc-runtime-api/std',62 'pallet-treasury/std',63 'pallet-vesting/std',64 'pallet-evm/std',65 'pallet-evm-migration/std',66 'pallet-evm-contract-helpers/std',67 'pallet-evm-transaction-payment/std',68 'pallet-evm-coder-substrate/std',69 'pallet-ethereum/std',70 'fp-rpc/std',71 'up-rpc/std',72 'fp-self-contained/std',73 'parachain-info/std',74 'serde',75 'pallet-inflation/std',76 'pallet-common/std',77 'pallet-fungible/std',78 'pallet-refungible/std',79 'pallet-nonfungible/std',80 'pallet-nft/std',81 'pallet-unq-scheduler/std',82 'pallet-nft-charge-transaction/std',83 'pallet-nft-transaction-payment/std',84 'nft-data-structs/std',85 'sp-api/std',86 'sp-block-builder/std',87 "sp-consensus-aura/std",88 'sp-core/std',89 'sp-inherents/std',90 'sp-io/std',91 'sp-offchain/std',92 'sp-runtime/std',93 'sp-session/std',94 'sp-std/std',95 'sp-transaction-pool/std',96 'sp-version/std',97 'xcm/std',98 'xcm-builder/std',99 'xcm-executor/std',100]101limit-testing = ['pallet-nft/limit-testing', 'nft-data-structs/limit-testing']102103################################################################################104# Substrate Dependencies105106[dependencies.codec]107default-features = false108features = ['derive']109package = 'parity-scale-codec'110version = '2.3.0'111112[dependencies.frame-benchmarking]113default-features = false114git = 'https://github.com/paritytech/substrate.git'115optional = true116branch = 'polkadot-v0.9.12'117118[dependencies.frame-executive]119default-features = false120git = 'https://github.com/paritytech/substrate.git'121branch = 'polkadot-v0.9.12'122123[dependencies.frame-support]124default-features = false125git = 'https://github.com/paritytech/substrate.git'126branch = 'polkadot-v0.9.12'127128[dependencies.frame-system]129default-features = false130git = 'https://github.com/paritytech/substrate.git'131branch = 'polkadot-v0.9.12'132133[dependencies.frame-system-benchmarking]134default-features = false135git = 'https://github.com/paritytech/substrate.git'136optional = true137branch = 'polkadot-v0.9.12'138139[dependencies.frame-system-rpc-runtime-api]140default-features = false141git = 'https://github.com/paritytech/substrate.git'142branch = 'polkadot-v0.9.12'143144[dependencies.hex-literal]145optional = true146version = '0.3.3'147148[dependencies.serde]149default-features = false150features = ['derive']151optional = true152version = '1.0.130'153154[dependencies.pallet-aura]155default-features = false156git = 'https://github.com/paritytech/substrate.git'157branch = 'polkadot-v0.9.12'158159[dependencies.pallet-balances]160default-features = false161git = 'https://github.com/paritytech/substrate.git'162branch = 'polkadot-v0.9.12'163164# Contracts specific packages165# [dependencies.pallet-contracts]166# git = 'https://github.com/paritytech/substrate.git'167# default-features = false168# branch = 'polkadot-v0.9.12'169# version = '4.0.0-dev'170171# [dependencies.pallet-contracts-primitives]172# git = 'https://github.com/paritytech/substrate.git'173# default-features = false174# branch = 'polkadot-v0.9.12'175# version = '4.0.0-dev'176177# [dependencies.pallet-contracts-rpc-runtime-api]178# git = 'https://github.com/paritytech/substrate.git'179# default-features = false180# branch = 'polkadot-v0.9.12'181# version = '4.0.0-dev'182183[dependencies.pallet-randomness-collective-flip]184default-features = false185git = 'https://github.com/paritytech/substrate.git'186branch = 'polkadot-v0.9.12'187188[dependencies.pallet-sudo]189default-features = false190git = 'https://github.com/paritytech/substrate.git'191branch = 'polkadot-v0.9.12'192193[dependencies.pallet-timestamp]194default-features = false195git = 'https://github.com/paritytech/substrate.git'196branch = 'polkadot-v0.9.12'197198[dependencies.pallet-transaction-payment]199default-features = false200git = 'https://github.com/paritytech/substrate.git'201branch = 'polkadot-v0.9.12'202203[dependencies.pallet-transaction-payment-rpc-runtime-api]204default-features = false205git = 'https://github.com/paritytech/substrate.git'206branch = 'polkadot-v0.9.12'207208[dependencies.pallet-treasury]209default-features = false210git = 'https://github.com/paritytech/substrate.git'211branch = 'polkadot-v0.9.12'212213[dependencies.pallet-vesting]214default-features = false215git = 'https://github.com/paritytech/substrate.git'216branch = 'polkadot-v0.9.12'217218[dependencies.sp-arithmetic]219default-features = false220git = 'https://github.com/paritytech/substrate.git'221branch = 'polkadot-v0.9.12'222223[dependencies.sp-api]224default-features = false225git = 'https://github.com/paritytech/substrate.git'226branch = 'polkadot-v0.9.12'227228[dependencies.sp-block-builder]229default-features = false230git = 'https://github.com/paritytech/substrate.git'231branch = 'polkadot-v0.9.12'232233[dependencies.sp-core]234default-features = false235git = 'https://github.com/paritytech/substrate.git'236branch = 'polkadot-v0.9.12'237238[dependencies.sp-consensus-aura]239default-features = false240git = 'https://github.com/paritytech/substrate.git'241branch = 'polkadot-v0.9.12'242243[dependencies.sp-inherents]244default-features = false245git = 'https://github.com/paritytech/substrate.git'246branch = 'polkadot-v0.9.12'247248[dependencies.sp-io]249default-features = false250git = 'https://github.com/paritytech/substrate.git'251branch = 'polkadot-v0.9.12'252253[dependencies.sp-offchain]254default-features = false255git = 'https://github.com/paritytech/substrate.git'256branch = 'polkadot-v0.9.12'257258[dependencies.sp-runtime]259default-features = false260git = 'https://github.com/paritytech/substrate.git'261branch = 'polkadot-v0.9.12'262263[dependencies.sp-session]264default-features = false265git = 'https://github.com/paritytech/substrate.git'266branch = 'polkadot-v0.9.12'267268[dependencies.sp-std]269default-features = false270git = 'https://github.com/paritytech/substrate.git'271branch = 'polkadot-v0.9.12'272273[dependencies.sp-transaction-pool]274default-features = false275git = 'https://github.com/paritytech/substrate.git'276branch = 'polkadot-v0.9.12'277278[dependencies.sp-version]279default-features = false280git = 'https://github.com/paritytech/substrate.git'281branch = 'polkadot-v0.9.12'282283[dependencies.smallvec]284version = '1.6.1'285286################################################################################287# Cumulus dependencies288289[dependencies.parachain-info]290default-features = false291git = 'https://github.com/paritytech/cumulus.git'292branch = 'polkadot-v0.9.12'293294[dependencies.cumulus-pallet-aura-ext]295git = 'https://github.com/paritytech/cumulus.git'296branch = 'polkadot-v0.9.12'297default-features = false298299[dependencies.cumulus-pallet-parachain-system]300git = 'https://github.com/paritytech/cumulus.git'301branch = 'polkadot-v0.9.12'302default-features = false303304[dependencies.cumulus-primitives-core]305git = 'https://github.com/paritytech/cumulus.git'306branch = 'polkadot-v0.9.12'307default-features = false308309[dependencies.cumulus-pallet-xcm]310git = 'https://github.com/paritytech/cumulus.git'311branch = 'polkadot-v0.9.12'312default-features = false313314[dependencies.cumulus-pallet-dmp-queue]315git = 'https://github.com/paritytech/cumulus.git'316branch = 'polkadot-v0.9.12'317default-features = false318319[dependencies.cumulus-pallet-xcmp-queue]320git = 'https://github.com/paritytech/cumulus.git'321branch = 'polkadot-v0.9.12'322default-features = false323324[dependencies.cumulus-primitives-utility]325git = 'https://github.com/paritytech/cumulus.git'326branch = 'polkadot-v0.9.12'327default-features = false328329[dependencies.cumulus-primitives-timestamp]330git = 'https://github.com/paritytech/cumulus.git'331branch = 'polkadot-v0.9.12'332default-features = false333334################################################################################335# Polkadot dependencies336337[dependencies.polkadot-parachain]338git = 'https://github.com/paritytech/polkadot'339branch = 'release-v0.9.12'340default-features = false341342[dependencies.xcm]343git = 'https://github.com/paritytech/polkadot'344branch = 'release-v0.9.12'345default-features = false346347[dependencies.xcm-builder]348git = 'https://github.com/paritytech/polkadot'349branch = 'release-v0.9.12'350default-features = false351352[dependencies.xcm-executor]353git = 'https://github.com/paritytech/polkadot'354branch = 'release-v0.9.12'355default-features = false356357[dependencies.pallet-xcm]358git = 'https://github.com/paritytech/polkadot'359branch = 'release-v0.9.12'360default-features = false361362363################################################################################364# local dependencies365366[dependencies]367scale-info = { version = "1.0.0", default-features = false, features = [368 "derive",369] }370derivative = "2.2.0"371pallet-nft = { path = '../pallets/nft', default-features = false, version = '3.0.0' }372up-rpc = { path = "../primitives/rpc", default-features = false }373pallet-inflation = { path = '../pallets/inflation', default-features = false, version = '3.0.0' }374nft-data-structs = { path = '../primitives/nft', default-features = false, version = '0.9.0' }375pallet-common = { default-features = false, path = "../pallets/common" }376pallet-fungible = { default-features = false, path = "../pallets/fungible" }377pallet-refungible = { default-features = false, path = "../pallets/refungible" }378pallet-nonfungible = { default-features = false, path = "../pallets/nonfungible" }379pallet-unq-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }380# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }381pallet-nft-transaction-payment = { path = '../pallets/nft-transaction-payment', default-features = false, version = '3.0.0' }382pallet-nft-charge-transaction = { path = '../pallets/nft-charge-transaction', default-features = false, version = '3.0.0' }383pallet-evm-migration = { path = '../pallets/evm-migration', default-features = false }384pallet-evm-contract-helpers = { path = '../pallets/evm-contract-helpers', default-features = false }385pallet-evm-transaction-payment = { path = '../pallets/evm-transaction-payment', default-features = false }386pallet-evm-coder-substrate = { default-features = false, path = "../pallets/evm-coder-substrate" }387388pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }389pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }390fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }391fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }392393################################################################################394# Build Dependencies395396[build-dependencies.substrate-wasm-builder]397git = 'https://github.com/paritytech/substrate.git'398branch = 'polkadot-v0.9.12'1################################################################################2# Package34[package]5authors = ['Unique Network <support@uniquenetwork.io>']6build = 'build.rs'7description = 'Substrate node nft'8edition = '2018'9homepage = 'https://unique.network'10license = 'All Rights Reserved'11name = 'nft-runtime'12repository = 'https://github.com/usetech-llc/nft_private/'13version = '0.9.12'1415[package.metadata.docs.rs]16targets = ['x86_64-unknown-linux-gnu']1718[features]19default = ['std']20runtime-benchmarks = [21 'hex-literal',22 'frame-benchmarking',23 'frame-support/runtime-benchmarks',24 'frame-system-benchmarking',25 'frame-system/runtime-benchmarks',26 'pallet-evm-migration/runtime-benchmarks',27 'pallet-balances/runtime-benchmarks',28 'pallet-timestamp/runtime-benchmarks',29 'pallet-common/runtime-benchmarks',30 'pallet-fungible/runtime-benchmarks',31 'pallet-refungible/runtime-benchmarks',32 'pallet-nonfungible/runtime-benchmarks',33 'pallet-nft/runtime-benchmarks',34 'pallet-inflation/runtime-benchmarks',35 'pallet-xcm/runtime-benchmarks',36 'sp-runtime/runtime-benchmarks',37 'xcm-builder/runtime-benchmarks',38]39std = [40 'codec/std',41 'cumulus-pallet-aura-ext/std',42 'cumulus-pallet-parachain-system/std',43 'cumulus-pallet-xcm/std',44 'cumulus-pallet-xcmp-queue/std',45 'cumulus-primitives-core/std',46 'cumulus-primitives-utility/std',47 'frame-executive/std',48 'frame-support/std',49 'frame-system/std',50 'frame-system-rpc-runtime-api/std',51 'pallet-aura/std',52 'pallet-balances/std',53 # 'pallet-contracts/std',54 # 'pallet-contracts-primitives/std',55 # 'pallet-contracts-rpc-runtime-api/std',56 # 'pallet-contract-helpers/std',57 'pallet-randomness-collective-flip/std',58 'pallet-sudo/std',59 'pallet-timestamp/std',60 'pallet-transaction-payment/std',61 'pallet-transaction-payment-rpc-runtime-api/std',62 'pallet-treasury/std',63 'pallet-vesting/std',64 'pallet-evm/std',65 'pallet-evm-migration/std',66 'pallet-evm-contract-helpers/std',67 'pallet-evm-transaction-payment/std',68 'pallet-evm-coder-substrate/std',69 'pallet-ethereum/std',70 'fp-rpc/std',71 'up-rpc/std',72 'fp-self-contained/std',73 'parachain-info/std',74 'serde',75 'pallet-inflation/std',76 'pallet-common/std',77 'pallet-fungible/std',78 'pallet-refungible/std',79 'pallet-nonfungible/std',80 'pallet-nft/std',81 'pallet-unq-scheduler/std',82 'pallet-nft-charge-transaction/std',83 'pallet-nft-transaction-payment/std',84 'nft-data-structs/std',85 'sp-api/std',86 'sp-block-builder/std',87 "sp-consensus-aura/std",88 'sp-core/std',89 'sp-inherents/std',90 'sp-io/std',91 'sp-offchain/std',92 'sp-runtime/std',93 'sp-session/std',94 'sp-std/std',95 'sp-transaction-pool/std',96 'sp-version/std',97 'xcm/std',98 'xcm-builder/std',99 'xcm-executor/std',100]101limit-testing = ['pallet-nft/limit-testing', 'nft-data-structs/limit-testing']102103################################################################################104# Substrate Dependencies105106[dependencies.codec]107default-features = false108features = ['derive']109package = 'parity-scale-codec'110version = '2.3.0'111112[dependencies.frame-benchmarking]113default-features = false114git = 'https://github.com/paritytech/substrate.git'115optional = true116branch = 'polkadot-v0.9.12'117118[dependencies.frame-executive]119default-features = false120git = 'https://github.com/paritytech/substrate.git'121branch = 'polkadot-v0.9.12'122123[dependencies.frame-support]124default-features = false125git = 'https://github.com/paritytech/substrate.git'126branch = 'polkadot-v0.9.12'127128[dependencies.frame-system]129default-features = false130git = 'https://github.com/paritytech/substrate.git'131branch = 'polkadot-v0.9.12'132133[dependencies.frame-system-benchmarking]134default-features = false135git = 'https://github.com/paritytech/substrate.git'136optional = true137branch = 'polkadot-v0.9.12'138139[dependencies.frame-system-rpc-runtime-api]140default-features = false141git = 'https://github.com/paritytech/substrate.git'142branch = 'polkadot-v0.9.12'143144[dependencies.hex-literal]145optional = true146version = '0.3.3'147148[dependencies.serde]149default-features = false150features = ['derive']151optional = true152version = '1.0.130'153154[dependencies.pallet-aura]155default-features = false156git = 'https://github.com/paritytech/substrate.git'157branch = 'polkadot-v0.9.12'158159[dependencies.pallet-balances]160default-features = false161git = 'https://github.com/paritytech/substrate.git'162branch = 'polkadot-v0.9.12'163164# Contracts specific packages165# [dependencies.pallet-contracts]166# git = 'https://github.com/paritytech/substrate.git'167# default-features = false168# branch = 'polkadot-v0.9.12'169# version = '4.0.0-dev'170171# [dependencies.pallet-contracts-primitives]172# git = 'https://github.com/paritytech/substrate.git'173# default-features = false174# branch = 'polkadot-v0.9.12'175# version = '4.0.0-dev'176177# [dependencies.pallet-contracts-rpc-runtime-api]178# git = 'https://github.com/paritytech/substrate.git'179# default-features = false180# branch = 'polkadot-v0.9.12'181# version = '4.0.0-dev'182183[dependencies.pallet-randomness-collective-flip]184default-features = false185git = 'https://github.com/paritytech/substrate.git'186branch = 'polkadot-v0.9.12'187188[dependencies.pallet-sudo]189default-features = false190git = 'https://github.com/paritytech/substrate.git'191branch = 'polkadot-v0.9.12'192193[dependencies.pallet-timestamp]194default-features = false195git = 'https://github.com/paritytech/substrate.git'196branch = 'polkadot-v0.9.12'197198[dependencies.pallet-transaction-payment]199default-features = false200git = 'https://github.com/paritytech/substrate.git'201branch = 'polkadot-v0.9.12'202203[dependencies.pallet-transaction-payment-rpc-runtime-api]204default-features = false205git = 'https://github.com/paritytech/substrate.git'206branch = 'polkadot-v0.9.12'207208[dependencies.pallet-treasury]209default-features = false210git = 'https://github.com/paritytech/substrate.git'211branch = 'polkadot-v0.9.12'212213[dependencies.pallet-vesting]214default-features = false215git = 'https://github.com/paritytech/substrate.git'216branch = 'polkadot-v0.9.12'217218[dependencies.sp-arithmetic]219default-features = false220git = 'https://github.com/paritytech/substrate.git'221branch = 'polkadot-v0.9.12'222223[dependencies.sp-api]224default-features = false225git = 'https://github.com/paritytech/substrate.git'226branch = 'polkadot-v0.9.12'227228[dependencies.sp-block-builder]229default-features = false230git = 'https://github.com/paritytech/substrate.git'231branch = 'polkadot-v0.9.12'232233[dependencies.sp-core]234default-features = false235git = 'https://github.com/paritytech/substrate.git'236branch = 'polkadot-v0.9.12'237238[dependencies.sp-consensus-aura]239default-features = false240git = 'https://github.com/paritytech/substrate.git'241branch = 'polkadot-v0.9.12'242243[dependencies.sp-inherents]244default-features = false245git = 'https://github.com/paritytech/substrate.git'246branch = 'polkadot-v0.9.12'247248[dependencies.sp-io]249default-features = false250git = 'https://github.com/paritytech/substrate.git'251branch = 'polkadot-v0.9.12'252253[dependencies.sp-offchain]254default-features = false255git = 'https://github.com/paritytech/substrate.git'256branch = 'polkadot-v0.9.12'257258[dependencies.sp-runtime]259default-features = false260git = 'https://github.com/paritytech/substrate.git'261branch = 'polkadot-v0.9.12'262263[dependencies.sp-session]264default-features = false265git = 'https://github.com/paritytech/substrate.git'266branch = 'polkadot-v0.9.12'267268[dependencies.sp-std]269default-features = false270git = 'https://github.com/paritytech/substrate.git'271branch = 'polkadot-v0.9.12'272273[dependencies.sp-transaction-pool]274default-features = false275git = 'https://github.com/paritytech/substrate.git'276branch = 'polkadot-v0.9.12'277278[dependencies.sp-version]279default-features = false280git = 'https://github.com/paritytech/substrate.git'281branch = 'polkadot-v0.9.12'282283[dependencies.smallvec]284version = '1.6.1'285286################################################################################287# Cumulus dependencies288289[dependencies.parachain-info]290default-features = false291git = 'https://github.com/paritytech/cumulus.git'292branch = 'polkadot-v0.9.12'293294[dependencies.cumulus-pallet-aura-ext]295git = 'https://github.com/paritytech/cumulus.git'296branch = 'polkadot-v0.9.12'297default-features = false298299[dependencies.cumulus-pallet-parachain-system]300git = 'https://github.com/paritytech/cumulus.git'301branch = 'polkadot-v0.9.12'302default-features = false303304[dependencies.cumulus-primitives-core]305git = 'https://github.com/paritytech/cumulus.git'306branch = 'polkadot-v0.9.12'307default-features = false308309[dependencies.cumulus-pallet-xcm]310git = 'https://github.com/paritytech/cumulus.git'311branch = 'polkadot-v0.9.12'312default-features = false313314[dependencies.cumulus-pallet-dmp-queue]315git = 'https://github.com/paritytech/cumulus.git'316branch = 'polkadot-v0.9.12'317default-features = false318319[dependencies.cumulus-pallet-xcmp-queue]320git = 'https://github.com/paritytech/cumulus.git'321branch = 'polkadot-v0.9.12'322default-features = false323324[dependencies.cumulus-primitives-utility]325git = 'https://github.com/paritytech/cumulus.git'326branch = 'polkadot-v0.9.12'327default-features = false328329[dependencies.cumulus-primitives-timestamp]330git = 'https://github.com/paritytech/cumulus.git'331branch = 'polkadot-v0.9.12'332default-features = false333334################################################################################335# Polkadot dependencies336337[dependencies.polkadot-parachain]338git = 'https://github.com/paritytech/polkadot'339branch = 'release-v0.9.12'340default-features = false341342[dependencies.xcm]343git = 'https://github.com/paritytech/polkadot'344branch = 'release-v0.9.12'345default-features = false346347[dependencies.xcm-builder]348git = 'https://github.com/paritytech/polkadot'349branch = 'release-v0.9.12'350default-features = false351352[dependencies.xcm-executor]353git = 'https://github.com/paritytech/polkadot'354branch = 'release-v0.9.12'355default-features = false356357[dependencies.pallet-xcm]358git = 'https://github.com/paritytech/polkadot'359branch = 'release-v0.9.12'360default-features = false361362363################################################################################364# local dependencies365366[dependencies]367scale-info = { version = "1.0.0", default-features = false, features = [368 "derive",369] }370derivative = "2.2.0"371pallet-nft = { path = '../pallets/nft', default-features = false, version = '3.0.0' }372up-rpc = { path = "../primitives/rpc", default-features = false }373pallet-inflation = { path = '../pallets/inflation', default-features = false, version = '3.0.0' }374nft-data-structs = { path = '../primitives/nft', default-features = false, version = '0.9.0' }375pallet-common = { default-features = false, path = "../pallets/common" }376pallet-fungible = { default-features = false, path = "../pallets/fungible" }377pallet-refungible = { default-features = false, path = "../pallets/refungible" }378pallet-nonfungible = { default-features = false, path = "../pallets/nonfungible" }379pallet-unq-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }380# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }381pallet-nft-transaction-payment = { path = '../pallets/nft-transaction-payment', default-features = false, version = '3.0.0' }382pallet-nft-charge-transaction = {git = "https://github.com/UniqueNetwork/pallet-sponsoring", package = "pallet-template-transaction-payment", default-features = false, version = '3.0.0' }383pallet-evm-migration = { path = '../pallets/evm-migration', default-features = false }384pallet-evm-contract-helpers = { path = '../pallets/evm-contract-helpers', default-features = false }385pallet-evm-transaction-payment = { path = '../pallets/evm-transaction-payment', default-features = false }386pallet-evm-coder-substrate = { default-features = false, path = "../pallets/evm-coder-substrate" }387388pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }389pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }390fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }391fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }392393################################################################################394# Build Dependencies395396[build-dependencies.substrate-wasm-builder]397git = 'https://github.com/paritytech/substrate.git'398branch = 'polkadot-v0.9.12'runtime/src/lib.rsdiffbeforeafterboth--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -802,7 +802,9 @@
type Currency = Balances;
}
-impl pallet_nft_charge_transaction::Config for Runtime {}
+impl pallet_nft_charge_transaction::Config for Runtime {
+ type SponsorshipHandler = pallet_nft::NftSponsorshipHandler<Runtime>;
+}
// impl pallet_contract_helpers::Config for Runtime {
// type DefaultSponsoringRateLimit = DefaultSponsoringRateLimit;