Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getDetails method in ERC721Standard and ERC1155Standard classes should return image/description instead of TokenURI #689

Closed
adonesky1 opened this issue Feb 11, 2022 · 5 comments · Fixed by #702
Assignees

Comments

@adonesky1
Copy link
Contributor

The getDetails methods for ERC721Standard and ERC1155Standard currently fetch and return a tokenURI. Ideally they would fetch the tokenURI and then use it to fetch other more useful details like image name and description (possibly more) as we do in the getCollectibleInformationFromTokenURI method of the CollectiblesController.

@adonesky1 adonesky1 self-assigned this Feb 11, 2022
@adonesky1
Copy link
Contributor Author

cc @gantunesr @wachunei, tagging you both for thoughts/visibility.

@wachunei
Copy link
Member

sounds right, getTokenURI should return the UR and getDetails should resolve it.
I'm thinking about the case the tokenURI is a data URI, or a decentralized fs protocol like IPFS, for now we'll support https protocol only, right?

@adonesky1
Copy link
Contributor Author

adonesky1 commented Feb 14, 2022

What do you mean by a data URI?

And We currently support fetching data from IPFS in getCollectibleInformationFromTokenURI. I don't see why we shouldn't in this case as well? cc @wachunei

@wachunei
Copy link
Member

re ipfs: cool 👍
re data uri: I mean something like data:application/json;base64,ew0KICAgICJ...

@adonesky1
Copy link
Contributor Author

re data uri: I mean something like data:application/json;base64,ew0KICAgICJ...

ah yes we should have some logic to set this as its own field if the tokenURI is in this format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants