git.delta.rocks / unique-network / refs/commits / b3a3ee6c7b77

difftreelog

source

pallets/nft-transaction-payment/src/lib.rs873 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::*;1314use frame_support::{decl_module, decl_storage};15use sp_std::prelude::*;16use up_sponsorship::SponsorshipHandler;1718pub trait Config: frame_system::Config + pallet_transaction_payment::Config {19	type SponsorshipHandler: SponsorshipHandler<Self::AccountId, Self::Call>;20}2122decl_storage! {23	trait Store for Module<T: Config> as NftTransactionPayment{24	}25}2627decl_module! {28	pub struct Module<T: Config> for enum Call29	where30		origin: T::Origin,31	{32	}33}3435impl<T: Config> Module<T> {36	pub fn withdraw_type(who: &T::AccountId, call: &T::Call) -> Option<T::AccountId> {37		T::SponsorshipHandler::get_sponsor(who, call)38	}39}