mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-21 00:31:02 +00:00
Migrate pallet-transaction-payment to new pallet attribute macro (#9087)
* Migrate pallet-transaciont-payment to new pallet attribute macro Signed-off-by: koushiro <koushiro.cqx@gmail.com> * remove generic from genesis config * fix test * fix tests * fix deprecated * fix tests Signed-off-by: koushiro <koushiro.cqx@gmail.com> Co-authored-by: thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
///! Traits and default implementation for paying transaction fees.
|
||||
|
||||
use crate::Config;
|
||||
|
||||
use codec::FullCodec;
|
||||
use frame_support::{
|
||||
traits::{Currency, ExistenceRequirement, Get, Imbalance, OnUnbalanced, WithdrawReasons},
|
||||
unsigned::TransactionValidityError,
|
||||
};
|
||||
use sp_runtime::{
|
||||
traits::{AtLeast32BitUnsigned, DispatchInfoOf, MaybeSerializeDeserialize, PostDispatchInfoOf, Saturating, Zero},
|
||||
transaction_validity::InvalidTransaction,
|
||||
};
|
||||
use sp_std::{fmt::Debug, marker::PhantomData};
|
||||
|
||||
use frame_support::{
|
||||
traits::{Currency, ExistenceRequirement, Get, Imbalance, OnUnbalanced, WithdrawReasons},
|
||||
unsigned::TransactionValidityError,
|
||||
};
|
||||
|
||||
type NegativeImbalanceOf<C, T> =
|
||||
<C as Currency<<T as frame_system::Config>::AccountId>>::NegativeImbalance;
|
||||
|
||||
@@ -47,7 +50,7 @@ pub trait OnChargeTransaction<T: Config> {
|
||||
) -> Result<(), TransactionValidityError>;
|
||||
}
|
||||
|
||||
/// Implements the transaction payment for a module implementing the `Currency`
|
||||
/// Implements the transaction payment for a pallet implementing the `Currency`
|
||||
/// trait (eg. the pallet_balances) using an unbalance handler (implementing
|
||||
/// `OnUnbalanced`).
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user