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<Balance, Runtime, Target> WeightToFee for LengthToFeeImpl<Balance, Runtime, Target>
where Balance: BaseArithmetic + From<u32> + Copy + Unsigned, Runtime: Config + Config, Target: Get<Perquintill>,

Trait implementation for converting transaction length to fee.

§

type Balance = Balance

§

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