Developers

A demo is worth a thousand words | NFT Rentals Demo

October 20, 2022

Hey boss, here we are again.

Below you will find a guide on the demo we prepared for you. In the demo, you are able to see the NFT being lent, rented and shared. Go through the step by step guide to see it in action yourself.

As you know, some things get lost in writing so they say: A picture is worth a thousand words

Well when it comes to software and developer tools, we know that documentation and demos are first.

Hence we put together a simple demo for you to rent and lend NFTs in a simple page. Here you go

All the testnets (BSC Testnet, Polygon Mumbai an Goerli are functional in the demo).

Guide

Here are the steps to rent and lend your NFTs in the demo:

  1. Fill in the contract address of your NFT and the ID of the NFT. Select if this is a ERC1155 or 721. In this case, the NFT contract address is 0x873D942Db87198de9E4BCE7DAFA30B5354b95e83 and the ID of the NFT is 1. You can leave the switch unselected if the NFT is a ERC-721.


  2. Fill in the lending info for:

    • expiry in days: 1

    • per day price: 0.05

    • ERC-20 address of the token you would like to get paid in: Goerli wETH 0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6

    • revenue share: 0% (we are assuming upfront fees in this case but reward-shares are also possible with this)

    • buy price: 70

    • max rental days: 2


  3. Click Lend Asset and shoot up the console of your browser with F12. Metamask will pop up, confirm the transaction.

  4. In the console, you will see the id for the rental offering and that lending is successful:


  5. Now go below to rent the asset and put in 1 day as the rent duration. Then click Rent Asset


  6. If you do not have enough balance for the asking price, you will see the following error on the console:

  7. If you have enough balance, you will see the below success log


You just lent and rented a NFT. Cheers to a million more!


Ready to take

Stash for a spin?

Ready to take

Stash for a spin?

2022 Troy Labs

Web3 for everyone