ETH Price: $3,353.73 (-0.64%)

Token

ForgottenPixelsDigitalClothes (WIZSTOCK)
 

Overview

Max Total Supply

259 WIZSTOCK

Holders

151

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
nosabo.eth
Balance
1 WIZSTOCK
0xde70BDf7dfE13614d281716813274380a59E3e5d
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Wizstock

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 22 : FPDC.sol
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@((((........(@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..................,,,....(@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...................******@@....@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(.....................*****@@@@...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@***********@@@@..........................................*******@@@@@..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@#****************#@@&%%%%%%%//////.........................,*******@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@**********@@@********@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...........*****@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@*********@@@@@@*******@@%%%%%%%%%%%%%%%%%%%**********%%%%%%%%///.........((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@*********@@@@@@*******@@%%%%%%%%%%%%%%%%%                 %%%%%%%%%%%........@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@####@@@@@@@#********@@....//%%%%%%%%%%%%%%%%  %%%%%%%%%% *%%%%%%%%%%%%%%%%//....(@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@***********@@@@@@......%%%%%   %%%       %%%      ((((((   (%%%%%%%%%%%.....@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@***********#@@@@@@@@@@@@((((...   %%*       %%*    ,(((((      %%%%%%%%%%%%%//...((@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@********@@@@@@@@@@@@@@@@@@@@@@@                 (((((((((      %%%%%%%%%%%%%%%%%....@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@#*****@@@@@@@@@@@@@@@@@%%(((((((((((((((((((((((((((((((((%%%%%%%%%%%////......((@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@*****@@@@@@@@@@@@@@@(((((((((((((((((((((((%%%%((((((((((..............@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@****@@@@@@@@@@@@@@(((((((((((((((((########((((((((((((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@****@@@@@@@@@@@@@(((((((((((((((((((((((((((((((((((((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@*****@@@@@@@@@@@@@((((((((((((((((((((((((((((((((((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@***@       @@@@@((((((((((((((((((((((((((((((((((@@@@.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@***@(     ,(((@@@@@%%((((((((((((((((((((((((%%@@@((.....(@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@***@@@    (((.....@@@@@((((((((((((((((((@@@@@@............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@****@#((((((........((@@@@@@@@@@@@@@@@@@(((................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@****@@.........................................*****........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@***#@@@@@@@.................CULT COUTURE....,,****@(.......@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@****@@@@@@@@@@................................****@@.......@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@***@@@@@@@@@@@@@@@@@..*******************(((/####@...,,,,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@****@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@***@@((((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@........................,****@/      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.........**..............****@@      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.........**,..............****#@@//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.........****.................*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.........***#@((..............,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.*********@@@@@.............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(((@@@@@@@@@@@@@((((((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..........@@@@@@@@..........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..,,,,,,#@@@@@@@@@...,,,.##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@........@@@@@@@@@@.......@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@........@@@@@@@@@@.......@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.........@@@@@@@@@@.......@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@............@@@@@@@..........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//
// Forgotten Pixels Digital Clothes
//
// CULT COUTURE ALPHA PHASE 1
// https://www.forgottenbabies.com
//
// Twitter: https://twitter.com/babywizards
//
// Inspired by Forgotten Runes Wizard Cult
// Made with love by BillGains.eth and AcidEater for Wizstock 2022... Thanks everyone for attending!!!
//
// If you are involved in the Runiverse,
// You should probably own this.
//
//
//
//
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
pragma experimental ABIEncoderV2;

import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import './BabyWizards.sol'; 


contract Wizstock is ERC721Enumerable, Ownable {
    uint256 public constant MAX_WIZARDS = 20000;

    


    uint256 public summonStartBlock =
        0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
    string public METADATA_PROVENANCE_HASH = '';

    address public vault;
    string private _baseTokenURI;
    address public Big_Wizards_Addr;
    address public Baby_Wizards_Addr;

    constructor(string memory baseURI)
        ERC721('ForgottenPixelsDigitalClothes', 'WIZSTOCK')
    {
        setBaseURI(baseURI);
    }

    function summonStarted() public view returns (bool) {
        return block.number >= summonStartBlock;
    }

    function summon(uint256 tokenID) public {
        require(summonStarted(), 'You act before your time');
        require(totalSupply() < MAX_WIZARDS, 'All wizards have been summoned');


         try IERC721(Big_Wizards_Addr).ownerOf(tokenID) returns (
            address wizardOwner
        ) {
            if (wizardOwner == msg.sender) {
                uint256 mintIndex = tokenID;
            _safeMint(msg.sender, mintIndex);
            }
            } catch Error(string memory) {
            // no wizard
        } 
 
 
    }

        function summonBaby(uint256 tokenID) public {
        require(summonStarted(), 'You act before your time');
        require(totalSupply() < MAX_WIZARDS, 'All wizards have been summoned');


         try ERC721A(Baby_Wizards_Addr).ownerOf(tokenID) returns (
            address wizardOwner
        ) {
            if (wizardOwner == msg.sender) {
                uint256 mintIndex = tokenID + 10000;
            _safeMint(msg.sender, mintIndex);
            }
            } catch Error(string memory) {
            // no baby
        } 
 
 
    }

    function burn(uint256 tokenId) public virtual {
        require(
            _isApprovedOrOwner(_msgSender(), tokenId),
            'ERC721Burnable: caller is not owner nor approved'
        );
        _burn(tokenId);
    }

    function tokensOfOwner(address _owner)
        external
        view
        returns (uint256[] memory)
    {
        uint256 tokenCount = balanceOf(_owner);
        if (tokenCount == 0) {
            // Return an empty array
            return new uint256[](0);
        } else {
            uint256[] memory result = new uint256[](tokenCount);
            uint256 index;
            for (index = 0; index < tokenCount; index++) {
                result[index] = tokenOfOwnerByIndex(_owner, index);
            }
            return result;
        }
    }

    function baseURI() public view returns (string memory) {
        return _baseTokenURI;
    }

    /*
     * Only the owner can do these things
     */

    function setProvenanceHash(string memory _hash) public onlyOwner {
        METADATA_PROVENANCE_HASH = _hash;
    }

    function setBaseURI(string memory _newBaseURI) public onlyOwner {
        _baseTokenURI = _newBaseURI;
    }

    function setBigWizAddr(address Big_Wizards_Addr_) public onlyOwner{
        Big_Wizards_Addr = Big_Wizards_Addr_;
    }

    function setBabyWizAddr(address Baby_Wizards_Addr_) public onlyOwner{
        Baby_Wizards_Addr = Baby_Wizards_Addr_;
    }

    function setSummonStartBlock(uint256 _newSummonStartBlock)
        public
        onlyOwner
    {
        summonStartBlock = _newSummonStartBlock;
    }

    function babyCheck(uint256 tokenId) public view virtual returns (address) {
        address owner = ERC721A(Baby_Wizards_Addr).ownerOf(tokenId);
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }


    function adultCheck(uint256 tokenId) public view virtual returns (address) {
        address owner = IERC721(Big_Wizards_Addr).ownerOf(tokenId);
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }



    function setVault(address _newVaultAddress) public onlyOwner {
        vault = _newVaultAddress;
    }

    function withdraw(uint256 _amount) public onlyOwner {
        require(address(vault) != address(0), 'no vault');
        require(payable(vault).send(_amount));
    }

    function withdrawAll() public payable onlyOwner {
        require(address(vault) != address(0), 'no vault');
        require(payable(vault).send(address(this).balance));
    }

    function forwardERC20s(IERC20 _token, uint256 _amount) public onlyOwner {
        require(address(vault) != address(0));
        _token.transfer(vault, _amount);
    }

    function reserve(uint256 _numWizards) public onlyOwner {
        uint256 currentSupply = totalSupply();
        require(totalSupply() * _numWizards <= 80, 'Exceeded reserved supply');
        require(!summonStarted(), 'You act too late');
        uint256 index;
        for (index = 0; index < _numWizards; index++) {
            _safeMint(owner(), currentSupply + index);
        }
    }

     function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
     require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
     string memory baseURI = _baseTokenURI;
     return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, Strings.toString(tokenId), '.json')) : "";
     }

    function renounceOwnership() public override onlyOwner {}


}

File 2 of 22 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
        return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 3 of 22 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 22 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 5 of 22 : ERC721ABurnable.sol
// SPDX-License-Identifier: MIT
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../ERC721A.sol';

/**
 * @title ERC721A Burnable Token
 * @dev ERC721A Token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721ABurnable is ERC721A {
    /**
     * @dev Burns `tokenId`. See {ERC721A-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        _burn(tokenId, true);
    }
}

File 6 of 22 : BabyWizards.sol
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@((((........(@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@....................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@..................,,,....(@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...................******@@....@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(.....................*****@@@@...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@***********@@@@..........................................*******@@@@@..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@#****************#@@&%%%%%%%//////.........................,*******@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@**********@@@********@@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%...........*****@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@*********@@@@@@*******@@%%%%%%%%%%%%%%%%%%%**********%%%%%%%%///.........((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@*********@@@@@@*******@@%%%%%%%%%%%%%%%%%                 %%%%%%%%%%%........@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@####@@@@@@@#********@@....//%%%%%%%%%%%%%%%%  %%%%%%%%%% *%%%%%%%%%%%%%%%%//....(@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@***********@@@@@@......%%%%%   %%%       %%%                %%%%%%%%%%%.....@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@***********#@@@@@@@@@@@@    ...   %%*       %%*                %%%%%%%%%%%%%//...((@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@********@@@@@@@@@@@@@@@@@@@@@@@                                %%%%%%%%%%%%%%%%%....@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@#*****@@@@@@@@@@@@@@@@@                                   %%%%%%%%%%%////......((@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@*****@@@@@@@@@@@@@@@                       %%%%          ..............@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@****@@@@@@@@@@@@@@@              ########              ..@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@***@(     ,(((@@@@@%%(                        %%@@@  .....(@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@***@@@    (((.....@@@@@(                 @@@@@@............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@****@#((((((........((@@@@@@@@@@@@@@@@@@(((................@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@****@@.........................................*****........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@***#@@@@@@@.................................,,****@(.......@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@****@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@***@@((((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@**@@@@@@@@@@@@@@@@........................,****@/      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@**@@@@@@@@@@@@@@@@.........**..............****@@      @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@***@@@@@@@@@@@@@@.........**,..............****#@@//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@***@@@@@@@@@@@@@@.........***#@((..............,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@***@@@@@@@@@@@@@@@.*********@@@@@.............@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@***@@@@@@@@@@@@@@@@(((@@@@@@@@@@@@@((((((((@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@**@@@@@@@@@@@@@@@........@@@@@@@@@@.......@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@**@@@@@@@@@@@@.........@@@@@@@@@@.......@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@**@@@@@@@@............@@@@@@@..........@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//
// Forgotten Babies Wizard Orphanage
//
// 10k, on-chain Baby Wizard NFTs
// https://www.forgottenbabies.com
//
// Twitter: https://twitter.com/babywizards
//
// Inspired by Forgotten Runes Wizard Cult
// Made with love by BillGains.eth and AcidEater
// 90% of funds raised go direct to Lore Masters DAO to pay artists to do cool things!!!
//
//
//
//
//
//  !magic
//    !dragons
//      !milk
//        !pilk
//          !burningbabies
//
//
//
//
//  Don't sleep...
//
//
//
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.10;


import "erc721a/contracts/extensions/ERC721ABurnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

contract BabyWizards is ERC721ABurnable, Ownable, ReentrancyGuard {

  enum ReleaseMode{ CLOSED, DEV, PRE_SALE, OPEN, ENDED }
  ReleaseMode public currentMode;

  mapping(address => uint256) private _mintedPerAddress;
  mapping(address => uint256) private _freeBabyRedeemed;
  bytes32 private _presaleMerkleRoot;
  bytes32 private _freeAdoptMerkleRoot;
  uint256 private MAX_PER_ADDRESS;
  uint256 public maxSupply;
  uint256 public price;
  address public openSeaProxyRegistryAddress;
  bool private _isOpenSeaProxyActive = true;
  string private baseTokenURI;
  bool public baseTokenURILocked;
  address private _aeAddress;
  address private _lmdAddress = 0x6EAb2d42FEf9aad0036Bc145b5F451799e3FB3F7;


  // Simple Eth check, assuming no freebies.
  modifier requireCorrectEth(uint256 adoptCount) {
    require(msg.value == price * adoptCount, "Sent incorrect Ether");
    _;
  }

  /// @param adoptCount The amount of babies intended to be adopted.
  /// @dev All of our validations that we check before a mint.
  modifier validateAdoption(uint256 adoptCount) {
    require(
        _mintedPerAddress[msg.sender] + adoptCount <= MAX_PER_ADDRESS,
        "Exceeds wallet limit"
    );
    require(totalSupply() + adoptCount <= maxSupply, "Would exceed max supply");
    _;
 }

 modifier validatePreSaleAction() {
   require(currentMode == ReleaseMode.PRE_SALE || currentMode == ReleaseMode.OPEN, "Not presale time yet");
   _;
 }

 /// @dev Dev time?
 modifier validateDevsAction() {
   require(currentMode == ReleaseMode.DEV, "Not dev time yet");
   _;
 }

 /// @param baseTokenURI_ The starting baseTokenURI, we'll change this later to lock in the data on Arweave.
 /// @param maxSupply_ How many items are mintable?
 /// @param price_ Price per token
 /// @param openSeaProxyRegistryAddress_ The OpenSea proxy address, set at run time so we can easily swap between testnet and mainnet.
 /// @dev The constructor!
 constructor(
     uint256 maxSupply_,
     string memory baseTokenURI_,
     uint256 price_,
     uint256 MAX_PER_ADDRESS_,
     address openSeaProxyRegistryAddress_)
     ERC721A("BabyWizards", "BABIES")
 {
     maxSupply = maxSupply_;
     baseTokenURI = baseTokenURI_;
     MAX_PER_ADDRESS = MAX_PER_ADDRESS_;
     price = price_;
     openSeaProxyRegistryAddress = openSeaProxyRegistryAddress_;
 }

 /// @notice Returns whether or not you, the person calling this method, have adopted a baby.
 function freeBabyClaimed(address a) external view returns (bool){
   return _freeBabyRedeemed[a] == 1;
 }

 function generalAdoption(uint adoptCount) validateAdoption(adoptCount) requireCorrectEth(adoptCount) nonReentrant external payable {
     require(currentMode == ReleaseMode.OPEN, "It's not go time yet.");
     mint(msg.sender, adoptCount, true);
 }

 /// @param _merkleProof The proof generated by the front end, to see if you have written lore.


 function generalFreeAdoption(bytes32[] memory _merkleProof, uint adoptCount) validateAdoption(adoptCount) nonReentrant external payable {
     require(currentMode == ReleaseMode.OPEN, "It's not go time yet.");

     bytes32 leaf = keccak256(abi.encodePacked(msg.sender));

     // The amount we're charging (e.g, the amount we're validating) will depend on
     // if we detected a free mint match. If so we check for a lesser amount of eth.
     uint adoptionFeesToCharge = adoptCount;
     if(MerkleProof.verify(_merkleProof, _freeAdoptMerkleRoot, leaf)){
       if(_freeBabyRedeemed[msg.sender] != 1){ // if the baby is NOT already redeemed, mark it as used and let us use the free one.
         adoptionFeesToCharge = adoptionFeesToCharge - 1;
         _freeBabyRedeemed[msg.sender] = 1;
       }
     }

     require(msg.value == price * adoptionFeesToCharge, "Sent incorrect Ether");
     mint(msg.sender, adoptCount, true);
 }

 /**
 @param merkleProof Your Merkle proof to check that you're on the presale list.
 @param freeMerkleProof Proof for your presence on the free mint list.
 @param adoptCount Amount to mint.
 @notice This is the mint function called by folks before the general sale, assuming they're allow-listed.
 @dev We don't need to enforce any specific limits on number of presale units minted, since the allow list itself
 will limit participants, plus the limit of mints per address checked in `validateBuild`.
 */
 function preSaleAdoption(bytes32[] memory merkleProof, bytes32[] memory freeMerkleProof, uint adoptCount) validateAdoption(adoptCount) validatePreSaleAction nonReentrant external payable {
   bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
   require(MerkleProof.verify(merkleProof, _presaleMerkleRoot, leaf), "Not on allowlist");

   // You can get your free mint during the presale, which is in another Merkle Tree.
   // The amount we're charging (e.g, the amount we're validating) will depend on
   // if we detected a free mint match. If so we check for a lesser amount of eth.
   uint adoptionFeesToCharge = adoptCount;
   if(MerkleProof.verify(freeMerkleProof, _freeAdoptMerkleRoot, leaf)){
     if(_freeBabyRedeemed[msg.sender] != 1){ // if the free is NOT already redeemed, mark it as used and let us use the free one.
       adoptionFeesToCharge = adoptionFeesToCharge - 1;
       _freeBabyRedeemed[msg.sender] = 1;
     }
   }

   require(msg.value == price * adoptionFeesToCharge, "Sent incorrect Ether");
   mint(msg.sender, adoptCount, true);
 }

 /// @dev This is purely for internal testing. Let's us verify a proof for the given sender against the Free Mint Merkle Root.
 function verifyPresale(bytes32[] memory _merkleProof, address sender) view external onlyOwner returns (bool) {
   bytes32 leaf = keccak256(abi.encodePacked(sender));
   return MerkleProof.verify(_merkleProof, _presaleMerkleRoot, leaf);
 }

 function setFreeBabyMerkleRoot(bytes32 merkRoot) external onlyOwner {
   _freeAdoptMerkleRoot = merkRoot;
 }

 function setMaxAdopt(uint256 newNumber) external onlyOwner {
   MAX_PER_ADDRESS = newNumber;
 }

 function setPresaleMerkleRoot(bytes32 merkRoot) external onlyOwner {
   _presaleMerkleRoot = merkRoot;
 }

 /// @dev After we cut over to the permaweb base URI, lock it up so we can't change it back. This is a one-time operation! Don't mess it up!
 function lockBaseTokenURI() external onlyOwner {
   baseTokenURILocked = true;
 }

///@dev change openSeaProxyRegistryAddress in case issues with migration.

 function openSeaProxy(address newAddress) external onlyOwner {
   openSeaProxyRegistryAddress = newAddress;
 }

 /// @param baseTokenURI_ The new baseTokenURI
 /// @dev Need this so we can set the new base URI for the cut over to permaweb.
 function setBaseURI(string memory baseTokenURI_) external onlyOwner {
     require(!baseTokenURILocked, "setBaseURI is locked");
     baseTokenURI = baseTokenURI_;
 }

 // Copy + pasted in the ERC721A in order to override.
 function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
     require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
     string memory baseURI = baseTokenURI;
     return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, Strings.toString(tokenId), '.json')) : "";
 }

 /// @dev Sets the various wallets for withdrawl.
 function setWalletAddresses(address a) external onlyOwner {
   _aeAddress = a;
 }

 function getWalletAddresses() view external onlyOwner returns(address aeAddress, address lmdAddress){
   return (_aeAddress, _lmdAddress);
 }

 /// @dev Set our current mode to DEV.
 function startDevTeam() external onlyOwner {
   setSaleStatus(ReleaseMode.DEV);
 }

 /// @dev Set our current mode to PRE_SALE.
 function startPreSale() external onlyOwner {
   require(currentMode == ReleaseMode.CLOSED, "You already started presale.");
   setSaleStatus(ReleaseMode.PRE_SALE);
   mint(msg.sender, 100, false);

 }

 /// @dev Set our current mode to OPEN, for the general sale.
 function startGeneralSale() external onlyOwner {
   setSaleStatus(ReleaseMode.OPEN);
 }

 /// @dev End the sale (ENDED)
 function endSale() external onlyOwner {
   setSaleStatus(ReleaseMode.ENDED);
 }

 /// @dev Sets the current state to the given status.
 function setSaleStatus(ReleaseMode newStatus) private onlyOwner {
   currentMode = newStatus;
 }

 /// @dev Get paid
 function withdraw() external nonReentrant onlyOwner {
   // Some percentage magic:
   uint256 balance = address(this).balance;
   uint256 tenPercent = balance / 100 * 10;
   payable(_aeAddress).transfer(tenPercent);
   uint256 remaining = address(this).balance;
   payable(_lmdAddress).transfer(remaining);
 }

 /// @param to Who are we minting for?
 /// @param countTowardsWalletLimit Allows us to indicate if this should count towards the "X NFTs per Wallet" limit, or if we bypass that.
 /// @dev Our internal mint method, that handles some universal book-keeping.
 function mint(address to, uint256 count, bool countTowardsWalletLimit) private {
     if(countTowardsWalletLimit){
       _mintedPerAddress[to] += count;
     }
     _safeMint(to, count);
 }

 function isApprovedForAll(address owner, address operator)
     public
     view
     override
     returns (bool)
 {
     // Get a reference to OpenSea's proxy registry contract by instantiating
     // the contract using the already existing address.
     OpenSeaProxyRegistry proxyRegistry = OpenSeaProxyRegistry(
         openSeaProxyRegistryAddress
     );
     if (_isOpenSeaProxyActive && address(proxyRegistry.proxies(owner)) == operator) {
         return true;
     }

     return super.isApprovedForAll(owner, operator);
 }

 function setIsOpenSeaProxyActive(bool isOpenSeaProxyActive_) external onlyOwner {
   _isOpenSeaProxyActive = isOpenSeaProxyActive_;
 }

 /// @notice In case any wayward tokens make their way over.
 function withdrawTokens(IERC20 token) external onlyOwner {
     uint256 balance = token.balanceOf(address(this));
     token.transfer(msg.sender, balance);
 }

 // @dev Overriding to add support for Royalties
 function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool)
 {
     return interfaceId == 0x2a55205a || super.supportsInterface(interfaceId);
 }

 /// @notice Royalties
 function royaltyInfo(uint256 tokenId, uint256 salePrice)
     external
     view
     returns (address receiver, uint256 royaltyAmount)
 {
     require(_exists(tokenId), "Nonexistent token");
     return (_aeAddress, (salePrice * 5) / 100);
 }

 /// @dev Allow us to receive arbitrary ETH if sent directly. Mostly want this for test purposes.
 receive() external payable {}

}

