Yes, docs works fine. Nodejs code window still does not update in real time. I am using it in getServerSideProps in nextjs.
Does not work, returns empty array “[ ]” (not my contract, just for illustration purposes):
const chain = EvmChain.MUMBAI;
const address = '0xeB5E4649CF034dA79C30ce2385B0Dbe7D76623AE';
const totalRanges = 1000;
const range = 1;
await Moralis.start({
apiKey: process.env.NEXT_PUBLIC_API_KEY,
});
const response = await Moralis.EvmApi.nft.getContractNFTs({
address,
chain,
totalRanges,
range,
});
console.log(response.result);
Works fine returns 3 tokens:
const chain = EvmChain.MUMBAI;
const address = '0xeB5E4649CF034dA79C30ce2385B0Dbe7D76623AE';
const totalRanges = 1000;
const range = 1;
await Moralis.start({
apiKey: process.env.NEXT_PUBLIC_API_KEY,
});
const response = await Moralis.EvmApi.nft.getNFTOwners({
address,
chain,
totalRanges,
range,
});
console.log(response.result);
So the only variable from the docs is that I am using nextjs?