Using web3 executeFunction to run a smart contact function

Hi
I am trying to run a function from smart contract using executeFunction, but I am receiving an error while. The smart contract function do not requires any inputs, but on executing its should give me price.

I am not sure where i am making mistake.

image
image

you can try to use runContractFunction: https://docs.moralis.io/moralis-server/web3-sdk/native#runcontractfunction

it could be easier to use

I am still receiving the same error after using runContractFunction

image

I tried executing using api call from https://admin.moralis.io/web3Api# and it gave me below error.

did you provide the abi?

Yes
image

can you also paste the data instead of only using pictures?

let ABI = [
  {
    inputs: [],
    name: "getLatestPrice",
    outputs: [
      {
        internalType: "int256",
        name: "",
        type: "int256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
];

async function getPrice() {
  await Moralis.Web3();
  let options = {
    chain: "avalanche testnet",
    address: "0x2c6a6c6763434b33c75b668907f620177477f3db",
    function_name: "getLatestPrice",
    abi: ABI,
  };
  const price = await Moralis.Web3API.native.runContractFunction(options);
  console.log(price);
}

I see a different format here: https://docs.moralis.io/moralis-server/web3-sdk/native#runcontractfunction

also, you don’t need to use Moralis.enableWeb3() for runContractFunction