1

I have a little problem because my mint does not pass because of invalid parameters, I don't quite understand why..., in the entrypoint call I deliberately did not put the token_id parameter because otherwise the transaction does not even appear on the explorer, by not putting it, the transaction appears in the explorer but it fails.

 // Sets amount and fee for the transaction.
    BigDecimal amount = new BigDecimal("0"); // To call a contract, you send 0 tez.
    BigDecimal fee = new BigDecimal("0.1"); // Minimum fee to call contracts.
    System.out.println("Calling the contract (inserting customer 1, please wait a minute)...");
    
    // Calls the contract.
    JSONObject jsonObject = wallet.callContractEntryPoint("tz1aKq1jeX1QCSGayt4MNrynsynrHTeSfmvA", "KT1XQy1ZcXaqzT2eEgwZDU3wTGK5xNWzMcRt", amount, fee, "", "", "mint",
    new String[]{"tz1aKq1jeX1QCSGayt4MNrynsynrHTeSfmvA", "50", "ORN"}, false, Global.GENERIC_STANDARD);
    
    // Waits for the transaction to be included, so that we can call the contract once more.
    String opHash = (String) jsonObject.get("result");
    Boolean opHashIncluded = wallet.waitForResult(opHash, 8);
    System.out.println(opHashIncluded + " " + opHash);

and the output on the explorer:

enter image description here

enter image description here

help me please :)

1 Answer 1

0

It is required that you provide all parameters.

You have minted successfully twice.

Have a look at: https://better-call.dev/hangzhou2net/KT1XQy1ZcXaqzT2eEgwZDU3wTGK5xNWzMcRt/operations

3
  • the two times it worked was when i interacted in cli but i can't interact with my java code :(
    – oriana
    Feb 8 at 8:14
  • in my code, when I enter the parameters address, amount, symbol, id it returns me this: java.lang.Exception: Wrong number of parameters to contract entrypoint. But when I put the parameters address, amount, symbol the transaction is done but it fails and on the explorer you can see that in the json the parameters are null...
    – oriana
    Feb 8 at 10:19
  • I never tried the Java SDK, it may be a bug. Try to use the michelson JSON directly pastebin.com/raw/i8d7aUGE . Feb 8 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.