ETH Price: $3,345.69 (+0.33%)

Token

TasteMakerz (TSTMKRZ)
 

Overview

Max Total Supply

993 TSTMKRZ

Holders

349

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Filtered by Token Holder
nix.eth
0x3424cd7d170949636c300e62674a3dfb7706fc35
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:
ERC1155SelfMinter

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 20 : ERC1155SelfMinter.sol
// SPDX-License-Identifier: UNLICENSE
pragma solidity >=0.8.0 <=0.8.19;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";

contract ERC1155SelfMinter is ERC1155, ReentrancyGuard, DefaultOperatorFilterer, Ownable {
    error TotalSupplyGreaterThanMaxSupply();
    error TierNumberIncorrect();
    error ArrayLengthsDiffer();
    error TierLengthTooShort();
    error PartnerAlreadyExists();
    error PartnerNotFound();
    error InvalidPartnerWallet();
    error InvalidPartnerSharePct();
    error PartnerActive();
    error PartnerDeactivated();
    error InvalidProof();
    error TierPeriodHasntStarted();
    error TierPeriodHasEnded();
    error MintLimitReached();
    error AlreadyInitialized();
    error MsgSenderIsNotOwner();

    using Strings for uint256;

    string public baseURI;
    string public metaDataExt = "";
    string public name;
    string public symbol;

    uint256 public mintFee;
    uint256 public saleId;
    uint256 public totalSupply;

    bool public paused;
    bool public initialized;

    address public multisig;
    address public token;
    address public treasuryWallet;

    mapping(uint256 => Tier) public tiers;
    mapping(uint256 => Supply) public supplyPerId;
    mapping(address => Partner) public partners;
    mapping(address => mapping(uint256 => Supply)) public partnersSupply;

    uint256 public maxPartnerSharePct = 10;

    mapping(address => uint256) public mintedPerAddress;
    mapping(address => bool) public isAdmin;

    event SetBaseURI(string indexed _baseURI);
    event SetStartTimestamp(uint256 indexed _timestamp);
    event TokenBurn(uint256[] indexed _tokenIds, uint256[] indexed _amounts, address indexed _user);
    event TierMint(address indexed user, uint256 indexed _tier, uint256 indexed _amount);
    event BatchMint(address indexed user, uint256 indexed _amount);
    event PartnerTierMint(address indexed user, uint256 indexed _tier, uint256 indexed _amount, address _partner);

    function _onlyAdminOrOwner(address _address) private view {
        require(
            isAdmin[_address] || _address == owner(),
            "This address is not allowed"
        );
    }

    modifier onlyAdminOrOwner(address _address) {
        _onlyAdminOrOwner(_address);
        _;
    }
    
    function _onlyMultiSig(address _address) private view {
        require(_address == multisig, "Not Multisig wallet");
    }

    modifier onlyMultiSig(address _address) {
        _onlyMultiSig(_address);
        _;
    }

    function _onlyUnpaused() private view {
        require(!paused, "Sale Stopped Currently");
    }

    modifier onlyUnpaused() {
        _onlyUnpaused();
        _;
    }

    struct Supply {
        uint256 max;
        uint256 total;
    }

    struct Tier {
        uint256 start;
        uint256 end;
        bytes32 merkleRoot;
        uint256 limitPerWalletPerTier;
        bool isPublic;
    }

    struct Partner {
        address walletAddress;
        uint256 sharePct;
        bool isActive;
    }

    constructor() ERC1155(""){}

    function initialize(
        address _multisig,
        address _token,
        string memory _baseURI,
        string memory _name,
        string memory _symbol,
        uint256 _fees,
        uint256[] memory tiersNumbers,
        uint256[] memory limitPerWalletPerTier,
        uint256[] memory starts,
        uint256[] memory ends,
        bytes32[] memory merkleRoots,
        bool[] memory isTierPublic
    ) public onlyAdminOrOwner(msg.sender) {
        if(initialized) revert AlreadyInitialized();
        if(tiersNumbers.length != starts.length) revert ArrayLengthsDiffer();
        if(tiersNumbers.length != ends.length) revert ArrayLengthsDiffer();
        if(tiersNumbers.length != merkleRoots.length) revert ArrayLengthsDiffer();
        if(tiersNumbers.length != limitPerWalletPerTier.length) revert ArrayLengthsDiffer();
        if(tiersNumbers.length != isTierPublic.length) revert ArrayLengthsDiffer();

        multisig = _multisig;
        token = _token;
        baseURI = _baseURI;
        mintFee = _fees;
        name = _name;
        symbol = _symbol;

        for (uint256 i = 0; i < tiersNumbers.length; i++) {
            tiers[tiersNumbers[i]] = Tier(starts[i], ends[i], merkleRoots[i], limitPerWalletPerTier[i], isTierPublic[i]);
        }

        emit SetBaseURI(baseURI);

        initialized = true;
    }

    function setSaleConfig(
        uint256 _fees,
        uint256[] memory tiersNumbers,
        uint256[] memory limitPerWalletPerTier,
        uint256[] memory starts,
        uint256[] memory ends,
        bytes32[] memory merkleRoots,
        bool[] memory isTierPublic
    ) public onlyAdminOrOwner(msg.sender) {
        if(tiersNumbers.length != starts.length) revert ArrayLengthsDiffer();
        if(tiersNumbers.length != ends.length) revert ArrayLengthsDiffer();
        if(tiersNumbers.length != merkleRoots.length) revert ArrayLengthsDiffer();
        if(tiersNumbers.length != limitPerWalletPerTier.length) revert ArrayLengthsDiffer();
        if(tiersNumbers.length != isTierPublic.length) revert ArrayLengthsDiffer();

        mintFee = _fees;

        for (uint256 i = 0; i < tiersNumbers.length; i++) {
            tiers[tiersNumbers[i]] = Tier(starts[i], ends[i], merkleRoots[i], limitPerWalletPerTier[i], isTierPublic[i]);
        }
    }

    //
    // Admin / Owner Functions
    //
    function setContractOwnership(address newOwner) public onlyOwner {
        transferOwnership(newOwner);
    }

    function setContractAdmin(address _address) public onlyOwner {
        isAdmin[_address] = true;
    }

    function setTreasury(address _addr) public onlyOwner {
        treasuryWallet = _addr;
    }

    function deleteContractAdmin(address _address) public onlyOwner {
        isAdmin[_address] = false;
    }

    function setTierTimes(
        uint256 tierNo,
        uint256 _startTime,
        uint256 _endTime
    ) public onlyOwner {
        if(_endTime < _startTime + 30) revert TierLengthTooShort();
        tiers[tierNo].start = _startTime;
        tiers[tierNo].end = _endTime;
    } 

    function setMultiSig(address _addr) public onlyMultiSig(msg.sender) {
        multisig = _addr;
    }

    function setPaymentToken(address _addr) external onlyMultiSig(msg.sender) {
        token = _addr;
    }

    function setMaxPartnerSharePct(uint256 maxShare) external onlyMultiSig(msg.sender) {
        maxPartnerSharePct = maxShare;
    }

    function partnerAdd(
        address partnerWallet,
        uint256 _sharePct
    ) external onlyMultiSig(msg.sender) {
        if(partners[partnerWallet].walletAddress != address(0)) revert PartnerAlreadyExists();
        if(partnerWallet == address(0)) revert InvalidPartnerWallet();
        if(_sharePct > maxPartnerSharePct) revert InvalidPartnerSharePct();

        partners[partnerWallet] = Partner({
            walletAddress: partnerWallet,
            sharePct: _sharePct,
            isActive: true
        });
    }

    function partnerUpdateSharePct(
        address partnerWallet,
        uint256 _sharePct
    ) external onlyMultiSig(msg.sender) {
        if(partners[partnerWallet].walletAddress == address(0)) revert PartnerNotFound();
        if(_sharePct > maxPartnerSharePct) revert InvalidPartnerSharePct();

        partners[partnerWallet].sharePct = _sharePct;
    }

    function partnerActivate(address partnerWallet) external onlyMultiSig(msg.sender) {
        if(partners[partnerWallet].walletAddress == address(0)) revert PartnerNotFound();
        if(partners[partnerWallet].isActive) revert PartnerActive();

        partners[partnerWallet].isActive = true;
    }

    function partnerDeactivate(address partnerWallet) external onlyMultiSig(msg.sender) {
        if(partners[partnerWallet].walletAddress == address(0)) revert PartnerNotFound();
        if(!partners[partnerWallet].isActive) revert PartnerDeactivated();

        partners[partnerWallet].isActive = false;
    }

    function partnerSetTokenIdMaxSupply(
        address partnerWallet,
        uint256 _tokenId,
        uint256 _maxSupply
    ) public onlyAdminOrOwner(msg.sender) {
        if (partners[partnerWallet].walletAddress == address(0)) revert PartnerNotFound();

        if (partnersSupply[partnerWallet][_tokenId].total == 0) {
            partnersSupply[partnerWallet][_tokenId] = Supply({
                max: _maxSupply, 
                total: 0
            });

            return;
        }

        if (partnersSupply[partnerWallet][_tokenId].total > _maxSupply) revert TotalSupplyGreaterThanMaxSupply();

        partnersSupply[partnerWallet][_tokenId].max = _maxSupply;
    }

    function collectTreasury() external onlyMultiSig(msg.sender) {
        if (address(token) == address(0)) {
            require (address(0) != treasuryWallet, "Invalid treasury wallet");

            (bool sent, bytes memory data) = treasuryWallet.call{value: address(this).balance}("");
            require(sent, "Failed to send Ether");
        } else {
            uint256 amt = ERC20(token).balanceOf(address(this));
            ERC20(token).transfer(treasuryWallet, amt);
        }
    }

    function emergencyPause(bool _paused) public onlyAdminOrOwner(msg.sender) {
        paused = _paused;
    }

    function setSaleTokenId(uint256 _tokenId) public onlyAdminOrOwner(msg.sender) {
        saleId = _tokenId;
    }

    function setMintFee(uint256 _mintFee) public onlyAdminOrOwner(msg.sender) {
        mintFee = _mintFee;
    }

    function setTierMerkleRoots(uint256 tierNo, bytes32 merkleRoots) public onlyAdminOrOwner(msg.sender) {
        tiers[tierNo].merkleRoot = merkleRoots;
    }

    function setTierLimitPerWallet(uint256 tierNo, uint256 limitPerWallet) public onlyAdminOrOwner(msg.sender) {
        tiers[tierNo].limitPerWalletPerTier = limitPerWallet;
    }

    function setTierIsPublic(uint256 tierNo, bool isPublic) public onlyAdminOrOwner(msg.sender) {
        tiers[tierNo].isPublic = isPublic;
    }

    function setNftMetadata(string memory _newBaseURI, string memory _newExt) public onlyAdminOrOwner(msg.sender) {
        baseURI = _newBaseURI;
        metaDataExt = _newExt;
    }

    function setTokenIdMaxSupply(uint256 _tokenId, uint256 _maxSupply) public onlyAdminOrOwner(msg.sender) {
        if (supplyPerId[_tokenId].total > _maxSupply) revert TotalSupplyGreaterThanMaxSupply();
        supplyPerId[_tokenId].max = _maxSupply;
    }

    function tierMint(
        address mintAddress,
        uint256 tierNo,
        uint256 amount,
        bytes32[] calldata _merkleProof
    ) external payable onlyUnpaused() {
        uint256 payment = mintFee * amount;

        _checks(mintAddress, tierNo, amount, _merkleProof);
        _mintFeeCheck(msg.sender, amount);
        
        if(supplyPerId[saleId].total + amount > supplyPerId[saleId].max)
            revert TotalSupplyGreaterThanMaxSupply();

        supplyPerId[saleId].total += amount;

        if (treasuryWallet != address(0)) {
            if(address(token) == address(0)){
                require(msg.value >= payment);
                
                (bool sent, bytes memory data) = treasuryWallet.call{value: msg.value}("");
                require(sent, "Failed to send Ether");
            } else {
                ERC20(token).transferFrom(msg.sender, treasuryWallet, payment);
            }
        }


        _mint(mintAddress, saleId, amount, "");

        totalSupply += amount;

        emit TierMint(mintAddress, tierNo, amount);
    }

    function batchMint(
        address mintAddress,
        uint256 amount
    ) external onlyUnpaused() onlyAdminOrOwner(msg.sender) {      
        if(supplyPerId[saleId].total + amount > supplyPerId[saleId].max)
            revert TotalSupplyGreaterThanMaxSupply();

        supplyPerId[saleId].total += amount;

        _mint(mintAddress, saleId, amount, "");

        totalSupply += amount;

        emit BatchMint(mintAddress, amount);
    }

    //
    // Partner operations
    //
    function partnerTierMint(
        address mintAddress,
        uint256 tierNo,
        uint256 amount,
        bytes32[] calldata _merkleProof,
        address partnerWallet
    ) external payable onlyUnpaused() {

        uint256 payment = mintFee * amount;

        if (partners[partnerWallet].walletAddress == address(0))
            revert PartnerNotFound();

        if (!partners[partnerWallet].isActive)
            revert PartnerDeactivated();

        if (partnersSupply[partnerWallet][saleId].total + amount > partnersSupply[partnerWallet][saleId].max)
            revert TotalSupplyGreaterThanMaxSupply();

        uint256 _partnerAmount;

        _checks(mintAddress, tierNo, amount, _merkleProof);
        _mintFeeCheck(msg.sender, amount);

        if (address(token) == address(0)) {
            require(msg.value >= payment);
            _partnerAmount = msg.value * partners[partnerWallet].sharePct / 100;

            if (treasuryWallet != address(0)) {
                (bool sent, bytes memory data) = treasuryWallet.call{value: msg.value - _partnerAmount}("");
                require(sent, "Failed to send Ether");
            }

            (bool _sent, bytes memory _data) = partnerWallet.call{value: _partnerAmount}("");
            require(_sent, "Failed to send Ether");

        } else {
            _partnerAmount = payment * partners[partnerWallet].sharePct / 100;

            if (treasuryWallet != address(0)) {
                ERC20(token).transferFrom(msg.sender, treasuryWallet, payment - _partnerAmount);
            }
            ERC20(token).transferFrom(msg.sender, partners[partnerWallet].walletAddress, _partnerAmount);
        }

        partnersSupply[partnerWallet][saleId].total += amount;

        _mint(mintAddress, saleId, amount, "");

        totalSupply += amount;

        emit PartnerTierMint(mintAddress, tierNo, amount, partnerWallet);
    }

    function burn(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) public {
        if(ids.length != amounts.length) revert ArrayLengthsDiffer();
        if(from != msg.sender) revert MsgSenderIsNotOwner();

        for(uint256 i=0; i < ids.length; i++){
            _burn(from, ids[i], amounts[i]);

            totalSupply -= amounts[i];
        }

        emit TokenBurn(ids, amounts, from);
    }

    function setApprovalForAll(
        address operator, 
        bool approved
    ) public override onlyAllowedOperatorApproval(operator){
        super.setApprovalForAll(operator, approved);
    }

    function safeTransferFrom(
        address from, 
        address to, 
        uint256 id, 
        uint256 amount, 
        bytes memory data
    ) public override onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, id, amount, data);
    }

    function safeBatchTransferFrom(
        address from, 
        address to, 
        uint256[] memory ids, 
        uint256[] memory amounts, 
        bytes memory data
    ) public override onlyAllowedOperator(from) {
        super.safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    //
    // View/Internal Functions
    //
    function uri(uint256 tokenId) public view override returns (string memory) {
        require(bytes(baseURI).length > 0, "TokenUri: base URI is not set");
    
        return string(abi.encodePacked(baseURI, metaDataExt, tokenId.toString()));
    }

    function _checks(
        address mintAddress,
        uint256 tierNo,
        uint256 amount,
        bytes32[] calldata _merkleProof
    ) internal view {
        if(tierNo <= 0) revert TierNumberIncorrect();
        if(tiers[tierNo].start > block.timestamp) revert TierPeriodHasntStarted();
        if(tiers[tierNo].end < block.timestamp) revert TierPeriodHasEnded();

        if (tiers[tierNo].isPublic == false && !MerkleProof.verify(_merkleProof, tiers[tierNo].merkleRoot, keccak256(abi.encodePacked(mintAddress, tierNo)))) {
            revert InvalidProof();
        }

        if(mintedPerAddress[mintAddress] + amount > tiers[tierNo].limitPerWalletPerTier) revert MintLimitReached();
    }

    function _mintFeeCheck(address user, uint256 amount) internal view {
        if (address(token) == address(0)) {
            require(
                msg.value >= mintFee * amount,
                "doesn't have enough tokens to mint the NFT"
            );
        } else {
            require(
                ERC20(token).balanceOf(user) >= mintFee * amount,
                "doesn't have enough tokens to mint the NFT"
            );
        }
    }

    function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal override {
        mintedPerAddress[to] += amount;

        super._mint(to, id, amount, data);
    }
}

