Skip to content

Commit

Permalink
add finals
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-aouadi committed May 16, 2023
1 parent 6718fe5 commit 79351b0
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 79351b0

Please sign in to comment.