Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the CF example contract #32

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Update the CF example contract #32

wants to merge 3 commits into from

Conversation

elie222
Copy link
Contributor

@elie222 elie222 commented Apr 21, 2022

No description provided.

@elie222
Copy link
Contributor Author

elie222 commented Apr 21, 2022

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

Copy link
Contributor

@lawweiliang lawweiliang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@elie222 , even after the token had revoked, user still can refund.
I think we need to add an additional checking over refund function

require(!hasRevokedRefund[tokenId], "Refund revoked for this token");

Copy link
Contributor

@lawweiliang lawweiliang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Add constant keyword

Copy link
Contributor

@lawweiliang lawweiliang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image


I think it would be better with just
contract CryptoFightersV2 is ERC721R{
}

Then, this part can be cut off as well

image

import "erc721r/contracts/ERC721R.sol";

Simple and clean code. 😄

Copy link
Contributor

@lawweiliang lawweiliang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

This error message is not meaning. Maybe we can put something like.
Insufficient ETH to mint the token. or Insufficient ETH value to mint the token

  • Same apply to other functions

Copy link
Contributor

@lawweiliang lawweiliang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@elie222
Copy link
Contributor Author

elie222 commented Apr 24, 2022

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants