@@ -7,6 +7,7 @@ use alloy_consensus::{
7
7
constants:: EMPTY_WITHDRAWALS , Eip658Value , Header , Transaction , Typed2718 ,
8
8
EMPTY_OMMER_ROOT_HASH ,
9
9
} ;
10
+ use alloy_eips:: eip7685:: EMPTY_REQUESTS_HASH ;
10
11
use alloy_eips:: { merge:: BEACON_NONCE , Encodable2718 } ;
11
12
use alloy_op_evm:: block:: receipt_builder:: OpReceiptBuilder ;
12
13
use alloy_primitives:: { map:: HashMap , Address , Bytes , B256 , U256 } ;
@@ -629,6 +630,13 @@ where
629
630
let ( excess_blob_gas, blob_gas_used) = ctx. blob_fields ( ) ;
630
631
let extra_data = ctx. extra_data ( ) ?;
631
632
633
+ // Isthmus require this param to be EMPTY_REQUESTS_HASH
634
+ let requests_hash = if ctx. is_isthmus_active ( ) {
635
+ Some ( EMPTY_REQUESTS_HASH )
636
+ } else {
637
+ None
638
+ } ;
639
+
632
640
let header = Header {
633
641
parent_hash : ctx. parent ( ) . hash ( ) ,
634
642
ommers_hash : EMPTY_OMMER_ROOT_HASH ,
@@ -650,7 +658,7 @@ where
650
658
parent_beacon_block_root : ctx. attributes ( ) . payload_attributes . parent_beacon_block_root ,
651
659
blob_gas_used,
652
660
excess_blob_gas,
653
- requests_hash : None ,
661
+ requests_hash,
654
662
} ;
655
663
656
664
// seal the block
@@ -911,6 +919,12 @@ where
911
919
self . chain_spec
912
920
. is_holocene_active_at_timestamp ( self . attributes ( ) . timestamp ( ) )
913
921
}
922
+
923
+ /// Returns true if isthmus is active for the payload.
924
+ pub fn is_isthmus_active ( & self ) -> bool {
925
+ self . chain_spec
926
+ . is_isthmus_active_at_timestamp ( self . attributes ( ) . timestamp ( ) )
927
+ }
914
928
}
915
929
916
930
impl < ChainSpec > OpPayloadBuilderCtx < ChainSpec >
0 commit comments