|
|
@ -1,12 +1,12 @@
|
|
|
|
// SPDX-License-Identifier: UNLICENSED
|
|
|
|
// SPDX-License-Identifier: UNLICENSED
|
|
|
|
pragma solidity ^0.8.13;
|
|
|
|
pragma solidity ^0.8.13;
|
|
|
|
|
|
|
|
|
|
|
|
import {ERC721A} from "erc721a/ERC721A.sol";
|
|
|
|
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";
|
|
|
|
import {Main} from "./Main.sol";
|
|
|
|
import {Main} from "./Main.sol";
|
|
|
|
|
|
|
|
|
|
|
|
contract Unaboomer is ERC721A, Owned {
|
|
|
|
contract Unaboomer is ERC721, Owned {
|
|
|
|
using LibString for uint256;
|
|
|
|
using LibString for uint256;
|
|
|
|
|
|
|
|
|
|
|
|
mapping(uint256 => bool) public tokenDead;
|
|
|
|
mapping(uint256 => bool) public tokenDead;
|
|
|
@ -19,7 +19,7 @@ contract Unaboomer is ERC721A, Owned {
|
|
|
|
string public deadURI;
|
|
|
|
string public deadURI;
|
|
|
|
Main public main;
|
|
|
|
Main public main;
|
|
|
|
|
|
|
|
|
|
|
|
constructor() ERC721A("Unaboomer", "BOOMR") Owned(msg.sender) {}
|
|
|
|
constructor() ERC721("Unaboomer", "BOOMR") Owned(msg.sender) {}
|
|
|
|
|
|
|
|
|
|
|
|
// =========================================================================
|
|
|
|
// =========================================================================
|
|
|
|
// Admin
|
|
|
|
// Admin
|
|
|
@ -60,10 +60,18 @@ contract Unaboomer is ERC721A, Owned {
|
|
|
|
// Tokens
|
|
|
|
// Tokens
|
|
|
|
// =========================================================================
|
|
|
|
// =========================================================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Helper function to get supply minted
|
|
|
|
|
|
|
|
function totalSupply() public view returns (uint256) {
|
|
|
|
|
|
|
|
return minted;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Mint tokens from main contract
|
|
|
|
/// Mint tokens from main contract
|
|
|
|
function radicalize(address _to, uint256 _amount) external payable onlyMain {
|
|
|
|
function radicalize(address _to, uint256 _amount) external payable onlyMain {
|
|
|
|
require(totalSupply() + _amount <= MAX_SUPPLY, "supply reached");
|
|
|
|
require(totalSupply() + _amount <= MAX_SUPPLY, "supply reached");
|
|
|
|
_safeMint(_to, _amount);
|
|
|
|
for (uint256 i; i < _amount; i++) {
|
|
|
|
|
|
|
|
_safeMint(_to, minted);
|
|
|
|
|
|
|
|
minted++;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Toggle token state from living to dead
|
|
|
|
/// Toggle token state from living to dead
|
|
|
@ -83,7 +91,7 @@ contract Unaboomer is ERC721A, Owned {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function supportsInterface(bytes4 interfaceId) public view virtual override (ERC721A) returns (bool) {
|
|
|
|
function supportsInterface(bytes4 interfaceId) public view virtual override (ERC721) returns (bool) {
|
|
|
|
return super.supportsInterface(interfaceId);
|
|
|
|
return super.supportsInterface(interfaceId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|