Trait fuel_tx::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§
sourcefn check_signatures(&self, chain_id: &ChainId) -> Result<(), ValidityError>
fn check_signatures(&self, chain_id: &ChainId) -> Result<(), ValidityError>
Validates that all required signatures are set in the transaction and that they are valid.
sourcefn check_without_signatures(
&self,
block_height: BlockHeight,
consensus_params: &ConsensusParameters,
) -> Result<(), ValidityError>
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§
sourcefn check(
&self,
block_height: BlockHeight,
consensus_params: &ConsensusParameters,
) -> Result<(), ValidityError>
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.