@@ -120,7 +120,7 @@ pub fn verify_l2_header_is_related_to_output_root_proof(
120120
121121#[ cfg( test) ]
122122mod tests {
123- use bob_light_client_types:: { ClientStateV1 , Header } ;
123+ use bob_light_client_types:: { header :: Nullable , ClientStateV1 , Header } ;
124124 use hex_literal:: hex;
125125 use ibc_union_spec:: ClientId ;
126126 use unionlabs:: encoding:: { DecodeAs , Json } ;
@@ -237,4 +237,72 @@ mod tests {
237237
238238 assert_eq ! ( r2, Err ( Error :: HeaderNotFinalized ) ) ;
239239 }
240+
241+ #[ test]
242+ fn test_verify_l2_header_is_related_to_output_root_proof ( ) {
243+ verify_l2_header_is_related_to_output_root_proof (
244+ & OutputRootProof {
245+ version : hex ! ( "0000000000000000000000000000000000000000000000000000000000000000" )
246+ . into ( ) ,
247+ state_root : hex ! (
248+ "2ef85f4dfdbe515eb89fb7be3a156ea476483a17225039e5352bc72c9d9b5626"
249+ )
250+ . into ( ) ,
251+ message_passer_storage_root : hex ! (
252+ "61f529e3532e620cdd166738d3c6ccf05f9fe70b9d943a45f9183c34f730a4be"
253+ )
254+ . into ( ) ,
255+ latest_block_hash : hex ! (
256+ "ab1325306c1a2dea55f29320e30d76e43e99a167d4e74e9a5e9c18bad5127564"
257+ )
258+ . into ( ) ,
259+ } ,
260+ & L2Header {
261+ parent_hash : hex ! (
262+ "885d2dc6e52bda916b3ca9dcca29c1048b3d29e7258467a0c195c240020fef0c"
263+ )
264+ . into ( ) ,
265+ sha3_uncles : hex ! (
266+ "1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"
267+ )
268+ . into ( ) ,
269+ miner : hex ! ( "4200000000000000000000000000000000000011" ) . into ( ) ,
270+ state_root : hex ! (
271+ "2ef85f4dfdbe515eb89fb7be3a156ea476483a17225039e5352bc72c9d9b5626"
272+ )
273+ . into ( ) ,
274+ transactions_root : hex ! (
275+ "8b6c76337a74cf1447e0ff1143606bcca0896d2e842dda04958e709bf55270be"
276+ )
277+ . into ( ) ,
278+ receipts_root : hex ! (
279+ "351a05348a16ac245a8f9d8358f65f43f47bae4a1848e147a368b61ff3d86370"
280+ )
281+ . into ( ) ,
282+ logs_bloom : Box :: new ( hex ! ( "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" ) . into ( ) ) ,
283+ difficulty : 0_u64 . into ( ) ,
284+ number : 16632000_u64 . into ( ) ,
285+ gas_limit : 30000000 ,
286+ gas_used : 43887 ,
287+ timestamp : 1746125987 ,
288+ extra_data : hex ! ( "00000000fa00000006" ) . into ( ) ,
289+ mix_hash : hex ! ( "8b8f9d75ccac014aae0e18afbcc54bc2c6e9e3aba801c81bdc359fb7e0b7f414" )
290+ . into ( ) ,
291+ nonce : hex ! ( "0000000000000000" ) . into ( ) ,
292+ base_fee_per_gas : 252_u64 . into ( ) ,
293+ withdrawals_root : hex ! (
294+ "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
295+ )
296+ . into ( ) ,
297+ blob_gas_used : 0 ,
298+ excess_blob_gas : 0 ,
299+ parent_beacon_block_root : hex ! (
300+ "a4052c2062dd55cd35cd70061fbfd403863f1a08ac41df04f686fbf0460dd879"
301+ )
302+ . into ( ) ,
303+ requests_hash : Nullable :: from ( None ) ,
304+ } ,
305+ )
306+ . unwrap ( ) ;
307+ }
240308}
0 commit comments