RentalMarket
Last updated
Was this helpful?
Last updated
Was this helpful?
A rental marketplace allowing instant daily rentals for Rentable or any other NFT which implements the standard.
Token owners can list their NFT tokens for rent, specify the desired fees and terms, and the marketplace takes care of designating users as well as collecting and distributing rental fees to token owners.
In addition, RentalMarket supports and distributes a royalty fee on all rentals back to the creator.
To begin we'll import the FrostySDK, chain configurations, and the RentalMarket module.
Then we'll setup our signer (via wagmi/ethers) and create a new instance of the FrostySDK.
Get an ethers contract instance of the RentalMarket contract.
Get an ethers contract instance of the RentalMarket contract.
sdk (SDK) An instance of the FrostySDK, configured with a chain and signer.
Set the listing status, fees, and terms for a specified token.
_tokenId (uint256) The id of the token.
_isListed (bool) A flag indicating whether the token is currently listed for rentals.
_pricePerDay (uint256) The price (in Wei) per day to rent the token.
_minDays (uint16) The minimum acceptable number of days which a renter may specify for rental duration.
_maxDays (uint16) The maxium acceptable number of days which a renter may specify for rental duration.
Get the listing status, fees, and terms for a specified token.
_nft (address) The address of the NFT.
_tokenId (uint256) The id of the token.
Toggle the listing status for a specified token.
Rent a listed token for a specified number of days.
_nft (address) The address of the NFT.
_tokenId (uint256) The id of the token.
_days (uint16) The number of days to rent the specified token.
Set the listing status, fees, and terms for a specified token.
Get the listing status, fees, and terms for a specified token.
Toggle the listing status for a specified token.
Rent a listed token for a specified number of days.
_nft (address) The address of an NFT which implements the standard.