use thiserror::Error;
#[derive(Debug, Error)]
pub enum VarroError {
#[error("missing client")]
MissingClient,
}
#[derive(Debug, Error)]
pub enum RollupNodeError {
#[error("failed to create a new rollup node from the given rpc url: {0}")]
RollupNodeInvalidUrl(String),
}
#[derive(Debug, Error)]
pub enum ConfigError {
#[error("l1 client url is invalid")]
InvalidL1ClientUrl,
#[error("rollup node rpc url is invalid")]
InvalidRollupNodeRpcUrl,
#[error("failed to create toml file at {0}")]
TomlFileCreation(String),
#[error("failed to translate the config to a toml object")]
ConfigTomlConversion,
#[error("failed to write the config to the toml file")]
TomlFileWrite,
#[error("an invalid output oracle address was provided: {0}")]
InvalidOutputOracleAddress(String),
#[error("failed to parse the given output private key as a 32 byte hex string: {0}")]
InvalidOutputPrivateKey(String),
}
#[derive(Debug, Error)]
pub enum VarroBuilderError {
#[error("an l1 client is required to build a varro client")]
MissingL1Client,
#[error("an rollup node is required to build a varro client")]
MissingRollupNode,
#[error("an output oracle is required to build a varro client")]
MissingOutputOracle,
#[error("a proposer is required to build a varro client")]
MissingProposer,
#[error("an output private key is required to build a varro client")]
MissingOutputPrivateKey,
#[error("a polling interval is required to build a varro client")]
MissingPollingInterval,
}