pub enum PrecompileError {
Show 38 variants
OutOfGas,
Blake2WrongLength,
Blake2WrongFinalIndicatorFlag,
ModexpExpOverflow,
ModexpBaseOverflow,
ModexpModOverflow,
ModexpEip7823LimitSize,
Bn254FieldPointNotAMember,
Bn254AffineGFailedToCreate,
Bn254PairLength,
BlobInvalidInputLength,
BlobMismatchedVersion,
BlobVerifyKzgProofFailed,
NonCanonicalFp,
Bls12381G1NotOnCurve,
Bls12381G1NotInSubgroup,
Bls12381G2NotOnCurve,
Bls12381G2NotInSubgroup,
Bls12381ScalarInputLength,
Bls12381G1AddInputLength,
Bls12381G1MsmInputLength,
Bls12381G2AddInputLength,
Bls12381G2MsmInputLength,
Bls12381PairingInputLength,
Bls12381MapFpToG1InputLength,
Bls12381MapFp2ToG2InputLength,
Bls12381FpPaddingInvalid,
Bls12381FpPaddingLength,
Bls12381G1PaddingLength,
Bls12381G2PaddingLength,
KzgInvalidG1Point,
KzgG1PointNotOnCurve,
KzgG1PointNotInSubgroup,
KzgInvalidInputLength,
Secp256k1RecoverFailed,
Fatal(String),
FatalAny(AnyError),
Other(Cow<'static, str>),
}Expand description
Precompile error type.
Variants§
OutOfGas
out of gas is the main error. Others are here just for completeness
Blake2WrongLength
Blake2 errors
Blake2WrongFinalIndicatorFlag
Blake2 wrong final indicator flag
ModexpExpOverflow
Modexp errors
ModexpBaseOverflow
Modexp base overflow
ModexpModOverflow
Modexp mod overflow
ModexpEip7823LimitSize
Modexp limit all input sizes.
Bn254FieldPointNotAMember
Bn254 errors
Bn254AffineGFailedToCreate
Bn254 affine g failed to create
Bn254PairLength
Bn254 pair length
BlobInvalidInputLength
The input length is not exactly 192 bytes
BlobMismatchedVersion
The commitment does not match the versioned hash
BlobVerifyKzgProofFailed
The proof verification failed
NonCanonicalFp
Non-canonical field element
Bls12381G1NotOnCurve
BLS12-381 G1 point not on curve
Bls12381G1NotInSubgroup
BLS12-381 G1 point not in correct subgroup
Bls12381G2NotOnCurve
BLS12-381 G2 point not on curve
Bls12381G2NotInSubgroup
BLS12-381 G2 point not in correct subgroup
Bls12381ScalarInputLength
BLS12-381 scalar input length error
Bls12381G1AddInputLength
BLS12-381 G1 add input length error
Bls12381G1MsmInputLength
BLS12-381 G1 msm input length error
Bls12381G2AddInputLength
BLS12-381 G2 add input length error
Bls12381G2MsmInputLength
BLS12-381 G2 msm input length error
Bls12381PairingInputLength
BLS12-381 pairing input length error
Bls12381MapFpToG1InputLength
BLS12-381 map fp to g1 input length error
Bls12381MapFp2ToG2InputLength
BLS12-381 map fp2 to g2 input length error
Bls12381FpPaddingInvalid
BLS12-381 padding error
Bls12381FpPaddingLength
BLS12-381 fp padding length error
Bls12381G1PaddingLength
BLS12-381 g1 padding length error
Bls12381G2PaddingLength
BLS12-381 g2 padding length error
KzgInvalidG1Point
KZG invalid G1 point
KzgG1PointNotOnCurve
KZG G1 point not on curve
KzgG1PointNotInSubgroup
KZG G1 point not in correct subgroup
KzgInvalidInputLength
KZG input length error
Secp256k1RecoverFailed
secp256k1 ecrecover failed
Fatal(String)
Unrecoverable error that halts EVM execution.
Unlike other variants which result in a normal precompile revert,
this error propagates as EVMError::Custom and aborts the entire transaction.
FatalAny(AnyError)
Unrecoverable error that halts EVM execution.
Unlike other variants which result in a normal precompile revert,
this error propagates as EVMError::Custom and aborts the entire transaction.
Other(Cow<'static, str>)
Catch-all variant for precompile errors without a dedicated variant.
This is handled like any other named error variant (e.g. OutOfGas, Blake2WrongLength)
and results in a normal precompile revert, not a fatal EVM error.
Implementations§
Source§impl PrecompileError
impl PrecompileError
Sourcepub const fn other_static(err: &'static str) -> Self
pub const fn other_static(err: &'static str) -> Self
Returns another error with the given static string.
Trait Implementations§
Source§impl Clone for PrecompileError
impl Clone for PrecompileError
Source§fn clone(&self) -> PrecompileError
fn clone(&self) -> PrecompileError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PrecompileError
impl Debug for PrecompileError
Source§impl Display for PrecompileError
impl Display for PrecompileError
Source§impl Error for PrecompileError
impl Error for PrecompileError
1.30.0 · 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
use the Display impl or to_string()
Source§impl Hash for PrecompileError
impl Hash for PrecompileError
Source§impl PartialEq for PrecompileError
impl PartialEq for PrecompileError
impl Eq for PrecompileError
impl StructuralPartialEq for PrecompileError
Auto Trait Implementations§
impl Freeze for PrecompileError
impl !RefUnwindSafe for PrecompileError
impl Send for PrecompileError
impl Sync for PrecompileError
impl Unpin for PrecompileError
impl UnsafeUnpin for PrecompileError
impl !UnwindSafe for PrecompileError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.