// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; // Author: // Francesco Sullo import "./IERC6982.sol"; // ERC165 interface id is 0x452faa60 interface IERC721Lockable is IERC6982 { event LockerSet(address locker); event LockerRemoved(address locker); event ForcefullyUnlocked(uint256 tokenId); // tells if a token is locked. Removed to extend IERC6982 // function locked(uint256 tokenID) external view returns (bool); // tells the address of the contract which is locking a token function lockerOf(uint256 tokenID) external view returns (address); // tells if a contract is a locker function isLocker(address _locker) external view returns (bool); // set a locker, if the actor that is locking it is a contract, it // should be approved // It should emit a LockerSet event function setLocker(address pool) external; // remove a locker // It should emit a LockerRemoved event function removeLocker(address pool) external; // tells if an NFT has any locks on it // The function is called internally and externally function hasLocks(address owner) external view returns (bool); // locks an NFT // It should emit a Locked event function lock(uint256 tokenID) external; // unlocks an NFT // It should emit a Unlocked event function unlock(uint256 tokenID) external; // unlock an NFT if the locker is removed // This is an emergency function called by the token owner or a DAO // It should emit a ForcefullyUnlocked event function unlockIfRemovedLocker(uint256 tokenID) external; }