Skip to content

Allow deposit by someone who is not a token owner #101

Open
@bogdan

Description

Motivation

In our app we want to provide people a better user experience when they deposit their tokens to polygon.
That is why we want RootChainManager#depositFor to be callable by an address that is not a token owner (like approved or approved for all).

Problem

That is not currently possible with MintableERC721Predicate (I didn't check others, but it is probably the same issue there).

Here is why:
RootChainManager always uses _msgSender as a depositor:


depositor is always passed as a first argument to ERC721#safeTransferFrom which should always be a token owner:
IMintableERC721(rootToken).safeTransferFrom(depositor, address(this), tokenId);

Solution

Use ERC721#ownerOf instead of depositor when calling ERC721#safeTransferFrom.

If that is not acceptable, can you explain a motivation of this limitation?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions