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§

source

type Pre

Type returned by pre_dispatch - implementation dependent.

Required Methods§

source

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.

source

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.

source

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.

Implementors§