The ERC4907-rental-NFT project is designed to explore the ERC4907 standard, focusing on creating rentable NFTs. This project leverages ERC721, utilities, and other dependencies from OpenZeppelin. While this project serves as an example implementation of ERC4907, more advanced and secure systems can be found on the OpenZeppelin website
Non-Fungible Tokens (NFTs) are unique digital assets verified using blockchain technology. Unlike cryptocurrencies such as Bitcoin or Ethereum, which are fungible and can be exchanged on a one-to-one basis, NFTs are unique and represent ownership of a specific item or piece of content, such as artwork, collectibles, or virtual real estate.
The ability to rent NFTs introduces a new layer of utility and flexibility to the NFT ecosystem. Renting allows NFT owners to generate passive income from their assets without having to sell them. It also provides access to high-value NFTs for users who may not be able to afford ownership, enabling broader participation in digital economies, gaming, virtual worlds, and more.
- Implementation of the ERC4907 standard for rentable NFTs.
- Integration with OpenZeppelin's ERC721 and utility libraries.
- Functionality to set and manage rental periods and users.
The contract implements the ERC4907 standard, extending the ERC721 contract to include rental features. Key functionalities include setting a user and expiration date, checking rental status, and ensuring that the original owner retains ownership rights during the rental period.
The project includes comprehensive tests to verify the correct implementation of the ERC4907 standard, including tests for setting rental periods, managing users, and ensuring compliance with the standard.
To run this project locally, follow these steps:
-
Clone the Repository:
git clone https://github.com/sssshefer/ERC4907-rental-NFT.git cd ERC4907-rental-NFT
-
Install Dependencies:
npm install
-
Compile Contracts:
npx hardhat compile
-
Run Tests:
npx hardhat test
Happy hacking