Fetching token instance metadata: better detect IPFS resources and route request to IPFS gateway URL
Detect URLs like this https://gateway.pinata.cloud/ipfs/QmRKywdsutd2Nm232Y5KnZkeUQRrkTWyNKn95w9jAqcHhD/4.json as IPFS resource and route requests to a dedicated IPFS Gateway URL.
And also do the same with Swarm p2p storage please. To avoid confusion due to unknown gateways, we only store the hash in the NFT meta and the apps/user adds the gateway prefix to open the file.
@entin-hun do you have any example of token instance with metadata from Swarm resource id in the pocket?
@entin-hun do you have any example of token instance with metadata from Swarm resource id in the pocket?
Sure, all NFTs of this contract has Swarm hashes in arg2, though not in bytes32/hex but as uint256. When I click on the Metadata tab, sadly it shows "There is no metadata for this NFT", why?