-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
249 additions
and
58 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.24; | ||
|
||
import {IMarketplaceStructs} from "./IMarketplaceStructs.sol"; | ||
import {IMarketplaceEvents} from "./IMarketplaceEvents.sol"; | ||
|
||
interface IMarketplace is IMarketplaceStructs, IMarketplaceEvents { | ||
function getListingInfo( | ||
address accessToken, | ||
uint256 tokenId | ||
) external view returns (ListingInfo memory); | ||
|
||
function getRentalInfo( | ||
address accessToken, | ||
uint256 tokenId, | ||
address tenant | ||
) external view returns (RentalInfo memory); | ||
|
||
function setFeePoints(uint256 feePoints) external; | ||
|
||
function setTreasury(address payable treasury) external; | ||
|
||
function addRentCurrencies(address[] memory rentCurrencies) external; | ||
|
||
function removeRentCurrencies(address[] memory rentCurrencies) external; | ||
|
||
function list(ListArgs memory args) external; | ||
|
||
function delist(DelistArgs memory args) external; | ||
|
||
function relist(RelistArgs memory args) external; | ||
|
||
function rent(RentArgs memory args) external payable; | ||
|
||
function payRent(PayRentArgs memory args) external payable; | ||
|
||
function endLease(EndLeaseArgs memory args) external; | ||
|
||
function withdraw(WithdrawArgs memory args) external; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.24; | ||
|
||
interface IMarketplaceEvents { | ||
event List( | ||
address indexed owner, | ||
address indexed product, | ||
address accessToken, | ||
uint256 indexed tokenId, | ||
uint256 minRentalDays, | ||
uint256 maxRentalDays, | ||
address rentCurrency, | ||
uint256 dailyRent, | ||
address rentRecipient | ||
); | ||
|
||
event Delist( | ||
address indexed owner, | ||
address indexed accessToken, | ||
uint256 indexed tokenId | ||
); | ||
|
||
event Relist( | ||
address indexed owner, | ||
address indexed accessToken, | ||
uint256 indexed tokenId, | ||
uint256 minRentalDays, | ||
uint256 maxRentalDays, | ||
address rentCurrency, | ||
uint256 dailyRent, | ||
address rentRecipient | ||
); | ||
|
||
event Rent( | ||
address indexed tenant, | ||
address indexed accessToken, | ||
uint256 indexed tokenId, | ||
uint256 rentalDays, | ||
uint256 prepaidRent | ||
); | ||
|
||
event PayRent( | ||
address indexed tenant, | ||
address indexed accessToken, | ||
uint256 indexed tokenId, | ||
uint256 rent | ||
); | ||
|
||
event EndLease( | ||
address indexed tenant, | ||
address indexed accessToken, | ||
uint256 indexed tokenId, | ||
address operator | ||
); | ||
|
||
event Withdraw( | ||
address indexed owner, | ||
address indexed accessToken, | ||
uint256 indexed tokenId | ||
); | ||
} |
2 changes: 1 addition & 1 deletion
2
src/interfaces/IMarketplace.sol → contracts/interfaces/IMarketplaceStructs.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.