How to test NFTs, contracts on local dev chain network

Hello,

Currently have local Ganache server up and running. Want to get nft’s of currently logged in user, but after 5-10 seconds, classic CORS error appears in console.

Moralis.Web3API.account.getNFTs({chain:"ganache"});
Moralis.Web3API.account.getNFTs({chain:"dev"});

None of these works.

As I understand, local dev chain network does not supports NFT operations and I must use testnet for this.

Do I understand correctly?

https://admin.moralis.io/web3Api/ routes does not provide Ganache in chain dropdown. This is also sign that I am correct.

Is there any other way NOT using testnet and playing with Web3API?

Hello,
Yes, those web3api functions will not work with local devchain.
You can still use web3api functions to get data from testnet or mainnet for a particular wallet address.

1 Like