getNFTs function on rinkeby

Hello,

I’m using getNFTs() as per the doc here:
https://docs.moralis.io/transactions-and-balances/nft-balances

Work well in Ropsten and Mumbai.

The intro page on the documentation mentions a list of supported chains - https://docs.moralis.io/transactions-and-balances/intro

and I can see that rinkeby is on it.

But using it; I get the following error:

Is rinkeby support for getNFTs(), if not - is it on the roadmap? rinkeby is very useful for testing NFT deployments that link with the Opensea testnet FYI(as Opensea ropsten and mumbai based testnets are a bit buggy).

Thanks,

Hey @itheum

I just tested it. It works correctly.

async function task() {
        const options = {
          chain: "rinkeby",
          address: "0xBC334F85725695cF082C5BF222D1587169Bb0816"
        };
        const userNFTs = await Moralis.Web3.getNFTs(options);
        console.log(userNFTs);
      }

Please provide your full code and example wallet address.

Hi @Yomoo

I can confirm that it’s still not working (only on rinkeby). It may be because i’m:

  1. Doing this client side?
  2. Using React Moralis?
"react-moralis": "^0.1.9",
"moralis": "0.0.30",

My Code:

const { isInitialized, Moralis } = useMoralis();
const [onChainNFTs, setOnChainNFTs] = useState([]);

useEffect(() => {
  async function getOnChainNFTs () {
    const options = {
      chain: 'rinkeby',
      address: '0x3F91A49947d373973dF9c4Aac01Ff439681AF913'
    };

    const myNFTs = await Moralis.Web3.getNFTs(options);

    setOnChainNFTs(myNFTs);
  }

  if (isInitialized) {
    getOnChainNFTs();
  }
}, [isInitialized, Moralis]);


1 Like

Hey @itheum
Thank you for your patience :open_hands:

0x3F91A49947d373973dF9c4Aac01Ff439681AF913 doesn’t have any NTFs.

There were updates for getNFTs. So, update the server version and let me know how it works for you :man_factory_worker:

2 Likes

thanks @Yomoo -

After I bumped up the server to latest version it is now working! appreciate for your help.

2 Likes

Happy BUIDLing :man_factory_worker: