exo-digital-labs / ERC721R

https://erc721r.super.site/
MIT License
241 stars 61 forks source link

Clean Code - ERC721RExample.sol #28

Closed lawweiliang closed 2 years ago

lawweiliang commented 2 years ago

ERC721RExample

By default, ERC721A already have _numberMinted(msg.sender) _totalMinted()

Replace userMintedAmount[msg.sender] -> _numberMinted(msg.sender) amountMinted -> _totalMinted()

Code was getting cleaner and save cost for both deployment and minting. 😄


Test File

Test file was updated as well, slot 9 (amountMinted) was change to slot 0 (_currentIndex).


Test Result (32 Test Passing)

image

elie222 commented 2 years ago

Awesome update 🔥