File 2 of 20 : DefaultOperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {OperatorFilterer} from "./OperatorFilterer.sol";
import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol";
/**
 * @title  DefaultOperatorFilterer
 * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
 * @dev    Please note that if your token contract does not provide an owner with EIP-173, it must provide
 *         administration methods on the contract itself to interact with the registry otherwise the subscription
 *         will be locked to the options set during construction.
 */

abstract contract DefaultOperatorFilterer is OperatorFilterer {
    /// @dev The constructor that is called when the contract is being deployed.
    constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {}
}

File 3 of 20 : 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 4 of 20 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 5 of 20 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

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

    /**
     * @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);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 6 of 20 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: address zero is not a valid owner");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `ids` and `amounts` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 7 of 20 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens 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 amount
    ) 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, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 8 of 20 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree 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.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
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 Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle 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++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
     * consuming from one or the other at each step according to the instructions given by
     * `proofFlags`.
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 9 of 20 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol";
/**
 * @title  OperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 *         Please note that if your token contract does not provide an owner with EIP-173, it must provide
 *         administration methods on the contract itself to interact with the registry otherwise the subscription
 *         will be locked to the options set during construction.
 */

abstract contract OperatorFilterer {
    /// @dev Emitted when an operator is not allowed.
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS);

    /// @dev The constructor that is called when the contract is being deployed.
    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (subscribe) {
                OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    OPERATOR_FILTER_REGISTRY.register(address(this));
                }
            }
        }
    }

    /**
     * @dev A helper function to check if an operator is allowed.
     */
    modifier onlyAllowedOperator(address from) virtual {
        // Allow spending tokens from addresses with balance
        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
        // from an EOA.
        if (from != msg.sender) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    /**
     * @dev A helper function to check if an operator approval is allowed.
     */
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    /**
     * @dev A helper function to check if an operator is allowed.
     */
    function _checkFilterOperator(address operator) internal view virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            // under normal circumstances, this function will revert rather than return false, but inheriting contracts
            // may specify their own OperatorFilterRegistry implementations, which may behave differently
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

File 10 of 20 : Constants.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E;
address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;

File 11 of 20 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    /**
     * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns
     *         true if supplied registrant address is not registered.
     */
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);

    /**
     * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.
     */
    function register(address registrant) external;

    /**
     * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes.
     */
    function registerAndSubscribe(address registrant, address subscription) external;

    /**
     * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another
     *         address without subscribing.
     */
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;

    /**
     * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner.
     *         Note that this does not remove any filtered addresses or codeHashes.
     *         Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes.
     */
    function unregister(address addr) external;

    /**
     * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered.
     */
    function updateOperator(address registrant, address operator, bool filtered) external;

    /**
     * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates.
     */
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;

    /**
     * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered.
     */
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;

    /**
     * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates.
     */
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;

    /**
     * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous
     *         subscription if present.
     *         Note that accounts with subscriptions may go on to subscribe to other accounts - in this case,
     *         subscriptions will not be forwarded. Instead the former subscription's existing entries will still be
     *         used.
     */
    function subscribe(address registrant, address registrantToSubscribe) external;

    /**
     * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes.
     */
    function unsubscribe(address registrant, bool copyExistingEntries) external;

    /**
     * @notice Get the subscription address of a given registrant, if any.
     */
    function subscriptionOf(address addr) external returns (address registrant);

    /**
     * @notice Get the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscribers(address registrant) external returns (address[] memory);

    /**
     * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscriberAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.
     */
    function copyEntriesOf(address registrant, address registrantToCopy) external;

    /**
     * @notice Returns true if operator is filtered by a given address or its subscription.
     */
    function isOperatorFiltered(address registrant, address operator) external returns (bool);

    /**
     * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription.
     */
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);

    /**
     * @notice Returns true if a codeHash is filtered by a given address or its subscription.
     */
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);

    /**
     * @notice Returns a list of filtered operators for a given address or its subscription.
     */
    function filteredOperators(address addr) external returns (address[] memory);

    /**
     * @notice Returns the set of filtered codeHashes for a given address or its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);

    /**
     * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);

    /**
     * @notice Returns true if an address has registered
     */
    function isRegistered(address addr) external returns (bool);

    /**
     * @dev Convenience method to compute the code hash of an arbitrary contract
     */
    function codeHashOf(address addr) external returns (bytes32);
}

File 12 of 20 : 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 13 of 20 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 14 of 20 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 15 of 20 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 16 of 20 : 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 17 of 20 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 18 of 20 : 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 19 of 20 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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);
}

