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§
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
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 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<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.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