use crate::DecodeError;
use alloy_primitives::B256;
#[derive(Debug, thiserror::Error)]
pub enum OpBlockConversionError {
#[error("Invalid genesis hash. Expected {0}, got {1}")]
InvalidGenesisHash(B256, B256),
#[error("First payload transaction has unexpected type: {0}")]
InvalidTxType(u8),
#[error("Failed to decode L1 info: {0}")]
L1InfoError(#[from] DecodeError),
#[error("Missing system config in genesis block")]
MissingSystemConfigGenesis,
#[error("Empty transactions in payload. Block hash: {0}")]
EmptyTransactions(B256),
#[error("Failed to decode EIP-1559 parameters from header's `nonce` field.")]
Eip1559DecodeError,
}