You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/IPNFT.sol
+13-39Lines changed: 13 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -103,37 +103,17 @@ contract IPNFT is ERC721URIStorageUpgradeable, ERC721BurnableUpgradeable, IReser
103
103
}
104
104
105
105
/**
106
-
* @notice mints an IPNFT with `tokenURI` as source of metadata. This IPNFT is linked a proof of idea (POI) which is a hash of any collection of files that represents an idea, anchored on any chain.
106
+
* @notice mints an IPNFT with `tokenURI` as source of metadata.
107
+
* Minting the IPNFT can happen either with a reservation id or poi hash (Proof of Idea).
108
+
* if the tokenId is a reservationId then it invalidates the reservation.
107
109
* @notice We are charging a nominal fee to symbolically represent the transfer of ownership rights, for a price of .001 ETH (<$2USD at current prices). This helps ensure the protocol is affordable to almost all projects, but discourages frivolous IP-NFT minting.
108
110
*
109
111
* @param to the recipient of the NFT
110
-
* @param poi the hash of the poi that will be computed to the tokenId
111
-
* @param _tokenURI a location that resolves to a valid IP-NFT metadata structure
112
-
* @param _symbol a symbol that represents the IPNFT's derivatives. Can be changed by the owner
113
-
* @param authorization a bytes encoded parameter that ensures that the poi is owned by the owner (to param)
114
-
* @return computedTokenId
115
-
*/
116
-
function mintWithPOI(addressto, bytes32poi, stringcalldata_tokenURI, stringcalldata_symbol, bytescalldataauthorization)
* @notice mints an IPNFT with `tokenURI` as source of metadata. Invalidates the reservation. Redeems `mintpassId` on the authorizer contract
129
-
* @notice We are charging a nominal fee to symbolically represent the transfer of ownership rights, for a price of .001 ETH (<$2USD at current prices). This helps ensure the protocol is affordable to almost all projects, but discourages frivolous IP-NFT minting.
130
-
*
131
-
* @param to the recipient of the NFT
132
-
* @param reservationId the reserved token id that has been reserved with `reserve()`
112
+
* @param reservationId the reserved token id that has been reserved with `reserve()` / or the poi hash
133
113
* @param _tokenURI a location that resolves to a valid IP-NFT metadata structure
134
114
* @param _symbol a symbol that represents the IPNFT's derivatives. Can be changed by the owner
135
115
* @param authorization a bytes encoded parameter that's handed to the current authorizer
136
-
* @return the `reservationId`
116
+
* @return the `tokenId`
137
117
*/
138
118
function mintReservation(addressto, uint256reservationId, stringcalldata_tokenURI, stringcalldata_symbol, bytescalldataauthorization)
139
119
external
@@ -142,31 +122,25 @@ contract IPNFT is ERC721URIStorageUpgradeable, ERC721BurnableUpgradeable, IReser
142
122
whenNotPaused
143
123
returns (uint256)
144
124
{
145
-
if (reservations[reservationId] !=_msgSender()) {
125
+
bool isPoi = reservationId >type(uint128).max;
126
+
if (!isPoi && reservations[reservationId] !=_msgSender()) {
0 commit comments