OpenZeppelin / cairo-contracts

OpenZeppelin Contracts written in Cairo for Starknet, a decentralized ZK Rollup
https://docs.openzeppelin.com/contracts-cairo
MIT License
797 stars 322 forks source link

ERC721: Questions and thinking about Felt252 for Trait for URI for Token URI and Contract base URI. #886

Closed MSghais closed 5 months ago

MSghais commented 5 months ago

🧐 Motivation

I'm starting to check the repo on Cairo Open Zeppelin. New to Cairo, so I'm trying to build a few things.

  1. Rising question:

Thinking about standards for the NFT token_uri and contract_uri, for the NFT marketplace, etc.

We can't use Ipfs hash for token_uri with Felt252. How we can fix it or use it in another way?

I've seen the use of Array too, but I'm thinking also about implementing it with Bytes of: https://github.com/keep-starknet-strange/alexandria

Implement a way to use Ipfs Hash with Array, Bytes also Open Zeppelin?

What do you think @martriay?

martriay commented 5 months ago

Briefly addressed in our docs, tl;dr we're currently working on ByteArray support which will be the preferred format going forward.