IRentingManager
IRentingManager
CallerIsNotRenter
error CallerIsNotRenter()
Thrown when the message sender doesn't match the renter address.
RentalAgreementNeverExisted
error RentalAgreementNeverExisted(uint256 rentalId)
Thrown when the Rental Agreement with `rentalId`
is not registered among present or historical Rental Agreements,
meaning it has never existed.
Name |
Type |
Description |
rentalId |
uint256 |
The ID of Rental Agreement that never existed. |
AssetRented
event AssetRented(uint256 rentalId, address renter, uint256 listingId, struct Assets.Asset[] warpedAssets, uint32 startTime, uint32 endTime)
Emitted when the warped asset(s) are rented.
Name |
Type |
Description |
rentalId |
uint256 |
Rental agreement ID. |
renter |
address |
The renter account address. |
listingId |
uint256 |
The corresponding ID of the original asset(s) listing. |
warpedAssets |
struct Assets.Asset[] |
Rented warped asset(s). |
startTime |
uint32 |
The rental agreement staring time. |
endTime |
uint32 |
The rental agreement ending time. |
collectionRentedValue
function collectionRentedValue(bytes32 warpedCollectionId, address renter) external view returns (uint256)
Returns token amount from specific collection rented by particular account.
Name |
Type |
Description |
warpedCollectionId |
bytes32 |
Warped collection ID. |
renter |
address |
The renter account address. |
Name |
Type |
Description |
[0] |
uint256 |
Rented value. |
assetRentalStatus
function assetRentalStatus(struct Assets.AssetId warpedAssetId) external view returns (enum Rentings.RentalStatus)
Returns the rental status of a given warped asset.
Name |
Type |
Description |
warpedAssetId |
struct Assets.AssetId |
Warped asset ID. |
Name |
Type |
Description |
[0] |
enum Rentings.RentalStatus |
The asset rental status. |
estimateRent
function estimateRent(struct Rentings.Params rentingParams) external view returns (struct Rentings.RentalFees)
Evaluates renting params and returns rental fee breakdown.
Name |
Type |
Description |
rentingParams |
struct Rentings.Params |
Renting parameters. |
Name |
Type |
Description |
[0] |
struct Rentings.RentalFees |
Rental fee breakdown. |
rent
function rent(struct Rentings.Params rentingParams, bytes tokenQuote, bytes tokenQuoteSignature, uint256 maxPaymentAmount) external returns (uint256)
Performs renting operation.
Name |
Type |
Description |
rentingParams |
struct Rentings.Params |
Renting parameters. |
tokenQuote |
bytes |
|
tokenQuoteSignature |
bytes |
|
maxPaymentAmount |
uint256 |
Maximal payment amount the renter is willing to pay. |
Name |
Type |
Description |
[0] |
uint256 |
New rental ID. |
rentalAgreementInfo
function rentalAgreementInfo(uint256 rentalId) external view returns (struct Rentings.Agreement)
Returns the Rental Agreement details by the `rentalId`.
Performs a look up among both
present (contains active and inactive, but not yet deleted Rental Agreements)
and historical ones (inactive and deleted Rental Agreements only).
Name |
Type |
Description |
rentalId |
uint256 |
Rental agreement ID. |
Name |
Type |
Description |
[0] |
struct Rentings.Agreement |
Rental agreement details. |
userRentalCount
function userRentalCount(address renter) external view returns (uint256)
Returns the number of currently registered rental agreements for particular renter account.
Name |
Type |
Description |
renter |
address |
Renter address. |
Name |
Type |
Description |
[0] |
uint256 |
Rental agreement count. |
userRentalAgreements
function userRentalAgreements(address renter, uint256 offset, uint256 limit) external view returns (uint256[], struct Rentings.Agreement[])
Returns the paginated list of currently registered rental agreements for particular renter account.
Name |
Type |
Description |
renter |
address |
Renter address. |
offset |
uint256 |
Starting index. |
limit |
uint256 |
Max number of items. |
Name |
Type |
Description |
[0] |
uint256[] |
Rental agreement IDs. |
[1] |
struct Rentings.Agreement[] |
Rental agreements. |