Enum fuel_vm::prelude::ValidationError
source · [−]#[non_exhaustive]
pub enum ValidationError {
Show 34 variants
InputCoinPredicateLength {
index: usize,
},
InputCoinPredicateDataLength {
index: usize,
},
InputCoinPredicateOwner {
index: usize,
},
InputCoinWitnessIndexBounds {
index: usize,
},
InputCoinInvalidSignature {
index: usize,
},
InputContractAssociatedOutputContract {
index: usize,
},
DuplicateInputUtxoId {
utxo_id: UtxoId,
},
DuplicateInputContractId {
contract_id: ContractId,
},
OutputContractInputIndex {
index: usize,
},
TransactionCreateInputContract {
index: usize,
},
TransactionCreateOutputContract {
index: usize,
},
TransactionCreateOutputVariable {
index: usize,
},
TransactionCreateOutputChangeNotBaseAsset {
index: usize,
},
TransactionCreateOutputContractCreatedMultiple {
index: usize,
},
TransactionCreateBytecodeLen,
TransactionCreateBytecodeWitnessIndex,
TransactionCreateStaticContractsMax,
TransactionCreateStaticContractsOrder,
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
InputCoinPredicateLength
Fields
index: usize
InputCoinPredicateDataLength
Fields
index: usize
InputCoinPredicateOwner
Fields
index: usize
InputCoinWitnessIndexBounds
Fields
index: usize
InputCoinInvalidSignature
Fields
index: usize
InputContractAssociatedOutputContract
Fields
index: usize
DuplicateInputUtxoId
Fields
utxo_id: UtxoId
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
TransactionCreateStaticContractsMax
TransactionCreateStaticContractsOrder
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<'de> Deserialize<'de> for ValidationError
impl<'de> Deserialize<'de> for ValidationError
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<ValidationError, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ValidationError, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<ValidationError> for InterpreterError
impl From<ValidationError> for InterpreterError
sourcefn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
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 !=
.
sourceimpl Serialize for ValidationError
impl Serialize for ValidationError
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more