use alloc::boxed::Box;
use async_trait::async_trait;
use core::iter::Iterator;
use kona_genesis::{RollupConfig, SystemConfig};
use kona_protocol::{L2BlockInfo, OpAttributesWithParent};
use crate::{OriginProvider, PipelineErrorKind, StepResult};
#[async_trait]
pub trait Pipeline: OriginProvider + Iterator<Item = OpAttributesWithParent> {
fn peek(&self) -> Option<&OpAttributesWithParent>;
async fn step(&mut self, cursor: L2BlockInfo) -> StepResult;
fn rollup_config(&self) -> &RollupConfig;
async fn system_config_by_number(
&mut self,
number: u64,
) -> Result<SystemConfig, PipelineErrorKind>;
}