exo-digital-labs / ERC721R

https://erc721r.super.site/
MIT License
240 stars 60 forks source link

Update the CF example contract #32

Open elie222 opened 2 years ago

elie222 commented 2 years ago

@royosherove @lawweiliang lmk if you have any thoughts. may still be some updates and cleanups here

elie222 commented 2 years ago

The ERC2981 part should be standard. Don't think we did anything special there.

import "erc721r/contracts/ERC721R.sol";

we don't have this yet though. ERC721RExample has a lot of extras to it. it needs to be cleaned out a lot

even after the token had revoked, user still can refund.

yes, definitely looks like an issue. i'll check what the latest around this is and get an update to the pr

davidberiro commented 2 years ago

image

For royalty ERC2981 part, I guess we need the resetTokenRoyalty as well.

Reasons

  1. Cause if we made mistake, we are still able to change the royalty.
  2. As the project getting more and more expensive, the royalty will increase as well, so we need to update the royalty. If worry about the community, before we update the royalty, we will propose and see the feedback.

We could "set" the selected token id to the default amount, but then it won't track any future changes to the default royalty. I agree this should be added.