fuel_tx

Trait FormatValidityChecks

source
pub trait FormatValidityChecks {
    // Required methods
    fn check_signatures(&self, chain_id: &ChainId) -> Result<(), ValidityError>;
    fn check_without_signatures(
        &self,
        block_height: BlockHeight,
        consensus_params: &ConsensusParameters,
    ) -> Result<(), ValidityError>;

    // Provided method
    fn check(
        &self,
        block_height: BlockHeight,
        consensus_params: &ConsensusParameters,
    ) -> Result<(), ValidityError> { ... }
}
Expand description

Contains logic for stateless validations that don’t result in any reusable metadata such as spendable input balances or remaining gas. Primarily involves validating that transaction fields are correctly formatted and signed.

Required Methods§

source

fn check_signatures(&self, chain_id: &ChainId) -> Result<(), ValidityError>

Validates that all required signatures are set in the transaction and that they are valid.

source

fn check_without_signatures( &self, block_height: BlockHeight, consensus_params: &ConsensusParameters, ) -> Result<(), ValidityError>

Validates the transactions according to rules from the specification: https://github.com/FuelLabs/fuel-specs/blob/master/src/tx-format/transaction.md

Provided Methods§

source

fn check( &self, block_height: BlockHeight, consensus_params: &ConsensusParameters, ) -> Result<(), ValidityError>

Performs all stateless transaction validity checks. This includes the validity of fields according to rules in the specification and validity of signatures.

Implementors§

source§

impl FormatValidityChecks for Transaction

source§

impl FormatValidityChecks for Mint

source§

impl<Body, MetadataBody> FormatValidityChecks for ChargeableTransaction<Body, MetadataBody>
where Body: BodyConstraints + PrepareSign, Self: Clone + ChargeableBody<Body> + Serialize + Chargeable + UniqueFormatValidityChecks,