@@ -3,44 +3,98 @@ pragma solidity 0.8.30;
33
44import {FeeType} from "@ticket-storage/MarketplaceStorage.sol " ;
55
6+ /// @title Marketplace interface
7+ /// @notice Interface for the Marketplace facet
8+ /// @author HostIt Protocol
69interface IMarketplace {
710 //*//////////////////////////////////////////////////////////////////////////
811 // EXTERNAL FUNCTIONS
912 //////////////////////////////////////////////////////////////////////////*//
1013
14+ /// @notice Mints a ticket for the specified buyer
15+ /// @param ticketId The ID of the ticket to mint
16+ /// @param feeType The type of fee to use for the ticket
17+ /// @param buyer The address of the buyer
18+ /// @return The token ID of the minted ticket
1119 function mintTicket (uint64 ticketId , FeeType feeType , address buyer ) external payable returns (uint40 );
1220
21+ /// @notice Sets the fees for the specified ticket
22+ /// @param ticketId The ID of the ticket to set fees for
23+ /// @param feeTypes The types of fees to set
24+ /// @param fees The fees to set
1325 function setTicketFees (uint64 ticketId , FeeType[] calldata feeTypes , uint256 [] calldata fees ) external ;
1426
27+ /// @notice Claims a refund for the specified ticket
28+ /// @param ticketId The ID of the ticket to claim a refund for
29+ /// @param feeType The type of fee to claim a refund for
30+ /// @param tokenId The token ID of the ticket to claim a refund for
31+ /// @param to The address to send the refund to
1532 function claimRefund (uint64 ticketId , FeeType feeType , uint256 tokenId , address to ) external ;
1633
34+ /// @notice Withdraws the ticket balance for the specified ticket
35+ /// @param ticketId The ID of the ticket to withdraw the balance for
36+ /// @param feeType The type of fee to withdraw the balance for
37+ /// @param to The address to send the balance to
1738 function withdrawTicketBalance (uint64 ticketId , FeeType feeType , address to ) external ;
1839
40+ /// @notice Withdraws the HostIt balance for the specified fee type
41+ /// @param feeType The type of fee to withdraw the balance for
42+ /// @param to The address to send the balance to
1943 function withdrawHostItBalance (FeeType feeType , address to ) external ;
2044
2145 //*//////////////////////////////////////////////////////////////////////////
2246 // VIEW FUNCTIONS
2347 //////////////////////////////////////////////////////////////////////////*//
2448
49+ /// @notice Checks if the specified fee type is enabled for the specified ticket
50+ /// @param ticketId The ID of the ticket to check
51+ /// @param feeType The type of fee to check
52+ /// @return True if the fee type is enabled, false otherwise
2553 function isFeeEnabled (uint64 ticketId , FeeType feeType ) external view returns (bool );
2654
55+ /// @notice Gets the address of the fee token for the specified fee type
56+ /// @param feeType The type of fee to get the address for
57+ /// @return The address of the fee token
2758 function getFeeTokenAddress (FeeType feeType ) external view returns (address );
2859
60+ /// @notice Gets the fee for the specified ticket and fee type
61+ /// @param ticketId The ID of the ticket to get the fee for
62+ /// @param feeType The type of fee to get
63+ /// @return The fee for the ticket and fee type
2964 function getTicketFee (uint64 ticketId , FeeType feeType ) external view returns (uint256 );
65+
66+ /// @notice Gets the fees for the specified ticket
67+ /// @param ticketId The ID of the ticket to get the fees for
68+ /// @param feeType The type of fee to get
69+ /// @return ticketFee The ticket fee for the ticket
70+ /// @return hostItFee The HostIt fee for the ticket
71+ /// @return totalFee The total fee for the ticket
3072 function getAllFees (uint64 ticketId , FeeType feeType )
3173 external
3274 view
3375 returns (uint256 ticketFee , uint256 hostItFee , uint256 totalFee );
3476
77+ /// @notice Gets the balance of the specified ticket for the specified fee type
78+ /// @param ticketId The ID of the ticket to get the balance for
79+ /// @param feeType The type of fee to get the balance for
80+ /// @return The balance of the ticket for the fee type
3581 function getTicketBalance (uint64 ticketId , FeeType feeType ) external view returns (uint256 );
3682
83+ /// @notice Gets the balance of HostIt for the specified fee type
84+ /// @param feeType The type of fee to get the balance for
85+ /// @return The balance of HostIt for the fee type
3786 function getHostItBalance (FeeType feeType ) external view returns (uint256 );
3887
39- function calculateHostItFee (uint256 fee ) external view returns (uint256 );
40-
4188 //*//////////////////////////////////////////////////////////////////////////
4289 // PURE FUNCTIONS
4390 //////////////////////////////////////////////////////////////////////////*//
4491
92+ /// @notice Calculates the HostIt fee for the specified fee
93+ /// @param fee The fee to calculate the HostIt fee for
94+ /// @return The HostIt fee for the fee
95+ function getHostItFee (uint256 fee ) external pure returns (uint256 );
96+
97+ /// @notice Gets the refund period
98+ /// @return The refund period
4599 function getRefundPeriod () external pure returns (uint256 );
46100}
0 commit comments