-
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
Start Sequentially Minting at _startTokenId()
instead of hardcoded 0
#66
Conversation
You should probably add |
@MrMcGoats Done. Thanks for pointing that out. I've added new tests as well. One for https://github.com/chiru-labs/ERC721A/blob/main/contracts/ERC721A.sol#L85-L108 |
Fixed the |
Hi, thought of one more edge case with _exists(). I think I'm surprised there aren't existing tests already that fail for the boundaries. Haven't had a chance to run the test suite though. |
@Vectorized Thanks for the review. The change requests check out, will incorporate them probably today. Not sure what you mean by @jpegdigital good call, I've added some |
Wrap those lines in See: https://gist.github.com/Vectorized/e6f47b0c1de008bb5983852224e41f69 In my opinion, having the flexibility to start at either 0 and 1 should be enough for most practical purposes. Line 403 in a4b90eb
^ For this line in the _transfer function, you can replace _exists(nextTokenId) with nextTokenId < _nextTokenId to save more gas.
|
@Vectorized thanks for the gist, it helped a lot. I've adapted my fork to your suggestions. Works fine now. It needed minor adjustments. |
@Pczek I've opened a PR peetzweg#3 to your branch for adding |
Thanks for your PR @ahbanavi let's wait for that to get merged and then I'll do an in-depth review of this PR |
Add _totalMinted Function
@Vectorized @ahbanavi just merged your PR peetzweg#3 Test seem to run fine, I haven't adapted anything else since the PR of @ahbanavi . Anything left to do? I saw you opened up a new PR @Vectorized ? Sorry for being a bit unresponsive lately, having a few deliverables this week. ✌️ |
Going to review this today |
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.
The actual code looks fine, @Vectorized I think we can make the readme/comment changes in another PR. I'm more concerned about test quality and reducing copy-pasted code
…to be aligned with the naming of the contract
…okenId dynamically
@Vectorized @cygaar please check my recent changes to make a parameterized test. How do you like it this way? |
Looks good so far. Just go ahead with |
LGTM. @Pczek parameterize the ownership explicit test and this is good to go. Appreciate all the work you and everyone has put in to get this out |
…the Contract with a different start token id.
…n a parameterised test suite testing the burnable extension.
Alright, I've parameterized now the following tests: All of them now also run their test suite for a contract which is modified with the Afaik no further tasks are open on this PR until another review or it's ready to be merged. |
As described in #45 NFTs with token ID
0
can cause some headaches for developers down the line.I renamed the
currentIndex
to_nextTokenId
as this describes its use better as well it's an internal variable. But let me know your thoughts about it.During development I stumbled over this function declaration
function getOwnershipAt(uint256 index)
inERC721AExplicitOwnershipMock.sol
For me it was a bit misleading. I expected
_ownership
to be an multidimensional array containing the history of the ownership of an NFT. However, it's a flat mapping between basically thetokenId
to theTokenOwnership
. I would suggested renaming theindex
parameter totokenId
.https://github.com/chiru-labs/ERC721A/blob/main/contracts/mocks/ERC721AExplicitOwnershipMock.sol#L19-L21