mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
PaysFee for DispatchInfo (#4165)
* Add PaysFee trait * bump version * Apply suggestions from code review Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * line width * Apply suggestions from code review Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * fix test * fix test * fix test
This commit is contained in:
committed by
Kian Paimani
parent
68818929ab
commit
04571d958b
@@ -256,7 +256,7 @@
|
||||
use rstd::marker::PhantomData;
|
||||
use support::{
|
||||
dispatch::Result, decl_module, decl_storage, decl_event,
|
||||
weights::{SimpleDispatchInfo, DispatchInfo, DispatchClass, ClassifyDispatch, WeighData, Weight},
|
||||
weights::{SimpleDispatchInfo, DispatchInfo, DispatchClass, ClassifyDispatch, WeighData, Weight, PaysFee},
|
||||
};
|
||||
use system::{ensure_signed, ensure_root};
|
||||
use codec::{Encode, Decode};
|
||||
@@ -301,6 +301,12 @@ impl<T: balances::Trait> ClassifyDispatch<(&BalanceOf<T>,)> for WeightForSetDumm
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: balances::Trait> PaysFee for WeightForSetDummy<T> {
|
||||
fn pays_fee(&self) -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
/// A type alias for the balance type from this module's point of view.
|
||||
type BalanceOf<T> = <T as balances::Trait>::Balance;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user