File tree Expand file tree Collapse file tree 2 files changed +39
-2
lines changed
Expand file tree Collapse file tree 2 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use jiff::civil::{DateTime, DateTimeDifference};
1212use jiff:: tz:: TimeZone ;
1313use jiff:: { Timestamp , Unit , Zoned } ;
1414use openvm_sdk:: commit:: CommitBytes ;
15- use scroll_zkvm_types:: axiom:: get_config_id;
15+ use scroll_zkvm_types:: axiom:: { AxiomProgram , get_config_id} ;
1616use scroll_zkvm_types:: utils:: serialize_vk;
1717use std:: collections:: HashMap ;
1818use std:: fs:: File ;
@@ -252,7 +252,7 @@ fn main() -> eyre::Result<()> {
252252 "{LOG_PREFIX} {OK} Uploaded project {styled_project} with Program ID: {program_id}"
253253 ) ;
254254
255- program_ids. insert ( vk, program_id) ;
255+ program_ids. insert ( vk, AxiomProgram :: new ( program_id, config_id ) ) ;
256256 }
257257
258258 if !cli. no_write_ids {
Original file line number Diff line number Diff line change 1+ use serde:: { Deserialize , Serialize } ;
2+
13pub mod config {
24 /// Axiom configuration ID for [openvm.toml](../../circuits/chunk-circuit/openvm.toml).
35 /// Should be updated when the openvm.toml changes.
@@ -10,6 +12,41 @@ pub mod config {
1012 pub const BUNDLE : & str = "cfg_01k9b6xjt0va25sy94tztwehs7" ;
1113}
1214
15+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
16+ pub struct AxiomProgram {
17+ program_id : String ,
18+ config_id : String ,
19+ }
20+
21+ impl AxiomProgram {
22+ pub fn new < P : Into < String > , C : Into < String > > ( program_id : P , config_id : C ) -> Self {
23+ Self {
24+ program_id : program_id. into ( ) ,
25+ config_id : config_id. into ( ) ,
26+ }
27+ }
28+
29+ pub fn chunk < S : Into < String > > ( program_id : S ) -> Self {
30+ Self :: new ( program_id, config:: CHUNK )
31+ }
32+
33+ pub fn batch < S : Into < String > > ( program_id : S ) -> Self {
34+ Self :: new ( program_id, config:: BATCH )
35+ }
36+
37+ pub fn bundle < S : Into < String > > ( program_id : S ) -> Self {
38+ Self :: new ( program_id, config:: BUNDLE )
39+ }
40+
41+ pub fn program_id ( & self ) -> & str {
42+ & self . program_id
43+ }
44+
45+ pub fn config_id ( & self ) -> & str {
46+ & self . config_id
47+ }
48+ }
49+
1350/// Get the Axiom configuration ID for the given circuit kind.
1451///
1552/// # Panics
You can’t perform that action at this time.
0 commit comments