[SOLVED] ERC721 contract on Polygon Mumbai not fetched by getWalletNFTs endpoint

Hi there! I have this contract on Polygon Mumbai network https://mumbai.polygonscan.com/address/0xbE976De59c091303e4055Ea78319B2058f4dAABd . It’s a proxy for an upgradable ERC721, but it still implements the IERC721 interface. The idea is that the endpoint is giving me other NFTs which are only plain ERC721s (the Openzeppelin standard implementation). I wonder if you could tell me what could be the issue with the upgradable one.

Thanks!

what do you mean with the upgradable one?

The ERC721 contract is used as implementation for the address which I’ve sent, which is a proxy https://github.com/maticnetwork/pos-portal/blob/master/contracts/common/Proxy/UpgradableProxy.sol

I don’t understand what you mean, maybe you can give an example, with what is current output and what is current expected output

When calling the getWalletNFTs endpoint with address 0x4fF5DDB196A32e3dC604abD5422805ecAD22c468 and token address 0xbE976De59c091303e4055Ea78319B2058f4dAABd, I get empty result. Instead, I should see 24 NFTs.

it says erc20 token here, are you sure that you implemented the expected interfaces for an nft contract?

Yes. This was always an ERC721 contract. I have now verified it on Polygon scan. We’ve changed the implementations over the time, but always with an ERC721 interface.

it is still not recognised as erc721 on polygon scan

we don’t index now automatically the contracts that don’t implement the expected interfaces

Hi @cryptokid, it is, in deed, a bit weird that the polygonscan shows the token as ERC20 because that was never the case and we’ll clear that up with them, but as far as supporting interfaces, the contract always had the supportsInterface method and it always answered true for 0x80ac58cd (erc721 interface id).

Could it be because this token is an upgradable contract? Or are you perhaps relying on the scanner APIs to determine whether a contract is a certain kind of token and the issue would be solved if polygonscan would correctly identify the contract as an ERC721?

we are checking the interfaces directly for a contract, if the contract implements the proper interfaces then it should be no issues on our side

I checked now the contract for 0x80ac58cd and it didn’t return True

Yes, it was indeed false and now he’ve fixed it. It should return true for the ERC721 interface. Can you, maybe, trigger a reindexing, so we can test the NFT API?

it seems to work now, I used directly web3api to resync it

Yes, looks good. Thank you so much for everything!

Hello! Sorry for the follow-up after the issue was close. Could you tell us what certain endpoint did you use for resyncing?

this one: https://docs.moralis.io/reference/syncnftcontract-1

but it works only once if that contract was never synced