-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathYONEKO.sol
75 lines (62 loc) · 3.05 KB
/
YONEKO.sol
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
/*
*
* ## ## #######
* ## ## ## ##
* #### ## ##
* ## ## ##
* ## ## ##
* ## ## ##
* ## #######
* ## ## #### ######## ######## #### ######## ######
* ## ## ## ## ## ## ## ## ##
* ## ## ## ## ## ## ## ##
* ##### ## ## ## ## ###### ######
* ## ## ## ## ## ## ## ##
* ## ## ## ## ## ## ## ## ##
* ## ## #### ## ## #### ######## ######
*
* Feline frens joining the Dastardly Ducks
* smol farm x Iron Chef Cat Cora
* Contract by: existentialenso.eth
*/
pragma solidity ^0.8.4;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
contract YONEKO is ERC721A, Ownable, Pausable {
uint256 public mintPrice = 0.015 ether;
uint256 public constant maxTokens = 5000;
string public constant baseURI = "ipfs://QmPEdkX3maugP74zD1BLBNgP8DDkU6Kp6rosaPSCguY11k/";
constructor() ERC721A("Yo Kitties", "YONEKO") {
_pause();
}
function mintCats(uint256 qty) public payable whenNotPaused {
require(qty <= 25, 'MAX_QTY_EXCEEDED');
unchecked { require(mintPrice * qty <= msg.value, 'LOW_ETHER'); }
unchecked { require(totalSupply() + qty <= maxTokens, 'MAX_REACHED'); }
_safeMint(msg.sender, qty);
}
// Mint the first 60 ducks to smol farm-held wallets
function promoMint() public onlyOwner {
unchecked { require(totalSupply() == 0, 'PROMO_ALREADY_RUN'); }
_safeMint(0x8aa986eB2F0D3b5001C9C2093698A4e13d646D5b, 10);
_safeMint(0x8f4612e9aAB90eaD61A1637436BCb9FD0b606652, 10);
_safeMint(0x72CAa8687E5C63f8bA2a271212556dA5eD58f0b0, 40);
_unpause();
}
function setPrice(uint256 newPrice) public onlyOwner {
mintPrice = newPrice;
}
function withdraw() public onlyOwner {
payable(msg.sender).transfer(address(this).balance);
}
function _baseURI() internal pure override returns (string memory) {
return baseURI;
}
function pause() public onlyOwner {
_pause();
}
function unpause() public onlyOwner {
_unpause();
}
}