文件 1 的 14:Address.sol
pragma solidity ^0.8.1;
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
文件 2 的 14:Context.sol
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
文件 3 的 14:ERC165.sol
pragma solidity ^0.8.0;
import "./IERC165.sol";
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
文件 4 的 14:ERC721A.sol
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';
error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerQueryForNonexistentToken();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
bool burned;
}
struct AddressData {
uint64 balance;
uint64 numberMinted;
uint64 numberBurned;
uint64 aux;
}
uint256 internal _currentIndex;
uint256 internal _burnCounter;
string private _name;
string private _symbol;
mapping(uint256 => TokenOwnership) internal _ownerships;
mapping(address => AddressData) private _addressData;
mapping(uint256 => address) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
}
function _startTokenId() internal view virtual returns (uint256) {
return 0;
}
function totalSupply() public view returns (uint256) {
unchecked {
return _currentIndex - _burnCounter - _startTokenId();
}
}
function _totalMinted() internal view returns (uint256) {
unchecked {
return _currentIndex - _startTokenId();
}
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
function balanceOf(address owner) public view override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return uint256(_addressData[owner].balance);
}
function _numberMinted(address owner) internal view returns (uint256) {
return uint256(_addressData[owner].numberMinted);
}
function _numberBurned(address owner) internal view returns (uint256) {
return uint256(_addressData[owner].numberBurned);
}
function _getAux(address owner) internal view returns (uint64) {
return _addressData[owner].aux;
}
function _setAux(address owner, uint64 aux) internal {
_addressData[owner].aux = aux;
}
function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
uint256 curr = tokenId;
unchecked {
if (_startTokenId() <= curr && curr < _currentIndex) {
TokenOwnership memory ownership = _ownerships[curr];
if (!ownership.burned) {
if (ownership.addr != address(0)) {
return ownership;
}
while (true) {
curr--;
ownership = _ownerships[curr];
if (ownership.addr != address(0)) {
return ownership;
}
}
}
}
}
revert OwnerQueryForNonexistentToken();
}
function ownerOf(uint256 tokenId) public view override returns (address) {
return _ownershipOf(tokenId).addr;
}
function name() public view virtual override returns (string memory) {
return _name;
}
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
string memory baseURI = _baseURI();
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : '';
}
function _baseURI() internal view virtual returns (string memory) {
return '';
}
function approve(address to, uint256 tokenId) public override {
address owner = ERC721A.ownerOf(tokenId);
if (to == owner) revert ApprovalToCurrentOwner();
if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) {
revert ApprovalCallerNotOwnerNorApproved();
}
_approve(to, tokenId, owner);
}
function getApproved(uint256 tokenId) public view override returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId];
}
function setApprovalForAll(address operator, bool approved) public virtual override {
if (operator == _msgSender()) revert ApproveToCaller();
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
_transfer(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, '');
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
_transfer(from, to, tokenId);
if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
}
function _exists(uint256 tokenId) internal view returns (bool) {
return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned;
}
function _safeMint(address to, uint256 quantity) internal {
_safeMint(to, quantity, '');
}
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
_mint(to, quantity, _data, true);
}
function _mint(
address to,
uint256 quantity,
bytes memory _data,
bool safe
) internal {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
unchecked {
_addressData[to].balance += uint64(quantity);
_addressData[to].numberMinted += uint64(quantity);
_ownerships[startTokenId].addr = to;
_ownerships[startTokenId].startTimestamp = uint64(block.timestamp);
uint256 updatedIndex = startTokenId;
uint256 end = updatedIndex + quantity;
if (safe && to.isContract()) {
do {
emit Transfer(address(0), to, updatedIndex);
if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
} while (updatedIndex != end);
if (_currentIndex != startTokenId) revert();
} else {
do {
emit Transfer(address(0), to, updatedIndex++);
} while (updatedIndex != end);
}
_currentIndex = updatedIndex;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
function _transfer(
address from,
address to,
uint256 tokenId
) private {
TokenOwnership memory prevOwnership = _ownershipOf(tokenId);
if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();
bool isApprovedOrOwner = (_msgSender() == from ||
isApprovedForAll(from, _msgSender()) ||
getApproved(tokenId) == _msgSender());
if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
if (to == address(0)) revert TransferToZeroAddress();
_beforeTokenTransfers(from, to, tokenId, 1);
_approve(address(0), tokenId, from);
unchecked {
_addressData[from].balance -= 1;
_addressData[to].balance += 1;
TokenOwnership storage currSlot = _ownerships[tokenId];
currSlot.addr = to;
currSlot.startTimestamp = uint64(block.timestamp);
uint256 nextTokenId = tokenId + 1;
TokenOwnership storage nextSlot = _ownerships[nextTokenId];
if (nextSlot.addr == address(0)) {
if (nextTokenId != _currentIndex) {
nextSlot.addr = from;
nextSlot.startTimestamp = prevOwnership.startTimestamp;
}
}
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
function _burn(uint256 tokenId) internal virtual {
_burn(tokenId, false);
}
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
TokenOwnership memory prevOwnership = _ownershipOf(tokenId);
address from = prevOwnership.addr;
if (approvalCheck) {
bool isApprovedOrOwner = (_msgSender() == from ||
isApprovedForAll(from, _msgSender()) ||
getApproved(tokenId) == _msgSender());
if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
}
_beforeTokenTransfers(from, address(0), tokenId, 1);
_approve(address(0), tokenId, from);
unchecked {
AddressData storage addressData = _addressData[from];
addressData.balance -= 1;
addressData.numberBurned += 1;
TokenOwnership storage currSlot = _ownerships[tokenId];
currSlot.addr = from;
currSlot.startTimestamp = uint64(block.timestamp);
currSlot.burned = true;
uint256 nextTokenId = tokenId + 1;
TokenOwnership storage nextSlot = _ownerships[nextTokenId];
if (nextSlot.addr == address(0)) {
if (nextTokenId != _currentIndex) {
nextSlot.addr = from;
nextSlot.startTimestamp = prevOwnership.startTimestamp;
}
}
}
emit Transfer(from, address(0), tokenId);
_afterTokenTransfers(from, address(0), tokenId, 1);
unchecked {
_burnCounter++;
}
}
function _approve(
address to,
uint256 tokenId,
address owner
) private {
_tokenApprovals[tokenId] = to;
emit Approval(owner, to, tokenId);
}
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert TransferToNonERC721ReceiverImplementer();
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
文件 5 的 14:IERC165.sol
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 6 的 14:IERC721.sol
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
interface IERC721 is IERC165 {
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function setApprovalForAll(address operator, bool _approved) external;
function isApprovedForAll(address owner, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
文件 7 的 14:IERC721Metadata.sol
pragma solidity ^0.8.0;
import "../IERC721.sol";
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
文件 8 的 14:IERC721Receiver.sol
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
文件 9 的 14:MerkleProof.sol
pragma solidity ^0.8.0;
library MerkleProof {
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
computedHash = _efficientHash(computedHash, proofElement);
} else {
computedHash = _efficientHash(proofElement, computedHash);
}
}
return computedHash;
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}
文件 10 的 14:MerkleWhitelist.sol
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract MerkleWhitelist is Ownable {
bytes32 public wlWhitelistMerkleRoot;
bytes32 public mainWhitelistMerkleRoot;
bytes32 public extraWhitelistMerkleRoot;
bytes32 public teamWhitelistMerkleRoot;
function _verifyWlSender(bytes32[] memory proof) internal view returns (bool) {
return _verify(proof, _hash(msg.sender), wlWhitelistMerkleRoot);
}
function _verifyMainSender(bytes32[] memory proof) internal view returns (bool) {
return _verify(proof, _hash(msg.sender), mainWhitelistMerkleRoot);
}
function _verifyExtraSender(bytes32[] memory proof) internal view returns (bool) {
return _verify(proof, _hash(msg.sender), extraWhitelistMerkleRoot);
}
function _verifyTeamSender(bytes32[] memory proof) internal view returns (bool) {
return _verify(proof, _hash(msg.sender), teamWhitelistMerkleRoot);
}
function _verify(bytes32[] memory proof, bytes32 addressHash, bytes32 whitelistMerkleRoot)
internal
pure
returns (bool)
{
return MerkleProof.verify(proof, whitelistMerkleRoot, addressHash);
}
function _hash(address _address) internal pure returns (bytes32) {
return keccak256(abi.encodePacked(_address));
}
function setWlWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner {
wlWhitelistMerkleRoot = merkleRoot;
}
function setMainWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner {
mainWhitelistMerkleRoot = merkleRoot;
}
function setExtraWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner {
extraWhitelistMerkleRoot = merkleRoot;
}
function setTeamWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner {
teamWhitelistMerkleRoot = merkleRoot;
}
modifier onlyWlWhitelist(bytes32[] memory proof) {
require(_verifyWlSender(proof), "MerkleWhitelist: Caller is not whitelisted");
_;
}
modifier onlyMainWhitelist(bytes32[] memory proof) {
require(_verifyMainSender(proof), "MerkleWhitelist: Caller is not whitelisted");
_;
}
modifier onlyExtraWhitelist(bytes32[] memory proof) {
require(_verifyExtraSender(proof), "MerkleWhitelist: Caller is not whitelisted");
_;
}
modifier onlyTeamWhitelist(bytes32[] memory proof) {
require(_verifyTeamSender(proof), "MerkleWhitelist: Caller is not whitelisted");
_;
}
}
文件 11 的 14:Ownable.sol
pragma solidity ^0.8.0;
import "../utils/Context.sol";
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_transferOwnership(_msgSender());
}
function owner() public view virtual returns (address) {
return _owner;
}
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
文件 12 的 14:ReentrancyGuard.sol
pragma solidity ^0.8.0;
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
modifier nonReentrant() {
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
_status = _ENTERED;
_;
_status = _NOT_ENTERED;
}
}
文件 13 的 14:Strings.sol
pragma solidity ^0.8.0;
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
function toString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
文件 14 的 14:Torizero.sol
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "erc721a/contracts/ERC721A.sol";
import "./MerkleWhitelist.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
contract Torizero is Ownable, ERC721A, MerkleWhitelist, ReentrancyGuard {
uint256 public DA_STARTING_PRICE = 0.3 ether;
uint256 public DA_ENDING_PRICE = 0.1 ether;
uint256 public DA_DECREMENT = 0.02 ether;
uint256 public DA_DECREMENT_FREQUENCY = 900;
uint256 public DA_FINAL_PRICE;
uint256 public WL_PRICE = 0.08 ether;
uint256 public WL_AMOUNT = 600;
uint256 public DA_AMOUNT = 5000;
uint256 public MAIN_AMOUNT = 2000;
uint256 public ALL_AMOUNT = 7777;
uint256 public WL_START_TIME = 1650888600;
uint256 public WL_END_TIME = 1650931800;
uint256 public DA_START_TIME = 1650974400;
uint256 public DA_END_TIME = 1650985200;
uint256 public MAIN_END_TIME;
uint256 public MAIN_LAST_TIME = 10800;
uint256 public EXTRA_START_TIME = 1650996000;
uint16 public WL_MINTED;
uint16 public DA_MINTED;
uint16 public MAIN_MINTED;
uint16 public EXTRA_MINTED;
uint16 public TEAM_MINTED;
uint16 public WL_LIMIT=3;
uint16 public DA_LIMIT=5;
uint16 public MAIN_LIMIT=1;
uint16 public EXTRA_LIMIT=10;
uint16 public TEAM_LIMIT=1;
mapping(address => uint256) public WL_WALLET_CAP;
mapping(address => uint256) public DA_WALLET_CAP;
mapping(address => uint256) public MAIN_WALLET_CAP;
mapping(address => uint256) public EXTRA_WALLET_CAP;
mapping(address => uint256) public TEAM_WALLET_CAP;
bool _isWLActive = true;
bool _isDAActive = true;
bool _isMainActive = true;
bool _isExtraActive = true;
bool _isTeamActive = false;
bool public INITIAL_FUNDS_WITHDRAWN;
struct DABatchPrice {
uint128 pricePaid;
uint8 quantityMinted;
}
mapping(address => DABatchPrice[]) public userToDABatchPrice;
uint256 public STATE = 1;
bool public REVEALED = false;
string public UNREVEALED_URI = "https://data.torizero.com/torizero/box.json";
string public BASE_URI;
string public CONTRACT_URI ="https://data.torizero.com/api/contracturl.json";
constructor() ERC721A("torizero", "TORIZERO") {}
function currentPrice() public view returns (uint256) {
if(block.timestamp < DA_START_TIME)return DA_STARTING_PRICE;
if (DA_FINAL_PRICE > 0) return DA_FINAL_PRICE;
uint256 timeSinceStart = block.timestamp - DA_START_TIME;
uint256 decrementsSinceStart = timeSinceStart / DA_DECREMENT_FREQUENCY;
uint256 totalDecrement = decrementsSinceStart * DA_DECREMENT;
if (totalDecrement >= DA_STARTING_PRICE - DA_ENDING_PRICE) {
return DA_ENDING_PRICE;
}
return DA_STARTING_PRICE - totalDecrement;
}
function extraAmount() public view returns (uint256) {
return WL_AMOUNT + DA_AMOUNT + MAIN_AMOUNT - WL_MINTED - DA_MINTED - MAIN_MINTED;
}
function wlInfo(address user) public view returns (uint256,uint256,uint256,uint256,uint256,uint256) {
return (WL_AMOUNT,WL_MINTED,WL_PRICE,WL_START_TIME,WL_END_TIME,WL_WALLET_CAP[user]);
}
function daInfo(address user) public view returns (uint256,uint256,uint256,uint256,uint256,uint256) {
return (DA_AMOUNT,DA_MINTED,currentPrice(),DA_START_TIME,DA_END_TIME,DA_WALLET_CAP[user]);
}
function mainInfo(address user) public view returns (uint256,uint256,uint256,uint256,uint256,uint256) {
return (MAIN_AMOUNT,MAIN_MINTED,mainPrice(),extraAmount(),MAIN_END_TIME,MAIN_WALLET_CAP[user]);
}
function extraInfo(address user) public view returns (uint256,uint256,uint256,uint256,uint256,uint256) {
return (extraAmount(),EXTRA_MINTED,extraPrice(),EXTRA_START_TIME,0,EXTRA_WALLET_CAP[user]);
}
function mainPrice() public view returns (uint256) {
return ((DA_FINAL_PRICE / 100) * 80);
}
function extraPrice() public view returns (uint256) {
return ((DA_FINAL_PRICE / 100) * 80);
}
function mintDA(uint8 quantity) public payable {
require(quantity > 0, "Must mint at least 1 token.");
require(_isDAActive, "DA must be active to mint tokens");
require(block.timestamp >= DA_START_TIME,"DA has not started!");
require(block.timestamp < DA_END_TIME, "DA is over");
require(DA_WALLET_CAP[msg.sender] + quantity <= DA_LIMIT, "Purchase would exceed max number of metacards per wallet.");
uint256 _currentPrice = currentPrice();
require(msg.value >= quantity * _currentPrice,"Did not send enough eth.");
require(DA_MINTED + quantity <= DA_AMOUNT,"Max supply for DA reached!");
require(totalSupply() + quantity <= ALL_AMOUNT,"reached max supply");
if (DA_MINTED + quantity == DA_AMOUNT){
_isDAActive = false;
DA_FINAL_PRICE = _currentPrice;
MAIN_END_TIME = block.timestamp + MAIN_LAST_TIME;
STATE = 3;
}
userToDABatchPrice[msg.sender].push(
DABatchPrice(uint128(msg.value), quantity)
);
DA_MINTED = DA_MINTED+quantity;
DA_WALLET_CAP[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function mintWL(uint8 quantity,bytes32[] memory proof)
public
payable
onlyWlWhitelist(proof)
{
require(quantity > 0, "Must mint at least 1 token.");
require(_isWLActive, "WL must be active to mint tokens");
require(block.timestamp >= WL_START_TIME,"WL has not started yet!");
require(block.timestamp < WL_END_TIME, "WL is over");
require(WL_WALLET_CAP[msg.sender] + quantity <= WL_LIMIT, "Purchase would exceed max number of metacards per wallet.");
require(msg.value >= quantity * WL_PRICE,"Did not send enough eth.");
require(WL_MINTED + quantity <= WL_AMOUNT,"Max supply for WL reached!");
require(totalSupply() + quantity <= ALL_AMOUNT,"reached max supply");
WL_MINTED = WL_MINTED + quantity;
WL_WALLET_CAP[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function mintMain(uint8 quantity,bytes32[] memory proof)
public
payable
onlyMainWhitelist(proof)
{
require(quantity > 0, "Must mint at least 1 token.");
require(DA_FINAL_PRICE > 0, "Dutch action must be over!");
require(_isMainActive, "Main must be active to mint tokens");
require(block.timestamp < MAIN_END_TIME, "Main is over");
require(MAIN_WALLET_CAP[msg.sender] + quantity <= MAIN_LIMIT, "Purchase would exceed max number of metacards per wallet.");
require(msg.value >= mainPrice() * quantity,"Must send enough eth for MAIN Mint");
require(MAIN_MINTED + quantity <= MAIN_AMOUNT,"Max supply for MAIN reached!");
require(totalSupply() + quantity <= ALL_AMOUNT,"reached max supply");
MAIN_MINTED = MAIN_MINTED + quantity;
MAIN_WALLET_CAP[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function mintExtra(uint8 quantity,bytes32[] memory proof)
public
payable
onlyExtraWhitelist(proof)
{
require(quantity > 0, "Must mint at least 1 token.");
require(DA_FINAL_PRICE > 0, "Dutch action must be over!");
require(_isExtraActive, "Extra must be active to mint tokens");
require(block.timestamp >= EXTRA_START_TIME,"Extra has not started yet!");
require(EXTRA_WALLET_CAP[msg.sender] + quantity <= EXTRA_LIMIT, "Purchase would exceed max number of metacards per wallet.");
require(msg.value >= extraPrice()* quantity,"Must send enough eth for MAIN Mint");
require(EXTRA_MINTED + quantity <= extraAmount(),"Max supply for EXTRA reached!");
require(totalSupply() + quantity <= ALL_AMOUNT,"reached max supply");
EXTRA_MINTED = EXTRA_MINTED + quantity;
EXTRA_WALLET_CAP[msg.sender] += quantity;
_safeMint(msg.sender, quantity);
}
function teamMint(bytes32[] memory proof)
public
onlyTeamWhitelist(proof)
{
require(DA_FINAL_PRICE > 0, "Dutch action must be over!");
require(_isTeamActive, "team must be active to mint tokens");
require(TEAM_WALLET_CAP[msg.sender] + 1 <= TEAM_LIMIT, "Purchase would exceed max number of metacards per wallet.");
require(totalSupply() + 1 <= ALL_AMOUNT, "reached max supply");
TEAM_MINTED = TEAM_MINTED + 1;
TEAM_WALLET_CAP[msg.sender] += 1;
_safeMint(msg.sender, 1);
}
function userToTokenBatchLength(address user)
public
view
returns (uint256)
{
return userToDABatchPrice[user].length;
}
function refundExtraETH() public {
require(DA_FINAL_PRICE > 0, "Dutch action must be over!");
uint256 totalRefund;
for (
uint256 i = userToDABatchPrice[msg.sender].length;
i > 0;
i--
) {
uint256 expectedPrice = userToDABatchPrice[msg.sender][i - 1]
.quantityMinted * DA_FINAL_PRICE;
uint256 refund = userToDABatchPrice[msg.sender][i - 1]
.pricePaid - expectedPrice;
userToDABatchPrice[msg.sender].pop();
totalRefund += refund;
}
payable(msg.sender).transfer(totalRefund);
}
function getExtraETH(address user) public view returns (uint256){
uint256 totalRefund;
for (
uint256 i = userToDABatchPrice[user].length;
i > 0;
i--
) {
uint256 expectedPrice = userToDABatchPrice[user][i - 1]
.quantityMinted * DA_FINAL_PRICE;
uint256 refund = userToDABatchPrice[user][i - 1]
.pricePaid - expectedPrice;
totalRefund += refund;
}
return totalRefund;
}
function withdrawInitialFunds() public onlyOwner nonReentrant {
require(
!INITIAL_FUNDS_WITHDRAWN,
"Initial funds have already been withdrawn."
);
require(DA_FINAL_PRICE > 0, "DA has not finished!");
uint256 WLFunds = WL_MINTED * WL_PRICE;
uint256 DAFunds = DA_MINTED * DA_FINAL_PRICE;
uint256 MAINFunds = MAIN_MINTED * mainPrice();
uint256 EXTRAFunds = EXTRA_MINTED * extraPrice();
uint256 initialFunds = DAFunds + WLFunds + MAINFunds + EXTRAFunds;
INITIAL_FUNDS_WITHDRAWN = true;
(bool succ, ) = payable(owner()).call{
value: initialFunds
}("");
require(succ, "transfer failed");
}
function desirableInitialFunds() public view returns (uint256) {
uint256 WLFunds = WL_MINTED * WL_PRICE;
uint256 DAFunds = DA_MINTED * DA_FINAL_PRICE;
uint256 MAINFunds = MAIN_MINTED * mainPrice();
uint256 EXTRAFunds = EXTRA_MINTED * extraPrice();
uint256 initialFunds = DAFunds + WLFunds + MAINFunds + EXTRAFunds;
return initialFunds;
}
function withdraw() public onlyOwner nonReentrant {
(bool succ, ) = payable(owner()).call{value: address(this).balance}('');
require(succ, "transfer failed");
}
function setRevealData(bool _revealed,string memory _baseURI) public onlyOwner
{
REVEALED = _revealed;
BASE_URI = _baseURI;
}
function setBaseURI(string memory _baseURI) public onlyOwner {
BASE_URI = _baseURI;
}
function setRevealedURI(string memory _unrevealedURI) public onlyOwner {
UNREVEALED_URI = _unrevealedURI;
}
function contractURI() public view returns (string memory) {
return CONTRACT_URI;
}
function setContractURI(string memory _contractURI) public onlyOwner {
CONTRACT_URI = _contractURI;
}
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
if (REVEALED) {
return
string(abi.encodePacked(BASE_URI, Strings.toString(_tokenId), ".json"));
} else {
return UNREVEALED_URI;
}
}
function setAllStartTime(uint256 wlTime,uint256 wlEndTime,uint256 daTime,uint256 daEndTime,uint256 extraTime) external onlyOwner {
WL_START_TIME = wlTime;
WL_END_TIME = wlEndTime;
DA_START_TIME = daTime;
DA_END_TIME = daEndTime;
EXTRA_START_TIME = extraTime;
}
function flipAllState(bool isWLActive,bool isDAActive,bool isMainActive,bool isExtraActive,uint256 _st) external onlyOwner {
_isWLActive = isWLActive;
_isDAActive = isDAActive;
_isMainActive = isMainActive;
_isExtraActive = isExtraActive;
STATE = _st;
}
function flipDAState() external onlyOwner {
require(block.timestamp > DA_END_TIME, "DA has not finished!");
require(DA_FINAL_PRICE == 0, "Price has been set!");
_isDAActive = false;
DA_FINAL_PRICE = DA_ENDING_PRICE;
STATE = 3;
MAIN_END_TIME = block.timestamp + MAIN_LAST_TIME;
}
function setState(uint256 _st) external onlyOwner {
STATE = _st;
}
}
{
"compilationTarget": {
"contracts/Torizero.sol": "Torizero"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 400
},
"remappings": []
}
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ALL_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BASE_URI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CONTRACT_URI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DA_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DA_DECREMENT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DA_DECREMENT_FREQUENCY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DA_ENDING_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DA_END_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DA_FINAL_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DA_LIMIT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DA_MINTED","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DA_STARTING_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DA_START_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"DA_WALLET_CAP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXTRA_LIMIT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXTRA_MINTED","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXTRA_START_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"EXTRA_WALLET_CAP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INITIAL_FUNDS_WITHDRAWN","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAIN_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAIN_END_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAIN_LAST_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAIN_LIMIT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAIN_MINTED","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"MAIN_WALLET_CAP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REVEALED","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TEAM_LIMIT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TEAM_MINTED","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"TEAM_WALLET_CAP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNREVEALED_URI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WL_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WL_END_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WL_LIMIT","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WL_MINTED","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WL_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WL_START_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"WL_WALLET_CAP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"daInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"desirableInitialFunds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"extraAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"extraInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"extraPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"extraWhitelistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"isWLActive","type":"bool"},{"internalType":"bool","name":"isDAActive","type":"bool"},{"internalType":"bool","name":"isMainActive","type":"bool"},{"internalType":"bool","name":"isExtraActive","type":"bool"},{"internalType":"uint256","name":"_st","type":"uint256"}],"name":"flipAllState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipDAState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getExtraETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"mainInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mainPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mainWhitelistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"quantity","type":"uint8"}],"name":"mintDA","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"quantity","type":"uint8"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintExtra","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"quantity","type":"uint8"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintMain","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"quantity","type":"uint8"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintWL","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"refundExtraETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"wlTime","type":"uint256"},{"internalType":"uint256","name":"wlEndTime","type":"uint256"},{"internalType":"uint256","name":"daTime","type":"uint256"},{"internalType":"uint256","name":"daEndTime","type":"uint256"},{"internalType":"uint256","name":"extraTime","type":"uint256"}],"name":"setAllStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"setExtraWhitelistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"setMainWhitelistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_revealed","type":"bool"},{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setRevealData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_unrevealedURI","type":"string"}],"name":"setRevealedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_st","type":"uint256"}],"name":"setState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"setTeamWhitelistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"setWlWhitelistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"teamMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"teamWhitelistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userToDABatchPrice","outputs":[{"internalType":"uint128","name":"pricePaid","type":"uint128"},{"internalType":"uint8","name":"quantityMinted","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"userToTokenBatchLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawInitialFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"wlInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wlWhitelistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]