IListingManager
IListingManager
CallerIsNotRentingManager
error CallerIsNotRentingManager()
Thrown when the message sender is not renting manager.
AccountIsNotAuthorizedOperatorForListingManagement
error AccountIsNotAuthorizedOperatorForListingManagement(uint256 listingId, address account)
Thrown when the message sender does not own LISTING_WIZARD role and is not lister.
Name |
Type |
Description |
listingId |
uint256 |
The Listing ID. |
account |
address |
The account that was checked. |
AccountIsNotListingWizard
error AccountIsNotListingWizard(address account)
Thrown when the message sender does not own LISTING_WIZARD role
EmptyAssetsArray
error EmptyAssetsArray()
Thrown when assets array is empty.
AssetCollectionMismatch
error AssetCollectionMismatch()
Thrown when asset collection is mismatched in one of the assets from assets array.
AssetIsLocked
error AssetIsLocked()
Thrown when the original asset cannot be withdrawn because of active rentals
or other activity that requires asset to stay in the vault.
error OnlyImmediatePayoutSupported()
Thrown when the configurator returns a payment beneficiary different from lister.
ListingNeverExisted
error ListingNeverExisted(uint256 listingId)
Thrown when the Listing with `listingId`
is not registered among present or historical Listings,
meaning it has never existed.
Name |
Type |
Description |
listingId |
uint256 |
The ID of Listing that never existed. |
ListingCreated
event ListingCreated(uint256 listingId, address lister, struct Assets.Asset[] assets, struct Listings.Params params, uint32 maxLockPeriod)
Emitted when a new listing is created.
Name |
Type |
Description |
listingId |
uint256 |
Listing ID. |
lister |
address |
Lister account address. |
assets |
struct Assets.Asset[] |
Listing asset. |
params |
struct Listings.Params |
Listing params. |
maxLockPeriod |
uint32 |
The maximum amount of time the original asset owner can wait before getting the asset back. |
ListingDisabled
event ListingDisabled(uint256 listingId, address lister, uint32 unlocksAt)
Emitted when the listing is no longer available for renting.
Name |
Type |
Description |
listingId |
uint256 |
Listing ID. |
lister |
address |
Lister account address. |
unlocksAt |
uint32 |
The earliest possible time when the asset can be returned to the owner. |
ListingWithdrawal
event ListingWithdrawal(uint256 listingId, address lister, struct Assets.Asset[] assets)
Emitted when the asset is returned to the `lister`.
Name |
Type |
Description |
listingId |
uint256 |
Listing ID. |
lister |
address |
Lister account address. |
assets |
struct Assets.Asset[] |
Returned assets. |
ListingPaused
event ListingPaused(uint256 listingId)
Emitted when the listing is paused.
Name |
Type |
Description |
listingId |
uint256 |
Listing ID. |
ListingUnpaused
event ListingUnpaused(uint256 listingId)
Emitted when the listing pause is lifted.
Name |
Type |
Description |
listingId |
uint256 |
Listing ID. |
createListing
function createListing(struct Assets.Asset[] assets, struct Listings.Params params, uint32 maxLockPeriod, bool immediatePayout) external returns (uint256 listingId)
Creates new listing.
Emits an {ListingCreated} event.
Name |
Type |
Description |
assets |
struct Assets.Asset[] |
Assets to be listed. |
params |
struct Listings.Params |
Listing params. |
maxLockPeriod |
uint32 |
The maximum amount of time the original asset owner can wait before getting the asset back. |
immediatePayout |
bool |
Indicates whether the rental fee must be transferred to the lister on every renting. If FALSE, the rental fees get accumulated until withdrawn manually. |
Name |
Type |
Description |
listingId |
uint256 |
New listing ID. |
addLock
function addLock(uint256 listingId, uint32 unlockTimestamp) external
Updates listing lock time for Listing.
Name |
Type |
Description |
listingId |
uint256 |
Listing ID. |
unlockTimestamp |
uint32 |
Timestamp when asset would be unlocked. |
disableListing
function disableListing(uint256 listingId) external
Marks the assets as being delisted. This operation in irreversible.
After delisting, the asset can only be withdrawn when it has no active rentals.
Emits an {AssetDelisted} event.
Name |
Type |
Description |
listingId |
uint256 |
Listing ID. |
withdrawListingAssets
function withdrawListingAssets(uint256 listingId) external
Returns the asset back to the lister.
Emits an {AssetWithdrawn} event.
Name |
Type |
Description |
listingId |
uint256 |
Listing ID. |
pauseListing
function pauseListing(uint256 listingId) external
Puts the listing on pause.
Emits a {ListingPaused} event.
Name |
Type |
Description |
listingId |
uint256 |
Listing ID. |
unpauseListing
function unpauseListing(uint256 listingId) external
Lifts the listing pause.
Emits a {ListingUnpaused} event.
Name |
Type |
Description |
listingId |
uint256 |
Listing ID. |
listingInfo
function listingInfo(uint256 listingId) external view returns (struct Listings.Listing)
Returns the Listing details by the `listingId`.
Performs a look up among both
present (contains listed and delisted, but not yet withdrawn Listings)
and historical ones (withdrawn Listings only).
Name |
Type |
Description |
listingId |
uint256 |
Listing ID. |
Name |
Type |
Description |
[0] |
struct Listings.Listing |
Listing details. |
checkRegisteredAndListed
function checkRegisteredAndListed(uint256 listingId) external view
Reverts if Listing is
neither registered among present ones nor listed.
Name |
Type |
Description |
listingId |
uint256 |
Listing ID. |
checkIsListingWizard
function checkIsListingWizard(address account) external view
Reverts if the provided `account` does not own LISTING_WIZARD role.
Name |
Type |
Description |
account |
address |
The account to check ownership for. |
listingCount
function listingCount() external view returns (uint256)
Returns the number of currently registered listings.
Name |
Type |
Description |
[0] |
uint256 |
Listing count. |
listings
function listings(uint256 offset, uint256 limit) external view returns (uint256[], struct Listings.Listing[])
Returns the paginated list of currently registered listings.
Name |
Type |
Description |
offset |
uint256 |
Starting index. |
limit |
uint256 |
Max number of items. |
Name |
Type |
Description |
[0] |
uint256[] |
Listing IDs. |
[1] |
struct Listings.Listing[] |
Listings. |
userListingCount
function userListingCount(address lister) external view returns (uint256)
Returns the number of currently registered listings for the particular lister account.
Name |
Type |
Description |
lister |
address |
Lister address. |
Name |
Type |
Description |
[0] |
uint256 |
Listing count. |
userListings
function userListings(address lister, uint256 offset, uint256 limit) external view returns (uint256[], struct Listings.Listing[])
Returns the paginated list of currently registered listings for the particular lister account.
Name |
Type |
Description |
lister |
address |
Lister address. |
offset |
uint256 |
Starting index. |
limit |
uint256 |
Max number of items. |
Name |
Type |
Description |
[0] |
uint256[] |
Listing IDs. |
[1] |
struct Listings.Listing[] |
Listings. |
assetListingCount
function assetListingCount(address original) external view returns (uint256)
Returns the number of currently registered listings for the particular original asset address.
Name |
Type |
Description |
original |
address |
Original asset address. |
Name |
Type |
Description |
[0] |
uint256 |
Listing count. |
assetListings
function assetListings(address original, uint256 offset, uint256 limit) external view returns (uint256[], struct Listings.Listing[])
Returns the paginated list of currently registered listings for the particular original asset address.
Name |
Type |
Description |
original |
address |
Original asset address. |
offset |
uint256 |
Starting index. |
limit |
uint256 |
Max number of items. |
Name |
Type |
Description |
[0] |
uint256[] |
Listing IDs. |
[1] |
struct Listings.Listing[] |
Listings. |