git.delta.rocks / unique-network / refs/commits / 448eded3df3f

difftreelog

source

pallets/nft-transaction-payment/src/lib.rs931 Bsourcehistory
1//2// This file is subject to the terms and conditions defined in3// file 'LICENSE', which is part of this source code package.4//56#![cfg_attr(not(feature = "std"), no_std)]78#[cfg(feature = "std")]9pub use std::*;1011#[cfg(feature = "std")]12pub use serde::*;1314#[cfg(feature = "runtime-benchmarks")]15mod benchmarking;1617use frame_support::{decl_module, decl_storage};18use sp_std::prelude::*;19use up_sponsorship::SponsorshipHandler;2021pub trait Config: frame_system::Config + pallet_transaction_payment::Config {22	type SponsorshipHandler: SponsorshipHandler<Self::AccountId, Self::Call>;23}2425decl_storage! {26	trait Store for Module<T: Config> as NftTransactionPayment{27	}28}2930decl_module! {31	pub struct Module<T: Config> for enum Call32	where33		origin: T::Origin,34	{35	}36}3738impl<T: Config> Module<T> {39	pub fn withdraw_type(who: &T::AccountId, call: &T::Call) -> Option<T::AccountId> {40		T::SponsorshipHandler::get_sponsor(who, call)41	}42}