mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 22:11:01 +00:00
Rename pallet trait Trait to Config (#7599)
* rename Trait to Config * add test asserting using Trait is still valid. * fix ui tests
This commit is contained in:
committed by
GitHub
parent
dd3c84c362
commit
1cbfc9257f
@@ -1,5 +1,5 @@
|
||||
///! Traits and default implementation for paying transaction fees.
|
||||
use crate::Trait;
|
||||
use crate::Config;
|
||||
use codec::FullCodec;
|
||||
use frame_support::{
|
||||
traits::{Currency, ExistenceRequirement, Get, Imbalance, OnUnbalanced, WithdrawReasons},
|
||||
@@ -12,10 +12,10 @@ use sp_runtime::{
|
||||
use sp_std::{fmt::Debug, marker::PhantomData};
|
||||
|
||||
type NegativeImbalanceOf<C, T> =
|
||||
<C as Currency<<T as frame_system::Trait>::AccountId>>::NegativeImbalance;
|
||||
<C as Currency<<T as frame_system::Config>::AccountId>>::NegativeImbalance;
|
||||
|
||||
/// Handle withdrawing, refunding and depositing of transaction fees.
|
||||
pub trait OnChargeTransaction<T: Trait> {
|
||||
pub trait OnChargeTransaction<T: Config> {
|
||||
/// The underlying integer type in which fees are calculated.
|
||||
type Balance: AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default;
|
||||
type LiquidityInfo: Default;
|
||||
@@ -55,17 +55,17 @@ pub struct CurrencyAdapter<C, OU>(PhantomData<(C, OU)>);
|
||||
/// Default implementation for a Currency and an OnUnbalanced handler.
|
||||
impl<T, C, OU> OnChargeTransaction<T> for CurrencyAdapter<C, OU>
|
||||
where
|
||||
T: Trait,
|
||||
T::TransactionByteFee: Get<<C as Currency<<T as frame_system::Trait>::AccountId>>::Balance>,
|
||||
C: Currency<<T as frame_system::Trait>::AccountId>,
|
||||
T: Config,
|
||||
T::TransactionByteFee: Get<<C as Currency<<T as frame_system::Config>::AccountId>>::Balance>,
|
||||
C: Currency<<T as frame_system::Config>::AccountId>,
|
||||
C::PositiveImbalance:
|
||||
Imbalance<<C as Currency<<T as frame_system::Trait>::AccountId>>::Balance, Opposite = C::NegativeImbalance>,
|
||||
Imbalance<<C as Currency<<T as frame_system::Config>::AccountId>>::Balance, Opposite = C::NegativeImbalance>,
|
||||
C::NegativeImbalance:
|
||||
Imbalance<<C as Currency<<T as frame_system::Trait>::AccountId>>::Balance, Opposite = C::PositiveImbalance>,
|
||||
Imbalance<<C as Currency<<T as frame_system::Config>::AccountId>>::Balance, Opposite = C::PositiveImbalance>,
|
||||
OU: OnUnbalanced<NegativeImbalanceOf<C, T>>,
|
||||
{
|
||||
type LiquidityInfo = Option<NegativeImbalanceOf<C, T>>;
|
||||
type Balance = <C as Currency<<T as frame_system::Trait>::AccountId>>::Balance;
|
||||
type Balance = <C as Currency<<T as frame_system::Config>::AccountId>>::Balance;
|
||||
|
||||
/// Withdraw the predicted fee from the transaction origin.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user