forked from rmrk-team/evm
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLightmMintModuleImplementer.sol
More file actions
112 lines (98 loc) · 2.54 KB
/
LightmMintModuleImplementer.sol
File metadata and controls
112 lines (98 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "../src/internalFunctionSet/LightmMintModuleInternal.sol";
import {ILightmMintModule} from "../src/interfaces/ILightmMintModule.sol";
contract LightmMintModuleImplementer is
ILightmMintModule,
LightmMintModuleInternal,
ReentrancyGuard
{
/**
* @inheritdoc ILightmMintModule
*/
function getMintConfig() public view returns (MintConfig memory) {
return _getMintConfig();
}
/**
* @inheritdoc ILightmMintModule
*/
function getWhitelistMerkleProofRoot() public view returns (bytes32) {
return _getWhitelistMerkleProofRoot();
}
/**
* @inheritdoc ILightmMintModule
*/
function setWhitelistMerkleProofRoot(bytes32 root) public onlyOwner {
_setWhitelistMerkleProofRoot(root);
}
/**
* @inheritdoc ILightmMintModule
*/
function getMintPermissions()
public
view
returns (bool allowPublicMint, bool allowWhitelistMint)
{
return _getMintPermissions();
}
/**
* @inheritdoc ILightmMintModule
*/
function setMintPermission(MintStage mintStage, bool allow)
public
onlyOwner
{
_setMintPermission(mintStage, allow);
}
/**
* @inheritdoc ILightmMintModule
*/
function maxSupply() public view returns (uint256) {
return _maxSupply();
}
/**
* @inheritdoc ILightmMintModule
*/
function totalSupply() public view returns (uint256) {
return _totalSupply();
}
/**
* @inheritdoc ILightmMintModule
*/
function withdraw() public onlyOwner {
_withdraw();
}
/**
* @inheritdoc ILightmMintModule
*/
function mint() public payable nonReentrant {
_directMint(msg.sender, MintStage.publicStage);
}
/**
* @inheritdoc ILightmMintModule
*/
function mint(uint256 tokenId) public payable nonReentrant {
_directMint(msg.sender, tokenId, MintStage.publicStage);
}
/**
* @inheritdoc ILightmMintModule
*/
function whitelistMint(address to, bytes32[] memory proof)
public
payable
nonReentrant
{
_mintByProvidingProof(to, proof);
}
/**
* @inheritdoc ILightmMintModule
*/
function whitelistMint(
uint256 tokenId,
address to,
bytes32[] memory proof
) public payable nonReentrant {
_mintByProvidingProof(tokenId, to, proof);
}
}