First Flight #12: Kitty Connect

First Flight #12: Kitty Connect
Beginner FriendlyFoundryNFTGameFi
100 EXP
View results
Submission Details
Severity: high
Valid

inconsistency between minting by shopPartner through `mintCatToNewOwner` and minting by CCIP through `mintBridgedNFT`.

Summary

In case NFT is minted by a shop partner it adds tokenId to the s_ownerToCatsTokenId array on L108. However, in case NFT minted by mintBridgedNFT in case of bridging tokenId is not added to the s_ownerToCatsTokenId array. It blocks or leads to logic flaws if user wants to bridge the token again.

Impact

HIgh

Recommendations

Add a line of code which adds tokenId to s_ownerToCatsTokenId array in mintBridgedNFT function.

function mintBridgedNFT(bytes memory data) external onlyKittyBridge {
. . .
+ s_ownerToCatsTokenId[catOwner].push(tokenId);
_safeMint(catOwner, tokenId);
emit CatMinted(tokenId, catIpfsHash);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

owner's token ID array not updated in `mintBridgedNFT`

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.