Hi, I have a problem regarding token_uri. I updated my contract to rewrite token_uri to use this as base https://gateway.moralisipfs.com/ipfs/
, but every time I create an NFT now it is returning https://ipfs.moralis.io:2053/ipfs/
. It worked for a while and now all of a sudden not anymore. When testing the function with remix it returns the correct URL but not when calling moralis getNFTs. Can someone help me why is this? This is the code in question.
pragma solidity ^0.8.12;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
contract NFT is ERC1155 {
constructor() ERC1155("https://gateway.moralisipfs.com/ipfs/") {}
/**
* @notice Override ERC1155 base uri function to use IPFS CIDs instead of token ids
* @param id ID of token to get URI for
* @return Correctly formatted IPFS URI for token
*/
function uri(uint256 id) public view virtual override returns (string memory) {
return string(abi.encodePacked(super.uri(id), lookupmap[id]));
}
}