Skip to content

Commit

Permalink
remove unsused types
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-aouadi committed May 15, 2023
1 parent b1a670e commit 1b405cb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 164 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
import org.apache.tuweni.units.bigints.UInt256;
import tech.pegasys.teku.api.schema.ExecutionPayload;
import tech.pegasys.teku.infrastructure.bytes.Bytes20;
import tech.pegasys.teku.infrastructure.json.types.CoreTypes;
import tech.pegasys.teku.infrastructure.json.types.DeserializableListTypeDefinition;
import tech.pegasys.teku.infrastructure.json.types.DeserializableTypeDefinition;
import tech.pegasys.teku.infrastructure.unsigned.UInt64;
import tech.pegasys.teku.spec.Spec;
import tech.pegasys.teku.spec.SpecVersion;
Expand All @@ -44,82 +41,6 @@ public class ExecutionPayloadBellatrix extends ExecutionPayloadCommon implements
@ArraySchema(schema = @Schema(type = "string", format = "byte"))
public List<Bytes> transactions;

public static final DeserializableTypeDefinition<ExecutionPayloadBellatrix>
BEACON_BLOCK_DENEB_BODY_TYPE =
DeserializableTypeDefinition.object(ExecutionPayloadBellatrix.class)
.initializer(ExecutionPayloadBellatrix::new)
.withField(
"transactions",
new DeserializableListTypeDefinition<>(CoreTypes.BYTES_TYPE),
ExecutionPayloadBellatrix::getTransactions,
ExecutionPayloadBellatrix::setTransactions)
.withField(
"parent_hash",
CoreTypes.BYTES32_TYPE,
ExecutionPayloadBellatrix::getParentHash,
ExecutionPayloadBellatrix::setParentHash)
.withField(
"fee_recipient",
CoreTypes.BYTES20_TYPE,
ExecutionPayloadBellatrix::getFeeRecipient,
ExecutionPayloadBellatrix::setFeeRecipient)
.withField(
"state_root",
CoreTypes.BYTES32_TYPE,
ExecutionPayloadBellatrix::getStateRoot,
ExecutionPayloadBellatrix::setStateRoot)
.withField(
"receipts_root",
CoreTypes.BYTES32_TYPE,
ExecutionPayloadBellatrix::getReceiptsRoot,
ExecutionPayloadBellatrix::setReceiptsRoot)
.withField(
"logs_bloom",
CoreTypes.BYTES_TYPE,
ExecutionPayloadBellatrix::getLogsBloom,
ExecutionPayloadBellatrix::setLogsBloom)
.withField(
"prev_randao",
CoreTypes.BYTES32_TYPE,
ExecutionPayloadBellatrix::getPrevRandao,
ExecutionPayloadBellatrix::setPrevRandao)
.withField(
"block_number",
CoreTypes.UINT64_TYPE,
ExecutionPayloadBellatrix::getBlockNumber,
ExecutionPayloadBellatrix::setBlockNumber)
.withField(
"gas_limit",
CoreTypes.UINT64_TYPE,
ExecutionPayloadBellatrix::getGasLimit,
ExecutionPayloadBellatrix::setGasLimit)
.withField(
"gas_used",
CoreTypes.UINT64_TYPE,
ExecutionPayloadBellatrix::getGasUsed,
ExecutionPayloadBellatrix::setGasUsed)
.withField(
"timestamp",
CoreTypes.UINT64_TYPE,
ExecutionPayloadBellatrix::getTimestamp,
ExecutionPayloadBellatrix::setTimestamp)
.withField(
"extra_data",
CoreTypes.BYTES_TYPE,
ExecutionPayloadBellatrix::getExtraData,
ExecutionPayloadBellatrix::setExtraData)
.withField(
"base_fee_per_gas",
CoreTypes.UINT256_TYPE,
ExecutionPayloadBellatrix::getBaseFeePerGas,
ExecutionPayloadBellatrix::setBaseFeePerGas)
.withField(
"block_hash",
CoreTypes.BYTES32_TYPE,
ExecutionPayloadBellatrix::getBlockHash,
ExecutionPayloadBellatrix::setBlockHash)
.build();

