pub enum OnChainError {
StackOverflow,
StackUnderflow,
InvalidOpcode,
BadJumpDest,
PCOverflow,
EmptyGas,
InvalidRange,
NotStatic,
Revert,
}
Errors that can be written on chain.
Stack is overflowed (pushed more than 1024 items to the
stack).
Stack is underflowed (poped an empty stack).
The opcode is invalid and the PC is not able to convert it to
an instruction.
PC jumped to an invalid jump destination.
PC overflowed (tries to read the next opcode which is already
the end of the code). In Yellow Paper, this is categorized the
same as InvalidOpcode.
Not enough gas to continue.
For instruction that requires reading a range, it is
invalid. This in the Yellow Paper is covered by EmptyGas.
In static context but does mutation.
Invoked by REVERT opcode.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static