pub trait SimpleConstraintChecker: Debug + Encode + Decode + Clone {
    type Error: Debug;

    // Required method
    fn check(
        &self,
        input_data: &[DynamicallyTypedData],
        evicted_input_data: &[DynamicallyTypedData],
        peek_data: &[DynamicallyTypedData],
        output_data: &[DynamicallyTypedData]
    ) -> Result<TransactionPriority, Self::Error>;
}
Expand description

A particular constraint checker that a transaction can choose to be checked by. Checks whether the input and output data from a transaction meets the codified constraints.

Additional transient information may be passed to the constraint checker by including it in the fields of the constraint checker struct itself. Information passed in this way does not come from state, nor is it stored in state.

Required Associated Types§

source

type Error: Debug

The error type that this constraint checker may return

Required Methods§

source

fn check( &self, input_data: &[DynamicallyTypedData], evicted_input_data: &[DynamicallyTypedData], peek_data: &[DynamicallyTypedData], output_data: &[DynamicallyTypedData] ) -> Result<TransactionPriority, Self::Error>

The on chain logic that makes the final check for whether a transaction is valid.

Object Safety§

This trait is not object safe.

Implementors§