difftreelog
CORE-195. Sponsoring
in: master
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
@@ -122,18 +122,14 @@
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"] }
ethereum = { version = "0.9", git = "https://github.com/purestake/ethereum", branch = "joshy-scale-info", default-features = false }
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 = '3.0.0'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-nft/runtime-benchmarks',30 'pallet-inflation/runtime-benchmarks',31 'pallet-xcm/runtime-benchmarks',32 'sp-runtime/runtime-benchmarks',33 'xcm-builder/runtime-benchmarks',34]35std = [36 'codec/std',37 'cumulus-pallet-aura-ext/std',38 'cumulus-pallet-parachain-system/std',39 'cumulus-pallet-xcm/std',40 'cumulus-pallet-xcmp-queue/std',41 'cumulus-primitives-core/std',42 'cumulus-primitives-utility/std',43 'frame-executive/std',44 'frame-support/std',45 'frame-system/std',46 'frame-system-rpc-runtime-api/std',47 'pallet-aura/std',48 'pallet-balances/std',49 # 'pallet-contracts/std',50 # 'pallet-contracts-primitives/std',51 # 'pallet-contracts-rpc-runtime-api/std',52 # 'pallet-contract-helpers/std',53 'pallet-randomness-collective-flip/std',54 'pallet-sudo/std',55 'pallet-timestamp/std',56 'pallet-transaction-payment/std',57 'pallet-transaction-payment-rpc-runtime-api/std',58 'pallet-treasury/std',59 'pallet-vesting/std',60 'pallet-evm/std',61 'pallet-evm-migration/std',62 'pallet-evm-contract-helpers/std',63 'pallet-evm-transaction-payment/std',64 'pallet-evm-coder-substrate/std',65 'pallet-ethereum/std',66 'fp-rpc/std',67 'fp-self-contained/std',68 'parachain-info/std',69 'serde',70 'pallet-inflation/std',71 'pallet-nft/std',72 'pallet-unq-scheduler/std',73 'pallet-nft-charge-transaction/std',74 'pallet-nft-transaction-payment/std',75 'nft-data-structs/std',76 'sp-api/std',77 'sp-block-builder/std',78 "sp-consensus-aura/std",79 'sp-core/std',80 'sp-inherents/std',81 'sp-io/std',82 'sp-offchain/std',83 'sp-runtime/std',84 'sp-session/std',85 'sp-std/std',86 'sp-transaction-pool/std',87 'sp-version/std',88 'xcm/std',89 'xcm-builder/std',90 'xcm-executor/std',91]92limit-testing = ['pallet-nft/limit-testing', 'nft-data-structs/limit-testing']9394################################################################################95# Substrate Dependencies9697[dependencies.codec]98default-features = false99features = ['derive']100package = 'parity-scale-codec'101version = '2.3.0'102103[dependencies.frame-benchmarking]104default-features = false105git = 'https://github.com/paritytech/substrate.git'106optional = true107branch = 'polkadot-v0.9.12'108109[dependencies.frame-executive]110default-features = false111git = 'https://github.com/paritytech/substrate.git'112branch = 'polkadot-v0.9.12'113114[dependencies.frame-support]115default-features = false116git = 'https://github.com/paritytech/substrate.git'117branch = 'polkadot-v0.9.12'118119[dependencies.frame-system]120default-features = false121git = 'https://github.com/paritytech/substrate.git'122branch = 'polkadot-v0.9.12'123124[dependencies.frame-system-benchmarking]125default-features = false126git = 'https://github.com/paritytech/substrate.git'127optional = true128branch = 'polkadot-v0.9.12'129130[dependencies.frame-system-rpc-runtime-api]131default-features = false132git = 'https://github.com/paritytech/substrate.git'133branch = 'polkadot-v0.9.12'134135[dependencies.hex-literal]136optional = true137version = '0.3.3'138139[dependencies.serde]140default-features = false141features = ['derive']142optional = true143version = '1.0.130'144145[dependencies.pallet-aura]146default-features = false147git = 'https://github.com/paritytech/substrate.git'148branch = 'polkadot-v0.9.12'149150[dependencies.pallet-balances]151default-features = false152git = 'https://github.com/paritytech/substrate.git'153branch = 'polkadot-v0.9.12'154155# Contracts specific packages156# [dependencies.pallet-contracts]157# git = 'https://github.com/paritytech/substrate.git'158# default-features = false159# branch = 'polkadot-v0.9.9'160# version = '4.0.0-dev'161162# [dependencies.pallet-contracts-primitives]163# git = 'https://github.com/paritytech/substrate.git'164# default-features = false165# branch = 'polkadot-v0.9.9'166# version = '4.0.0-dev'167168# [dependencies.pallet-contracts-rpc-runtime-api]169# git = 'https://github.com/paritytech/substrate.git'170# default-features = false171# branch = 'polkadot-v0.9.9'172# version = '4.0.0-dev'173174[dependencies.pallet-randomness-collective-flip]175default-features = false176git = 'https://github.com/paritytech/substrate.git'177branch = 'polkadot-v0.9.12'178179[dependencies.pallet-sudo]180default-features = false181git = 'https://github.com/paritytech/substrate.git'182branch = 'polkadot-v0.9.12'183184[dependencies.pallet-timestamp]185default-features = false186git = 'https://github.com/paritytech/substrate.git'187branch = 'polkadot-v0.9.12'188189[dependencies.pallet-transaction-payment]190default-features = false191git = 'https://github.com/paritytech/substrate.git'192branch = 'polkadot-v0.9.12'193194[dependencies.pallet-transaction-payment-rpc-runtime-api]195default-features = false196git = 'https://github.com/paritytech/substrate.git'197branch = 'polkadot-v0.9.12'198199[dependencies.pallet-treasury]200default-features = false201git = 'https://github.com/paritytech/substrate.git'202branch = 'polkadot-v0.9.12'203204[dependencies.pallet-vesting]205default-features = false206git = 'https://github.com/paritytech/substrate.git'207branch = 'polkadot-v0.9.12'208209[dependencies.sp-arithmetic]210default-features = false211git = 'https://github.com/paritytech/substrate.git'212branch = 'polkadot-v0.9.12'213214[dependencies.sp-api]215default-features = false216git = 'https://github.com/paritytech/substrate.git'217branch = 'polkadot-v0.9.12'218219[dependencies.sp-block-builder]220default-features = false221git = 'https://github.com/paritytech/substrate.git'222branch = 'polkadot-v0.9.12'223224[dependencies.sp-core]225default-features = false226git = 'https://github.com/paritytech/substrate.git'227branch = 'polkadot-v0.9.12'228229[dependencies.sp-consensus-aura]230default-features = false231git = 'https://github.com/paritytech/substrate.git'232branch = 'polkadot-v0.9.12'233234[dependencies.sp-inherents]235default-features = false236git = 'https://github.com/paritytech/substrate.git'237branch = 'polkadot-v0.9.12'238239[dependencies.sp-io]240default-features = false241git = 'https://github.com/paritytech/substrate.git'242branch = 'polkadot-v0.9.12'243244[dependencies.sp-offchain]245default-features = false246git = 'https://github.com/paritytech/substrate.git'247branch = 'polkadot-v0.9.12'248249[dependencies.sp-runtime]250default-features = false251git = 'https://github.com/paritytech/substrate.git'252branch = 'polkadot-v0.9.12'253254[dependencies.sp-session]255default-features = false256git = 'https://github.com/paritytech/substrate.git'257branch = 'polkadot-v0.9.12'258259[dependencies.sp-std]260default-features = false261git = 'https://github.com/paritytech/substrate.git'262branch = 'polkadot-v0.9.12'263264[dependencies.sp-transaction-pool]265default-features = false266git = 'https://github.com/paritytech/substrate.git'267branch = 'polkadot-v0.9.12'268269[dependencies.sp-version]270default-features = false271git = 'https://github.com/paritytech/substrate.git'272branch = 'polkadot-v0.9.12'273274[dependencies.smallvec]275version = '1.6.1'276277################################################################################278# Cumulus dependencies279280[dependencies.parachain-info]281default-features = false282git = 'https://github.com/paritytech/cumulus.git'283branch = 'polkadot-v0.9.12'284285[dependencies.cumulus-pallet-aura-ext]286git = 'https://github.com/paritytech/cumulus.git'287branch = 'polkadot-v0.9.12'288default-features = false289290[dependencies.cumulus-pallet-parachain-system]291git = 'https://github.com/paritytech/cumulus.git'292branch = 'polkadot-v0.9.12'293default-features = false294295[dependencies.cumulus-primitives-core]296git = 'https://github.com/paritytech/cumulus.git'297branch = 'polkadot-v0.9.12'298default-features = false299300[dependencies.cumulus-pallet-xcm]301git = 'https://github.com/paritytech/cumulus.git'302branch = 'polkadot-v0.9.12'303default-features = false304305[dependencies.cumulus-pallet-dmp-queue]306git = 'https://github.com/paritytech/cumulus.git'307branch = 'polkadot-v0.9.12'308default-features = false309310[dependencies.cumulus-pallet-xcmp-queue]311git = 'https://github.com/paritytech/cumulus.git'312branch = 'polkadot-v0.9.12'313default-features = false314315[dependencies.cumulus-primitives-utility]316git = 'https://github.com/paritytech/cumulus.git'317branch = 'polkadot-v0.9.12'318default-features = false319320[dependencies.cumulus-primitives-timestamp]321git = 'https://github.com/paritytech/cumulus.git'322branch = 'polkadot-v0.9.12'323default-features = false324325################################################################################326# Polkadot dependencies327328[dependencies.polkadot-parachain]329git = 'https://github.com/paritytech/polkadot'330branch = 'release-v0.9.12'331default-features = false332333[dependencies.xcm]334git = 'https://github.com/paritytech/polkadot'335branch = 'release-v0.9.12'336default-features = false337338[dependencies.xcm-builder]339git = 'https://github.com/paritytech/polkadot'340branch = 'release-v0.9.12'341default-features = false342343[dependencies.xcm-executor]344git = 'https://github.com/paritytech/polkadot'345branch = 'release-v0.9.12'346default-features = false347348[dependencies.pallet-xcm]349git = 'https://github.com/paritytech/polkadot'350branch = 'release-v0.9.12'351default-features = false352353354################################################################################355# local dependencies356357[dependencies]358scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }359derivative = "2.2.0"360pallet-nft = { path = '../pallets/nft', default-features = false, version = '3.0.0' }361pallet-inflation = { path = '../pallets/inflation', default-features = false, version = '3.0.0' }362nft-data-structs = { path = '../primitives/nft', default-features = false, version = '0.9.0' }363pallet-unq-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }364# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }365pallet-nft-transaction-payment = { path = '../pallets/nft-transaction-payment', default-features = false, version = '3.0.0' }366pallet-nft-charge-transaction = { path = '../pallets/nft-charge-transaction', default-features = false, version = '3.0.0' }367pallet-evm-migration = { path = '../pallets/evm-migration', default-features = false }368pallet-evm-contract-helpers = { path = '../pallets/evm-contract-helpers', default-features = false }369pallet-evm-transaction-payment = { path = '../pallets/evm-transaction-payment', default-features = false }370pallet-evm-coder-substrate = { default-features = false, path = "../pallets/evm-coder-substrate" }371372pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }373pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }374fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }375fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }376377################################################################################378# Build Dependencies379380[build-dependencies.substrate-wasm-builder]381git = 'https://github.com/paritytech/substrate.git'382branch = '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 = '3.0.0'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-nft/runtime-benchmarks',30 'pallet-inflation/runtime-benchmarks',31 'pallet-xcm/runtime-benchmarks',32 'sp-runtime/runtime-benchmarks',33 'xcm-builder/runtime-benchmarks',34]35std = [36 'codec/std',37 'cumulus-pallet-aura-ext/std',38 'cumulus-pallet-parachain-system/std',39 'cumulus-pallet-xcm/std',40 'cumulus-pallet-xcmp-queue/std',41 'cumulus-primitives-core/std',42 'cumulus-primitives-utility/std',43 'frame-executive/std',44 'frame-support/std',45 'frame-system/std',46 'frame-system-rpc-runtime-api/std',47 'pallet-aura/std',48 'pallet-balances/std',49 # 'pallet-contracts/std',50 # 'pallet-contracts-primitives/std',51 # 'pallet-contracts-rpc-runtime-api/std',52 # 'pallet-contract-helpers/std',53 'pallet-randomness-collective-flip/std',54 'pallet-sudo/std',55 'pallet-timestamp/std',56 'pallet-transaction-payment/std',57 'pallet-transaction-payment-rpc-runtime-api/std',58 'pallet-treasury/std',59 'pallet-vesting/std',60 'pallet-evm/std',61 'pallet-evm-migration/std',62 'pallet-evm-contract-helpers/std',63 'pallet-evm-transaction-payment/std',64 'pallet-evm-coder-substrate/std',65 'pallet-ethereum/std',66 'fp-rpc/std',67 'fp-self-contained/std',68 'parachain-info/std',69 'serde',70 'pallet-inflation/std',71 'pallet-nft/std',72 'pallet-unq-scheduler/std',73 'pallet-nft-charge-transaction/std',74 'pallet-nft-transaction-payment/std',75 'nft-data-structs/std',76 'sp-api/std',77 'sp-block-builder/std',78 "sp-consensus-aura/std",79 'sp-core/std',80 'sp-inherents/std',81 'sp-io/std',82 'sp-offchain/std',83 'sp-runtime/std',84 'sp-session/std',85 'sp-std/std',86 'sp-transaction-pool/std',87 'sp-version/std',88 'xcm/std',89 'xcm-builder/std',90 'xcm-executor/std',91]92limit-testing = ['pallet-nft/limit-testing', 'nft-data-structs/limit-testing']9394################################################################################95# Substrate Dependencies9697[dependencies.codec]98default-features = false99features = ['derive']100package = 'parity-scale-codec'101version = '2.3.0'102103[dependencies.frame-benchmarking]104default-features = false105git = 'https://github.com/paritytech/substrate.git'106optional = true107branch = 'polkadot-v0.9.12'108109[dependencies.frame-executive]110default-features = false111git = 'https://github.com/paritytech/substrate.git'112branch = 'polkadot-v0.9.12'113114[dependencies.frame-support]115default-features = false116git = 'https://github.com/paritytech/substrate.git'117branch = 'polkadot-v0.9.12'118119[dependencies.frame-system]120default-features = false121git = 'https://github.com/paritytech/substrate.git'122branch = 'polkadot-v0.9.12'123124[dependencies.frame-system-benchmarking]125default-features = false126git = 'https://github.com/paritytech/substrate.git'127optional = true128branch = 'polkadot-v0.9.12'129130[dependencies.frame-system-rpc-runtime-api]131default-features = false132git = 'https://github.com/paritytech/substrate.git'133branch = 'polkadot-v0.9.12'134135[dependencies.hex-literal]136optional = true137version = '0.3.3'138139[dependencies.serde]140default-features = false141features = ['derive']142optional = true143version = '1.0.130'144145[dependencies.pallet-aura]146default-features = false147git = 'https://github.com/paritytech/substrate.git'148branch = 'polkadot-v0.9.12'149150[dependencies.pallet-balances]151default-features = false152git = 'https://github.com/paritytech/substrate.git'153branch = 'polkadot-v0.9.12'154155# Contracts specific packages156# [dependencies.pallet-contracts]157# git = 'https://github.com/paritytech/substrate.git'158# default-features = false159# branch = 'polkadot-v0.9.9'160# version = '4.0.0-dev'161162# [dependencies.pallet-contracts-primitives]163# git = 'https://github.com/paritytech/substrate.git'164# default-features = false165# branch = 'polkadot-v0.9.9'166# version = '4.0.0-dev'167168# [dependencies.pallet-contracts-rpc-runtime-api]169# git = 'https://github.com/paritytech/substrate.git'170# default-features = false171# branch = 'polkadot-v0.9.9'172# version = '4.0.0-dev'173174[dependencies.pallet-randomness-collective-flip]175default-features = false176git = 'https://github.com/paritytech/substrate.git'177branch = 'polkadot-v0.9.12'178179[dependencies.pallet-sudo]180default-features = false181git = 'https://github.com/paritytech/substrate.git'182branch = 'polkadot-v0.9.12'183184[dependencies.pallet-timestamp]185default-features = false186git = 'https://github.com/paritytech/substrate.git'187branch = 'polkadot-v0.9.12'188189[dependencies.pallet-transaction-payment]190default-features = false191git = 'https://github.com/paritytech/substrate.git'192branch = 'polkadot-v0.9.12'193194[dependencies.pallet-transaction-payment-rpc-runtime-api]195default-features = false196git = 'https://github.com/paritytech/substrate.git'197branch = 'polkadot-v0.9.12'198199[dependencies.pallet-treasury]200default-features = false201git = 'https://github.com/paritytech/substrate.git'202branch = 'polkadot-v0.9.12'203204[dependencies.pallet-vesting]205default-features = false206git = 'https://github.com/paritytech/substrate.git'207branch = 'polkadot-v0.9.12'208209[dependencies.sp-arithmetic]210default-features = false211git = 'https://github.com/paritytech/substrate.git'212branch = 'polkadot-v0.9.12'213214[dependencies.sp-api]215default-features = false216git = 'https://github.com/paritytech/substrate.git'217branch = 'polkadot-v0.9.12'218219[dependencies.sp-block-builder]220default-features = false221git = 'https://github.com/paritytech/substrate.git'222branch = 'polkadot-v0.9.12'223224[dependencies.sp-core]225default-features = false226git = 'https://github.com/paritytech/substrate.git'227branch = 'polkadot-v0.9.12'228229[dependencies.sp-consensus-aura]230default-features = false231git = 'https://github.com/paritytech/substrate.git'232branch = 'polkadot-v0.9.12'233234[dependencies.sp-inherents]235default-features = false236git = 'https://github.com/paritytech/substrate.git'237branch = 'polkadot-v0.9.12'238239[dependencies.sp-io]240default-features = false241git = 'https://github.com/paritytech/substrate.git'242branch = 'polkadot-v0.9.12'243244[dependencies.sp-offchain]245default-features = false246git = 'https://github.com/paritytech/substrate.git'247branch = 'polkadot-v0.9.12'248249[dependencies.sp-runtime]250default-features = false251git = 'https://github.com/paritytech/substrate.git'252branch = 'polkadot-v0.9.12'253254[dependencies.sp-session]255default-features = false256git = 'https://github.com/paritytech/substrate.git'257branch = 'polkadot-v0.9.12'258259[dependencies.sp-std]260default-features = false261git = 'https://github.com/paritytech/substrate.git'262branch = 'polkadot-v0.9.12'263264[dependencies.sp-transaction-pool]265default-features = false266git = 'https://github.com/paritytech/substrate.git'267branch = 'polkadot-v0.9.12'268269[dependencies.sp-version]270default-features = false271git = 'https://github.com/paritytech/substrate.git'272branch = 'polkadot-v0.9.12'273274[dependencies.smallvec]275version = '1.6.1'276277################################################################################278# Cumulus dependencies279280[dependencies.parachain-info]281default-features = false282git = 'https://github.com/paritytech/cumulus.git'283branch = 'polkadot-v0.9.12'284285[dependencies.cumulus-pallet-aura-ext]286git = 'https://github.com/paritytech/cumulus.git'287branch = 'polkadot-v0.9.12'288default-features = false289290[dependencies.cumulus-pallet-parachain-system]291git = 'https://github.com/paritytech/cumulus.git'292branch = 'polkadot-v0.9.12'293default-features = false294295[dependencies.cumulus-primitives-core]296git = 'https://github.com/paritytech/cumulus.git'297branch = 'polkadot-v0.9.12'298default-features = false299300[dependencies.cumulus-pallet-xcm]301git = 'https://github.com/paritytech/cumulus.git'302branch = 'polkadot-v0.9.12'303default-features = false304305[dependencies.cumulus-pallet-dmp-queue]306git = 'https://github.com/paritytech/cumulus.git'307branch = 'polkadot-v0.9.12'308default-features = false309310[dependencies.cumulus-pallet-xcmp-queue]311git = 'https://github.com/paritytech/cumulus.git'312branch = 'polkadot-v0.9.12'313default-features = false314315[dependencies.cumulus-primitives-utility]316git = 'https://github.com/paritytech/cumulus.git'317branch = 'polkadot-v0.9.12'318default-features = false319320[dependencies.cumulus-primitives-timestamp]321git = 'https://github.com/paritytech/cumulus.git'322branch = 'polkadot-v0.9.12'323default-features = false324325################################################################################326# Polkadot dependencies327328[dependencies.polkadot-parachain]329git = 'https://github.com/paritytech/polkadot'330branch = 'release-v0.9.12'331default-features = false332333[dependencies.xcm]334git = 'https://github.com/paritytech/polkadot'335branch = 'release-v0.9.12'336default-features = false337338[dependencies.xcm-builder]339git = 'https://github.com/paritytech/polkadot'340branch = 'release-v0.9.12'341default-features = false342343[dependencies.xcm-executor]344git = 'https://github.com/paritytech/polkadot'345branch = 'release-v0.9.12'346default-features = false347348[dependencies.pallet-xcm]349git = 'https://github.com/paritytech/polkadot'350branch = 'release-v0.9.12'351default-features = false352353354################################################################################355# local dependencies356357[dependencies]358scale-info = { version = "1.0.0", default-features = false, features = ["derive"] }359derivative = "2.2.0"360pallet-nft = { path = '../pallets/nft', default-features = false, version = '3.0.0' }361pallet-inflation = { path = '../pallets/inflation', default-features = false, version = '3.0.0' }362nft-data-structs = { path = '../primitives/nft', default-features = false, version = '0.9.0' }363pallet-unq-scheduler = { path = '../pallets/scheduler', default-features = false, version = '3.0.0' }364# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }365pallet-nft-transaction-payment = { path = '../pallets/nft-transaction-payment', default-features = false, version = '3.0.0' }366pallet-nft-charge-transaction = {git = "https://github.com/UniqueNetwork/pallet-sponsoring", package = "pallet-template-charge-transaction", default-features = false, version = '3.0.0' }367pallet-evm-migration = { path = '../pallets/evm-migration', default-features = false }368pallet-evm-contract-helpers = { path = '../pallets/evm-contract-helpers', default-features = false }369pallet-evm-transaction-payment = { path = '../pallets/evm-transaction-payment', default-features = false }370pallet-evm-coder-substrate = { default-features = false, path = "../pallets/evm-coder-substrate" }371372pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }373pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }374fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }375fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12" }376377################################################################################378# Build Dependencies379380[build-dependencies.substrate-wasm-builder]381git = 'https://github.com/paritytech/substrate.git'382branch = 'polkadot-v0.9.12'runtime/src/lib.rsdiffbeforeafterboth--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -788,7 +788,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;