Enum PrecompileError
pub enum PrecompileError {
Show 37 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),
Other(String),
}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)
Fatal error with a custom error message
Other(String)
Catch-all variant for other errors
Implementations§
§impl PrecompileError
impl PrecompileError
Trait Implementations§
§impl Clone for PrecompileError
impl Clone for PrecompileError
§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 more§impl Debug for PrecompileError
impl Debug for PrecompileError
§impl Display for PrecompileError
impl Display for PrecompileError
§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
§impl Hash for PrecompileError
impl Hash for PrecompileError
§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 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
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,
§impl<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
impl<TxEnv, T> FromRecoveredTx<&T> for TxEnvwhere
TxEnv: FromRecoveredTx<T>,
§fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv
fn from_recovered_tx(tx: &&T, sender: Address) -> TxEnv
TxEnv from a transaction and a sender address.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> Pointable for T
impl<T> Pointable for T
§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.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
impl<T> MaybeDebug for Twhere
T: Debug,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 32 bytes
Size for each variant:
OutOfGas: 0 bytesBlake2WrongLength: 0 bytesBlake2WrongFinalIndicatorFlag: 0 bytesModexpExpOverflow: 0 bytesModexpBaseOverflow: 0 bytesModexpModOverflow: 0 bytesModexpEip7823LimitSize: 0 bytesBn254FieldPointNotAMember: 0 bytesBn254AffineGFailedToCreate: 0 bytesBn254PairLength: 0 bytesBlobInvalidInputLength: 0 bytesBlobMismatchedVersion: 0 bytesBlobVerifyKzgProofFailed: 0 bytesNonCanonicalFp: 0 bytesBls12381G1NotOnCurve: 0 bytesBls12381G1NotInSubgroup: 0 bytesBls12381G2NotOnCurve: 0 bytesBls12381G2NotInSubgroup: 0 bytesBls12381ScalarInputLength: 0 bytesBls12381G1AddInputLength: 0 bytesBls12381G1MsmInputLength: 0 bytesBls12381G2AddInputLength: 0 bytesBls12381G2MsmInputLength: 0 bytesBls12381PairingInputLength: 0 bytesBls12381MapFpToG1InputLength: 0 bytesBls12381MapFp2ToG2InputLength: 0 bytesBls12381FpPaddingInvalid: 0 bytesBls12381FpPaddingLength: 0 bytesBls12381G1PaddingLength: 0 bytesBls12381G2PaddingLength: 0 bytesKzgInvalidG1Point: 0 bytesKzgG1PointNotOnCurve: 0 bytesKzgG1PointNotInSubgroup: 0 bytesKzgInvalidInputLength: 0 bytesSecp256k1RecoverFailed: 0 bytesFatal: 24 bytesOther: 24 bytes