You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.3 KiB
Solidity

2 years ago
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import '../IERC721A.sol';
/**
* @dev Interface of ERC4907A.
*/
interface IERC4907A is IERC721A {
/**
* The caller must own the token or be an approved operator.
*/
error SetUserCallerNotOwnerNorApproved();
/**
* @dev Emitted when the `user` of an NFT or the `expires` of the `user` is changed.
* The zero address for user indicates that there is no user address.
*/
event UpdateUser(uint256 indexed tokenId, address indexed user, uint64 expires);
/**
* @dev Sets the `user` and `expires` for `tokenId`.
* The zero address indicates there is no user.
*
* Requirements:
*
* - The caller must own `tokenId` or be an approved operator.
*/
function setUser(
uint256 tokenId,
address user,
uint64 expires
) external;
/**
* @dev Returns the user address for `tokenId`.
* The zero address indicates that there is no user or if the user is expired.
*/
function userOf(uint256 tokenId) external view returns (address);
/**
* @dev Returns the user's expires of `tokenId`.
*/
function userExpires(uint256 tokenId) external view returns (uint256);
}