Trait pallet_inv4::fee_handling::MultisigFeeHandler
source · pub trait MultisigFeeHandler<T: Config> {
type Pre;
// Required methods
fn pre_dispatch(
asset: &FeeAsset,
who: &T::AccountId,
call: &<T as Config>::RuntimeCall,
info: &DispatchInfoOf<<T as Config>::RuntimeCall>,
len: usize,
) -> Result<Self::Pre, TransactionValidityError>;
fn post_dispatch(
asset: &FeeAsset,
pre: Option<Self::Pre>,
info: &DispatchInfoOf<<T as Config>::RuntimeCall>,
post_info: &PostDispatchInfoOf<<T as Config>::RuntimeCall>,
len: usize,
result: &DispatchResult,
) -> Result<(), TransactionValidityError>;
fn handle_creation_fee(
imbalance: FeeAssetNegativeImbalance<<T::Currency as Currency<T::AccountId>>::NegativeImbalance, Credit<T::AccountId, T::Tokens>>,
);
}
Expand description
Fee handler trait.
This should be implemented properly in the runtime to account for native and non-native assets.
Required Associated Types§
Required Methods§
sourcefn pre_dispatch(
asset: &FeeAsset,
who: &T::AccountId,
call: &<T as Config>::RuntimeCall,
info: &DispatchInfoOf<<T as Config>::RuntimeCall>,
len: usize,
) -> Result<Self::Pre, TransactionValidityError>
fn pre_dispatch( asset: &FeeAsset, who: &T::AccountId, call: &<T as Config>::RuntimeCall, info: &DispatchInfoOf<<T as Config>::RuntimeCall>, len: usize, ) -> Result<Self::Pre, TransactionValidityError>
Checks if the fee can be paid using the selected asset.
sourcefn post_dispatch(
asset: &FeeAsset,
pre: Option<Self::Pre>,
info: &DispatchInfoOf<<T as Config>::RuntimeCall>,
post_info: &PostDispatchInfoOf<<T as Config>::RuntimeCall>,
len: usize,
result: &DispatchResult,
) -> Result<(), TransactionValidityError>
fn post_dispatch( asset: &FeeAsset, pre: Option<Self::Pre>, info: &DispatchInfoOf<<T as Config>::RuntimeCall>, post_info: &PostDispatchInfoOf<<T as Config>::RuntimeCall>, len: usize, result: &DispatchResult, ) -> Result<(), TransactionValidityError>
Charges the call dispatching fee from the multisig directly.
sourcefn handle_creation_fee(
imbalance: FeeAssetNegativeImbalance<<T::Currency as Currency<T::AccountId>>::NegativeImbalance, Credit<T::AccountId, T::Tokens>>,
)
fn handle_creation_fee( imbalance: FeeAssetNegativeImbalance<<T::Currency as Currency<T::AccountId>>::NegativeImbalance, Credit<T::AccountId, T::Tokens>>, )
Charges the fee for creating the core (multisig).
Object Safety§
This trait is not object safe.