@@ -9,7 +9,6 @@ import "../extension/Ownable.sol";
9
9
import "../extension/Royalty.sol " ;
10
10
import "../extension/BatchMintMetadata.sol " ;
11
11
import "../extension/PrimarySale.sol " ;
12
- import "../extension/SignatureMintERC1155.sol " ;
13
12
import "../extension/DropSinglePhase1155.sol " ;
14
13
import "../extension/LazyMint.sol " ;
15
14
import "../extension/DelayedReveal.sol " ;
@@ -19,19 +18,25 @@ import "../lib/TWStrings.sol";
19
18
20
19
/**
21
20
* BASE: ERC1155Base
22
- * EXTENSION: SignatureMintERC1155, DropSinglePhase1155
21
+ * EXTENSION: DropSinglePhase1155
23
22
*
24
- * The `ERC1155Drop` contract uses the `ERC1155Base` contract, along with the `SignatureMintERC1155` and `DropSinglePhase1155` extension.
23
+ * The `ERC1155Base` smart contract implements the ERC1155 NFT standard.
24
+ * It includes the following additions to standard ERC1155 logic:
25
25
*
26
- * The 'signature minting' mechanism in the `SignatureMintERC1155` extension is a way for a contract admin to authorize
27
- * an external party's request to mint tokens on the admin's contract. At a high level, this means you can authorize
28
- * some external party to mint tokens on your contract, and specify what exactly will be minted by that external party.
26
+ * - Contract metadata for royalty support on platforms such as OpenSea that use
27
+ * off-chain information to distribute roaylties.
28
+ *
29
+ * - Ownership of the contract, with the ability to restrict certain functions to
30
+ * only be called by the contract's owner.
31
+ *
32
+ * - Multicall capability to perform multiple actions atomically
33
+ *
34
+ * - EIP 2981 compliance for royalty support on NFT marketplaces.
29
35
*
30
36
* The `drop` mechanism in the `DropSinglePhase1155` extension is a distribution mechanism for lazy minted tokens. It lets
31
37
* you set restrictions such as a price to charge, an allowlist etc. when an address atttempts to mint lazy minted tokens.
32
38
*
33
- * The `ERC721Drop` contract lets you lazy mint tokens, and distribute those lazy minted tokens via signature minting, or
34
- * via the drop mechanism.
39
+ * The `ERC721Drop` contract lets you lazy mint tokens, and distribute those lazy minted tokens via the drop mechanism.
35
40
*/
36
41
37
42
contract ERC1155Drop is
@@ -42,7 +47,6 @@ contract ERC1155Drop is
42
47
Multicall ,
43
48
BatchMintMetadata ,
44
49
PrimarySale ,
45
- SignatureMintERC1155 ,
46
50
LazyMint ,
47
51
DelayedReveal ,
48
52
DropSinglePhase1155
@@ -96,54 +100,6 @@ contract ERC1155Drop is
96
100
}
97
101
}
98
102
99
- /*//////////////////////////////////////////////////////////////
100
- Signature minting logic
101
- //////////////////////////////////////////////////////////////*/
102
-
103
- /**
104
- * @notice Mints tokens according to the provided mint request.
105
- *
106
- * @param _req The payload / mint request.
107
- * @param _signature The signature produced by an account signing the mint request.
108
- */
109
- function mintWithSignature (MintRequest calldata _req , bytes calldata _signature )
110
- external
111
- payable
112
- virtual
113
- override
114
- returns (address signer )
115
- {
116
- require (_req.quantity > 0 , "Minting zero tokens. " );
117
-
118
- uint256 tokenIdToMint = _req.tokenId;
119
- require (tokenIdToMint < nextTokenIdToMint (), "Claiming invalid tokenId. " );
120
-
121
- // Verify and process payload.
122
- signer = _processRequest (_req, _signature);
123
-
124
- /**
125
- * Get receiver of tokens.
126
- *
127
- * Note: If `_req.to == address(0)`, a `mintWithSignature` transaction sitting in the
128
- * mempool can be frontrun by copying the input data, since the minted tokens
129
- * will be sent to the `_msgSender()` in this case.
130
- */
131
- address receiver = _req.to == address (0 ) ? msg .sender : _req.to;
132
-
133
- // Collect price
134
- collectPriceOnClaim (_req.primarySaleRecipient, _req.quantity, _req.currency, _req.pricePerToken);
135
-
136
- // Set royalties, if applicable.
137
- if (_req.royaltyRecipient != address (0 ) && _req.royaltyBps != 0 ) {
138
- _setupRoyaltyInfoForToken (tokenIdToMint, _req.royaltyRecipient, _req.royaltyBps);
139
- }
140
-
141
- // Mint tokens.
142
- _mint (receiver, tokenIdToMint, _req.quantity, "" );
143
-
144
- emit TokensMintedWithSignature (signer, receiver, tokenIdToMint, _req);
145
- }
146
-
147
103
/*///////////////////////////////////////////////////////////////
148
104
Delayed reveal logic
149
105
//////////////////////////////////////////////////////////////*/
@@ -322,9 +278,4 @@ contract ERC1155Drop is
322
278
function _canReveal () internal view virtual returns (bool ) {
323
279
return msg .sender == owner ();
324
280
}
325
-
326
- /// @dev Returns whether a given address is authorized to sign mint requests.
327
- function _canSignMintRequest (address _signer ) internal view virtual override returns (bool ) {
328
- return _signer == owner ();
329
- }
330
281
}
0 commit comments