Consensys / UniversalToken

Implementation of Universal Token for Assets and Payments
Apache License 2.0
347 stars 188 forks source link

feat: add contract uri and set token uri on mint to erc721 #142

Closed cryptotavares closed 2 years ago

cryptotavares commented 2 years ago

Description

Updated erc721 token contract to:

Motivation and Context

We want to have an erc721 contract that would allow us to easily have collections being available on OS (and similar platforms). In order to do that we are adding a contractURI for retrieving collection metadata (https://docs.opensea.io/docs/contract-level-metadata).

Besides that we have also decided to add the possibility to set a tokenURI on the mint function (in most cases we will already have a URI where from where the metadata for a given token can be retrieved, so we can avoid doing another trx just to set the token URI). This parameter is optional (mint should work without setting a tokenURI as well).

How Has This Been Tested?

Only using the existing unit tests.

Types of changes

Checklist:

github-actions[bot] commented 2 years ago

CLA Assistant Lite bot All contributors have signed the CLA ✍️

cryptotavares commented 2 years ago

I have read the CLA Document and I hereby sign the CLA