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:
Rental with prepaid payment where all rewards generated go to the lender.
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
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
Last updated