|
|
@ -14,6 +14,7 @@ import {ERC721} from "solmate/tokens/ERC721.sol";
|
|
|
|
import {Owned} from "solmate/auth/Owned.sol";
|
|
|
|
import {Owned} from "solmate/auth/Owned.sol";
|
|
|
|
import {LibString} from "solmate/utils/LibString.sol";
|
|
|
|
import {LibString} from "solmate/utils/LibString.sol";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
error NotEnoughEther();
|
|
|
|
error NotOwnerOfToken();
|
|
|
|
error NotOwnerOfToken();
|
|
|
|
error MaxSupplyReached();
|
|
|
|
error MaxSupplyReached();
|
|
|
|
error TooMany();
|
|
|
|
error TooMany();
|
|
|
@ -31,6 +32,7 @@ contract Unaboomer is ERC721, Owned {
|
|
|
|
mapping(uint256 => bool) public tokenDead;
|
|
|
|
mapping(uint256 => bool) public tokenDead;
|
|
|
|
|
|
|
|
|
|
|
|
uint256 public constant MAX_SUPPLY = 10000;
|
|
|
|
uint256 public constant MAX_SUPPLY = 10000;
|
|
|
|
|
|
|
|
uint256 public price = 0.01 ether;
|
|
|
|
uint256 public minted;
|
|
|
|
uint256 public minted;
|
|
|
|
string public aliveURI;
|
|
|
|
string public aliveURI;
|
|
|
|
string public deadURI;
|
|
|
|
string public deadURI;
|
|
|
@ -48,6 +50,11 @@ contract Unaboomer is ERC721, Owned {
|
|
|
|
payable(msg.sender).transfer(balance);
|
|
|
|
payable(msg.sender).transfer(balance);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Set price for PFP + 2 BOMB
|
|
|
|
|
|
|
|
function setPrice(uint256 _price) external onlyOwner {
|
|
|
|
|
|
|
|
price = _price;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Set metadata URI for alive BOOMR
|
|
|
|
/// Set metadata URI for alive BOOMR
|
|
|
|
function setAliveURI(string calldata _baseURI) external onlyOwner {
|
|
|
|
function setAliveURI(string calldata _baseURI) external onlyOwner {
|
|
|
|
aliveURI = _baseURI;
|
|
|
|
aliveURI = _baseURI;
|
|
|
@ -70,6 +77,7 @@ contract Unaboomer is ERC721, Owned {
|
|
|
|
function mint(uint256 _amount) external payable {
|
|
|
|
function mint(uint256 _amount) external payable {
|
|
|
|
if (msg.sender == tx.origin) revert NoContract();
|
|
|
|
if (msg.sender == tx.origin) revert NoContract();
|
|
|
|
if (_amount > 20) revert TooMany();
|
|
|
|
if (_amount > 20) revert TooMany();
|
|
|
|
|
|
|
|
if (msg.value < _amount * price) revert NotEnoughEther();
|
|
|
|
if (minted + _amount > MAX_SUPPLY) revert MaxSupplyReached();
|
|
|
|
if (minted + _amount > MAX_SUPPLY) revert MaxSupplyReached();
|
|
|
|
unchecked {
|
|
|
|
unchecked {
|
|
|
|
for (uint256 i; i < _amount; i++) {
|
|
|
|
for (uint256 i; i < _amount; i++) {
|
|
|
|