Skip to content

Implement Token Rescue in TokenCallbackHandler #976

@nlordell

Description

@nlordell

Context / issue

In #965, the TokenCallbackHandler contract makes a best effort to prevent accidental transfers of tokens to it. However, we can make it better by implementing token rescue for ERC-20, ERC-721 and ERC-1155. This would allow us to remove the "best-effort" transfer prevention functions with a safer, but permissioned, mechanism.

Proposed solution

Add rescueERC* functions for rescuing funds that were accidentally transferred to the TokenCallbackHandler contract.

Note that some careful consideration is needed for integrations like the ERC-4337 module which inherits from the CompatibilityFallbackHandler function and therefore may be "tricked" into calling a Safe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions