eigen_client_avsregistry/
error.rsuse alloy::contract::Error as AlloyError;
use eigen_client_elcontracts::error::ElContractsError;
use eigen_crypto_bls::error::BlsError;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum AvsRegistryError {
#[error("Failed to get bls apk registry address")]
GetBlsApkRegistry,
#[error("Failed to get quorum count")]
GetQuorumCount,
#[error("Failed to get operator state")]
GetOperatorState,
#[error("Failed to get oeprator state with registry coordinator and operator id ")]
GetOperatorStateWithRegistryCoordinatorAndOperatorId,
#[error("Failed to get current block number")]
GetBlockNumber,
#[error("block number overflowed")]
BlockNumberOverflow,
#[error("failed to get operator stake in quorum at block number")]
GetOperatorStakeInQuorumAtBlockNumber,
#[error("Failed to get operator stake in quorums at block operator id ")]
GetOperatorStakeInQuorumAtBlockOperatorId,
#[error("failed to get operator stake in quorum at current block number")]
GetOperatorStakeInQuorumAtCurrentBlockNumber,
#[error("Failed to get current quorum bitmap")]
GetCurrentQuorumBitmap,
#[error("Failed to get current stake")]
GetCurrentStake,
#[error("Check Signature indices result")]
CheckSignatureIndices,
#[error("Get Operator Id")]
GetOperatorId,
#[error("Get Operator from Id")]
GetOperatorFromId,
#[error("Get Operator Info")]
GetOperatorInfo,
#[error("Get Operator Status")]
GetOperatorStatus,
#[error("Failed to get eth_logs")]
GetEthLogs,
#[error("Failed to decode New PubKey Registration Filter")]
DecodeEventNewPubkeyRegistrationFilter,
#[error("failed to decode operator socket update filter ")]
DecodeEventOperatorSocketUpdateFilter,
#[error("Failed to get service manager")]
GetServiceManager,
#[error("Failed to get stake registry address")]
GetStakeRegistry,
#[error("Failed to get delegation manager address")]
GetDelegation,
#[error("failed to get avs registry ")]
GetAvsRegistry,
#[error("Failed to register pub key message hash")]
PubKeyRegistrationMessageHash,
#[error(" Failed to calculate operator avs registration digest hash")]
CalculateOperatorAvsRegistrationDigestHash,
#[error("Failed to register operatror")]
RegisterOperator,
#[error("Failed to update operator for quorum")]
UpdateOperatorForQuorum,
#[error("failed to deregister operator")]
DeregisterOperator,
#[error("Failed to build el chain reader")]
BuildElChainReader,
#[error("Failed to update stake foor all quorums")]
UpdateStakeForAllQuorums,
#[error("pub key g2")]
PUbKeyG2,
#[error("Could not subscribe to logs ")]
SubscribeLogs,
#[error("Alloy contract error: {0}")]
AlloyContractError(#[from] AlloyError),
#[error("ElContractsError: {0}")]
ElContractsError(String),
#[error("BlsError :{0}")]
BlsError(String),
#[error("Invalid number of quorum numbers")]
InvalidQuorumNums,
#[error("Invalid private key")]
InvalidPrivateKey,
#[error("Invalid signature")]
InvalidSignature,
#[error("big int error")]
ParseBigIntError,
}
impl From<ElContractsError> for AvsRegistryError {
fn from(err: ElContractsError) -> Self {
AvsRegistryError::ElContractsError(err.to_string())
}
}
impl From<BlsError> for AvsRegistryError {
fn from(err: BlsError) -> Self {
AvsRegistryError::BlsError(err.to_string())
}
}