Hey All,
I’m having a hard time reading on chain variables. Currently I’m using react-moralis and standard moralis, whichever solves the problem first.
I’m trying to read basic public variables on ethereum and for such a simple task im having a hell of a time. My current approach looks like this:
// ABI is in standard format, ADDRESS is a string of the contract address
await Moralis.Web3API.native
.runContractFunction({
address: ADDRESS,
functionName: "saleIsActive",
abi: ABI,
})
.then((salebool) => {
console.log(salebool);
console.log(data);
});
I’m getting this result:
Am I using the right tool for this or am I way off?