pub trait WeightToFee {
    type Balance: BaseArithmetic + From<u32> + Copy + Unsigned;

    // Required method
    fn weight_to_fee(weight: &Weight) -> Self::Balance;
}
Expand description

A trait that describes the weight to fee calculation.

Required Associated Types§

type Balance: BaseArithmetic + From<u32> + Copy + Unsigned

The type that is returned as result from calculation.

Required Methods§

fn weight_to_fee(weight: &Weight) -> Self::Balance

Calculates the fee from the passed weight.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T> WeightToFee for LengthToFeeImpl<T>
where T: BaseArithmetic + From<u32> + Copy + Unsigned,

§

type Balance = T

§

impl<T> WeightToFee for IdentityFee<T>
where T: BaseArithmetic + From<u32> + Copy + Unsigned,

§

type Balance = T

§

impl<T> WeightToFee for T
where T: WeightToFeePolynomial,

§

type Balance = <T as WeightToFeePolynomial>::Balance

§

impl<T, M> WeightToFee for ConstantMultiplier<T, M>
where T: BaseArithmetic + From<u32> + Copy + Unsigned, M: Get<T>,

§

type Balance = T

§

impl<const F: u32, T> WeightToFee for FixedFee<F, T>
where T: BaseArithmetic + From<u32> + Copy + Unsigned,

§

type Balance = T