Using KittyConnect::transferFrom
inherited from ERC721
contract, user can break the protocol rules stating that only Shop Partner can transfer Cat NFT to another user.
User can transfer their own NFT as they wish.
add this code to KittyTest.t.sol
:
and then run forge test --mt test_bypassShopPartnerWhenTransferingNFT -vvv
the result should PASS:
Breaking of protocol rules as this feature is not wanted, user can only transfer their Cat NFT by the help of official Shop Partner
manual review and foundry
overriding the transferFrom
function in KittyConnect.sol
should prevent the rule breaking bug:
and the result of running forge test --mt test_bypassShopPartnerWhenTransferingNFT -vvv
should FAIL:
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.