Trait common::prelude::SwapRulesValidation
source · 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§
sourcefn is_abstract_checking(&self) -> bool
fn is_abstract_checking(&self) -> bool
If action is only for abstract checking, shoud not apply by reserve
function.
sourcefn prepare_and_validate(
&mut self,
source: Option<&SourceAccountId>,
base_asset_id: &AssetId
) -> DispatchResult
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.
sourcefn instant_auto_claim_used(&self) -> bool
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.
sourcefn triggered_auto_claim_used(&self) -> bool
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.
sourcefn is_able_to_claim(&self) -> bool
fn is_able_to_claim(&self) -> bool
Predicate for posibility to claim, timeout for example, or one time for crowd schemes/