@@ -57,7 +57,7 @@ struct Start {
5757 layout_bridge_program : Option < PathBuf > ,
5858 /// Atlantic prover API key
5959 #[ clap( long, env) ]
60- atlantic_key : String ,
60+ atlantic_key : Option < String > ,
6161 /// Settlement network integrity contract address
6262 #[ clap( long, env) ]
6363 settlement_integrity_address : Option < Felt > ,
@@ -128,6 +128,7 @@ impl Start {
128128 . await ?,
129129 ) ?;
130130
131+ let mut atlantic_key: String = String :: new ( ) ;
131132 let db = SqliteDb :: new ( & saya_path) . await ?;
132133 let layout_bridge_prover_builder =
133134 match ( self . mock_layout_bridge_program_hash , self . layout_bridge_program ) {
@@ -139,12 +140,18 @@ impl Start {
139140 ) )
140141 }
141142 ( None , Some ( layout_bridge_program) ) => {
143+ atlantic_key = match self . atlantic_key . clone ( ) {
144+ Some ( key) => key,
145+ None => return Err ( anyhow:: anyhow!( "`atlantic-key` must be provided unless `--mock-layout-bridge-program-hash` is used" ) )
146+ } ;
147+
142148 let mut layout_bridge_file = std:: fs:: File :: open ( layout_bridge_program) ?;
143149 let mut layout_bridge =
144150 Vec :: with_capacity ( layout_bridge_file. metadata ( ) ?. len ( ) as usize ) ;
145151 layout_bridge_file. read_to_end ( & mut layout_bridge) ?;
152+
146153 AnyLayoutBridgeProverBuilder :: Atlantic ( AtlanticLayoutBridgeProverBuilder :: new (
147- self . atlantic_key . clone ( ) ,
154+ atlantic_key. clone ( ) ,
148155 layout_bridge,
149156 db. clone ( ) ,
150157 layout_bridge_workers_count,
@@ -168,9 +175,10 @@ impl Start {
168175 } ,
169176 ChainId :: Other ( rollup_chain_id) ,
170177 ) ;
178+
171179 let prover_builder = RecursiveProverBuilder :: new (
172180 AtlanticSnosProverBuilder :: new (
173- self . atlantic_key ,
181+ atlantic_key,
174182 self . mock_snos_from_pie ,
175183 db. clone ( ) ,
176184 snos_worker_count,
0 commit comments