Hello!
Iām currently following the āUltimate NFT Programming Tutorialā and am expecting to see an array with two tokens being returned after following the same steps as Filip in the screen below.
However, I instead keep receiving an empty array.
Below shows my js code so far.
//moralis server url and app id
serverUrl = "https://uwoe5mpexkhs.usemoralis.com:2053/server";
appId = "t7Z50PTGvKoAajkdGxM6zaITb8sLOja7upbqQ1G6";
Moralis.start({ serverUrl, appId});
//check if the user is currently signed in
async function initializeApp() {
let currentUser = Moralis.User.current();
if(!currentUser) {
//Sign in
//authenticating using metamask
currentUser = await Moralis.Web3.authenticate();
}
//insert contract address below
const options = { address: "0x5064e8b7db2feca5d340f307e0bd169dd934bea9", chain: "rinkeby" };
const NFTs = await Moralis.Web3API.token.getAllTokenIds(options);
console.log(NFTs);
}
initializeApp();
I canāt figure out what I am doing wrong, any help would be appreciated!
Thanks.