blockscout icon indicating copy to clipboard operation
blockscout copied to clipboard

Fetching token instance metadata: better detect IPFS resources and route request to IPFS gateway URL

Open vbaranov opened this issue 1 year ago • 3 comments

Detect URLs like this https://gateway.pinata.cloud/ipfs/QmRKywdsutd2Nm232Y5KnZkeUQRrkTWyNKn95w9jAqcHhD/4.json as IPFS resource and route requests to a dedicated IPFS Gateway URL.

vbaranov avatar May 29 '24 13:05 vbaranov

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 avatar Jun 19 '24 13:06 entin-hun

@entin-hun do you have any example of token instance with metadata from Swarm resource id in the pocket?

vbaranov avatar Jun 19 '24 13:06 vbaranov

@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? image

entin-hun avatar Jun 19 '24 18:06 entin-hun