Can somebody help me call this function and pass this parameter(in unity3d c#)?

following are the essientials you need

    public const string address = "0x1920b6dbbB1eb936efC257191Fde3d5B1968069e";
    public const ChainList chain = ChainList.mumbai;
    public const string abi = "[{\"inputs\":[{\"internalType\":\"contractDoubleDiceProtocol\",\"name\":\"protocol\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"vrfCoordinator\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"keyHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"subId\",\"type\":\"uint64\"},{\"internalType\":\"uint16\",\"name\":\"minRequestConfirmations\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"callbackGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"linkToken\",\"type\":\"address\"}],\"internalType\":\"structChainlinkConfig\",\"name\":\"chainlinkConfig\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"BonusAmountAndVfIdMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNumRounds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRandomWords\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidVFId\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"have\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"want\",\"type\":\"address\"}],\"name\":\"OnlyCoordinatorCanFulfill\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enumVirtualFloorState\",\"name\":\"actualState\",\"type\":\"uint8\"}],\"name\":\"WrongVirtualFloorState\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256[]\",\"name\":\"vfIds\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"bonusAmounts\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"tOpen\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"tResolve\",\"type\":\"uint32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"version\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"structEncodedVirtualFloorMetadata\",\"name\":\"metadata\",\"type\":\"tuple\"}],\"name\":\"SessionCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vfId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tableId\",\"type\":\"uint256\"}],\"name\":\"SpinCreation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"vfId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"SpinResolution\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PROTOCOL\",\"outputs\":[{\"internalType\":\"contractDoubleDiceProtocol\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"betaOf\",\"outputs\":[{\"internalType\":\"UFixed32x6\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vfId\",\"type\":\"uint256\"},{\"internalType\":\"uint8[]\",\"name\":\"outcomeIndexes\",\"type\":\"uint8[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"optionalDeadline\",\"type\":\"uint256\"}],\"name\":\"commitToSpin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256[]\",\"name\":\"vfIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8\",\"name\":\"nOutcomes\",\"type\":\"uint8\"},{\"internalType\":\"UFixed256x18\",\"name\":\"totalFeeRate_e18\",\"type\":\"uint256\"},{\"internalType\":\"contractIERC20Upgradeable\",\"name\":\"paymentToken\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"bonusAmounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32\",\"name\":\"tOpen\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"tResolve\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"optionalMinCommitmentAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"optionalMaxCommitmentAmount\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"version\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structEncodedVirtualFloorMetadata\",\"name\":\"metadata\",\"type\":\"tuple\"}],\"internalType\":\"structRouletteSessionCreationParams\",\"name\":\"sessionParams\",\"type\":\"tuple\"}],\"name\":\"createSession\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCoordinator\",\"outputs\":[{\"internalType\":\"contractVRFCoordinatorV2Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentTableId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"testId\",\"type\":\"uint256\"}],\"name\":\"getFunctionTwo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getKeyHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSubscriptionId\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vfId\",\"type\":\"uint256\"}],\"name\":\"onVirtualFloorConclusion\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"randomWords\",\"type\":\"uint256[]\"}],\"name\":\"rawFulfillRandomWords\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"vfId\",\"type\":\"uint256\"}],\"name\":\"resolveSpin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rngFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"fee\",\"type\":\"uint256\"}],\"name\":\"setRngFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"testNumber\",\"type\":\"uint256\"}],\"name\":\"testFunctionOne\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"testId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"testNumber\",\"type\":\"uint256\"}],\"name\":\"testFunctionThree\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"testId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"testNumber\",\"type\":\"uint256\"}],\"internalType\":\"structRouletteDoubleDiceApp.TestStruct\",\"name\":\"test\",\"type\":\"tuple\"}],\"name\":\"testFunctionTwo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"testList\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"vfIdsByRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]";
    public class Function
    {
        public const string testFunctionTwo = "testFunctionTwo"; // testFunctionTwo({ testId: testId, testNumber: testNumber })
        public const string testFunctionThree = "testFunctionThree"; // testFunctionThree(testId, testNumber)
        public const string getFunctionTwo = "getFunctionTwo"; // getFunctionTwo(testId) # returns the corresponding testNumber assigned on the two set functions from above
    }

call testFunctionThree and testFunctionTwo to set testId & testNumber
call getFunctionTwo, pass testId as parameter to get corresponding testNumber assigned on the two set functions from above

this is how i did it

    public async void Three()
    {
        object[] args;
            args = new object[]
            {
                1,
                12321
            };
        var zuzu = await ExecuteMyContract(Function.testFunctionThree, args);
        Debug.Log("zuzuF three = " + zuzu);
    }

    public static async Task<string> ExecuteMyContract(string function, object[] args)
    {
        HexBigInteger value = new HexBigInteger(0);
        HexBigInteger gas = new HexBigInteger(0);
        HexBigInteger gasPrice = new HexBigInteger(0);

        string resp = "";

        try
        {
            resp = await Moralis.ExecuteContractFunction(address, abi, function, args, value, gas, gasPrice);
        }
        catch (Exception exception)
        {
            resp = exception.ToString();
        }
        return resp;
    }

so it does return a transaction hash, and when i check that hash on mumbai.polygonscan.com it shows transaction is successful. and when i call getFunctionTwo like a so

    public async void Four()
    {
        var zuzu = await RunMyContract(TestContract.Function.getFunctionTwo);
        Debug.Log("zuzuF four = " + zuzu.ToString());
    }
    public static async Task<string> RunMyContract(string functionName) // get data
    {
        string userId = Moralis.GetClient().EthAddress;
        JArray _abi = JArray.Parse(abi);
        RunContractDto runContractDto = new RunContractDto()
        {
            Abi = _abi,
            Params = new
            {
                testId = 1
            }
        };
        MoralisClient moralisClient = Moralis.GetClient();
        string resp = await moralisClient.Web3Api.Native.RunContractFunction<string>(address, functionName, runContractDto, chain);
        return resp;
    }

it does return 12321 which was set by testFunctionThree

but problem arises when i try to call testFunctionTwo because instead of taking in parameters in array format, it takes in parameter in json format. and this is where you come in. help me call testFunctionTwo successfully.
this is how i did it.

    public async void Two()
    {
        newArg neArg = new newArg();
        neArg.testId = 1;
        neArg.testNumber = 1221;
        string jsonArg = JsonUtility.ToJson(neArg);
        Debug.Log("zuzu jsonArg = " + jsonArg);
//log above returns zuzu jsonArg = {"testId":1,"testNumber":1221}
        object[] newArgs = new object[]
        {
            jsonArg
        };

        try
        {
            var huhu = await TestContract.ExecuteContractFuctionTwo(Function.testFunctionTwo, newArgs);

            Debug.Log("zuzuF two = " + huhu);
        }
        catch (Exception e)
        {
            Debug.Log("zuzuF two error = " + e.Message);
        }

    }
    public class newArg
    {
        public int testId, testNumber;
    }

so this testFunctionTwo throws an error

"Internal JSON-RPC error.: eth_sendTransaction"

things i have already tried

  1. increasing gas and gasprice to thousands, hundred thousands, millions, billions, then instead of throwing json-rpc error, transaction goes through in metamask wallet, but on polygonScan it shows transaction failed
  2. instead of converting class to json, passed {"testId":1,"testNumber":1221} directly from inspector as a parameter, same json-rpc error
  3. passed "{\"testId\":1,\"testNumber\":1221}" as parameter. same json-rpc
  4. passed "{1,1221}" as parameter, json-rpc
  5. passed "{testId:1,testNumber:1221}" as parameter. json-rpc

so kindly help me call testFunctionTwo and check it with getFunctionTwo that the call was successful.
thank you.