pub trait TierSlots {
    // Required method
    fn number_of_slots(price: CurrencyAmount, args: (u64, u64)) -> u16;
}
Expand description

Trait for calculating the total number of tier slots for the given price.

Required Methods§

source

fn number_of_slots(price: CurrencyAmount, args: (u64, u64)) -> u16

Returns the total number of tier slots for the given price.

§Arguments
  • price - price (e.g. moving average over some time period) of the native currency.
  • args - arguments, a & b, for the linear equation number_of_slots = a * price + b.

Returns the total number of tier slots.

Object Safety§

This trait is not object safe.

Implementors§