[−][src]Trait eq_primitives::FeeManager
Generic interface for calculating and charging fees. Used in Treasury and Bailsman pallets
Required methods
fn calc_fee(
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
Calculates fee that must be charged from account owner due
last_update timestamp
fn charge_fee_inner(owner: &AccountId, debt: &Balance)
Withdraws fee from owner account. Amount that should be withdrawn is
passed as debt
Provided methods
fn charge_fee(
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
Calculates and withdraws fee due last_update timestamp from owner.
Calls calc_fee and charge_fee_inner. Withdrawn amount is returned
in Result
Implementations on Foreign Types
impl<AccountId, Balance: AtLeast32Bit + Clone> FeeManager<AccountId, Balance> for ()[src]
fn calc_fee(
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>[src]
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
fn charge_fee_inner(owner: &AccountId, debt: &Balance)[src]
fn charge_fee(
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>[src]
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
impl<AccountId, Balance: AtLeast32Bit + Clone, TupleElement0: FeeManager<AccountId, Balance>> FeeManager<AccountId, Balance> for (TupleElement0,)[src]
fn calc_fee(
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>[src]
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
fn charge_fee_inner(owner: &AccountId, debt: &Balance)[src]
fn charge_fee(
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>[src]
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
impl<AccountId, Balance: AtLeast32Bit + Clone, TupleElement0: FeeManager<AccountId, Balance>, TupleElement1: FeeManager<AccountId, Balance>> FeeManager<AccountId, Balance> for (TupleElement0, TupleElement1)[src]
fn calc_fee(
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>[src]
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
fn charge_fee_inner(owner: &AccountId, debt: &Balance)[src]
fn charge_fee(
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>[src]
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
impl<AccountId, Balance: AtLeast32Bit + Clone, TupleElement0: FeeManager<AccountId, Balance>, TupleElement1: FeeManager<AccountId, Balance>, TupleElement2: FeeManager<AccountId, Balance>> FeeManager<AccountId, Balance> for (TupleElement0, TupleElement1, TupleElement2)[src]
fn calc_fee(
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>[src]
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
fn charge_fee_inner(owner: &AccountId, debt: &Balance)[src]
fn charge_fee(
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>[src]
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
impl<AccountId, Balance: AtLeast32Bit + Clone, TupleElement0: FeeManager<AccountId, Balance>, TupleElement1: FeeManager<AccountId, Balance>, TupleElement2: FeeManager<AccountId, Balance>, TupleElement3: FeeManager<AccountId, Balance>> FeeManager<AccountId, Balance> for (TupleElement0, TupleElement1, TupleElement2, TupleElement3)[src]
fn calc_fee(
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>[src]
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
fn charge_fee_inner(owner: &AccountId, debt: &Balance)[src]
fn charge_fee(
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>[src]
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
impl<AccountId, Balance: AtLeast32Bit + Clone, TupleElement0: FeeManager<AccountId, Balance>, TupleElement1: FeeManager<AccountId, Balance>, TupleElement2: FeeManager<AccountId, Balance>, TupleElement3: FeeManager<AccountId, Balance>, TupleElement4: FeeManager<AccountId, Balance>> FeeManager<AccountId, Balance> for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)[src]
fn calc_fee(
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>[src]
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>
fn charge_fee_inner(owner: &AccountId, debt: &Balance)[src]
fn charge_fee(
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>[src]
owner: &AccountId,
last_update: &u64
) -> Result<Balance, InterestRateError>