Enum fuel_asm::PanicReason
source · #[repr(u8)]#[non_exhaustive]pub enum PanicReason {
Show 36 variants
Success,
Revert,
OutOfGas,
TransactionValidity,
MemoryOverflow,
ArithmeticOverflow,
ContractNotFound,
MemoryOwnership,
NotEnoughBalance,
ExpectedInternalContext,
AssetIdNotFound,
InputNotFound,
OutputNotFound,
WitnessNotFound,
TransactionMaturity,
InvalidMetadataIdentifier,
MalformedCallStructure,
ReservedRegisterNotWritable,
ErrorFlag,
InvalidImmediateValue,
ExpectedCoinInput,
MaxMemoryAccess,
MemoryWriteOverlap,
ContractNotInInputs,
InternalBalanceOverflow,
ContractMaxSize,
ExpectedUnallocatedStack,
MaxStaticContractsReached,
TransferAmountCannotBeZero,
ExpectedOutputVariable,
ExpectedParentInternalContext,
IllegalJump,
ContractIdAlreadyDeployed,
ContractMismatch,
MessageDataTooLong,
UnknownPanicReason,
}
Expand description
Panic reason representation for the interpreter.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Success
0 is reserved for success, while any non-zero value indicates a failure.
Revert
Found RVRT
instruction.
OutOfGas
Execution ran out of gas.
TransactionValidity
The transaction validity is violated.
MemoryOverflow
Attempt to write outside interpreter memory boundaries.
ArithmeticOverflow
Overflow while executing arithmetic operation.
ContractNotFound
Designed contract was not found in the storage.
MemoryOwnership
Memory ownership rules are violated.
NotEnoughBalance
The asset ID balance isn’t enough for the instruction.
ExpectedInternalContext
The interpreter is expected to be in internal context.
AssetIdNotFound
The queried asset ID was not found in the state.
InputNotFound
The provided input is not found in the transaction.
OutputNotFound
The provided output is not found in the transaction.
WitnessNotFound
The provided witness is not found in the transaction.
TransactionMaturity
The transaction maturity is not valid for this request.
InvalidMetadataIdentifier
The metadata identifier is invalid.
MalformedCallStructure
The call structure is not valid.
ReservedRegisterNotWritable
The provided register does not allow write operations.
ErrorFlag
The execution resulted in an erroneous state of the interpreter.
InvalidImmediateValue
The provided immediate value is not valid for this instruction.
ExpectedCoinInput
The provided transaction input is not of type Coin
.
MaxMemoryAccess
The requested memory access exceeds the limits of the interpreter.
MemoryWriteOverlap
Two segments of the interpreter memory should not intersect for write operations.
ContractNotInInputs
The requested contract is not listed in the transaction inputs.
InternalBalanceOverflow
The internal asset ID balance overflowed with the provided instruction.
ContractMaxSize
The maximum allowed contract size is violated.
ExpectedUnallocatedStack
This instruction expects the stack area to be unallocated for this call.
MaxStaticContractsReached
The maximum allowed number of static contracts was reached for this transaction.
TransferAmountCannotBeZero
The requested transfer amount cannot be zero.
ExpectedOutputVariable
The provided transaction output should be of type Variable
.
ExpectedParentInternalContext
The expected context of the stack parent is internal.
IllegalJump
The jump instruction cannot move backwards in predicate verification.
ContractIdAlreadyDeployed
The contract ID is already deployed and can’t be overwritten.
ContractMismatch
The loaded contract mismatch expectations.
MessageDataTooLong
Attempting to send message data longer than MAX_MESSAGE_DATA_LENGTH
UnknownPanicReason
The byte can’t be mapped to any known PanicReason
.
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for PanicReason
impl<'arbitrary> Arbitrary<'arbitrary> for PanicReason
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Self
from the entirety of the given
unstructured data. Read moresource§impl Clone for PanicReason
impl Clone for PanicReason
source§fn clone(&self) -> PanicReason
fn clone(&self) -> PanicReason
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PanicReason
impl Debug for PanicReason
source§impl<'de> Deserialize<'de> for PanicReason
impl<'de> Deserialize<'de> for PanicReason
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl Display for PanicReason
impl Display for PanicReason
source§impl Error for PanicReason
Available on crate feature std
only.
impl Error for PanicReason
std
only.source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<Infallible> for PanicReason
impl From<Infallible> for PanicReason
source§fn from(_i: Infallible) -> Self
fn from(_i: Infallible) -> Self
source§impl From<PanicReason> for Error
Available on crate feature std
only.
impl From<PanicReason> for Error
std
only.source§fn from(reason: PanicReason) -> Self
fn from(reason: PanicReason) -> Self
source§impl From<TryFromSliceError> for PanicReason
impl From<TryFromSliceError> for PanicReason
source§fn from(_: TryFromSliceError) -> Self
fn from(_: TryFromSliceError) -> Self
source§impl From<u8> for PanicReason
impl From<u8> for PanicReason
source§impl Hash for PanicReason
impl Hash for PanicReason
source§impl PartialEq<PanicReason> for PanicReason
impl PartialEq<PanicReason> for PanicReason
source§fn eq(&self, other: &PanicReason) -> bool
fn eq(&self, other: &PanicReason) -> bool
self
and other
values to be equal, and is used
by ==
.