GraphemeNFT / rarible-scaffold

MIT License
0 stars 0 forks source link

Negotiate format of ipfs-hosted URI to pass to mint functions together with base URI #49

Open tomosaigon opened 2 years ago

tomosaigon commented 2 years ago

Decide what base URI will be and stay.

Then calling mint functions which require tokenURI will give a value assuming base URI will be the root. If base is "" then passed in URI is a full URI, if base is "ipfs://" then URI is the path (cid) without protocol.

tomosaigon commented 2 years ago

I see the contract uses: _setBaseURI("https://ipfs.io/ipfs/");

So tokenURI requests will prepend that.

There's also links to images in each metadata.json and those are hosted on ipfs and my DrawWordTool code formats them as ipfs://${cid}.

It's not consistent but maybe fine.

tomosaigon commented 2 years ago

Using an ipfs gateway prefix like https://ipfs.io/ipfs is safe in case a marketplace sends a raw ipfs uri to the browser which won't support it.

dcsan commented 2 years ago

is that a free service? we don't need some paid plan?

dcsan commented 2 years ago

relates to #66