ETH Price: $2,399.18 (-3.51%)

Contract

0x79436b6E87b7360B72A2BcAFEA2367581697ba08
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040191309792024-02-01 3:41:11245 days ago1706758871IN
 Create: Packets
0 ETH0.1002662320.4251405

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Packets

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 37 : Packets.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "erc721a-upgradeable/contracts/extensions/IERC721ABurnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "operator-filter-registry/src/upgradeable/DefaultOperatorFiltererUpgradeable.sol";
import "@chocolate-factory/contracts/supply/ReservedSupplyUpgradeable.sol";
import "@chocolate-factory/contracts/admin-manager/AdminManagerUpgradable.sol";
import "@chocolate-factory/contracts/uri-manager/UriManagerUpgradable.sol";
import "@chocolate-factory/contracts/price/PriceUpgradable.sol";
import "@chocolate-factory/contracts/royalties/RoyaltiesUpgradable.sol";
import "@chocolate-factory/contracts/balance-limit/BalanceLimitUpgradable.sol";
import "@chocolate-factory/contracts/signer/SignerUpgradeable.sol";
import "./interfaces/ICards.sol";
import "./interfaces/IRandomizer.sol";

contract Packets is 
    Initializable, 
    ERC1155Upgradeable, 
    OwnableUpgradeable,     
    AdminManagerUpgradable,
    UriManagerUpgradable,
    PriceUpgradable,
    DefaultOperatorFiltererUpgradeable,
    RoyaltiesUpgradable,
    BalanceLimitUpgradable,
    SignerUpgradeable
{
    uint256 public activeIndex;
    mapping(uint256 => uint256) public idToCards;
    mapping(uint256 => uint256) private _totalSupply;
    
    event PacketOpened(address indexed account, uint256 cardId, uint256 startingId, uint256 total, uint256 timestamp);
    event QuillsBurned(address indexed account, uint256 amount, uint256 timestamp);
    event GbabiesBurned(address indexed account, uint256 amount, uint256 timestamp);

    function initialize(
        string memory prefix_,
        string memory suffix_,
        address recipient, 
        uint256 amount,
        string memory name, 
        string memory version, 
        address _signer
    ) public initializer {
        __AdminManager_init_unchained();
        __UriManager_init_unchained(prefix_,suffix_);
        __ERC1155_init_unchained("");
        __Price_init_unchained();
        __DefaultOperatorFilterer_init();
        __Royalties_init_unchained(recipient, amount);
        __Signer_init_unchained(name, version, _signer);
        
        _isOG[3] = true;
        _isOG[14] = true;
        _isOG[19] = true;
        _isOG[23] = true;
        _isOG[24] = true;
        _isOG[25] = true;
        _isOG[27] = true;
        _isOG[29] = true;
        _isOG[39] = true;
        _isOG[51] = true;
        _isOG[61] = true;
        _isOG[66] = true;
        _isOG[69] = true;
        _isOG[73] = true;
        _isOG[80] = true;
        _isOG[90] = true;
        _isOG[96] = true;
        _isOG[129] = true;
        _isOG[130] = true;
        _isOG[138] = true;
        _isOG[140] = true;
        _isOG[168] = true;
        _isOG[169] = true;
        _isOG[171] = true;
        _isOG[176] = true;
        _isOG[191] = true;
        _isOG[193] = true;
        _isOG[194] = true;
        _isOG[201] = true;
        _isOG[210] = true;
        _isOG[216] = true;
        _isOG[258] = true;
        _isOG[262] = true;
        _isOG[273] = true;
        _isOG[299] = true;
        _isOG[301] = true;
        _isOG[303] = true;
        _isOG[309] = true;
        _isOG[311] = true;
        _isOG[323] = true;
        _isOG[327] = true;
        _isOG[336] = true;
        _isOG[342] = true;
        _isOG[344] = true;
        _isOG[345] = true;
        _isOG[353] = true;
        _isOG[355] = true;
        _isOG[361] = true;
        _isOG[382] = true;
        _isOG[394] = true;

        idToCards[1] = 5;
        idToCards[2] = 25;
        idToCards[3] = 100;
        idToCards[4] = 40;

        _totalSupply[1] = 5225;
        _totalSupply[2] = 1355;
        _totalSupply[3] = 400;
        _totalSupply[4] = 300;

        setPrice(1, 0.002 ether);
        discountPrice = 0.0018 ether;
        setPrice(2, 0.008 ether);
        setPrice(3, 0.0225 ether);
        setPrice(4, 0.0125 ether);        
    }

    IERC721ABurnableUpgradeable public gbabiesContract;
    IERC721ABurnableUpgradeable public quillContract;
    ICards public cardsContract;

    struct MintRequest {
        uint256 id;
        uint256 amount;
    }

    struct PresaleRequest {
        uint256 amount;
        address recipient;
    }

    mapping(address => uint256) private _minted;
    mapping(uint256 => bool) private _isOG;

    bytes32 private constant PRESALE_REQUEST_TYPE_HASH =
        keccak256(
            "PresaleRequest(uint256 amount,address recipient)"
        );

    function hashTypedData(
        PresaleRequest calldata request
    ) internal view returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    PRESALE_REQUEST_TYPE_HASH,
                    request.amount,
                    msg.sender
                )
            );
    }


    modifier verifyRequest(
        PresaleRequest calldata request,
        bytes calldata signature
    ) {
        bytes32 structHash = hashTypedData(request);
        bytes32 digest = _hashTypedDataV4(structHash);
        require(_verify(digest, signature), "Invalid Signature");
        _;
    }

    modifier isLive(uint256 index) {
        require(activeIndex == index, "Not live");
        _;
    }
    
    function setContracts(
        IERC721ABurnableUpgradeable gbabies,
        IERC721ABurnableUpgradeable quills,
        ICards cards
    ) external onlyAdmin {
        gbabiesContract = gbabies;
        quillContract = quills;
        cardsContract = cards;
    }

    function setActiveIndex(uint256 index) external onlyAdmin {
        activeIndex = index;
    }

    function burnMint(
        uint256[] calldata gbabies,
        uint256[] calldata quills
    )   external 
        payable
        isLive(1)
    {
        (uint256 gbabyTotal,) = _calculateGBabies(gbabies);
        (uint256 quillTotal, uint256 quillPrice) = _calculateQuills(quills);
        uint256 totalMints = gbabyTotal + quillTotal;
        _handleMint(msg.sender, totalMints, 1, quillPrice);
    }
    
    function presaleMint(
        PresaleRequest calldata request,
        MintRequest[] calldata mintRequests,
        bytes calldata signature
    )   external 
        payable 
        verifyRequest(request, signature) 
        isLive(1)
    {
        (
            uint256 totalPrice, 
            uint256 totalMints,
            uint256[] memory ids, 
            uint256[] memory amounts
        ) = _tallyMintRequests(mintRequests);
        require( _minted[msg.sender] + totalMints <= request.amount, "Cannot mint more than assigned.");

        _minted[msg.sender] += totalMints;
        _handleMints(msg.sender, ids, amounts, totalPrice);
    }

    function publicMint(
        MintRequest[] calldata mintRequests
    )   external 
        payable 
        isLive(2)
    {
        (
            uint256 totalPrice, 
            ,
            uint256[] memory ids, 
            uint256[] memory amounts
        ) = _tallyMintRequests(mintRequests);

        _handleMints(msg.sender, ids, amounts, totalPrice);
    }

    function _tallyMintRequests(
        MintRequest[] calldata mintRequests
    ) internal returns (uint256, uint256, uint256[] memory, uint256[] memory) {
        uint256 totalPrice;
        uint256 totalMints;
        uint256 length = mintRequests.length;

        uint256[] memory ids = new uint256[](length);
        uint256[] memory amounts = new uint256[](length);

        for(uint256 i; i < length; i++) {
            MintRequest memory mintRequest = mintRequests[i];
            uint256 id = mintRequest.id;
            require(id < 5 && id > 0, "Invalid ID");            
            uint256 amount = mintRequest.amount;
            _checkSupply(id, amount);
            uint256 priceValue = price(uint8(id));
            totalPrice += priceValue * amount;
            totalMints += amount;
            ids[i] = id;
            amounts[i] = amount;
        }
        require(totalMints > 0, "Zero");

        return (totalPrice, totalMints, ids, amounts);
    }

    function _checkSupply(uint256 id, uint256 amount) internal {
        require(_totalSupply[id] - amount >= 0, "Exceeds Supply");
        _totalSupply[id] -= amount;
    }

    function _calculateGBabies(
        uint256[] calldata ids
    ) internal returns (uint256, uint256) {
        uint256 length = ids.length;
        if(length == 0) return (0, 0);
        uint256 total;
        for(uint256 i; i < length; i++) {
            uint256 id = ids[i];
            require(gbabiesContract.ownerOf(id) == msg.sender, "Not Owner");
            if(_isOG[id]) {
                total += 2;
            } else {
                total++;
            }
            gbabiesContract.burn(id);
        }
        emit GbabiesBurned(msg.sender, total, block.timestamp);
        return (total, 0);
    }

    uint256 public discountPrice;

    function setDiscountPrice(uint256 _discountPrice) external onlyAdmin {
        discountPrice = _discountPrice;
    }

    function _calculateQuills(
        uint256[] memory ids
    ) internal returns (uint256, uint256) {
        uint256 length = ids.length;
        if(length == 0) return (0, 0);
        require(length % 2 == 0, "Must be divisble by 2");
        for(uint256 i; i < length; i++) {
            uint256 id = ids[i];
            require(quillContract.ownerOf(id) == msg.sender, "Invalid Owner");
            quillContract.transferFrom(msg.sender, deadAddress, id);
        }
        emit QuillsBurned(msg.sender, length, block.timestamp);
        uint256 amount = length / 2;
        return (amount, amount * discountPrice);
    }

    function setDeadAddress(address _deadAddress) external onlyAdmin {
        deadAddress = _deadAddress;
    }

    function adminMint(
        address[] calldata accounts_,
        uint256[] calldata amounts_,
        uint256 tokenId
    ) external onlyAdmin {
        uint256 accountsLength = accounts_.length;
        require(accountsLength == amounts_.length, "Admin mint: bad request");
        for (uint256 i; i < accountsLength; i++) {
            _internalMint(accounts_[i], amounts_[i], tokenId);
        }
    }

    function setSigner(address _signer) public onlyAdmin {
        signer = _signer;
    }

    function _internalMint(
        address account,
        uint256 amount,
        uint256 tokenId
    ) internal{
        _checkSupply(tokenId, amount);
        _mint(account, tokenId, amount, "");
    }

    function _handleMint(
        address account,
        uint256 amount,
        uint256 tokenId,
        uint256 totalCost
    ) internal {
        _internalMint(account, amount, tokenId);
        _handlePayment(totalCost);
    }


    function _handleMints(
        address account,
        uint256[] memory ids,
        uint256[] memory amounts,
        uint256 totalCost
    ) internal {
        _mintBatch(account, ids, amounts, "");
        _handlePayment(totalCost);
    }

    function uri(uint256 tokenId) public view override returns (string memory) {
        return _buildUri(tokenId);
    }

    function withdraw(uint256 amount) external onlyAdmin {
        AddressUpgradeable.sendValue(payable (msg.sender), amount);
    }

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

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

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

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override (ERC1155Upgradeable, RoyaltiesUpgradable)
        returns (bool)
    {
        return ERC1155Upgradeable.supportsInterface(interfaceId) || RoyaltiesUpgradable.supportsInterface(interfaceId) || super.supportsInterface(interfaceId);
    }

    function open(
        uint256[] calldata ids,
        uint256[] calldata amounts
    ) external {
        require(tx.origin == msg.sender, "No calls from contracts");        
        _burnBatch(
            msg.sender,
            ids,
            amounts
        );
        _handlePackets(ids, amounts);        
    }

    function getTotal(uint256[] calldata numbers) public pure returns (uint256) {
        uint256 total;

        for(uint256 t; t < numbers.length; t++) {
            total += numbers[t];
        }

        return total;
    }

    function minted(address to) public view returns (uint256) {
        return _minted[to];
    }

    function totalSupply(uint256 id) public view returns (uint256) {
        return _totalSupply[id];
    }

    function setTotalSupply(
        uint256[] memory ids,
        uint256[] memory values
    ) external onlyAdmin {
        for(uint256 i; i < ids.length; i++) {
            _totalSupply[ids[i]] = values[i];
        }
    }

    IRandomizer public randomizer;

    function setRandomizer(IRandomizer _randomizer) external onlyAdmin {
        randomizer = _randomizer;
    }

    function _handlePackets(
        uint256[] calldata ids,
        uint256[] calldata amounts
    ) internal {
        uint256 length = ids.length;
        uint256 original = cardsContract.totalSupply();
        uint256 total = original + 1;
        for(uint256 i; i < length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];
            if(amount == 0) continue;
            if(id == 4) {
                for(uint256 j; j < amount; j++) {
                    uint256 cardId = randomizer.random(total, msg.sender);
                    require(cardId > 0, "Error: Out of stock");
                    uint256 cards =  idToCards[cardId];
                    emit PacketOpened(msg.sender, cardId, total, cards, block.timestamp);
                    total += cards;
                }
            } else {    
                uint256 cards =  idToCards[id];
                for(uint256 j; j < amount; j++) {                    
                    emit PacketOpened(msg.sender, id,  total, cards, block.timestamp);
                    total += cards;
                }                           
            }
        }
        uint256 mintQuantity = total - original - 1;
        require(mintQuantity > 0, "Minting Zero");
        cardsContract.mint(msg.sender, mintQuantity);
    }

    address public deadAddress;
}

File 2 of 37 : AdminManager.sol
//SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

contract AdminManager {
    mapping(address => bool) internal _admins;

    constructor() {
        _admins[msg.sender] = true;
        _admins[address(this)] = true;
    }

    function setAdminPermissions(address account_, bool enable_)
        external
        onlyAdmin
    {
        _admins[account_] = enable_;
    }

    function isAdmin(address account_) public view returns (bool) {
        return _admins[account_];
    }

    modifier onlyAdmin() {
        require(isAdmin(msg.sender), "Not an admin");
        _;
    }
}

File 3 of 37 : AdminManagerUpgradable.sol
//SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

contract AdminManagerUpgradable is Initializable {
    mapping(address => bool) private _admins;

    function __AdminManager_init() internal onlyInitializing {
        __AdminManager_init_unchained();
    }

    function __AdminManager_init_unchained() internal onlyInitializing {
        _admins[msg.sender] = true;
    }

    function setAdminPermissions(address account_, bool enable_)
        external
        onlyAdmin
    {
        _admins[account_] = enable_;
    }

    function isAdmin(address account_) public view returns (bool) {
        return _admins[account_];
    }

    modifier onlyAdmin() {
        require(isAdmin(msg.sender), "Not an admin");
        _;
    }

    uint256[49] private __gap;
}

