First Flight #12: Kitty Connect

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

Ownership info of bridged NFTs is not updated correctly

Summary

After a NFT is bridged KittyConnect on the destination chain will mint the NFT to the specified owner but the function doesn't add the new token to the s_ownerToCatsTokenId array. Users querying the number of the tokens they own will get an incorrect accounting.

Tools Used

Manual review

Recommendations

After minting the NFT add the token id to the s_ownerToCatsTokenId array.

function mintBridgedNFT(bytes memory data) external onlyKittyBridge {
// rest of the function
uint256 tokenId = kittyTokenCounter;
kittyTokenCounter++;
+ s_ownerToCatsTokenId[catOwner].push(tokenId);
// rest of the function
}
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.