Skip to content

Commit

Permalink
fix: align WithdrawalRequestV1 field names with latest spec (#6877)
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed Jun 12, 2024
1 parent 85f7000 commit c653ba8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type DepositRequestV1 = {

export type ExecutionLayerWithdrawalRequestV1 = {
sourceAddress: DATA;
validatorPublicKey: DATA;
validatorPubkey: DATA;
amount: QUANTITY;
};

Expand Down
4 changes: 2 additions & 2 deletions packages/beacon-node/src/execution/engine/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ export function serializeExecutionLayerWithdrawalRequest(
): ExecutionLayerWithdrawalRequestRpc {
return {
sourceAddress: bytesToData(withdrawalRequest.sourceAddress),
validatorPublicKey: bytesToData(withdrawalRequest.validatorPubkey),
validatorPubkey: bytesToData(withdrawalRequest.validatorPubkey),
amount: numToQuantity(withdrawalRequest.amount),
};
}
Expand All @@ -433,7 +433,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),
};
}
Expand Down

0 comments on commit c653ba8

Please sign in to comment.