Marketplace
Source: MarketplaceFacet.sol
Functions
List
Provides assets of the given metaverse registry for rental. Transfers and locks the provided metaverse asset to the contract and mints an asset, representing the locked asset.
Params
_metaverseId
uint256
The id of the metaverse
_metaverseRegistry
address
The registry of the metaverse
_metaverseAssetId
uint256
The id from the metaverse registry
_minPeriod
uint256
The minimum number of time (in seconds) the asset can be rented
_maxPeriod
uint256
The maximum number of time (in seconds) the asset can be rented
_maxFutureTime
uint256
The timestmap delta after which the protocol will not allow the asset to be rented at any given moment
_paymentToken
address
The token which will be accepted as a form of payment. Provide 0x0000000000000000000000000000000000000001
for ETH
_pricePerSecond
uint256
The price for rental per second
Update Conditions
Updates the lending conditions for a given asset. Pays out any unclaimed rent to the consumer if set, otherwise it is paid to the owner of the LandWorks NFT. Updated conditions apply the next time the asset is rented. Does not affect previous and queued rents. If any of the properties should not be modified, the current values for them must be provided.
Params
_assetId
uint256
The target asset
_minPeriod
uint256
The minimum number in seconds the asset can be rented
_maxPeriod
uint256
The maximum number in seconds the asset can be rented
_maxFutureTime
uint256
The timestamp delta after which the protocol will not allow the asset to be rented at any given moment
_paymentToken
address
The toen which will be accepted as a form of payment. Provide 0x0000000000000000000000000000000000000001
for ETH
_pricePerSecond
uint256
The price for rental per second
Delist
Delists the asset from the marketplace. Pays out the current unclaimed rent fees to the consumer if set, otherwise it is paid to the owner of the LandWorks NFT. If there are no active rents -> Burns the asset and transfers the original metaverse asset represented by the LandWorks NFT to the asset owner.
Params
_assetId
uint256
The target asset
Withdraw
Withdraws the already delisted from the marketplace asset. Burns the asset and transfers the original metaverse asset represented by the LandWorks NFT to the owner. Pays out any unclaimed rent to the consumer if set, otherwise it is paid to the owner of the LandWorks NFT.
Params
_assetId
uint256
The target asset
Rent
Rents an asset for a given period. Charges msg.sender
for the rent upfront. Rent starts from the last rented timestamp or from the current timestamp of the transaction if the property is available right now.
Params
_assetId
uint256
The target asset
_period
uint256
The target rental period in seconds
Last updated