-
Notifications
You must be signed in to change notification settings - Fork 1
/
TransferManagerNonCompliantERC721.sol
39 lines (35 loc) · 1.19 KB
/
TransferManagerNonCompliantERC721.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {ITransferManagerNFT} from "../interfaces/ITransferManagerNFT.sol";
/**
* @title TransferManagerNonCompliantERC721
* @notice It allows the transfer of ERC721 tokens without safeTransferFrom.
*/
contract TransferManagerNonCompliantERC721 is ITransferManagerNFT {
address public immutable LOOKS_RARE_EXCHANGE;
/**
* @notice Constructor
* @param _looksRareExchange address of the LooksRare exchange
*/
constructor(address _looksRareExchange) {
LOOKS_RARE_EXCHANGE = _looksRareExchange;
}
/**
* @notice Transfer ERC721 token
* @param collection address of the collection
* @param from address of the sender
* @param to address of the recipient
* @param tokenId tokenId
*/
function transferNonFungibleToken(
address collection,
address from,
address to,
uint256 tokenId,
uint256
) external override {
require(msg.sender == LOOKS_RARE_EXCHANGE, "Transfer: Only LooksRare Exchange");
IERC721(collection).transferFrom(from, to, tokenId);
}
}