Hi.
I am trying to use runContractFunction() like this.
const options = {
chain: "0x13881",
address: "0xD91212683F8F7e3010dAaa9E29031A518453ebd9",
function_name: "getRound",
abi:
{
inputs: [],
name: "getRound",
outputs: [
{
internalType: "int256",
name: "",
type: "int256"
}
],
stateMutability: "view",
type: "function"
},
params: {},
} as const;
const round = await Moralis.Web3API.native.runContractFunction(options);
But I get the following error
400 (Bad Request)
Uncaught (in promise) Error: {"message":"Cannot read properties of undefined (reading 'inputs'), abi must contain at least 1 elements, Function `undefined` not found in ABI, function_name should not be empty"}
It says function_name is empty, but it is clearly defined. What am I missing?