@JsonCreator
public ExecutionPayloadBellatrix(
@JsonProperty("parent_hash") Bytes32 parentHash,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
package tech.pegasys.teku.api.schema.capella;

import static java.util.stream.Collectors.toList;
import static tech.pegasys.teku.api.schema.capella.Withdrawal.WITHDRAWAL_TYPE;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand All @@ -31,9 +30,6 @@
import tech.pegasys.teku.api.schema.ExecutionPayload;
import tech.pegasys.teku.api.schema.bellatrix.ExecutionPayloadBellatrix;
import tech.pegasys.teku.infrastructure.bytes.Bytes20;
import tech.pegasys.teku.infrastructure.json.types.CoreTypes;
import tech.pegasys.teku.infrastructure.json.types.DeserializableListTypeDefinition;
import tech.pegasys.teku.infrastructure.json.types.DeserializableTypeDefinition;
import tech.pegasys.teku.infrastructure.unsigned.UInt64;
import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadBuilder;
import tech.pegasys.teku.spec.datastructures.execution.ExecutionPayloadSchema;
Expand All @@ -44,87 +40,6 @@ public class ExecutionPayloadCapella extends ExecutionPayloadBellatrix implement
@ArraySchema(schema = @Schema(type = "string", format = "byte"))
public List<Withdrawal> withdrawals;

public static final DeserializableTypeDefinition<ExecutionPayloadCapella>
BEACON_BLOCK_DENEB_BODY_TYPE =
DeserializableTypeDefinition.object(ExecutionPayloadCapella.class)
.initializer(ExecutionPayloadCapella::new)
.withField(
"transactions",
new DeserializableListTypeDefinition<>(CoreTypes.BYTES_TYPE),
ExecutionPayloadCapella::getTransactions,
ExecutionPayloadCapella::setTransactions)
.withField(
"parent_hash",
CoreTypes.BYTES32_TYPE,
ExecutionPayloadCapella::getParentHash,
ExecutionPayloadCapella::setParentHash)
.withField(
"fee_recipient",
CoreTypes.BYTES20_TYPE,
ExecutionPayloadCapella::getFeeRecipient,
ExecutionPayloadCapella::setFeeRecipient)
.withField(
"state_root",
CoreTypes.BYTES32_TYPE,
ExecutionPayloadCapella::getStateRoot,
ExecutionPayloadCapella::setStateRoot)
.withField(
"receipts_root",
CoreTypes.BYTES32_TYPE,
ExecutionPayloadCapella::getReceiptsRoot,
ExecutionPayloadCapella::setReceiptsRoot)
.withField(
"logs_bloom",
CoreTypes.BYTES_TYPE,
ExecutionPayloadCapella::getLogsBloom,
ExecutionPayloadCapella::setLogsBloom)
.withField(
"prev_randao",
CoreTypes.BYTES32_TYPE,
ExecutionPayloadCapella::getPrevRandao,
ExecutionPayloadCapella::setPrevRandao)
.withField(
"block_number",
CoreTypes.UINT64_TYPE,
ExecutionPayloadCapella::getBlockNumber,
ExecutionPayloadCapella::setBlockNumber)
.withField(
"gas_limit",
CoreTypes.UINT64_TYPE,
ExecutionPayloadCapella::getGasLimit,
ExecutionPayloadCapella::setGasLimit)
.withField(
"gas_used",
CoreTypes.UINT64_TYPE,
ExecutionPayloadCapella::getGasUsed,
ExecutionPayloadCapella::setGasUsed)
.withField(
"timestamp",
CoreTypes.UINT64_TYPE,
ExecutionPayloadCapella::getTimestamp,
ExecutionPayloadCapella::setTimestamp)
.withField(
"extra_data",
CoreTypes.BYTES_TYPE,
ExecutionPayloadCapella::getExtraData,
ExecutionPayloadCapella::setExtraData)
.withField(
"base_fee_per_gas",
CoreTypes.UINT256_TYPE,
ExecutionPayloadCapella::getBaseFeePerGas,
ExecutionPayloadCapella::setBaseFeePerGas)
.withField(
"block_hash",
CoreTypes.BYTES32_TYPE,
ExecutionPayloadCapella::getBlockHash,
ExecutionPayloadCapella::setBlockHash)
.withField(
"withdrawals",
new DeserializableListTypeDefinition<>(WITHDRAWAL_TYPE),
ExecutionPayloadCapella::getWithdrawals,
ExecutionPayloadCapella::setWithdrawals)
.build();

@JsonCreator
public ExecutionPayloadCapella(
@JsonProperty("parent_hash") Bytes32 parentHash,
Expand Down

0 comments on commit 1b405cb

Please sign in to comment.