diff --git a/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol b/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol index 5b00006f8..031f93cdb 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol @@ -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 @@ -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( @@ -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(