-
Notifications
You must be signed in to change notification settings - Fork 842
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
Add burn feature #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@chiru-labs Is there a concern for this change? |
*/ | ||
function _safeBurn( | ||
uint256 tokenId, | ||
bytes memory _data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason for this parameter not being used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this was needed for receiver, but feel free to remove if it is not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to ask for _safeMint function as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be kept; makes it easier for other implementations to pass/use arbitrary data, should they want to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, I agree too, thanks for the clarification!
Hey, thanks for the PR. We will have a more built out version of the repo soon after which we'll need you to write some tests for this. Stay tuned |
Was just looking at this again, and it looks like _safeBurn(uint256) just calls itself |
no @MrMcGoats, as you can see from @AndreiD, it has another function to cover implementation like _safeMint |
You should check |
In addition, most of the view functions need to be updated to consider the burnt tokens. |
This is true. I will add that |
I am not sure if there is a view function to check burns in usual ERC721 though. For the backward compatibility, I will pass on this and let frontend handle. |
@hskang9 As far as I can tell, this is not done with |
My bad, after looking at the code again, I missed adding "" for bytes argument for |
I think we should close this, cause #61 is more likely to be merged soon. |
Thanks for the contribution, closing this since we've merged in burn functionality |
I tried to add burn feature for ERC721A contract. Currently address(0) is occupied for ownership inclusion, so I used address(1) for marking burned address.