@@ -304,6 +304,65 @@ poll_interval_s = 0
304304 assert_eq ! ( state. last_scanned_block, 10 ) ;
305305 }
306306
307+ /// Smoke test against a live alpen-reth endpoint.
308+ ///
309+ /// Run with:
310+ /// `ETH_RPC_URL=https://rpc.testnet.alpenlabs.io cargo test -p status-bridge \
311+ /// live_smoke -- --ignored --nocapture`
312+ ///
313+ /// Verifies that the deployed event ABI still matches our pinned
314+ /// `alpen-reth-primitives` and that our decoder accepts every log returned
315+ /// by the precompile filter.
316+ #[ tokio:: test]
317+ #[ ignore = "hits a live RPC; opt in with ETH_RPC_URL set + --ignored" ]
318+ async fn live_smoke ( ) {
319+ let url = match std:: env:: var ( "ETH_RPC_URL" ) {
320+ Ok ( u) if !u. is_empty ( ) => u,
321+ _ => {
322+ eprintln ! ( "ETH_RPC_URL unset; skipping" ) ;
323+ return ;
324+ }
325+ } ;
326+ let rpc = JsonRpcEthClient :: new ( & url) . expect ( "build rpc client" ) ;
327+
328+ let head = rpc. block_number ( ) . await . expect ( "block_number" ) ;
329+ assert ! ( head > 0 , "live chain head should be > 0" ) ;
330+ eprintln ! ( "live head = {head}" ) ;
331+
332+ // Public testnet caps eth_getLogs at 100k blocks per request.
333+ let from = head. saturating_sub ( 100_000 ) ;
334+ let logs = rpc
335+ . get_logs (
336+ from,
337+ head,
338+ BRIDGEOUT_PRECOMPILE_ADDRESS ,
339+ WithdrawalIntentEvent :: SIGNATURE_HASH ,
340+ )
341+ . await
342+ . expect ( "get_logs" ) ;
343+ eprintln ! ( "found {} bridgeout logs in [{from}, {head}]" , logs. len( ) ) ;
344+
345+ let mut total_sub_units = 0usize ;
346+ for log in & logs {
347+ let rows = decoder:: decode ( log) . unwrap_or_else ( |e| {
348+ panic ! (
349+ "decode failed for tx {:?} log_index {}: {e}" ,
350+ log. transaction_hash, log. log_index
351+ )
352+ } ) ;
353+ assert ! (
354+ !rows. is_empty( ) ,
355+ "every accepted log expands into ≥ 1 sub-unit"
356+ ) ;
357+ total_sub_units += rows. len ( ) ;
358+ }
359+ eprintln ! (
360+ "decoded {} logs into {} sub-units total" ,
361+ logs. len( ) ,
362+ total_sub_units
363+ ) ;
364+ }
365+
307366 #[ tokio:: test]
308367 async fn restart_replay_is_idempotent ( ) {
309368 let db = MockWithdrawalIndexerDb :: default ( ) ;
0 commit comments