Collateral-Free Integration Guide

This is a guide on how to use reNFT's SDK to interact with the collateral free contract directly. This tutorial was written for sdk version 5.0.4.

reNFT collateral-free contract flows

The following discussion applies to v5.0.4 of the SDK.

Lend/Rent NFTs In-Apparrow-up-right

To interact with our smart contract, we'd recommend using our SDKarrow-up-right.

The ReNFT object takes in an ethers Signerarrow-up-right and an optional contract address if not using the default collateral-free contract.

We name our contracts after famous cats. You can find the name mappings here. Sylvester is the code-name for the collateral free contract.

Any of the following functions support batching as shown below for the Lend instruction where the user lends an AstroCat and a CatPlsr in the same function call:

Lend

Stop Rent

Even though no real posession of the NFT is given, the renter must signal that they have concluded "using" the NFT with this call. If the renter fails to do so, then the lender can invoke "Claim Rent" explained below, to redeem the full amount of rent. Note that "Stop Lend" will be blocked until the user calls "Claim Rent" first.arrow-up-right

Query Loan/Rental Statusarrow-up-right

To learn about how to learn about the status of a particular lending / rental, read here.

Unpacking Dataarrow-up-right

Prices are returned in a custom format (rationale for this format was to fit the lending into a single storage slot). To unpack them, use our SDKarrow-up-right's unpackPrice function:

Last updated