文件 1 的 16:Address.sol
pragma solidity ^0.8.0;
library Address {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 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 的 16: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 的 16:Delegated.sol
pragma solidity ^0.8.0;
import "./Ownable.sol";
contract Delegated is Ownable {
mapping(address => bool) internal _delegates;
constructor(){
_delegates[owner()] = true;
}
modifier onlyDelegates {
require(_delegates[msg.sender], "Invalid delegate" );
_;
}
function isDelegate( address addr ) external view onlyOwner returns ( bool ){
return _delegates[addr];
}
function setDelegate( address addr, bool isDelegate_ ) external onlyOwner{
_delegates[addr] = isDelegate_;
}
function transferOwnership(address newOwner) public virtual override onlyOwner {
_delegates[newOwner] = true;
super.transferOwnership( newOwner );
}
}
文件 4 的 16: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;
}
}
文件 5 的 16:ERC721EnumerableT.sol
pragma solidity ^0.8.0;
import "./ERC721T.sol";
import "./IERC721Batch.sol";
import "./IERC721Enumerable.sol";
abstract contract ERC721EnumerableT is ERC721T, IERC721Batch, IERC721Enumerable {
function balanceOf( address owner ) public view virtual override( IERC721, ERC721T ) returns( uint );
function isOwnerOf( address account, uint[] calldata tokenIds ) external view virtual override returns( bool );
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721T) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
function tokenOfOwnerByIndex(address owner, uint index) public view virtual override returns( uint tokenId );
function tokenByIndex(uint index) external view virtual override returns (uint) {
require(index < totalSupply(), "ERC721Enumerable: global index out of bounds");
return index;
}
function totalSupply() public view virtual override returns( uint );
function transferBatch( address from, address to, uint[] calldata tokenIds, bytes calldata data ) external override{
for(uint i; i < tokenIds.length; ++i ){
safeTransferFrom( from, to, tokenIds[i], data );
}
}
function walletOfOwner( address account ) external view virtual override returns( uint[] memory ){
uint quantity = balanceOf( account );
uint[] memory wallet = new uint[]( quantity );
for( uint i; i < quantity; ++i ){
wallet[i] = tokenOfOwnerByIndex( account, i );
}
return wallet;
}
}
文件 6 的 16:ERC721T.sol
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./IERC721Metadata.sol";
import "./Address.sol";
import "./Context.sol";
import "./ERC165.sol";
abstract contract ERC721T is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
string private _name;
string private _symbol;
mapping(uint => address) internal _tokenApprovals;
mapping(address => mapping(address => bool)) internal _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
function balanceOf(address owner) public view virtual override returns( uint );
function name() external view virtual override returns (string memory) {
return _name;
}
function ownerOf(uint tokenId) public view virtual override returns (address);
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 symbol() external view virtual override returns (string memory) {
return _symbol;
}
function approve(address to, uint tokenId) external virtual override {
address owner = ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
function getApproved(uint tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
function setApprovalForAll(address operator, bool approved) external virtual override {
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
function transferFrom(
address from,
address to,
uint tokenId
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint tokenId
) external virtual override {
safeTransferFrom(from, to, tokenId, "");
}
function safeTransferFrom(
address from,
address to,
uint tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
function _approve(address to, uint tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ownerOf(tokenId), to, tokenId);
}
function _checkOnERC721Received(
address from,
address to,
uint tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
function _exists(uint tokenId) internal view virtual returns (bool);
function _isApprovedOrOwner(address spender, uint tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
function _safeTransfer(
address from,
address to,
uint tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
function _transfer(address from, address to, uint tokenId) internal virtual;
}
文件 7 的 16:IERC165.sol
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 8 的 16:IERC721.sol
pragma solidity ^0.8.0;
import "./ERC165.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;
}
文件 9 的 16:IERC721Batch.sol
pragma solidity ^0.8.0;
interface IERC721Batch {
function isOwnerOf( address account, uint[] calldata tokenIds ) external view returns( bool );
function transferBatch( address from, address to, uint[] calldata tokenIds, bytes calldata data ) external;
function walletOfOwner( address account ) external view returns( uint[] memory );
}
文件 10 的 16:IERC721Enumerable.sol
pragma solidity ^0.8.0;
import "./IERC721.sol";
interface IERC721Enumerable is IERC721 {
function totalSupply() external view returns (uint256);
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
function tokenByIndex(uint256 index) external view returns (uint256);
}
文件 11 的 16: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);
}
文件 12 的 16:IERC721Receiver.sol
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
文件 13 的 16:Ownable.sol
pragma solidity ^0.8.0;
import "./Context.sol";
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_setOwner(_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 {
_setOwner(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
文件 14 的 16: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;
}
}
文件 15 的 16: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);
}
}
文件 16 的 16:TheOtherSide.sol
pragma solidity ^0.8.0;
import './Delegated.sol';
import './ERC721EnumerableT.sol';
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract TheOtherSide is ERC721EnumerableT, Delegated, ReentrancyGuard {
using Strings for uint;
struct Moon {
address owner;
bool celestialType;
}
struct Staker {
mapping(address => uint256[]) stakedTokens;
mapping(address => uint256) timeStaked;
uint256 amountStaked;
}
mapping(address => Staker) public stakers;
mapping(uint256 => address) public originalStakeOwner;
event Staked(address owner, uint256 tokenId);
event Unstaked(address owner, uint256 tokenId);
bool public revealed = false;
string public notRevealedUri = "ipfs://QmXZGWhQp3CQc3svnDhUuf4yTtoQBuqumHeC33jmEG69Dd/hidden.json";
uint public MAX_SUPPLY = 8888;
uint public PRICE = 0.15 ether;
uint public MAX_QTY = 2;
Moon[] public moons;
bool public isWhitelistActive = false;
bool public isMintActive = false;
mapping(address => uint) public accessList;
bool public isStakeActive = false;
mapping(address => uint) private _balances;
string private _tokenURIPrefix;
string private _tokenURISuffix = ".json";
constructor()
ERC721T("The Other Side", "TOS"){
}
function balanceOf(address account) public view override returns (uint) {
require(account != address(0), "MOON: balance query for the zero address");
return _balances[account];
}
function isOwnerOf( address account, uint[] calldata tokenIds ) external view override returns( bool ){
for(uint i; i < tokenIds.length; ++i ){
if( moons[ tokenIds[i] ].owner != account )
return false;
}
return true;
}
function ownerOf( uint tokenId ) public override view returns( address owner_ ){
address owner = moons[tokenId].owner;
require(owner != address(0), "MOON: query for nonexistent token");
return owner;
}
function tokenByIndex(uint index) external view override returns (uint) {
require(index < totalSupply(), "MOON: global index out of bounds");
return index;
}
function tokenOfOwnerByIndex(address owner, uint index) public view override returns (uint tokenId) {
uint count;
for( uint i; i < moons.length; ++i ){
if( owner == moons[i].owner ){
if( count == index )
return i;
else
++count;
}
}
revert("ERC721Enumerable: owner index out of bounds");
}
function tokenURI(uint tokenId) external view override returns (string memory) {
require(_exists(tokenId), "MOON: URI query for nonexistent token");
if(revealed == false) {
return notRevealedUri;
}
return string(abi.encodePacked(_tokenURIPrefix, tokenId.toString(), _tokenURISuffix));
}
function totalSupply() public view override returns( uint totalSupply_ ){
return moons.length;
}
function walletOfOwner( address account ) external view override returns( uint[] memory ){
uint quantity = balanceOf( account );
uint[] memory wallet = new uint[]( quantity );
for( uint i; i < quantity; ++i ){
wallet[i] = tokenOfOwnerByIndex( account, i );
}
return wallet;
}
function setRevealState(bool reveal_) external onlyDelegates {
revealed = reveal_;
}
function setUnrevealURI(string calldata notRevealUri_) external onlyDelegates {
notRevealedUri = notRevealUri_;
}
function mint( uint quantity ) external payable nonReentrant {
require(isMintActive == true,"MOON: Minting needs to be enabled.");
require( msg.value >= PRICE * quantity, "MOON: Ether sent is not correct" );
if( isWhitelistActive ){
require( accessList[ msg.sender ] >= quantity, "MOON: Account is less than the qty limit");
accessList[ msg.sender ] -= quantity;
} else {
require(quantity <= MAX_QTY, "MOON:Quantity must be less than or equal MAX_QTY");
}
uint supply = totalSupply();
require( supply + quantity <= MAX_SUPPLY, "MOON: Mint/order exceeds supply" );
for(uint i; i < quantity; ++i){
_mint( msg.sender, supply++ );
}
}
function getBalanceofContract() external view returns (uint256) {
return address(this).balance;
}
function withdraw(uint256 amount_) public onlyOwner {
require(address(this).balance >= amount_, "Address: insufficient balance");
(bool os, ) = payable(owner()).call{value: amount_}("");
require(os);
}
function team_mint(uint[] calldata quantity, address[] calldata recipient) external onlyDelegates{
require(quantity.length == recipient.length, "MOON: Must provide equal quantities and recipients" );
uint totalQuantity;
uint supply = totalSupply();
for(uint i; i < quantity.length; ++i){
totalQuantity += quantity[i];
}
require( supply + totalQuantity < MAX_SUPPLY, "MOON: Mint/order exceeds supply" );
for(uint i; i < recipient.length; ++i){
for(uint j; j < quantity[i]; ++j){
uint tokenId = supply++;
_mint( recipient[i], tokenId);
}
}
}
function setWhitelistAddress(address[] calldata accounts, uint allowed) external onlyDelegates{
for(uint i; i < accounts.length; ++i){
accessList[ accounts[i] ] = allowed;
}
}
function setMintingActive(bool mintActive_) external onlyDelegates {
require( isMintActive != mintActive_ , "MOON: New value matches old" );
isMintActive = mintActive_;
}
function setWhitelistActive(bool isWhitelistActive_) external onlyDelegates{
require( isWhitelistActive != isWhitelistActive_ , "MOON: New value matches old" );
isWhitelistActive = isWhitelistActive_;
}
function setBaseURI(string calldata prefix, string calldata suffix) external onlyDelegates{
_tokenURIPrefix = prefix;
_tokenURISuffix = suffix;
}
function setMaxSupply(uint maxSupply) external onlyDelegates{
require( MAX_SUPPLY != maxSupply, "MOON: New value matches old" );
require( maxSupply >= totalSupply(), "MOON: Specified supply is lower than current balance" );
MAX_SUPPLY = maxSupply;
}
function setMaxQty(uint maxQty) external onlyDelegates{
require( MAX_QTY != maxQty, "MOON: New value matches old" );
MAX_QTY = maxQty;
}
function setPrice(uint price) external onlyDelegates{
require( PRICE != price, "MOON: New value matches old" );
PRICE = price;
}
function _beforeTokenTransfer(address from, address to) internal {
if( from != address(0) )
--_balances[ from ];
if( to != address(0) )
++_balances[ to ];
}
function _exists(uint tokenId) internal view override returns (bool) {
return tokenId < moons.length && moons[tokenId].owner != address(0);
}
function _mint(address to, uint tokenId) internal {
_beforeTokenTransfer(address(0), to);
moons.push(Moon(to,false));
emit Transfer(address(0), to, tokenId);
}
function updateMoontype(bool moonType, uint[] calldata tokenIds ) external onlyDelegates {
for(uint i=0; i < tokenIds.length; i++) {
require(_exists(tokenIds[i]), "MOON: TokenId not exist");
moons[tokenIds[i]].celestialType = moonType;
}
}
function getMoonType(uint[] calldata tokenIds) external view returns(bool[] memory moonTypes) {
bool[] memory _moonTypes = new bool[](tokenIds.length);
for(uint i; i < tokenIds.length; i++) {
_moonTypes[i] = moons[tokenIds[i]].celestialType;
}
return _moonTypes;
}
function _transfer(address from, address to, uint tokenId) internal override {
require(moons[tokenId].owner == from, "MOON: transfer of token that is not owned");
_approve(address(0), tokenId);
_beforeTokenTransfer(from, to);
moons[tokenId].owner = to;
emit Transfer(from, to, tokenId);
}
function getStakedTokens(address _user) public view returns (uint256[] memory tokenIds) {
Staker storage staker = stakers[_user];
return staker.stakedTokens[_user];
}
function stake( uint[] calldata tokenIds ) external {
require( isStakeActive, "MOON: Staking is not active" );
Moon storage moon;
for( uint i; i < tokenIds.length; ++i ){
require( _exists(tokenIds[i]), "MOON: Query for nonexistent token" );
moon = moons[ tokenIds[i] ];
require(moon.owner == msg.sender, "MOON: Staking token that is not owned");
_stake(msg.sender, tokenIds[i]);
}
}
function _stake( address _user, uint256 _tokenId ) internal {
Staker storage staker = stakers[_user];
staker.amountStaked += 1;
staker.timeStaked[_user] = block.timestamp;
staker.stakedTokens[_user].push(_tokenId);
originalStakeOwner[_tokenId] = msg.sender;
_transfer(_user,address(this), _tokenId);
emit Staked(_user, _tokenId);
}
function unStake( uint[] calldata tokenIds ) external {
require( isStakeActive, "MOON: Staking is not active" );
for( uint i; i < tokenIds.length; ++i ){
require( originalStakeOwner[tokenIds[i]] == msg.sender,
"MOON._unstake: Sender must have staked tokenID");
_unstake(msg.sender,tokenIds[i]);
}
}
function _unstake( address _user, uint256 _tokenId) internal {
Staker storage staker = stakers[_user];
_removeElement(_user, _tokenId);
delete originalStakeOwner[_tokenId];
staker.timeStaked[_user] = block.timestamp;
staker.amountStaked -= 1;
if(staker.amountStaked == 0) {
delete stakers[_user];
}
_transfer(address(this),_user, _tokenId);
emit Unstaked(_user, _tokenId);
}
function setStakeActive( bool isActive_ ) external onlyDelegates {
require( isStakeActive != isActive_ , "MOON: New value matches old" );
isStakeActive = isActive_;
}
function _removeElement(address _user, uint256 _element) internal {
Staker storage staker = stakers[_user];
for (uint256 i; i<staker.stakedTokens[_user].length; i++) {
if (staker.stakedTokens[_user][i] == _element) {
staker.stakedTokens[_user][i] = staker.stakedTokens[_user][staker.stakedTokens[_user].length - 1];
staker.stakedTokens[_user].pop();
break;
}
}
}
}
{
"compilationTarget": {
"contracts/TheOtherSide.sol": "TheOtherSide"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Staked","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Unstaked","type":"event"},{"inputs":[],"name":"MAX_QTY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accessList","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":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBalanceofContract","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"getMoonType","outputs":[{"internalType":"bool[]","name":"moonTypes","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getStakedTokens","outputs":[{"internalType":"uint256[]","name":"tokenIds","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":"addr","type":"address"}],"name":"isDelegate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"isOwnerOf","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isStakeActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWhitelistActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"moons","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"bool","name":"celestialType","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"notRevealedUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"originalStakeOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"owner_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"prefix","type":"string"},{"internalType":"string","name":"suffix","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bool","name":"isDelegate_","type":"bool"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxQty","type":"uint256"}],"name":"setMaxQty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"mintActive_","type":"bool"}],"name":"setMintingActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"reveal_","type":"bool"}],"name":"setRevealState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isActive_","type":"bool"}],"name":"setStakeActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"notRevealUri_","type":"string"}],"name":"setUnrevealURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isWhitelistActive_","type":"bool"}],"name":"setWhitelistActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256","name":"allowed","type":"uint256"}],"name":"setWhitelistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakers","outputs":[{"internalType":"uint256","name":"amountStaked","type":"uint256"}],"stateMutability":"view","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":"uint256[]","name":"quantity","type":"uint256[]"},{"internalType":"address[]","name":"recipient","type":"address[]"}],"name":"team_mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"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":"totalSupply_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"transferBatch","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":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"moonType","type":"bool"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"updateMoontype","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]