@@ -9,14 +9,14 @@ import "../../../utils/introspection/IERC165.sol";
9
9
/// Defines the interface that a rental agreement contract should support to be used by
10
10
/// `IERC721Rental`.
11
11
interface IERC721RentalAgreement is IERC165 {
12
- /// Function called at the end of `IERC721Rental.setRentalAgreement` to replace an
13
- /// existing rental agreement contract of a token .
12
+ /// Function called at the end of `IERC721Rental.setRentalAgreement` on the agreement
13
+ /// currently set for the token, if one exists .
14
14
///
15
15
/// @dev Allows the agreement to cancel the change by reverting if it deems it
16
16
/// necessary. The `IERC721Rental` is calling this function, so all information needed
17
- /// can be queried through the `msg.sender`. This event is not called if a rental agreement
18
- /// is not in progress .
19
- function afterRentalAgreementReplaced (uint256 tokenId ) external ;
17
+ /// can be queried through the `msg.sender`. This event is only called when the token
18
+ /// is not rented, as it is not allowed to change an agreement during a rental .
19
+ function afterAgreementRemoved (uint256 tokenId ) external ;
20
20
21
21
/// Function called at the end of `IERC721Rental.acceptRentalAgreement`.
22
22
///
@@ -52,13 +52,13 @@ interface IERC721RentalAgreement is IERC165 {
52
52
interface IERC721Rental is IERC721 {
53
53
/// Set the rental agreement contract for a specific token.
54
54
///
55
- /// A previously set rental agreement contract must accept its replacement .
56
- /// The caller must be the owner or their approver or operator.
55
+ /// A previously set rental agreement contract must accept the change .
56
+ /// The caller must be the owner (not the renter) or their approver or operator.
57
57
/// The token must not be currently rented.
58
58
/// The agreement is removed upon token transfer.
59
59
///
60
- /// @dev If an agreement was set, calls its
61
- /// `IERC721RentalAgreement.afterRentalAgreementReplaced ` at the end of the call.
60
+ /// @dev If an agreement was already set before this call , calls its
61
+ /// `IERC721RentalAgreement.afterAgreementRemoved ` at the end of the call.
62
62
///
63
63
/// @param agreement The agreement. Set to 0 to remove the current agreement.
64
64
function setRentalAgreement (IERC721RentalAgreement agreement , uint256 tokenId ) external ;
@@ -87,7 +87,7 @@ interface IERC721Rental is IERC721 {
87
87
/// @dev Calls `IERC721RentalAgreement.afterRentalStopped` at the end of the call.
88
88
function stopRentalAgreement (uint256 tokenId ) external ;
89
89
90
- /// @return The address of the rented token owner, or 0 is there is no rental in
91
- /// progress.
90
+ /// @return The address of the asset owner and not the renter , or 0 if there is no
91
+ /// rental in progress.
92
92
function rentedOwnerOf (uint256 tokenId ) external view returns (address );
93
93
}
0 commit comments