use thiserror::Error;
#[derive(Debug, Error)]
pub enum ArchonError {
#[error("missing batcher")]
MissingBatcher,
}
#[derive(Debug, Error)]
pub enum ConfigError {
#[error("l1 client url is invalid")]
InvalidL1ClientUrl,
#[error("l2 client url is invalid")]
InvalidL2ClientUrl,
}
#[derive(Debug, Error)]
pub enum ChannelManagerError {
#[error("l1 reorg")]
L1Reorg,
#[error("l2 reorg")]
L2Reorg,
#[error("method not implemented")]
NotImplemented,
#[error("channel closed")]
ChannelClosed,
#[error("failed to lock the receiver")]
ReceiverLock,
#[error("failed to lock the sender")]
SenderLock,
}
#[derive(Debug, Error)]
pub enum TransactionManagerError {
#[error("channel closed")]
ChannelClosed,
#[error("failed to lock the receiver")]
ReceiverLock,
#[error("failed to lock the sender")]
SenderLock,
#[error("missing receiver channel")]
MissingReceiver,
#[error("missing sender channel")]
MissingSender,
#[error("transaction manager sending is locked")]
SendTransactionLocked,
#[error("missing provider")]
MissingProvider,
#[error("missing sender address")]
MissingSenderAddress,
#[error("missing l1 chain id")]
MissingL1ChainId,
#[error("missing l1 batch inbox address")]
MissingL1BatchInboxAddress,
#[error("missing transaction receipt")]
TransactionReceiptNotFound,
}