Can I use your example for the paid transaction in webgl.
I want to call this Openzeppelin ERC20 function:
My code in Unity:
object[] inputParams = new object[2];
inputParams[0] = new { internalType = "address", name = "spender", type = "address" };
inputParams[1] = new { internalType = "uint256", name = "addedValue", type = "uint256" };
// Function ABI Output parameters
object[] outputParams = new object[1];
outputParams[0] = new { internalType = "bool", name = "", type = "bool" };
// Function ABI
object[] abi = new object[1];
abi[0] = new { inputs = inputParams, name = "increaseAllowance", outputs = outputParams, stateMutability = "nonpayable", type = "function" };
// Convert token id to hex as this is what the contract call expects
object[] pars = new object[] { abi.ToString() };
// Contract address, abi, function name, pars, value, gas, gas price
string result = await MoralisInterface.ExecuteContractFunction(contractAddress, abi, functionName, pars, new HexBigInteger("0x0"), gas, gas);