artonomous / artonomous-mvp

A Self-Owning, Self-Sustaining, Self-Improving Autonomous Artist Using the Ethereum Blockchain
158 stars 21 forks source link

Make tokenURI adhere to standard & upgradeable #17

Closed okwme closed 6 years ago

okwme commented 6 years ago

I noticed the 721 implementation that tokenURI was being used to store the generator hash. I'd suggest the hash be stored in a separate mapping and the tokenURI be made to return a URI that contains all the metadata according to ERC721 spec. I've made an example where that part of the contract can be upgradeable if you think it's useful to use: https://github.com/okwme/new-models-contracts/blob/master/contracts/Patches.sol https://github.com/okwme/new-models-contracts/blob/master/contracts/Metadata.sol tokenURI is delegated to another contract which returns a URI + the tokenId. I have a feeling the tokenURI standard may change in the future so having it upgradeable might be good too.

simondlr commented 6 years ago

Solved by #19