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 authored and g11tech committed Aug 27, 2024
1 parent e75d906 commit d87de02
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 @@ -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),
};
}
Expand All @@ -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),
};
}
Expand Down

0 comments on commit d87de02

Please sign in to comment.