Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7013 add types #7146

Merged
merged 10 commits into from
May 17, 2023
Prev Previous commit
Next Next commit
add finals
mehdi-aouadi committed May 16, 2023
commit 824884df1fe333a7490007fc3497c73238a2b266
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ public class Attestation {
@Schema(type = "string", format = "byte", description = DESCRIPTION_BYTES96)
public BLSSignature signature;

public static DeserializableTypeDefinition<Attestation> ATTESTATION_TYPE =
public static final DeserializableTypeDefinition<Attestation> ATTESTATION_TYPE =
DeserializableTypeDefinition.object(Attestation.class)
.initializer(Attestation::new)
.withField(
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ public class AttestationData {
public Checkpoint source;
public Checkpoint target;

public static DeserializableTypeDefinition<AttestationData> ATTESTATION_DATA_TYPE =
public static final DeserializableTypeDefinition<AttestationData> ATTESTATION_DATA_TYPE =
DeserializableTypeDefinition.object(AttestationData.class)
.initializer(AttestationData::new)
.withField(
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ public class AttesterSlashing {
public IndexedAttestation attestation_1;
public IndexedAttestation attestation_2;

public static DeserializableTypeDefinition<AttesterSlashing> ATTESTER_SLASHING_TYPE =
public static final DeserializableTypeDefinition<AttesterSlashing> ATTESTER_SLASHING_TYPE =
DeserializableTypeDefinition.object(AttesterSlashing.class)
.initializer(AttesterSlashing::new)
.withField(
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ public class Checkpoint {
@Schema(type = "string", format = "byte", description = DESCRIPTION_BYTES32)
public Bytes32 root;

public static DeserializableTypeDefinition<Checkpoint> CHECKPOINT_TYPE =
public static final DeserializableTypeDefinition<Checkpoint> CHECKPOINT_TYPE =
DeserializableTypeDefinition.object(Checkpoint.class)
.initializer(Checkpoint::new)
.withField("epoch", CoreTypes.UINT64_TYPE, Checkpoint::getEpoch, Checkpoint::setEpoch)
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ public class Deposit {

public DepositData data;

public static DeserializableTypeDefinition<Deposit> DEPOSIT_TYPE =
public static final DeserializableTypeDefinition<Deposit> DEPOSIT_TYPE =
DeserializableTypeDefinition.object(Deposit.class)
.initializer(Deposit::new)
.withField(
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ public class DepositData {
@Schema(type = "string", format = "byte", description = DESCRIPTION_BYTES96)
public BLSSignature signature;

public static DeserializableTypeDefinition<DepositData> DEPOSIT_DATA_TYPE =
public static final DeserializableTypeDefinition<DepositData> DEPOSIT_DATA_TYPE =
DeserializableTypeDefinition.object(DepositData.class)
.initializer(DepositData::new)
.withField("pubkey", BLS_PUB_KEY_TYPE, DepositData::getPubkey, DepositData::setPubkey)
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ public class IndexedAttestation {
@Schema(type = "string", format = "byte", description = DESCRIPTION_BYTES96)
public BLSSignature signature;

public static DeserializableTypeDefinition<IndexedAttestation> INDEXED_ATTESTATION_TYPE =
public static final DeserializableTypeDefinition<IndexedAttestation> INDEXED_ATTESTATION_TYPE =
DeserializableTypeDefinition.object(IndexedAttestation.class)
.initializer(IndexedAttestation::new)
.withField(
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ public class ProposerSlashing {
public SignedBeaconBlockHeader signed_header_1;
public SignedBeaconBlockHeader signed_header_2;

public static DeserializableTypeDefinition<ProposerSlashing> PROPOSER_SLASHING_TYPE =
public static final DeserializableTypeDefinition<ProposerSlashing> PROPOSER_SLASHING_TYPE =
DeserializableTypeDefinition.object(ProposerSlashing.class)
.initializer(ProposerSlashing::new)
.withField(
Original file line number Diff line number Diff line change
@@ -30,20 +30,21 @@ public class SignedBeaconBlockHeader {
@Schema(type = "string", format = "byte", description = DESCRIPTION_BYTES96)
public BLSSignature signature;

public static DeserializableTypeDefinition<SignedBeaconBlockHeader> SIGNED_BLOCK_HEADER_TYPE =
DeserializableTypeDefinition.object(SignedBeaconBlockHeader.class)
.initializer(SignedBeaconBlockHeader::new)
.withField(
"message",
BEACON_BLOCK_HEADER_TYPE,
SignedBeaconBlockHeader::getMessage,
SignedBeaconBlockHeader::setMessage)
.withField(
"signature",
BLS_SIGNATURE_TYPE,
SignedBeaconBlockHeader::getSignature,
SignedBeaconBlockHeader::setSignature)
.build();
public static final DeserializableTypeDefinition<SignedBeaconBlockHeader>
SIGNED_BLOCK_HEADER_TYPE =
DeserializableTypeDefinition.object(SignedBeaconBlockHeader.class)
.initializer(SignedBeaconBlockHeader::new)
.withField(
"message",
BEACON_BLOCK_HEADER_TYPE,
SignedBeaconBlockHeader::getMessage,
SignedBeaconBlockHeader::setMessage)
.withField(
"signature",
BLS_SIGNATURE_TYPE,
SignedBeaconBlockHeader::getSignature,
SignedBeaconBlockHeader::setSignature)
.build();

public SignedBeaconBlockHeader() {}

Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ public class SignedVoluntaryExit {
@Schema(type = "string", format = "byte", description = DESCRIPTION_BYTES96)
public BLSSignature signature;

public static DeserializableTypeDefinition<SignedVoluntaryExit> SIGNED_VOLUNTARY_EXIT_TYPE =
public static final DeserializableTypeDefinition<SignedVoluntaryExit> SIGNED_VOLUNTARY_EXIT_TYPE =
DeserializableTypeDefinition.object(SignedVoluntaryExit.class)
.initializer(SignedVoluntaryExit::new)
.withField(
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ public class VoluntaryExit {
@Schema(type = "string", format = "uint64")
public UInt64 validator_index;

public static DeserializableTypeDefinition<VoluntaryExit> VOLUNTARY_EXIT_TYPE =
public static final DeserializableTypeDefinition<VoluntaryExit> VOLUNTARY_EXIT_TYPE =
DeserializableTypeDefinition.object(VoluntaryExit.class)
.initializer(VoluntaryExit::new)
.withField(
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ public class SyncAggregate {
@JsonProperty("sync_committee_signature")
public BLSSignature syncCommitteeSignature;

public static DeserializableTypeDefinition<SyncAggregate> SYNC_AGGREGATE_TYPE =
public static final DeserializableTypeDefinition<SyncAggregate> SYNC_AGGREGATE_TYPE =
DeserializableTypeDefinition.object(SyncAggregate.class)
.initializer(SyncAggregate::new)
.withField(