Unfreeze
Search
K
Comment on page

Making an offer

After registering NFT collection users and owners of NFT can start listing their tokens for rental. For that we need to interact with Marketplace smart contract. Currently rental protocol supports two types of rentals:
Payable rental
Reward share
Rental with prepaid payment where all rewards generated go to the lender.
Reward with reward share, where there is no initial payment and all rewards are shared between the lender and the borrower.

1. Create payable offer

To create payable owner of a NFT needs to execute ownerCreatesRental function Parameters
Param Name
Param Type
Description
registryTokenName_
string
Name of a registered NFT collection in a partnerName.contractName format
rentTokenId_
uint256
Identifier of a renting token
validityTime_
uint256
Timestamp of a offer deadline
rentDuration_
uint256
Duration of a rental
allowedToRent_
address[]
If empty allows everyone, otherwise only listed addresses
paymentAddress_
address
Address of an ERC20 token that will be used for payments if 0x0 then payment will be made with native currency
paymentAmount_
uint256
Amount of payment in WEI
rentExtensionAllowed_
bool
If set to true allows to replay the offer
Function
function ownerCreatesRental(
string memory registryTokenName_,
uint256 rentTokenId_,
uint64 validityTime_,
uint64 rentDuration_,
address[] memory allowedToRent_,
address paymentAddress_,
uint256 paymentAmount_,
bool rentExtensionAllowed_
)
Empty allowedToRent_ parametr allows every address to lend given token, otherwise only listed addresses will be able to perform this action.

2. Create reward share offer

To create reward share offer owner of a NFT needs to execute ownerCreatesScholarshipRental function Parameters
Param Name
Param Type
Description
registryTokenName_
string
Name of a registered NFT collection in a partnerName.contractName format
rentTokenId_
uint256
Identifier of a renting token
validityTime_
uint256
Timestamp of a offer deadline
rentDuration_
uint256
Duration of a rental
allowedToRent_
address[]
If empty allows everyone, otherwise only listed addresses
paymentAddress_
address
Address of an ERC20 token that will be used for payments if 0x0 then payment will be made with native currency
paymentAmount_
uint256
Amount of payment in WEI
ownerReward_
uint256
Percentage of the rewards that will be sent to the owner in WEI
Function
function ownerCreatesScholarshipRental(
string memory registryTokenName_,
uint256 rentTokenId_,
uint64 validityTime_,
uint64 rentDuration_,
address[] memory allowedToRent_,
address paymentAddress_,
uint256 paymentAmount_,
bool rentExtensionAllowed_,
uint64 ownerReward_ //
)