// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
/**
                    .......................................................                         
                   .............................................................                    
                .......................''''''..'''''''...''.........................                
              ...................''''''''''''''',,,''''''''''''''.....................              
           ................'''''''''''',,,,;;,,,,,,,,,,,,,,,,,,'''''.......................         
          .............'''''''',,,,,,,,,;;;;;;;;;;;;;;;;;;;;;,,,,,,,'''''''''''............         
    ...............'''''''',,,,,,;;;;;;;;:::::::::::::::::::;;;;;,,,,;,,,,,''''''............       
 ...................''''',,,,,;;;;::::::::c::cccc::cccccccc:::::::;;;;;;;,,,,,''''.............     
...................''',,,,;;;;;;::cccccccc;'........,clllccccccccc:::::;;;,,,,,,''................  
................'''',,,;;;;;::c::ccllllll:..         .cllllllllllccc:::;;;;,,,,,,''.................
...............''',,,;;;;;:::cccclllool:'..           .;looloolllllccc:::::;;;,,,'''................
.............''',,,,;;:::::ccccllooool:'.....           .:odoooooolllccccc:::;;;,,,,'''.............
...........''',,;;;;;::cccccclllooodl:,'.......          .;odddddooolllllcccc::;;;,,,,'''...........
........'''',,,;;;::::cccllllooooddo:;,'......    .....   .:xxxddddoooloollccc::;;;;,,,,'''.........
.....''''''',,;;:::::cllloooooddddxl;,,,'.',,,,,,;::::;'.  ,dkxxxddddooooolllcc:::::;;;,,,''........
....'',,,,,,,;;::ccccclooooodddxxxxo:,;;',;:cccccccccc::;..;dkxxxxxddddoooollccccc::::;;;,,'''......
..''',,,;;;;;;::ccccclloodddddxxkxxd:,::,,;;:ccc::::;;;;;'.,cldkkxxxxxdddoolllllcccccc::;;;,,'''....
'',,;;;;;;:::::ccclllooodddxxxxkkdoo:,cl:,,,;col:;;,,',,,..'::lkkkkxxxxdddoooooollllccc:::;;,,,,,'''
cc::::::::cccccclllloodddxxxxkkkkdll:,cdolccccooc:;;:::;'..,;:okOOkkkxxxddddddoooolllccccc:::;;;;;::
XXK0OkxdoollllllloooodddxxxkkkkkOxooc,';oxdollooc;;;;cc,. .';cxOOOOOkkxxxxxxddddddooolllllloodxkO0KX
WWWWWWWNXXK0OkkxdddddoodxxxkkkOkOkddl,'cxkOOOkddolccccc:'..,lkOO0OOOOkkkxxkxdoodddxxxkkO0KXNNWWWWWWW
NNWWWWWWWWWWWWWNXXKK0OdoddxkkOOOOxc;:;;okkOOOkxdolccclcc:..,x00000OOOOkkkxxdodO0KKXNNWWWWWWWWWWWWWNN
lodxkOO00KXXNNNWWWWWWWNX0xdxxxkOOxl:;;;dkkkkkxdlccccclll:...oO0000OOOkxxxdx0XNWWWWWWWNNXXKK00Okkxdol
,;::ccllloddxk0KXNNNWNNWNOlloodxkdoc;,,:oxkkxxolcccclll:'...:k0000kxxdolllkNNNNNNNNXK0kxdoollcc:::;;
,;::ccllooddxkO0KXXNNNNNNXklc:cloodl,,:,,:ldxxdollcc:,..;,..,dOkkxollccclkXNNNNNNXXK0Oxddoollcc:::;,
OO0000KKKKKXXXXXXXNNNNWNWWNXK0kdccoc,:c,.',,,;,,''.....;l:..'ldolc::ok0KXNWWWWNNNNNXXXXXXKKKK0000OOO
oxkOO00KKKXXXXNNNNNNNWWWWWWWWWWNKko;,:c,..,,''.........:c,..':c::cxKNWWWWWWWWWWWWNNNNXXXXKKK000OOkdo
',,;::ccllooddxxkkOOKXNNNNNXXXXNXOdodo;'.':c;'.... ...,,........;ok0KXXXXNNNNNXKOkkkxxddoolcc::;;,,'
.'',;;:::clloooddxOKXNNNNNNNNWWWXkxkkx:........    ... ...........';cxKNNNNNNNNXKOkdddollcc::;;,,''.
.'',,;;;:clodxkO0KXNNWWWWWWWWNKkl;,'..........         ... ........;lkXWWWWWWWNNNXK00Oxdolc:;;,,''..
..'',:ldxO0XXNNWWNNNNXXXXKKXXKkc,.............         ..........,ldxOXXKKXXXXXXNNNNWWNXK0Okdc;,''..
..'',;:clodxxkkkkxxxxxxxkOKXXKK0x:....'''......          .;c;. .,oddxkKXX0Okkkxxxxkkkkkkxxdol:;''...
...''',,,;::ccllloooooddkO0Okk0KXKd,..,'.......           ,c:' .cdddxxkOO0Okxddoooolllccc::;;,'.....
.....'''',;;;:ccclllllodddxk0XXKXXKO:......               .;lc..cdddxk00kxxddoolllccc:::;;,,''......
........'',,,;;::cccllodxOKNWWXXKKKKk,.....              . .cl,.:ddddkKWNKOxdollcc:::;;,,,'''.......
..........'',,,;;:cccox0XNNXK0KXKKKXk,..,c:.               .,c,.:ooddxOKNNNX0xocc::;;,,'''..........
..........'''',,,;::coxkkxxdokKKKKK0x;..cOo.               .,:,.;looddxxdxkkkxl:;;;,,''''...........
...........''''',,;;:ccccclco0XKKKOxo:..,oo,               .;c'':loooddddlc:::;;;,,'''''............
  ...........'''',,;;;:::::cxKXKOxdol;..'okl.              .:c'':loooooddl:;;;;,,,,'''..............
   .............''',,,,;;;:d00Okxddoc,..'d0d.        .     .lo,':loooooodo:;;;,,,''''...............
   ................''',,,;dO0OOOOOko:'...lkd, ...,,,,,;'.  .''.':looooooooc,,''''''................ 
   ..................'',,cOKKKKK0Oxl,....:dx:.'oxdooool;.    ..';loollllool,''''''................  
    ..................'''l0KKKK00kd:'....:ddl;okc,,,,,,,,,,,,''.;lllllloooo:..................      
     ...................,dKKKK0Okdo;.....:ddkOkxdollllllccc:;,'.;clllllllodc'..............         
           .............;kK0OOkxxdl,...:xOOkOxldkdl:,,,';lllcc,',:llcccllool,............           
            ............c0KOkkkkkd:.':d0KKKK0c'dKxl'    .';cllc,',cllloooodl,.........              
              .........'dK0OOkOkxc',oOKKKKK0kllO0o;.       :ollc,.;llllloodo;......                 
                .......,kK0OOOkxo;;d0KKKKKK0dlx0Ol,.       ;oollc;';loooddddc....                   
                   ....:OK0OOxdoc;oOKKKKK0KOooxOOkxdll:;;,':ooollc,'cxxxdxddl'..                    
                     ..cKK0kddol:cx00KKKK0KOxdddxxxddxOOkxddooollc:.,dkxxxxdl.                      
 */
import "./Allowable.sol";
import "./PackableOwnership.sol";
error ApienAlreadyClaimed(uint256 id);
error BagAlreadyClaimed(uint256 id);
error InvalidPayment(uint256 cost, uint256 amount);
error Unphased();
error NotInTreasury(uint256 tokenId);
/// @title Apiens Generation 2: Female Apiens
/// @author @OsmOnomous https://osm.tools
contract QueenApiens is Allowable {    
    // minting phases
    uint256 ALLOW_PHASE = 0;
    uint256 ALLOW_BAG_PHASE = 1;
    uint256 CLAIM_PHASE = 2;
    
    // claim tracking addresses
    address GENESIS_BAG = 0xD2C83498882AfF028E18aF5FB46120342c5129bD;
    address APIENS = 0xcf8896D28B905cEfd5fFbDDD5Dbfa0eEfF8d938B;
    address GENESIS_BAG_ALLOW = address(0x0);

    // supply and allowances
    uint256 MAX_SUPPLY = 8888;

    // allowed phase
    uint256 ALLOW_PER = 2;
    uint256 ALLOW_SUPPLY = 5600;
    uint256 ALLOW_PRICE = (1 ether)*.15;
    
    // free claim phase
    uint256 FREE_PER = 0;
    uint256 FREE_SUPPLY = 3000;
    uint256 FREE_PRICE = (1 ether)*0;    

    /**
     * Initialization
     */
        
    /// @notice contract is initialized as soul bound, no transfers or approvals allowed
    /// @dev sales can be enabled by contract owner calling enableSecondarySales()
    /// @param name string name of contract
    /// @param symbol string symbol for contract 
    constructor(string memory name, string memory symbol) Allowable(name,symbol) {
        soulBind();
        initializePhases();        
    }    

    /// @notice initialization of minting phases
    function initializePhases() internal virtual override {
        Phase[] storage phases = getPhases();

        // Phase struct
        // name, maxPerWallet (0 indicates no limit), maxMint, price
        phases.push(Phase("allowed", ALLOW_PER, ALLOW_SUPPLY, ALLOW_PRICE));
        phases.push(Phase("allowedBags", ALLOW_SUPPLY, ALLOW_SUPPLY, ALLOW_PRICE));
        phases.push(Phase("claim", FREE_PER, FREE_SUPPLY, FREE_PRICE));
        
        initialize(phases,MAX_SUPPLY);        
    }

    /**
     * Minting & Burning
     */    

    /// @notice minting CLAIM_PHASE, requires trusted signature, staked Apien and Genesis Bag
    /// @param stakedApiens uint256[] ids of staked Apien
    /// @param genesisBags uint256[] ids of Genesis Bag
    /// @param signature bytes trusted signature 
    function freeClaimMint(uint256[] memory stakedApiens, uint256[] memory genesisBags, bytes calldata signature) 
    external requiresClaimSig(signature,msg.sender,genesisBags,stakedApiens) {        
        for (uint i = 0; i < genesisBags.length; i++) {
            if (hasBeenClaimed(genesisBags[i], GENESIS_BAG)) {
                revert BagAlreadyClaimed(genesisBags[i]);
            }
            
            claim(genesisBags[i], GENESIS_BAG);
        }
        for (uint i; i < stakedApiens.length; i++) {
            if (hasBeenClaimed(stakedApiens[i], APIENS)) {
                revert ApienAlreadyClaimed(stakedApiens[i]);
            }
            
            claim(stakedApiens[i], APIENS);
        }
        phasedMint(CLAIM_PHASE, stakedApiens.length, false);        
    } 

    /// @notice minting ALLOW_PHASE, requires trusted signature and GenesisBag
    /// @param genesisBags uint256[] ids of Genesis Bags
    /// @param signature bytes trusted signature 
    function bagAllowMint(uint256[] memory genesisBags, bytes calldata signature) 
    external payable requiresBagSig(signature,msg.sender,genesisBags) { 
        for (uint i = 0; i < genesisBags.length; i++) {
            if (hasBeenClaimed(genesisBags[i], GENESIS_BAG)) {
                revert BagAlreadyClaimed(genesisBags[i]);
            }
            
            claim(genesisBags[i], GENESIS_BAG);
        }
        Phase memory phased = findPhase(ALLOW_BAG_PHASE);     
        isValidPayment(phased.cost, genesisBags.length);

        phasedMint(ALLOW_BAG_PHASE, genesisBags.length, false);        
        
        // we do not want to track bag claims as consuming an allowlist spot
        // setAux(msg.sender, getAux(msg.sender)+uint64(genesisBags.length));
    }     

    /// @notice minting ALLOW_PHASE, requires trusted signature, maximum quantity 2 per wallet
    /// @param quantity uint64 number to mint
    /// @param signature bytes trusted signature 
    function allowlistMint(uint64 quantity, bytes calldata signature) 
    external payable requiresAllowSig(signature,msg.sender) {  
        
        Phase memory phased = findPhase(ALLOW_PHASE); 

        isValidPayment(phased.cost, quantity);

        phasedMint(ALLOW_PHASE, quantity, true);        

        setAux(msg.sender, getAux(msg.sender)+quantity);
    }

    /// @notice empower function
    /// @param tokenId uint256 token id to empower
    function empower(uint256 tokenId) external {
        validateApprovedOrOwner(msg.sender, tokenId);

        if (!enumerationExists(tokenId)) {
            enumerateToken(msg.sender, tokenId);
        }
    }    

    /// @notice burn function
    /// @param tokenId uint256 token id to burn
    function burn(uint256 tokenId) external {

        validateApprovedOrOwner(msg.sender, tokenId);
        
        validateLock(tokenId);   

        if (enumerationExists(tokenId)) {
            enumerateBurn(msg.sender,tokenId);
            selfDestruct(tokenId);
        }

        packedBurn(tokenId);
    }

    /**
     * Owner Utility and Managment of TREASURY 
     */        

    /// @notice withdraw funds to treasury
    function withdrawFunds() external onlyOwner {
        TREASURY.transfer(address(this).balance);
    } 

    /// @notice set treasury wallet address
    function assignFundRecipient(address treasury) external onlyOwner {
        TREASURY = payable(treasury);
    }      

    /// @notice disables soul bound state allowing transfers and approvals
    function enableSecondarySales() external onlyOwner {
        releaseSoul();
    }    

    /// @notice establishes the cost of a mint for the specified phase
    /// @param phase uint256 the phase to set the mint price for
    /// @param price uint256 price of mint during phase
    function setMintPrice(uint256 phase, uint256 price) external onlyOwner {
        Phase memory existing = findPhase(phase);
        existing.cost = price;
        updatePhase(phase, existing);
    }

    /// @notice determines the price for a minting phase
    /// @param phase uint256 the phase to get the mint price for
    function getMintPrice(uint256 phase) external view returns (uint256) {
        Phase memory existing = findPhase(phase);
        return existing.cost;
    }    

    /// @notice mints quantity of tokens to TREASURY without enumeration
    /// @param quantity uint256 quantity to mint to TREASURY
    function airdropToTreasury(uint256 quantity) public onlyOwner {        
        if (minted()+quantity > getMaxSupply()) {
            revert ExceedsMaxSupply();
        }
        _mint(TREASURY, quantity, false);
    }  

    /// @notice airdrops tokenId from TREASURY to recipient
    /// @param tokenId uint256 tokenId to airdrop
    /// @param recipient address address to airdrop token to
    function airdropFromTreasury(uint256 tokenId, address recipient) public onlyOwner {        
        if (ownerOf(tokenId) != TREASURY) {
            revert NotInTreasury(tokenId);
        }
        if (!enumerationExists(tokenId)) {
            enumerateToken(TREASURY, tokenId);
        }
        transferFrom(TREASURY, recipient, tokenId);

    }        

    /// @notice max supply of tokens allowed
    function maxSupply() external view returns (uint256) {
        return getMaxSupply();
    }       

    /// @notice validate payment for minting phase
    /// @param cost uint256 cost required by requested phase
    /// @param quantity uint256 number of tokens requested
    function isValidPayment(uint256 cost, uint256 quantity) internal view {        
        if (msg.value != (cost*quantity)) {
            revert InvalidPayment(cost*quantity, msg.value);
        }
    } 
}

/**
 * Ordo Signum Machina - 2023
 */
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ApienAlreadyClaimed","type":"error"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"BagAlreadyClaimed","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"CallerIsNotOwner","type":"error"},{"inputs":[],"name":"ContractIsNot721Receiver","type":"error"},{"inputs":[],"name":"ExceedsMaxSupply","type":"error"},{"inputs":[],"name":"InvalidOwner","type":"error"},{"inputs":[{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"InvalidPayment","type":"error"},{"inputs":[{"internalType":"address","name":"zero","type":"address"}],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidTransferRecipient","type":"error"},{"inputs":[],"name":"MintIsNotAllowedRightNow","type":"error"},{"inputs":[],"name":"MintIsNotLive","type":"error"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"NotAssigned","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NotInTreasury","type":"error"},{"inputs":[],"name":"NotTokenOwner","type":"error"},{"inputs":[],"name":"OwnerCannotBeZeroAddress","type":"error"},{"inputs":[],"name":"PhaseExhausted","type":"error"},{"inputs":[],"name":"PhaseNotActiveYet","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenNonExistent","type":"error"},{"inputs":[{"internalType":"address","name":"requester","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenNonOwner","type":"error"},{"inputs":[],"name":"WalletLockedByOwner","type":"error"},{"inputs":[],"name":"WalletMintsFilled","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":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bool","name":"enumerate","type":"bool"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"airdropFromTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"airdropToTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"quantity","type":"uint64"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"allowlistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"assignColdStorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"treasury","type":"address"}],"name":"assignFundRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"genesisBags","type":"uint256[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"bagAllowMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"seekingContract","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"custodianOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"empower","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableSecondarySales","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"enumeratedBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"findAssignments","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"isFlagged","type":"bool"}],"name":"flagToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"stakedApiens","type":"uint256[]"},{"internalType":"uint256[]","name":"genesisBags","type":"uint256[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"freeClaimMint","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":"owner","type":"address"}],"name":"getAux","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"phase","type":"uint256"}],"name":"getMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSigningAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"addressed","type":"address"}],"name":"hasBeenClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"uint256","name":"id","type":"uint256"}],"name":"isLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"lockWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"lockedSince","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"numberMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"previousPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"sig","type":"bytes"},{"internalType":"address","name":"recip","type":"address"}],"name":"recoverAllowAddress","outputs":[{"components":[{"internalType":"address","name":"receipient","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"address","name":"recovered","type":"address"},{"internalType":"address","name":"signingKey","type":"address"}],"internalType":"struct EIP712Allowlisting.recovered","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"sig","type":"bytes"},{"internalType":"address","name":"recip","type":"address"},{"internalType":"uint256[]","name":"bag","type":"uint256[]"}],"name":"recoverClaimSig","outputs":[{"components":[{"internalType":"address","name":"receipient","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"address","name":"recovered","type":"address"},{"internalType":"address","name":"signingKey","type":"address"},{"internalType":"string","name":"bagging","type":"string"},{"internalType":"uint256","name":"total","type":"uint256"}],"internalType":"struct EIP712Allowlisting.recoveredBag","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"sig","type":"bytes"},{"internalType":"address","name":"recip","type":"address"},{"internalType":"uint256[]","name":"bag","type":"uint256[]"},{"internalType":"uint256[]","name":"staked","type":"uint256[]"}],"name":"recoverClaimSig","outputs":[{"components":[{"internalType":"address","name":"receipient","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"address","name":"recovered","type":"address"},{"internalType":"address","name":"signingKey","type":"address"},{"internalType":"string","name":"bagging","type":"string"},{"internalType":"uint256","name":"total","type":"uint256"}],"internalType":"struct EIP712Allowlisting.recoveredBag","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_reveal","type":"bool"}],"name":"reveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"revokeAssignments","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"revokeColdStorage","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":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setContractUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"custodianAddress","type":"address"}],"name":"setCustodian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isLive","type":"bool"}],"name":"setMintLive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"phase","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sigKey","type":"address"}],"name":"setSigningAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"uri","type":"string"}],"name":"setSupplementalTokenUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"tokenType","type":"uint256"}],"name":"setTokenUri","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":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"}],"name":"tokensOwnedBy","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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":"uint256","name":"id","type":"uint256"}],"name":"unlockWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]