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
@@ -103,15 +106,17 @@ contract IPNFT is ERC721URIStorageUpgradeable, ERC721BurnableUpgradeable, IReser
103
106
}
104
107
105
108
/**
106
-
* @notice mints an IPNFT with `tokenURI` as source of metadata. Invalidates the reservation. Redeems `mintpassId` on the authorizer contract
107
-
* @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 the ensure the protocol is affordable to almost all projects, but discourages frivolous IP-NFT minting.
109
+
* @notice mints an IPNFT with `tokenURI` as source of metadata.
110
+
* Minting the IPNFT can happen either with a reservation id or poi hash (Proof of Idea).
111
+
* if the tokenId is a reservationId then it invalidates the reservation.
112
+
* @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
113
*
109
114
* @param to the recipient of the NFT
110
-
* @param reservationId the reserved token id that has been reserved with `reserve()`
115
+
* @param reservationId the reserved token id that has been reserved with `reserve()` / or the poi hash
111
116
* @param _tokenURI a location that resolves to a valid IP-NFT metadata structure
112
117
* @param _symbol a symbol that represents the IPNFT's derivatives. Can be changed by the owner
113
118
* @param authorization a bytes encoded parameter that's handed to the current authorizer
114
-
* @return the `reservationId`
119
+
* @return the `tokenId`
115
120
*/
116
121
function mintReservation(addressto, uint256reservationId, stringcalldata_tokenURI, stringcalldata_symbol, bytescalldataauthorization)
117
122
external
@@ -120,7 +125,8 @@ contract IPNFT is ERC721URIStorageUpgradeable, ERC721BurnableUpgradeable, IReser
120
125
whenNotPaused
121
126
returns (uint256)
122
127
{
123
-
if (reservations[reservationId] !=_msgSender()) {
128
+
bool _isPoi =isPoi(reservationId);
129
+
if (!_isPoi && reservations[reservationId] !=_msgSender()) {
124
130
revertNotOwningReservation(reservationId);
125
131
}
126
132
@@ -131,8 +137,10 @@ contract IPNFT is ERC721URIStorageUpgradeable, ERC721BurnableUpgradeable, IReser
131
137
if (!mintAuthorizer.authorizeMint(_msgSender(), to, abi.encode(SignedMintAuthorization(reservationId, _tokenURI, authorization)))) {
132
138
revertUnauthorized();
133
139
}
140
+
if (!_isPoi) {
141
+
delete reservations[reservationId];
142
+
}
134
143
135
-
delete reservations[reservationId];
136
144
symbol[reservationId] = _symbol;
137
145
mintAuthorizer.redeem(authorization);
138
146
@@ -188,7 +196,7 @@ contract IPNFT is ERC721URIStorageUpgradeable, ERC721BurnableUpgradeable, IReser
0 commit comments