alchemyplatform / alchemy-sdk-js

The easiest way to connect your dApp to the blockchain.
https://www.alchemy.com/sdk
MIT License
397 stars 178 forks source link

OpenSea metadata not always returning from get*Metadata() #219

Closed rbruels closed 1 year ago

rbruels commented 1 year ago

Environment

Node.js with alchemy-sdk 2.2.4

Describe the problem

getNFTMetadata and getContractMetadata both return an openSea payload... but only for some NFTs. It's unclear when it's supposed to appear and when it's not.

For example, I would very much expect that any collections under the OpenSea Shared Storefront contract (0x495f947276749ce646f68ac8c248420045cb7b5e) would return OpenSea metadata! But they don't seem to.

How to reproduce:

Using example above, I'm grabbing the metadata for Skateboarding: Culture in Motion # 47:

const { Alchemy } = require('alchemy-sdk');
const alchemy = new Alchemy({ /* YOUR API KEY AND STUFF */ });
alchemy.nft.getNftMetadata(
  '0x495f947276749Ce646f68AC8c248420045cb7b5e',
  '103337611933110337448161440806560268112476320183319594419260887108754088132609',
).then(response => {
   console.log(response);
}).catch(err => {
});

but the response has no openSea object on it!

thebrianchen commented 1 year ago

@rbruels Thanks for filing the issue! This has been fixed in #213, and we'll have a release out later this week that includes the fix. Marking the issue as closed, but feel free to ask any other questions you may have!

rbruels commented 1 year ago

👏 My apologies, I saw that issue but thought it had been included in a prior release. Thanks!