loomnetwork / erc721x

ERC721x is an extension of ERC721 that adds support for multi-fungible tokens and batch transfers, while being fully backward-compatible.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tokenURI for FT

wighawag opened this issue · comments

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 #4 you could simply add a call to exists in the _mint function too

Fixed in #7, thanks for the find!

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

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