File 4 of 37 : BalanceLimit.sol
//SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

import "../admin-manager/AdminManager.sol";
import "./BalanceLimitStorage.sol";

contract BalanceLimit is AdminManager {
    using BalanceLimitStorage for BalanceLimitStorage.Data;

    mapping(uint8 => BalanceLimitStorage.Data) internal _balanceLimits;

    function _increaseBalance(
        uint8 stageId_,
        address account_,
        uint256 amount_
    ) internal {
        _balanceLimits[stageId_].increaseBalance(account_, amount_);
    }

    function currentBalance(uint8 stageId_, address account_)
        external
        view
        returns (uint256)
    {
        return _balanceLimits[stageId_].balances[account_];
    }

    function remainingBalance(uint8 stageId_, address account_)
        external
        view
        returns (uint256)
    {
        return
            _balanceLimits[stageId_].limit -
            _balanceLimits[stageId_].balances[account_];
    }

    function updateBalanceLimit(uint8 stageId_, uint256 limit_)
        public
        onlyAdmin
    {
        _balanceLimits[stageId_].limit = limit_;
    }

    function balanceLimit(uint8 stageId_) external view returns (uint256) {
        return _balanceLimits[stageId_].limit;
    }
}

File 5 of 37 : BalanceLimitStorage.sol
//SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

library BalanceLimitStorage {
    struct Data {
        uint256 limit;
        mapping(address => uint256) balances;
    }

    function increaseBalance(
        Data storage data_,
        address account_,
        uint256 amount_
    ) internal {
        require(
            data_.balances[account_] + amount_ <= data_.limit,
            "Exceeds limit"
        );
        data_.balances[account_] += amount_;
    }
}

File 6 of 37 : BalanceLimitUpgradable.sol
//SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "../admin-manager/AdminManagerUpgradable.sol";
import "./BalanceLimitStorage.sol";

contract BalanceLimitUpgradable is Initializable, AdminManagerUpgradable {
    using BalanceLimitStorage for BalanceLimitStorage.Data;

    mapping(uint8 => BalanceLimitStorage.Data) internal _balanceLimits;

    function __BalanceLimit_init() internal onlyInitializing {
        __AdminManager_init_unchained();
        __BalanceLimit_init_unchained();
    }

    function __BalanceLimit_init_unchained() internal onlyInitializing {}

    function _increaseBalance(
        uint8 stageId_,
        address account_,
        uint256 amount_
    ) internal {
        _balanceLimits[stageId_].increaseBalance(account_, amount_);
    }

    function currentBalance(uint8 stageId_, address account_)
        external
        view
        returns (uint256)
    {
        return _balanceLimits[stageId_].balances[account_];
    }

    function remainingBalance(uint8 stageId_, address account_)
        external
        view
        returns (uint256)
    {
        return
            _balanceLimits[stageId_].limit -
            _balanceLimits[stageId_].balances[account_];
    }

    function updateBalanceLimit(uint8 stageId_, uint256 limit_)
        public
        onlyAdmin
    {
        _balanceLimits[stageId_].limit = limit_;
    }

    function balanceLimit(uint8 stageId_) external view returns (uint256) {
        return _balanceLimits[stageId_].limit;
    }
}

File 7 of 37 : PriceUpgradable.sol
//SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "../admin-manager/AdminManagerUpgradable.sol";
import "../balance-limit/BalanceLimit.sol";

contract PriceUpgradable is Initializable, AdminManagerUpgradable {
    mapping(uint8 => uint256) private _price;

    function __Price_init() internal onlyInitializing {        
        __AdminManager_init_unchained();
        __Price_init_unchained();
    }

    function __Price_init_unchained() internal onlyInitializing {}

    function setPrice(uint8 stage_, uint256 value_) public onlyAdmin {
        _price[stage_] = value_;
    }

    function price(uint8 stage_) public view returns (uint256) {
        return _price[stage_];
    }

    function _handlePayment(uint256 cost) internal {
        require(msg.value >= cost, "Price: invalid");
        uint256 difference = msg.value - cost;
        if(difference > 0) {
            payable(msg.sender).transfer(difference);
        }
    }

    uint256[49] private __gap;
}

File 8 of 37 : IERC2981Royalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

interface IERC2981Royalties {
    function royaltyInfo(uint256 tokenId_, uint256 value_)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 9 of 37 : RoyaltiesUpgradable.sol
//SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol";
import "../admin-manager/AdminManagerUpgradable.sol";
import "./IERC2981Royalties.sol";

contract RoyaltiesUpgradable is
    Initializable,
    ERC165Upgradeable,
    IERC2981Royalties,
    AdminManagerUpgradable
{
    struct RoyaltyInfo {
        address recipient;
        uint24 amount;
    }

    RoyaltyInfo private _royalties;
    uint256 constant maxValue = 10000;

    event RoyaltiesSet(address recipient, uint256 amount);

    function __Royalties_init(address recipient_, uint256 amount_)
        internal
        onlyInitializing
    {
        __AdminManager_init_unchained();
        __Royalties_init_unchained(recipient_, amount_);
    }

    function __Royalties_init_unchained(address recipient_, uint256 amount_)
        internal
        onlyInitializing
    {
        _setRoyalties(recipient_, amount_);
    }

    function _setRoyalties(address recipient_, uint256 amount_) internal {
        require(amount_ <= maxValue, "Royalties: value is too high");
        _royalties = RoyaltyInfo(recipient_, uint24(amount_));
        emit RoyaltiesSet(recipient_, amount_);
    }

    function setRoyalties(address recipient_, uint256 amount_)
        external
        onlyAdmin
    {
        _setRoyalties(recipient_, amount_);
    }

    function royaltyInfo(uint256, uint256 value_)
        external
        view
        override
        returns (address receiver, uint256 royaltyAmount)
    {
        RoyaltyInfo memory royalties = _royalties;
        receiver = royalties.recipient;
        royaltyAmount = (value_ * royalties.amount) / maxValue;
    }

    function supportsInterface(bytes4 interfaceId_)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceId_ == type(IERC2981Royalties).interfaceId ||
            super.supportsInterface(interfaceId_);
    }

    uint256[49] private __gap;
}

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

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol";
import "../admin-manager/AdminManagerUpgradable.sol";

contract SignerUpgradeable is Initializable, EIP712Upgradeable, AdminManagerUpgradable {
    using ECDSAUpgradeable for bytes32;

    address public signer;

    function __Signer_init(string memory name, string memory version, address signer_) internal onlyInitializing {
        __AdminManager_init_unchained();
        __Signer_init_unchained(name, version, signer_);
        __EIP712_init(name, version);
    }

    function __Signer_init_unchained(string memory name, string memory version, address signer_)
        internal
        onlyInitializing
    {
        __EIP712_init(name, version);
        signer = signer_;
    }

    function _verify(bytes32 digest, bytes calldata signature)
        internal
        view
        returns (bool)
    {
        address recoveredSigner = digest.recover(signature);
        return signer == recoveredSigner;
    }

    uint256[49] private __gap;
}

File 11 of 37 : ReservedSupplyUpgradeable.sol
//SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "../admin-manager/AdminManagerUpgradable.sol";

abstract contract ReservedSupplyUpgradable is Initializable, AdminManagerUpgradable {
    mapping(uint256 => uint256) internal _reserved;

    function __ReservedSupply_init(uint256 maxSupply_) internal onlyInitializing {
        __AdminManager_init_unchained();
        __ReservedSupply_init_unchained(maxSupply_);
    }

    function __ReservedSupply_init_unchained(uint256 maxSupply_)
        internal
        onlyInitializing
    {
    }

    function setReservedSupply(uint256 id_, uint256 reserved_) public onlyAdmin {
        _reserved[id_] = reserved_;
    }

    function reservedSupply(uint256 id_) external view returns (uint256) {
        return _reserved[id_];
    }

    modifier onlyInReserved(uint256 id_, uint256 amount_) {
        uint256 reserved = _reserved[id_];
        require(reserved - amount_ >= 0, "Exceeds supply");
        _reserved[id_] -= amount_;
        _;
    }

    uint256[49] private __gap;
}

File 12 of 37 : UriManagerUpgradable.sol
//SPDX-License-Identifier: MIT

pragma solidity ^0.8.17;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol";
import "../admin-manager/AdminManagerUpgradable.sol";

contract UriManagerUpgradable is Initializable, AdminManagerUpgradable {
    using StringsUpgradeable for uint256;

    string internal _prefix;
    string internal _suffix;

    function prefix() public view returns (string memory) {
        return _prefix;
    }

    function suffix() public view returns (string memory) {
        return _suffix;
    }

    function __UriManager_init(string memory prefix_, string memory suffix_)
        internal
        onlyInitializing
    {
        __AdminManager_init_unchained();
        __UriManager_init_unchained(prefix_, suffix_);
    }

    function __UriManager_init_unchained(
        string memory prefix_,
        string memory suffix_
    ) internal onlyInitializing {
        _prefix = prefix_;
        _suffix = suffix_;
    }

    function _buildUri(uint256 tokenId) internal view returns (string memory) {
        return string(abi.encodePacked(_prefix, tokenId.toString(), _suffix));
    }

    function setPrefix(string calldata prefix_) external onlyAdmin {
        _prefix = prefix_;
    }

    function setSuffix(string calldata suffix_) external onlyAdmin {
        _suffix = suffix_;
    }

    uint256[48] private __gap;
}

File 13 of 37 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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);
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 14 of 37 : IERC5267Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5267.sol)

pragma solidity ^0.8.0;

interface IERC5267Upgradeable {
    /**
     * @dev MAY be emitted to signal that the domain could have changed.
     */
    event EIP712DomainChanged();

    /**
     * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
     * signature.
     */
    function eip712Domain()
        external
        view
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        );
}

File 15 of 37 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized != type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

