Skip to content

Commit

Permalink
Revert "Refactor operations to eliminate duplicate code between EVM v…
Browse files Browse the repository at this point in the history
…ersions (#7000)"

This reverts commit d75dd6e.
  • Loading branch information
povolev15 committed Jun 27, 2023
1 parent 6845ee1 commit d30a22f
Showing 98 changed files with 197 additions and 6,734 deletions.
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -15,13 +15,13 @@
*/

plugins {
id("com.hedera.hashgraph.aggregate-reports")
id("com.hedera.hashgraph.spotless-conventions")
id("com.hedera.hashgraph.spotless-kotlin-conventions")
id("com.hedera.hashgraph.dependency-analysis")
id("com.hedera.hashgraph.aggregate-reports")
id("com.hedera.hashgraph.spotless-conventions")
id("com.hedera.hashgraph.spotless-kotlin-conventions")
id("com.hedera.hashgraph.dependency-analysis")
}

repositories {
mavenCentral()
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
mavenCentral()
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -141,25 +141,9 @@ TokenRelationship getRelationshipAndExternalizeResult(
* @param strategy the {@link VerificationStrategy} to use
* @return the result of the transfer attempt
*/
ResponseCodeEnum transferWithReceiverSigCheck(
ResponseCodeEnum transferValue(
long amount, long fromEntityNumber, long toEntityNumber, @NonNull VerificationStrategy strategy);

/**
* Collects the given {@code amount} of fees from the given {@code fromEntityNumber}.
*
* @param fromEntityNumber the number of the entity to collect fees from
* @param amount the amount of fees to collect
*/
void collectFee(long fromEntityNumber, long amount);

/**
* Refunds the given {@code amount} of fees from the given {@code fromEntityNumber}.
*
* @param fromEntityNumber the number of the entity to refund fees to
* @param amount the amount of fees to collect
*/
void refundFee(long fromEntityNumber, long amount);

/**
* Links the given {@code evmAddress} to the given {@code entityNumber} as an alias.
*
@@ -312,14 +296,4 @@ ResponseCodeEnum transferWithReceiverSigCheck(
*/
@Nullable
Nft getNft(@NonNull UniqueTokenId id);

// --- (SECTION V) Miscellaneous methods
/**
* Tracks the deletion of a contract and the beneficiary that should receive any staking awards otherwise
* earned by the deleted contract.
*
* @param deletedNumber the number of the deleted contract
* @param beneficiaryNumber the number of the beneficiary
*/
void trackDeletion(long deletedNumber, long beneficiaryNumber);
}
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
*
* <p>Because it possible for the {@code tokenTransfer()} system contract to need to amend
* its dispatched transaction based on the results of signature verifications, the strategy
* also has the option to return an amended transaction body when this occurs.
* also has the option to return an amended transaction body when an .
*/
public interface VerificationStrategy {
enum Decision {
@@ -74,8 +74,6 @@ enum KeyRole {
* @return an amended CryptoTransfer, or null if no amendment is necessary
*/
@Nullable
default CryptoTransferTransactionBody maybeAmendTransfer(
@NonNull CryptoTransferTransactionBody transfer, List<Long> invalidSignerNumbers) {
throw new UnsupportedOperationException("Default verification strategy does not amend transfers");
}
CryptoTransferTransactionBody maybeAmendTransfer(
@NonNull CryptoTransferTransactionBody transfer, List<Long> invalidSignerNumbers);
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
import com.hedera.node.app.service.consensus.ConsensusService;
import com.hedera.node.app.service.consensus.impl.ConsensusServiceImpl;
import com.hedera.node.app.service.contract.ContractService;
import com.hedera.node.app.service.contract.impl.state.ContractSchema;
import com.hedera.node.app.service.contract.impl.ContractServiceImpl;
import com.hedera.node.app.service.file.FileService;
import com.hedera.node.app.service.file.impl.FileServiceImpl;
import com.hedera.node.app.service.mono.context.StateChildrenProvider;
@@ -762,8 +762,8 @@ public VirtualMapLike<VirtualBlobKey, VirtualBlobValue> storage() {
public VirtualMapLike<ContractKey, IterableContractValue> contractStorage() {
return VirtualMapLikeAdapter.unwrapping(
(StateMetadata<ContractKey, IterableContractValue>)
services.get(ContractService.NAME).get(ContractSchema.STORAGE_KEY),
getChild(findNodeIndex(ContractService.NAME, ContractSchema.STORAGE_KEY)));
services.get(ContractService.NAME).get(ContractServiceImpl.STORAGE_KEY),
getChild(findNodeIndex(ContractService.NAME, ContractServiceImpl.STORAGE_KEY)));
}

@Override
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@ public Address targetContractAddress(final MessageFrame frame) {
return alias;
}

public static Bytes32 keccak256(final Bytes input) {
private static Bytes32 keccak256(final Bytes input) {
return Bytes32.wrap(keccak256DigestOf(input.toArrayUnsafe()));
}

Original file line number Diff line number Diff line change
@@ -41,7 +41,6 @@
import com.hedera.node.app.service.mono.context.properties.GlobalDynamicProperties;
import com.hedera.node.app.service.mono.fees.HbarCentExchange;
import com.hedera.node.app.service.mono.fees.calculation.UsagePricesProvider;
import edu.umd.cs.findbugs.annotations.Nullable;
import javax.inject.Inject;
import org.apache.tuweni.bytes.Bytes;
import org.hyperledger.besu.datatypes.Wei;
@@ -128,7 +127,7 @@ public long extCodeHashOperationGasCost() {
}

@Override
public long selfDestructOperationGasCost(@Nullable final Account recipient, final Wei inheritance) {
public long selfDestructOperationGasCost(final Account recipient, final Wei inheritance) {
// Frontier gas cost
return 0;
}
Original file line number Diff line number Diff line change
@@ -28,10 +28,6 @@ dependencies {
}
}

val generatedSources = file("build/generated/sources/annotationProcessor/java/main")

java.sourceSets["main"].java.srcDir(generatedSources)

// TODO module-info.java in 'test'
// https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/issues/900
dependencyAnalysis.issues {
Loading

0 comments on commit d30a22f

Please sign in to comment.