Skip to content

Commit

Permalink
Merge ba3f8ad into 7538b89
Browse files Browse the repository at this point in the history
  • Loading branch information
skimaharvey authored Jan 11, 2024
2 parents 7538b89 + ba3f8ad commit 6c94573
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,11 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
revert LSP8CannotSendToAddressZero();
}

// Check that `tokenId` is not already minted
if (_exists(tokenId)) {
revert LSP8TokenIdAlreadyMinted(tokenId);
}

_beforeTokenTransfer(address(0), to, tokenId, data);

// Check that `tokenId` was not minted inside the `_beforeTokenTransfer` hook
Expand Down Expand Up @@ -721,8 +726,8 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
* @dev Attempt to notify the operator `operator` about the `tokenId` being authorized.
* This is done by calling its {universalReceiver} function with the `_TYPEID_LSP8_TOKENOPERATOR` as typeId, if `operator` is a contract that supports the LSP1 interface.
* If `operator` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
* @param operator The address to call the {universalReceiver} function on.
* @param operator The address to call the {universalReceiver} function on.
* @param lsp1Data the data to be sent to the `operator` address in the `universalReceiver` call.
*/
function _notifyTokenOperator(
Expand All @@ -740,8 +745,8 @@ abstract contract LSP8IdentifiableDigitalAssetCore is
* @dev Attempt to notify the token sender `from` about the `tokenId` being transferred.
* This is done by calling its {universalReceiver} function with the `_TYPEID_LSP8_TOKENSSENDER` as typeId, if `from` is a contract that supports the LSP1 interface.
* If `from` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
* @param from The address to call the {universalReceiver} function on.
* @param from The address to call the {universalReceiver} function on.
* @param lsp1Data the data to be sent to the `from` address in the `universalReceiver` call.
*/
function _notifyTokenSender(
Expand Down

0 comments on commit 6c94573

Please sign in to comment.