File 16 of 37 : ERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155Upgradeable.sol";
import "./IERC1155ReceiverUpgradeable.sol";
import "./extensions/IERC1155MetadataURIUpgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/ContextUpgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import {Initializable} from "../../proxy/utils/Initializable.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 ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable {
    using AddressUpgradeable 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}.
     */
    function __ERC1155_init(string memory uri_) internal onlyInitializing {
        __ERC1155_init_unchained(uri_);
    }

    function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing {
        _setURI(uri_);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {
        return
            interfaceId == type(IERC1155Upgradeable).interfaceId ||
            interfaceId == type(IERC1155MetadataURIUpgradeable).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 or 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 or 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 IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155ReceiverUpgradeable.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 IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155ReceiverUpgradeable.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;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[47] private __gap;
}

File 17 of 37 : IERC1155MetadataURIUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155Upgradeable.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 IERC1155MetadataURIUpgradeable is IERC1155Upgradeable {
    /**
     * @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 37 : IERC1155ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155ReceiverUpgradeable is IERC165Upgradeable {
    /**
     * @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 19 of 37 : IERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165Upgradeable.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 IERC1155Upgradeable is IERC165Upgradeable {
    /**
     * @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 20 of 37 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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 21 of 37 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.0;
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 22 of 37 : draft-EIP712Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)

pragma solidity ^0.8.0;

// EIP-712 is Final as of 2022-08-11. This file is deprecated.

import "./EIP712Upgradeable.sol";

File 23 of 37 : ECDSAUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../StringsUpgradeable.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSAUpgradeable {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32")
            mstore(0x1c, hash)
            message := keccak256(0x00, 0x3c)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", StringsUpgradeable.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, "\x19\x01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            data := keccak256(ptr, 0x42)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Data with intended validator, created from a
     * `validator` and `data` according to the version 0 of EIP-191.
     *
     * See {recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x00", validator, data));
    }
}

File 24 of 37 : EIP712Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol)

pragma solidity ^0.8.8;

import "./ECDSAUpgradeable.sol";
import "../../interfaces/IERC5267Upgradeable.sol";
import {Initializable} from "../../proxy/utils/Initializable.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
 * separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the
 * separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
 *
 * _Available since v3.4._
 *
 * @custom:storage-size 52
 */
abstract contract EIP712Upgradeable is Initializable, IERC5267Upgradeable {
    bytes32 private constant _TYPE_HASH =
        keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

    /// @custom:oz-renamed-from _HASHED_NAME
    bytes32 private _hashedName;
    /// @custom:oz-renamed-from _HASHED_VERSION
    bytes32 private _hashedVersion;

    string private _name;
    string private _version;

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    function __EIP712_init(string memory name, string memory version) internal onlyInitializing {
        __EIP712_init_unchained(name, version);
    }

    function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {
        _name = name;
        _version = version;

        // Reset prior values in storage if upgrading
        _hashedName = 0;
        _hashedVersion = 0;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        return _buildDomainSeparator();
    }

    function _buildDomainSeparator() private view returns (bytes32) {
        return keccak256(abi.encode(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash(), block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);
    }

    /**
     * @dev See {EIP-5267}.
     *
     * _Available since v4.9._
     */
    function eip712Domain()
        public
        view
        virtual
        override
        returns (
            bytes1 fields,
            string memory name,
            string memory version,
            uint256 chainId,
            address verifyingContract,
            bytes32 salt,
            uint256[] memory extensions
        )
    {
        // If the hashed name and version in storage are non-zero, the contract hasn't been properly initialized
        // and the EIP712 domain is not reliable, as it will be missing name and version.
        require(_hashedName == 0 && _hashedVersion == 0, "EIP712: Uninitialized");

        return (
            hex"0f", // 01111
            _EIP712Name(),
            _EIP712Version(),
            block.chainid,
            address(this),
            bytes32(0),
            new uint256[](0)
        );
    }

    /**
     * @dev The name parameter for the EIP712 domain.
     *
     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs
     * are a concern.
     */
    function _EIP712Name() internal virtual view returns (string memory) {
        return _name;
    }

    /**
     * @dev The version parameter for the EIP712 domain.
     *
     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs
     * are a concern.
     */
    function _EIP712Version() internal virtual view returns (string memory) {
        return _version;
    }

    /**
     * @dev The hash of the name parameter for the EIP712 domain.
     *
     * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Name` instead.
     */
    function _EIP712NameHash() internal view returns (bytes32) {
        string memory name = _EIP712Name();
        if (bytes(name).length > 0) {
            return keccak256(bytes(name));
        } else {
            // If the name is empty, the contract may have been upgraded without initializing the new storage.
            // We return the name hash in storage if non-zero, otherwise we assume the name is empty by design.
            bytes32 hashedName = _hashedName;
            if (hashedName != 0) {
                return hashedName;
            } else {
                return keccak256("");
            }
        }
    }

    /**
     * @dev The hash of the version parameter for the EIP712 domain.
     *
     * NOTE: In previous versions this function was virtual. In this version you should override `_EIP712Version` instead.
     */
    function _EIP712VersionHash() internal view returns (bytes32) {
        string memory version = _EIP712Version();
        if (bytes(version).length > 0) {
            return keccak256(bytes(version));
        } else {
            // If the version is empty, the contract may have been upgraded without initializing the new storage.
            // We return the version hash in storage if non-zero, otherwise we assume the version is empty by design.
            bytes32 hashedVersion = _hashedVersion;
            if (hashedVersion != 0) {
                return hashedVersion;
            } else {
                return keccak256("");
            }
        }
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[48] private __gap;
}

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

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import {Initializable} from "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 26 of 37 : IERC165Upgradeable.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 IERC165Upgradeable {
    /**
     * @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 27 of 37 : MathUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library MathUpgradeable {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 28 of 37 : SignedMathUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMathUpgradeable {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 29 of 37 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/MathUpgradeable.sol";
import "./math/SignedMathUpgradeable.sol";

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _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) {
        unchecked {
            uint256 length = MathUpgradeable.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMathUpgradeable.abs(value))));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, MathUpgradeable.log256(value) + 1);
        }
    }

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

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 30 of 37 : ICards.sol
//SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

interface ICards {
    function mint(address, uint256) external;
    function totalSupply() external view returns (uint256);
}

File 31 of 37 : IRandomizer.sol
//SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

interface IRandomizer {
    function random(uint256, address) external returns (uint256);
}

File 32 of 37 : IERC721ABurnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721AUpgradeable.sol';

/**
 * @dev Interface of ERC721ABurnable.
 */
interface IERC721ABurnableUpgradeable is IERC721AUpgradeable {
    /**
     * @dev Burns `tokenId`. See {ERC721A-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) external;
}

File 33 of 37 : IERC721AUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of ERC721A.
 */
interface IERC721AUpgradeable {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * The caller cannot approve to their own address.
     */
    error ApproveToCaller();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the
     * ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    /**
     * The `quantity` minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The `extraData` cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

    // =============================================================
    //                            STRUCTS
    // =============================================================

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Stores the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
        uint24 extraData;
    }

    // =============================================================
    //                         TOKEN COUNTERS
    // =============================================================

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() external view returns (uint256);

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    // =============================================================
    //                            IERC721
    // =============================================================

    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

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

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

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

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

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

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

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

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

    // =============================================================
    //                           IERC2309
    // =============================================================

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`
     * (inclusive) is transferred from `from` to `to`, as defined in the
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

File 34 of 37 : 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 35 of 37 : Constants.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

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

File 36 of 37 : DefaultOperatorFiltererUpgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {OperatorFiltererUpgradeable} from "./OperatorFiltererUpgradeable.sol";
import {CANONICAL_CORI_SUBSCRIPTION} from "../lib/Constants.sol";

/**
 * @title  DefaultOperatorFiltererUpgradeable
 * @notice Inherits from OperatorFiltererUpgradeable and automatically subscribes to the default OpenSea subscription
 *         when the init function is called.
 */
abstract contract DefaultOperatorFiltererUpgradeable is OperatorFiltererUpgradeable {
    /// @dev The upgradeable initialize function that should be called when the contract is being deployed.
    function __DefaultOperatorFilterer_init() internal onlyInitializing {
        OperatorFiltererUpgradeable.__OperatorFilterer_init(CANONICAL_CORI_SUBSCRIPTION, true);
    }
}

File 37 of 37 : OperatorFiltererUpgradeable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "../IOperatorFilterRegistry.sol";
import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
 * @title  OperatorFiltererUpgradeable
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry when the init function is called.
 * @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.
 */
abstract contract OperatorFiltererUpgradeable is Initializable {
    /// @notice Emitted when an operator is not allowed.
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

    /// @dev The upgradeable initialize function that should be called when the contract is being upgraded.
    function __OperatorFilterer_init(address subscriptionOrRegistrantToCopy, bool subscribe)
        internal
        onlyInitializing
    {
        // 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 (!OPERATOR_FILTER_REGISTRY.isRegistered(address(this))) {
                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 modifier to check if the 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 modifier to check if the operator approval is allowed.
     */
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    /**
     * @dev A helper function to check if the 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 or
            // upgraded contracts may specify their own OperatorFilterRegistry implementations, which may behave
            // differently
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","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":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"GbabiesBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","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":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"cardId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startingId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PacketOpened","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"QuillsBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RoyaltiesSet","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":"activeIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts_","type":"address[]"},{"internalType":"uint256[]","name":"amounts_","type":"uint256[]"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"adminMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"stageId_","type":"uint8"}],"name":"balanceLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"uint256[]","name":"gbabies","type":"uint256[]"},{"internalType":"uint256[]","name":"quills","type":"uint256[]"}],"name":"burnMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"cardsContract","outputs":[{"internalType":"contract ICards","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"stageId_","type":"uint8"},{"internalType":"address","name":"account_","type":"address"}],"name":"currentBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deadAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"discountPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gbabiesContract","outputs":[{"internalType":"contract IERC721ABurnableUpgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"numbers","type":"uint256[]"}],"name":"getTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"idToCards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"prefix_","type":"string"},{"internalType":"string","name":"suffix_","type":"string"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"address","name":"_signer","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account_","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":[{"internalType":"address","name":"to","type":"address"}],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"open","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"prefix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct Packets.PresaleRequest","name":"request","type":"tuple"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Packets.MintRequest[]","name":"mintRequests","type":"tuple[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"presaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"stage_","type":"uint8"}],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Packets.MintRequest[]","name":"mintRequests","type":"tuple[]"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"quillContract","outputs":[{"internalType":"contract IERC721ABurnableUpgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomizer","outputs":[{"internalType":"contract IRandomizer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"stageId_","type":"uint8"},{"internalType":"address","name":"account_","type":"address"}],"name":"remainingBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","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":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"setActiveIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"bool","name":"enable_","type":"bool"}],"name":"setAdminPermissions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721ABurnableUpgradeable","name":"gbabies","type":"address"},{"internalType":"contract IERC721ABurnableUpgradeable","name":"quills","type":"address"},{"internalType":"contract ICards","name":"cards","type":"address"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_deadAddress","type":"address"}],"name":"setDeadAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_discountPrice","type":"uint256"}],"name":"setDiscountPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"prefix_","type":"string"}],"name":"setPrefix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"stage_","type":"uint8"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IRandomizer","name":"_randomizer","type":"address"}],"name":"setRandomizer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"suffix_","type":"string"}],"name":"setSuffix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"setTotalSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"suffix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"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":[{"internalType":"uint8","name":"stageId_","type":"uint8"},{"internalType":"uint256","name":"limit_","type":"uint256"}],"name":"updateBalanceLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506157ce80620000216000396000f3fe6080604052600436106102fd5760003560e01c80637d07f3c611610190578063b3066d49116100dc578063e4ab4bb911610095578063f242432a1161006f578063f242432a146109de578063f2fde38b146109fe578063f7073c3a14610a1e578063fc7643a314610a3357600080fd5b8063e4ab4bb914610928578063e985e9c514610974578063f10fb584146109bd57600080fd5b8063b3066d491461083b578063b7fafcd71461085b578063b903c0511461088c578063bd85b039146108ba578063c519cd1c146108e8578063e188feda1461090857600080fd5b80638c7ea24b116101495780639f5226a2116101235780639f5226a2146107b3578063a1258e5e146107ca578063a22cb465146107ea578063b1ba72d61461080a57600080fd5b80638c7ea24b146107555780638da5cb5b146107755780639dca31d21461079357600080fd5b80637d07f3c61461069557806384ad8e8f146106b657806384b0196e146106cd57806385cb593b146106f55780638b78c116146107155780638be2227b1461073557600080fd5b80632e1a7d4d1161024f5780636dba11631161020857806375d5ae9f116101e257806375d5ae9f1461062057806375dadb3214610640578063767bcab51461065557806377975e0b1461067557600080fd5b80636dba1163146105cb5780636fb438dc146105eb578063715018a61461060b57600080fd5b80632e1a7d4d1461050b5780632eb2c2d61461052b5780634e1273f41461054b5780636a00670b146105785780636a537455146105985780636c19e783146105ab57600080fd5b80631d83f898116102bc578063240ff27f11610296578063240ff27f1461046b57806324d7806c1461048b57806327c8f835146104ab5780632a55205a146104cc57600080fd5b80631d83f898146103f35780631e7269c514610413578063238ac9331461044a57600080fd5b806279ee2114610302578062fdd58e14610340578063012c57801461036e57806301ffc9a7146103835780630e89341c146103b3578063124370ad146103e0575b600080fd5b34801561030e57600080fd5b506101fd54610323906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561034c57600080fd5b5061036061035b36600461459b565b610a54565b604051908152602001610337565b61038161037c36600461460b565b610aef565b005b34801561038f57600080fd5b506103a361039e366004614662565b610b3d565b6040519015158152602001610337565b3480156103bf57600080fd5b506103d36103ce36600461467f565b610b66565b60405161033791906146e8565b6103816103ee36600461473f565b610b71565b3480156103ff57600080fd5b5061038161040e3660046147aa565b610c0e565b34801561041f57600080fd5b5061036061042e36600461481d565b6001600160a01b031660009081526101fe602052604090205490565b34801561045657600080fd5b506101c654610323906001600160a01b031681565b34801561047757600080fd5b50610381610486366004614848565b610cf2565b34801561049757600080fd5b506103a36104a636600461481d565b610d42565b3480156104b757600080fd5b5061020254610323906001600160a01b031681565b3480156104d857600080fd5b506104ec6104e7366004614881565b610d60565b604080516001600160a01b039093168352602083019190915201610337565b34801561051757600080fd5b5061038161052636600461467f565b610db6565b34801561053757600080fd5b506103816105463660046149ec565b610de8565b34801561055757600080fd5b5061056b610566366004614a99565b610e0f565b6040516103379190614b96565b34801561058457600080fd5b50610381610593366004614bba565b610f38565b6103816105a6366004614c17565b610f74565b3480156105b757600080fd5b506103816105c636600461481d565b611121565b3480156105d757600080fd5b506103606105e6366004614c9f565b611169565b3480156105f757600080fd5b50610360610606366004614ccb565b6111ae565b34801561061757600080fd5b506103816111f4565b34801561062c57600080fd5b5061038161063b366004614d00565b611208565b34801561064c57600080fd5b506103d3611240565b34801561066157600080fd5b5061038161067036600461481d565b6112d3565b34801561068157600080fd5b5061038161069036600461481d565b61131b565b3480156106a157600080fd5b506101fb54610323906001600160a01b031681565b3480156106c257600080fd5b506103606102005481565b3480156106d957600080fd5b506106e2611363565b6040516103379796959493929190614d35565b34801561070157600080fd5b50610381610710366004614d00565b611401565b34801561072157600080fd5b5061038161073036600461467f565b611434565b34801561074157600080fd5b5061038161075036600461467f565b61145f565b34801561076157600080fd5b5061038161077036600461459b565b61148a565b34801561078157600080fd5b506097546001600160a01b0316610323565b34801561079f57600080fd5b506103816107ae366004614da5565b6114bd565b3480156107bf57600080fd5b506103606101f85481565b3480156107d657600080fd5b506103816107e536600461473f565b61154c565b3480156107f657600080fd5b50610381610805366004614848565b61161b565b34801561081657600080fd5b50610360610825366004614df1565b60ff1660009081526101c5602052604090205490565b34801561084757600080fd5b50610381610856366004614e0c565b61162f565b34801561086757600080fd5b50610360610876366004614df1565b60ff166000908152610161602052604090205490565b34801561089857600080fd5b506103606108a736600461467f565b6101f96020526000908152604090205481565b3480156108c657600080fd5b506103606108d536600461467f565b60009081526101fa602052604090205490565b3480156108f457600080fd5b50610381610903366004614bba565b611696565b34801561091457600080fd5b50610381610923366004614e57565b6116d2565b34801561093457600080fd5b50610360610943366004614c9f565b60ff821660009081526101c5602090815260408083206001600160a01b038516845260010190915290205492915050565b34801561098057600080fd5b506103a361098f366004614f2e565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b3480156109c957600080fd5b5061020154610323906001600160a01b031681565b3480156109ea57600080fd5b506103816109f9366004614f4c565b6121bc565b348015610a0a57600080fd5b50610381610a1936600461481d565b6121e3565b348015610a2a57600080fd5b506103d3612259565b348015610a3f57600080fd5b506101fc54610323906001600160a01b031681565b60006001600160a01b038316610ac45760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b6002806101f85414610b135760405162461bcd60e51b8152600401610abb90614fb4565b6000806000610b228686612269565b93509350509250610b3533838386612465565b505050505050565b6000610b4882612489565b80610b575750610b57826124d9565b80610ae95750610ae9826124d9565b6060610ae9826124fe565b6001806101f85414610b955760405162461bcd60e51b8152600401610abb90614fb4565b6000610ba18686612537565b509050600080610be386868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061272292505050565b90925090506000610bf48385614fec565b9050610c033382600185612958565b505050505050505050565b610c1733610d42565b610c335760405162461bcd60e51b8152600401610abb90614fff565b83828114610c835760405162461bcd60e51b815260206004820152601760248201527f41646d696e206d696e743a2062616420726571756573740000000000000000006044820152606401610abb565b60005b81811015610ce957610cd7878783818110610ca357610ca3615025565b9050602002016020810190610cb8919061481d565b868684818110610cca57610cca615025565b905060200201358561295f565b80610ce18161503b565b915050610c86565b50505050505050565b610cfb33610d42565b610d175760405162461bcd60e51b8152600401610abb90614fff565b6001600160a01b0391909116600090815260fd60205260409020805460ff1916911515919091179055565b6001600160a01b0316600090815260fd602052604090205460ff1690565b60408051808201909152610193546001600160a01b038116808352600160a01b90910462ffffff1660208301819052909160009161271090610da29086615054565b610dac9190615081565b9150509250929050565b610dbf33610d42565b610ddb5760405162461bcd60e51b8152600401610abb90614fff565b610de53382612984565b50565b846001600160a01b0381163314610e0257610e0233612a9d565b610b358686868686612b56565b60608151835114610e745760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610abb565b600083516001600160401b03811115610e8f57610e8f6148a3565b604051908082528060200260200182016040528015610eb8578160200160208202803683370190505b50905060005b8451811015610f3057610f03858281518110610edc57610edc615025565b6020026020010151858381518110610ef657610ef6615025565b6020026020010151610a54565b828281518110610f1557610f15615025565b6020908102919091010152610f298161503b565b9050610ebe565b509392505050565b610f4133610d42565b610f5d5760405162461bcd60e51b8152600401610abb90614fff565b60ff90911660009081526101616020526040902055565b8482826000610fd984604080517f3a58bb770b0fdc7635f4460ad845c6fcf18032144a6cadcfce202c2ac00887b86020820152823591810191909152336060820152600090608001604051602081830303815290604052805190602001209050919050565b90506000610fe682612ba2565b9050610ff3818585612bcf565b6110335760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964205369676e617475726560781b6044820152606401610abb565b6001806101f854146110575760405162461bcd60e51b8152600401610abb90614fb4565b6000806000806110678e8e612269565b3360009081526101fe6020526040902054939750919550935091508f3590611090908590614fec565b11156110de5760405162461bcd60e51b815260206004820152601f60248201527f43616e6e6f74206d696e74206d6f7265207468616e2061737369676e65642e006044820152606401610abb565b3360009081526101fe6020526040812080548592906110fe908490614fec565b90915550611110905033838387612465565b505050505050505050505050505050565b61112a33610d42565b6111465760405162461bcd60e51b8152600401610abb90614fff565b6101c680546001600160a01b0319166001600160a01b0392909216919091179055565b60ff821660008181526101c5602081815260408084206001600160a01b0387168552600181018352908420549484529190525490916111a791615095565b9392505050565b60008060005b83811015610f30578484828181106111ce576111ce615025565b90506020020135826111e09190614fec565b9150806111ec8161503b565b9150506111b4565b6111fc612c2f565b6112066000612c89565b565b61121133610d42565b61122d5760405162461bcd60e51b8152600401610abb90614fff565b61013061123b828483615128565b505050565b606061012f8054611250906150a8565b80601f016020809104026020016040519081016040528092919081815260200182805461127c906150a8565b80156112c95780601f1061129e576101008083540402835291602001916112c9565b820191906000526020600020905b8154815290600101906020018083116112ac57829003601f168201915b5050505050905090565b6112dc33610d42565b6112f85760405162461bcd60e51b8152600401610abb90614fff565b61020180546001600160a01b0319166001600160a01b0392909216919091179055565b61132433610d42565b6113405760405162461bcd60e51b8152600401610abb90614fff565b61020280546001600160a01b0319166001600160a01b0392909216919091179055565b60006060806000806000606060c9546000801b148015611383575060ca54155b6113c75760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610abb565b6113cf612cdb565b6113d7612cea565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61140a33610d42565b6114265760405162461bcd60e51b8152600401610abb90614fff565b61012f61123b828483615128565b61143d33610d42565b6114595760405162461bcd60e51b8152600401610abb90614fff565b61020055565b61146833610d42565b6114845760405162461bcd60e51b8152600401610abb90614fff565b6101f855565b61149333610d42565b6114af5760405162461bcd60e51b8152600401610abb90614fff565b6114b98282612cf9565b5050565b6114c633610d42565b6114e25760405162461bcd60e51b8152600401610abb90614fff565b60005b825181101561123b5781818151811061150057611500615025565b60200260200101516101fa600085848151811061151f5761151f615025565b602002602001015181526020019081526020016000208190555080806115449061503b565b9150506114e5565b32331461159b5760405162461bcd60e51b815260206004820152601760248201527f4e6f2063616c6c732066726f6d20636f6e7472616374730000000000000000006044820152606401610abb565b6116093385858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250612dc892505050565b61161584848484612fcd565b50505050565b8161162581612a9d565b61123b838361335b565b61163833610d42565b6116545760405162461bcd60e51b8152600401610abb90614fff565b6101fb80546001600160a01b039485166001600160a01b0319918216179091556101fc8054938516938216939093179092556101fd8054919093169116179055565b61169f33610d42565b6116bb5760405162461bcd60e51b8152600401610abb90614fff565b60ff90911660009081526101c56020526040902055565b600054610100900460ff16158080156116f25750600054600160ff909116105b8061170c5750303b15801561170c575060005460ff166001145b61176f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610abb565b6000805460ff191660011790558015611792576000805461ff0019166101001790555b61179a613366565b6117a488886133a9565b6117bc604051806020016040528060008152506133eb565b6117c461341b565b6117cc613442565b6117d68686613488565b6117e18484846134af565b7f0fce300cb38468eb74fecbca14de83ce9c827df14e4f90e2449f69b859ecb7128054600160ff1991821681179092557f59ba01267bf386871d93da16f79c2ff0bf73afef855c69ba8e727970f1f2c4c580548216831790557fa3ffa8264a5e43c979a94cd4848e9fa70bcb5af03add8c35380313d93f3e610180548216831790557f73d34c2884f94502fb1d482d02192caf4163842c8b93f9671f6082ba5a1ccf1580548216831790557f16c772b3e9aa319f7b7063aa3a3b86f1e75b554ade9d2e02be3d108ab97d931d80548216831790557f613d2f107b65d492ce98c78bafc70483b02579c4c2a57b88a15de777b57853f980548216831790557ff82425ba2020962b727a45b075b4a45d34e855c8da28a2e2f9b8149d2b5b88da80548216831790557f3bf756f4f6de00e05064edcadb575abef66a6acd701543e9469773f01163b6f480548216831790557f7f560f58c48d9de9bd66199cf84cbd6e6c81f9eaa8e9f04ff16c7a188b81168980548216831790557fdc11582e20e8b419f44ef4b3ebd28703c8a3c74d6378e4c7fe774a4bdf335c9280548216831790557f6406646511812cf097202fa10abfafb65c31155bff0b1e7dea2a3227c59c649880548216831790557f660dfbda5e85c811ff501dd9dcb165268f2f8830c7a1cbe7382126b9c738317780548216831790557ff67bc9a4b66294bfdbf1b0d507c254cda8453e05d53e0db51f7fa909b0f871b780548216831790557f37cd7bdfc604dbe39b5a7eb662363ecf6d3bd2140a3e357b84914821d942003580548216831790557fea2b69042b9e56e72eaffbbd839ce5cb4ce164c02952c3b86518d0db363cb6a080548216831790557fbb3034968a1979a8b7c32b8b8a40ddfcf923f157933cf83a86bbae484c31448080548216831790557fbea13c12d2091a85dd289e25e152450ea69e7821d8512311a824cb1ab19e8bec80548216831790557fe297f7ae1dbdff1d42155d68ee2c56a75180c4ac9179abba9b6efe55830a98f180548216831790557fdb0c88756833889a6af9845fcd8bd92ee609b9fad9165019577ac3a347d5870880548216831790557f7df666c72a50cb121dc34c5f1abf76c6e4f4ea9ae8350166d9ddcc9ae9d7808280548216831790557fb9714805c7b3a77afb2a8f70f953ce61bc41586afc4eb861a74d7ebd94384d0780548216831790557f5313ec90783836f995e51fb54cb5eb98553235c5d7f21b5a1051793523fc1cb980548216831790557ff0ad01455ebbd8cb771c98c564728f27ece9d7bd0c4cabda1d1d88717fe6d4a980548216831790557fb58684937ee37d7fb216ab0eda0b249fa588867b8b1759c2de687f80beda8e0980548216831790557f3b14d300f2f2a0701352086d3282ea36b93ddf2725226c878676188079ba811c80548216831790557ff4411caeb5e2bface4391e1aef41d77f775e5333d7316875fde3f8361619c59f80548216831790557f6c2d63af380e0eceb743755a5f5b822ada762a1b133df6bc208edd9faefd533780548216831790557f192902ca3444f6faf70d44bd64dbb7c9f342a4f1a3fa7ad07b00d424eac4b4ee80548216831790557fa2715a586f6d609d754132e374a42e40a6a024639e55cc2502b75e8897be72d480548216831790557ed5ae7eb37741d0b2942dd1fc029e7ef678156beb7f900b349071c3ce16465180548216831790557fb51b176d02a727cc74f941cf931ee9109e6b6b7ea099826c49342c26d209fb7f80548216831790557f40602445ae4eb2b0401c4c082838101ada040da73af4c1e90405082b069980b780548216831790557f9b2dac4b2aa2a5223062d57634f2ed14c03dac74d52c4c280282e519598a751d80548216831790557fd20fff4ff6cf6d1532c234b24c174f7d7dbb5f120559ec61d86cb0de76d4050a80548216831790557f1f83f6b8269c0b66e43cf25da0616a589681d93f350a2441d1c5ba7562679d1b80548216831790557fd1eaaf1c8f7fcac48f592dc6e6e47c9868d2493d22943398bff3522796903d5a80548216831790557f5b9c0b10b3bbc426ed8d675596135c1db5aff3d12933f77d97353bfba6a58bf680548216831790557fd3dd03f1fcd8d6d8ab160cf23964fc8d311babb0e7432cf9b1de698cbf879f3080548216831790557fcb161adaca6aabda2bdbc31b005604360ef3d7b10f4d2c4911d7997d94c57f8780548216831790557fce25c3e4ee22b82018b611b5afbb45cf93b58c8d6c7444d7a5dc9aa68c77ede280548216831790557f3111189fcca8bdefe3408954435c72bff1d0d9d79b3c11a1b6a8077f3325e58880548216831790557f15ee2e948bffa5fdf2f9b720efd8a6b6f8d6253930287c6694fa29c953edf64d80548216831790557f51dd4ecf048e5ef9f120ad4867b9652e64ae658bbf0deba2d7007b9b6326870280548216831790557f6e7812f35333e8d53566fe4a02f6850ba0b565ae833a017f1b744a86935494f980548216831790557f36e61c1b165a53f9e7fd7744b4f2f07270e6e6c93ccf7411473f28b97988208e80548216831790557f68902c1f5c0e52260f9dda967915da7523dcadc897709a3d3afeb40e8653e0ea80548216831790557fe372229435f273febf91ed768bf05446c35571ea5754ec28b0d2923aba53120680548216831790557f5aa5559585048f3c964b3f5f4e39bce41bd612c4f06341c3a2aa036370c29b6880548216831790557fd79156eaf85a77246f601fbeac91678a6a91e5270dda48fe0c8b8bc316ffa80780548216831790557f4588dd0f42eb06fa793bda52a25a76de6a7ff318532209bc7aadb1f962d0410e80549091168217905560057f5b9f4b3e29890e534851db0cc79af03a5861e973ebcc43c7ce7cbdc915ba9a225560197f180e5813c3d6dbfee391bda7c78a90e203593745fe288889e8b2038f078555305560647f788174486a78305a53e7f3e30c324b94119d348367a3cfe5909b18edcfd9f64b5560287feba31e7744486a1f8c0ba38c1831362670e464a45551370ddc3c482a7eb80b2d556101fa6020526114697f2c17d8e16e644355d48164662e8241a4a6ff9a8c44105e370a0d2b48fb07ac295561054b7f6b33b97f10a67f0f027b3dea661ff36fa406ac9e17a8d1467a69c91fb57d930e556101907f4c562ee05b53c60534273a7283dda48ec043d8301a3b338f9d90f9d8feee173f55600460005261012c7fa5fe82759daa34724fec0874734ce9efeb1de663eaee6bfa08b7aac2e6479b325561212a9066071afd498d0000610f38565b6606651728988000610200556121486002661c6bf526340000610f38565b61215a6003664fefa17b724000610f38565b61216c6004662c68af0bb14000610f38565b80156121b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b846001600160a01b03811633146121d6576121d633612a9d565b610b358686868686613505565b6121eb612c2f565b6001600160a01b0381166122505760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610abb565b610de581612c89565b60606101308054611250906150a8565b60008060608082808681816001600160401b0381111561228b5761228b6148a3565b6040519080825280602002602001820160405280156122b4578160200160208202803683370190505b5090506000826001600160401b038111156122d1576122d16148a3565b6040519080825280602002602001820160405280156122fa578160200160208202803683370190505b50905060005b8381101561241a5760008c8c8381811061231c5761231c615025565b90506040020180360381019061233291906151e7565b80519091506005811080156123475750600081115b6123805760405162461bcd60e51b815260206004820152600a602482015269125b9d985b1a5908125160b21b6044820152606401610abb565b602082015161238f828261354a565b60ff8216600090815261016160205260409020546123ad8282615054565b6123b7908b614fec565b99506123c3828a614fec565b9850828786815181106123d8576123d8615025565b602002602001018181525050818686815181106123f7576123f7615025565b6020026020010181815250505050505080806124129061503b565b915050612300565b50600084116124545760405162461bcd60e51b8152600401610abb906020808252600490820152635a65726f60e01b604082015260600190565b939a92995097509195509350505050565b612480848484604051806020016040528060008152506135cc565b61161581613718565b60006001600160e01b03198216636cdb3d1360e11b14806124ba57506001600160e01b031982166303a24d0760e21b145b80610ae957506301ffc9a760e01b6001600160e01b0319831614610ae9565b60006001600160e01b0319821663152a902d60e11b1480610ae95750610ae982612489565b606061012f61250c8361379a565b610130604051602001612521939291906152a8565b6040516020818303038152906040529050919050565b6000808280820361254f57600080925092505061271b565b6000805b828110156126d857600087878381811061256f5761256f615025565b6101fb546040516331a9108f60e11b8152602092909202939093013560048201819052935033926001600160a01b03169150636352211e90602401602060405180830381865afa1580156125c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125eb91906152db565b6001600160a01b03161461262d5760405162461bcd60e51b81526020600482015260096024820152682737ba1027bbb732b960b91b6044820152606401610abb565b60008181526101ff602052604090205460ff161561265757612650600284614fec565b9250612665565b826126618161503b565b9350505b6101fb54604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b1580156126ac57600080fd5b505af11580156126c0573d6000803e3d6000fd5b505050505080806126d09061503b565b915050612553565b506040805182815242602082015233917f70b70c02602ca6e3674cf269aee296d4ec20016bd0640168d48dc4c0ffd8f4eb910160405180910390a2925060009150505b9250929050565b8051600090819080820361273c5750600093849350915050565b6127476002826152f8565b1561278c5760405162461bcd60e51b815260206004820152601560248201527426bab9ba103132903234bb34b9b1363290313c901960591b6044820152606401610abb565b60005b818110156128f35760008582815181106127ab576127ab615025565b60209081029190910101516101fc546040516331a9108f60e11b81526004810183905291925033916001600160a01b0390911690636352211e90602401602060405180830381865afa158015612805573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282991906152db565b6001600160a01b03161461286f5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21027bbb732b960991b6044820152606401610abb565b6101fc54610202546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018490529116906323b872dd90606401600060405180830381600087803b1580156128c757600080fd5b505af11580156128db573d6000803e3d6000fd5b505050505080806128eb9061503b565b91505061278f565b506040805182815242602082015233917f79fab521652b87c8011ae6ea52cbe559f476249bc98c7e473977e9ccb5d9ca11910160405180910390a2600061293b600283615081565b905080610200548261294d9190615054565b935093505050915091565b6124808484845b612969818361354a565b61123b8382846040518060200160405280600081525061382c565b804710156129d45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610abb565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612a21576040519150601f19603f3d011682016040523d82523d6000602084013e612a26565b606091505b505090508061123b5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610abb565b6daaeb6d7670e522a718067333cd4e3b15610de557604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b2e919061530c565b610de557604051633b79c77360e21b81526001600160a01b0382166004820152602401610abb565b6001600160a01b038516331480612b725750612b72853361098f565b612b8e5760405162461bcd60e51b8152600401610abb90615329565b612b9b85858585856138ff565b5050505050565b6000610ae9612baf613a96565b8360405161190160f01b8152600281019290925260228201526042902090565b600080612c1484848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508993925050613aa59050565b6101c6546001600160a01b0391821691161495945050505050565b6097546001600160a01b031633146112065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abb565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606060cb8054611250906150a8565b606060cc8054611250906150a8565b612710811115612d4b5760405162461bcd60e51b815260206004820152601c60248201527f526f79616c746965733a2076616c756520697320746f6f2068696768000000006044820152606401610abb565b6040805180820182526001600160a01b03841680825262ffffff8416602092830181905261019380546001600160b81b0319168317600160a01b90920291909117905582519081529081018390527f908669f35f6fb3977a956ba70597841fe541d1e8491ca3c025161e258d3bfdb6910160405180910390a15050565b6001600160a01b038316612e2a5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610abb565b8051825114612e4b5760405162461bcd60e51b8152600401610abb90615377565b604080516020810190915260009081905233905b8351811015612f60576000848281518110612e7c57612e7c615025565b602002602001015190506000848381518110612e9a57612e9a615025565b60209081029190910181015160008481526065835260408082206001600160a01b038c168352909352919091205490915081811015612f275760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610abb565b60009283526065602090815260408085206001600160a01b038b1686529091529092209103905580612f588161503b565b915050612e5f565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612fb19291906153bf565b60405180910390a4604080516020810190915260009052611615565b6101fd54604080516318160ddd60e01b8152905185926000926001600160a01b03909116916318160ddd916004808201926020929091908290030181865afa15801561301d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061304191906153ed565b90506000613050826001614fec565b905060005b8381101561329257600088888381811061307157613071615025565b905060200201359050600087878481811061308e5761308e615025565b905060200201359050806000036130a6575050613280565b816004036131f95760005b818110156131f3576102015460405163459a4f9f60e11b8152600481018790523360248201526000916001600160a01b031690638b349f3e906044016020604051808303816000875af115801561310c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061313091906153ed565b9050600081116131785760405162461bcd60e51b81526020600482015260136024820152724572726f723a204f7574206f662073746f636b60681b6044820152606401610abb565b60008181526101f9602090815260409182902054825184815291820189905291810182905242606082015233907f0a687302320f32c8a887a190a8e55d073eccceafc6b5534bce199380854e3bff9060800160405180910390a26131dc8188614fec565b9650505080806131eb9061503b565b9150506130b1565b5061327d565b60008281526101f96020526040812054905b8281101561327a57604080518581526020810188905290810183905242606082015233907f0a687302320f32c8a887a190a8e55d073eccceafc6b5534bce199380854e3bff9060800160405180910390a26132668287614fec565b9550806132728161503b565b91505061320b565b50505b50505b8061328a8161503b565b915050613055565b50600060016132a18484615095565b6132ab9190615095565b9050600081116132ec5760405162461bcd60e51b815260206004820152600c60248201526b4d696e74696e67205a65726f60a01b6044820152606401610abb565b6101fd546040516340c10f1960e01b8152336004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b15801561333957600080fd5b505af115801561334d573d6000803e3d6000fd5b505050505050505050505050565b6114b9338383613ac1565b600054610100900460ff1661338d5760405162461bcd60e51b8152600401610abb90615406565b33600090815260fd60205260409020805460ff19166001179055565b600054610100900460ff166133d05760405162461bcd60e51b8152600401610abb90615406565b61012f6133dd8382615451565b5061013061123b8282615451565b600054610100900460ff166134125760405162461bcd60e51b8152600401610abb90615406565b610de581613ba1565b600054610100900460ff166112065760405162461bcd60e51b8152600401610abb90615406565b600054610100900460ff166134695760405162461bcd60e51b8152600401610abb90615406565b611206733cc6cdda760b79bafa08df41ecfa224f810dceb66001613bad565b600054610100900460ff166114af5760405162461bcd60e51b8152600401610abb90615406565b600054610100900460ff166134d65760405162461bcd60e51b8152600401610abb90615406565b6134e08383613d4c565b6101c680546001600160a01b0319166001600160a01b03929092169190911790555050565b6001600160a01b0385163314806135215750613521853361098f565b61353d5760405162461bcd60e51b8152600401610abb90615329565b612b9b8585858585613d7d565b60008281526101fa6020526040812054613565908390615095565b10156135a45760405162461bcd60e51b815260206004820152600e60248201526d4578636565647320537570706c7960901b6044820152606401610abb565b60008281526101fa6020526040812080548392906135c3908490615095565b90915550505050565b6001600160a01b0384166135f25760405162461bcd60e51b8152600401610abb90615510565b81518351146136135760405162461bcd60e51b8152600401610abb90615377565b3360005b84518110156136b05783818151811061363257613632615025565b60200260200101516065600087848151811061365057613650615025565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546136989190614fec565b909155508190506136a88161503b565b915050613617565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516137019291906153bf565b60405180910390a4612b9b81600087878787613ea0565b803410156137595760405162461bcd60e51b815260206004820152600e60248201526d141c9a58d94e881a5b9d985b1a5960921b6044820152606401610abb565b60006137658234615095565b905080156114b957604051339082156108fc029083906000818181858888f1935050505015801561123b573d6000803e3d6000fd5b606060006137a783613ffb565b60010190506000816001600160401b038111156137c6576137c66148a3565b6040519080825280601f01601f1916602001820160405280156137f0576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846137fa57509392505050565b6001600160a01b0384166138525760405162461bcd60e51b8152600401610abb90615510565b33600061385e856140d3565b9050600061386b856140d3565b905060008681526065602090815260408083206001600160a01b038b1684529091528120805487929061389f908490614fec565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610ce98360008989898961411e565b81518351146139205760405162461bcd60e51b8152600401610abb90615377565b6001600160a01b0384166139465760405162461bcd60e51b8152600401610abb90615551565b3360005b8451811015613a3057600085828151811061396757613967615025565b60200260200101519050600085838151811061398557613985615025565b60209081029190910181015160008481526065835260408082206001600160a01b038e1683529093529190912054909150818110156139d65760405162461bcd60e51b8152600401610abb90615596565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290613a15908490614fec565b9250508190555050505080613a299061503b565b905061394a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051613a809291906153bf565b60405180910390a4610b35818787878787613ea0565b6000613aa06141d9565b905090565b6000806000613ab4858561424d565b91509150610f308161428f565b816001600160a01b0316836001600160a01b031603613b345760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610abb565b6001600160a01b03838116600081815260666020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60676114b98282615451565b600054610100900460ff16613bd45760405162461bcd60e51b8152600401610abb90615406565b6daaeb6d7670e522a718067333cd4e3b156114b95760405163c3c5a54760e01b81523060048201526daaeb6d7670e522a718067333cd4e9063c3c5a547906024016020604051808303816000875af1158015613c34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c58919061530c565b6114b9578015613ccc57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b158015613cb857600080fd5b505af1158015610b35573d6000803e3d6000fd5b6001600160a01b03821615613d1b5760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401613c9e565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401613c9e565b600054610100900460ff16613d735760405162461bcd60e51b8152600401610abb90615406565b6114b982826143d9565b6001600160a01b038416613da35760405162461bcd60e51b8152600401610abb90615551565b336000613daf856140d3565b90506000613dbc856140d3565b905060008681526065602090815260408083206001600160a01b038c16845290915290205485811015613e015760405162461bcd60e51b8152600401610abb90615596565b60008781526065602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290613e40908490614fec565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610c03848a8a8a8a8a61411e565b6001600160a01b0384163b15610b355760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613ee490899089908890889088906004016155e0565b6020604051808303816000875af1925050508015613f1f575060408051601f3d908101601f19168201909252613f1c9181019061563e565b60015b613fcb57613f2b61565b565b806308c379a003613f645750613f3f615677565b80613f4a5750613f66565b8060405162461bcd60e51b8152600401610abb91906146e8565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610abb565b6001600160e01b0319811663bc197c8160e01b14610ce95760405162461bcd60e51b8152600401610abb90615700565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061403a5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310614066576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061408457662386f26fc10000830492506010015b6305f5e100831061409c576305f5e100830492506008015b61271083106140b057612710830492506004015b606483106140c2576064830492506002015b600a8310610ae95760010192915050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061410d5761410d615025565b602090810291909101015292915050565b6001600160a01b0384163b15610b355760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906141629089908990889088908890600401615748565b6020604051808303816000875af192505050801561419d575060408051601f3d908101601f1916820190925261419a9181019061563e565b60015b6141a957613f2b61565b565b6001600160e01b0319811663f23a6e6160e01b14610ce95760405162461bcd60e51b8152600401610abb90615700565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f614204614428565b61420c614481565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60008082516041036142835760208301516040840151606085015160001a614277878285856144b2565b9450945050505061271b565b5060009050600261271b565b60008160048111156142a3576142a3615782565b036142ab5750565b60018160048111156142bf576142bf615782565b0361430c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610abb565b600281600481111561432057614320615782565b0361436d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610abb565b600381600481111561438157614381615782565b03610de55760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610abb565b600054610100900460ff166144005760405162461bcd60e51b8152600401610abb90615406565b60cb61440c8382615451565b5060cc6144198282615451565b5050600060c981905560ca5550565b600080614433612cdb565b80519091501561444a578051602090910120919050565b60c95480156144595792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b60008061448c612cea565b8051909150156144a3578051602090910120919050565b60ca5480156144595792915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156144e9575060009050600361456d565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561453d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166145665760006001925092505061456d565b9150600090505b94509492505050565b6001600160a01b0381168114610de557600080fd5b803561459681614576565b919050565b600080604083850312156145ae57600080fd5b82356145b981614576565b946020939093013593505050565b60008083601f8401126145d957600080fd5b5081356001600160401b038111156145f057600080fd5b6020830191508360208260061b850101111561271b57600080fd5b6000806020838503121561461e57600080fd5b82356001600160401b0381111561463457600080fd5b614640858286016145c7565b90969095509350505050565b6001600160e01b031981168114610de557600080fd5b60006020828403121561467457600080fd5b81356111a78161464c565b60006020828403121561469157600080fd5b5035919050565b60005b838110156146b357818101518382015260200161469b565b50506000910152565b600081518084526146d4816020860160208601614698565b601f01601f19169290920160200192915050565b6020815260006111a760208301846146bc565b60008083601f84011261470d57600080fd5b5081356001600160401b0381111561472457600080fd5b6020830191508360208260051b850101111561271b57600080fd5b6000806000806040858703121561475557600080fd5b84356001600160401b038082111561476c57600080fd5b614778888389016146fb565b9096509450602087013591508082111561479157600080fd5b5061479e878288016146fb565b95989497509550505050565b6000806000806000606086880312156147c257600080fd5b85356001600160401b03808211156147d957600080fd5b6147e589838a016146fb565b909750955060208801359150808211156147fe57600080fd5b5061480b888289016146fb565b96999598509660400135949350505050565b60006020828403121561482f57600080fd5b81356111a781614576565b8015158114610de557600080fd5b6000806040838503121561485b57600080fd5b823561486681614576565b915060208301356148768161483a565b809150509250929050565b6000806040838503121561489457600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156148de576148de6148a3565b6040525050565b60006001600160401b038211156148fe576148fe6148a3565b5060051b60200190565b600082601f83011261491957600080fd5b81356020614926826148e5565b60405161493382826148b9565b83815260059390931b850182019282810191508684111561495357600080fd5b8286015b8481101561496e5780358352918301918301614957565b509695505050505050565b600082601f83011261498a57600080fd5b81356001600160401b038111156149a3576149a36148a3565b6040516149ba601f8301601f1916602001826148b9565b8181528460208386010111156149cf57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215614a0457600080fd5b8535614a0f81614576565b94506020860135614a1f81614576565b935060408601356001600160401b0380821115614a3b57600080fd5b614a4789838a01614908565b94506060880135915080821115614a5d57600080fd5b614a6989838a01614908565b93506080880135915080821115614a7f57600080fd5b50614a8c88828901614979565b9150509295509295909350565b60008060408385031215614aac57600080fd5b82356001600160401b0380821115614ac357600080fd5b818501915085601f830112614ad757600080fd5b81356020614ae4826148e5565b604051614af182826148b9565b83815260059390931b8501820192828101915089841115614b1157600080fd5b948201945b83861015614b38578535614b2981614576565b82529482019490820190614b16565b96505086013592505080821115614b4e57600080fd5b50610dac85828601614908565b600081518084526020808501945080840160005b83811015614b8b57815187529582019590820190600101614b6f565b509495945050505050565b6020815260006111a76020830184614b5b565b803560ff8116811461459657600080fd5b60008060408385031215614bcd57600080fd5b6145b983614ba9565b60008083601f840112614be857600080fd5b5081356001600160401b03811115614bff57600080fd5b60208301915083602082850101111561271b57600080fd5b60008060008060008587036080811215614c3057600080fd5b6040811215614c3e57600080fd5b5085945060408601356001600160401b0380821115614c5c57600080fd5b614c6889838a016145c7565b90965094506060880135915080821115614c8157600080fd5b50614c8e88828901614bd6565b969995985093965092949392505050565b60008060408385031215614cb257600080fd5b614cbb83614ba9565b9150602083013561487681614576565b60008060208385031215614cde57600080fd5b82356001600160401b03811115614cf457600080fd5b614640858286016146fb565b60008060208385031215614d1357600080fd5b82356001600160401b03811115614d2957600080fd5b61464085828601614bd6565b60ff60f81b8816815260e060208201526000614d5460e08301896146bc565b8281036040840152614d6681896146bc565b606084018890526001600160a01b038716608085015260a0840186905283810360c08501529050614d978185614b5b565b9a9950505050505050505050565b60008060408385031215614db857600080fd5b82356001600160401b0380821115614dcf57600080fd5b614ddb86838701614908565b93506020850135915080821115614b4e57600080fd5b600060208284031215614e0357600080fd5b6111a782614ba9565b600080600060608486031215614e2157600080fd5b8335614e2c81614576565b92506020840135614e3c81614576565b91506040840135614e4c81614576565b809150509250925092565b600080600080600080600060e0888a031215614e7257600080fd5b87356001600160401b0380821115614e8957600080fd5b614e958b838c01614979565b985060208a0135915080821115614eab57600080fd5b614eb78b838c01614979565b9750614ec560408b0161458b565b965060608a0135955060808a0135915080821115614ee257600080fd5b614eee8b838c01614979565b945060a08a0135915080821115614f0457600080fd5b50614f118a828b01614979565b925050614f2060c0890161458b565b905092959891949750929550565b60008060408385031215614f4157600080fd5b8235614cbb81614576565b600080600080600060a08688031215614f6457600080fd5b8535614f6f81614576565b94506020860135614f7f81614576565b9350604086013592506060860135915060808601356001600160401b03811115614fa857600080fd5b614a8c88828901614979565b6020808252600890820152674e6f74206c69766560c01b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610ae957610ae9614fd6565b6020808252600c908201526b2737ba1030b71030b236b4b760a11b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60006001820161504d5761504d614fd6565b5060010190565b8082028115828204841417610ae957610ae9614fd6565b634e487b7160e01b600052601260045260246000fd5b6000826150905761509061506b565b500490565b81810381811115610ae957610ae9614fd6565b600181811c908216806150bc57607f821691505b6020821081036150dc57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561123b57600081815260208120601f850160051c810160208610156151095750805b601f850160051c820191505b81811015610b3557828155600101615115565b6001600160401b0383111561513f5761513f6148a3565b6151538361514d83546150a8565b836150e2565b6000601f841160018114615187576000851561516f5750838201355b600019600387901b1c1916600186901b178355612b9b565b600083815260209020601f19861690835b828110156151b85786850135825560209485019460019092019101615198565b50868210156151d55760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000604082840312156151f957600080fd5b604051604081018181106001600160401b038211171561521b5761521b6148a3565b604052823581526020928301359281019290925250919050565b60008154615242816150a8565b6001828116801561525a576001811461526f5761529e565b60ff198416875282151583028701945061529e565b8560005260208060002060005b858110156152955781548a82015290840190820161527c565b50505082870194505b5050505092915050565b60006152b48286615235565b84516152c4818360208901614698565b6152d081830186615235565b979650505050505050565b6000602082840312156152ed57600080fd5b81516111a781614576565b6000826153075761530761506b565b500690565b60006020828403121561531e57600080fd5b81516111a78161483a565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b6040815260006153d26040830185614b5b565b82810360208401526153e48185614b5b565b95945050505050565b6000602082840312156153ff57600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b81516001600160401b0381111561546a5761546a6148a3565b61547e8161547884546150a8565b846150e2565b602080601f8311600181146154b3576000841561549b5750858301515b600019600386901b1c1916600185901b178555610b35565b600085815260208120601f198616915b828110156154e2578886015182559484019460019091019084016154c3565b50858210156155005787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061560c90830186614b5b565b828103606084015261561e8186614b5b565b9050828103608084015261563281856146bc565b98975050505050505050565b60006020828403121561565057600080fd5b81516111a78161464c565b600060033d11156156745760046000803e5060005160e01c5b90565b600060443d10156156855790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156156b457505050505090565b82850191508151818111156156cc5750505050505090565b843d87010160208285010111156156e65750505050505090565b6156f5602082860101876148b9565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906152d0908301846146bc565b634e487b7160e01b600052602160045260246000fdfea264697066735822122042a74ce23bcf3607ed40b3fdba38ea771585802db68898ce533fe3e025b184c464736f6c63430008110033

Deployed Bytecode

0x6080604052600436106102fd5760003560e01c80637d07f3c611610190578063b3066d49116100dc578063e4ab4bb911610095578063f242432a1161006f578063f242432a146109de578063f2fde38b146109fe578063f7073c3a14610a1e578063fc7643a314610a3357600080fd5b8063e4ab4bb914610928578063e985e9c514610974578063f10fb584146109bd57600080fd5b8063b3066d491461083b578063b7fafcd71461085b578063b903c0511461088c578063bd85b039146108ba578063c519cd1c146108e8578063e188feda1461090857600080fd5b80638c7ea24b116101495780639f5226a2116101235780639f5226a2146107b3578063a1258e5e146107ca578063a22cb465146107ea578063b1ba72d61461080a57600080fd5b80638c7ea24b146107555780638da5cb5b146107755780639dca31d21461079357600080fd5b80637d07f3c61461069557806384ad8e8f146106b657806384b0196e146106cd57806385cb593b146106f55780638b78c116146107155780638be2227b1461073557600080fd5b80632e1a7d4d1161024f5780636dba11631161020857806375d5ae9f116101e257806375d5ae9f1461062057806375dadb3214610640578063767bcab51461065557806377975e0b1461067557600080fd5b80636dba1163146105cb5780636fb438dc146105eb578063715018a61461060b57600080fd5b80632e1a7d4d1461050b5780632eb2c2d61461052b5780634e1273f41461054b5780636a00670b146105785780636a537455146105985780636c19e783146105ab57600080fd5b80631d83f898116102bc578063240ff27f11610296578063240ff27f1461046b57806324d7806c1461048b57806327c8f835146104ab5780632a55205a146104cc57600080fd5b80631d83f898146103f35780631e7269c514610413578063238ac9331461044a57600080fd5b806279ee2114610302578062fdd58e14610340578063012c57801461036e57806301ffc9a7146103835780630e89341c146103b3578063124370ad146103e0575b600080fd5b34801561030e57600080fd5b506101fd54610323906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561034c57600080fd5b5061036061035b36600461459b565b610a54565b604051908152602001610337565b61038161037c36600461460b565b610aef565b005b34801561038f57600080fd5b506103a361039e366004614662565b610b3d565b6040519015158152602001610337565b3480156103bf57600080fd5b506103d36103ce36600461467f565b610b66565b60405161033791906146e8565b6103816103ee36600461473f565b610b71565b3480156103ff57600080fd5b5061038161040e3660046147aa565b610c0e565b34801561041f57600080fd5b5061036061042e36600461481d565b6001600160a01b031660009081526101fe602052604090205490565b34801561045657600080fd5b506101c654610323906001600160a01b031681565b34801561047757600080fd5b50610381610486366004614848565b610cf2565b34801561049757600080fd5b506103a36104a636600461481d565b610d42565b3480156104b757600080fd5b5061020254610323906001600160a01b031681565b3480156104d857600080fd5b506104ec6104e7366004614881565b610d60565b604080516001600160a01b039093168352602083019190915201610337565b34801561051757600080fd5b5061038161052636600461467f565b610db6565b34801561053757600080fd5b506103816105463660046149ec565b610de8565b34801561055757600080fd5b5061056b610566366004614a99565b610e0f565b6040516103379190614b96565b34801561058457600080fd5b50610381610593366004614bba565b610f38565b6103816105a6366004614c17565b610f74565b3480156105b757600080fd5b506103816105c636600461481d565b611121565b3480156105d757600080fd5b506103606105e6366004614c9f565b611169565b3480156105f757600080fd5b50610360610606366004614ccb565b6111ae565b34801561061757600080fd5b506103816111f4565b34801561062c57600080fd5b5061038161063b366004614d00565b611208565b34801561064c57600080fd5b506103d3611240565b34801561066157600080fd5b5061038161067036600461481d565b6112d3565b34801561068157600080fd5b5061038161069036600461481d565b61131b565b3480156106a157600080fd5b506101fb54610323906001600160a01b031681565b3480156106c257600080fd5b506103606102005481565b3480156106d957600080fd5b506106e2611363565b6040516103379796959493929190614d35565b34801561070157600080fd5b50610381610710366004614d00565b611401565b34801561072157600080fd5b5061038161073036600461467f565b611434565b34801561074157600080fd5b5061038161075036600461467f565b61145f565b34801561076157600080fd5b5061038161077036600461459b565b61148a565b34801561078157600080fd5b506097546001600160a01b0316610323565b34801561079f57600080fd5b506103816107ae366004614da5565b6114bd565b3480156107bf57600080fd5b506103606101f85481565b3480156107d657600080fd5b506103816107e536600461473f565b61154c565b3480156107f657600080fd5b50610381610805366004614848565b61161b565b34801561081657600080fd5b50610360610825366004614df1565b60ff1660009081526101c5602052604090205490565b34801561084757600080fd5b50610381610856366004614e0c565b61162f565b34801561086757600080fd5b50610360610876366004614df1565b60ff166000908152610161602052604090205490565b34801561089857600080fd5b506103606108a736600461467f565b6101f96020526000908152604090205481565b3480156108c657600080fd5b506103606108d536600461467f565b60009081526101fa602052604090205490565b3480156108f457600080fd5b50610381610903366004614bba565b611696565b34801561091457600080fd5b50610381610923366004614e57565b6116d2565b34801561093457600080fd5b50610360610943366004614c9f565b60ff821660009081526101c5602090815260408083206001600160a01b038516845260010190915290205492915050565b34801561098057600080fd5b506103a361098f366004614f2e565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b3480156109c957600080fd5b5061020154610323906001600160a01b031681565b3480156109ea57600080fd5b506103816109f9366004614f4c565b6121bc565b348015610a0a57600080fd5b50610381610a1936600461481d565b6121e3565b348015610a2a57600080fd5b506103d3612259565b348015610a3f57600080fd5b506101fc54610323906001600160a01b031681565b60006001600160a01b038316610ac45760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b6002806101f85414610b135760405162461bcd60e51b8152600401610abb90614fb4565b6000806000610b228686612269565b93509350509250610b3533838386612465565b505050505050565b6000610b4882612489565b80610b575750610b57826124d9565b80610ae95750610ae9826124d9565b6060610ae9826124fe565b6001806101f85414610b955760405162461bcd60e51b8152600401610abb90614fb4565b6000610ba18686612537565b509050600080610be386868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061272292505050565b90925090506000610bf48385614fec565b9050610c033382600185612958565b505050505050505050565b610c1733610d42565b610c335760405162461bcd60e51b8152600401610abb90614fff565b83828114610c835760405162461bcd60e51b815260206004820152601760248201527f41646d696e206d696e743a2062616420726571756573740000000000000000006044820152606401610abb565b60005b81811015610ce957610cd7878783818110610ca357610ca3615025565b9050602002016020810190610cb8919061481d565b868684818110610cca57610cca615025565b905060200201358561295f565b80610ce18161503b565b915050610c86565b50505050505050565b610cfb33610d42565b610d175760405162461bcd60e51b8152600401610abb90614fff565b6001600160a01b0391909116600090815260fd60205260409020805460ff1916911515919091179055565b6001600160a01b0316600090815260fd602052604090205460ff1690565b60408051808201909152610193546001600160a01b038116808352600160a01b90910462ffffff1660208301819052909160009161271090610da29086615054565b610dac9190615081565b9150509250929050565b610dbf33610d42565b610ddb5760405162461bcd60e51b8152600401610abb90614fff565b610de53382612984565b50565b846001600160a01b0381163314610e0257610e0233612a9d565b610b358686868686612b56565b60608151835114610e745760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610abb565b600083516001600160401b03811115610e8f57610e8f6148a3565b604051908082528060200260200182016040528015610eb8578160200160208202803683370190505b50905060005b8451811015610f3057610f03858281518110610edc57610edc615025565b6020026020010151858381518110610ef657610ef6615025565b6020026020010151610a54565b828281518110610f1557610f15615025565b6020908102919091010152610f298161503b565b9050610ebe565b509392505050565b610f4133610d42565b610f5d5760405162461bcd60e51b8152600401610abb90614fff565b60ff90911660009081526101616020526040902055565b8482826000610fd984604080517f3a58bb770b0fdc7635f4460ad845c6fcf18032144a6cadcfce202c2ac00887b86020820152823591810191909152336060820152600090608001604051602081830303815290604052805190602001209050919050565b90506000610fe682612ba2565b9050610ff3818585612bcf565b6110335760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964205369676e617475726560781b6044820152606401610abb565b6001806101f854146110575760405162461bcd60e51b8152600401610abb90614fb4565b6000806000806110678e8e612269565b3360009081526101fe6020526040902054939750919550935091508f3590611090908590614fec565b11156110de5760405162461bcd60e51b815260206004820152601f60248201527f43616e6e6f74206d696e74206d6f7265207468616e2061737369676e65642e006044820152606401610abb565b3360009081526101fe6020526040812080548592906110fe908490614fec565b90915550611110905033838387612465565b505050505050505050505050505050565b61112a33610d42565b6111465760405162461bcd60e51b8152600401610abb90614fff565b6101c680546001600160a01b0319166001600160a01b0392909216919091179055565b60ff821660008181526101c5602081815260408084206001600160a01b0387168552600181018352908420549484529190525490916111a791615095565b9392505050565b60008060005b83811015610f30578484828181106111ce576111ce615025565b90506020020135826111e09190614fec565b9150806111ec8161503b565b9150506111b4565b6111fc612c2f565b6112066000612c89565b565b61121133610d42565b61122d5760405162461bcd60e51b8152600401610abb90614fff565b61013061123b828483615128565b505050565b606061012f8054611250906150a8565b80601f016020809104026020016040519081016040528092919081815260200182805461127c906150a8565b80156112c95780601f1061129e576101008083540402835291602001916112c9565b820191906000526020600020905b8154815290600101906020018083116112ac57829003601f168201915b5050505050905090565b6112dc33610d42565b6112f85760405162461bcd60e51b8152600401610abb90614fff565b61020180546001600160a01b0319166001600160a01b0392909216919091179055565b61132433610d42565b6113405760405162461bcd60e51b8152600401610abb90614fff565b61020280546001600160a01b0319166001600160a01b0392909216919091179055565b60006060806000806000606060c9546000801b148015611383575060ca54155b6113c75760405162461bcd60e51b81526020600482015260156024820152741152540dcc4c8e88155b9a5b9a5d1a585b1a5e9959605a1b6044820152606401610abb565b6113cf612cdb565b6113d7612cea565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61140a33610d42565b6114265760405162461bcd60e51b8152600401610abb90614fff565b61012f61123b828483615128565b61143d33610d42565b6114595760405162461bcd60e51b8152600401610abb90614fff565b61020055565b61146833610d42565b6114845760405162461bcd60e51b8152600401610abb90614fff565b6101f855565b61149333610d42565b6114af5760405162461bcd60e51b8152600401610abb90614fff565b6114b98282612cf9565b5050565b6114c633610d42565b6114e25760405162461bcd60e51b8152600401610abb90614fff565b60005b825181101561123b5781818151811061150057611500615025565b60200260200101516101fa600085848151811061151f5761151f615025565b602002602001015181526020019081526020016000208190555080806115449061503b565b9150506114e5565b32331461159b5760405162461bcd60e51b815260206004820152601760248201527f4e6f2063616c6c732066726f6d20636f6e7472616374730000000000000000006044820152606401610abb565b6116093385858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808902828101820190935288825290935088925087918291850190849080828437600092019190915250612dc892505050565b61161584848484612fcd565b50505050565b8161162581612a9d565b61123b838361335b565b61163833610d42565b6116545760405162461bcd60e51b8152600401610abb90614fff565b6101fb80546001600160a01b039485166001600160a01b0319918216179091556101fc8054938516938216939093179092556101fd8054919093169116179055565b61169f33610d42565b6116bb5760405162461bcd60e51b8152600401610abb90614fff565b60ff90911660009081526101c56020526040902055565b600054610100900460ff16158080156116f25750600054600160ff909116105b8061170c5750303b15801561170c575060005460ff166001145b61176f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610abb565b6000805460ff191660011790558015611792576000805461ff0019166101001790555b61179a613366565b6117a488886133a9565b6117bc604051806020016040528060008152506133eb565b6117c461341b565b6117cc613442565b6117d68686613488565b6117e18484846134af565b7f0fce300cb38468eb74fecbca14de83ce9c827df14e4f90e2449f69b859ecb7128054600160ff1991821681179092557f59ba01267bf386871d93da16f79c2ff0bf73afef855c69ba8e727970f1f2c4c580548216831790557fa3ffa8264a5e43c979a94cd4848e9fa70bcb5af03add8c35380313d93f3e610180548216831790557f73d34c2884f94502fb1d482d02192caf4163842c8b93f9671f6082ba5a1ccf1580548216831790557f16c772b3e9aa319f7b7063aa3a3b86f1e75b554ade9d2e02be3d108ab97d931d80548216831790557f613d2f107b65d492ce98c78bafc70483b02579c4c2a57b88a15de777b57853f980548216831790557ff82425ba2020962b727a45b075b4a45d34e855c8da28a2e2f9b8149d2b5b88da80548216831790557f3bf756f4f6de00e05064edcadb575abef66a6acd701543e9469773f01163b6f480548216831790557f7f560f58c48d9de9bd66199cf84cbd6e6c81f9eaa8e9f04ff16c7a188b81168980548216831790557fdc11582e20e8b419f44ef4b3ebd28703c8a3c74d6378e4c7fe774a4bdf335c9280548216831790557f6406646511812cf097202fa10abfafb65c31155bff0b1e7dea2a3227c59c649880548216831790557f660dfbda5e85c811ff501dd9dcb165268f2f8830c7a1cbe7382126b9c738317780548216831790557ff67bc9a4b66294bfdbf1b0d507c254cda8453e05d53e0db51f7fa909b0f871b780548216831790557f37cd7bdfc604dbe39b5a7eb662363ecf6d3bd2140a3e357b84914821d942003580548216831790557fea2b69042b9e56e72eaffbbd839ce5cb4ce164c02952c3b86518d0db363cb6a080548216831790557fbb3034968a1979a8b7c32b8b8a40ddfcf923f157933cf83a86bbae484c31448080548216831790557fbea13c12d2091a85dd289e25e152450ea69e7821d8512311a824cb1ab19e8bec80548216831790557fe297f7ae1dbdff1d42155d68ee2c56a75180c4ac9179abba9b6efe55830a98f180548216831790557fdb0c88756833889a6af9845fcd8bd92ee609b9fad9165019577ac3a347d5870880548216831790557f7df666c72a50cb121dc34c5f1abf76c6e4f4ea9ae8350166d9ddcc9ae9d7808280548216831790557fb9714805c7b3a77afb2a8f70f953ce61bc41586afc4eb861a74d7ebd94384d0780548216831790557f5313ec90783836f995e51fb54cb5eb98553235c5d7f21b5a1051793523fc1cb980548216831790557ff0ad01455ebbd8cb771c98c564728f27ece9d7bd0c4cabda1d1d88717fe6d4a980548216831790557fb58684937ee37d7fb216ab0eda0b249fa588867b8b1759c2de687f80beda8e0980548216831790557f3b14d300f2f2a0701352086d3282ea36b93ddf2725226c878676188079ba811c80548216831790557ff4411caeb5e2bface4391e1aef41d77f775e5333d7316875fde3f8361619c59f80548216831790557f6c2d63af380e0eceb743755a5f5b822ada762a1b133df6bc208edd9faefd533780548216831790557f192902ca3444f6faf70d44bd64dbb7c9f342a4f1a3fa7ad07b00d424eac4b4ee80548216831790557fa2715a586f6d609d754132e374a42e40a6a024639e55cc2502b75e8897be72d480548216831790557ed5ae7eb37741d0b2942dd1fc029e7ef678156beb7f900b349071c3ce16465180548216831790557fb51b176d02a727cc74f941cf931ee9109e6b6b7ea099826c49342c26d209fb7f80548216831790557f40602445ae4eb2b0401c4c082838101ada040da73af4c1e90405082b069980b780548216831790557f9b2dac4b2aa2a5223062d57634f2ed14c03dac74d52c4c280282e519598a751d80548216831790557fd20fff4ff6cf6d1532c234b24c174f7d7dbb5f120559ec61d86cb0de76d4050a80548216831790557f1f83f6b8269c0b66e43cf25da0616a589681d93f350a2441d1c5ba7562679d1b80548216831790557fd1eaaf1c8f7fcac48f592dc6e6e47c9868d2493d22943398bff3522796903d5a80548216831790557f5b9c0b10b3bbc426ed8d675596135c1db5aff3d12933f77d97353bfba6a58bf680548216831790557fd3dd03f1fcd8d6d8ab160cf23964fc8d311babb0e7432cf9b1de698cbf879f3080548216831790557fcb161adaca6aabda2bdbc31b005604360ef3d7b10f4d2c4911d7997d94c57f8780548216831790557fce25c3e4ee22b82018b611b5afbb45cf93b58c8d6c7444d7a5dc9aa68c77ede280548216831790557f3111189fcca8bdefe3408954435c72bff1d0d9d79b3c11a1b6a8077f3325e58880548216831790557f15ee2e948bffa5fdf2f9b720efd8a6b6f8d6253930287c6694fa29c953edf64d80548216831790557f51dd4ecf048e5ef9f120ad4867b9652e64ae658bbf0deba2d7007b9b6326870280548216831790557f6e7812f35333e8d53566fe4a02f6850ba0b565ae833a017f1b744a86935494f980548216831790557f36e61c1b165a53f9e7fd7744b4f2f07270e6e6c93ccf7411473f28b97988208e80548216831790557f68902c1f5c0e52260f9dda967915da7523dcadc897709a3d3afeb40e8653e0ea80548216831790557fe372229435f273febf91ed768bf05446c35571ea5754ec28b0d2923aba53120680548216831790557f5aa5559585048f3c964b3f5f4e39bce41bd612c4f06341c3a2aa036370c29b6880548216831790557fd79156eaf85a77246f601fbeac91678a6a91e5270dda48fe0c8b8bc316ffa80780548216831790557f4588dd0f42eb06fa793bda52a25a76de6a7ff318532209bc7aadb1f962d0410e80549091168217905560057f5b9f4b3e29890e534851db0cc79af03a5861e973ebcc43c7ce7cbdc915ba9a225560197f180e5813c3d6dbfee391bda7c78a90e203593745fe288889e8b2038f078555305560647f788174486a78305a53e7f3e30c324b94119d348367a3cfe5909b18edcfd9f64b5560287feba31e7744486a1f8c0ba38c1831362670e464a45551370ddc3c482a7eb80b2d556101fa6020526114697f2c17d8e16e644355d48164662e8241a4a6ff9a8c44105e370a0d2b48fb07ac295561054b7f6b33b97f10a67f0f027b3dea661ff36fa406ac9e17a8d1467a69c91fb57d930e556101907f4c562ee05b53c60534273a7283dda48ec043d8301a3b338f9d90f9d8feee173f55600460005261012c7fa5fe82759daa34724fec0874734ce9efeb1de663eaee6bfa08b7aac2e6479b325561212a9066071afd498d0000610f38565b6606651728988000610200556121486002661c6bf526340000610f38565b61215a6003664fefa17b724000610f38565b61216c6004662c68af0bb14000610f38565b80156121b2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050565b846001600160a01b03811633146121d6576121d633612a9d565b610b358686868686613505565b6121eb612c2f565b6001600160a01b0381166122505760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610abb565b610de581612c89565b60606101308054611250906150a8565b60008060608082808681816001600160401b0381111561228b5761228b6148a3565b6040519080825280602002602001820160405280156122b4578160200160208202803683370190505b5090506000826001600160401b038111156122d1576122d16148a3565b6040519080825280602002602001820160405280156122fa578160200160208202803683370190505b50905060005b8381101561241a5760008c8c8381811061231c5761231c615025565b90506040020180360381019061233291906151e7565b80519091506005811080156123475750600081115b6123805760405162461bcd60e51b815260206004820152600a602482015269125b9d985b1a5908125160b21b6044820152606401610abb565b602082015161238f828261354a565b60ff8216600090815261016160205260409020546123ad8282615054565b6123b7908b614fec565b99506123c3828a614fec565b9850828786815181106123d8576123d8615025565b602002602001018181525050818686815181106123f7576123f7615025565b6020026020010181815250505050505080806124129061503b565b915050612300565b50600084116124545760405162461bcd60e51b8152600401610abb906020808252600490820152635a65726f60e01b604082015260600190565b939a92995097509195509350505050565b612480848484604051806020016040528060008152506135cc565b61161581613718565b60006001600160e01b03198216636cdb3d1360e11b14806124ba57506001600160e01b031982166303a24d0760e21b145b80610ae957506301ffc9a760e01b6001600160e01b0319831614610ae9565b60006001600160e01b0319821663152a902d60e11b1480610ae95750610ae982612489565b606061012f61250c8361379a565b610130604051602001612521939291906152a8565b6040516020818303038152906040529050919050565b6000808280820361254f57600080925092505061271b565b6000805b828110156126d857600087878381811061256f5761256f615025565b6101fb546040516331a9108f60e11b8152602092909202939093013560048201819052935033926001600160a01b03169150636352211e90602401602060405180830381865afa1580156125c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125eb91906152db565b6001600160a01b03161461262d5760405162461bcd60e51b81526020600482015260096024820152682737ba1027bbb732b960b91b6044820152606401610abb565b60008181526101ff602052604090205460ff161561265757612650600284614fec565b9250612665565b826126618161503b565b9350505b6101fb54604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b1580156126ac57600080fd5b505af11580156126c0573d6000803e3d6000fd5b505050505080806126d09061503b565b915050612553565b506040805182815242602082015233917f70b70c02602ca6e3674cf269aee296d4ec20016bd0640168d48dc4c0ffd8f4eb910160405180910390a2925060009150505b9250929050565b8051600090819080820361273c5750600093849350915050565b6127476002826152f8565b1561278c5760405162461bcd60e51b815260206004820152601560248201527426bab9ba103132903234bb34b9b1363290313c901960591b6044820152606401610abb565b60005b818110156128f35760008582815181106127ab576127ab615025565b60209081029190910101516101fc546040516331a9108f60e11b81526004810183905291925033916001600160a01b0390911690636352211e90602401602060405180830381865afa158015612805573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282991906152db565b6001600160a01b03161461286f5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21027bbb732b960991b6044820152606401610abb565b6101fc54610202546040516323b872dd60e01b81523360048201526001600160a01b039182166024820152604481018490529116906323b872dd90606401600060405180830381600087803b1580156128c757600080fd5b505af11580156128db573d6000803e3d6000fd5b505050505080806128eb9061503b565b91505061278f565b506040805182815242602082015233917f79fab521652b87c8011ae6ea52cbe559f476249bc98c7e473977e9ccb5d9ca11910160405180910390a2600061293b600283615081565b905080610200548261294d9190615054565b935093505050915091565b6124808484845b612969818361354a565b61123b8382846040518060200160405280600081525061382c565b804710156129d45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610abb565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612a21576040519150601f19603f3d011682016040523d82523d6000602084013e612a26565b606091505b505090508061123b5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610abb565b6daaeb6d7670e522a718067333cd4e3b15610de557604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b2e919061530c565b610de557604051633b79c77360e21b81526001600160a01b0382166004820152602401610abb565b6001600160a01b038516331480612b725750612b72853361098f565b612b8e5760405162461bcd60e51b8152600401610abb90615329565b612b9b85858585856138ff565b5050505050565b6000610ae9612baf613a96565b8360405161190160f01b8152600281019290925260228201526042902090565b600080612c1484848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508993925050613aa59050565b6101c6546001600160a01b0391821691161495945050505050565b6097546001600160a01b031633146112065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abb565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606060cb8054611250906150a8565b606060cc8054611250906150a8565b612710811115612d4b5760405162461bcd60e51b815260206004820152601c60248201527f526f79616c746965733a2076616c756520697320746f6f2068696768000000006044820152606401610abb565b6040805180820182526001600160a01b03841680825262ffffff8416602092830181905261019380546001600160b81b0319168317600160a01b90920291909117905582519081529081018390527f908669f35f6fb3977a956ba70597841fe541d1e8491ca3c025161e258d3bfdb6910160405180910390a15050565b6001600160a01b038316612e2a5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610abb565b8051825114612e4b5760405162461bcd60e51b8152600401610abb90615377565b604080516020810190915260009081905233905b8351811015612f60576000848281518110612e7c57612e7c615025565b602002602001015190506000848381518110612e9a57612e9a615025565b60209081029190910181015160008481526065835260408082206001600160a01b038c168352909352919091205490915081811015612f275760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610abb565b60009283526065602090815260408085206001600160a01b038b1686529091529092209103905580612f588161503b565b915050612e5f565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612fb19291906153bf565b60405180910390a4604080516020810190915260009052611615565b6101fd54604080516318160ddd60e01b8152905185926000926001600160a01b03909116916318160ddd916004808201926020929091908290030181865afa15801561301d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061304191906153ed565b90506000613050826001614fec565b905060005b8381101561329257600088888381811061307157613071615025565b905060200201359050600087878481811061308e5761308e615025565b905060200201359050806000036130a6575050613280565b816004036131f95760005b818110156131f3576102015460405163459a4f9f60e11b8152600481018790523360248201526000916001600160a01b031690638b349f3e906044016020604051808303816000875af115801561310c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061313091906153ed565b9050600081116131785760405162461bcd60e51b81526020600482015260136024820152724572726f723a204f7574206f662073746f636b60681b6044820152606401610abb565b60008181526101f9602090815260409182902054825184815291820189905291810182905242606082015233907f0a687302320f32c8a887a190a8e55d073eccceafc6b5534bce199380854e3bff9060800160405180910390a26131dc8188614fec565b9650505080806131eb9061503b565b9150506130b1565b5061327d565b60008281526101f96020526040812054905b8281101561327a57604080518581526020810188905290810183905242606082015233907f0a687302320f32c8a887a190a8e55d073eccceafc6b5534bce199380854e3bff9060800160405180910390a26132668287614fec565b9550806132728161503b565b91505061320b565b50505b50505b8061328a8161503b565b915050613055565b50600060016132a18484615095565b6132ab9190615095565b9050600081116132ec5760405162461bcd60e51b815260206004820152600c60248201526b4d696e74696e67205a65726f60a01b6044820152606401610abb565b6101fd546040516340c10f1960e01b8152336004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b15801561333957600080fd5b505af115801561334d573d6000803e3d6000fd5b505050505050505050505050565b6114b9338383613ac1565b600054610100900460ff1661338d5760405162461bcd60e51b8152600401610abb90615406565b33600090815260fd60205260409020805460ff19166001179055565b600054610100900460ff166133d05760405162461bcd60e51b8152600401610abb90615406565b61012f6133dd8382615451565b5061013061123b8282615451565b600054610100900460ff166134125760405162461bcd60e51b8152600401610abb90615406565b610de581613ba1565b600054610100900460ff166112065760405162461bcd60e51b8152600401610abb90615406565b600054610100900460ff166134695760405162461bcd60e51b8152600401610abb90615406565b611206733cc6cdda760b79bafa08df41ecfa224f810dceb66001613bad565b600054610100900460ff166114af5760405162461bcd60e51b8152600401610abb90615406565b600054610100900460ff166134d65760405162461bcd60e51b8152600401610abb90615406565b6134e08383613d4c565b6101c680546001600160a01b0319166001600160a01b03929092169190911790555050565b6001600160a01b0385163314806135215750613521853361098f565b61353d5760405162461bcd60e51b8152600401610abb90615329565b612b9b8585858585613d7d565b60008281526101fa6020526040812054613565908390615095565b10156135a45760405162461bcd60e51b815260206004820152600e60248201526d4578636565647320537570706c7960901b6044820152606401610abb565b60008281526101fa6020526040812080548392906135c3908490615095565b90915550505050565b6001600160a01b0384166135f25760405162461bcd60e51b8152600401610abb90615510565b81518351146136135760405162461bcd60e51b8152600401610abb90615377565b3360005b84518110156136b05783818151811061363257613632615025565b60200260200101516065600087848151811061365057613650615025565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546136989190614fec565b909155508190506136a88161503b565b915050613617565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516137019291906153bf565b60405180910390a4612b9b81600087878787613ea0565b803410156137595760405162461bcd60e51b815260206004820152600e60248201526d141c9a58d94e881a5b9d985b1a5960921b6044820152606401610abb565b60006137658234615095565b905080156114b957604051339082156108fc029083906000818181858888f1935050505015801561123b573d6000803e3d6000fd5b606060006137a783613ffb565b60010190506000816001600160401b038111156137c6576137c66148a3565b6040519080825280601f01601f1916602001820160405280156137f0576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846137fa57509392505050565b6001600160a01b0384166138525760405162461bcd60e51b8152600401610abb90615510565b33600061385e856140d3565b9050600061386b856140d3565b905060008681526065602090815260408083206001600160a01b038b1684529091528120805487929061389f908490614fec565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610ce98360008989898961411e565b81518351146139205760405162461bcd60e51b8152600401610abb90615377565b6001600160a01b0384166139465760405162461bcd60e51b8152600401610abb90615551565b3360005b8451811015613a3057600085828151811061396757613967615025565b60200260200101519050600085838151811061398557613985615025565b60209081029190910181015160008481526065835260408082206001600160a01b038e1683529093529190912054909150818110156139d65760405162461bcd60e51b8152600401610abb90615596565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290613a15908490614fec565b9250508190555050505080613a299061503b565b905061394a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051613a809291906153bf565b60405180910390a4610b35818787878787613ea0565b6000613aa06141d9565b905090565b6000806000613ab4858561424d565b91509150610f308161428f565b816001600160a01b0316836001600160a01b031603613b345760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610abb565b6001600160a01b03838116600081815260666020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60676114b98282615451565b600054610100900460ff16613bd45760405162461bcd60e51b8152600401610abb90615406565b6daaeb6d7670e522a718067333cd4e3b156114b95760405163c3c5a54760e01b81523060048201526daaeb6d7670e522a718067333cd4e9063c3c5a547906024016020604051808303816000875af1158015613c34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c58919061530c565b6114b9578015613ccc57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b158015613cb857600080fd5b505af1158015610b35573d6000803e3d6000fd5b6001600160a01b03821615613d1b5760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401613c9e565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401613c9e565b600054610100900460ff16613d735760405162461bcd60e51b8152600401610abb90615406565b6114b982826143d9565b6001600160a01b038416613da35760405162461bcd60e51b8152600401610abb90615551565b336000613daf856140d3565b90506000613dbc856140d3565b905060008681526065602090815260408083206001600160a01b038c16845290915290205485811015613e015760405162461bcd60e51b8152600401610abb90615596565b60008781526065602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290613e40908490614fec565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610c03848a8a8a8a8a61411e565b6001600160a01b0384163b15610b355760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613ee490899089908890889088906004016155e0565b6020604051808303816000875af1925050508015613f1f575060408051601f3d908101601f19168201909252613f1c9181019061563e565b60015b613fcb57613f2b61565b565b806308c379a003613f645750613f3f615677565b80613f4a5750613f66565b8060405162461bcd60e51b8152600401610abb91906146e8565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610abb565b6001600160e01b0319811663bc197c8160e01b14610ce95760405162461bcd60e51b8152600401610abb90615700565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061403a5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310614066576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061408457662386f26fc10000830492506010015b6305f5e100831061409c576305f5e100830492506008015b61271083106140b057612710830492506004015b606483106140c2576064830492506002015b600a8310610ae95760010192915050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061410d5761410d615025565b602090810291909101015292915050565b6001600160a01b0384163b15610b355760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906141629089908990889088908890600401615748565b6020604051808303816000875af192505050801561419d575060408051601f3d908101601f1916820190925261419a9181019061563e565b60015b6141a957613f2b61565b565b6001600160e01b0319811663f23a6e6160e01b14610ce95760405162461bcd60e51b8152600401610abb90615700565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f614204614428565b61420c614481565b60408051602081019490945283019190915260608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60008082516041036142835760208301516040840151606085015160001a614277878285856144b2565b9450945050505061271b565b5060009050600261271b565b60008160048111156142a3576142a3615782565b036142ab5750565b60018160048111156142bf576142bf615782565b0361430c5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610abb565b600281600481111561432057614320615782565b0361436d5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610abb565b600381600481111561438157614381615782565b03610de55760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610abb565b600054610100900460ff166144005760405162461bcd60e51b8152600401610abb90615406565b60cb61440c8382615451565b5060cc6144198282615451565b5050600060c981905560ca5550565b600080614433612cdb565b80519091501561444a578051602090910120919050565b60c95480156144595792915050565b7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4709250505090565b60008061448c612cea565b8051909150156144a3578051602090910120919050565b60ca5480156144595792915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156144e9575060009050600361456d565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561453d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166145665760006001925092505061456d565b9150600090505b94509492505050565b6001600160a01b0381168114610de557600080fd5b803561459681614576565b919050565b600080604083850312156145ae57600080fd5b82356145b981614576565b946020939093013593505050565b60008083601f8401126145d957600080fd5b5081356001600160401b038111156145f057600080fd5b6020830191508360208260061b850101111561271b57600080fd5b6000806020838503121561461e57600080fd5b82356001600160401b0381111561463457600080fd5b614640858286016145c7565b90969095509350505050565b6001600160e01b031981168114610de557600080fd5b60006020828403121561467457600080fd5b81356111a78161464c565b60006020828403121561469157600080fd5b5035919050565b60005b838110156146b357818101518382015260200161469b565b50506000910152565b600081518084526146d4816020860160208601614698565b601f01601f19169290920160200192915050565b6020815260006111a760208301846146bc565b60008083601f84011261470d57600080fd5b5081356001600160401b0381111561472457600080fd5b6020830191508360208260051b850101111561271b57600080fd5b6000806000806040858703121561475557600080fd5b84356001600160401b038082111561476c57600080fd5b614778888389016146fb565b9096509450602087013591508082111561479157600080fd5b5061479e878288016146fb565b95989497509550505050565b6000806000806000606086880312156147c257600080fd5b85356001600160401b03808211156147d957600080fd5b6147e589838a016146fb565b909750955060208801359150808211156147fe57600080fd5b5061480b888289016146fb565b96999598509660400135949350505050565b60006020828403121561482f57600080fd5b81356111a781614576565b8015158114610de557600080fd5b6000806040838503121561485b57600080fd5b823561486681614576565b915060208301356148768161483a565b809150509250929050565b6000806040838503121561489457600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156148de576148de6148a3565b6040525050565b60006001600160401b038211156148fe576148fe6148a3565b5060051b60200190565b600082601f83011261491957600080fd5b81356020614926826148e5565b60405161493382826148b9565b83815260059390931b850182019282810191508684111561495357600080fd5b8286015b8481101561496e5780358352918301918301614957565b509695505050505050565b600082601f83011261498a57600080fd5b81356001600160401b038111156149a3576149a36148a3565b6040516149ba601f8301601f1916602001826148b9565b8181528460208386010111156149cf57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215614a0457600080fd5b8535614a0f81614576565b94506020860135614a1f81614576565b935060408601356001600160401b0380821115614a3b57600080fd5b614a4789838a01614908565b94506060880135915080821115614a5d57600080fd5b614a6989838a01614908565b93506080880135915080821115614a7f57600080fd5b50614a8c88828901614979565b9150509295509295909350565b60008060408385031215614aac57600080fd5b82356001600160401b0380821115614ac357600080fd5b818501915085601f830112614ad757600080fd5b81356020614ae4826148e5565b604051614af182826148b9565b83815260059390931b8501820192828101915089841115614b1157600080fd5b948201945b83861015614b38578535614b2981614576565b82529482019490820190614b16565b96505086013592505080821115614b4e57600080fd5b50610dac85828601614908565b600081518084526020808501945080840160005b83811015614b8b57815187529582019590820190600101614b6f565b509495945050505050565b6020815260006111a76020830184614b5b565b803560ff8116811461459657600080fd5b60008060408385031215614bcd57600080fd5b6145b983614ba9565b60008083601f840112614be857600080fd5b5081356001600160401b03811115614bff57600080fd5b60208301915083602082850101111561271b57600080fd5b60008060008060008587036080811215614c3057600080fd5b6040811215614c3e57600080fd5b5085945060408601356001600160401b0380821115614c5c57600080fd5b614c6889838a016145c7565b90965094506060880135915080821115614c8157600080fd5b50614c8e88828901614bd6565b969995985093965092949392505050565b60008060408385031215614cb257600080fd5b614cbb83614ba9565b9150602083013561487681614576565b60008060208385031215614cde57600080fd5b82356001600160401b03811115614cf457600080fd5b614640858286016146fb565b60008060208385031215614d1357600080fd5b82356001600160401b03811115614d2957600080fd5b61464085828601614bd6565b60ff60f81b8816815260e060208201526000614d5460e08301896146bc565b8281036040840152614d6681896146bc565b606084018890526001600160a01b038716608085015260a0840186905283810360c08501529050614d978185614b5b565b9a9950505050505050505050565b60008060408385031215614db857600080fd5b82356001600160401b0380821115614dcf57600080fd5b614ddb86838701614908565b93506020850135915080821115614b4e57600080fd5b600060208284031215614e0357600080fd5b6111a782614ba9565b600080600060608486031215614e2157600080fd5b8335614e2c81614576565b92506020840135614e3c81614576565b91506040840135614e4c81614576565b809150509250925092565b600080600080600080600060e0888a031215614e7257600080fd5b87356001600160401b0380821115614e8957600080fd5b614e958b838c01614979565b985060208a0135915080821115614eab57600080fd5b614eb78b838c01614979565b9750614ec560408b0161458b565b965060608a0135955060808a0135915080821115614ee257600080fd5b614eee8b838c01614979565b945060a08a0135915080821115614f0457600080fd5b50614f118a828b01614979565b925050614f2060c0890161458b565b905092959891949750929550565b60008060408385031215614f4157600080fd5b8235614cbb81614576565b600080600080600060a08688031215614f6457600080fd5b8535614f6f81614576565b94506020860135614f7f81614576565b9350604086013592506060860135915060808601356001600160401b03811115614fa857600080fd5b614a8c88828901614979565b6020808252600890820152674e6f74206c69766560c01b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610ae957610ae9614fd6565b6020808252600c908201526b2737ba1030b71030b236b4b760a11b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60006001820161504d5761504d614fd6565b5060010190565b8082028115828204841417610ae957610ae9614fd6565b634e487b7160e01b600052601260045260246000fd5b6000826150905761509061506b565b500490565b81810381811115610ae957610ae9614fd6565b600181811c908216806150bc57607f821691505b6020821081036150dc57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561123b57600081815260208120601f850160051c810160208610156151095750805b601f850160051c820191505b81811015610b3557828155600101615115565b6001600160401b0383111561513f5761513f6148a3565b6151538361514d83546150a8565b836150e2565b6000601f841160018114615187576000851561516f5750838201355b600019600387901b1c1916600186901b178355612b9b565b600083815260209020601f19861690835b828110156151b85786850135825560209485019460019092019101615198565b50868210156151d55760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6000604082840312156151f957600080fd5b604051604081018181106001600160401b038211171561521b5761521b6148a3565b604052823581526020928301359281019290925250919050565b60008154615242816150a8565b6001828116801561525a576001811461526f5761529e565b60ff198416875282151583028701945061529e565b8560005260208060002060005b858110156152955781548a82015290840190820161527c565b50505082870194505b5050505092915050565b60006152b48286615235565b84516152c4818360208901614698565b6152d081830186615235565b979650505050505050565b6000602082840312156152ed57600080fd5b81516111a781614576565b6000826153075761530761506b565b500690565b60006020828403121561531e57600080fd5b81516111a78161483a565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b6040815260006153d26040830185614b5b565b82810360208401526153e48185614b5b565b95945050505050565b6000602082840312156153ff57600080fd5b5051919050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b81516001600160401b0381111561546a5761546a6148a3565b61547e8161547884546150a8565b846150e2565b602080601f8311600181146154b3576000841561549b5750858301515b600019600386901b1c1916600185901b178555610b35565b600085815260208120601f198616915b828110156154e2578886015182559484019460019091019084016154c3565b50858210156155005787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061560c90830186614b5b565b828103606084015261561e8186614b5b565b9050828103608084015261563281856146bc565b98975050505050505050565b60006020828403121561565057600080fd5b81516111a78161464c565b600060033d11156156745760046000803e5060005160e01c5b90565b600060443d10156156855790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156156b457505050505090565b82850191508151818111156156cc5750505050505090565b843d87010160208285010111156156e65750505050505090565b6156f5602082860101876148b9565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906152d0908301846146bc565b634e487b7160e01b600052602160045260246000fdfea264697066735822122042a74ce23bcf3607ed40b3fdba38ea771585802db68898ce533fe3e025b184c464736f6c63430008110033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.