Skip to content

Commit

Permalink
Updated EIP-7002 WithdrawalRequestV1 field (validatorPublicKey -> val…
Browse files Browse the repository at this point in the history
…idatorPubkey) (hyperledger#7209)

Signed-off-by: Lucas Saldanha <lucascrsaldanha@gmail.com>
  • Loading branch information
lucassaldanha authored Jun 12, 2024
1 parent c7e2e4d commit d9ab92e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"withdrawalRequests": [
{
"sourceAddress": "0xa4664c40aacebd82a2db79f0ea36c06bc6a19adb",
"validatorPublicKey": "0xb10a4a15bf67b328c9b101d09e5c6ee6672978fdad9ef0d9e2ceffaee99223555d8601f0cb3bcc4ce1af9864779a416e",
"validatorPubkey": "0xb10a4a15bf67b328c9b101d09e5c6ee6672978fdad9ef0d9e2ceffaee99223555d8601f0cb3bcc4ce1af9864779a416e",
"amount": "0x0"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{
"sourceAddress": "0xa4664c40aacebd82a2db79f0ea36c06bc6a19adb",
"amount": "0x0",
"validatorPublicKey": "0xb10a4a15bf67b328c9b101d09e5c6ee6672978fdad9ef0d9e2ceffaee99223555d8601f0cb3bcc4ce1af9864779a416e"
"validatorPubkey": "0xb10a4a15bf67b328c9b101d09e5c6ee6672978fdad9ef0d9e2ceffaee99223555d8601f0cb3bcc4ce1af9864779a416e"
}
],
"blockNumber": "0x2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{
"sourceAddress": "0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f",
"amount": "0x0",
"validatorPublicKey": "0x8706d19a62f28a6a6549f96c5adaebac9124a61d44868ec94f6d2d707c6a2f82c9162071231dfeb40e24bfde4ffdf243"
"validatorPubkey": "0x8706d19a62f28a6a6549f96c5adaebac9124a61d44868ec94f6d2d707c6a2f82c9162071231dfeb40e24bfde4ffdf243"
}
],
"blockNumber": "0x4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@
public class WithdrawalRequestParameter {

private final String sourceAddress;
private final String validatorPublicKey;
private final String validatorPubkey;
private final String amount;

@JsonCreator
public WithdrawalRequestParameter(
@JsonProperty("sourceAddress") final String sourceAddress,
@JsonProperty("validatorPublicKey") final String validatorPublicKey,
@JsonProperty("validatorPubkey") final String validatorPubkey,
@JsonProperty("amount") final String amount) {
this.sourceAddress = sourceAddress;
this.validatorPublicKey = validatorPublicKey;
this.validatorPubkey = validatorPubkey;
this.amount = amount;
}

Expand All @@ -52,7 +52,7 @@ public static WithdrawalRequestParameter fromWithdrawalRequest(
public WithdrawalRequest toWithdrawalRequest() {
return new WithdrawalRequest(
Address.fromHexString(sourceAddress),
BLSPublicKey.fromHexString(validatorPublicKey),
BLSPublicKey.fromHexString(validatorPubkey),
GWei.fromHexString(amount));
}

Expand All @@ -62,8 +62,8 @@ public String getSourceAddress() {
}

@JsonGetter
public String getValidatorPublicKey() {
return validatorPublicKey;
public String getValidatorPubkey() {
return validatorPubkey;
}

@JsonGetter
Expand All @@ -77,13 +77,13 @@ public boolean equals(final Object o) {
if (o == null || getClass() != o.getClass()) return false;
final WithdrawalRequestParameter that = (WithdrawalRequestParameter) o;
return Objects.equals(sourceAddress, that.sourceAddress)
&& Objects.equals(validatorPublicKey, that.validatorPublicKey)
&& Objects.equals(validatorPubkey, that.validatorPubkey)
&& Objects.equals(amount, that.amount);
}

@Override
public int hashCode() {
return Objects.hash(sourceAddress, validatorPublicKey, amount);
return Objects.hash(sourceAddress, validatorPubkey, amount);
}

@Override
Expand All @@ -92,8 +92,8 @@ public String toString() {
+ "sourceAddress='"
+ sourceAddress
+ '\''
+ ", validatorPublicKey='"
+ validatorPublicKey
+ ", validatorPubkey='"
+ validatorPubkey
+ '\''
+ ", amount='"
+ amount
Expand Down

0 comments on commit d9ab92e

Please sign in to comment.