@@ -91,7 +91,7 @@ pub struct ExecutionPayload {
9191 /// own `state_root`.
9292 pub state_root : Bytes32 ,
9393 pub receipts_root : Bytes32 ,
94- #[ serde( serialize_with = "crate::beacon::serde_helpers::ssz_hex::serialize " ) ]
94+ #[ serde( with = "crate::beacon::serde_helpers::ssz_hex" ) ]
9595 pub logs_bloom : LogsBloom ,
9696 /// The randomness the beacon chain exposes to the EVM for this block;
9797 /// `difficulty` in the yellow paper before the merge repurposed the
@@ -105,15 +105,15 @@ pub struct ExecutionPayload {
105105 pub gas_used : u64 ,
106106 #[ serde( with = "crate::beacon::serde_helpers::quoted_or_bare" ) ]
107107 pub timestamp : u64 ,
108- #[ serde( serialize_with = "crate::beacon::serde_helpers::ssz_hex::serialize " ) ]
108+ #[ serde( with = "crate::beacon::serde_helpers::ssz_hex" ) ]
109109 pub extra_data : ExtraData ,
110110 /// This block's EIP-1559 base fee, a `uint256` because the execution
111111 /// layer's fee market is not bounded to fit a `uint64`.
112112 pub base_fee_per_gas : Uint256 ,
113113 /// This payload's own hash, which the next payload's `parent_hash` must
114114 /// equal.
115115 pub block_hash : ExecutionBlockHash ,
116- #[ serde( serialize_with = "crate::beacon::serde_helpers::ssz_hex_seq::serialize " ) ]
116+ #[ serde( with = "crate::beacon::serde_helpers::ssz_hex_seq" ) ]
117117 pub transactions : Transactions ,
118118}
119119
@@ -127,7 +127,7 @@ pub struct ExecutionPayloadHeader {
127127 pub fee_recipient : ExecutionAddress ,
128128 pub state_root : Bytes32 ,
129129 pub receipts_root : Bytes32 ,
130- #[ serde( serialize_with = "crate::beacon::serde_helpers::ssz_hex::serialize " ) ]
130+ #[ serde( with = "crate::beacon::serde_helpers::ssz_hex" ) ]
131131 pub logs_bloom : LogsBloom ,
132132 pub prev_randao : Bytes32 ,
133133 #[ serde( with = "crate::beacon::serde_helpers::quoted_or_bare" ) ]
@@ -138,7 +138,7 @@ pub struct ExecutionPayloadHeader {
138138 pub gas_used : u64 ,
139139 #[ serde( with = "crate::beacon::serde_helpers::quoted_or_bare" ) ]
140140 pub timestamp : u64 ,
141- #[ serde( serialize_with = "crate::beacon::serde_helpers::ssz_hex::serialize " ) ]
141+ #[ serde( with = "crate::beacon::serde_helpers::ssz_hex" ) ]
142142 pub extra_data : ExtraData ,
143143 pub base_fee_per_gas : Uint256 ,
144144 /// The hash of the execution block this header summarizes.
@@ -177,15 +177,15 @@ pub struct BeaconBlockBody {
177177 pub eth1_data : Eth1Data ,
178178 /// Arbitrary proposer-chosen bytes, which consensus never reads.
179179 pub graffiti : Bytes32 ,
180- #[ serde( serialize_with = "crate::beacon::serde_helpers::seq::serialize " ) ]
180+ #[ serde( with = "crate::beacon::serde_helpers::seq" ) ]
181181 pub proposer_slashings : SszList < ProposerSlashing , { preset:: MAX_PROPOSER_SLASHINGS } > ,
182- #[ serde( serialize_with = "crate::beacon::serde_helpers::seq::serialize " ) ]
182+ #[ serde( with = "crate::beacon::serde_helpers::seq" ) ]
183183 pub attester_slashings : SszList < AttesterSlashing , { preset:: MAX_ATTESTER_SLASHINGS } > ,
184- #[ serde( serialize_with = "crate::beacon::serde_helpers::seq::serialize " ) ]
184+ #[ serde( with = "crate::beacon::serde_helpers::seq" ) ]
185185 pub attestations : SszList < Attestation , { preset:: MAX_ATTESTATIONS } > ,
186- #[ serde( serialize_with = "crate::beacon::serde_helpers::seq::serialize " ) ]
186+ #[ serde( with = "crate::beacon::serde_helpers::seq" ) ]
187187 pub deposits : SszList < Deposit , { preset:: MAX_DEPOSITS } > ,
188- #[ serde( serialize_with = "crate::beacon::serde_helpers::seq::serialize " ) ]
188+ #[ serde( with = "crate::beacon::serde_helpers::seq" ) ]
189189 pub voluntary_exits : SszList < SignedVoluntaryExit , { preset:: MAX_VOLUNTARY_EXITS } > ,
190190 /// The aggregated sync committee signature over the previous slot's block
191191 /// root, plus which members contributed.
@@ -292,56 +292,56 @@ pub struct BeaconState {
292292 /// slot advances, since a block cannot commit to the root of the state
293293 /// containing it.
294294 pub latest_block_header : BeaconBlockHeader ,
295- #[ serde( serialize_with = "crate::beacon::serde_helpers::seq::serialize " ) ]
295+ #[ serde( with = "crate::beacon::serde_helpers::seq" ) ]
296296 pub block_roots : BlockRoots ,
297- #[ serde( serialize_with = "crate::beacon::serde_helpers::seq::serialize " ) ]
297+ #[ serde( with = "crate::beacon::serde_helpers::seq" ) ]
298298 pub state_roots : StateRoots ,
299- #[ serde( serialize_with = "crate::beacon::serde_helpers::seq::serialize " ) ]
299+ #[ serde( with = "crate::beacon::serde_helpers::seq" ) ]
300300 pub historical_roots : HistoricalRoots ,
301301
302302 // -- Eth1 --
303303 pub eth1_data : Eth1Data ,
304- #[ serde( serialize_with = "crate::beacon::serde_helpers::seq::serialize " ) ]
304+ #[ serde( with = "crate::beacon::serde_helpers::seq" ) ]
305305 pub eth1_data_votes : Eth1DataVotes ,
306306 /// How many deposits from the contract have been processed, which is where
307307 /// the next one will be read from.
308308 #[ serde( with = "crate::beacon::serde_helpers::quoted_or_bare" ) ]
309309 pub eth1_deposit_index : u64 ,
310310
311311 // -- Registry --
312- #[ serde( serialize_with = "crate::beacon::serde_helpers::seq::serialize " ) ]
312+ #[ serde( with = "crate::beacon::serde_helpers::seq" ) ]
313313 pub validators : Validators ,
314- #[ serde( serialize_with = "crate::beacon::serde_helpers::quoted_u64_seq::serialize " ) ]
314+ #[ serde( with = "crate::beacon::serde_helpers::quoted_u64_seq" ) ]
315315 pub balances : Balances ,
316316
317317 // -- Randomness --
318- #[ serde( serialize_with = "crate::beacon::serde_helpers::seq::serialize " ) ]
318+ #[ serde( with = "crate::beacon::serde_helpers::seq" ) ]
319319 pub randao_mixes : RandaoMixes ,
320320
321321 // -- Slashings --
322- #[ serde( serialize_with = "crate::beacon::serde_helpers::quoted_u64_seq::serialize " ) ]
322+ #[ serde( with = "crate::beacon::serde_helpers::quoted_u64_seq" ) ]
323323 pub slashings : Slashings ,
324324
325325 // -- Participation --
326326 /// Per-validator participation flags for the previous epoch, positionally
327327 /// parallel to `validators`.
328- #[ serde( serialize_with = "crate::beacon::serde_helpers::quoted_u64_seq::serialize " ) ]
328+ #[ serde( with = "crate::beacon::serde_helpers::quoted_u64_seq" ) ]
329329 pub previous_epoch_participation : EpochParticipation ,
330330 /// Flags for the current epoch, which become `previous_epoch_participation`
331331 /// at the next epoch boundary.
332- #[ serde( serialize_with = "crate::beacon::serde_helpers::quoted_u64_seq::serialize " ) ]
332+ #[ serde( with = "crate::beacon::serde_helpers::quoted_u64_seq" ) ]
333333 pub current_epoch_participation : EpochParticipation ,
334334
335335 // -- Finality --
336- #[ serde( serialize_with = "crate::beacon::serde_helpers::ssz_hex::serialize " ) ]
336+ #[ serde( with = "crate::beacon::serde_helpers::ssz_hex" ) ]
337337 pub justification_bits : JustificationBits ,
338338 pub previous_justified_checkpoint : Checkpoint ,
339339 pub current_justified_checkpoint : Checkpoint ,
340340 pub finalized_checkpoint : Checkpoint ,
341341
342342 // -- Inactivity --
343343 /// Per-validator inactivity score, positionally parallel to `validators`.
344- #[ serde( serialize_with = "crate::beacon::serde_helpers::quoted_u64_seq::serialize " ) ]
344+ #[ serde( with = "crate::beacon::serde_helpers::quoted_u64_seq" ) ]
345345 pub inactivity_scores : InactivityScores ,
346346
347347 // -- Sync committees --
0 commit comments