Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible alternative to rescueLostKitty function #16

Closed
adamkolar opened this issue Nov 19, 2017 · 1 comment
Closed

Possible alternative to rescueLostKitty function #16

adamkolar opened this issue Nov 19, 2017 · 1 comment

Comments

@adamkolar
Copy link

Is there a reason why transferral to the address of the ERC721 contract isn't forbidden in the _transfer function instead of solving the problem with the rescueLostKitty function? It's a question of one require, so the added gas cost should be pretty minimal and considering the amount of time and energy needed to coordinate a "rescue mission", it could be worth it.

    /// @dev Transfers a kitty owned by this contract to the specified address.
    ///  Used to rescue lost kitties. (There is no "proper" flow where this contract
    ///  should be the owner of any Kitty. This function exists for us to reassign
    ///  the ownership of Kitties that users may have accidentally sent to our address.)
    /// @param _kittyId - ID of kitty
    /// @param _recipient - Address to send the cat to
    function rescueLostKitty(uint256 _kittyId, address _recipient) public onlyCOO whenNotPaused {
        require(_owns(this, _kittyId));
        _transfer(this, _recipient, _kittyId);
    }
@dete dete added the duplicate label Nov 19, 2017
@dete
Copy link

dete commented Nov 19, 2017

Good point, @adamkolar! However, this was already reported in #5. 😁

@dete dete closed this as completed Nov 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants