Skip to content

Commit e22c3cf

Browse files
authored
Update mint fee receivers (#190)
1 parent e4271eb commit e22c3cf

25 files changed

+92
-91
lines changed

contracts/nft/erc1155m/ERC1155M.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {MerkleProofLib} from "solady/src/utils/MerkleProofLib.sol";
99
import {SafeTransferLib} from "solady/src/utils/SafeTransferLib.sol";
1010
import {ReentrancyGuard} from "solady/src/utils/ReentrancyGuard.sol";
1111

12-
import {MINT_FEE_RECEIVER} from "../../utils/Constants.sol";
12+
import {LAUNCHPAD_MINT_FEE_RECEIVER} from "../../utils/Constants.sol";
1313
import {ERC1155MStorage} from "./ERC1155MStorage.sol";
1414
import {IERC1155M} from "./interfaces/IERC1155M.sol";
1515
import {MintStageInfo1155} from "../../common/Structs.sol";
@@ -306,7 +306,7 @@ contract ERC1155M is
306306

307307
/// @notice Withdraws the contract's balance
308308
function withdraw() external onlyOwner {
309-
(bool success,) = MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
309+
(bool success,) = LAUNCHPAD_MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
310310
if (!success) revert TransferFailed();
311311
_totalMintFee = 0;
312312

@@ -330,7 +330,7 @@ contract ERC1155M is
330330
_totalMintFee = 0;
331331
uint256 totalAmount = totalFee + remaining;
332332

333-
SafeTransferLib.safeTransfer(_mintCurrency, MINT_FEE_RECEIVER, totalFee);
333+
SafeTransferLib.safeTransfer(_mintCurrency, LAUNCHPAD_MINT_FEE_RECEIVER, totalFee);
334334
SafeTransferLib.safeTransfer(_mintCurrency, _fundReceiver, remaining);
335335

336336
emit WithdrawERC20(_mintCurrency, totalAmount);

contracts/nft/erc1155m/ERC1155MInitializableV1_0_2.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {MerkleProofLib} from "solady/src/utils/MerkleProofLib.sol";
1212
import {SafeTransferLib} from "solady/src/utils/SafeTransferLib.sol";
1313

1414
import {MintStageInfo1155} from "../../common/Structs.sol";
15-
import {MINT_FEE_RECEIVER} from "../../utils/Constants.sol";
15+
import {LAUNCHPAD_MINT_FEE_RECEIVER} from "../../utils/Constants.sol";
1616
import {IERC1155M} from "./interfaces/IERC1155M.sol";
1717
import {ERC1155MStorage} from "./ERC1155MStorage.sol";
1818
import {AuthorizedMinterControl} from "../../common/AuthorizedMinterControl.sol";
@@ -398,7 +398,7 @@ contract ERC1155MInitializableV1_0_2 is
398398

399399
/// @notice Withdraws the contract's balance
400400
function withdraw() external onlyOwner {
401-
(bool success,) = MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
401+
(bool success,) = LAUNCHPAD_MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
402402
if (!success) revert TransferFailed();
403403
_totalMintFee = 0;
404404

@@ -422,7 +422,7 @@ contract ERC1155MInitializableV1_0_2 is
422422
_totalMintFee = 0;
423423
uint256 totalAmount = totalFee + remaining;
424424

425-
SafeTransferLib.safeTransfer(_mintCurrency, MINT_FEE_RECEIVER, totalFee);
425+
SafeTransferLib.safeTransfer(_mintCurrency, LAUNCHPAD_MINT_FEE_RECEIVER, totalFee);
426426
SafeTransferLib.safeTransfer(_mintCurrency, _fundReceiver, remaining);
427427

428428
emit WithdrawERC20(_mintCurrency, totalAmount);

contracts/nft/erc1155m/clones/ERC1155MagicDropCloneable.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {ERC1155MagicDropMetadataCloneable} from "./ERC1155MagicDropMetadataClone
88
import {PublicStage, AllowlistStage, SetupConfig} from "./Types.sol";
99
import {IERC1155MagicDropMetadata} from "../interfaces/IERC1155MagicDropMetadata.sol";
1010

11-
import {MINT_FEE_RECEIVER} from "../../../utils/Constants.sol";
11+
import {SELF_SERVE_MINT_FEE_RECEIVER} from "../../../utils/Constants.sol";
1212

1313
/// ........
1414
/// ..... .. ...
@@ -438,7 +438,7 @@ contract ERC1155MagicDropCloneable is ERC1155MagicDropMetadataCloneable {
438438
if (mintFee > 0) {
439439
uint256 totalMintFee = mintFee * qty;
440440
proceeds -= totalMintFee;
441-
SafeTransferLib.safeTransferETH(MINT_FEE_RECEIVER, totalMintFee);
441+
SafeTransferLib.safeTransferETH(SELF_SERVE_MINT_FEE_RECEIVER, totalMintFee);
442442
}
443443

444444
// If there are no remaining proceeds after mint fee is taken, exit early

contracts/nft/erc1155m/clones/zksync/ERC1155MagicDropCloneable.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {ERC1155MagicDropMetadataCloneable} from "../ERC1155MagicDropMetadataClon
88
import {PublicStage, AllowlistStage, SetupConfig} from "../Types.sol";
99
import {IERC1155MagicDropMetadata} from "contracts/nft/erc1155m/interfaces/IERC1155MagicDropMetadata.sol";
1010

11-
import {MINT_FEE_RECEIVER} from "contracts/utils/Constants.sol";
11+
import {SELF_SERVE_MINT_FEE_RECEIVER} from "contracts/utils/Constants.sol";
1212

1313
/// ........
1414
/// ..... .. ...
@@ -439,7 +439,7 @@ contract ERC1155MagicDropCloneable is ERC1155MagicDropMetadataCloneable {
439439
if (mintFee > 0) {
440440
uint256 totalMintFee = mintFee * qty;
441441
proceeds -= totalMintFee;
442-
SafeTransferLib.safeTransferETH(MINT_FEE_RECEIVER, totalMintFee);
442+
SafeTransferLib.safeTransferETH(SELF_SERVE_MINT_FEE_RECEIVER, totalMintFee);
443443
}
444444

445445
// If there are no remaining proceeds after mint fee is taken, exit early

contracts/nft/erc1155m/zksync/ERC1155M.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {MerkleProofLib} from "solady/src/utils/MerkleProofLib.sol";
99
import {SafeTransferLib} from "solady/src/utils/ext/zksync/SafeTransferLib.sol";
1010
import {ReentrancyGuard} from "solady/src/utils/ReentrancyGuard.sol";
1111

12-
import {MINT_FEE_RECEIVER} from "contracts/utils/Constants.sol";
12+
import {LAUNCHPAD_MINT_FEE_RECEIVER} from "contracts/utils/Constants.sol";
1313
import {ERC1155MStorage} from "../ERC1155MStorage.sol";
1414
import {IERC1155M} from "contracts/nft/erc1155m/interfaces/IERC1155M.sol";
1515
import {MintStageInfo1155} from "contracts/common/Structs.sol";
@@ -307,7 +307,7 @@ contract ERC1155M is
307307

308308
/// @notice Withdraws the contract's balance
309309
function withdraw() external onlyOwner {
310-
(bool success,) = MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
310+
(bool success,) = LAUNCHPAD_MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
311311
if (!success) revert TransferFailed();
312312
_totalMintFee = 0;
313313

@@ -331,7 +331,7 @@ contract ERC1155M is
331331
_totalMintFee = 0;
332332
uint256 totalAmount = totalFee + remaining;
333333

334-
SafeTransferLib.safeTransfer(_mintCurrency, MINT_FEE_RECEIVER, totalFee);
334+
SafeTransferLib.safeTransfer(_mintCurrency, LAUNCHPAD_MINT_FEE_RECEIVER, totalFee);
335335
SafeTransferLib.safeTransfer(_mintCurrency, _fundReceiver, remaining);
336336

337337
emit WithdrawERC20(_mintCurrency, totalAmount);

contracts/nft/erc1155m/zksync/ERC1155MInitializableV1_0_2.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {MerkleProofLib} from "solady/src/utils/MerkleProofLib.sol";
1212
import {SafeTransferLib} from "solady/src/utils/ext/zksync/SafeTransferLib.sol";
1313

1414
import {MintStageInfo1155} from "contracts/common/Structs.sol";
15-
import {MINT_FEE_RECEIVER} from "contracts/utils/Constants.sol";
15+
import {LAUNCHPAD_MINT_FEE_RECEIVER} from "contracts/utils/Constants.sol";
1616
import {IERC1155M} from "contracts/nft/erc1155m/interfaces/IERC1155M.sol";
1717
import {ERC1155MStorage} from "contracts/nft/erc1155m/ERC1155MStorage.sol";
1818
import {AuthorizedMinterControl} from "contracts/common/AuthorizedMinterControl.sol";
@@ -399,7 +399,7 @@ contract ERC1155MInitializableV1_0_2 is
399399

400400
/// @notice Withdraws the contract's balance
401401
function withdraw() external onlyOwner {
402-
(bool success,) = MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
402+
(bool success,) = LAUNCHPAD_MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
403403
if (!success) revert TransferFailed();
404404
_totalMintFee = 0;
405405

@@ -423,7 +423,7 @@ contract ERC1155MInitializableV1_0_2 is
423423
_totalMintFee = 0;
424424
uint256 totalAmount = totalFee + remaining;
425425

426-
SafeTransferLib.safeTransfer(_mintCurrency, MINT_FEE_RECEIVER, totalFee);
426+
SafeTransferLib.safeTransfer(_mintCurrency, LAUNCHPAD_MINT_FEE_RECEIVER, totalFee);
427427
SafeTransferLib.safeTransfer(_mintCurrency, _fundReceiver, remaining);
428428

429429
emit WithdrawERC20(_mintCurrency, totalAmount);

contracts/nft/erc721m/ERC721CM.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {ERC721MStorage} from "./ERC721MStorage.sol";
1515
import {Cosignable} from "../../common/Cosignable.sol";
1616
import {AuthorizedMinterControl} from "../../common/AuthorizedMinterControl.sol";
1717
import {MintStageInfo} from "../../common/Structs.sol";
18-
import {MINT_FEE_RECEIVER} from "../../utils/Constants.sol";
18+
import {LAUNCHPAD_MINT_FEE_RECEIVER} from "../../utils/Constants.sol";
1919

2020
/// @title ERC721CM
2121
/// @notice An initializable ERC721 contract with multi-stage minting, royalties, and authorized minters
@@ -345,7 +345,7 @@ contract ERC721CM is
345345
/// @notice Withdraws the total mint fee and remaining balance from the contract
346346
/// @dev Can only be called by the owner
347347
function withdraw() external onlyOwner {
348-
(bool success,) = MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
348+
(bool success,) = LAUNCHPAD_MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
349349
if (!success) revert TransferFailed();
350350
_totalMintFee = 0;
351351

@@ -369,7 +369,7 @@ contract ERC721CM is
369369
_totalMintFee = 0;
370370
uint256 totalAmount = totalFee + remaining;
371371

372-
SafeTransferLib.safeTransfer(_mintCurrency, MINT_FEE_RECEIVER, totalFee);
372+
SafeTransferLib.safeTransfer(_mintCurrency, LAUNCHPAD_MINT_FEE_RECEIVER, totalFee);
373373
SafeTransferLib.safeTransfer(_mintCurrency, _fundReceiver, remaining);
374374

375375
emit WithdrawERC20(_mintCurrency, totalAmount);

contracts/nft/erc721m/ERC721CMInitializableV1_0_2.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {ERC721A, IERC721A} from "erc721a/contracts/ERC721A.sol";
1313
import {ERC721ACloneable} from "contracts/nft/erc721m/clones/ERC721ACloneable.sol";
1414
import {ERC721ACQueryableInitializable} from "contracts/nft/creator-token-standards/ERC721ACQueryableInitializable.sol";
1515
import {ERC721MStorage} from "contracts/nft/erc721m/ERC721MStorage.sol";
16-
import {MINT_FEE_RECEIVER} from "contracts/utils/Constants.sol";
16+
import {LAUNCHPAD_MINT_FEE_RECEIVER} from "contracts/utils/Constants.sol";
1717
import {MintStageInfo, SetupConfig} from "contracts/common/Structs.sol";
1818
import {IERC721MInitializable} from "contracts/nft/erc721m/interfaces/IERC721MInitializable.sol";
1919
import {Cosignable} from "contracts/common/Cosignable.sol";
@@ -404,7 +404,7 @@ contract ERC721CMInitializableV1_0_2 is
404404
/// @notice Withdraws the total mint fee and remaining balance from the contract
405405
/// @dev Can only be called by the owner
406406
function withdraw() external onlyOwner {
407-
(bool success,) = MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
407+
(bool success,) = LAUNCHPAD_MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
408408
if (!success) revert TransferFailed();
409409
_totalMintFee = 0;
410410

@@ -428,7 +428,7 @@ contract ERC721CMInitializableV1_0_2 is
428428
_totalMintFee = 0;
429429
uint256 totalAmount = totalFee + remaining;
430430

431-
SafeTransferLib.safeTransfer(_mintCurrency, MINT_FEE_RECEIVER, totalFee);
431+
SafeTransferLib.safeTransfer(_mintCurrency, LAUNCHPAD_MINT_FEE_RECEIVER, totalFee);
432432
SafeTransferLib.safeTransfer(_mintCurrency, _fundReceiver, remaining);
433433

434434
emit WithdrawERC20(_mintCurrency, totalAmount);

contracts/nft/erc721m/ERC721M.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {ERC721MStorage} from "./ERC721MStorage.sol";
1313
import {Cosignable} from "../../common/Cosignable.sol";
1414
import {AuthorizedMinterControl} from "../../common/AuthorizedMinterControl.sol";
1515
import {MintStageInfo} from "../../common/Structs.sol";
16-
import {MINT_FEE_RECEIVER} from "../../utils/Constants.sol";
16+
import {LAUNCHPAD_MINT_FEE_RECEIVER} from "../../utils/Constants.sol";
1717

1818
/// @title ERC721M
1919
/// @notice An initializable ERC721 contract with multi-stage minting, royalties, and authorized minters
@@ -329,7 +329,7 @@ contract ERC721M is
329329
/// @notice Withdraws the total mint fee and remaining balance from the contract
330330
/// @dev Can only be called by the owner
331331
function withdraw() external onlyOwner {
332-
(bool success,) = MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
332+
(bool success,) = LAUNCHPAD_MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
333333
if (!success) revert TransferFailed();
334334
_totalMintFee = 0;
335335

@@ -353,7 +353,7 @@ contract ERC721M is
353353
_totalMintFee = 0;
354354
uint256 totalAmount = totalFee + remaining;
355355

356-
SafeTransferLib.safeTransfer(_mintCurrency, MINT_FEE_RECEIVER, totalFee);
356+
SafeTransferLib.safeTransfer(_mintCurrency, LAUNCHPAD_MINT_FEE_RECEIVER, totalFee);
357357
SafeTransferLib.safeTransfer(_mintCurrency, _fundReceiver, remaining);
358358

359359
emit WithdrawERC20(_mintCurrency, totalAmount);

contracts/nft/erc721m/ERC721MInitializableV1_0_2.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {ERC721MStorage} from "contracts/nft/erc721m/ERC721MStorage.sol";
1919
import {MintStageInfo, SetupConfig} from "contracts/common/Structs.sol";
2020
import {Cosignable} from "contracts/common/Cosignable.sol";
2121
import {AuthorizedMinterControl} from "contracts/common/AuthorizedMinterControl.sol";
22-
import {MINT_FEE_RECEIVER} from "contracts/utils/Constants.sol";
22+
import {LAUNCHPAD_MINT_FEE_RECEIVER} from "contracts/utils/Constants.sol";
2323

2424
/// ........
2525
/// ..... .. ...
@@ -458,7 +458,7 @@ contract ERC721MInitializableV1_0_2 is
458458
/// @notice Withdraws the total mint fee and remaining balance from the contract
459459
/// @dev Can only be called by the owner
460460
function withdraw() external onlyOwner {
461-
(bool success,) = MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
461+
(bool success,) = LAUNCHPAD_MINT_FEE_RECEIVER.call{value: _totalMintFee}("");
462462
if (!success) revert TransferFailed();
463463
_totalMintFee = 0;
464464

@@ -482,7 +482,7 @@ contract ERC721MInitializableV1_0_2 is
482482
_totalMintFee = 0;
483483
uint256 totalAmount = totalFee + remaining;
484484

485-
SafeTransferLib.safeTransfer(_mintCurrency, MINT_FEE_RECEIVER, totalFee);
485+
SafeTransferLib.safeTransfer(_mintCurrency, LAUNCHPAD_MINT_FEE_RECEIVER, totalFee);
486486
SafeTransferLib.safeTransfer(_mintCurrency, _fundReceiver, remaining);
487487

488488
emit WithdrawERC20(_mintCurrency, totalAmount);

0 commit comments

Comments
 (0)