File 20 of 20 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"ArrayLengthsDiffer","type":"error"},{"inputs":[],"name":"InvalidPartnerSharePct","type":"error"},{"inputs":[],"name":"InvalidPartnerWallet","type":"error"},{"inputs":[],"name":"InvalidProof","type":"error"},{"inputs":[],"name":"MintLimitReached","type":"error"},{"inputs":[],"name":"MsgSenderIsNotOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"PartnerActive","type":"error"},{"inputs":[],"name":"PartnerAlreadyExists","type":"error"},{"inputs":[],"name":"PartnerDeactivated","type":"error"},{"inputs":[],"name":"PartnerNotFound","type":"error"},{"inputs":[],"name":"TierLengthTooShort","type":"error"},{"inputs":[],"name":"TierNumberIncorrect","type":"error"},{"inputs":[],"name":"TierPeriodHasEnded","type":"error"},{"inputs":[],"name":"TierPeriodHasntStarted","type":"error"},{"inputs":[],"name":"TotalSupplyGreaterThanMaxSupply","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"BatchMint","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":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"_partner","type":"address"}],"name":"PartnerTierMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"_baseURI","type":"string"}],"name":"SetBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"SetStartTimestamp","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"TierMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"indexed":true,"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"indexed":true,"internalType":"address","name":"_user","type":"address"}],"name":"TokenBurn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","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":"address","name":"mintAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"batchMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"deleteContractAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"emergencyPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_multisig","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"string","name":"_baseURI","type":"string"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_fees","type":"uint256"},{"internalType":"uint256[]","name":"tiersNumbers","type":"uint256[]"},{"internalType":"uint256[]","name":"limitPerWalletPerTier","type":"uint256[]"},{"internalType":"uint256[]","name":"starts","type":"uint256[]"},{"internalType":"uint256[]","name":"ends","type":"uint256[]"},{"internalType":"bytes32[]","name":"merkleRoots","type":"bytes32[]"},{"internalType":"bool[]","name":"isTierPublic","type":"bool[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPartnerSharePct","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metaDataExt","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintedPerAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multisig","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"address","name":"partnerWallet","type":"address"}],"name":"partnerActivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"partnerWallet","type":"address"},{"internalType":"uint256","name":"_sharePct","type":"uint256"}],"name":"partnerAdd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"partnerWallet","type":"address"}],"name":"partnerDeactivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"partnerWallet","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"partnerSetTokenIdMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"mintAddress","type":"address"},{"internalType":"uint256","name":"tierNo","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"address","name":"partnerWallet","type":"address"}],"name":"partnerTierMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"partnerWallet","type":"address"},{"internalType":"uint256","name":"_sharePct","type":"uint256"}],"name":"partnerUpdateSharePct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"partners","outputs":[{"internalType":"address","name":"walletAddress","type":"address"},{"internalType":"uint256","name":"sharePct","type":"uint256"},{"internalType":"bool","name":"isActive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"partnersSupply","outputs":[{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"uint256","name":"total","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"_address","type":"address"}],"name":"setContractAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setContractOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxShare","type":"uint256"}],"name":"setMaxPartnerSharePct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintFee","type":"uint256"}],"name":"setMintFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setMultiSig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"},{"internalType":"string","name":"_newExt","type":"string"}],"name":"setNftMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setPaymentToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fees","type":"uint256"},{"internalType":"uint256[]","name":"tiersNumbers","type":"uint256[]"},{"internalType":"uint256[]","name":"limitPerWalletPerTier","type":"uint256[]"},{"internalType":"uint256[]","name":"starts","type":"uint256[]"},{"internalType":"uint256[]","name":"ends","type":"uint256[]"},{"internalType":"bytes32[]","name":"merkleRoots","type":"bytes32[]"},{"internalType":"bool[]","name":"isTierPublic","type":"bool[]"}],"name":"setSaleConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"setSaleTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tierNo","type":"uint256"},{"internalType":"bool","name":"isPublic","type":"bool"}],"name":"setTierIsPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tierNo","type":"uint256"},{"internalType":"uint256","name":"limitPerWallet","type":"uint256"}],"name":"setTierLimitPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tierNo","type":"uint256"},{"internalType":"bytes32","name":"merkleRoots","type":"bytes32"}],"name":"setTierMerkleRoots","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tierNo","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_endTime","type":"uint256"}],"name":"setTierTimes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setTokenIdMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"supplyPerId","outputs":[{"internalType":"uint256","name":"max","type":"uint256"},{"internalType":"uint256","name":"total","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"mintAddress","type":"address"},{"internalType":"uint256","name":"tierNo","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"tierMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tiers","outputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"limitPerWalletPerTier","type":"uint256"},{"internalType":"bool","name":"isPublic","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

60a0604052600060809081526006906200001a9082620002ce565b50600a6013553480156200002d57600080fd5b50733cc6cdda760b79bafa08df41ecfa224f810dceb66001604051806020016040528060008152506200006681620001c560201b60201c565b5060016003556daaeb6d7670e522a718067333cd4e3b15620001b1578015620000ff57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b158015620000e057600080fd5b505af1158015620000f5573d6000803e3d6000fd5b50505050620001b1565b6001600160a01b03821615620001505760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401620000c5565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200019757600080fd5b505af1158015620001ac573d6000803e3d6000fd5b505050505b50620001bf905033620001d7565b6200039a565b6002620001d38282620002ce565b5050565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200025457607f821691505b6020821081036200027557634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002c957600081815260208120601f850160051c81016020861015620002a45750805b601f850160051c820191505b81811015620002c557828155600101620002b0565b5050505b505050565b81516001600160401b03811115620002ea57620002ea62000229565b6200030281620002fb84546200023f565b846200027b565b602080601f8311600181146200033a5760008415620003215750858301515b600019600386901b1c1916600185901b178555620002c5565b600085815260208120601f198616915b828110156200036b578886015182559484019460019091019084016200034a565b50858210156200038a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61480080620003aa6000396000f3fe60806040526004361061038b5760003560e01c80636c0360eb116101dc578063c3bea60d11610102578063e8f6940e116100a0578063f242432a1161006f578063f242432a14610b77578063f2fde38b14610b97578063f6e3bfb414610bb7578063fc0c546a14610bd757600080fd5b8063e8f6940e14610ace578063e985e9c514610aee578063eddd0d9c14610b37578063f0f4426014610b5757600080fd5b8063cdc683df116100dc578063cdc683df14610a4e578063d445b97814610a6e578063e0c7c3fd14610a9b578063e36df85614610abb57600080fd5b8063c3bea60d146109e4578063c84c038714610a18578063cd7cdd0414610a2e57600080fd5b80638da5cb5b1161017a578063a22cb46511610149578063a22cb4651461096f578063b67c17ec1461098f578063bb9744ce146109af578063c2308ebe146109c457600080fd5b80638da5cb5b146108b957806392ca185c146108d757806395c33652146108ea57806395d89b411461095a57600080fd5b80637758e5de116101b65780637758e5de1461080f57806377f9e5fa146108635780637dcce402146108835780638283de73146108a357600080fd5b80636c0360eb146107c5578063715018a6146107da578063727d03cc146107ef57600080fd5b806333ef9fd3116102c157806348b31f681161025f57806360eb418e1161022e57806360eb418e1461075057806365f31087146107705780636a326ab1146107905780636b870e44146107b057600080fd5b806348b31f68146106c95780634e1273f4146106e95780635c975abb146107165780635fe7dcf41461073057600080fd5b806343508b051161029b57806343508b05146106435780634626402b146106635780634783c35b1461068357806348288325146106a957600080fd5b806333ef9fd3146105c95780633db0f8ab146105e957806341f434341461060957600080fd5b806318160ddd1161032e57806324d7806c1161030857806324d7806c14610539578063284d30ef146105695780632d170187146105895780632eb2c2d6146105a957600080fd5b806318160ddd146104e15780631e45c140146104f7578063207441311461051957600080fd5b806306fdde031161036a57806306fdde031461046a5780630e89341c1461048c57806313966db5146104ac578063158ef93e146104c257600080fd5b8062fdd58e1461039057806301ffc9a7146103c3578063039af9eb146103f3575b600080fd5b34801561039c57600080fd5b506103b06103ab3660046136ac565b610bf7565b6040519081526020015b60405180910390f35b3480156103cf57600080fd5b506103e36103de3660046136ec565b610c90565b60405190151581526020016103ba565b3480156103ff57600080fd5b5061044061040e366004613709565b600f60205260009081526040902080546001820154600283015460038401546004909401549293919290919060ff1685565b6040805195865260208601949094529284019190915260608301521515608082015260a0016103ba565b34801561047657600080fd5b5061047f610ce0565b6040516103ba9190613772565b34801561049857600080fd5b5061047f6104a7366004613709565b610d6e565b3480156104b857600080fd5b506103b060095481565b3480156104ce57600080fd5b50600c546103e390610100900460ff1681565b3480156104ed57600080fd5b506103b0600b5481565b34801561050357600080fd5b50610517610512366004613785565b610e03565b005b34801561052557600080fd5b506105176105343660046137a0565b610e17565b34801561054557600080fd5b506103e3610554366004613785565b60156020526000908152604090205460ff1681565b34801561057557600080fd5b50610517610584366004613785565b610e66565b34801561059557600080fd5b506105176105a43660046137a0565b610e9b565b3480156105b557600080fd5b506105176105c436600461390b565b610ebb565b3480156105d557600080fd5b506105176105e4366004613a31565b610eea565b3480156105f557600080fd5b50610517610604366004613c06565b6111d1565b34801561061557600080fd5b5061062b6daaeb6d7670e522a718067333cd4e81565b6040516001600160a01b0390911681526020016103ba565b34801561064f57600080fd5b5061051761065e3660046136ac565b61130c565b34801561066f57600080fd5b50600e5461062b906001600160a01b031681565b34801561068f57600080fd5b50600c5461062b906201000090046001600160a01b031681565b3480156106b557600080fd5b506105176106c43660046136ac565b6113fb565b3480156106d557600080fd5b506105176106e4366004613c79565b6114f3565b3480156106f557600080fd5b50610709610704366004613cdc565b61151c565b6040516103ba9190613dd7565b34801561072257600080fd5b50600c546103e39060ff1681565b34801561073c57600080fd5b5061051761074b366004613785565b611645565b34801561075c57600080fd5b5061051761076b366004613709565b6116ec565b34801561077c57600080fd5b5061051761078b3660046137a0565b6116fc565b34801561079c57600080fd5b506105176107ab366004613785565b61171c565b3480156107bc57600080fd5b5061047f611749565b3480156107d157600080fd5b5061047f611756565b3480156107e657600080fd5b50610517611763565b3480156107fb57600080fd5b5061051761080a366004613dea565b611777565b34801561081b57600080fd5b5061084e61082a3660046136ac565b60126020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016103ba565b34801561086f57600080fd5b5061051761087e366004613785565b6117c2565b34801561088f57600080fd5b5061051761089e3660046136ac565b6117ee565b3480156108af57600080fd5b506103b060135481565b3480156108c557600080fd5b506004546001600160a01b031661062b565b6105176108e5366004613e61565b611873565b3480156108f657600080fd5b50610933610905366004613785565b6011602052600090815260409020805460018201546002909201546001600160a01b03909116919060ff1683565b604080516001600160a01b03909416845260208401929092521515908201526060016103ba565b34801561096657600080fd5b5061047f611d0b565b34801561097b57600080fd5b5061051761098a366004613ed7565b611d18565b34801561099b57600080fd5b506105176109aa366004613f0e565b611d31565b3480156109bb57600080fd5b50610517611f25565b3480156109d057600080fd5b506105176109df366004613785565b6120fa565b3480156109f057600080fd5b5061084e6109ff366004613709565b6010602052600090815260409020805460019091015482565b348015610a2457600080fd5b506103b0600a5481565b348015610a3a57600080fd5b50610517610a49366004613709565b61219d565b348015610a5a57600080fd5b50610517610a69366004613785565b6121ad565b348015610a7a57600080fd5b506103b0610a89366004613785565b60146020526000908152604090205481565b348015610aa757600080fd5b50610517610ab636600461400d565b6121d6565b610517610ac9366004614032565b612204565b348015610ada57600080fd5b50610517610ae9366004614099565b612443565b348015610afa57600080fd5b506103e3610b093660046140b6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b348015610b4357600080fd5b50610517610b52366004613709565b612461565b348015610b6357600080fd5b50610517610b72366004613785565b612471565b348015610b8357600080fd5b50610517610b923660046140e9565b61249b565b348015610ba357600080fd5b50610517610bb2366004613785565b6124c2565b348015610bc357600080fd5b50610517610bd236600461414d565b612538565b348015610be357600080fd5b50600d5461062b906001600160a01b031681565b60006001600160a01b038316610c675760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b1480610cc157506001600160e01b031982166303a24d0760e21b145b80610c8a57506301ffc9a760e01b6001600160e01b0319831614610c8a565b60078054610ced90614180565b80601f0160208091040260200160405190810160405280929190818152602001828054610d1990614180565b8015610d665780601f10610d3b57610100808354040283529160200191610d66565b820191906000526020600020905b815481529060010190602001808311610d4957829003601f168201915b505050505081565b6060600060058054610d7f90614180565b905011610dce5760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e5572693a206261736520555249206973206e6f74207365740000006044820152606401610c5e565b60056006610ddb84612659565b604051602001610ded9392919061422d565b6040516020818303038152906040529050919050565b610e0b612761565b610e14816124c2565b50565b33610e21816127bb565b600083815260106020526040902060010154821015610e5357604051634ca64ea960e01b815260040160405180910390fd5b5060009182526010602052604090912055565b33610e708161283b565b50600c80546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b33610ea5816127bb565b506000918252600f602052604090912060030155565b846001600160a01b0381163314610ed557610ed533612894565b610ee2868686868661294d565b505050505050565b33610ef4816127bb565b600c54610100900460ff1615610f1c5760405162dc149f60e41b815260040160405180910390fd5b8451875114610f3e57604051631981307760e31b815260040160405180910390fd5b8351875114610f6057604051631981307760e31b815260040160405180910390fd5b8251875114610f8257604051631981307760e31b815260040160405180910390fd5b8551875114610fa457604051631981307760e31b815260040160405180910390fd5b8151875114610fc657604051631981307760e31b815260040160405180910390fd5b8c600c60026101000a8154816001600160a01b0302191690836001600160a01b031602179055508b600d60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508a6005908161102391906142a2565b50600988905560076110358b826142a2565b5060086110428a826142a2565b5060005b8751811015611173576040518060a0016040528087838151811061106c5761106c614361565b6020026020010151815260200186838151811061108b5761108b614361565b602002602001015181526020018583815181106110aa576110aa614361565b602002602001015181526020018883815181106110c9576110c9614361565b602002602001015181526020018483815181106110e8576110e8614361565b60200260200101511515815250600f60008a848151811061110b5761110b614361565b6020908102919091018101518252818101929092526040908101600020835181559183015160018301558201516002820155606082015160038201556080909101516004909101805460ff19169115159190911790558061116b8161438d565b915050611046565b50600560405161118391906143a6565b604051908190038120907f23c8c9488efebfd474e85a7956de6f39b17c7ab88502d42a623db2d8e382bbaa90600090a25050600c805461ff0019166101001790555050505050505050505050565b80518251146111f357604051631981307760e31b815260040160405180910390fd5b6001600160a01b038316331461121c5760405163469a130f60e01b815260040160405180910390fd5b60005b82518110156112a8576112658484838151811061123e5761123e614361565b602002602001015184848151811061125857611258614361565b6020026020010151612999565b81818151811061127757611277614361565b6020026020010151600b600082825461129091906143b2565b909155508190506112a08161438d565b91505061121f565b50826001600160a01b0316816040516112c191906143c5565b6040518091039020836040516112d791906143c5565b604051908190038120907f41ad9f7c8c922477d084ce523f52abf9b8a65b700581071dc5360e014bb4558e90600090a4505050565b611314612b1a565b3361131e816127bb565b600a54600090815260106020526040902080546001909101546113429084906143fb565b111561136157604051634ca64ea960e01b815260040160405180910390fd5b600a54600090815260106020526040812060010180548492906113859084906143fb565b925050819055506113a983600a548460405180602001604052806000815250612b66565b81600b60008282546113bb91906143fb565b909155505060405182906001600160a01b038516907f4b6dcabdeaeb0ec6121e2e093c11a74bd84844268dc1131fd8ba3b363a82d7e890600090a3505050565b336114058161283b565b6001600160a01b03838116600090815260116020526040902054161561143e5760405163682f8f3560e01b815260040160405180910390fd5b6001600160a01b03831661146557604051637ed8f7e560e01b815260040160405180910390fd5b601354821115611488576040516388d0463d60e01b815260040160405180910390fd5b50604080516060810182526001600160a01b03938416808252602080830194855260018385018181526000938452601190925293909120915182546001600160a01b031916951694909417815591519082015590516002909101805460ff1916911515919091179055565b336114fd816127bb565b600561150984826142a2565b50600661151683826142a2565b50505050565b606081518351146115815760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610c5e565b600083516001600160401b0381111561159c5761159c6137c2565b6040519080825280602002602001820160405280156115c5578160200160208202803683370190505b50905060005b845181101561163d576116108582815181106115e9576115e9614361565b602002602001015185838151811061160357611603614361565b6020026020010151610bf7565b82828151811061162257611622614361565b60209081029190910101526116368161438d565b90506115cb565b509392505050565b3361164f8161283b565b6001600160a01b038281166000908152601160205260409020541661168757604051631493ba8b60e01b815260040160405180910390fd5b6001600160a01b03821660009081526011602052604090206002015460ff16156116c4576040516379e4c90b60e01b815260040160405180910390fd5b506001600160a01b03166000908152601160205260409020600201805460ff19166001179055565b336116f6816127bb565b50600a55565b33611706816127bb565b506000918252600f602052604090912060020155565b336117268161283b565b50600d80546001600160a01b0319166001600160a01b0392909216919091179055565b60068054610ced90614180565b60058054610ced90614180565b61176b612761565b6117756000612ba0565b565b61177f612761565b61178a82601e6143fb565b8110156117aa576040516325ea869f60e21b815260040160405180910390fd5b6000928352600f602052604090922090815560010155565b6117ca612761565b6001600160a01b03166000908152601560205260409020805460ff19166001179055565b336117f88161283b565b6001600160a01b038381166000908152601160205260409020541661183057604051631493ba8b60e01b815260040160405180910390fd5b601354821115611853576040516388d0463d60e01b815260040160405180910390fd5b506001600160a01b03909116600090815260116020526040902060010155565b61187b612b1a565b60008460095461188b919061440e565b6001600160a01b03838116600090815260116020526040902054919250166118c657604051631493ba8b60e01b815260040160405180910390fd5b6001600160a01b03821660009081526011602052604090206002015460ff16611902576040516307eb208560e21b815260040160405180910390fd5b6001600160a01b0382166000908152601260209081526040808320600a5484529091529020805460019091015461193a9087906143fb565b111561195957604051634ca64ea960e01b815260040160405180910390fd5b60006119688888888888612bf2565b6119723387612d98565b600d546001600160a01b0316611ad3578134101561198f57600080fd5b6001600160a01b0383166000908152601160205260409020600101546064906119b8903461440e565b6119c2919061443b565b600e549091506001600160a01b031615611a5757600e5460009081906001600160a01b03166119f184346143b2565b604051600081818185875af1925050503d8060008114611a2d576040519150601f19603f3d011682016040523d82523d6000602084013e611a32565b606091505b509150915081611a545760405162461bcd60e51b8152600401610c5e9061444f565b50505b600080846001600160a01b03168360405160006040518083038185875af1925050503d8060008114611aa5576040519150601f19603f3d011682016040523d82523d6000602084013e611aaa565b606091505b509150915081611acc5760405162461bcd60e51b8152600401610c5e9061444f565b5050611c4a565b6001600160a01b038316600090815260116020526040902060010154606490611afc908461440e565b611b06919061443b565b600e549091506001600160a01b031615611bb957600d54600e546001600160a01b03918216916323b872dd91339116611b3f85876143b2565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015611b93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb7919061447d565b505b600d546001600160a01b03848116600090815260116020526040908190205490516323b872dd60e01b81523360048201529082166024820152604481018490529116906323b872dd906064016020604051808303816000875af1158015611c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c48919061447d565b505b6001600160a01b0383166000908152601260209081526040808320600a54845290915281206001018054889290611c829084906143fb565b92505081905550611ca688600a548860405180602001604052806000815250612b66565b85600b6000828254611cb891906143fb565b90915550506040516001600160a01b038481168252879189918b16907f778f9f5dc95fb3c15da9c6514cd13ad66b0d0397f82ab95492c8c51a1262dc3c9060200160405180910390a45050505050505050565b60088054610ced90614180565b81611d2281612894565b611d2c8383612e73565b505050565b33611d3b816127bb565b8451875114611d5d57604051631981307760e31b815260040160405180910390fd5b8351875114611d7f57604051631981307760e31b815260040160405180910390fd5b8251875114611da157604051631981307760e31b815260040160405180910390fd5b8551875114611dc357604051631981307760e31b815260040160405180910390fd5b8151875114611de557604051631981307760e31b815260040160405180910390fd5b600988905560005b8751811015611f1a576040518060a00160405280878381518110611e1357611e13614361565b60200260200101518152602001868381518110611e3257611e32614361565b60200260200101518152602001858381518110611e5157611e51614361565b60200260200101518152602001888381518110611e7057611e70614361565b60200260200101518152602001848381518110611e8f57611e8f614361565b60200260200101511515815250600f60008a8481518110611eb257611eb2614361565b6020908102919091018101518252818101929092526040908101600020835181559183015160018301558201516002820155606082015160038201556080909101516004909101805460ff191691151591909117905580611f128161438d565b915050611ded565b505050505050505050565b33611f2f8161283b565b600d546001600160a01b031661201257600e546001600160a01b0316600003611f9a5760405162461bcd60e51b815260206004820152601760248201527f496e76616c69642074726561737572792077616c6c65740000000000000000006044820152606401610c5e565b600e5460405160009182916001600160a01b039091169047908381818185875af1925050503d8060008114611feb576040519150601f19603f3d011682016040523d82523d6000602084013e611ff0565b606091505b509150915081611d2c5760405162461bcd60e51b8152600401610c5e9061444f565b600d546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561205b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207f919061449a565b600d54600e5460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af11580156120d6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d2c919061447d565b336121048161283b565b6001600160a01b038281166000908152601160205260409020541661213c57604051631493ba8b60e01b815260040160405180910390fd5b6001600160a01b03821660009081526011602052604090206002015460ff16612178576040516307eb208560e21b815260040160405180910390fd5b506001600160a01b03166000908152601160205260409020600201805460ff19169055565b336121a78161283b565b50601355565b6121b5612761565b6001600160a01b03166000908152601560205260409020805460ff19169055565b336121e0816127bb565b506000918252600f6020526040909120600401805460ff1916911515919091179055565b61220c612b1a565b60008360095461221c919061440e565b905061222b8686868686612bf2565b6122353385612d98565b600a54600090815260106020526040902080546001909101546122599086906143fb565b111561227857604051634ca64ea960e01b815260040160405180910390fd5b600a546000908152601060205260408120600101805486929061229c9084906143fb565b9091555050600e546001600160a01b0316156123cf57600d546001600160a01b031661234e57803410156122cf57600080fd5b600e5460405160009182916001600160a01b039091169034908381818185875af1925050503d8060008114612320576040519150601f19603f3d011682016040523d82523d6000602084013e612325565b606091505b5091509150816123475760405162461bcd60e51b8152600401610c5e9061444f565b50506123cf565b600d54600e546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018490529116906323b872dd906064016020604051808303816000875af11580156123a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123cd919061447d565b505b6123ec86600a548660405180602001604052806000815250612b66565b83600b60008282546123fe91906143fb565b9091555050604051849086906001600160a01b038916907f933135888b937ecee5d72a1a2048ba8e26249c79dd896c053e432a9de03677df90600090a4505050505050565b3361244d816127bb565b50600c805460ff1916911515919091179055565b3361246b816127bb565b50600955565b612479612761565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b846001600160a01b03811633146124b5576124b533612894565b610ee28686868686612e7e565b6124ca612761565b6001600160a01b03811661252f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c5e565b610e1481612ba0565b33612542816127bb565b6001600160a01b038481166000908152601160205260409020541661257a57604051631493ba8b60e01b815260040160405180910390fd5b6001600160a01b038416600090815260126020908152604080832086845290915281206001015490036125ea57604080518082018252838152600060208083018281526001600160a01b038916835260128252848320888452909152929020905181559051600190910155611516565b6001600160a01b038416600090815260126020908152604080832086845290915290206001015482101561263157604051634ca64ea960e01b815260040160405180910390fd5b506001600160a01b039290921660009081526012602090815260408083209383529290522055565b6060816000036126805750506040805180820190915260018152600360fc1b602082015290565b8160005b81156126aa57806126948161438d565b91506126a39050600a8361443b565b9150612684565b6000816001600160401b038111156126c4576126c46137c2565b6040519080825280601f01601f1916602001820160405280156126ee576020820181803683370190505b5090505b8415612759576127036001836143b2565b9150612710600a866144b3565b61271b9060306143fb565b60f81b81838151811061273057612730614361565b60200101906001600160f81b031916908160001a905350612752600a8661443b565b94506126f2565b949350505050565b6004546001600160a01b031633146117755760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c5e565b6001600160a01b03811660009081526015602052604090205460ff16806127ef57506004546001600160a01b038281169116145b610e145760405162461bcd60e51b815260206004820152601b60248201527f546869732061646472657373206973206e6f7420616c6c6f77656400000000006044820152606401610c5e565b600c546001600160a01b03828116620100009092041614610e145760405162461bcd60e51b8152602060048201526013602482015272139bdd08135d5b1d1a5cda59c81dd85b1b195d606a1b6044820152606401610c5e565b6daaeb6d7670e522a718067333cd4e3b15610e1457604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612901573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612925919061447d565b610e1457604051633b79c77360e21b81526001600160a01b0382166004820152602401610c5e565b6001600160a01b03851633148061296957506129698533610b09565b6129855760405162461bcd60e51b8152600401610c5e906144c7565b6129928585858585612ec3565b5050505050565b6001600160a01b0383166129fb5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610c5e565b336000612a0784613098565b90506000612a1484613098565b60408051602080820183526000918290528882528181528282206001600160a01b038b1683529052205490915084811015612a9d5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610c5e565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090525b50505050505050565b600c5460ff16156117755760405162461bcd60e51b815260206004820152601660248201527553616c652053746f707065642043757272656e746c7960501b6044820152606401610c5e565b6001600160a01b03841660009081526014602052604081208054849290612b8e9084906143fb565b909155506115169050848484846130e3565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008411612c1357604051636665c2b560e11b815260040160405180910390fd5b6000848152600f6020526040902054421015612c4257604051630a663f1b60e31b815260040160405180910390fd5b6000848152600f6020526040902060010154421115612c7457604051633345361560e21b815260040160405180910390fd5b6000848152600f602052604090206004015460ff16158015612d265750612d248282808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250898152600f6020908152604091829020600201549151919450612d0993508b92508a910160609290921b6bffffffffffffffffffffffff19168252601482015260340190565b604051602081830303815290604052805190602001206131ee565b155b15612d44576040516309bde33960e01b815260040160405180910390fd5b6000848152600f60209081526040808320600301546001600160a01b0389168452601490925290912054612d799085906143fb565b11156129925760405163303b682f60e01b815260040160405180910390fd5b600d546001600160a01b0316612dd95780600954612db6919061440e565b341015612dd55760405162461bcd60e51b8152600401610c5e90614516565b5050565b80600954612de7919061440e565b600d546040516370a0823160e01b81526001600160a01b038581166004830152909116906370a0823190602401602060405180830381865afa158015612e31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e55919061449a565b1015612dd55760405162461bcd60e51b8152600401610c5e90614516565b612dd5338383613204565b6001600160a01b038516331480612e9a5750612e9a8533610b09565b612eb65760405162461bcd60e51b8152600401610c5e906144c7565b61299285858585856132e4565b8151835114612f255760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610c5e565b6001600160a01b038416612f4b5760405162461bcd60e51b8152600401610c5e90614560565b3360005b8451811015613032576000858281518110612f6c57612f6c614361565b602002602001015190506000858381518110612f8a57612f8a614361565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015612fda5760405162461bcd60e51b8152600401610c5e906145a5565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906130179084906143fb565b925050819055505050508061302b9061438d565b9050612f4f565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516130829291906145ef565b60405180910390a4610ee2818787878787613403565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106130d2576130d2614361565b602090810291909101015292915050565b6001600160a01b0384166131435760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610c5e565b33600061314f85613098565b9050600061315c85613098565b90506000868152602081815260408083206001600160a01b038b1684529091528120805487929061318e9084906143fb565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612b118360008989898961355e565b6000826131fb8584613619565b14949350505050565b816001600160a01b0316836001600160a01b0316036132775760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610c5e565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03841661330a5760405162461bcd60e51b8152600401610c5e90614560565b33600061331685613098565b9050600061332385613098565b90506000868152602081815260408083206001600160a01b038c168452909152902054858110156133665760405162461bcd60e51b8152600401610c5e906145a5565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906133a39084906143fb565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611f1a848a8a8a8a8a61355e565b6001600160a01b0384163b15610ee25760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613447908990899088908890889060040161461d565b6020604051808303816000875af1925050508015613482575060408051601f3d908101601f1916820190925261347f9181019061467b565b60015b61352e5761348e614698565b806308c379a0036134c757506134a26146b4565b806134ad57506134c9565b8060405162461bcd60e51b8152600401610c5e9190613772565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610c5e565b6001600160e01b0319811663bc197c8160e01b14612b115760405162461bcd60e51b8152600401610c5e9061473d565b6001600160a01b0384163b15610ee25760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906135a29089908990889088908890600401614785565b6020604051808303816000875af19250505080156135dd575060408051601f3d908101601f191682019092526135da9181019061467b565b60015b6135e95761348e614698565b6001600160e01b0319811663f23a6e6160e01b14612b115760405162461bcd60e51b8152600401610c5e9061473d565b600081815b845181101561163d5761364a8286838151811061363d5761363d614361565b602002602001015161365e565b9150806136568161438d565b91505061361e565b600081831061367a576000828152602084905260409020613689565b60008381526020839052604090205b9392505050565b80356001600160a01b03811681146136a757600080fd5b919050565b600080604083850312156136bf57600080fd5b6136c883613690565b946020939093013593505050565b6001600160e01b031981168114610e1457600080fd5b6000602082840312156136fe57600080fd5b8135613689816136d6565b60006020828403121561371b57600080fd5b5035919050565b60005b8381101561373d578181015183820152602001613725565b50506000910152565b6000815180845261375e816020860160208601613722565b601f01601f19169290920160200192915050565b6020815260006136896020830184613746565b60006020828403121561379757600080fd5b61368982613690565b600080604083850312156137b357600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156137fd576137fd6137c2565b6040525050565b60006001600160401b0382111561381d5761381d6137c2565b5060051b60200190565b600082601f83011261383857600080fd5b8135602061384582613804565b60405161385282826137d8565b83815260059390931b850182019282810191508684111561387257600080fd5b8286015b8481101561388d5780358352918301918301613876565b509695505050505050565b600082601f8301126138a957600080fd5b81356001600160401b038111156138c2576138c26137c2565b6040516138d9601f8301601f1916602001826137d8565b8181528460208386010111156138ee57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561392357600080fd5b61392c86613690565b945061393a60208701613690565b935060408601356001600160401b038082111561395657600080fd5b61396289838a01613827565b9450606088013591508082111561397857600080fd5b61398489838a01613827565b9350608088013591508082111561399a57600080fd5b506139a788828901613898565b9150509295509295909350565b8015158114610e1457600080fd5b600082601f8301126139d357600080fd5b813560206139e082613804565b6040516139ed82826137d8565b83815260059390931b8501820192828101915086841115613a0d57600080fd5b8286015b8481101561388d578035613a24816139b4565b8352918301918301613a11565b6000806000806000806000806000806000806101808d8f031215613a5457600080fd5b613a5d8d613690565b9b50613a6b60208e01613690565b9a506001600160401b0360408e01351115613a8557600080fd5b613a958e60408f01358f01613898565b99506001600160401b0360608e01351115613aaf57600080fd5b613abf8e60608f01358f01613898565b98506001600160401b0360808e01351115613ad957600080fd5b613ae98e60808f01358f01613898565b975060a08d013596506001600160401b0360c08e01351115613b0a57600080fd5b613b1a8e60c08f01358f01613827565b95506001600160401b0360e08e01351115613b3457600080fd5b613b448e60e08f01358f01613827565b94506001600160401b036101008e01351115613b5f57600080fd5b613b708e6101008f01358f01613827565b93506001600160401b036101208e01351115613b8b57600080fd5b613b9c8e6101208f01358f01613827565b92506001600160401b036101408e01351115613bb757600080fd5b613bc88e6101408f01358f01613827565b91506001600160401b036101608e01351115613be357600080fd5b613bf48e6101608f01358f016139c2565b90509295989b509295989b509295989b565b600080600060608486031215613c1b57600080fd5b613c2484613690565b925060208401356001600160401b0380821115613c4057600080fd5b613c4c87838801613827565b93506040860135915080821115613c6257600080fd5b50613c6f86828701613827565b9150509250925092565b60008060408385031215613c8c57600080fd5b82356001600160401b0380821115613ca357600080fd5b613caf86838701613898565b93506020850135915080821115613cc557600080fd5b50613cd285828601613898565b9150509250929050565b60008060408385031215613cef57600080fd5b82356001600160401b0380821115613d0657600080fd5b818501915085601f830112613d1a57600080fd5b81356020613d2782613804565b604051613d3482826137d8565b83815260059390931b8501820192828101915089841115613d5457600080fd5b948201945b83861015613d7957613d6a86613690565b82529482019490820190613d59565b96505086013592505080821115613d8f57600080fd5b50613cd285828601613827565b600081518084526020808501945080840160005b83811015613dcc57815187529582019590820190600101613db0565b509495945050505050565b6020815260006136896020830184613d9c565b600080600060608486031215613dff57600080fd5b505081359360208301359350604090920135919050565b60008083601f840112613e2857600080fd5b5081356001600160401b03811115613e3f57600080fd5b6020830191508360208260051b8501011115613e5a57600080fd5b9250929050565b60008060008060008060a08789031215613e7a57600080fd5b613e8387613690565b9550602087013594506040870135935060608701356001600160401b03811115613eac57600080fd5b613eb889828a01613e16565b9094509250613ecb905060808801613690565b90509295509295509295565b60008060408385031215613eea57600080fd5b613ef383613690565b91506020830135613f03816139b4565b809150509250929050565b600080600080600080600060e0888a031215613f2957600080fd5b8735965060208801356001600160401b0380821115613f4757600080fd5b613f538b838c01613827565b975060408a0135915080821115613f6957600080fd5b613f758b838c01613827565b965060608a0135915080821115613f8b57600080fd5b613f978b838c01613827565b955060808a0135915080821115613fad57600080fd5b613fb98b838c01613827565b945060a08a0135915080821115613fcf57600080fd5b613fdb8b838c01613827565b935060c08a0135915080821115613ff157600080fd5b50613ffe8a828b016139c2565b91505092959891949750929550565b6000806040838503121561402057600080fd5b823591506020830135613f03816139b4565b60008060008060006080868803121561404a57600080fd5b61405386613690565b9450602086013593506040860135925060608601356001600160401b0381111561407c57600080fd5b61408888828901613e16565b969995985093965092949392505050565b6000602082840312156140ab57600080fd5b8135613689816139b4565b600080604083850312156140c957600080fd5b6140d283613690565b91506140e060208401613690565b90509250929050565b600080600080600060a0868803121561410157600080fd5b61410a86613690565b945061411860208701613690565b9350604086013592506060860135915060808601356001600160401b0381111561414157600080fd5b6139a788828901613898565b60008060006060848603121561416257600080fd5b61416b84613690565b95602085013595506040909401359392505050565b600181811c9082168061419457607f821691505b6020821081036141b457634e487b7160e01b600052602260045260246000fd5b50919050565b600081546141c781614180565b600182811680156141df57600181146141f457614223565b60ff1984168752821515830287019450614223565b8560005260208060002060005b8581101561421a5781548a820152908401908201614201565b50505082870194505b5050505092915050565b600061424261423c83876141ba565b856141ba565b8351614252818360208801613722565b0195945050505050565b601f821115611d2c57600081815260208120601f850160051c810160208610156142835750805b601f850160051c820191505b81811015610ee25782815560010161428f565b81516001600160401b038111156142bb576142bb6137c2565b6142cf816142c98454614180565b8461425c565b602080601f83116001811461430457600084156142ec5750858301515b600019600386901b1c1916600185901b178555610ee2565b600085815260208120601f198616915b8281101561433357888601518255948401946001909101908401614314565b50858210156143515787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161439f5761439f614377565b5060010190565b600061368982846141ba565b81810381811115610c8a57610c8a614377565b815160009082906020808601845b838110156143ef578151855293820193908201906001016143d3565b50929695505050505050565b80820180821115610c8a57610c8a614377565b8082028115828204841417610c8a57610c8a614377565b634e487b7160e01b600052601260045260246000fd5b60008261444a5761444a614425565b500490565b6020808252601490820152732330b4b632b2103a379039b2b7321022ba3432b960611b604082015260600190565b60006020828403121561448f57600080fd5b8151613689816139b4565b6000602082840312156144ac57600080fd5b5051919050565b6000826144c2576144c2614425565b500690565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b6020808252602a908201527f646f65736e2774206861766520656e6f75676820746f6b656e7320746f206d696040820152691b9d081d1a194813919560b21b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006146026040830185613d9c565b82810360208401526146148185613d9c565b95945050505050565b6001600160a01b0386811682528516602082015260a06040820181905260009061464990830186613d9c565b828103606084015261465b8186613d9c565b9050828103608084015261466f8185613746565b98975050505050505050565b60006020828403121561468d57600080fd5b8151613689816136d6565b600060033d11156146b15760046000803e5060005160e01c5b90565b600060443d10156146c25790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156146f157505050505090565b82850191508151818111156147095750505050505090565b843d87010160208285010111156147235750505050505090565b614732602082860101876137d8565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906147bf90830184613746565b97965050505050505056fea2646970667358221220a3acbf43e2f618e8ed66a693154e0db9bb5d60bc90cc11b915bd1d653a0f9c8064736f6c63430008130033

Deployed Bytecode

0x60806040526004361061038b5760003560e01c80636c0360eb116101dc578063c3bea60d11610102578063e8f6940e116100a0578063f242432a1161006f578063f242432a14610b77578063f2fde38b14610b97578063f6e3bfb414610bb7578063fc0c546a14610bd757600080fd5b8063e8f6940e14610ace578063e985e9c514610aee578063eddd0d9c14610b37578063f0f4426014610b5757600080fd5b8063cdc683df116100dc578063cdc683df14610a4e578063d445b97814610a6e578063e0c7c3fd14610a9b578063e36df85614610abb57600080fd5b8063c3bea60d146109e4578063c84c038714610a18578063cd7cdd0414610a2e57600080fd5b80638da5cb5b1161017a578063a22cb46511610149578063a22cb4651461096f578063b67c17ec1461098f578063bb9744ce146109af578063c2308ebe146109c457600080fd5b80638da5cb5b146108b957806392ca185c146108d757806395c33652146108ea57806395d89b411461095a57600080fd5b80637758e5de116101b65780637758e5de1461080f57806377f9e5fa146108635780637dcce402146108835780638283de73146108a357600080fd5b80636c0360eb146107c5578063715018a6146107da578063727d03cc146107ef57600080fd5b806333ef9fd3116102c157806348b31f681161025f57806360eb418e1161022e57806360eb418e1461075057806365f31087146107705780636a326ab1146107905780636b870e44146107b057600080fd5b806348b31f68146106c95780634e1273f4146106e95780635c975abb146107165780635fe7dcf41461073057600080fd5b806343508b051161029b57806343508b05146106435780634626402b146106635780634783c35b1461068357806348288325146106a957600080fd5b806333ef9fd3146105c95780633db0f8ab146105e957806341f434341461060957600080fd5b806318160ddd1161032e57806324d7806c1161030857806324d7806c14610539578063284d30ef146105695780632d170187146105895780632eb2c2d6146105a957600080fd5b806318160ddd146104e15780631e45c140146104f7578063207441311461051957600080fd5b806306fdde031161036a57806306fdde031461046a5780630e89341c1461048c57806313966db5146104ac578063158ef93e146104c257600080fd5b8062fdd58e1461039057806301ffc9a7146103c3578063039af9eb146103f3575b600080fd5b34801561039c57600080fd5b506103b06103ab3660046136ac565b610bf7565b6040519081526020015b60405180910390f35b3480156103cf57600080fd5b506103e36103de3660046136ec565b610c90565b60405190151581526020016103ba565b3480156103ff57600080fd5b5061044061040e366004613709565b600f60205260009081526040902080546001820154600283015460038401546004909401549293919290919060ff1685565b6040805195865260208601949094529284019190915260608301521515608082015260a0016103ba565b34801561047657600080fd5b5061047f610ce0565b6040516103ba9190613772565b34801561049857600080fd5b5061047f6104a7366004613709565b610d6e565b3480156104b857600080fd5b506103b060095481565b3480156104ce57600080fd5b50600c546103e390610100900460ff1681565b3480156104ed57600080fd5b506103b0600b5481565b34801561050357600080fd5b50610517610512366004613785565b610e03565b005b34801561052557600080fd5b506105176105343660046137a0565b610e17565b34801561054557600080fd5b506103e3610554366004613785565b60156020526000908152604090205460ff1681565b34801561057557600080fd5b50610517610584366004613785565b610e66565b34801561059557600080fd5b506105176105a43660046137a0565b610e9b565b3480156105b557600080fd5b506105176105c436600461390b565b610ebb565b3480156105d557600080fd5b506105176105e4366004613a31565b610eea565b3480156105f557600080fd5b50610517610604366004613c06565b6111d1565b34801561061557600080fd5b5061062b6daaeb6d7670e522a718067333cd4e81565b6040516001600160a01b0390911681526020016103ba565b34801561064f57600080fd5b5061051761065e3660046136ac565b61130c565b34801561066f57600080fd5b50600e5461062b906001600160a01b031681565b34801561068f57600080fd5b50600c5461062b906201000090046001600160a01b031681565b3480156106b557600080fd5b506105176106c43660046136ac565b6113fb565b3480156106d557600080fd5b506105176106e4366004613c79565b6114f3565b3480156106f557600080fd5b50610709610704366004613cdc565b61151c565b6040516103ba9190613dd7565b34801561072257600080fd5b50600c546103e39060ff1681565b34801561073c57600080fd5b5061051761074b366004613785565b611645565b34801561075c57600080fd5b5061051761076b366004613709565b6116ec565b34801561077c57600080fd5b5061051761078b3660046137a0565b6116fc565b34801561079c57600080fd5b506105176107ab366004613785565b61171c565b3480156107bc57600080fd5b5061047f611749565b3480156107d157600080fd5b5061047f611756565b3480156107e657600080fd5b50610517611763565b3480156107fb57600080fd5b5061051761080a366004613dea565b611777565b34801561081b57600080fd5b5061084e61082a3660046136ac565b60126020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016103ba565b34801561086f57600080fd5b5061051761087e366004613785565b6117c2565b34801561088f57600080fd5b5061051761089e3660046136ac565b6117ee565b3480156108af57600080fd5b506103b060135481565b3480156108c557600080fd5b506004546001600160a01b031661062b565b6105176108e5366004613e61565b611873565b3480156108f657600080fd5b50610933610905366004613785565b6011602052600090815260409020805460018201546002909201546001600160a01b03909116919060ff1683565b604080516001600160a01b03909416845260208401929092521515908201526060016103ba565b34801561096657600080fd5b5061047f611d0b565b34801561097b57600080fd5b5061051761098a366004613ed7565b611d18565b34801561099b57600080fd5b506105176109aa366004613f0e565b611d31565b3480156109bb57600080fd5b50610517611f25565b3480156109d057600080fd5b506105176109df366004613785565b6120fa565b3480156109f057600080fd5b5061084e6109ff366004613709565b6010602052600090815260409020805460019091015482565b348015610a2457600080fd5b506103b0600a5481565b348015610a3a57600080fd5b50610517610a49366004613709565b61219d565b348015610a5a57600080fd5b50610517610a69366004613785565b6121ad565b348015610a7a57600080fd5b506103b0610a89366004613785565b60146020526000908152604090205481565b348015610aa757600080fd5b50610517610ab636600461400d565b6121d6565b610517610ac9366004614032565b612204565b348015610ada57600080fd5b50610517610ae9366004614099565b612443565b348015610afa57600080fd5b506103e3610b093660046140b6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b348015610b4357600080fd5b50610517610b52366004613709565b612461565b348015610b6357600080fd5b50610517610b72366004613785565b612471565b348015610b8357600080fd5b50610517610b923660046140e9565b61249b565b348015610ba357600080fd5b50610517610bb2366004613785565b6124c2565b348015610bc357600080fd5b50610517610bd236600461414d565b612538565b348015610be357600080fd5b50600d5461062b906001600160a01b031681565b60006001600160a01b038316610c675760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b1480610cc157506001600160e01b031982166303a24d0760e21b145b80610c8a57506301ffc9a760e01b6001600160e01b0319831614610c8a565b60078054610ced90614180565b80601f0160208091040260200160405190810160405280929190818152602001828054610d1990614180565b8015610d665780601f10610d3b57610100808354040283529160200191610d66565b820191906000526020600020905b815481529060010190602001808311610d4957829003601f168201915b505050505081565b6060600060058054610d7f90614180565b905011610dce5760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e5572693a206261736520555249206973206e6f74207365740000006044820152606401610c5e565b60056006610ddb84612659565b604051602001610ded9392919061422d565b6040516020818303038152906040529050919050565b610e0b612761565b610e14816124c2565b50565b33610e21816127bb565b600083815260106020526040902060010154821015610e5357604051634ca64ea960e01b815260040160405180910390fd5b5060009182526010602052604090912055565b33610e708161283b565b50600c80546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b33610ea5816127bb565b506000918252600f602052604090912060030155565b846001600160a01b0381163314610ed557610ed533612894565b610ee2868686868661294d565b505050505050565b33610ef4816127bb565b600c54610100900460ff1615610f1c5760405162dc149f60e41b815260040160405180910390fd5b8451875114610f3e57604051631981307760e31b815260040160405180910390fd5b8351875114610f6057604051631981307760e31b815260040160405180910390fd5b8251875114610f8257604051631981307760e31b815260040160405180910390fd5b8551875114610fa457604051631981307760e31b815260040160405180910390fd5b8151875114610fc657604051631981307760e31b815260040160405180910390fd5b8c600c60026101000a8154816001600160a01b0302191690836001600160a01b031602179055508b600d60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508a6005908161102391906142a2565b50600988905560076110358b826142a2565b5060086110428a826142a2565b5060005b8751811015611173576040518060a0016040528087838151811061106c5761106c614361565b6020026020010151815260200186838151811061108b5761108b614361565b602002602001015181526020018583815181106110aa576110aa614361565b602002602001015181526020018883815181106110c9576110c9614361565b602002602001015181526020018483815181106110e8576110e8614361565b60200260200101511515815250600f60008a848151811061110b5761110b614361565b6020908102919091018101518252818101929092526040908101600020835181559183015160018301558201516002820155606082015160038201556080909101516004909101805460ff19169115159190911790558061116b8161438d565b915050611046565b50600560405161118391906143a6565b604051908190038120907f23c8c9488efebfd474e85a7956de6f39b17c7ab88502d42a623db2d8e382bbaa90600090a25050600c805461ff0019166101001790555050505050505050505050565b80518251146111f357604051631981307760e31b815260040160405180910390fd5b6001600160a01b038316331461121c5760405163469a130f60e01b815260040160405180910390fd5b60005b82518110156112a8576112658484838151811061123e5761123e614361565b602002602001015184848151811061125857611258614361565b6020026020010151612999565b81818151811061127757611277614361565b6020026020010151600b600082825461129091906143b2565b909155508190506112a08161438d565b91505061121f565b50826001600160a01b0316816040516112c191906143c5565b6040518091039020836040516112d791906143c5565b604051908190038120907f41ad9f7c8c922477d084ce523f52abf9b8a65b700581071dc5360e014bb4558e90600090a4505050565b611314612b1a565b3361131e816127bb565b600a54600090815260106020526040902080546001909101546113429084906143fb565b111561136157604051634ca64ea960e01b815260040160405180910390fd5b600a54600090815260106020526040812060010180548492906113859084906143fb565b925050819055506113a983600a548460405180602001604052806000815250612b66565b81600b60008282546113bb91906143fb565b909155505060405182906001600160a01b038516907f4b6dcabdeaeb0ec6121e2e093c11a74bd84844268dc1131fd8ba3b363a82d7e890600090a3505050565b336114058161283b565b6001600160a01b03838116600090815260116020526040902054161561143e5760405163682f8f3560e01b815260040160405180910390fd5b6001600160a01b03831661146557604051637ed8f7e560e01b815260040160405180910390fd5b601354821115611488576040516388d0463d60e01b815260040160405180910390fd5b50604080516060810182526001600160a01b03938416808252602080830194855260018385018181526000938452601190925293909120915182546001600160a01b031916951694909417815591519082015590516002909101805460ff1916911515919091179055565b336114fd816127bb565b600561150984826142a2565b50600661151683826142a2565b50505050565b606081518351146115815760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610c5e565b600083516001600160401b0381111561159c5761159c6137c2565b6040519080825280602002602001820160405280156115c5578160200160208202803683370190505b50905060005b845181101561163d576116108582815181106115e9576115e9614361565b602002602001015185838151811061160357611603614361565b6020026020010151610bf7565b82828151811061162257611622614361565b60209081029190910101526116368161438d565b90506115cb565b509392505050565b3361164f8161283b565b6001600160a01b038281166000908152601160205260409020541661168757604051631493ba8b60e01b815260040160405180910390fd5b6001600160a01b03821660009081526011602052604090206002015460ff16156116c4576040516379e4c90b60e01b815260040160405180910390fd5b506001600160a01b03166000908152601160205260409020600201805460ff19166001179055565b336116f6816127bb565b50600a55565b33611706816127bb565b506000918252600f602052604090912060020155565b336117268161283b565b50600d80546001600160a01b0319166001600160a01b0392909216919091179055565b60068054610ced90614180565b60058054610ced90614180565b61176b612761565b6117756000612ba0565b565b61177f612761565b61178a82601e6143fb565b8110156117aa576040516325ea869f60e21b815260040160405180910390fd5b6000928352600f602052604090922090815560010155565b6117ca612761565b6001600160a01b03166000908152601560205260409020805460ff19166001179055565b336117f88161283b565b6001600160a01b038381166000908152601160205260409020541661183057604051631493ba8b60e01b815260040160405180910390fd5b601354821115611853576040516388d0463d60e01b815260040160405180910390fd5b506001600160a01b03909116600090815260116020526040902060010155565b61187b612b1a565b60008460095461188b919061440e565b6001600160a01b03838116600090815260116020526040902054919250166118c657604051631493ba8b60e01b815260040160405180910390fd5b6001600160a01b03821660009081526011602052604090206002015460ff16611902576040516307eb208560e21b815260040160405180910390fd5b6001600160a01b0382166000908152601260209081526040808320600a5484529091529020805460019091015461193a9087906143fb565b111561195957604051634ca64ea960e01b815260040160405180910390fd5b60006119688888888888612bf2565b6119723387612d98565b600d546001600160a01b0316611ad3578134101561198f57600080fd5b6001600160a01b0383166000908152601160205260409020600101546064906119b8903461440e565b6119c2919061443b565b600e549091506001600160a01b031615611a5757600e5460009081906001600160a01b03166119f184346143b2565b604051600081818185875af1925050503d8060008114611a2d576040519150601f19603f3d011682016040523d82523d6000602084013e611a32565b606091505b509150915081611a545760405162461bcd60e51b8152600401610c5e9061444f565b50505b600080846001600160a01b03168360405160006040518083038185875af1925050503d8060008114611aa5576040519150601f19603f3d011682016040523d82523d6000602084013e611aaa565b606091505b509150915081611acc5760405162461bcd60e51b8152600401610c5e9061444f565b5050611c4a565b6001600160a01b038316600090815260116020526040902060010154606490611afc908461440e565b611b06919061443b565b600e549091506001600160a01b031615611bb957600d54600e546001600160a01b03918216916323b872dd91339116611b3f85876143b2565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015611b93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb7919061447d565b505b600d546001600160a01b03848116600090815260116020526040908190205490516323b872dd60e01b81523360048201529082166024820152604481018490529116906323b872dd906064016020604051808303816000875af1158015611c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c48919061447d565b505b6001600160a01b0383166000908152601260209081526040808320600a54845290915281206001018054889290611c829084906143fb565b92505081905550611ca688600a548860405180602001604052806000815250612b66565b85600b6000828254611cb891906143fb565b90915550506040516001600160a01b038481168252879189918b16907f778f9f5dc95fb3c15da9c6514cd13ad66b0d0397f82ab95492c8c51a1262dc3c9060200160405180910390a45050505050505050565b60088054610ced90614180565b81611d2281612894565b611d2c8383612e73565b505050565b33611d3b816127bb565b8451875114611d5d57604051631981307760e31b815260040160405180910390fd5b8351875114611d7f57604051631981307760e31b815260040160405180910390fd5b8251875114611da157604051631981307760e31b815260040160405180910390fd5b8551875114611dc357604051631981307760e31b815260040160405180910390fd5b8151875114611de557604051631981307760e31b815260040160405180910390fd5b600988905560005b8751811015611f1a576040518060a00160405280878381518110611e1357611e13614361565b60200260200101518152602001868381518110611e3257611e32614361565b60200260200101518152602001858381518110611e5157611e51614361565b60200260200101518152602001888381518110611e7057611e70614361565b60200260200101518152602001848381518110611e8f57611e8f614361565b60200260200101511515815250600f60008a8481518110611eb257611eb2614361565b6020908102919091018101518252818101929092526040908101600020835181559183015160018301558201516002820155606082015160038201556080909101516004909101805460ff191691151591909117905580611f128161438d565b915050611ded565b505050505050505050565b33611f2f8161283b565b600d546001600160a01b031661201257600e546001600160a01b0316600003611f9a5760405162461bcd60e51b815260206004820152601760248201527f496e76616c69642074726561737572792077616c6c65740000000000000000006044820152606401610c5e565b600e5460405160009182916001600160a01b039091169047908381818185875af1925050503d8060008114611feb576040519150601f19603f3d011682016040523d82523d6000602084013e611ff0565b606091505b509150915081611d2c5760405162461bcd60e51b8152600401610c5e9061444f565b600d546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561205b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207f919061449a565b600d54600e5460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af11580156120d6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d2c919061447d565b336121048161283b565b6001600160a01b038281166000908152601160205260409020541661213c57604051631493ba8b60e01b815260040160405180910390fd5b6001600160a01b03821660009081526011602052604090206002015460ff16612178576040516307eb208560e21b815260040160405180910390fd5b506001600160a01b03166000908152601160205260409020600201805460ff19169055565b336121a78161283b565b50601355565b6121b5612761565b6001600160a01b03166000908152601560205260409020805460ff19169055565b336121e0816127bb565b506000918252600f6020526040909120600401805460ff1916911515919091179055565b61220c612b1a565b60008360095461221c919061440e565b905061222b8686868686612bf2565b6122353385612d98565b600a54600090815260106020526040902080546001909101546122599086906143fb565b111561227857604051634ca64ea960e01b815260040160405180910390fd5b600a546000908152601060205260408120600101805486929061229c9084906143fb565b9091555050600e546001600160a01b0316156123cf57600d546001600160a01b031661234e57803410156122cf57600080fd5b600e5460405160009182916001600160a01b039091169034908381818185875af1925050503d8060008114612320576040519150601f19603f3d011682016040523d82523d6000602084013e612325565b606091505b5091509150816123475760405162461bcd60e51b8152600401610c5e9061444f565b50506123cf565b600d54600e546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018490529116906323b872dd906064016020604051808303816000875af11580156123a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123cd919061447d565b505b6123ec86600a548660405180602001604052806000815250612b66565b83600b60008282546123fe91906143fb565b9091555050604051849086906001600160a01b038916907f933135888b937ecee5d72a1a2048ba8e26249c79dd896c053e432a9de03677df90600090a4505050505050565b3361244d816127bb565b50600c805460ff1916911515919091179055565b3361246b816127bb565b50600955565b612479612761565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b846001600160a01b03811633146124b5576124b533612894565b610ee28686868686612e7e565b6124ca612761565b6001600160a01b03811661252f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c5e565b610e1481612ba0565b33612542816127bb565b6001600160a01b038481166000908152601160205260409020541661257a57604051631493ba8b60e01b815260040160405180910390fd5b6001600160a01b038416600090815260126020908152604080832086845290915281206001015490036125ea57604080518082018252838152600060208083018281526001600160a01b038916835260128252848320888452909152929020905181559051600190910155611516565b6001600160a01b038416600090815260126020908152604080832086845290915290206001015482101561263157604051634ca64ea960e01b815260040160405180910390fd5b506001600160a01b039290921660009081526012602090815260408083209383529290522055565b6060816000036126805750506040805180820190915260018152600360fc1b602082015290565b8160005b81156126aa57806126948161438d565b91506126a39050600a8361443b565b9150612684565b6000816001600160401b038111156126c4576126c46137c2565b6040519080825280601f01601f1916602001820160405280156126ee576020820181803683370190505b5090505b8415612759576127036001836143b2565b9150612710600a866144b3565b61271b9060306143fb565b60f81b81838151811061273057612730614361565b60200101906001600160f81b031916908160001a905350612752600a8661443b565b94506126f2565b949350505050565b6004546001600160a01b031633146117755760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c5e565b6001600160a01b03811660009081526015602052604090205460ff16806127ef57506004546001600160a01b038281169116145b610e145760405162461bcd60e51b815260206004820152601b60248201527f546869732061646472657373206973206e6f7420616c6c6f77656400000000006044820152606401610c5e565b600c546001600160a01b03828116620100009092041614610e145760405162461bcd60e51b8152602060048201526013602482015272139bdd08135d5b1d1a5cda59c81dd85b1b195d606a1b6044820152606401610c5e565b6daaeb6d7670e522a718067333cd4e3b15610e1457604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612901573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612925919061447d565b610e1457604051633b79c77360e21b81526001600160a01b0382166004820152602401610c5e565b6001600160a01b03851633148061296957506129698533610b09565b6129855760405162461bcd60e51b8152600401610c5e906144c7565b6129928585858585612ec3565b5050505050565b6001600160a01b0383166129fb5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610c5e565b336000612a0784613098565b90506000612a1484613098565b60408051602080820183526000918290528882528181528282206001600160a01b038b1683529052205490915084811015612a9d5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610c5e565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090525b50505050505050565b600c5460ff16156117755760405162461bcd60e51b815260206004820152601660248201527553616c652053746f707065642043757272656e746c7960501b6044820152606401610c5e565b6001600160a01b03841660009081526014602052604081208054849290612b8e9084906143fb565b909155506115169050848484846130e3565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008411612c1357604051636665c2b560e11b815260040160405180910390fd5b6000848152600f6020526040902054421015612c4257604051630a663f1b60e31b815260040160405180910390fd5b6000848152600f6020526040902060010154421115612c7457604051633345361560e21b815260040160405180910390fd5b6000848152600f602052604090206004015460ff16158015612d265750612d248282808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250898152600f6020908152604091829020600201549151919450612d0993508b92508a910160609290921b6bffffffffffffffffffffffff19168252601482015260340190565b604051602081830303815290604052805190602001206131ee565b155b15612d44576040516309bde33960e01b815260040160405180910390fd5b6000848152600f60209081526040808320600301546001600160a01b0389168452601490925290912054612d799085906143fb565b11156129925760405163303b682f60e01b815260040160405180910390fd5b600d546001600160a01b0316612dd95780600954612db6919061440e565b341015612dd55760405162461bcd60e51b8152600401610c5e90614516565b5050565b80600954612de7919061440e565b600d546040516370a0823160e01b81526001600160a01b038581166004830152909116906370a0823190602401602060405180830381865afa158015612e31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e55919061449a565b1015612dd55760405162461bcd60e51b8152600401610c5e90614516565b612dd5338383613204565b6001600160a01b038516331480612e9a5750612e9a8533610b09565b612eb65760405162461bcd60e51b8152600401610c5e906144c7565b61299285858585856132e4565b8151835114612f255760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610c5e565b6001600160a01b038416612f4b5760405162461bcd60e51b8152600401610c5e90614560565b3360005b8451811015613032576000858281518110612f6c57612f6c614361565b602002602001015190506000858381518110612f8a57612f8a614361565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015612fda5760405162461bcd60e51b8152600401610c5e906145a5565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906130179084906143fb565b925050819055505050508061302b9061438d565b9050612f4f565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516130829291906145ef565b60405180910390a4610ee2818787878787613403565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106130d2576130d2614361565b602090810291909101015292915050565b6001600160a01b0384166131435760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610c5e565b33600061314f85613098565b9050600061315c85613098565b90506000868152602081815260408083206001600160a01b038b1684529091528120805487929061318e9084906143fb565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612b118360008989898961355e565b6000826131fb8584613619565b14949350505050565b816001600160a01b0316836001600160a01b0316036132775760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610c5e565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03841661330a5760405162461bcd60e51b8152600401610c5e90614560565b33600061331685613098565b9050600061332385613098565b90506000868152602081815260408083206001600160a01b038c168452909152902054858110156133665760405162461bcd60e51b8152600401610c5e906145a5565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906133a39084906143fb565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611f1a848a8a8a8a8a61355e565b6001600160a01b0384163b15610ee25760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613447908990899088908890889060040161461d565b6020604051808303816000875af1925050508015613482575060408051601f3d908101601f1916820190925261347f9181019061467b565b60015b61352e5761348e614698565b806308c379a0036134c757506134a26146b4565b806134ad57506134c9565b8060405162461bcd60e51b8152600401610c5e9190613772565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610c5e565b6001600160e01b0319811663bc197c8160e01b14612b115760405162461bcd60e51b8152600401610c5e9061473d565b6001600160a01b0384163b15610ee25760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906135a29089908990889088908890600401614785565b6020604051808303816000875af19250505080156135dd575060408051601f3d908101601f191682019092526135da9181019061467b565b60015b6135e95761348e614698565b6001600160e01b0319811663f23a6e6160e01b14612b115760405162461bcd60e51b8152600401610c5e9061473d565b600081815b845181101561163d5761364a8286838151811061363d5761363d614361565b602002602001015161365e565b9150806136568161438d565b91505061361e565b600081831061367a576000828152602084905260409020613689565b60008381526020839052604090205b9392505050565b80356001600160a01b03811681146136a757600080fd5b919050565b600080604083850312156136bf57600080fd5b6136c883613690565b946020939093013593505050565b6001600160e01b031981168114610e1457600080fd5b6000602082840312156136fe57600080fd5b8135613689816136d6565b60006020828403121561371b57600080fd5b5035919050565b60005b8381101561373d578181015183820152602001613725565b50506000910152565b6000815180845261375e816020860160208601613722565b601f01601f19169290920160200192915050565b6020815260006136896020830184613746565b60006020828403121561379757600080fd5b61368982613690565b600080604083850312156137b357600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156137fd576137fd6137c2565b6040525050565b60006001600160401b0382111561381d5761381d6137c2565b5060051b60200190565b600082601f83011261383857600080fd5b8135602061384582613804565b60405161385282826137d8565b83815260059390931b850182019282810191508684111561387257600080fd5b8286015b8481101561388d5780358352918301918301613876565b509695505050505050565b600082601f8301126138a957600080fd5b81356001600160401b038111156138c2576138c26137c2565b6040516138d9601f8301601f1916602001826137d8565b8181528460208386010111156138ee57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561392357600080fd5b61392c86613690565b945061393a60208701613690565b935060408601356001600160401b038082111561395657600080fd5b61396289838a01613827565b9450606088013591508082111561397857600080fd5b61398489838a01613827565b9350608088013591508082111561399a57600080fd5b506139a788828901613898565b9150509295509295909350565b8015158114610e1457600080fd5b600082601f8301126139d357600080fd5b813560206139e082613804565b6040516139ed82826137d8565b83815260059390931b8501820192828101915086841115613a0d57600080fd5b8286015b8481101561388d578035613a24816139b4565b8352918301918301613a11565b6000806000806000806000806000806000806101808d8f031215613a5457600080fd5b613a5d8d613690565b9b50613a6b60208e01613690565b9a506001600160401b0360408e01351115613a8557600080fd5b613a958e60408f01358f01613898565b99506001600160401b0360608e01351115613aaf57600080fd5b613abf8e60608f01358f01613898565b98506001600160401b0360808e01351115613ad957600080fd5b613ae98e60808f01358f01613898565b975060a08d013596506001600160401b0360c08e01351115613b0a57600080fd5b613b1a8e60c08f01358f01613827565b95506001600160401b0360e08e01351115613b3457600080fd5b613b448e60e08f01358f01613827565b94506001600160401b036101008e01351115613b5f57600080fd5b613b708e6101008f01358f01613827565b93506001600160401b036101208e01351115613b8b57600080fd5b613b9c8e6101208f01358f01613827565b92506001600160401b036101408e01351115613bb757600080fd5b613bc88e6101408f01358f01613827565b91506001600160401b036101608e01351115613be357600080fd5b613bf48e6101608f01358f016139c2565b90509295989b509295989b509295989b565b600080600060608486031215613c1b57600080fd5b613c2484613690565b925060208401356001600160401b0380821115613c4057600080fd5b613c4c87838801613827565b93506040860135915080821115613c6257600080fd5b50613c6f86828701613827565b9150509250925092565b60008060408385031215613c8c57600080fd5b82356001600160401b0380821115613ca357600080fd5b613caf86838701613898565b93506020850135915080821115613cc557600080fd5b50613cd285828601613898565b9150509250929050565b60008060408385031215613cef57600080fd5b82356001600160401b0380821115613d0657600080fd5b818501915085601f830112613d1a57600080fd5b81356020613d2782613804565b604051613d3482826137d8565b83815260059390931b8501820192828101915089841115613d5457600080fd5b948201945b83861015613d7957613d6a86613690565b82529482019490820190613d59565b96505086013592505080821115613d8f57600080fd5b50613cd285828601613827565b600081518084526020808501945080840160005b83811015613dcc57815187529582019590820190600101613db0565b509495945050505050565b6020815260006136896020830184613d9c565b600080600060608486031215613dff57600080fd5b505081359360208301359350604090920135919050565b60008083601f840112613e2857600080fd5b5081356001600160401b03811115613e3f57600080fd5b6020830191508360208260051b8501011115613e5a57600080fd5b9250929050565b60008060008060008060a08789031215613e7a57600080fd5b613e8387613690565b9550602087013594506040870135935060608701356001600160401b03811115613eac57600080fd5b613eb889828a01613e16565b9094509250613ecb905060808801613690565b90509295509295509295565b60008060408385031215613eea57600080fd5b613ef383613690565b91506020830135613f03816139b4565b809150509250929050565b600080600080600080600060e0888a031215613f2957600080fd5b8735965060208801356001600160401b0380821115613f4757600080fd5b613f538b838c01613827565b975060408a0135915080821115613f6957600080fd5b613f758b838c01613827565b965060608a0135915080821115613f8b57600080fd5b613f978b838c01613827565b955060808a0135915080821115613fad57600080fd5b613fb98b838c01613827565b945060a08a0135915080821115613fcf57600080fd5b613fdb8b838c01613827565b935060c08a0135915080821115613ff157600080fd5b50613ffe8a828b016139c2565b91505092959891949750929550565b6000806040838503121561402057600080fd5b823591506020830135613f03816139b4565b60008060008060006080868803121561404a57600080fd5b61405386613690565b9450602086013593506040860135925060608601356001600160401b0381111561407c57600080fd5b61408888828901613e16565b969995985093965092949392505050565b6000602082840312156140ab57600080fd5b8135613689816139b4565b600080604083850312156140c957600080fd5b6140d283613690565b91506140e060208401613690565b90509250929050565b600080600080600060a0868803121561410157600080fd5b61410a86613690565b945061411860208701613690565b9350604086013592506060860135915060808601356001600160401b0381111561414157600080fd5b6139a788828901613898565b60008060006060848603121561416257600080fd5b61416b84613690565b95602085013595506040909401359392505050565b600181811c9082168061419457607f821691505b6020821081036141b457634e487b7160e01b600052602260045260246000fd5b50919050565b600081546141c781614180565b600182811680156141df57600181146141f457614223565b60ff1984168752821515830287019450614223565b8560005260208060002060005b8581101561421a5781548a820152908401908201614201565b50505082870194505b5050505092915050565b600061424261423c83876141ba565b856141ba565b8351614252818360208801613722565b0195945050505050565b601f821115611d2c57600081815260208120601f850160051c810160208610156142835750805b601f850160051c820191505b81811015610ee25782815560010161428f565b81516001600160401b038111156142bb576142bb6137c2565b6142cf816142c98454614180565b8461425c565b602080601f83116001811461430457600084156142ec5750858301515b600019600386901b1c1916600185901b178555610ee2565b600085815260208120601f198616915b8281101561433357888601518255948401946001909101908401614314565b50858210156143515787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161439f5761439f614377565b5060010190565b600061368982846141ba565b81810381811115610c8a57610c8a614377565b815160009082906020808601845b838110156143ef578151855293820193908201906001016143d3565b50929695505050505050565b80820180821115610c8a57610c8a614377565b8082028115828204841417610c8a57610c8a614377565b634e487b7160e01b600052601260045260246000fd5b60008261444a5761444a614425565b500490565b6020808252601490820152732330b4b632b2103a379039b2b7321022ba3432b960611b604082015260600190565b60006020828403121561448f57600080fd5b8151613689816139b4565b6000602082840312156144ac57600080fd5b5051919050565b6000826144c2576144c2614425565b500690565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b6020808252602a908201527f646f65736e2774206861766520656e6f75676820746f6b656e7320746f206d696040820152691b9d081d1a194813919560b21b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006146026040830185613d9c565b82810360208401526146148185613d9c565b95945050505050565b6001600160a01b0386811682528516602082015260a06040820181905260009061464990830186613d9c565b828103606084015261465b8186613d9c565b9050828103608084015261466f8185613746565b98975050505050505050565b60006020828403121561468d57600080fd5b8151613689816136d6565b600060033d11156146b15760046000803e5060005160e01c5b90565b600060443d10156146c25790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156146f157505050505090565b82850191508151818111156147095750505050505090565b843d87010160208285010111156147235750505050505090565b614732602082860101876137d8565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906147bf90830184613746565b97965050505050505056fea2646970667358221220a3acbf43e2f618e8ed66a693154e0db9bb5d60bc90cc11b915bd1d653a0f9c8064736f6c63430008130033

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.