pub trait SwapRulesValidation<SourceAccountId, TargetAccountId, AssetId, T: Config>: SwapAction<SourceAccountId, TargetAccountId, AssetId, T> {
    // Required methods
    fn is_abstract_checking(&self) -> bool;
    fn prepare_and_validate(
        &mut self,
        source: Option<&SourceAccountId>,
        base_asset_id: &AssetId
    ) -> DispatchResult;
    fn instant_auto_claim_used(&self) -> bool;
    fn triggered_auto_claim_used(&self) -> bool;
    fn is_able_to_claim(&self) -> bool;
}

Required Methods§

source

fn is_abstract_checking(&self) -> bool

If action is only for abstract checking, shoud not apply by reserve function.

source

fn prepare_and_validate( &mut self, source: Option<&SourceAccountId>, base_asset_id: &AssetId ) -> DispatchResult

Validate action if next steps must be applied by reserve function or if source account is None, than just ability to do operation is checked.

source

fn instant_auto_claim_used(&self) -> bool

Instant auto claim is performed just after reserve. If triggered is not used, than it is one time auto claim, it will be canceled if it fails.

source

fn triggered_auto_claim_used(&self) -> bool

Triggered auto claim can be used for example for crowd like schemes. for example: when crowd aggregation if succesefull event is fired by consensus, and it is trigger.

source

fn is_able_to_claim(&self) -> bool

Predicate for posibility to claim, timeout for example, or one time for crowd schemes/

Implementations on Foreign Types§

source§

impl<SourceAccountId, TargetAccountId, AssetId, T: Config> SwapRulesValidation<SourceAccountId, TargetAccountId, AssetId, T> for ()

Implementors§