loomnetwork / erc721x

ERC721x is an extension of ERC721 that adds support for multi-fungible tokens and batch transfers, while being fully backward-compatible.
BSD 3-Clause "New" or "Revised" License
165 stars 54 forks source link

tokenURI for FT #6

Closed wighawag closed 6 years ago

wighawag commented 6 years ago

Currently as you are probably aware your tokenURI implementation is specific to your game and cannot be used by other since it returns a specific URI linking to your domain name.

Interestingly though, you check the call by calling exists but since this function check for the owner, this forbid your FTs to have tokenURI.

This is probably not as intended.

I suggest adding the contract address as owner to FT, this way the, the function exists remain valid for both FT and NFT.

As for the bug mentioned in https://github.com/loomnetwork/erc721x/issues/4 you could simply add a call to exists in the _mint function too

gakonst commented 6 years ago

Fixed in #7, thanks for the find!

wighawag commented 6 years ago

I would also suggest to move the current tokenURI implementation into the Card contract so the ERC721x remains independent of loom

mattkanwisher commented 6 years ago

@wighawag good idea I'll move the tokenURI to be abstract