Skip to content

Commit 9be0f5f

Browse files
feat(apollo_starknet_os_program): add command to dump aggregator program
1 parent 602304c commit 9be0f5f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

crates/starknet_committer_and_os_cli/src/os_cli/commands.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
use std::fs;
22
use std::path::Path;
33

4-
use apollo_starknet_os_program::{CAIRO_FILES_MAP, OS_PROGRAM_BYTES, PROGRAM_HASH};
4+
use apollo_starknet_os_program::{
5+
AGGREGATOR_PROGRAM_BYTES,
6+
CAIRO_FILES_MAP,
7+
OS_PROGRAM_BYTES,
8+
PROGRAM_HASH,
9+
};
510
use cairo_lang_starknet_classes::casm_contract_class::CasmContractClass;
611
use cairo_vm::types::layout_name::LayoutName;
712
use cairo_vm::vm::runners::cairo_pie::CairoPie;
@@ -109,6 +114,7 @@ pub(crate) fn dump_source_files(output_path: String) {
109114

110115
pub(crate) fn dump_program(output_path: String, program: ProgramToDump) {
111116
let bytes = match program {
117+
ProgramToDump::Aggregator => AGGREGATOR_PROGRAM_BYTES,
112118
ProgramToDump::Os => OS_PROGRAM_BYTES,
113119
};
114120
// Dumping the `Program` struct won't work - it is not deserializable via cairo-lang's Program

crates/starknet_committer_and_os_cli/src/os_cli/run_os_cli.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub struct OsCliCommand {
2727
#[derive(clap::ValueEnum, Clone, Debug, Serialize)]
2828
#[serde(rename_all = "kebab-case")]
2929
pub enum ProgramToDump {
30+
Aggregator,
3031
Os,
3132
}
3233

0 commit comments

Comments
 (0)