Enum fuel_tx::ValidationError
source · [−]#[non_exhaustive]
pub enum ValidationError {
Show 35 variants
InputWitnessIndexBounds {
index: usize,
},
InputPredicateEmpty {
index: usize,
},
InputPredicateLength {
index: usize,
},
InputPredicateDataLength {
index: usize,
},
InputPredicateOwner {
index: usize,
},
InputInvalidSignature {
index: usize,
},
InputContractAssociatedOutputContract {
index: usize,
},
InputMessageDataLength {
index: usize,
},
DuplicateInputUtxoId {
utxo_id: UtxoId,
},
DuplicateMessageInputId {
message_id: MessageId,
},
DuplicateInputContractId {
contract_id: ContractId,
},
OutputContractInputIndex {
index: usize,
},
TransactionCreateInputContract {
index: usize,
},
TransactionCreateOutputContract {
index: usize,
},
TransactionCreateOutputVariable {
index: usize,
},
TransactionCreateOutputChangeNotBaseAsset {
index: usize,
},
TransactionCreateOutputContractCreatedMultiple {
index: usize,
},
TransactionCreateBytecodeLen,
TransactionCreateBytecodeWitnessIndex,
TransactionCreateStorageSlotMax,
TransactionCreateStorageSlotOrder,
TransactionScriptLength,
TransactionScriptDataLength,
TransactionScriptOutputContractCreated {
index: usize,
},
TransactionGasLimit,
TransactionMaturity,
TransactionInputsMax,
TransactionOutputsMax,
TransactionWitnessesMax,
TransactionOutputChangeAssetIdDuplicated,
TransactionOutputChangeAssetIdNotFound(AssetId),
TransactionOutputCoinAssetIdNotFound(AssetId),
InsufficientFeeAmount {
expected: u64,
provided: u64,
},
InsufficientInputAmount {
asset: AssetId,
expected: u64,
provided: u64,
},
ArithmeticOverflow,
}
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
InputWitnessIndexBounds
Fields
index: usize
InputPredicateEmpty
Fields
index: usize
InputPredicateLength
Fields
index: usize
InputPredicateDataLength
Fields
index: usize
InputPredicateOwner
Fields
index: usize
InputInvalidSignature
Fields
index: usize
InputContractAssociatedOutputContract
Fields
index: usize
InputMessageDataLength
Fields
index: usize
DuplicateInputUtxoId
Fields
utxo_id: UtxoId
DuplicateMessageInputId
Fields
message_id: MessageId
DuplicateInputContractId
Fields
contract_id: ContractId
OutputContractInputIndex
Fields
index: usize
TransactionCreateInputContract
Fields
index: usize
TransactionCreateOutputContract
Fields
index: usize
TransactionCreateOutputVariable
Fields
index: usize
TransactionCreateOutputChangeNotBaseAsset
Fields
index: usize
TransactionCreateOutputContractCreatedMultiple
Fields
index: usize
TransactionCreateBytecodeLen
TransactionCreateBytecodeWitnessIndex
TransactionCreateStorageSlotMax
TransactionCreateStorageSlotOrder
TransactionScriptLength
TransactionScriptDataLength
TransactionScriptOutputContractCreated
Fields
index: usize
TransactionGasLimit
TransactionMaturity
TransactionInputsMax
TransactionOutputsMax
TransactionWitnessesMax
TransactionOutputChangeAssetIdDuplicated
TransactionOutputChangeAssetIdNotFound(AssetId)
TransactionOutputCoinAssetIdNotFound(AssetId)
This error happens when a transaction attempts to create a coin output for an asset type that doesn’t exist in the coin inputs.
InsufficientFeeAmount
Fields
expected: u64
The expected amount of fees required to cover the transaction
provided: u64
The fee amount actually provided for spending
The transaction doesn’t provide enough input amount of the native chain asset to cover all potential execution fees
InsufficientInputAmount
Fields
asset: AssetId
The asset id being spent
expected: u64
The amount expected by a coin output
provided: u64
The total amount provided by coin inputs
The transaction doesn’t provide enough input amount of the given asset to cover the amounts used in the outputs.
ArithmeticOverflow
The user provided amounts for coins or gas prices that caused an arithmetic overflow.
Trait Implementations
sourceimpl Clone for ValidationError
impl Clone for ValidationError
sourcefn clone(&self) -> ValidationError
fn clone(&self) -> ValidationError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ValidationError
impl Debug for ValidationError
sourceimpl Display for ValidationError
impl Display for ValidationError
sourceimpl Error for ValidationError
impl Error for ValidationError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<ValidationError> for Error
impl From<ValidationError> for Error
sourcefn from(v: ValidationError) -> Error
fn from(v: ValidationError) -> Error
Converts to this type from the input type.
sourceimpl Hash for ValidationError
impl Hash for ValidationError
sourceimpl PartialEq<ValidationError> for ValidationError
impl PartialEq<ValidationError> for ValidationError
sourcefn eq(&self, other: &ValidationError) -> bool
fn eq(&self, other: &ValidationError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ValidationError) -> bool
fn ne(&self, other: &ValidationError) -> bool
This method tests for !=
.
impl Eq for ValidationError
impl StructuralEq for ValidationError
impl StructuralPartialEq for ValidationError
Auto Trait Implementations
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnwindSafe for ValidationError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more