contract OwnableDelegateProxy { }
contract OpenSeaProxyRegistry {
    mapping(address => OwnableDelegateProxy) public proxies;
}

File 7 of 22 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.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);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 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;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 8 of 22 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 9 of 22 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 10 of 22 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 11 of 22 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 12 of 22 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    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");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    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");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    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);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    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);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    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);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 13 of 22 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 14 of 22 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        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);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    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);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed 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);
    }
}

File 15 of 22 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 16 of 22 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 17 of 22 : ERC721A.sol
// SPDX-License-Identifier: MIT
// Creator: Chiru Labs

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();

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Compiler will pack this into a single 256bit word.
    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }

    // The tokenId of the next token to be minted.
    uint256 internal _currentIndex;

    // The number of tokens burned.
    uint256 internal _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    /**
     * To change the starting tokenId, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    function totalSupply() public view returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than _currentIndex - _startTokenId() times
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view returns (uint256) {
        // Counter underflow is impossible as _currentIndex does not decrement,
        // and it is initialized to _startTokenId()
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return uint256(_addressData[owner].balance);
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberMinted);
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberBurned);
    }

    /**
     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return _addressData[owner].aux;
    }

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        _addressData[owner].aux = aux;
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    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;
                    }
                    // Invariant:
                    // There will always be an ownership that has an address and is not burned
                    // before an ownership that does not have an address and is not burned.
                    // Hence, curr will not underflow.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return _ownershipOf(tokenId).addr;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    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())) : '';
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    /**
     * @dev See {IERC721-approve}.
     */
    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);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        if (operator == _msgSender()) revert ApproveToCaller();

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    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();
        }
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     */
    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, '');
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        _mint(to, quantity, _data, true);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    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);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        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);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex != end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    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);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, from);

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            _addressData[from].balance -= 1;
            _addressData[to].balance += 1;

            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = to;
            currSlot.startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev This is equivalent to _burn(tokenId, false)
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    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);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, from);

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            AddressData storage addressData = _addressData[from];
            addressData.balance -= 1;
            addressData.numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = from;
            currSlot.startTimestamp = uint64(block.timestamp);
            currSlot.burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        address owner
    ) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    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))
                }
            }
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
     * minting.
     * And also called after one token has been burned.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}
}

File 18 of 22 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    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) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                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)
        }
    }
}

File 19 of 22 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

File 20 of 22 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be payed in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 21 of 22 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 22 of 22 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.sol";

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"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":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":"Baby_Wizards_Addr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Big_Wizards_Addr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WIZARDS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"METADATA_PROVENANCE_HASH","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"adultCheck","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"uint256","name":"tokenId","type":"uint256"}],"name":"babyCheck","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"forwardERC20s","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"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numWizards","type":"uint256"}],"name":"reserve","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":"address","name":"Baby_Wizards_Addr_","type":"address"}],"name":"setBabyWizAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"Big_Wizards_Addr_","type":"address"}],"name":"setBigWizAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_hash","type":"string"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newSummonStartBlock","type":"uint256"}],"name":"setSummonStartBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newVaultAddress","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"summon","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"summonBaby","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"summonStartBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"summonStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"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":"","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":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokensOfOwner","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":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"payable","type":"function"}]

60806040527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600b5560405180602001604052806000815250600c90805190602001906200004f929190620002fe565b503480156200005d57600080fd5b5060405162005b0b38038062005b0b83398181016040528101906200008391906200054b565b6040518060400160405280601d81526020017f466f72676f7474656e506978656c734469676974616c436c6f746865730000008152506040518060400160405280600881526020017f57495a53544f434b000000000000000000000000000000000000000000000000815250816000908051906020019062000107929190620002fe565b50806001908051906020019062000120929190620002fe565b50505062000143620001376200015b60201b60201c565b6200016360201b60201c565b62000154816200022960201b60201c565b5062000684565b600033905090565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b620002396200015b60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff166200025f620002d460201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1614620002b8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002af90620005fd565b60405180910390fd5b80600e9080519060200190620002d0929190620002fe565b5050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b8280546200030c906200064e565b90600052602060002090601f0160209004810192826200033057600085556200037c565b82601f106200034b57805160ff19168380011785556200037c565b828001600101855582156200037c579182015b828111156200037b5782518255916020019190600101906200035e565b5b5090506200038b91906200038f565b5090565b5b80821115620003aa57600081600090555060010162000390565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200041782620003cc565b810181811067ffffffffffffffff82111715620004395762000438620003dd565b5b80604052505050565b60006200044e620003ae565b90506200045c82826200040c565b919050565b600067ffffffffffffffff8211156200047f576200047e620003dd565b5b6200048a82620003cc565b9050602081019050919050565b60005b83811015620004b75780820151818401526020810190506200049a565b83811115620004c7576000848401525b50505050565b6000620004e4620004de8462000461565b62000442565b905082815260208101848484011115620005035762000502620003c7565b5b6200051084828562000497565b509392505050565b600082601f83011262000530576200052f620003c2565b5b815162000542848260208601620004cd565b91505092915050565b600060208284031215620005645762000563620003b8565b5b600082015167ffffffffffffffff811115620005855762000584620003bd565b5b620005938482850162000518565b91505092915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000620005e56020836200059c565b9150620005f282620005ad565b602082019050919050565b600060208201905081810360008301526200061881620005d6565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200066757607f821691505b602082108114156200067e576200067d6200061f565b5b50919050565b61547780620006946000396000f3fe60806040526004361061025c5760003560e01c80636817031b11610144578063a22cb465116100b6578063cd218e591161007a578063cd218e59146108f5578063e985e9c514610920578063f0c9dc601461095d578063f2fde38b14610988578063f9d745f9146109b1578063fbfa77cf146109dc5761025c565b8063a22cb465146107fe578063b88d4fde14610827578063ba85ac7e14610850578063c2af69141461087b578063c87b56dd146108b85761025c565b80638462151c116101085780638462151c1461070f578063853828b61461074c5780638c3664cb146107565780638da5cb5b1461077f57806395d89b41146107aa5780639727151a146107d55761025c565b80636817031b1461063e5780636c0360eb1461066757806370a0823114610692578063715018a6146106cf578063819b25ba146106e65761025c565b80632e1a7d4d116101dd57806345a1287b116101a157806345a1287b1461050857806348baf7f4146105455780634f6ccce714610570578063527b3b27146105ad57806355f804b3146105d85780636352211e146106015761025c565b80632e1a7d4d146104275780632f745c59146104505780634201cddf1461048d57806342842e0e146104b657806342966c68146104df5761025c565b8063095ea7b311610224578063095ea7b3146103585780630c48134a1461038157806310969523146103aa57806318160ddd146103d357806323b872dd146103fe5761025c565b806301ffc9a714610261578063035d9f2a1461029e57806304e30f07146102c757806306fdde03146102f0578063081812fc1461031b575b600080fd5b34801561026d57600080fd5b5061028860048036038101906102839190613a90565b610a07565b6040516102959190613ad8565b60405180910390f35b3480156102aa57600080fd5b506102c560048036038101906102c09190613b29565b610a81565b005b3480156102d357600080fd5b506102ee60048036038101906102e99190613bb4565b610c35565b005b3480156102fc57600080fd5b50610305610cf5565b6040516103129190613c7a565b60405180910390f35b34801561032757600080fd5b50610342600480360381019061033d9190613b29565b610d87565b60405161034f9190613cab565b60405180910390f35b34801561036457600080fd5b5061037f600480360381019061037a9190613cc6565b610e0c565b005b34801561038d57600080fd5b506103a860048036038101906103a39190613bb4565b610f24565b005b3480156103b657600080fd5b506103d160048036038101906103cc9190613e3b565b610fe4565b005b3480156103df57600080fd5b506103e861107a565b6040516103f59190613e93565b60405180910390f35b34801561040a57600080fd5b5061042560048036038101906104209190613eae565b611087565b005b34801561043357600080fd5b5061044e60048036038101906104499190613b29565b6110e7565b005b34801561045c57600080fd5b5061047760048036038101906104729190613cc6565b611258565b6040516104849190613e93565b60405180910390f35b34801561049957600080fd5b506104b460048036038101906104af9190613b29565b6112fd565b005b3480156104c257600080fd5b506104dd60048036038101906104d89190613eae565b611383565b005b3480156104eb57600080fd5b5061050660048036038101906105019190613b29565b6113a3565b005b34801561051457600080fd5b5061052f600480360381019061052a9190613b29565b6113ff565b60405161053c9190613cab565b60405180910390f35b34801561055157600080fd5b5061055a611519565b6040516105679190613cab565b60405180910390f35b34801561057c57600080fd5b5061059760048036038101906105929190613b29565b61153f565b6040516105a49190613e93565b60405180910390f35b3480156105b957600080fd5b506105c26115b0565b6040516105cf9190613e93565b60405180910390f35b3480156105e457600080fd5b506105ff60048036038101906105fa9190613e3b565b6115b6565b005b34801561060d57600080fd5b5061062860048036038101906106239190613b29565b61164c565b6040516106359190613cab565b60405180910390f35b34801561064a57600080fd5b5061066560048036038101906106609190613bb4565b6116fe565b005b34801561067357600080fd5b5061067c6117be565b6040516106899190613c7a565b60405180910390f35b34801561069e57600080fd5b506106b960048036038101906106b49190613bb4565b611850565b6040516106c69190613e93565b60405180910390f35b3480156106db57600080fd5b506106e4611908565b005b3480156106f257600080fd5b5061070d60048036038101906107089190613b29565b611986565b005b34801561071b57600080fd5b5061073660048036038101906107319190613bb4565b611aeb565b6040516107439190613fbf565b60405180910390f35b610754611bf5565b005b34801561076257600080fd5b5061077d60048036038101906107789190613b29565b611d65565b005b34801561078b57600080fd5b50610794611f26565b6040516107a19190613cab565b60405180910390f35b3480156107b657600080fd5b506107bf611f50565b6040516107cc9190613c7a565b60405180910390f35b3480156107e157600080fd5b506107fc60048036038101906107f7919061401f565b611fe2565b005b34801561080a57600080fd5b506108256004803603810190610820919061408b565b61215f565b005b34801561083357600080fd5b5061084e6004803603810190610849919061416c565b612175565b005b34801561085c57600080fd5b506108656121d7565b6040516108729190613ad8565b60405180910390f35b34801561088757600080fd5b506108a2600480360381019061089d9190613b29565b6121e4565b6040516108af9190613cab565b60405180910390f35b3480156108c457600080fd5b506108df60048036038101906108da9190613b29565b6122fe565b6040516108ec9190613c7a565b60405180910390f35b34801561090157600080fd5b5061090a612428565b6040516109179190613e93565b60405180910390f35b34801561092c57600080fd5b50610947600480360381019061094291906141ef565b61242e565b6040516109549190613ad8565b60405180910390f35b34801561096957600080fd5b506109726124c2565b60405161097f9190613c7a565b60405180910390f35b34801561099457600080fd5b506109af60048036038101906109aa9190613bb4565b612550565b005b3480156109bd57600080fd5b506109c6612648565b6040516109d39190613cab565b60405180910390f35b3480156109e857600080fd5b506109f161266e565b6040516109fe9190613cab565b60405180910390f35b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610a7a5750610a7982612694565b5b9050919050565b610a896121d7565b610ac8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610abf9061427b565b60405180910390fd5b614e20610ad361107a565b10610b13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0a906142e7565b60405180910390fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff1660e01b8152600401610b6e9190613e93565b602060405180830381865afa925050508015610ba857506040513d601f19601f82011682018060405250810190610ba5919061431c565b60015b610beb57610bb4614356565b806308c379a01415610bda5750610bc9614378565b80610bd45750610bdc565b50610be6565b505b3d6000803e3d6000fd5b610c32565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c30576000829050610c2e3382612776565b505b505b50565b610c3d612794565b73ffffffffffffffffffffffffffffffffffffffff16610c5b611f26565b73ffffffffffffffffffffffffffffffffffffffff1614610cb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca89061445a565b60405180910390fd5b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606060008054610d04906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610d30906144a9565b8015610d7d5780601f10610d5257610100808354040283529160200191610d7d565b820191906000526020600020905b815481529060010190602001808311610d6057829003601f168201915b5050505050905090565b6000610d928261279c565b610dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc89061454d565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610e178261164c565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7f906145df565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610ea7612794565b73ffffffffffffffffffffffffffffffffffffffff161480610ed65750610ed581610ed0612794565b61242e565b5b610f15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0c90614671565b60405180910390fd5b610f1f8383612808565b505050565b610f2c612794565b73ffffffffffffffffffffffffffffffffffffffff16610f4a611f26565b73ffffffffffffffffffffffffffffffffffffffff1614610fa0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f979061445a565b60405180910390fd5b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610fec612794565b73ffffffffffffffffffffffffffffffffffffffff1661100a611f26565b73ffffffffffffffffffffffffffffffffffffffff1614611060576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110579061445a565b60405180910390fd5b80600c9080519060200190611076929190613981565b5050565b6000600880549050905090565b611098611092612794565b826128c1565b6110d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ce90614703565b60405180910390fd5b6110e283838361299f565b505050565b6110ef612794565b73ffffffffffffffffffffffffffffffffffffffff1661110d611f26565b73ffffffffffffffffffffffffffffffffffffffff1614611163576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115a9061445a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156111f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ec9061476f565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505061125557600080fd5b50565b600061126383611850565b82106112a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129b90614801565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b611305612794565b73ffffffffffffffffffffffffffffffffffffffff16611323611f26565b73ffffffffffffffffffffffffffffffffffffffff1614611379576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113709061445a565b60405180910390fd5b80600b8190555050565b61139e83838360405180602001604052806000815250612175565b505050565b6113b46113ae612794565b826128c1565b6113f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ea90614893565b60405180910390fd5b6113fc81612c06565b50565b600080600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161145d9190613e93565b602060405180830381865afa15801561147a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149e919061431c565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611510576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150790614925565b60405180910390fd5b80915050919050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061154961107a565b821061158a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611581906149b7565b60405180910390fd5b6008828154811061159e5761159d6149d7565b5b90600052602060002001549050919050565b614e2081565b6115be612794565b73ffffffffffffffffffffffffffffffffffffffff166115dc611f26565b73ffffffffffffffffffffffffffffffffffffffff1614611632576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116299061445a565b60405180910390fd5b80600e9080519060200190611648929190613981565b5050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156116f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ec90614925565b60405180910390fd5b80915050919050565b611706612794565b73ffffffffffffffffffffffffffffffffffffffff16611724611f26565b73ffffffffffffffffffffffffffffffffffffffff161461177a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117719061445a565b60405180910390fd5b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6060600e80546117cd906144a9565b80601f01602080910402602001604051908101604052809291908181526020018280546117f9906144a9565b80156118465780601f1061181b57610100808354040283529160200191611846565b820191906000526020600020905b81548152906001019060200180831161182957829003601f168201915b5050505050905090565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118b890614a78565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611910612794565b73ffffffffffffffffffffffffffffffffffffffff1661192e611f26565b73ffffffffffffffffffffffffffffffffffffffff1614611984576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197b9061445a565b60405180910390fd5b565b61198e612794565b73ffffffffffffffffffffffffffffffffffffffff166119ac611f26565b73ffffffffffffffffffffffffffffffffffffffff1614611a02576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f99061445a565b60405180910390fd5b6000611a0c61107a565b9050605082611a1961107a565b611a239190614ac7565b1115611a64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a5b90614b6d565b60405180910390fd5b611a6c6121d7565b15611aac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa390614bd9565b60405180910390fd5b60005b82811015611ae657611ad3611ac2611f26565b8284611ace9190614bf9565b612776565b8080611ade90614c4f565b915050611aaf565b505050565b60606000611af883611850565b90506000811415611b5557600067ffffffffffffffff811115611b1e57611b1d613d10565b5b604051908082528060200260200182016040528015611b4c5781602001602082028036833780820191505090505b50915050611bf0565b60008167ffffffffffffffff811115611b7157611b70613d10565b5b604051908082528060200260200182016040528015611b9f5781602001602082028036833780820191505090505b50905060005b82811015611be957611bb78582611258565b828281518110611bca57611bc96149d7565b5b6020026020010181815250508080611be190614c4f565b915050611ba5565b8193505050505b919050565b611bfd612794565b73ffffffffffffffffffffffffffffffffffffffff16611c1b611f26565b73ffffffffffffffffffffffffffffffffffffffff1614611c71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c689061445a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611d03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cfa9061476f565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050611d6357600080fd5b565b611d6d6121d7565b611dac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da39061427b565b60405180910390fd5b614e20611db761107a565b10611df7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dee906142e7565b60405180910390fd5b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff1660e01b8152600401611e529190613e93565b602060405180830381865afa925050508015611e8c57506040513d601f19601f82011682018060405250810190611e89919061431c565b60015b611ecf57611e98614356565b806308c379a01415611ebe5750611ead614378565b80611eb85750611ec0565b50611eca565b505b3d6000803e3d6000fd5b611f23565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611f2157600061271083611f139190614bf9565b9050611f1f3382612776565b505b505b50565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060018054611f5f906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054611f8b906144a9565b8015611fd85780601f10611fad57610100808354040283529160200191611fd8565b820191906000526020600020905b815481529060010190602001808311611fbb57829003601f168201915b5050505050905090565b611fea612794565b73ffffffffffffffffffffffffffffffffffffffff16612008611f26565b73ffffffffffffffffffffffffffffffffffffffff161461205e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120559061445a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156120ba57600080fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401612117929190614c98565b6020604051808303816000875af1158015612136573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061215a9190614cd6565b505050565b61217161216a612794565b8383612d23565b5050565b612186612180612794565b836128c1565b6121c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121bc90614703565b60405180910390fd5b6121d184848484612e90565b50505050565b6000600b54431015905090565b600080601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b81526004016122429190613e93565b602060405180830381865afa15801561225f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612283919061431c565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156122f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ec90614925565b60405180910390fd5b80915050919050565b60606123098261279c565b612348576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161233f90614d75565b60405180910390fd5b6000600e8054612357906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054612383906144a9565b80156123d05780601f106123a5576101008083540402835291602001916123d0565b820191906000526020600020905b8154815290600101906020018083116123b357829003601f168201915b5050505050905060008151116123f55760405180602001604052806000815250612420565b806123ff84612eec565b604051602001612410929190614e1d565b6040516020818303038152906040525b915050919050565b600b5481565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600c80546124cf906144a9565b80601f01602080910402602001604051908101604052809291908181526020018280546124fb906144a9565b80156125485780601f1061251d57610100808354040283529160200191612548565b820191906000526020600020905b81548152906001019060200180831161252b57829003601f168201915b505050505081565b612558612794565b73ffffffffffffffffffffffffffffffffffffffff16612576611f26565b73ffffffffffffffffffffffffffffffffffffffff16146125cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125c39061445a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561263c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161263390614ebe565b60405180910390fd5b6126458161304d565b50565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061275f57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061276f575061276e82613113565b5b9050919050565b61279082826040518060200160405280600081525061317d565b5050565b600033905090565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661287b8361164c565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006128cc8261279c565b61290b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161290290614f50565b60405180910390fd5b60006129168361164c565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061298557508373ffffffffffffffffffffffffffffffffffffffff1661296d84610d87565b73ffffffffffffffffffffffffffffffffffffffff16145b806129965750612995818561242e565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166129bf8261164c565b73ffffffffffffffffffffffffffffffffffffffff1614612a15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a0c90614fe2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612a85576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a7c90615074565b60405180910390fd5b612a908383836131d8565b612a9b600082612808565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612aeb9190615094565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612b429190614bf9565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612c018383836132ec565b505050565b6000612c118261164c565b9050612c1f816000846131d8565b612c2a600083612808565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612c7a9190615094565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612d1f816000846132ec565b5050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612d92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d8990615114565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612e839190613ad8565b60405180910390a3505050565b612e9b84848461299f565b612ea7848484846132f1565b612ee6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612edd906151a6565b60405180910390fd5b50505050565b60606000821415612f34576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050613048565b600082905060005b60008214612f66578080612f4f90614c4f565b915050600a82612f5f91906151f5565b9150612f3c565b60008167ffffffffffffffff811115612f8257612f81613d10565b5b6040519080825280601f01601f191660200182016040528015612fb45781602001600182028036833780820191505090505b5090505b6000851461304157600182612fcd9190615094565b9150600a85612fdc9190615226565b6030612fe89190614bf9565b60f81b818381518110612ffe57612ffd6149d7565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561303a91906151f5565b9450612fb8565b8093505050505b919050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6131878383613479565b61319460008484846132f1565b6131d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131ca906151a6565b60405180910390fd5b505050565b6131e3838383613653565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156132265761322181613658565b613265565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146132645761326383826136a1565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156132a8576132a38161380e565b6132e7565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146132e6576132e582826138df565b5b5b505050565b505050565b60006133128473ffffffffffffffffffffffffffffffffffffffff1661395e565b1561346c578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261333b612794565b8786866040518563ffffffff1660e01b815260040161335d94939291906152ac565b6020604051808303816000875af192505050801561339957506040513d601f19601f82011682018060405250810190613396919061530d565b60015b61341c573d80600081146133c9576040519150601f19603f3d011682016040523d82523d6000602084013e6133ce565b606091505b50600081511415613414576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161340b906151a6565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050613471565b600190505b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156134e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134e090615386565b60405180910390fd5b6134f28161279c565b15613532576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613529906153f2565b60405180910390fd5b61353e600083836131d8565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461358e9190614bf9565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461364f600083836132ec565b5050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b600060016136ae84611850565b6136b89190615094565b905060006007600084815260200190815260200160002054905081811461379d576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506138229190615094565b9050600060096000848152602001908152602001600020549050600060088381548110613852576138516149d7565b5b906000526020600020015490508060088381548110613874576138736149d7565b5b9060005260206000200181905550816009600083815260200190815260200160002081905550600960008581526020019081526020016000206000905560088054806138c3576138c2615412565b5b6001900381819060005260206000200160009055905550505050565b60006138ea83611850565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b82805461398d906144a9565b90600052602060002090601f0160209004810192826139af57600085556139f6565b82601f106139c857805160ff19168380011785556139f6565b828001600101855582156139f6579182015b828111156139f55782518255916020019190600101906139da565b5b509050613a039190613a07565b5090565b5b80821115613a20576000816000905550600101613a08565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613a6d81613a38565b8114613a7857600080fd5b50565b600081359050613a8a81613a64565b92915050565b600060208284031215613aa657613aa5613a2e565b5b6000613ab484828501613a7b565b91505092915050565b60008115159050919050565b613ad281613abd565b82525050565b6000602082019050613aed6000830184613ac9565b92915050565b6000819050919050565b613b0681613af3565b8114613b1157600080fd5b50565b600081359050613b2381613afd565b92915050565b600060208284031215613b3f57613b3e613a2e565b5b6000613b4d84828501613b14565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613b8182613b56565b9050919050565b613b9181613b76565b8114613b9c57600080fd5b50565b600081359050613bae81613b88565b92915050565b600060208284031215613bca57613bc9613a2e565b5b6000613bd884828501613b9f565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613c1b578082015181840152602081019050613c00565b83811115613c2a576000848401525b50505050565b6000601f19601f8301169050919050565b6000613c4c82613be1565b613c568185613bec565b9350613c66818560208601613bfd565b613c6f81613c30565b840191505092915050565b60006020820190508181036000830152613c948184613c41565b905092915050565b613ca581613b76565b82525050565b6000602082019050613cc06000830184613c9c565b92915050565b60008060408385031215613cdd57613cdc613a2e565b5b6000613ceb85828601613b9f565b9250506020613cfc85828601613b14565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613d4882613c30565b810181811067ffffffffffffffff82111715613d6757613d66613d10565b5b80604052505050565b6000613d7a613a24565b9050613d868282613d3f565b919050565b600067ffffffffffffffff821115613da657613da5613d10565b5b613daf82613c30565b9050602081019050919050565b82818337600083830152505050565b6000613dde613dd984613d8b565b613d70565b905082815260208101848484011115613dfa57613df9613d0b565b5b613e05848285613dbc565b509392505050565b600082601f830112613e2257613e21613d06565b5b8135613e32848260208601613dcb565b91505092915050565b600060208284031215613e5157613e50613a2e565b5b600082013567ffffffffffffffff811115613e6f57613e6e613a33565b5b613e7b84828501613e0d565b91505092915050565b613e8d81613af3565b82525050565b6000602082019050613ea86000830184613e84565b92915050565b600080600060608486031215613ec757613ec6613a2e565b5b6000613ed586828701613b9f565b9350506020613ee686828701613b9f565b9250506040613ef786828701613b14565b9150509250925092565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613f3681613af3565b82525050565b6000613f488383613f2d565b60208301905092915050565b6000602082019050919050565b6000613f6c82613f01565b613f768185613f0c565b9350613f8183613f1d565b8060005b83811015613fb2578151613f998882613f3c565b9750613fa483613f54565b925050600181019050613f85565b5085935050505092915050565b60006020820190508181036000830152613fd98184613f61565b905092915050565b6000613fec82613b76565b9050919050565b613ffc81613fe1565b811461400757600080fd5b50565b60008135905061401981613ff3565b92915050565b6000806040838503121561403657614035613a2e565b5b60006140448582860161400a565b925050602061405585828601613b14565b9150509250929050565b61406881613abd565b811461407357600080fd5b50565b6000813590506140858161405f565b92915050565b600080604083850312156140a2576140a1613a2e565b5b60006140b085828601613b9f565b92505060206140c185828601614076565b9150509250929050565b600067ffffffffffffffff8211156140e6576140e5613d10565b5b6140ef82613c30565b9050602081019050919050565b600061410f61410a846140cb565b613d70565b90508281526020810184848401111561412b5761412a613d0b565b5b614136848285613dbc565b509392505050565b600082601f83011261415357614152613d06565b5b81356141638482602086016140fc565b91505092915050565b6000806000806080858703121561418657614185613a2e565b5b600061419487828801613b9f565b94505060206141a587828801613b9f565b93505060406141b687828801613b14565b925050606085013567ffffffffffffffff8111156141d7576141d6613a33565b5b6141e38782880161413e565b91505092959194509250565b6000806040838503121561420657614205613a2e565b5b600061421485828601613b9f565b925050602061422585828601613b9f565b9150509250929050565b7f596f7520616374206265666f726520796f75722074696d650000000000000000600082015250565b6000614265601883613bec565b91506142708261422f565b602082019050919050565b6000602082019050818103600083015261429481614258565b9050919050565b7f416c6c2077697a617264732068617665206265656e2073756d6d6f6e65640000600082015250565b60006142d1601e83613bec565b91506142dc8261429b565b602082019050919050565b60006020820190508181036000830152614300816142c4565b9050919050565b60008151905061431681613b88565b92915050565b60006020828403121561433257614331613a2e565b5b600061434084828501614307565b91505092915050565b60008160e01c9050919050565b600060033d11156143755760046000803e614372600051614349565b90505b90565b600060443d10156143885761440b565b614390613a24565b60043d036004823e80513d602482011167ffffffffffffffff821117156143b857505061440b565b808201805167ffffffffffffffff8111156143d6575050505061440b565b80602083010160043d0385018111156143f357505050505061440b565b61440282602001850186613d3f565b82955050505050505b90565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614444602083613bec565b915061444f8261440e565b602082019050919050565b6000602082019050818103600083015261447381614437565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806144c157607f821691505b602082108114156144d5576144d461447a565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000614537602c83613bec565b9150614542826144db565b604082019050919050565b600060208201905081810360008301526145668161452a565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006145c9602183613bec565b91506145d48261456d565b604082019050919050565b600060208201905081810360008301526145f8816145bc565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b600061465b603883613bec565b9150614666826145ff565b604082019050919050565b6000602082019050818103600083015261468a8161464e565b9050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b60006146ed603183613bec565b91506146f882614691565b604082019050919050565b6000602082019050818103600083015261471c816146e0565b9050919050565b7f6e6f207661756c74000000000000000000000000000000000000000000000000600082015250565b6000614759600883613bec565b915061476482614723565b602082019050919050565b600060208201905081810360008301526147888161474c565b9050919050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b60006147eb602b83613bec565b91506147f68261478f565b604082019050919050565b6000602082019050818103600083015261481a816147de565b9050919050565b7f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656400000000000000000000000000000000602082015250565b600061487d603083613bec565b915061488882614821565b604082019050919050565b600060208201905081810360008301526148ac81614870565b9050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b600061490f602983613bec565b915061491a826148b3565b604082019050919050565b6000602082019050818103600083015261493e81614902565b9050919050565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b60006149a1602c83613bec565b91506149ac82614945565b604082019050919050565b600060208201905081810360008301526149d081614994565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b6000614a62602a83613bec565b9150614a6d82614a06565b604082019050919050565b60006020820190508181036000830152614a9181614a55565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614ad282613af3565b9150614add83613af3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614b1657614b15614a98565b5b828202905092915050565b7f457863656564656420726573657276656420737570706c790000000000000000600082015250565b6000614b57601883613bec565b9150614b6282614b21565b602082019050919050565b60006020820190508181036000830152614b8681614b4a565b9050919050565b7f596f752061637420746f6f206c61746500000000000000000000000000000000600082015250565b6000614bc3601083613bec565b9150614bce82614b8d565b602082019050919050565b60006020820190508181036000830152614bf281614bb6565b9050919050565b6000614c0482613af3565b9150614c0f83613af3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614c4457614c43614a98565b5b828201905092915050565b6000614c5a82613af3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614c8d57614c8c614a98565b5b600182019050919050565b6000604082019050614cad6000830185613c9c565b614cba6020830184613e84565b9392505050565b600081519050614cd08161405f565b92915050565b600060208284031215614cec57614ceb613a2e565b5b6000614cfa84828501614cc1565b91505092915050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b6000614d5f602f83613bec565b9150614d6a82614d03565b604082019050919050565b60006020820190508181036000830152614d8e81614d52565b9050919050565b600081905092915050565b6000614dab82613be1565b614db58185614d95565b9350614dc5818560208601613bfd565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b6000614e07600583614d95565b9150614e1282614dd1565b600582019050919050565b6000614e298285614da0565b9150614e358284614da0565b9150614e4082614dfa565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614ea8602683613bec565b9150614eb382614e4c565b604082019050919050565b60006020820190508181036000830152614ed781614e9b565b9050919050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000614f3a602c83613bec565b9150614f4582614ede565b604082019050919050565b60006020820190508181036000830152614f6981614f2d565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000614fcc602583613bec565b9150614fd782614f70565b604082019050919050565b60006020820190508181036000830152614ffb81614fbf565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061505e602483613bec565b915061506982615002565b604082019050919050565b6000602082019050818103600083015261508d81615051565b9050919050565b600061509f82613af3565b91506150aa83613af3565b9250828210156150bd576150bc614a98565b5b828203905092915050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b60006150fe601983613bec565b9150615109826150c8565b602082019050919050565b6000602082019050818103600083015261512d816150f1565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000615190603283613bec565b915061519b82615134565b604082019050919050565b600060208201905081810360008301526151bf81615183565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061520082613af3565b915061520b83613af3565b92508261521b5761521a6151c6565b5b828204905092915050565b600061523182613af3565b915061523c83613af3565b92508261524c5761524b6151c6565b5b828206905092915050565b600081519050919050565b600082825260208201905092915050565b600061527e82615257565b6152888185615262565b9350615298818560208601613bfd565b6152a181613c30565b840191505092915050565b60006080820190506152c16000830187613c9c565b6152ce6020830186613c9c565b6152db6040830185613e84565b81810360608301526152ed8184615273565b905095945050505050565b60008151905061530781613a64565b92915050565b60006020828403121561532357615322613a2e565b5b6000615331848285016152f8565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000615370602083613bec565b915061537b8261533a565b602082019050919050565b6000602082019050818103600083015261539f81615363565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b60006153dc601c83613bec565b91506153e7826153a6565b602082019050919050565b6000602082019050818103600083015261540b816153cf565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220056351cfdc273e2f84cd59b25b8abc17bdbeaf17e8e4b78846ec96867835209c64736f6c634300080a00330000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002968747470733a2f2f666f72676f7474656e6261626965732e636f6d2f6275696c642f696d616765732f0000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061025c5760003560e01c80636817031b11610144578063a22cb465116100b6578063cd218e591161007a578063cd218e59146108f5578063e985e9c514610920578063f0c9dc601461095d578063f2fde38b14610988578063f9d745f9146109b1578063fbfa77cf146109dc5761025c565b8063a22cb465146107fe578063b88d4fde14610827578063ba85ac7e14610850578063c2af69141461087b578063c87b56dd146108b85761025c565b80638462151c116101085780638462151c1461070f578063853828b61461074c5780638c3664cb146107565780638da5cb5b1461077f57806395d89b41146107aa5780639727151a146107d55761025c565b80636817031b1461063e5780636c0360eb1461066757806370a0823114610692578063715018a6146106cf578063819b25ba146106e65761025c565b80632e1a7d4d116101dd57806345a1287b116101a157806345a1287b1461050857806348baf7f4146105455780634f6ccce714610570578063527b3b27146105ad57806355f804b3146105d85780636352211e146106015761025c565b80632e1a7d4d146104275780632f745c59146104505780634201cddf1461048d57806342842e0e146104b657806342966c68146104df5761025c565b8063095ea7b311610224578063095ea7b3146103585780630c48134a1461038157806310969523146103aa57806318160ddd146103d357806323b872dd146103fe5761025c565b806301ffc9a714610261578063035d9f2a1461029e57806304e30f07146102c757806306fdde03146102f0578063081812fc1461031b575b600080fd5b34801561026d57600080fd5b5061028860048036038101906102839190613a90565b610a07565b6040516102959190613ad8565b60405180910390f35b3480156102aa57600080fd5b506102c560048036038101906102c09190613b29565b610a81565b005b3480156102d357600080fd5b506102ee60048036038101906102e99190613bb4565b610c35565b005b3480156102fc57600080fd5b50610305610cf5565b6040516103129190613c7a565b60405180910390f35b34801561032757600080fd5b50610342600480360381019061033d9190613b29565b610d87565b60405161034f9190613cab565b60405180910390f35b34801561036457600080fd5b5061037f600480360381019061037a9190613cc6565b610e0c565b005b34801561038d57600080fd5b506103a860048036038101906103a39190613bb4565b610f24565b005b3480156103b657600080fd5b506103d160048036038101906103cc9190613e3b565b610fe4565b005b3480156103df57600080fd5b506103e861107a565b6040516103f59190613e93565b60405180910390f35b34801561040a57600080fd5b5061042560048036038101906104209190613eae565b611087565b005b34801561043357600080fd5b5061044e60048036038101906104499190613b29565b6110e7565b005b34801561045c57600080fd5b5061047760048036038101906104729190613cc6565b611258565b6040516104849190613e93565b60405180910390f35b34801561049957600080fd5b506104b460048036038101906104af9190613b29565b6112fd565b005b3480156104c257600080fd5b506104dd60048036038101906104d89190613eae565b611383565b005b3480156104eb57600080fd5b5061050660048036038101906105019190613b29565b6113a3565b005b34801561051457600080fd5b5061052f600480360381019061052a9190613b29565b6113ff565b60405161053c9190613cab565b60405180910390f35b34801561055157600080fd5b5061055a611519565b6040516105679190613cab565b60405180910390f35b34801561057c57600080fd5b5061059760048036038101906105929190613b29565b61153f565b6040516105a49190613e93565b60405180910390f35b3480156105b957600080fd5b506105c26115b0565b6040516105cf9190613e93565b60405180910390f35b3480156105e457600080fd5b506105ff60048036038101906105fa9190613e3b565b6115b6565b005b34801561060d57600080fd5b5061062860048036038101906106239190613b29565b61164c565b6040516106359190613cab565b60405180910390f35b34801561064a57600080fd5b5061066560048036038101906106609190613bb4565b6116fe565b005b34801561067357600080fd5b5061067c6117be565b6040516106899190613c7a565b60405180910390f35b34801561069e57600080fd5b506106b960048036038101906106b49190613bb4565b611850565b6040516106c69190613e93565b60405180910390f35b3480156106db57600080fd5b506106e4611908565b005b3480156106f257600080fd5b5061070d60048036038101906107089190613b29565b611986565b005b34801561071b57600080fd5b5061073660048036038101906107319190613bb4565b611aeb565b6040516107439190613fbf565b60405180910390f35b610754611bf5565b005b34801561076257600080fd5b5061077d60048036038101906107789190613b29565b611d65565b005b34801561078b57600080fd5b50610794611f26565b6040516107a19190613cab565b60405180910390f35b3480156107b657600080fd5b506107bf611f50565b6040516107cc9190613c7a565b60405180910390f35b3480156107e157600080fd5b506107fc60048036038101906107f7919061401f565b611fe2565b005b34801561080a57600080fd5b506108256004803603810190610820919061408b565b61215f565b005b34801561083357600080fd5b5061084e6004803603810190610849919061416c565b612175565b005b34801561085c57600080fd5b506108656121d7565b6040516108729190613ad8565b60405180910390f35b34801561088757600080fd5b506108a2600480360381019061089d9190613b29565b6121e4565b6040516108af9190613cab565b60405180910390f35b3480156108c457600080fd5b506108df60048036038101906108da9190613b29565b6122fe565b6040516108ec9190613c7a565b60405180910390f35b34801561090157600080fd5b5061090a612428565b6040516109179190613e93565b60405180910390f35b34801561092c57600080fd5b50610947600480360381019061094291906141ef565b61242e565b6040516109549190613ad8565b60405180910390f35b34801561096957600080fd5b506109726124c2565b60405161097f9190613c7a565b60405180910390f35b34801561099457600080fd5b506109af60048036038101906109aa9190613bb4565b612550565b005b3480156109bd57600080fd5b506109c6612648565b6040516109d39190613cab565b60405180910390f35b3480156109e857600080fd5b506109f161266e565b6040516109fe9190613cab565b60405180910390f35b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610a7a5750610a7982612694565b5b9050919050565b610a896121d7565b610ac8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610abf9061427b565b60405180910390fd5b614e20610ad361107a565b10610b13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0a906142e7565b60405180910390fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff1660e01b8152600401610b6e9190613e93565b602060405180830381865afa925050508015610ba857506040513d601f19601f82011682018060405250810190610ba5919061431c565b60015b610beb57610bb4614356565b806308c379a01415610bda5750610bc9614378565b80610bd45750610bdc565b50610be6565b505b3d6000803e3d6000fd5b610c32565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c30576000829050610c2e3382612776565b505b505b50565b610c3d612794565b73ffffffffffffffffffffffffffffffffffffffff16610c5b611f26565b73ffffffffffffffffffffffffffffffffffffffff1614610cb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca89061445a565b60405180910390fd5b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606060008054610d04906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054610d30906144a9565b8015610d7d5780601f10610d5257610100808354040283529160200191610d7d565b820191906000526020600020905b815481529060010190602001808311610d6057829003601f168201915b5050505050905090565b6000610d928261279c565b610dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc89061454d565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610e178261164c565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7f906145df565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610ea7612794565b73ffffffffffffffffffffffffffffffffffffffff161480610ed65750610ed581610ed0612794565b61242e565b5b610f15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0c90614671565b60405180910390fd5b610f1f8383612808565b505050565b610f2c612794565b73ffffffffffffffffffffffffffffffffffffffff16610f4a611f26565b73ffffffffffffffffffffffffffffffffffffffff1614610fa0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f979061445a565b60405180910390fd5b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610fec612794565b73ffffffffffffffffffffffffffffffffffffffff1661100a611f26565b73ffffffffffffffffffffffffffffffffffffffff1614611060576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110579061445a565b60405180910390fd5b80600c9080519060200190611076929190613981565b5050565b6000600880549050905090565b611098611092612794565b826128c1565b6110d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ce90614703565b60405180910390fd5b6110e283838361299f565b505050565b6110ef612794565b73ffffffffffffffffffffffffffffffffffffffff1661110d611f26565b73ffffffffffffffffffffffffffffffffffffffff1614611163576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115a9061445a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156111f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ec9061476f565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505061125557600080fd5b50565b600061126383611850565b82106112a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129b90614801565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b611305612794565b73ffffffffffffffffffffffffffffffffffffffff16611323611f26565b73ffffffffffffffffffffffffffffffffffffffff1614611379576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113709061445a565b60405180910390fd5b80600b8190555050565b61139e83838360405180602001604052806000815250612175565b505050565b6113b46113ae612794565b826128c1565b6113f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ea90614893565b60405180910390fd5b6113fc81612c06565b50565b600080600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161145d9190613e93565b602060405180830381865afa15801561147a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149e919061431c565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611510576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150790614925565b60405180910390fd5b80915050919050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061154961107a565b821061158a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611581906149b7565b60405180910390fd5b6008828154811061159e5761159d6149d7565b5b90600052602060002001549050919050565b614e2081565b6115be612794565b73ffffffffffffffffffffffffffffffffffffffff166115dc611f26565b73ffffffffffffffffffffffffffffffffffffffff1614611632576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116299061445a565b60405180910390fd5b80600e9080519060200190611648929190613981565b5050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156116f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ec90614925565b60405180910390fd5b80915050919050565b611706612794565b73ffffffffffffffffffffffffffffffffffffffff16611724611f26565b73ffffffffffffffffffffffffffffffffffffffff161461177a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117719061445a565b60405180910390fd5b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6060600e80546117cd906144a9565b80601f01602080910402602001604051908101604052809291908181526020018280546117f9906144a9565b80156118465780601f1061181b57610100808354040283529160200191611846565b820191906000526020600020905b81548152906001019060200180831161182957829003601f168201915b5050505050905090565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118b890614a78565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611910612794565b73ffffffffffffffffffffffffffffffffffffffff1661192e611f26565b73ffffffffffffffffffffffffffffffffffffffff1614611984576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197b9061445a565b60405180910390fd5b565b61198e612794565b73ffffffffffffffffffffffffffffffffffffffff166119ac611f26565b73ffffffffffffffffffffffffffffffffffffffff1614611a02576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119f99061445a565b60405180910390fd5b6000611a0c61107a565b9050605082611a1961107a565b611a239190614ac7565b1115611a64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a5b90614b6d565b60405180910390fd5b611a6c6121d7565b15611aac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa390614bd9565b60405180910390fd5b60005b82811015611ae657611ad3611ac2611f26565b8284611ace9190614bf9565b612776565b8080611ade90614c4f565b915050611aaf565b505050565b60606000611af883611850565b90506000811415611b5557600067ffffffffffffffff811115611b1e57611b1d613d10565b5b604051908082528060200260200182016040528015611b4c5781602001602082028036833780820191505090505b50915050611bf0565b60008167ffffffffffffffff811115611b7157611b70613d10565b5b604051908082528060200260200182016040528015611b9f5781602001602082028036833780820191505090505b50905060005b82811015611be957611bb78582611258565b828281518110611bca57611bc96149d7565b5b6020026020010181815250508080611be190614c4f565b915050611ba5565b8193505050505b919050565b611bfd612794565b73ffffffffffffffffffffffffffffffffffffffff16611c1b611f26565b73ffffffffffffffffffffffffffffffffffffffff1614611c71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c689061445a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611d03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cfa9061476f565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050611d6357600080fd5b565b611d6d6121d7565b611dac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da39061427b565b60405180910390fd5b614e20611db761107a565b10611df7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dee906142e7565b60405180910390fd5b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff1660e01b8152600401611e529190613e93565b602060405180830381865afa925050508015611e8c57506040513d601f19601f82011682018060405250810190611e89919061431c565b60015b611ecf57611e98614356565b806308c379a01415611ebe5750611ead614378565b80611eb85750611ec0565b50611eca565b505b3d6000803e3d6000fd5b611f23565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611f2157600061271083611f139190614bf9565b9050611f1f3382612776565b505b505b50565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060018054611f5f906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054611f8b906144a9565b8015611fd85780601f10611fad57610100808354040283529160200191611fd8565b820191906000526020600020905b815481529060010190602001808311611fbb57829003601f168201915b5050505050905090565b611fea612794565b73ffffffffffffffffffffffffffffffffffffffff16612008611f26565b73ffffffffffffffffffffffffffffffffffffffff161461205e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120559061445a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156120ba57600080fd5b8173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff1660e01b8152600401612117929190614c98565b6020604051808303816000875af1158015612136573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061215a9190614cd6565b505050565b61217161216a612794565b8383612d23565b5050565b612186612180612794565b836128c1565b6121c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121bc90614703565b60405180910390fd5b6121d184848484612e90565b50505050565b6000600b54431015905090565b600080601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b81526004016122429190613e93565b602060405180830381865afa15801561225f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612283919061431c565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156122f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ec90614925565b60405180910390fd5b80915050919050565b60606123098261279c565b612348576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161233f90614d75565b60405180910390fd5b6000600e8054612357906144a9565b80601f0160208091040260200160405190810160405280929190818152602001828054612383906144a9565b80156123d05780601f106123a5576101008083540402835291602001916123d0565b820191906000526020600020905b8154815290600101906020018083116123b357829003601f168201915b5050505050905060008151116123f55760405180602001604052806000815250612420565b806123ff84612eec565b604051602001612410929190614e1d565b6040516020818303038152906040525b915050919050565b600b5481565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600c80546124cf906144a9565b80601f01602080910402602001604051908101604052809291908181526020018280546124fb906144a9565b80156125485780601f1061251d57610100808354040283529160200191612548565b820191906000526020600020905b81548152906001019060200180831161252b57829003601f168201915b505050505081565b612558612794565b73ffffffffffffffffffffffffffffffffffffffff16612576611f26565b73ffffffffffffffffffffffffffffffffffffffff16146125cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125c39061445a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561263c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161263390614ebe565b60405180910390fd5b6126458161304d565b50565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061275f57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061276f575061276e82613113565b5b9050919050565b61279082826040518060200160405280600081525061317d565b5050565b600033905090565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661287b8361164c565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006128cc8261279c565b61290b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161290290614f50565b60405180910390fd5b60006129168361164c565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061298557508373ffffffffffffffffffffffffffffffffffffffff1661296d84610d87565b73ffffffffffffffffffffffffffffffffffffffff16145b806129965750612995818561242e565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166129bf8261164c565b73ffffffffffffffffffffffffffffffffffffffff1614612a15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a0c90614fe2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612a85576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a7c90615074565b60405180910390fd5b612a908383836131d8565b612a9b600082612808565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612aeb9190615094565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612b429190614bf9565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612c018383836132ec565b505050565b6000612c118261164c565b9050612c1f816000846131d8565b612c2a600083612808565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612c7a9190615094565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612d1f816000846132ec565b5050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612d92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d8990615114565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612e839190613ad8565b60405180910390a3505050565b612e9b84848461299f565b612ea7848484846132f1565b612ee6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612edd906151a6565b60405180910390fd5b50505050565b60606000821415612f34576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050613048565b600082905060005b60008214612f66578080612f4f90614c4f565b915050600a82612f5f91906151f5565b9150612f3c565b60008167ffffffffffffffff811115612f8257612f81613d10565b5b6040519080825280601f01601f191660200182016040528015612fb45781602001600182028036833780820191505090505b5090505b6000851461304157600182612fcd9190615094565b9150600a85612fdc9190615226565b6030612fe89190614bf9565b60f81b818381518110612ffe57612ffd6149d7565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561303a91906151f5565b9450612fb8565b8093505050505b919050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6131878383613479565b61319460008484846132f1565b6131d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131ca906151a6565b60405180910390fd5b505050565b6131e3838383613653565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156132265761322181613658565b613265565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146132645761326383826136a1565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156132a8576132a38161380e565b6132e7565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146132e6576132e582826138df565b5b5b505050565b505050565b60006133128473ffffffffffffffffffffffffffffffffffffffff1661395e565b1561346c578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261333b612794565b8786866040518563ffffffff1660e01b815260040161335d94939291906152ac565b6020604051808303816000875af192505050801561339957506040513d601f19601f82011682018060405250810190613396919061530d565b60015b61341c573d80600081146133c9576040519150601f19603f3d011682016040523d82523d6000602084013e6133ce565b606091505b50600081511415613414576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161340b906151a6565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050613471565b600190505b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156134e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134e090615386565b60405180910390fd5b6134f28161279c565b15613532576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613529906153f2565b60405180910390fd5b61353e600083836131d8565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461358e9190614bf9565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461364f600083836132ec565b5050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b600060016136ae84611850565b6136b89190615094565b905060006007600084815260200190815260200160002054905081811461379d576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506138229190615094565b9050600060096000848152602001908152602001600020549050600060088381548110613852576138516149d7565b5b906000526020600020015490508060088381548110613874576138736149d7565b5b9060005260206000200181905550816009600083815260200190815260200160002081905550600960008581526020019081526020016000206000905560088054806138c3576138c2615412565b5b6001900381819060005260206000200160009055905550505050565b60006138ea83611850565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b82805461398d906144a9565b90600052602060002090601f0160209004810192826139af57600085556139f6565b82601f106139c857805160ff19168380011785556139f6565b828001600101855582156139f6579182015b828111156139f55782518255916020019190600101906139da565b5b509050613a039190613a07565b5090565b5b80821115613a20576000816000905550600101613a08565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613a6d81613a38565b8114613a7857600080fd5b50565b600081359050613a8a81613a64565b92915050565b600060208284031215613aa657613aa5613a2e565b5b6000613ab484828501613a7b565b91505092915050565b60008115159050919050565b613ad281613abd565b82525050565b6000602082019050613aed6000830184613ac9565b92915050565b6000819050919050565b613b0681613af3565b8114613b1157600080fd5b50565b600081359050613b2381613afd565b92915050565b600060208284031215613b3f57613b3e613a2e565b5b6000613b4d84828501613b14565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613b8182613b56565b9050919050565b613b9181613b76565b8114613b9c57600080fd5b50565b600081359050613bae81613b88565b92915050565b600060208284031215613bca57613bc9613a2e565b5b6000613bd884828501613b9f565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613c1b578082015181840152602081019050613c00565b83811115613c2a576000848401525b50505050565b6000601f19601f8301169050919050565b6000613c4c82613be1565b613c568185613bec565b9350613c66818560208601613bfd565b613c6f81613c30565b840191505092915050565b60006020820190508181036000830152613c948184613c41565b905092915050565b613ca581613b76565b82525050565b6000602082019050613cc06000830184613c9c565b92915050565b60008060408385031215613cdd57613cdc613a2e565b5b6000613ceb85828601613b9f565b9250506020613cfc85828601613b14565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613d4882613c30565b810181811067ffffffffffffffff82111715613d6757613d66613d10565b5b80604052505050565b6000613d7a613a24565b9050613d868282613d3f565b919050565b600067ffffffffffffffff821115613da657613da5613d10565b5b613daf82613c30565b9050602081019050919050565b82818337600083830152505050565b6000613dde613dd984613d8b565b613d70565b905082815260208101848484011115613dfa57613df9613d0b565b5b613e05848285613dbc565b509392505050565b600082601f830112613e2257613e21613d06565b5b8135613e32848260208601613dcb565b91505092915050565b600060208284031215613e5157613e50613a2e565b5b600082013567ffffffffffffffff811115613e6f57613e6e613a33565b5b613e7b84828501613e0d565b91505092915050565b613e8d81613af3565b82525050565b6000602082019050613ea86000830184613e84565b92915050565b600080600060608486031215613ec757613ec6613a2e565b5b6000613ed586828701613b9f565b9350506020613ee686828701613b9f565b9250506040613ef786828701613b14565b9150509250925092565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613f3681613af3565b82525050565b6000613f488383613f2d565b60208301905092915050565b6000602082019050919050565b6000613f6c82613f01565b613f768185613f0c565b9350613f8183613f1d565b8060005b83811015613fb2578151613f998882613f3c565b9750613fa483613f54565b925050600181019050613f85565b5085935050505092915050565b60006020820190508181036000830152613fd98184613f61565b905092915050565b6000613fec82613b76565b9050919050565b613ffc81613fe1565b811461400757600080fd5b50565b60008135905061401981613ff3565b92915050565b6000806040838503121561403657614035613a2e565b5b60006140448582860161400a565b925050602061405585828601613b14565b9150509250929050565b61406881613abd565b811461407357600080fd5b50565b6000813590506140858161405f565b92915050565b600080604083850312156140a2576140a1613a2e565b5b60006140b085828601613b9f565b92505060206140c185828601614076565b9150509250929050565b600067ffffffffffffffff8211156140e6576140e5613d10565b5b6140ef82613c30565b9050602081019050919050565b600061410f61410a846140cb565b613d70565b90508281526020810184848401111561412b5761412a613d0b565b5b614136848285613dbc565b509392505050565b600082601f83011261415357614152613d06565b5b81356141638482602086016140fc565b91505092915050565b6000806000806080858703121561418657614185613a2e565b5b600061419487828801613b9f565b94505060206141a587828801613b9f565b93505060406141b687828801613b14565b925050606085013567ffffffffffffffff8111156141d7576141d6613a33565b5b6141e38782880161413e565b91505092959194509250565b6000806040838503121561420657614205613a2e565b5b600061421485828601613b9f565b925050602061422585828601613b9f565b9150509250929050565b7f596f7520616374206265666f726520796f75722074696d650000000000000000600082015250565b6000614265601883613bec565b91506142708261422f565b602082019050919050565b6000602082019050818103600083015261429481614258565b9050919050565b7f416c6c2077697a617264732068617665206265656e2073756d6d6f6e65640000600082015250565b60006142d1601e83613bec565b91506142dc8261429b565b602082019050919050565b60006020820190508181036000830152614300816142c4565b9050919050565b60008151905061431681613b88565b92915050565b60006020828403121561433257614331613a2e565b5b600061434084828501614307565b91505092915050565b60008160e01c9050919050565b600060033d11156143755760046000803e614372600051614349565b90505b90565b600060443d10156143885761440b565b614390613a24565b60043d036004823e80513d602482011167ffffffffffffffff821117156143b857505061440b565b808201805167ffffffffffffffff8111156143d6575050505061440b565b80602083010160043d0385018111156143f357505050505061440b565b61440282602001850186613d3f565b82955050505050505b90565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614444602083613bec565b915061444f8261440e565b602082019050919050565b6000602082019050818103600083015261447381614437565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806144c157607f821691505b602082108114156144d5576144d461447a565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000614537602c83613bec565b9150614542826144db565b604082019050919050565b600060208201905081810360008301526145668161452a565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006145c9602183613bec565b91506145d48261456d565b604082019050919050565b600060208201905081810360008301526145f8816145bc565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b600061465b603883613bec565b9150614666826145ff565b604082019050919050565b6000602082019050818103600083015261468a8161464e565b9050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b60006146ed603183613bec565b91506146f882614691565b604082019050919050565b6000602082019050818103600083015261471c816146e0565b9050919050565b7f6e6f207661756c74000000000000000000000000000000000000000000000000600082015250565b6000614759600883613bec565b915061476482614723565b602082019050919050565b600060208201905081810360008301526147888161474c565b9050919050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b60006147eb602b83613bec565b91506147f68261478f565b604082019050919050565b6000602082019050818103600083015261481a816147de565b9050919050565b7f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656400000000000000000000000000000000602082015250565b600061487d603083613bec565b915061488882614821565b604082019050919050565b600060208201905081810360008301526148ac81614870565b9050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b600061490f602983613bec565b915061491a826148b3565b604082019050919050565b6000602082019050818103600083015261493e81614902565b9050919050565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b60006149a1602c83613bec565b91506149ac82614945565b604082019050919050565b600060208201905081810360008301526149d081614994565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b6000614a62602a83613bec565b9150614a6d82614a06565b604082019050919050565b60006020820190508181036000830152614a9181614a55565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614ad282613af3565b9150614add83613af3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614b1657614b15614a98565b5b828202905092915050565b7f457863656564656420726573657276656420737570706c790000000000000000600082015250565b6000614b57601883613bec565b9150614b6282614b21565b602082019050919050565b60006020820190508181036000830152614b8681614b4a565b9050919050565b7f596f752061637420746f6f206c61746500000000000000000000000000000000600082015250565b6000614bc3601083613bec565b9150614bce82614b8d565b602082019050919050565b60006020820190508181036000830152614bf281614bb6565b9050919050565b6000614c0482613af3565b9150614c0f83613af3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614c4457614c43614a98565b5b828201905092915050565b6000614c5a82613af3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614c8d57614c8c614a98565b5b600182019050919050565b6000604082019050614cad6000830185613c9c565b614cba6020830184613e84565b9392505050565b600081519050614cd08161405f565b92915050565b600060208284031215614cec57614ceb613a2e565b5b6000614cfa84828501614cc1565b91505092915050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b6000614d5f602f83613bec565b9150614d6a82614d03565b604082019050919050565b60006020820190508181036000830152614d8e81614d52565b9050919050565b600081905092915050565b6000614dab82613be1565b614db58185614d95565b9350614dc5818560208601613bfd565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b6000614e07600583614d95565b9150614e1282614dd1565b600582019050919050565b6000614e298285614da0565b9150614e358284614da0565b9150614e4082614dfa565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614ea8602683613bec565b9150614eb382614e4c565b604082019050919050565b60006020820190508181036000830152614ed781614e9b565b9050919050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000614f3a602c83613bec565b9150614f4582614ede565b604082019050919050565b60006020820190508181036000830152614f6981614f2d565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000614fcc602583613bec565b9150614fd782614f70565b604082019050919050565b60006020820190508181036000830152614ffb81614fbf565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061505e602483613bec565b915061506982615002565b604082019050919050565b6000602082019050818103600083015261508d81615051565b9050919050565b600061509f82613af3565b91506150aa83613af3565b9250828210156150bd576150bc614a98565b5b828203905092915050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b60006150fe601983613bec565b9150615109826150c8565b602082019050919050565b6000602082019050818103600083015261512d816150f1565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000615190603283613bec565b915061519b82615134565b604082019050919050565b600060208201905081810360008301526151bf81615183565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061520082613af3565b915061520b83613af3565b92508261521b5761521a6151c6565b5b828204905092915050565b600061523182613af3565b915061523c83613af3565b92508261524c5761524b6151c6565b5b828206905092915050565b600081519050919050565b600082825260208201905092915050565b600061527e82615257565b6152888185615262565b9350615298818560208601613bfd565b6152a181613c30565b840191505092915050565b60006080820190506152c16000830187613c9c565b6152ce6020830186613c9c565b6152db6040830185613e84565b81810360608301526152ed8184615273565b905095945050505050565b60008151905061530781613a64565b92915050565b60006020828403121561532357615322613a2e565b5b6000615331848285016152f8565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000615370602083613bec565b915061537b8261533a565b602082019050919050565b6000602082019050818103600083015261539f81615363565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b60006153dc601c83613bec565b91506153e7826153a6565b602082019050919050565b6000602082019050818103600083015261540b816153cf565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220056351cfdc273e2f84cd59b25b8abc17bdbeaf17e8e4b78846ec96867835209c64736f6c634300080a0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002968747470733a2f2f666f72676f7474656e6261626965732e636f6d2f6275696c642f696d616765732f0000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : baseURI (string): https://forgottenbabies.com/build/images/

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000029
Arg [2] : 68747470733a2f2f666f72676f7474656e6261626965732e636f6d2f6275696c
Arg [3] : 642f696d616765732f0000000000000000000000000000000000000000000000


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.