hdp_primitives/processed_types/
query.rs

1use std::path::PathBuf;
2
3use ::serde::{Deserialize, Serialize};
4use alloy::primitives::B256;
5
6use super::{block_proofs::ProcessedBlockProofs, task::ProcessedTask};
7
8#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
9pub struct ProcessorInput {
10    /// Path to the directory where the cairo-run output will be stored.
11    pub cairo_run_output_path: PathBuf,
12    // U256 type
13    pub tasks_root: B256,
14    // U256 type
15    #[serde(skip_serializing_if = "Option::is_none")]
16    pub results_root: Option<B256>,
17    pub proofs: ProcessedBlockProofs,
18    pub tasks: Vec<ProcessedTask>,
19}
20
21impl ProcessorInput {
22    pub fn new(
23        cairo_run_output_path: PathBuf,
24        results_root: Option<B256>,
25        tasks_root: B256,
26        proofs: ProcessedBlockProofs,
27        tasks: Vec<ProcessedTask>,
28    ) -> Self {
29        Self {
30            cairo_run_output_path,
31            results_root,
32            tasks_root,
33            proofs,
34            tasks,
35        }
36    }
37}