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 (expires
).
The 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 setUser
.
Here is an example usage:
setUser(1, anyone, expires)
.setUser(1, address(0), 0)
.Learn more : https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4907.md
delete _beforeTokenTransfer
. so transfer NFT will not change the user and expires of NFT.
to | address |
tokenId | uint256 |
Jan 10, 2023
Apache-2.0, MIT