[SOLVED] Params passed through write method of Moralis.executeFunction is not being read by smart contract

As you suggested the abi changes

can you paste the parameters that you use for executeFunction now?

Everything is same as above and just the change is abi as you suggested and I ran it by passing to_2 in params as well as outside as you suggested both the methods return same message to_2 is required.

can you give an exact example, so that I can test? maybe you deployed the smart contract somewhere on a testnet

I did deploy it on Rinkeby
testnet

ok, then if you provide the contract address and the parameters, I could easily test to see if it works or not

0x5988c47081265bef38b2f45c089b8c9f440fdbb1

Sorry for late reply

I didn’t get any error for this code:

abi1 = [{
  "inputs": [
    {
      "internalType": "address",
      "name": "to2",
      "type": "address"
    }
  ],
  "name": "initializeBundle",
  "outputs": [
    {
      "internalType": "uint256",
      "name": "",
      "type": "uint256"
    }
  ],
  "stateMutability": "nonpayable",
  "type": "function"
}]

options = {
            functionName: 'initializeBundle',
            contractAddress: '0x5988c47081265bef38b2f45c089b8c9f440fdbb1',
            abi: abi1,
            params: { 
              to2: '0x5988c47081265bef38b2f45c089b8c9f440fdbb1'
            }
          }

bundle = await Moralis.executeFunction(options)

Works now I still didn’t get what was the problem here