Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 69825e4

Browse files
committed
pre-release-version
1 parent 6368421 commit 69825e4

File tree

8 files changed

+699
-857
lines changed

8 files changed

+699
-857
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44

55
# web-dev admins
66
* @Allin-Moondao
7-
* @sushichaoren
7+
* @BigWinner721

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Hayrul-Music-NFT
2-
Hayrul-Music-NFT project https://discord.com/channels/914720248140279868/955324258769326080
2+
Hayrul-Music-NFT project https://discord.gg/2G3jQz6AfD

contract/TTM.sol

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,51 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.4;
33

4-
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
54
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
65
import "@openzeppelin/contracts/access/Ownable.sol";
76

87
error AlreadyClaimed();
9-
error NoRestUnMint();
8+
error MintClosed();
109
error ShouldBeMultisig();
1110

1211
contract TTM is ERC1155, Ownable {
1312

14-
bytes32 public merkleRoot;
15-
uint8 public totalSupply = 166;
16-
uint8 public restUnMint;
13+
bool public freemintSwitch;
1714
mapping(address => bool) public claimed;
1815
address public multiSig;
1916

20-
constructor(bytes32 _merkleRoot, address _multiSig)
21-
ERC1155("ipfs://QmetFMEgUtFmRxG3XWKRnzxpmJoJLiKvBrLn8LmojEdVh9/metadata.json")
17+
constructor(address _multiSig)
18+
ERC1155("ipfs://QmVCnSaBd1jpkBMYRAMSj54QbC7QS6a9fx6iwAgWx7Urdt/{id}.json")
2219
{
23-
merkleRoot = _merkleRoot;
24-
restUnMint = totalSupply;
2520
multiSig = _multiSig;
21+
freemintSwitch = false;
2622
}
2723

28-
function setURI(string memory newuri) public onlyOwner {
29-
_setURI(newuri);
24+
function setMintSwitch(bool _switch) public onlyOwner{
25+
freemintSwitch = _switch;
3026
}
3127

32-
function setmerkleRoot(bytes32 _merkleRoot) public onlyOwner{
33-
merkleRoot = _merkleRoot;
28+
function setURI(string memory newuri) public onlyOwner {
29+
_setURI(newuri);
3430
}
3531

36-
function mint(bytes32[] calldata merkleProof)
32+
function mint()
3733
public
3834
{
3935
if (claimed[msg.sender] == true) revert AlreadyClaimed();
40-
if (restUnMint == 0) revert NoRestUnMint();
41-
require(MerkleProof.verify(merkleProof, merkleRoot, keccak256(abi.encodePacked(msg.sender))), "invalid merkle proof");
42-
_mint(msg.sender,0, 1, "");
36+
if (freemintSwitch == false) revert MintClosed();
37+
_mint(msg.sender,1, 1, "");
4338
claimed[msg.sender] = true;
44-
restUnMint--;
4539
}
4640

47-
//We reserve 10 nfts for multisig, if someone did not mint for a long time, the multi-signature could mint all the remaining nfts
41+
//The NFTs minted by multisig will be airdropped to our friends helped this project
4842
function multiSigMint()
4943
public
5044
{
5145
if (msg.sender != multiSig) revert ShouldBeMultisig();
52-
if (restUnMint == 0) revert NoRestUnMint();
53-
_mint(msg.sender,0, restUnMint, "");
54-
restUnMint = 0;
46+
if (claimed[msg.sender] == true) revert AlreadyClaimed();
47+
_mint(msg.sender,0, 126, "");
48+
claimed[msg.sender] = true;
5549
}
5650

57-
}
51+
}

0 commit comments

Comments
 (0)