As part of AGIP-94, this PR aims to enable Aavegotchi Wearable Rentals using a role-based delegation feature. In this implementation, users intending to rent wearables would go through the following flow:
NFT owner approves Marketplace contract to grant roles on their behalf (similar to Lending Operator in GotchiLending).
When the NFT owner creates a Rental Offer, the Marketplace calls the createRecordFrom function to deposit the user's Wearables in the Aavegotchi Diamond contract.
Once a Player (Borrower) decides to accept a Rental Offer (pay tokens to rent it), the Marketplace calls the grantRole function, granting the player the ability to equip the Wearable on any Aavegotchi they own.
Finally, once the role expires, the NFT Owner can call the withdrawFrom function to recover the NFT or create a new Rental.
Note: The Marketplace implements a similar flow for Direct Rentals, which allows NFT Owners to rent their assets without charging tokens.
As part of AGIP-94, this PR aims to enable Aavegotchi Wearable Rentals using a role-based delegation feature. In this implementation, users intending to rent wearables would go through the following flow:
GotchiLending
).This implementation also features: