@@ -64,7 +64,11 @@ const gatherCctxs = async (
6464 while ( true ) {
6565 // Check if we've exceeded the timeout (skip if timeout is 0)
6666 if ( timeoutMs > 0 && Date . now ( ) - startTime > timeoutMs ) {
67- console . log ( "\nTimeout reached. Exiting..." ) ;
67+ console . log (
68+ `\n${
69+ Array . from ( results . values ( ) ) . length
70+ } CCTXs found. Timeout reached. Exiting...`
71+ ) ;
6872 return ;
6973 }
7074
@@ -311,7 +315,8 @@ Revert Gas Limit: ${revert_gas_limit}
311315 * CLI entry – clears screen and prints the list of indexes each round.
312316 */
313317const main = async ( options : CctxOptions ) => {
314- const { hash, rpc, delay, timeout } = options ;
318+ const { hash, rpc, delay, interactive } = options ;
319+ const timeout = interactive ? options . timeout : 5000 ;
315320 cctxEmitter . on ( "cctx" , ( all ) => {
316321 console . clear ( ) ;
317322 all . forEach ( ( cctx ) => {
@@ -329,6 +334,7 @@ export const cctxCommand = new Command("cctx")
329334 )
330335 . requiredOption ( "--hash <hash>" , "Inbound transaction hash" )
331336 . option ( "-r, --rpc <rpc>" , "RPC endpoint" , DEFAULT_API_URL )
337+ . option ( "--non-interactive" , "Run in non-interactive mode." )
332338 . option (
333339 "-d, --delay <ms>" ,
334340 "Delay between polling rounds in milliseconds" ,
0 commit comments