Skip to content

Commit

Permalink
Added getters for PendingDeposit
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassaldanha committed Oct 5, 2024
1 parent 2d67bb5 commit 26a04c8
Showing 1 changed file with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

package tech.pegasys.teku.spec.datastructures.state.versions.electra;

import org.apache.tuweni.bytes.Bytes32;
import tech.pegasys.teku.bls.BLSPublicKey;
import tech.pegasys.teku.bls.BLSSignature;
import tech.pegasys.teku.infrastructure.ssz.containers.Container5;
import tech.pegasys.teku.infrastructure.ssz.containers.ContainerSchema5;
import tech.pegasys.teku.infrastructure.ssz.primitive.SszBytes32;
Expand Down Expand Up @@ -92,11 +95,23 @@ private PendingDeposit(
super(type, publicKey, withdrawalCredentials, amount, signature, slot);
}

public int getIndex() {
return ((SszUInt64) get(0)).get().intValue();
public BLSPublicKey getPublicKey() {
return ((SszPublicKey) get(0)).getBLSPublicKey();
}

public Bytes32 getWithdrawalCredentials() {
return ((SszBytes32) get(1)).get();
}

public UInt64 getAmount() {
return ((SszUInt64) get(1)).get();
return ((SszUInt64) get(2)).get();
}

public BLSSignature getSignature() {
return ((SszSignature) get(3)).getSignature();
}

public UInt64 getSlot() {
return ((SszUInt64) get(4)).get();
}
}

0 comments on commit 26a04c8

Please sign in to comment.