Trait cfg_traits::fees::Fees
source · pub trait Fees {
type AccountId;
type Balance: Balance;
type FeeKey;
// Required methods
fn fee_value(key: Self::FeeKey) -> Self::Balance;
fn fee_to_author(
from: &Self::AccountId,
fee: Fee<Self::Balance, Self::FeeKey>
) -> DispatchResult;
fn fee_to_burn(
from: &Self::AccountId,
fee: Fee<Self::Balance, Self::FeeKey>
) -> DispatchResult;
fn fee_to_treasury(
from: &Self::AccountId,
fee: Fee<Self::Balance, Self::FeeKey>
) -> DispatchResult;
}
Expand description
A trait that used to deal with fees
Required Associated Types§
Required Methods§
Pay an amount of fee to the block author
If the from
account has not enough balance or the author is
invalid the fees are not paid.
Object Safety§
This trait is not object safe.