Trait abstract_sdk::cw_helpers::Chargeable

source ·
pub trait Chargeable {
    // Required methods
    fn charge_fee(&mut self, fee: Fee) -> AbstractSdkResult<Uint128>;
    fn charge_usage_fee(
        &mut self,
        fee: UsageFee
    ) -> AbstractSdkResult<Option<CosmosMsg>>;
}
Expand description

Indicates that the implementing type can be charged fees.

Required Methods§

source

fn charge_fee(&mut self, fee: Fee) -> AbstractSdkResult<Uint128>

Charge a fee on the asset and returns the amount charged.

source

fn charge_usage_fee( &mut self, fee: UsageFee ) -> AbstractSdkResult<Option<CosmosMsg>>

Charge a fee on the asset and returns the fee transfer message.

Implementations on Foreign Types§

source§

impl Chargeable for Asset

source§

fn charge_usage_fee( &mut self, fee: UsageFee ) -> AbstractSdkResult<Option<CosmosMsg>>

returns a fee message if fee > 0

source§

fn charge_fee(&mut self, fee: Fee) -> AbstractSdkResult<Uint128>

Implementors§