encointer_balances_tx_payment/
lib.rs1#![cfg_attr(not(feature = "std"), no_std)]
18
19use frame_support::traits::fungibles;
20use pallet_asset_tx_payment::HandleCredit;
21use pallet_transaction_payment::OnChargeTransaction;
22
23pub mod balance_conversion;
24#[cfg(test)]
25mod tests;
26
27pub use balance_conversion::*;
28
29pub type OnChargeTransactionOf<T> = <T as pallet_transaction_payment::Config>::OnChargeTransaction;
30
31pub type BalanceOf<T> = <OnChargeTransactionOf<T> as OnChargeTransaction<T>>::Balance;
32
33pub type FungiblesOf<T> = <T as pallet_asset_tx_payment::Config>::Fungibles;
34
35pub type AccountIdOf<T> = <T as frame_system::Config>::AccountId;
36
37pub type AssetBalanceOf<T> = <FungiblesOf<T> as fungibles::Inspect<AccountIdOf<T>>>::Balance;
38
39pub type AssetIdOf<T> = <FungiblesOf<T> as fungibles::Inspect<AccountIdOf<T>>>::AssetId;
40
41pub struct BurnCredit;
42impl<T> HandleCredit<<T as frame_system::Config>::AccountId, pallet_encointer_balances::Pallet<T>>
43 for BurnCredit
44where
45 T: frame_system::Config + pallet_encointer_balances::Config,
46 pallet_encointer_balances::Pallet<T>:
47 frame_support::traits::fungibles::Balanced<<T as frame_system::Config>::AccountId>,
48{
49 fn handle_credit(
50 _credit: fungibles::Credit<AccountIdOf<T>, pallet_encointer_balances::Pallet<T>>,
51 ) {
52 }
55}