mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 08:47:57 +00:00
decouple transaction payment and currency (#6912)
* wip: setup types * fix types * make tx payment pallet independent from balances * fix dependent tests * comments * restructure a bit and include more info * clean up ugly phantom * reduce complexity * minor doc improvements * use shorthand * doc * fix line lenght and style * readd BalanceOf * some clarifications and readability improvements * move balance type to OnChargeTransaction * remove noise * fix style * Apply suggestions from code review improved documentation Co-authored-by: Alexander Theißen <alex.theissen@me.com> * Improve naming and documentation Apply suggestions from code review Co-authored-by: Alexander Theißen <alex.theissen@me.com> * Apply suggestions from code review Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * always call withdraw_fee * move NegativeImbalanceOf to payment module * fix unused import Co-authored-by: Alexander Theißen <alex.theissen@me.com> Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -37,6 +37,7 @@ pub use frame_support::{
|
||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
||||
},
|
||||
};
|
||||
use pallet_transaction_payment::CurrencyAdapter;
|
||||
|
||||
/// Import the template pallet.
|
||||
pub use template;
|
||||
@@ -249,8 +250,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment::Trait for Runtime {
|
||||
type Currency = Balances;
|
||||
type OnTransactionPayment = ();
|
||||
type OnChargeTransaction = CurrencyAdapter<Balances, ()>;
|
||||
type TransactionByteFee = TransactionByteFee;
|
||||
type WeightToFee = IdentityFee<Balance>;
|
||||
type FeeMultiplierUpdate = ();
|
||||
|
||||
Reference in New Issue
Block a user