You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rescueLostKitty exists to restore ownership of kitties accidentally transferred to the token contract itself. This can be replaced by a simple check on transfer that prevents this happening in the first place.
Scenario
User transfers a kitty to the token contract
rescueLostKitty is called.
Impact
Some inconvenience for the user and for the maintainers of the contract.
Reproduction
See Scenario.
Fix
Add a check require(to != address(this)) in the transfer function.
The text was updated successfully, but these errors were encountered:
Description
rescueLostKitty exists to restore ownership of kitties accidentally transferred to the token contract itself. This can be replaced by a simple check on
transfer
that prevents this happening in the first place.Scenario
Impact
Some inconvenience for the user and for the maintainers of the contract.
Reproduction
See Scenario.
Fix
Add a check
require(to != address(this))
in thetransfer
function.The text was updated successfully, but these errors were encountered: