From d76c025456309a3802b70fa676d32911b3519ac3 Mon Sep 17 00:00:00 2001 From: Kristiyan Selveliev Date: Mon, 24 Feb 2025 17:22:40 +0200 Subject: [PATCH] Fix mint fungible test for modularized (#10479) This PR fixes failing `I mint FUNGIBLE token and get the total supply and balance`. Based on the contract method implementation for fungible we should not pass any metadata in the function parameter otherwise the call goes through erc720 intertace and fails the test. Now just passing empty metadata for fungible call. --------- Signed-off-by: Kristiyan Selveliev --- .../mirror/test/e2e/acceptance/steps/CallFeature.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/CallFeature.java b/hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/CallFeature.java index e6aefb95785..40ad57cde3d 100644 --- a/hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/CallFeature.java +++ b/hedera-mirror-test/src/test/java/com/hedera/mirror/test/e2e/acceptance/steps/CallFeature.java @@ -73,7 +73,6 @@ import io.cucumber.java.en.Then; import java.io.IOException; import java.math.BigInteger; -import java.util.Arrays; import java.util.List; import lombok.CustomLog; import lombok.Getter; @@ -85,11 +84,11 @@ public class CallFeature extends AbstractFeature { private static final String HEX_REGEX = "^[0-9a-fA-F]+$"; private static DeployedContract deployedPrecompileContract; - private DeployedContract deployedErcTestContract; - private DeployedContract deployedEstimatePrecompileContract; private final AccountClient accountClient; private final MirrorNodeClient mirrorClient; private final TokenClient tokenClient; + private DeployedContract deployedErcTestContract; + private DeployedContract deployedEstimatePrecompileContract; private String ercContractAddress; private String precompileContractAddress; private String estimateContractAddress; @@ -437,7 +436,7 @@ public void ethCallMintFungibleTokenGetTotalSupplyAndBalanceOfTreasury() { MINT_TOKEN_GET_TOTAL_SUPPLY_AND_BALANCE, asAddress(fungibleTokenId), 1L, - asByteArray(Arrays.asList("0x00")), + new byte[][] {}, asAddress(admin)); var response = callContract(data, precompileContractAddress); @@ -459,7 +458,7 @@ public void ethCallMintNftTokenGetTotalSupplyAndBalanceOfTreasury() { MINT_TOKEN_GET_TOTAL_SUPPLY_AND_BALANCE, asAddress(nonFungibleTokenId), 0L, - asByteArray(Arrays.asList("0x02")), + asByteArray(List.of("0x02")), asAddress(tokenClient .getSdkClient() .getExpandedOperatorAccountId()