How to correctly pass parameters to a myMethod(param).send

Good day to you, esteemed forum members.
I have the following code:

fileNumber = [];
fileAmount = [];

Next, I fill in two arrays for mintBatch

mycontract.methods.mintBatch(myWallet, fileNumber, fileAmount, '0x00').send({from: accounts[0]});

After I pass my two arrays with the token number (token ID) and the quantity. I execute the code and sign it. This code is reflected on the etherscan and also the function name is displayed correctly. However, a detailed review reveals that the “Transaction Action:” does not have the specified ID tokens, that is, in fact, the action does not incur anything other than resource consumption.
Not true:


Correct:

So the question is how to correctly pass an array with token IDs and their number to the method?

how was the method defined?
you sent empty arrays there as parameters?

Well the fileNumber and fileAmount arrays were checked by me. They were not empty. However, when sending these data as parameters - an example in the code above, nothing happened - I mean they were not sent for some reason, so the mint was not done. I didn’t get any compilation/execution errors either. That’s why I want to know how other Moralis users send their parameters to the called method using javascript (without Node)

If you are asking how I knew how the blocks on etherscan look right, I successfully did a mintBatch via remixIDE as a test.

To put it simply, I just need an example of code from parameter initialization to sending it to a function to understand where I made/made a mistake.Not just a variable, of course, but an array, since that’s what I’m working with when I try to call mintBatch. If you have an example of at least a tiny code, I will be very happy :slight_smile:

What does this mintBatch function look like in this contract? Or can you verify this contract on etherscan.

Hello. I can check the functionality. The correct operation is shown in the image above. That is, it works correctly when using RemixIDE, but it does not work when passing the arrays fileNumber and fileAmount, so I would like to see how more experienced users call mintBatch and pass parameters to it mintBatch(param1 = idWallet, param2 = uint256[] IDToken in my case is fileNumber, param3 = uint256[] AmountFromIDToken in my case is fileAmount, and param4 = data in my case I specify NULL as 0x00)

you are using web3 library directly?

        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
        <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/web3.min.js"></script>
        <script src="https://unpkg.com/[email protected]/dist/moralis.js"></script>

I use the Moralis library

This doesn’t look like Moralis syntax for me. It looks like web3

fileNumber = [];
                fileAmount = [];
                start = document.getElementById("startPosition").value;
                console.log("S: " + start);
                end = document.getElementById("endPosition").value;
                console.log("E: " + end);
                for (var a = start; a <= end; a++) {
                    fileNumber.push(a);
                    fileAmount.push(1);
                }
                console.log("Numbers: " + fileNumber.length);
                console.log("Amounts: " + fileAmount.length);
                console.log(abi);
                var web3 = await Moralis.enableWeb3();
                var mycontract = new web3.eth.Contract(abi, contract);
                let user = Moralis.User.current();
                if (!user) {
                    try {
                        user = await Moralis.authenticate({
                        signingMessage: "",
                    });
                } catch (error) {
                    alert(
                        (error = /*jshint -W022 */
                            "")
                        );
                    }
                }
                console.log("logged in user:", user);
                const accounts = await new web3.eth.getAccounts();
                mycontract.methods.mintBatch(myWallet, fileNumber, fileAmount, '0x00').send({from: accounts[0]});

Here is web3 library used directly. You can look in the documentation for web3 library.