@@ -87,12 +87,14 @@ export type EngineApiRpcParamTypes = {
8787 * 1. Array of DATA - Array of block_hash field values of the ExecutionPayload structure
8888 * */
8989 engine_getPayloadBodiesByHashV1 : DATA [ ] [ ] ;
90+ engine_getPayloadBodiesByHashV2 : DATA [ ] [ ] ;
9091
9192 /**
9293 * 1. start: QUANTITY, 64 bits - Starting block number
9394 * 2. count: QUANTITY, 64 bits - Number of blocks to return
9495 */
9596 engine_getPayloadBodiesByRangeV1 : [ start : QUANTITY , count : QUANTITY ] ;
97+ engine_getPayloadBodiesByRangeV2 : [ start : QUANTITY , count : QUANTITY ] ;
9698
9799 /**
98100 * Object - Instance of ClientVersion
@@ -146,8 +148,10 @@ export type EngineApiRpcReturnTypes = {
146148 engine_getPayloadV6 : ExecutionPayloadResponse ;
147149
148150 engine_getPayloadBodiesByHashV1 : ( ExecutionPayloadBodyRpc | null ) [ ] ;
151+ engine_getPayloadBodiesByHashV2 : ( ExecutionPayloadBodyRpc | null ) [ ] ;
149152
150153 engine_getPayloadBodiesByRangeV1 : ( ExecutionPayloadBodyRpc | null ) [ ] ;
154+ engine_getPayloadBodiesByRangeV2 : ( ExecutionPayloadBodyRpc | null ) [ ] ;
151155
152156 engine_getClientVersionV1 : ClientVersionRpc [ ] ;
153157
@@ -168,11 +172,13 @@ type ExecutionPayloadResponse = ExecutionPayloadRpcWithValue;
168172export type ExecutionPayloadBodyRpc = {
169173 transactions : DATA [ ] ;
170174 withdrawals : WithdrawalV1 [ ] | null | undefined ;
175+ blockAccessList ?: DATA | null ; // GLOAS:EIP-7928
171176} ;
172177
173178export type ExecutionPayloadBody = {
174179 transactions : bellatrix . Transaction [ ] ;
175180 withdrawals : capella . Withdrawals | null ;
181+ blockAccessList ?: Uint8Array | null ; // GLOAS:EIP-7928
176182} ;
177183
178184export type ExecutionPayloadRpc = {
@@ -605,21 +611,27 @@ export function deserializeExecutionRequests(serialized: ExecutionRequestsRpc):
605611}
606612
607613export function deserializeExecutionPayloadBody ( data : ExecutionPayloadBodyRpc | null ) : ExecutionPayloadBody | null {
608- return data
609- ? {
610- transactions : data . transactions . map ( ( tran ) => dataToBytes ( tran , null ) ) ,
611- withdrawals : data . withdrawals ? data . withdrawals . map ( deserializeWithdrawal ) : null ,
612- }
613- : null ;
614+ if ( data == null ) return null ;
615+ const body : ExecutionPayloadBody = {
616+ transactions : data . transactions . map ( ( tran ) => dataToBytes ( tran , null ) ) ,
617+ withdrawals : data . withdrawals ? data . withdrawals . map ( deserializeWithdrawal ) : null ,
618+ } ;
619+ if ( data . blockAccessList != null ) {
620+ body . blockAccessList = dataToBytes ( data . blockAccessList , null ) ;
621+ }
622+ return body ;
614623}
615624
616625export function serializeExecutionPayloadBody ( data : ExecutionPayloadBody | null ) : ExecutionPayloadBodyRpc | null {
617- return data
618- ? {
619- transactions : data . transactions . map ( ( tran ) => bytesToData ( tran ) ) ,
620- withdrawals : data . withdrawals ? data . withdrawals . map ( serializeWithdrawal ) : null ,
621- }
622- : null ;
626+ if ( data == null ) return null ;
627+ const body : ExecutionPayloadBodyRpc = {
628+ transactions : data . transactions . map ( ( tran ) => bytesToData ( tran ) ) ,
629+ withdrawals : data . withdrawals ? data . withdrawals . map ( serializeWithdrawal ) : null ,
630+ } ;
631+ if ( data . blockAccessList != null ) {
632+ body . blockAccessList = bytesToData ( data . blockAccessList ) ;
633+ }
634+ return body ;
623635}
624636
625637export function deserializeBlobAndProofs ( data : BlobAndProofRpc | null ) : BlobAndProof | null {
0 commit comments