erc721r / ERC721R

An ERC721 base contract that mints tokens in a pseudo-random order. Because the token is revealed in the same transaction as the mint itself, this contract creates a fun but not fully secure experience.
MIT License
96 stars 22 forks source link

TokenOfOwnerByIndex issue #9

Open 0xPrimata opened 1 year ago

0xPrimata commented 1 year ago

https://snowtrace.io/address/0xb85e821d2231a3cb2ea69527a69de63c2b759505#code

token of owner by index returns the next id despite owning non-serialized ids

call tokenOfOwnerByIndex(0xf17668ff22c63e63475d5f7dbdf7585d51e52c76, 1) returns token 215 but actual token should be 357

RogerPodacter commented 1 year ago

This is actually a DIFFERENT library also called ERC721R. It's a popular name I guess. BUT: this one was FIRST!

0xPrimata commented 1 year ago

Oh that's mine actually! I just copy pasted your code locally and included ERC2981. I just noticed that I also included tokenOfOwnerByIndex haahha I tested with batch transaction but not same user doing multiple mints. Terrible mistake.