Marketplace

Source: MarketplaceFacet.sol

Functions

List

function list(
        uint256 _metaverseId,
        address _metaverseRegistry,
        uint256 _metaverseAssetId,
        uint256 _minPeriod,
        uint256 _maxPeriod,
        uint256 _maxFutureTime,
        address _paymentToken,
        uint256 _pricePerSecond
    ) external returns (uint256)

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

Update Conditions

function updateConditions(
        uint256 _assetId,
        uint256 _minPeriod,
        uint256 _maxPeriod,
        uint256 _maxFutureTime,
        address _paymentToken,
        uint256 _pricePerSecond
    ) external payout(_assetId)

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

Delist

function delist(uint256 _assetId) external

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

Withdraw

function withdraw(uint256 _assetId) public

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

Rent

function rent(uint256 _assetId, uint256 _period) external payable
    returns (uint256, bool)

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

Last updated