Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ensi321 committed Oct 11, 2024
1 parent 6b3205d commit a0c18e8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/beacon-node/src/execution/engine/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ export type DepositRequestsRpc = DATA;
export type WithdrawalRequestsRpc = DATA;
export type ConsolidationRequestsRpc = DATA;


export type VersionedHashesRpc = DATA[];

export type PayloadAttributesRpc = {
Expand Down Expand Up @@ -411,7 +410,9 @@ function deserializeWithdrawalRequest(serialized: WithdrawalRequestsRpc): electr
return ssz.electra.WithdrawalRequests.deserialize(dataToBytes(serialized, null));
}

function serializeConsolidationRequests(consolidationRequests: electra.ConsolidationRequests): ConsolidationRequestsRpc {
function serializeConsolidationRequests(
consolidationRequests: electra.ConsolidationRequests
): ConsolidationRequestsRpc {
return bytesToData(ssz.electra.ConsolidationRequests.serialize(consolidationRequests));
}

Expand All @@ -421,12 +422,16 @@ function deserializeConsolidationRequests(serialized: ConsolidationRequestsRpc):

/**
* This is identical to get_execution_requests_list in
* https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.8/specs/electra/beacon-chain.md#new-get_execution_requests_list
* https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.8/specs/electra/beacon-chain.md#new-get_execution_requests_list
*/
export function serializeExecutionRequests(executionRequests: ExecutionRequests): ExecutionRequestsRpc {
const {deposits, withdrawals, consolidations} = executionRequests;

return [serializeDepositRequests(deposits), serializeWithdrawalRequests(withdrawals), serializeConsolidationRequests(consolidations)];
return [
serializeDepositRequests(deposits),
serializeWithdrawalRequests(withdrawals),
serializeConsolidationRequests(consolidations),
];
}

export function deserializeExecutionRequests(serialized: ExecutionRequestsRpc): ExecutionRequests {
Expand Down

0 comments on commit a0c18e8

Please sign in to comment.