From 84a9af1e76ece9f23a43ccc1ac687865fe99d36b Mon Sep 17 00:00:00 2001 From: Nico Flaig Date: Wed, 12 Jun 2024 09:22:40 +0100 Subject: [PATCH] fix: align WithdrawalRequestV1 field names with latest spec (#6877) --- packages/beacon-node/src/execution/engine/payloadIdCache.ts | 2 +- packages/beacon-node/src/execution/engine/types.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/beacon-node/src/execution/engine/payloadIdCache.ts b/packages/beacon-node/src/execution/engine/payloadIdCache.ts index 35a50e97cfb3..f79c28582459 100644 --- a/packages/beacon-node/src/execution/engine/payloadIdCache.ts +++ b/packages/beacon-node/src/execution/engine/payloadIdCache.ts @@ -28,7 +28,7 @@ export type DepositRequestV1 = { export type ExecutionLayerWithdrawalRequestV1 = { sourceAddress: DATA; - validatorPublicKey: DATA; + validatorPubkey: DATA; amount: QUANTITY; }; diff --git a/packages/beacon-node/src/execution/engine/types.ts b/packages/beacon-node/src/execution/engine/types.ts index 7d57b45d134d..447d14992526 100644 --- a/packages/beacon-node/src/execution/engine/types.ts +++ b/packages/beacon-node/src/execution/engine/types.ts @@ -441,7 +441,7 @@ export function serializeExecutionLayerWithdrawalRequest( ): ExecutionLayerWithdrawalRequestRpc { return { sourceAddress: bytesToData(withdrawalRequest.sourceAddress), - validatorPublicKey: bytesToData(withdrawalRequest.validatorPubkey), + validatorPubkey: bytesToData(withdrawalRequest.validatorPubkey), amount: numToQuantity(withdrawalRequest.amount), }; } @@ -451,7 +451,7 @@ export function deserializeExecutionLayerWithdrawalRequest( ): electra.ExecutionLayerWithdrawalRequest { return { sourceAddress: dataToBytes(withdrawalRequest.sourceAddress, 20), - validatorPubkey: dataToBytes(withdrawalRequest.validatorPublicKey, 48), + validatorPubkey: dataToBytes(withdrawalRequest.validatorPubkey, 48), amount: quantityToNum(withdrawalRequest.amount), }; }