Hi, I am trying to read data from a contract so I use the following
const saleStarted = await Moralis.Web3API.native.runContractFunction(options)
However, it returns me with error 400 according to some information I read on the forum error 400 is returned when options is wrong.
But for options I followed the moralis documentation this is my option object:
const options = {
chain: "rinkeby",
address : params.contractId,
function_name : "saleStarted",
abi : ContractABI2
}
Lastly the error:
Error: {}
at Function.<anonymous> (MoralisWeb3Api.js:341:1)
at tryCatch (runtime.js:63:1)
at Generator.invoke [as _invoke] (runtime.js:294:1)
at Generator.throw (runtime.js:119:1)
at asyncGeneratorStep (asyncToGenerator.js:5:1)
at _throw (asyncToGenerator.js:31:1)