fuel_core_gas_price_service/common/
utils.rsuse fuel_core_types::fuel_types::BlockHeight;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("Failed to find L2 block: {source_error:?}")]
CouldNotFetchL2Block { source_error: anyhow::Error },
#[error("Failed to find DA records: {0:?}")]
CouldNotFetchDARecord(anyhow::Error),
#[error("Failed to retrieve updater metadata: {source_error:?}")]
CouldNotFetchMetadata { source_error: anyhow::Error },
#[error(
"Failed to set updater metadata at height {block_height:?}: {source_error:?}"
)]
CouldNotSetMetadata {
block_height: BlockHeight,
source_error: anyhow::Error,
},
#[error("Failed to initialize updater: {0:?}")]
CouldNotInitUpdater(anyhow::Error),
}
pub type Result<T, E = Error> = core::result::Result<T, E>;
#[derive(Debug, Clone, PartialEq)]
pub enum BlockInfo {
GenesisBlock,
Block {
height: u32,
gas_used: u64,
block_gas_capacity: u64,
},
}