@@ -99,6 +99,7 @@ pub struct JsonExecutionPayloadHeader<T: EthSpec> {
9999 pub excess_blobs : u64 ,
100100 pub block_hash : ExecutionBlockHash ,
101101 pub transactions_root : Hash256 ,
102+ #[ cfg( feature = "withdrawals" ) ]
102103 #[ superstruct( only( V2 , V3 ) ) ]
103104 pub withdrawals_root : Hash256 ,
104105}
@@ -137,6 +138,7 @@ impl<T: EthSpec> From<JsonExecutionPayloadHeader<T>> for ExecutionPayloadHeader<
137138 base_fee_per_gas : v2. base_fee_per_gas ,
138139 block_hash : v2. block_hash ,
139140 transactions_root : v2. transactions_root ,
141+ #[ cfg( feature = "withdrawals" ) ]
140142 withdrawals_root : v2. withdrawals_root ,
141143 } ) ,
142144 JsonExecutionPayloadHeader :: V3 ( v3) => Self :: Eip4844 ( ExecutionPayloadHeaderEip4844 {
@@ -155,6 +157,7 @@ impl<T: EthSpec> From<JsonExecutionPayloadHeader<T>> for ExecutionPayloadHeader<
155157 excess_blobs : v3. excess_blobs ,
156158 block_hash : v3. block_hash ,
157159 transactions_root : v3. transactions_root ,
160+ #[ cfg( feature = "withdrawals" ) ]
158161 withdrawals_root : v3. withdrawals_root ,
159162 } ) ,
160163 }
@@ -195,6 +198,7 @@ impl<T: EthSpec> From<ExecutionPayloadHeader<T>> for JsonExecutionPayloadHeader<
195198 base_fee_per_gas : capella. base_fee_per_gas ,
196199 block_hash : capella. block_hash ,
197200 transactions_root : capella. transactions_root ,
201+ #[ cfg( feature = "withdrawals" ) ]
198202 withdrawals_root : capella. withdrawals_root ,
199203 } ) ,
200204 ExecutionPayloadHeader :: Eip4844 ( eip4844) => Self :: V3 ( JsonExecutionPayloadHeaderV3 {
@@ -213,6 +217,7 @@ impl<T: EthSpec> From<ExecutionPayloadHeader<T>> for JsonExecutionPayloadHeader<
213217 excess_blobs : eip4844. excess_blobs ,
214218 block_hash : eip4844. block_hash ,
215219 transactions_root : eip4844. transactions_root ,
220+ #[ cfg( feature = "withdrawals" ) ]
216221 withdrawals_root : eip4844. withdrawals_root ,
217222 } ) ,
218223 }
@@ -258,6 +263,7 @@ pub struct JsonExecutionPayload<T: EthSpec> {
258263 #[ serde( with = "ssz_types::serde_utils::list_of_hex_var_list" ) ]
259264 pub transactions :
260265 VariableList < Transaction < T :: MaxBytesPerTransaction > , T :: MaxTransactionsPerPayload > ,
266+ #[ cfg( feature = "withdrawals" ) ]
261267 #[ superstruct( only( V2 , V3 ) ) ]
262268 pub withdrawals : VariableList < Withdrawal , T :: MaxWithdrawalsPerPayload > ,
263269}
@@ -296,6 +302,7 @@ impl<T: EthSpec> From<JsonExecutionPayload<T>> for ExecutionPayload<T> {
296302 base_fee_per_gas : v2. base_fee_per_gas ,
297303 block_hash : v2. block_hash ,
298304 transactions : v2. transactions ,
305+ #[ cfg( feature = "withdrawals" ) ]
299306 withdrawals : v2. withdrawals ,
300307 } ) ,
301308 JsonExecutionPayload :: V3 ( v3) => Self :: Eip4844 ( ExecutionPayloadEip4844 {
@@ -314,6 +321,7 @@ impl<T: EthSpec> From<JsonExecutionPayload<T>> for ExecutionPayload<T> {
314321 excess_blobs : v3. excess_blobs ,
315322 block_hash : v3. block_hash ,
316323 transactions : v3. transactions ,
324+ #[ cfg( feature = "withdrawals" ) ]
317325 withdrawals : v3. withdrawals ,
318326 } ) ,
319327 }
@@ -354,6 +362,7 @@ impl<T: EthSpec> From<ExecutionPayload<T>> for JsonExecutionPayload<T> {
354362 base_fee_per_gas : capella. base_fee_per_gas ,
355363 block_hash : capella. block_hash ,
356364 transactions : capella. transactions ,
365+ #[ cfg( feature = "withdrawals" ) ]
357366 withdrawals : capella. withdrawals ,
358367 } ) ,
359368 ExecutionPayload :: Eip4844 ( eip4844) => Self :: V3 ( JsonExecutionPayloadV3 {
@@ -372,6 +381,7 @@ impl<T: EthSpec> From<ExecutionPayload<T>> for JsonExecutionPayload<T> {
372381 excess_blobs : eip4844. excess_blobs ,
373382 block_hash : eip4844. block_hash ,
374383 transactions : eip4844. transactions ,
384+ #[ cfg( feature = "withdrawals" ) ]
375385 withdrawals : eip4844. withdrawals ,
376386 } ) ,
377387 }
@@ -425,6 +435,7 @@ pub struct JsonPayloadAttributes {
425435 pub timestamp : u64 ,
426436 pub prev_randao : Hash256 ,
427437 pub suggested_fee_recipient : Address ,
438+ #[ cfg( feature = "withdrawals" ) ]
428439 #[ superstruct( only( V2 ) ) ]
429440 pub withdrawals : Vec < JsonWithdrawal > ,
430441}
@@ -441,6 +452,7 @@ impl From<PayloadAttributes> for JsonPayloadAttributes {
441452 timestamp : pa. timestamp ,
442453 prev_randao : pa. prev_randao ,
443454 suggested_fee_recipient : pa. suggested_fee_recipient ,
455+ #[ cfg( feature = "withdrawals" ) ]
444456 withdrawals : pa. withdrawals . into_iter ( ) . map ( Into :: into) . collect ( ) ,
445457 } ) ,
446458 }
@@ -459,6 +471,7 @@ impl From<JsonPayloadAttributes> for PayloadAttributes {
459471 timestamp : jpa. timestamp ,
460472 prev_randao : jpa. prev_randao ,
461473 suggested_fee_recipient : jpa. suggested_fee_recipient ,
474+ #[ cfg( feature = "withdrawals" ) ]
462475 withdrawals : jpa. withdrawals . into_iter ( ) . map ( Into :: into) . collect ( ) ,
463476 } ) ,
464477 }
0 commit comments