Rental NFT, ERC-721 User And Expires Extension
ERC-4907 facilitates the efficient implementation of rentable NFTs.
This standard achieves the separation of NFT ownership and usage rights and automatically withdraws usage rights upon expiration.
This standard is an extension of EIP-721. It proposes an additional role (
user) which can be granted to addresses, and a time where the role is automatically revoked (
user role represents permission to "use" the NFT, but not the ability to transfer it or set users.
The owner of the NFTs can set the user and expiration of an NFT by calling function
Here is an example usage:
Alice owns an NFT4907 with id 1.
Alice can lend it to anyone by setting the user and expiry of the NFT:
setUser(1, anyone, expires).
Alice can also cancel the right of using :
setUser(1, address(0), 0).
1.1.6 Release Notes
_beforeTokenTransfer. so transfer NFT will not change the user and expires of NFT.