When KittyConnect::safeTransferFrom
function is called, it updates the ownership information of the NFT by calling KittyConnect::_updateOwnershipInfo
. However, the function does not update the KittyConnect::s_ownerToCatsTokenId
mapping, where the owner of the NFT is stored.
This could lead to confusion or inefficiencies in managing and querying the ownership of NFTs.
Manual Review
The proof of concept is this test, which was already written:
By running this test, we can see that this assertion fails:
To prevent this, we can remove the tokenId from the array of the previous owner in KittyConnect::s_ownerToCatsTokenId
mapping. This can be done by adding the following line of code in the KittyConnect::_updateOwnershipInfo
function:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.