Skip to content

Commit

Permalink
Fix mint fungible test for modularized (#10479)
Browse files Browse the repository at this point in the history
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 <kristiyan.selveliev@limechain.tech>
  • Loading branch information
kselveliev authored Feb 24, 2025
1 parent 48efd8d commit d76c025
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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()
Expand Down

0 comments on commit d76c025

Please sign in to comment.