ETH Price: $3,388.28 (+0.93%)
Gas: 5.47 Gwei

Contract

0xd66C101c9255c890126c41C158BF6DcA0a6AcF6A
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ArtFest

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 600 runs

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

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/common/ERC2981Upgradeable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "operator-filter-registry/src/upgradeable/DefaultOperatorFiltererUpgradeable.sol";

import "./IDelegationRegistry.sol";
import "./IHotWalletProxy.sol";

//            .,,/.*/*,
//          , ,    *(****,                &
//        ..  .    .#*(/.,/               &WoWoWoWoW
//        ,..   .   .  /**(               %     ...
//        * .        . //(*              .#
//         , (,     .,*(**               &&&
//            / ...*,(/                (&,%/#,
//                                    #//.(*#,/
//                                  %.#& ,/ #% &*
//                                (*.&%  //%.## /(/
//                            . */ ,(%   /*% *##. @@#
//                            %#  /*#,   **.. ,//* ,(#(
//                         ,%#  .#(#%   **//*  ,/*%. (#/%.
//                       (%( , ,#&(/    ,*/*/   (#*(#  .//#*
//                    #./( ,  #(/((     **((#    *//(&*.. #*&%
//                ,%/#(,.   %/(##*     **//**     /,///# .. *(#&%/
//            .##(/#(...  (##((*/      (***///     ,*(***#.   ,#(#%//.
//        .##&#//*,,. . /(#/%(%,      ,**,/**(      ,#/((/(( .   #*/###*.
//        ,&%#**      &&#%%(&/        /(***#**,       (%/%/#%.  ,*  /%&(/( &
//         ((#&&&(*//((%%(#/,        #,,******%        ,*(,(#(#&  .*#%%%&&, .
//         /#*###,. .   ((////,(%,,,,,,,#(%#%##%#%///#**(##*%(#(  ...#%(#@*
//         (##%%(., ..  */*(/%///*((**(&@&&#(**/%%(%*/ ..#/*%(/%    .&/#(#*
//    ..  .###%&#,*,  , *(&((#/ . .,&&%&&&&&&%% .. ..    ,/#(((# .. *#*/%&/
//        ,*%#%&%,*  .. (*,/(/#   %%&%%%&&&%&&&@. .(     ((/(*(&.,. ,((%%#&.. ,.
//    . .... ../&#,...  /(##(#(,.(*(#%(%%//(&#/,/ *      #/(%&#%.   ,#&%,,,,,
//     .  ..,,.    ..,, .%%####*#*/((**.**,.,../,(&      ##/(%#(#(/***,
//                 .   .,,   ,/.   *. .,,        ,*. * .*(.**
//                                   ...

/**
 * Prefix "TOKEN_" is used for token related eligiblity, no need for a wallet address to be retrieved
 * Prefix "WALLET_" is used for wallet related eligiblity, need a wallet address to be retrieved
 */
enum Eligibility {
    TOKEN_SUPPLY_EXHAUSTED,
    WALLET_NOT_ALLOWED,
    TOKEN_MINT_CLOSE,
    TOKEN_MINT_OPEN,
    WALLET_ALREADY_MINTED,
    WALLET_ELIGIBLE
}

struct Season {
    // Art pieces
    uint256 nbArtPieces; // Exact number of art pieces
    mapping(uint256 => uint256) artPieceOrderNumbers; // ArtPieceId => orderNumber, used to order art pieces for the artfest
    // Schedule
    uint256 startDate; // Season start date (in seconds, since unix epoch)
    uint256 duration; // Season duration (in seconds)
    uint256 durationBetweenSales; // Duration between each art piece claim start date (in seconds)
    // Supply
    mapping(uint256 => uint256) artPieceSupplies; // ArtPieceId => Supply
    mapping(uint256 => uint256) artPieceMintedSupplies; // ArtPieceId => MintedSupply
    mapping(uint256 => mapping(address => bool)) artPieceMintFlags; // ArtPieceId => mapping(Wallet => MintedFlag)
    // Merkle tree
    mapping(uint256 => bytes32) artPieceMerkleRoots; // ArtPieceId => MerkleRoot
    address royaltyAddress; // Will be a Payment Splitter Contract
    mapping(uint256 => uint256) artPiecePrices; // ArtPieceId => Price
}

error NoDelegation();
error MintNotAllowed();
error IdTooBig();
error NbArtPiecesNotSet();
error InputTooBig();
error FailedWithdraw();
error SeasonIdTooLow();
error ArtPieceAlreadySet();
error ForbiddenPaidClaim();
error ArtPieceNotForSale();
error ValueTooLarge();
error FreeClaimOnly();

/**
 * @title ArtFest
 * @author WoW Studio LTD
 */
contract ArtFest is
    Initializable,
    ERC1155Upgradeable,
    DefaultOperatorFiltererUpgradeable,
    OwnableUpgradeable,
    PausableUpgradeable,
    UUPSUpgradeable,
    ERC2981Upgradeable
{
    address public constant DC_ADDR = 0x00000000000076A84feF008CDAbe6409d2FE638B;

    address public constant WARM_ADDR = 0xC3AA9bc72Bd623168860a1e5c6a4530d3D80456c;

    uint256 public constant FREE_CLAIM_ONLY_WINDOW = 12 hours;

    uint256 public currentSeasonId;
    mapping(uint256 => Season) public seasons;

    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor() {
        _disableInitializers();
    }

    function initialize(
        string memory uri_,
        address royaltyAddress,
        uint96 royaltyFee
    ) public initializer {
        __ERC1155_init(uri_);
        __Ownable_init();
        __Pausable_init();
        __DefaultOperatorFilterer_init();
        __ERC2981_init();
        __UUPSUpgradeable_init();

        _setDefaultRoyalty(royaltyAddress, royaltyFee);
    }

    function _checkDelegateCash(address addr) internal view returns (bool) {
        IDelegationRegistry dc = IDelegationRegistry(DC_ADDR);
        return dc.checkDelegateForAll(_msgSender(), addr);
    }

    function _checkWarmXyz(address addr) internal view virtual returns (bool) {
        IHotWalletProxy hotWalletProxy = IHotWalletProxy(WARM_ADDR);
        return hotWalletProxy.getHotWallet(addr) == _msgSender();
    }

    ////////////////////////////
    // Mint
    ////////////////////////////

    /**
     * @notice Mint 1 ArtPiece to an Addr
     *
     * @param addr The account which will receive the tokens
     * @param artPieceId ArtPiece ID
     * @param merkleProof Merkle proof
     *
     */
    function mint(
        address addr,
        uint256 artPieceId,
        bytes32[] calldata merkleProof
    ) external whenNotPaused payable {
        Season storage currentSeason = seasons[currentSeasonId];
        bool isEligible = getArtPieceEligibility(addr, currentSeasonId, artPieceId, merkleProof) == Eligibility.WALLET_ELIGIBLE;
        uint256 price = seasons[currentSeasonId].artPiecePrices[artPieceId];

        if (_msgSender() != addr && !_checkDelegateCash(addr) && !_checkWarmXyz(addr)) {
            revert NoDelegation();
        }

        if (!isEligible) {
            if (!_isFreeClaimOnlyWindowEnded(currentSeasonId, artPieceId)) revert FreeClaimOnly();
            if (price == 0) revert ArtPieceNotForSale();
            if (!_hasEnoughSupply(currentSeasonId, artPieceId)) revert MintNotAllowed();
            if (msg.value < price) revert MintNotAllowed();
            if (msg.value > price) revert ValueTooLarge();
        } else {
            if (msg.value > 0) revert ForbiddenPaidClaim();
        }

        uint256 tokenId = _getTokenId(currentSeasonId, artPieceId);

        currentSeason.artPieceMintFlags[artPieceId][addr] = true;
        unchecked {
            ++currentSeason.artPieceMintedSupplies[artPieceId];
        }

        _mint(addr, tokenId, 1, "");
    }

    ////////////////////////////
    // Mint batch
    ////////////////////////////

    /**
     * @notice Mint multiple ArtPieces to an Addr
     *
     * @param addr The account which will receive the tokens
     * @param artPieceIds ArtPiece IDs
     * @param merkleProofs Merkle proofs
     *
     */
    function mintBatch(
        address addr,
        uint256[] calldata artPieceIds,
        bytes32[][] calldata merkleProofs
    ) external whenNotPaused {
        Season storage currentSeason = seasons[currentSeasonId];

        if (_msgSender() != addr && !_checkDelegateCash(addr) && !_checkWarmXyz(addr)) {
            revert NoDelegation();
        }

        uint256[] memory tokenIds = new uint256[](artPieceIds.length);
        uint256[] memory amounts = new uint256[](artPieceIds.length);

        for (uint256 i = 0; i < artPieceIds.length; i++) {
            uint256 artPieceId = artPieceIds[i];

            if (
                getArtPieceEligibility(addr, currentSeasonId, artPieceId, merkleProofs[i]) !=
                Eligibility.WALLET_ELIGIBLE
            ) revert MintNotAllowed();

            uint256 tokenId = _getTokenId(currentSeasonId, artPieceId);

            currentSeason.artPieceMintFlags[artPieceId][addr] = true;

            unchecked {
                ++currentSeason.artPieceMintedSupplies[artPieceId];
            }

            tokenIds[i] = tokenId;
            amounts[i] = 1;
        }

        _mintBatch(addr, tokenIds, amounts, "");
    }

    ////////////////////////////
    // Eligibility
    ////////////////////////////

    /**
     * @notice Check if an address can mint a set of ArtPieces for a specific Season
     *
     * @param addr Address checked for eligibility
     * @param seasonId Season ID
     * @param artPieceIds List of ArtPieces IDs
     * @param merkleProofs List of Merkle proofs
     *
     * @dev
     * - We check that the address is in all the requested token current season's merkle proof.
     * - We check that none of the artPiece for the address has already been minted
     */
    function getArtPieceEligibilities(
        address addr,
        uint256 seasonId,
        uint256[] calldata artPieceIds,
        bytes32[][] calldata merkleProofs
    ) external view returns (Eligibility[] memory output) {
        output = new Eligibility[](artPieceIds.length);

        for (uint256 i = 0; i < artPieceIds.length; i++) {
            output[i] = getArtPieceEligibility(addr, seasonId, artPieceIds[i], merkleProofs[i]);
        }

        return output;
    }

    /**
     * @notice Check if an address can mint an ArtPiece for a specific Season
     *
     * @param addr Address checked for eligibility
     * @param seasonId Season ID
     * @param artPieceId ArtPiece ID
     * @param merkleProof Merkle proof
     *
     * @dev
     * - We check that the address is in all the requested token current season's merkle proof.
     * - We check that none of the artPiece for the address has already been minted
     */
    function getArtPieceEligibility(
        address addr,
        uint256 seasonId,
        uint256 artPieceId,
        bytes32[] calldata merkleProof
    ) public view returns (Eligibility) {
        bytes32 leaf = keccak256(abi.encodePacked(addr));

        if (artPieceId >= seasons[seasonId].nbArtPieces) revert IdTooBig();

        if (_hasMinted(seasonId, artPieceId, addr)) {
            return Eligibility.WALLET_ALREADY_MINTED;
        }

        if (!_hasEnoughSupply(seasonId, artPieceId)) {
            return Eligibility.TOKEN_SUPPLY_EXHAUSTED;
        }

        if (!_isAllowed(seasonId, artPieceId, merkleProof, leaf)) {
            return Eligibility.WALLET_NOT_ALLOWED;
        }

        if (!_isMintOpen(seasonId, artPieceId)) {
            return Eligibility.TOKEN_MINT_CLOSE;
        }

        return Eligibility.WALLET_ELIGIBLE;
    }

    /**
     * @notice Check if the festival is open or close
     */
    function isFestOpen() external view returns (bool) {
        return _isFestOpen();
    }

    function _isFestOpen() private view returns (bool) {
        Season storage currentSeason = seasons[currentSeasonId];
        uint256 startDate = currentSeason.startDate;
        if (startDate == 0) {
            // Season start date missing
            return false;
        }

        uint256 endDate = startDate + currentSeason.duration;
        uint256 ts = block.timestamp;

        return ts >= startDate && ts <= endDate;
    }

    /**
     * @notice check if a token can be minted
     *
     * @param artPieceId ArtPiece ID
     */
    function isMintOpen(uint256 artPieceId) external view returns (bool) {
        return _isMintOpen(currentSeasonId, artPieceId);
    }

    function _isMintOpen(uint256 seasonId, uint256 artPieceId) private view returns (bool) {
        Season storage currentSeason = seasons[seasonId];
        uint256 startDate = currentSeason.startDate;
        if (startDate == 0) {
            // Season start date missing
            return false;
        }

        uint256 artPieceOrderNumbersIndex = seasons[seasonId].artPieceOrderNumbers[artPieceId];
        uint256 artPieceStartDate = startDate +
            currentSeason.durationBetweenSales *
            artPieceOrderNumbersIndex;
        uint256 endDate = startDate + currentSeason.duration;
        uint256 ts = block.timestamp;

        return ts >= artPieceStartDate && ts <= endDate;
    }

    function _isFreeClaimOnlyWindowEnded(uint256 seasonId, uint256 artPieceId) private view returns (bool) {
        Season storage currentSeason = seasons[seasonId];
        uint256 artPieceOrderNumbersIndex = seasons[seasonId].artPieceOrderNumbers[artPieceId];
        uint256 artPieceFreeClaimOnlyWindowEndDate = currentSeason.startDate +
            currentSeason.durationBetweenSales *
            artPieceOrderNumbersIndex + uint256(FREE_CLAIM_ONLY_WINDOW);
        return block.timestamp >= artPieceFreeClaimOnlyWindowEndDate;
    }

    /**
     * @notice check if a user has minted a token
     *
     * @param artPieceId ArtPiece ID
     * @param addr User address
     */
    function hasMinted(uint256 artPieceId, address addr) external view returns (bool) {
        return _hasMinted(currentSeasonId, artPieceId, addr);
    }

    function _hasMinted(
        uint256 seasonId,
        uint256 artPieceId,
        address addr
    ) private view returns (bool) {
        return seasons[seasonId].artPieceMintFlags[artPieceId][addr];
    }

    /**
     * @notice check if an art piece has supply left (> 0) for the current season
     *
     * @param artPieceId ArtPiece ID
     */
    function hasEnoughSupply(uint256 artPieceId) external view returns (bool) {
        return _hasEnoughSupply(currentSeasonId, artPieceId);
    }

    function _hasEnoughSupply(uint256 seasonId, uint256 artPieceId) private view returns (bool) {
        return
            seasons[seasonId].artPieceMintedSupplies[artPieceId] <
            seasons[seasonId].artPieceSupplies[artPieceId];
    }

    /**
     * @notice check if a Leaf is in the Merkle Proof (is a user is allowed to mint)
     *
     * @param artPieceId ArtPiece ID
     * @param merkleProof Merkle proof
     * @param leaf Merkle leaf (wallet address)
     */
    function isAllowed(
        uint256 artPieceId,
        bytes32[] memory merkleProof,
        bytes32 leaf
    ) external view returns (bool) {
        return _isAllowed(currentSeasonId, artPieceId, merkleProof, leaf);
    }

    function _isAllowed(
        uint256 seasonId,
        uint256 artPieceId,
        bytes32[] memory merkleProof,
        bytes32 leaf
    ) private view returns (bool) {
        bytes32 currentArtPieceMerkleRoot = seasons[seasonId].artPieceMerkleRoots[artPieceId];
        return MerkleProof.verify(merkleProof, currentArtPieceMerkleRoot, leaf);
    }

    ////////////////////////////
    // Getters/Setters
    ////////////////////////////

    /**
     * @notice Get the season information as a JSON
     *
     * @return string A JSON  like {'is-festival-open': bool, 'art-pieces': { hexString: uint, ... }}
     */
    function getSeasonInformation(uint256 seasonId) external view returns (string memory) {
        Season storage season = seasons[seasonId];
        bytes memory isFestOpenJSON;
        if (_isFestOpen()) {
            isFestOpenJSON = abi.encodePacked('"is-festival-open":true');
        } else {
            isFestOpenJSON = abi.encodePacked('"is-festival-open":false');
        }

        bytes memory artPieces = abi.encodePacked('"art-pieces":{');
        for (uint256 i = 0; i < season.nbArtPieces; i++) {
            uint256 id = _getTokenId(seasonId, i);

            artPieces = abi.encodePacked(
                artPieces,
                '"',
                Strings.toHexString(id, 32),
                '":',
                Strings.toString(uint256(_getArtPieceStatus(seasonId, i)))
            );

            if (i != season.nbArtPieces - 1) {
                artPieces = abi.encodePacked(artPieces, ",");
            }
        }
        artPieces = abi.encodePacked(artPieces, "}");

        // prettier-ignore
        return string(
            abi.encodePacked(
                "{",
                    isFestOpenJSON, ",",
                    artPieces,
                "}"
            )
        );
    }

    /**
     * @notice Returns all the queried ArtPieces statuses (open / supply left / closed)
     *
     * @param seasonId Season ID
     * @param artPieceIds array ArtPiece ID
     */
    function getArtPieceStatuses(
        uint256 seasonId,
        uint256[] calldata artPieceIds
    ) external view returns (Eligibility[] memory output) {
        output = new Eligibility[](artPieceIds.length);

        for (uint256 i = 0; i < artPieceIds.length; i++) {
            output[i] = _getArtPieceStatus(seasonId, artPieceIds[i]);
        }

        return output;
    }

    /**
     * @notice Return the Status of an ArtPiece (open / supply left / closed)
     *
     * @param seasonId Season ID
     * @param artPieceId ArtPiece ID
     */
    function _getArtPieceStatus(
        uint256 seasonId,
        uint256 artPieceId
    ) internal view returns (Eligibility) {
        if (artPieceId >= seasons[seasonId].nbArtPieces) revert IdTooBig();

        if (!_hasEnoughSupply(seasonId, artPieceId)) {
            return Eligibility.TOKEN_SUPPLY_EXHAUSTED;
        }

        if (!_isMintOpen(currentSeasonId, artPieceId)) {
            return Eligibility.TOKEN_MINT_CLOSE;
        }

        return Eligibility.TOKEN_MINT_OPEN;
    }

    /**
     * @notice Set a current season with all the required data about art pieces
     *
     * @param nbArtPieces Number of ArtPieces
     * @param artPieceIds List of ArtPieces IDs
     * @param artPieceOrderNumbers List of art piece order numbers
     * @param artPieceSupplies List of art piece supplies
     * @param merkleRoots List of Merkle roots
     */
    function setCurrentSeasonArtPieceData(
        uint256 nbArtPieces,
        uint256[] calldata artPieceIds,
        uint256[] calldata artPieceOrderNumbers,
        uint256[] calldata artPieceSupplies,
        bytes32[] calldata merkleRoots,
        uint256[] calldata artPiecePrices
    ) external onlyOwner {
        // ArtPieces
        setNbArtPieces(nbArtPieces);
        setArtPieceOrderNumbers(artPieceIds, artPieceOrderNumbers);
        setArtPieceSupplies(artPieceIds, artPieceSupplies);
        setArtPiecePrices(artPieceIds, artPiecePrices);

        // Set Merkle Root
        setMerkleRoots(artPieceIds, merkleRoots);
    }

    /**
     * @notice Set current season time data
     *
     * @param timestampStartDate Season start date as a UNIX number in seconds
     * @param duration Sale duration in seconds
     * @param durationBetweenSales Duration between sales in seconds;
     */
    function setCurrentSeasonTimeData(
        uint256 timestampStartDate,
        uint256 duration,
        uint256 durationBetweenSales
    ) external onlyOwner {
        // Duration of the Season
        setStartDate(timestampStartDate);
        setDuration(duration);
        setDurationBetweenSales(durationBetweenSales);
    }

    /**
     * @notice Increment the current season id
     *
     */
    function incCurrentSeasonIndex() public onlyOwner {
        unchecked {
            ++currentSeasonId;
        }
    }

    /**
     * @notice Set the number of ArtPieces of the current season
     *
     * @param nbArtPieces Number of ArtPieces
     */
    function setNbArtPieces(uint256 nbArtPieces) public onlyOwner {
        if (nbArtPieces > type(uint16).max) revert InputTooBig();

        Season storage currentSeason = seasons[currentSeasonId];
        currentSeason.nbArtPieces = nbArtPieces;
    }

    /**
     * @notice Get tokens total supply
     *
     * @param seasonId Season ID
     * @param artPieceIds List of ArtPieces IDs
     */
    function getArtPieceOrderNumbers(
        uint256 seasonId,
        uint256[] calldata artPieceIds
    ) external view returns (uint256[] memory) {
        uint256[] memory _artPieceOrderNumbers = new uint256[](artPieceIds.length);
        for (uint256 i = 0; i < artPieceIds.length; i++) {
            uint256 artPieceId = artPieceIds[i];
            if (artPieceId >= seasons[seasonId].nbArtPieces) revert IdTooBig();

            _artPieceOrderNumbers[i] = seasons[seasonId].artPieceOrderNumbers[artPieceId];
        }

        return _artPieceOrderNumbers;
    }

    /**
     * @notice Set the current season startDate
     *
     * @param artPieceIds List of ArtPieces IDs
     * @param artPieceOrderNumbers List of art piece order numbers
     */
    function setArtPieceOrderNumbers(
        uint256[] calldata artPieceIds,
        uint256[] calldata artPieceOrderNumbers
    ) public onlyOwner {
        Season storage currentSeason = seasons[currentSeasonId];

        for (uint256 i = 0; i < artPieceIds.length; i++) {
            uint256 artPieceId = artPieceIds[i];
            uint256 artPieceIdx = artPieceOrderNumbers[i];

            currentSeason.artPieceOrderNumbers[artPieceId] = artPieceIdx;
        }
    }

    /**
     * @notice Set the current season startDate
     *
     * @param timestamp Season start date as a UNIX number in seconds
     */
    function setStartDate(uint256 timestamp) public onlyOwner {
        seasons[currentSeasonId].startDate = timestamp;
    }

    /**
     * @notice Set the sale duration
     *
     * @param duration Sale duration in seconds
     */
    function setDuration(uint256 duration) public onlyOwner {
        seasons[currentSeasonId].duration = duration;
    }

    /**
     * @notice Set the duration between sales
     *
     * @param durationBetweenSales Duration between sales in seconds;
     */
    function setDurationBetweenSales(uint256 durationBetweenSales) public onlyOwner {
        seasons[currentSeasonId].durationBetweenSales = durationBetweenSales;
    }

    /**
     * @notice Get tokens total supply
     *
     * @param seasonId Season ID
     * @param artPieceIds List of ArtPieces IDs
     */
    function getArtPieceSupplies(
        uint256 seasonId,
        uint256[] calldata artPieceIds
    ) external view returns (uint256[] memory) {
        uint256[] memory artPieceSupplies = new uint256[](artPieceIds.length);
        for (uint256 i = 0; i < artPieceIds.length; i++) {
            uint256 artPieceId = artPieceIds[i];
            if (artPieceId >= seasons[seasonId].nbArtPieces) revert IdTooBig();

            artPieceSupplies[i] = seasons[seasonId].artPieceSupplies[artPieceId];
        }

        return artPieceSupplies;
    }

    /**
     * @notice Get tokens prices
     *
     * @param seasonId Season ID
     * @param artPieceIds List of ArtPieces IDs
     */
    function getArtPiecePrices(
        uint256 seasonId,
        uint256[] calldata artPieceIds
    ) external view returns (uint256[] memory) {
        uint256[] memory artPiecePrices = new uint256[](artPieceIds.length);
        for (uint256 i = 0; i < artPieceIds.length; i++) {
            uint256 artPieceId = artPieceIds[i];
            if (artPieceId >= seasons[seasonId].nbArtPieces) revert IdTooBig();

            artPiecePrices[i] = seasons[seasonId].artPiecePrices[artPieceId];
        }

        return artPiecePrices;
    }

    /**
     * @notice Set the total supply for current season art pieces
     *
     * @param artPieceIds List of ArtPieces IDs
     * @param artPieceSupplies List of art piece supplies
     */
    function setArtPieceSupplies(
        uint256[] calldata artPieceIds,
        uint256[] calldata artPieceSupplies
    ) public onlyOwner {
        Season storage currentSeason = seasons[currentSeasonId];

        if (currentSeason.nbArtPieces == 0) revert NbArtPiecesNotSet();
        if (artPieceIds.length > type(uint16).max) revert InputTooBig();

        for (uint256 i = 0; i < artPieceIds.length; i++) {
            uint256 artPieceId = artPieceIds[i];
            if (artPieceId >= currentSeason.nbArtPieces) revert IdTooBig();

            currentSeason.artPieceSupplies[artPieceId] = artPieceSupplies[i];
        }
    }

    /**
     * @notice Set the price of art pieces for current season
     *
     * @param artPieceIds List of ArtPieces IDs
     * @param artPiecePrices List of art piece prices
     */
    function setArtPiecePrices(
        uint256[] calldata artPieceIds,
        uint256[] calldata artPiecePrices
    ) public onlyOwner {
        Season storage currentSeason = seasons[currentSeasonId];

        if (currentSeason.nbArtPieces == 0) revert NbArtPiecesNotSet();
        if (artPieceIds.length > type(uint16).max) revert InputTooBig();

        for (uint256 i = 0; i < artPieceIds.length; i++) {
            uint256 artPieceId = artPieceIds[i];
            if (artPieceId >= currentSeason.nbArtPieces) revert IdTooBig();

            currentSeason.artPiecePrices[artPieceId] = artPiecePrices[i];
        }
    }

    /**
     * @notice Get tokens total supply left
     *
     * @param seasonId Season ID
     */
    function getNbTokenLeft(uint256 seasonId) external view returns (uint256[] memory nbTokenLeft) {
        uint256 nbSeasonArtpiece = seasons[seasonId].nbArtPieces;
        nbTokenLeft = new uint256[](nbSeasonArtpiece);
        for (uint256 i = 0; i < nbSeasonArtpiece; i++) {
            nbTokenLeft[i] =
                seasons[seasonId].artPieceSupplies[i] -
                seasons[seasonId].artPieceMintedSupplies[i];
        }

        return nbTokenLeft;
    }

    /**
     * @notice Get tokens minted supply
     *
     * @param seasonId Season ID
     * @param artPieceIds List of ArtPieces IDs
     */
    function getMintedSupplies(
        uint256 seasonId,
        uint256[] calldata artPieceIds
    ) external view returns (uint256[] memory mintedSupplies) {
        mintedSupplies = new uint256[](artPieceIds.length);
        for (uint256 i = 0; i < artPieceIds.length; i++) {
            uint256 artPieceId = artPieceIds[i];
            if (artPieceId >= seasons[seasonId].nbArtPieces) revert IdTooBig();

            mintedSupplies[i] = seasons[seasonId].artPieceMintedSupplies[artPieceId];
        }

        return mintedSupplies;
    }

    /**
     * @notice Set the merkle root for current season artPieces
     *
     * @param seasonId Season ID
     * @param artPieceIds List of ArtPieces IDs
     */
    function getMerkleRoots(
        uint256 seasonId,
        uint256[] calldata artPieceIds
    ) external view returns (bytes32[] memory merkleRoots) {
        Season storage currentSeason = seasons[seasonId];

        merkleRoots = new bytes32[](artPieceIds.length);
        for (uint256 i = 0; i < artPieceIds.length; i++) {
            uint256 artPieceId = artPieceIds[i];
            if (artPieceId >= seasons[seasonId].nbArtPieces) revert IdTooBig();

            merkleRoots[i] = currentSeason.artPieceMerkleRoots[artPieceId];
        }

        return merkleRoots;
    }

    /**
     * @notice Set the merkle root for current season artPieces
     *
     * @param artPieceIds List of ArtPieces IDs
     * @param merkleRoots List of Merkle roots
     */
    function setMerkleRoots(
        uint256[] calldata artPieceIds,
        bytes32[] calldata merkleRoots
    ) public onlyOwner {
        Season storage currentSeason = seasons[currentSeasonId];

        if (currentSeason.nbArtPieces == 0) revert NbArtPiecesNotSet();

        for (uint256 i = 0; i < artPieceIds.length; i++) {
            uint256 artPieceId = artPieceIds[i];
            if (artPieceId >= currentSeason.nbArtPieces) revert IdTooBig();

            currentSeason.artPieceMerkleRoots[artPieceId] = merkleRoots[i];
        }
    }

    /**
     * @notice Return the ERC1155 token ID
     *
     * @param seasonId Season ID
     * @param artPieceId The ArtPiece ID
     */
    function getTokenId(
        uint256 seasonId,
        uint256 artPieceId
    ) external view returns (uint256 tokenId) {
        return _getTokenId(seasonId, artPieceId);
    }

    function _getTokenId(
        uint256 seasonId,
        uint256 artPieceId
    ) internal view returns (uint256 tokenId) {
        if (artPieceId >= seasons[seasonId].nbArtPieces) revert IdTooBig();

        tokenId = (seasonId << 16) | uint16(artPieceId);

        return tokenId;
    }

    /**
     * @notice Returns the suppply of tokens for next season, given a Supply Coefficient
     *
     * @param seasonId Season ID
     * @param supplyCoefficient By how much the supply will be increased/decreased (in base precisionCoeff (10^6) so 125000 = 12.5%)
     *
     * @dev The formula used to compute next supplies is the one used to increase/decrease Ethereum base fee
     */
    function getNextSupplies(
        uint256 seasonId,
        int256 supplyCoefficient
    ) external view returns (int256[] memory newSupplies) {
        int256 precisionCoeff = 10 ** 6;
        uint256 nbSeasonArtpiece = seasons[seasonId].nbArtPieces;
        newSupplies = new int256[](nbSeasonArtpiece);
        for (uint256 i = 0; i < nbSeasonArtpiece; i++) {
            int256 ts = int256(seasons[seasonId].artPieceSupplies[i]);
            int256 ms = int256(seasons[seasonId].artPieceMintedSupplies[i]);

            if (ts == 0) {
                newSupplies[i] = 0;
            } else {
                int256 a = supplyCoefficient * ((2 * (ms * precisionCoeff)) / ts - precisionCoeff);
                newSupplies[i] = ts + (ts * a) / precisionCoeff ** 2;
            }
        }

        return newSupplies;
    }

    /**
     * @notice Set the _uri parameter
     *
     * @param newuri A global uri for all the tokens Following EIP-1155, should contain `{id}`
     */
    function setURI(string memory newuri) external onlyOwner {
        _setURI(newuri);
    }

    /**
     * @notice Pause the minting of tokens for current season
     */
    function pauseCurrentSeason() external onlyOwner {
        _pause();
    }

    /**
     * @notice Unpause the minting of tokens for current season
     */
    function unpauseCurrentSeason() external onlyOwner {
        _unpause();
    }

    /**
     * @inheritdoc IERC2981Upgradeable
     */
    function royaltyInfo(
        uint256 _tokenId,
        uint256 _salePrice
    ) public view virtual override returns (address, uint256) {
        (address receiver, uint256 royaltyAmount) = super.royaltyInfo(_tokenId, _salePrice);

        // Get the 240 first bits of the _tokenId
        uint256 seasonId = _tokenId >> 16;
        // We check if the season has a royalty address set, otherwise we keep the default royalty address
        if (seasons[seasonId].royaltyAddress != address(0)) {
            receiver = seasons[seasonId].royaltyAddress;
        }

        return (receiver, royaltyAmount);
    }

    /**
     * @notice Change the royalty fee for the collection
     *
     * @param newRoyaltyAddress new Address that will receive the royalties
     * @param feeNumerator new Fee for the Royalties
     */
    function setRoyaltyInfo(address newRoyaltyAddress, uint96 feeNumerator) external onlyOwner {
        _setDefaultRoyalty(newRoyaltyAddress, feeNumerator);
    }

    /**
     * @notice Set Royalty Address for a season. We want to be able to change this address even for past seasons in case
     * a Payee loses access to their wallet
     *
     * @param seasonId Season ID
     * @param paymentSplitterAddress Address of the Payment Splitter
     */
    function setRoyaltyAddress(uint256 seasonId, address paymentSplitterAddress) public onlyOwner {
        if (seasonId > currentSeasonId) revert IdTooBig();
        Season storage season = seasons[seasonId];
        season.royaltyAddress = paymentSplitterAddress;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(
        bytes4 interfaceId
    ) public view virtual override(ERC1155Upgradeable, ERC2981Upgradeable) returns (bool) {
        return super.supportsInterface(interfaceId);
    }

    /**
     * @notice Allow withdrawing funds to the withdrawAddress
     */
    function withdraw() external onlyOwner {
        uint256 balance = address(this).balance;

        (bool sent, ) = _msgSender().call{value: balance}("");
        if (!sent) revert FailedWithdraw();
    }

    /**
     * @notice Owner-only method: add a new Artpiece to a specific season
     *
     * @param seasonId Season ID
     */
    function addArtPieceToSeason(uint256 seasonId) external onlyOwner {
        Season storage season = seasons[seasonId];

        // Increment the number of ArtPieces in the season
        season.nbArtPieces++;
        uint256 newArtPieceId = season.nbArtPieces - 1;

        // We are setting an artPieceOrderNumber bigger than the 15 first ArtPieces
        season.artPieceOrderNumbers[newArtPieceId] = newArtPieceId;
    }

    /**
     * @notice Owner-only method: airdrop a specific artpiece to a list of addresses
     *
     * @param seasonId Season ID
     * @param artPieceId ArtPiece ID
     * @param addresses List of addresses to airdrop to
     * @param amounts List of amounts to airdrop to each address
     */
    function airdropArtPiece(
        uint256 seasonId,
        uint256 artPieceId,
        address[] memory addresses,
        uint256[] memory amounts
    ) external onlyOwner {
        Season storage season = seasons[seasonId];

        if (artPieceId >= season.nbArtPieces) revert IdTooBig();

        uint256 tokenId = _getTokenId(seasonId, artPieceId);
        uint256 addedSupply = 0;

        for (uint256 i = 0; i < addresses.length; i++) {
            season.artPieceMintFlags[artPieceId][addresses[i]] = true;
            addedSupply += amounts[i];
            _mint(addresses[i], tokenId, amounts[i], "");
        }

        season.artPieceSupplies[artPieceId] += addedSupply;
        season.artPieceMintedSupplies[artPieceId] += addedSupply;
    }

    /**
     * @dev See {UUPSUpgradeable-_authorizeUpgrade}.
     */
    function _authorizeUpgrade(address) internal override onlyOwner {} // solhint-disable-line

    /**
     * @dev Operator Filter registry
     */

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

File 2 of 27 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../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 anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

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

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

    /**
     * @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 3 of 27 : draft-IERC1822Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)

pragma solidity ^0.8.0;

/**
 * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
 * proxy whose upgrades are fully controlled by the current implementation.
 */
interface IERC1822ProxiableUpgradeable {
    /**
     * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
     * address.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy.
     */
    function proxiableUUID() external view returns (bytes32);
}

File 4 of 27 : IERC2981Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

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

File 5 of 27 : IBeaconUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.0;

/**
 * @dev This is the interface that {BeaconProxy} expects of its beacon.
 */
interface IBeaconUpgradeable {
    /**
     * @dev Must return an address that can be used as a delegate call target.
     *
     * {BeaconProxy} will check that this address is a contract.
     */
    function implementation() external view returns (address);
}

File 6 of 27 : ERC1967UpgradeUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)

pragma solidity ^0.8.2;

import "../beacon/IBeaconUpgradeable.sol";
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/StorageSlotUpgradeable.sol";
import "../utils/Initializable.sol";

/**
 * @dev This abstract contract provides getters and event emitting update functions for
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
 *
 * _Available since v4.1._
 *
 * @custom:oz-upgrades-unsafe-allow delegatecall
 */
abstract contract ERC1967UpgradeUpgradeable is Initializable {
    function __ERC1967Upgrade_init() internal onlyInitializing {
    }

    function __ERC1967Upgrade_init_unchained() internal onlyInitializing {
    }
    // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Returns the current implementation address.
     */
    function _getImplementation() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 implementation slot.
     */
    function _setImplementation(address newImplementation) private {
        require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract");
        StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
    }

    /**
     * @dev Perform implementation upgrade
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeTo(address newImplementation) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    /**
     * @dev Perform implementation upgrade with additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCall(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        _upgradeTo(newImplementation);
        if (data.length > 0 || forceCall) {
            _functionDelegateCall(newImplementation, data);
        }
    }

    /**
     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCallUUPS(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        // Upgrades from old implementations will perform a rollback test. This test requires the new
        // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
        // this special case will break upgrade paths from old UUPS implementation to new ones.
        if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {
            _setImplementation(newImplementation);
        } else {
            try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {
                require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
            } catch {
                revert("ERC1967Upgrade: new implementation is not UUPS");
            }
            _upgradeToAndCall(newImplementation, data, forceCall);
        }
    }

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Returns the current admin.
     */
    function _getAdmin() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 admin slot.
     */
    function _setAdmin(address newAdmin) private {
        require(newAdmin != address(0), "ERC1967: new admin is the zero address");
        StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {AdminChanged} event.
     */
    function _changeAdmin(address newAdmin) internal {
        emit AdminChanged(_getAdmin(), newAdmin);
        _setAdmin(newAdmin);
    }

    /**
     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
     * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
     */
    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

    /**
     * @dev Emitted when the beacon is upgraded.
     */
    event BeaconUpgraded(address indexed beacon);

    /**
     * @dev Returns the current beacon.
     */
    function _getBeacon() internal view returns (address) {
        return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;
    }

    /**
     * @dev Stores a new beacon in the EIP1967 beacon slot.
     */
    function _setBeacon(address newBeacon) private {
        require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract");
        require(
            AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),
            "ERC1967: beacon implementation is not a contract"
        );
        StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;
    }

    /**
     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
     *
     * Emits a {BeaconUpgraded} event.
     */
    function _upgradeBeaconToAndCall(
        address newBeacon,
        bytes memory data,
        bool forceCall
    ) internal {
        _setBeacon(newBeacon);
        emit BeaconUpgraded(newBeacon);
        if (data.length > 0 || forceCall) {
            _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);
        }
    }

    /**
     * @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) private returns (bytes memory) {
        require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed");
    }

    /**
     * @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 7 of 27 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.1) (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]
 * ```
 * 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 8 of 27 : UUPSUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol)

pragma solidity ^0.8.0;

import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../ERC1967/ERC1967UpgradeUpgradeable.sol";
import "./Initializable.sol";

/**
 * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
 * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
 *
 * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
 * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
 * `UUPSUpgradeable` with a custom implementation of upgrades.
 *
 * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
 *
 * _Available since v4.1._
 */
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {
    function __UUPSUpgradeable_init() internal onlyInitializing {
    }

    function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
    }
    /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
    address private immutable __self = address(this);

    /**
     * @dev Check that the execution is being performed through a delegatecall call and that the execution context is
     * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case
     * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
     * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
     * fail.
     */
    modifier onlyProxy() {
        require(address(this) != __self, "Function must be called through delegatecall");
        require(_getImplementation() == __self, "Function must be called through active proxy");
        _;
    }

    /**
     * @dev Check that the execution is not being performed through a delegate call. This allows a function to be
     * callable on the implementing contract but not through proxies.
     */
    modifier notDelegated() {
        require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall");
        _;
    }

    /**
     * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
     * implementation. It is used to validate the implementation's compatibility when performing an upgrade.
     *
     * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
     * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
     * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
     */
    function proxiableUUID() external view virtual override notDelegated returns (bytes32) {
        return _IMPLEMENTATION_SLOT;
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     */
    function upgradeTo(address newImplementation) external virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, new bytes(0), false);
    }

    /**
     * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
     * encoded in `data`.
     *
     * Calls {_authorizeUpgrade}.
     *
     * Emits an {Upgraded} event.
     */
    function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {
        _authorizeUpgrade(newImplementation);
        _upgradeToAndCallUUPS(newImplementation, data, true);
    }

    /**
     * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
     * {upgradeTo} and {upgradeToAndCall}.
     *
     * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
     *
     * ```solidity
     * function _authorizeUpgrade(address) internal override onlyOwner {}
     * ```
     */
    function _authorizeUpgrade(address newImplementation) internal virtual;

    /**
     * @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 9 of 27 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal onlyInitializing {
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }

    /**
     * @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 10 of 27 : ERC2981Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981Upgradeable.sol";
import "../../utils/introspection/ERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981Upgradeable is Initializable, IERC2981Upgradeable, ERC165Upgradeable {
    function __ERC2981_init() internal onlyInitializing {
    }

    function __ERC2981_init_unchained() internal onlyInitializing {
    }
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

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

    /**
     * @inheritdoc IERC2981Upgradeable
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }

    /**
     * @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 11 of 27 : ERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 "../../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 12 of 27 : 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 13 of 27 : 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 14 of 27 : IERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 15 of 27 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return 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 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 16 of 27 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../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;
    }

    /**
     * @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 17 of 27 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../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 18 of 27 : 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 19 of 27 : StorageSlotUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._
 */
library StorageSlotUpgradeable {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
            }
        }
        return computedHash;
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 22 of 27 : IDelegationRegistry.sol
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.17;

/**
 * @title An immutable registry contract to be deployed as a standalone primitive
 * @dev See EIP-5639, new project launches can read previous cold wallet -> hot wallet delegations
 *      from here and integrate those permissions into their flow
 */
interface IDelegationRegistry {
    /// @notice Delegation type
    enum DelegationType {
        NONE,
        ALL,
        CONTRACT,
        TOKEN
    }

    /// @notice Info about a single delegation, used for onchain enumeration
    struct DelegationInfo {
        DelegationType type_;
        address vault;
        address delegate;
        address contract_;
        uint256 tokenId;
    }

    /// @notice Info about a single contract-level delegation
    struct ContractDelegation {
        address contract_;
        address delegate;
    }

    /// @notice Info about a single token-level delegation
    struct TokenDelegation {
        address contract_;
        uint256 tokenId;
        address delegate;
    }

    /// @notice Emitted when a user delegates their entire wallet
    event DelegateForAll(address vault, address delegate, bool value);

    /// @notice Emitted when a user delegates a specific contract
    event DelegateForContract(address vault, address delegate, address contract_, bool value);

    /// @notice Emitted when a user delegates a specific token
    event DelegateForToken(
        address vault,
        address delegate,
        address contract_,
        uint256 tokenId,
        bool value
    );

    /// @notice Emitted when a user revokes all delegations
    event RevokeAllDelegates(address vault);

    /// @notice Emitted when a user revoes all delegations for a given delegate
    event RevokeDelegate(address vault, address delegate);

    /**
     * -----------  WRITE -----------
     */

    /**
     * @notice Allow the delegate to act on your behalf for all contracts
     * @param delegate The hotwallet to act on your behalf
     * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking
     */
    function delegateForAll(address delegate, bool value) external;

    /**
     * @notice Allow the delegate to act on your behalf for a specific contract
     * @param delegate The hotwallet to act on your behalf
     * @param contract_ The address for the contract you're delegating
     * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking
     */
    function delegateForContract(address delegate, address contract_, bool value) external;

    /**
     * @notice Allow the delegate to act on your behalf for a specific token
     * @param delegate The hotwallet to act on your behalf
     * @param contract_ The address for the contract you're delegating
     * @param tokenId The token id for the token you're delegating
     * @param value Whether to enable or disable delegation for this address, true for setting and false for revoking
     */
    function delegateForToken(
        address delegate,
        address contract_,
        uint256 tokenId,
        bool value
    ) external;

    /**
     * @notice Revoke all delegates
     */
    function revokeAllDelegates() external;

    /**
     * @notice Revoke a specific delegate for all their permissions
     * @param delegate The hotwallet to revoke
     */
    function revokeDelegate(address delegate) external;

    /**
     * @notice Remove yourself as a delegate for a specific vault
     * @param vault The vault which delegated to the msg.sender, and should be removed
     */
    function revokeSelf(address vault) external;

    /**
     * -----------  READ -----------
     */

    /**
     * @notice Returns all active delegations a given delegate is able to claim on behalf of
     * @param delegate The delegate that you would like to retrieve delegations for
     * @return info Array of DelegationInfo structs
     */
    function getDelegationsByDelegate(
        address delegate
    ) external view returns (DelegationInfo[] memory);

    /**
     * @notice Returns an array of wallet-level delegates for a given vault
     * @param vault The cold wallet who issued the delegation
     * @return addresses Array of wallet-level delegates for a given vault
     */
    function getDelegatesForAll(address vault) external view returns (address[] memory);

    /**
     * @notice Returns an array of contract-level delegates for a given vault and contract
     * @param vault The cold wallet who issued the delegation
     * @param contract_ The address for the contract you're delegating
     * @return addresses Array of contract-level delegates for a given vault and contract
     */
    function getDelegatesForContract(
        address vault,
        address contract_
    ) external view returns (address[] memory);

    /**
     * @notice Returns an array of contract-level delegates for a given vault's token
     * @param vault The cold wallet who issued the delegation
     * @param contract_ The address for the contract holding the token
     * @param tokenId The token id for the token you're delegating
     * @return addresses Array of contract-level delegates for a given vault's token
     */
    function getDelegatesForToken(
        address vault,
        address contract_,
        uint256 tokenId
    ) external view returns (address[] memory);

    /**
     * @notice Returns all contract-level delegations for a given vault
     * @param vault The cold wallet who issued the delegations
     * @return delegations Array of ContractDelegation structs
     */
    function getContractLevelDelegations(
        address vault
    ) external view returns (ContractDelegation[] memory delegations);

    /**
     * @notice Returns all token-level delegations for a given vault
     * @param vault The cold wallet who issued the delegations
     * @return delegations Array of TokenDelegation structs
     */
    function getTokenLevelDelegations(
        address vault
    ) external view returns (TokenDelegation[] memory delegations);

    /**
     * @notice Returns true if the address is delegated to act on the entire vault
     * @param delegate The hotwallet to act on your behalf
     * @param vault The cold wallet who issued the delegation
     */
    function checkDelegateForAll(address delegate, address vault) external view returns (bool);

    /**
     * @notice Returns true if the address is delegated to act on your behalf for a token contract or an entire vault
     * @param delegate The hotwallet to act on your behalf
     * @param contract_ The address for the contract you're delegating
     * @param vault The cold wallet who issued the delegation
     */
    function checkDelegateForContract(
        address delegate,
        address vault,
        address contract_
    ) external view returns (bool);

    /**
     * @notice Returns true if the address is delegated to act on your behalf for a specific token, the token's contract or an entire vault
     * @param delegate The hotwallet to act on your behalf
     * @param contract_ The address for the contract you're delegating
     * @param tokenId The token id for the token you're delegating
     * @param vault The cold wallet who issued the delegation
     */
    function checkDelegateForToken(
        address delegate,
        address vault,
        address contract_,
        uint256 tokenId
    ) external view returns (bool);
}

File 23 of 27 : IHotWalletProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface IHotWalletProxy {
    function getHotWallet(address coldWallet) external view returns (address);

    function getColdWallets(address hotWallet) external view returns (address[] memory);
}

File 24 of 27 : 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 25 of 27 : 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 26 of 27 : 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 27 of 27 : 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": 600
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ArtPieceNotForSale","type":"error"},{"inputs":[],"name":"FailedWithdraw","type":"error"},{"inputs":[],"name":"ForbiddenPaidClaim","type":"error"},{"inputs":[],"name":"FreeClaimOnly","type":"error"},{"inputs":[],"name":"IdTooBig","type":"error"},{"inputs":[],"name":"InputTooBig","type":"error"},{"inputs":[],"name":"MintNotAllowed","type":"error"},{"inputs":[],"name":"NbArtPiecesNotSet","type":"error"},{"inputs":[],"name":"NoDelegation","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"ValueTooLarge","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"DC_ADDR","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FREE_CLAIM_ONLY_WINDOW","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WARM_ADDR","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seasonId","type":"uint256"}],"name":"addArtPieceToSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"seasonId","type":"uint256"},{"internalType":"uint256","name":"artPieceId","type":"uint256"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"airdropArtPiece","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentSeasonId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"seasonId","type":"uint256"},{"internalType":"uint256[]","name":"artPieceIds","type":"uint256[]"},{"internalType":"bytes32[][]","name":"merkleProofs","type":"bytes32[][]"}],"name":"getArtPieceEligibilities","outputs":[{"internalType":"enum Eligibility[]","name":"output","type":"uint8[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"seasonId","type":"uint256"},{"internalType":"uint256","name":"artPieceId","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"getArtPieceEligibility","outputs":[{"internalType":"enum Eligibility","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seasonId","type":"uint256"},{"internalType":"uint256[]","name":"artPieceIds","type":"uint256[]"}],"name":"getArtPieceOrderNumbers","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seasonId","type":"uint256"},{"internalType":"uint256[]","name":"artPieceIds","type":"uint256[]"}],"name":"getArtPiecePrices","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seasonId","type":"uint256"},{"internalType":"uint256[]","name":"artPieceIds","type":"uint256[]"}],"name":"getArtPieceStatuses","outputs":[{"internalType":"enum Eligibility[]","name":"output","type":"uint8[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seasonId","type":"uint256"},{"internalType":"uint256[]","name":"artPieceIds","type":"uint256[]"}],"name":"getArtPieceSupplies","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seasonId","type":"uint256"},{"internalType":"uint256[]","name":"artPieceIds","type":"uint256[]"}],"name":"getMerkleRoots","outputs":[{"internalType":"bytes32[]","name":"merkleRoots","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seasonId","type":"uint256"},{"internalType":"uint256[]","name":"artPieceIds","type":"uint256[]"}],"name":"getMintedSupplies","outputs":[{"internalType":"uint256[]","name":"mintedSupplies","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seasonId","type":"uint256"}],"name":"getNbTokenLeft","outputs":[{"internalType":"uint256[]","name":"nbTokenLeft","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seasonId","type":"uint256"},{"internalType":"int256","name":"supplyCoefficient","type":"int256"}],"name":"getNextSupplies","outputs":[{"internalType":"int256[]","name":"newSupplies","type":"int256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seasonId","type":"uint256"}],"name":"getSeasonInformation","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seasonId","type":"uint256"},{"internalType":"uint256","name":"artPieceId","type":"uint256"}],"name":"getTokenId","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"artPieceId","type":"uint256"}],"name":"hasEnoughSupply","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"artPieceId","type":"uint256"},{"internalType":"address","name":"addr","type":"address"}],"name":"hasMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"incCurrentSeasonIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri_","type":"string"},{"internalType":"address","name":"royaltyAddress","type":"address"},{"internalType":"uint96","name":"royaltyFee","type":"uint96"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"artPieceId","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"bytes32","name":"leaf","type":"bytes32"}],"name":"isAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFestOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"artPieceId","type":"uint256"}],"name":"isMintOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"artPieceId","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256[]","name":"artPieceIds","type":"uint256[]"},{"internalType":"bytes32[][]","name":"merkleProofs","type":"bytes32[][]"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseCurrentSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"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":"","type":"uint256"}],"name":"seasons","outputs":[{"internalType":"uint256","name":"nbArtPieces","type":"uint256"},{"internalType":"uint256","name":"startDate","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"durationBetweenSales","type":"uint256"},{"internalType":"address","name":"royaltyAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"artPieceIds","type":"uint256[]"},{"internalType":"uint256[]","name":"artPieceOrderNumbers","type":"uint256[]"}],"name":"setArtPieceOrderNumbers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"artPieceIds","type":"uint256[]"},{"internalType":"uint256[]","name":"artPiecePrices","type":"uint256[]"}],"name":"setArtPiecePrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"artPieceIds","type":"uint256[]"},{"internalType":"uint256[]","name":"artPieceSupplies","type":"uint256[]"}],"name":"setArtPieceSupplies","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nbArtPieces","type":"uint256"},{"internalType":"uint256[]","name":"artPieceIds","type":"uint256[]"},{"internalType":"uint256[]","name":"artPieceOrderNumbers","type":"uint256[]"},{"internalType":"uint256[]","name":"artPieceSupplies","type":"uint256[]"},{"internalType":"bytes32[]","name":"merkleRoots","type":"bytes32[]"},{"internalType":"uint256[]","name":"artPiecePrices","type":"uint256[]"}],"name":"setCurrentSeasonArtPieceData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"timestampStartDate","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"durationBetweenSales","type":"uint256"}],"name":"setCurrentSeasonTimeData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"setDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"durationBetweenSales","type":"uint256"}],"name":"setDurationBetweenSales","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"artPieceIds","type":"uint256[]"},{"internalType":"bytes32[]","name":"merkleRoots","type":"bytes32[]"}],"name":"setMerkleRoots","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nbArtPieces","type":"uint256"}],"name":"setNbArtPieces","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"seasonId","type":"uint256"},{"internalType":"address","name":"paymentSplitterAddress","type":"address"}],"name":"setRoyaltyAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRoyaltyAddress","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"setStartDate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newuri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseCurrentSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a0604052306080523480156200001557600080fd5b506200002062000026565b620000e8565b600054610100900460ff1615620000935760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e6576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b608051615f9e62000120600039600081816114840152818161150901528181611b2601528181611bab0152611c910152615f9e6000f3fe6080604052600436106103965760003560e01c806363c8eb08116101dc578063ae4d40a211610102578063d9df60ec116100a0578063f242432a1161006f578063f242432a14610ae7578063f2fde38b14610b07578063f5d709a114610b27578063f6be71d114610bac57600080fd5b8063d9df60ec14610a47578063dc29338214610a67578063e985e9c514610a7e578063ea6b054e14610ac757600080fd5b8063b3338577116100dc578063b3338577146109dd578063bdf79675146109fd578063d1c6a55f14610a12578063d797acb414610a2757600080fd5b8063ae4d40a21461097d578063b1a0a9301461099d578063b2ada9fc146109bd57600080fd5b80637f6c14e71161017a57806393ec25d81161014957806393ec25d8146108f55780639a72f28f1461091d578063a22cb4651461093d578063ae0b07301461095d57600080fd5b80637f6c14e71461086a5780638261096f1461088a57806382d95df5146108b75780638da5cb5b146108d757600080fd5b80636a66bed2116101b65780636a66bed2146107f55780636ec95dc114610815578063715018a614610835578063779a58641461084a57600080fd5b806363c8eb08146107ad578063641ce140146107cd57806367e7b9ee146107e057600080fd5b80632a55205a116102c15780634760decb1161025f57806352d1902d1161022e57806352d1902d14610740578063535de9a11461075557806358ae35cc146107755780635c975abb1461079557600080fd5b80634760decb146106c05780634e1273f4146106e05780634ef41a71146107005780634f1ef2861461072d57600080fd5b80633659cfe61161029b5780633659cfe6146106555780633ccfd60b14610675578063447043761461068a578063466a76b1146106a057600080fd5b80632a55205a146105d65780632eb2c2d6146106155780633112de9a1461063557600080fd5b80630e89341c116103395780631bb25016116103085780631bb2501614610561578063221a1a561461058157806322cd40ad146105a15780632384d838146105c157600080fd5b80630e89341c146104ad5780630f37ce44146104da578063180dcd7e14610514578063194ccc8c1461053457600080fd5b806302fe53051161037557806302fe53051461042057806303780733146104405780630863a969146104605780630e06a2961461048d57600080fd5b8062fdd58e1461039b57806301ffc9a7146103ce57806302fa7c47146103fe575b600080fd5b3480156103a757600080fd5b506103bb6103b6366004614b6f565b610bcc565b6040519081526020015b60405180910390f35b3480156103da57600080fd5b506103ee6103e9366004614bb1565b610c67565b60405190151581526020016103c5565b34801561040a57600080fd5b5061041e610419366004614bef565b610c72565b005b34801561042c57600080fd5b5061041e61043b366004614cdb565b610c88565b34801561044c57600080fd5b506103ee61045b366004614d10565b610c9c565b34801561046c57600080fd5b5061048061047b366004614d85565b610cda565b6040516103c59190614e27565b34801561049957600080fd5b5061041e6104a8366004614e35565b610e36565b3480156104b957600080fd5b506104cd6104c8366004614ea1565b610f2c565b6040516103c59190614f0a565b3480156104e657600080fd5b506104fc6d76a84fef008cdabe6409d2fe638b81565b6040516001600160a01b0390911681526020016103c5565b34801561052057600080fd5b5061041e61052f366004615016565b610fc0565b34801561054057600080fd5b5061055461054f366004614ea1565b611154565b6040516103c591906150c8565b34801561056d57600080fd5b5061041e61057c366004614d10565b611222565b34801561058d57600080fd5b5061041e61059c3660046150db565b611280565b3480156105ad57600080fd5b506105546105bc3660046151db565b6112ce565b3480156105cd57600080fd5b5061041e6113cb565b3480156105e257600080fd5b506105f66105f1366004615227565b6113dd565b604080516001600160a01b0390931683526020830191909152016103c5565b34801561062157600080fd5b5061041e610630366004615249565b611447565b34801561064157600080fd5b506103bb610650366004615227565b61146e565b34801561066157600080fd5b5061041e6106703660046152f7565b61147a565b34801561068157600080fd5b5061041e6115f2565b34801561069657600080fd5b506103bb61a8c081565b3480156106ac57600080fd5b506103ee6106bb366004614ea1565b611665565b3480156106cc57600080fd5b5061041e6106db366004615314565b611674565b3480156106ec57600080fd5b506105546106fb366004615386565b6118f4565b34801561070c57600080fd5b5061072061071b3660046151db565b611a1e565b6040516103c591906153ea565b61041e61073b36600461542e565b611b1c565b34801561074c57600080fd5b506103bb611c84565b34801561076157600080fd5b5061041e610770366004614e35565b611d4a565b34801561078157600080fd5b506105546107903660046151db565b611e15565b3480156107a157600080fd5b5060c95460ff166103ee565b3480156107b957600080fd5b506105546107c83660046151db565b611f09565b61041e6107db366004615474565b611ffd565b3480156107ec57600080fd5b5061041e612222565b34801561080157600080fd5b5061041e6108103660046154c4565b612236565b34801561082157600080fd5b5061041e610830366004614e35565b61225e565b34801561084157600080fd5b5061041e61234c565b34801561085657600080fd5b5061041e610865366004614ea1565b61235e565b34801561087657600080fd5b506103ee610885366004614ea1565b6123b4565b34801561089657600080fd5b506108aa6108a53660046151db565b6123e8565b6040516103c591906154f0565b3480156108c357600080fd5b5061041e6108d2366004614ea1565b6124af565b3480156108e357600080fd5b506097546001600160a01b03166104fc565b34801561090157600080fd5b506104fc73c3aa9bc72bd623168860a1e5c6a4530d3d80456c81565b34801561092957600080fd5b506105546109383660046151db565b6124d0565b34801561094957600080fd5b5061041e61095836600461553d565b6125c2565b34801561096957600080fd5b50610720610978366004615227565b6125d6565b34801561098957600080fd5b5061041e61099836600461556b565b612736565b3480156109a957600080fd5b5061041e6109b8366004614ea1565b61288c565b3480156109c957600080fd5b506103ee6109d83660046155cb565b6128ad565b3480156109e957600080fd5b5061041e6109f8366004614e35565b6128c6565b348015610a0957600080fd5b5061041e61294e565b348015610a1e57600080fd5b506103ee61295e565b348015610a3357600080fd5b506104cd610a42366004614ea1565b61296d565b348015610a5357600080fd5b506108aa610a6236600461567b565b612b51565b348015610a7357600080fd5b506103bb6101915481565b348015610a8a57600080fd5b506103ee610a99366004615707565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b348015610ad357600080fd5b5061041e610ae2366004614ea1565b612c31565b348015610af357600080fd5b5061041e610b02366004615735565b612c72565b348015610b1357600080fd5b5061041e610b223660046152f7565b612c99565b348015610b3357600080fd5b50610b7b610b42366004614ea1565b6101926020526000908152604090208054600282015460038301546004840154600990940154929391929091906001600160a01b031685565b6040805195865260208601949094529284019190915260608301526001600160a01b0316608082015260a0016103c5565b348015610bb857600080fd5b5061041e610bc7366004614ea1565b612d0f565b60006001600160a01b038316610c3c5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b6000610c6182612d30565b610c7a612d55565b610c848282612daf565b5050565b610c90612d55565b610c9981612eb7565b50565b6101915460009081526101926020908152604080832085845260070182528083206001600160a01b038516845290915281205460ff165b9392505050565b6040516bffffffffffffffffffffffff19606087901b166020820152600090819060340160408051601f19818403018152918152815160209283012060008981526101929093529120549091508510610d4657604051630e4eda8d60e21b815260040160405180910390fd5b60008681526101926020908152604080832088845260070182528083206001600160a01b038b16845290915290205460ff1615610d87576004915050610e2d565b6000868152610192602090815260408083208884526005810183528184205460069091019092529091205410610dc1576000915050610e2d565b610e018686868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250879250612ec3915050565b610e0f576001915050610e2d565b610e198686612ef6565b610e27576002915050610e2d565b60059150505b95945050505050565b610e3e612d55565b610191546000908152610192602052604081208054909103610e735760405163569f9bd760e11b815260040160405180910390fd5b61ffff841115610e965760405163944aa30560e01b815260040160405180910390fd5b60005b84811015610f24576000868683818110610eb557610eb561579e565b90506020020135905082600001548110610ee257604051630e4eda8d60e21b815260040160405180910390fd5b848483818110610ef457610ef461579e565b6000938452600a860160209081526040909420930291909101359091555080610f1c816157ca565b915050610e99565b505050505050565b606060678054610f3b906157e3565b80601f0160208091040260200160405190810160405280929190818152602001828054610f67906157e3565b8015610fb45780601f10610f8957610100808354040283529160200191610fb4565b820191906000526020600020905b815481529060010190602001808311610f9757829003601f168201915b50505050509050919050565b610fc8612d55565b60008481526101926020526040902080548410610ff857604051630e4eda8d60e21b815260040160405180910390fd5b60006110048686612f8b565b90506000805b8551811015611100576000878152600785016020526040812087516001929089908590811061103b5761103b61579e565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff02191690831515021790555084818151811061108c5761108c61579e565b60200260200101518261109f919061581d565b91506110ee8682815181106110b6576110b661579e565b6020026020010151848784815181106110d1576110d161579e565b602002602001015160405180602001604052806000815250612fc9565b806110f8816157ca565b91505061100a565b5060008681526005840160205260408120805483929061112190849061581d565b909155505060008681526006840160205260408120805483929061114690849061581d565b909155505050505050505050565b600081815261019260205260409020546060908067ffffffffffffffff81111561118057611180614c24565b6040519080825280602002602001820160405280156111a9578160200160208202803683370190505b50915060005b8181101561121b57600084815261019260209081526040808320848452600681018352818420546005909101909252909120546111ec9190615830565b8382815181106111fe576111fe61579e565b602090810291909101015280611213816157ca565b9150506111af565b5050919050565b61122a612d55565b6101915482111561124e57604051630e4eda8d60e21b815260040160405180910390fd5b6000918252610192602052604090912060090180546001600160a01b0319166001600160a01b03909216919091179055565b611288612d55565b6112918b612c31565b61129d8a8a8a8a6128c6565b6112a98a8a888861225e565b6112b58a8a8484610e36565b6112c18a8a8686611d4a565b5050505050505050505050565b606060008267ffffffffffffffff8111156112eb576112eb614c24565b604051908082528060200260200182016040528015611314578160200160208202803683370190505b50905060005b838110156113c25760008585838181106113365761133661579e565b60008a8152610192602090815260409091205491029290920135925050811061137257604051630e4eda8d60e21b815260040160405180910390fd5b600087815261019260209081526040808320848452600a0190915290205483518490849081106113a4576113a461579e565b602090810291909101015250806113ba816157ca565b91505061131a565b50949350505050565b6113d3612d55565b6113db6130df565b565b6000806000806113ed8686613131565b601088901c60008181526101926020526040902060090154929450909250906001600160a01b03161561143957600081815261019260205260409020600901546001600160a01b031692505b5090925090505b9250929050565b846001600160a01b038116331461146157611461336131ee565b610f2486868686866132a7565b6000610cd38383612f8b565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036115075760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610c33565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166115627f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146115cd5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610c33565b6115d68161333a565b60408051600080825260208201909252610c9991839190613342565b6115fa612d55565b6040514790600090339083908381818185875af1925050503d806000811461163e576040519150601f19603f3d011682016040523d82523d6000602084013e611643565b606091505b5050905080610c845760405163e1afaf6560e01b815260040160405180910390fd5b6000610c616101915483612ef6565b61167c6134ce565b61019154600090815261019260205260409020336001600160a01b038716148015906116ae57506116ac86613521565b155b80156116c057506116be866135a9565b155b156116de5760405163e1e4e59b60e01b815260040160405180910390fd5b60008467ffffffffffffffff8111156116f9576116f9614c24565b604051908082528060200260200182016040528015611722578160200160208202803683370190505b50905060008567ffffffffffffffff81111561174057611740614c24565b604051908082528060200260200182016040528015611769578160200160208202803683370190505b50905060005b868110156118ce57600088888381811061178b5761178b61579e565b60200291909101359150600590506117c68b61019154848b8b888181106117b4576117b461579e565b905060200281019061047b9190615843565b60058111156117d7576117d7614def565b146117f55760405163344fa43b60e01b815260040160405180910390fd5b60006118046101915483612f8b565b9050600186600701600084815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff02191690831515021790555085600601600083815260200190815260200160002060008154600101919050819055508085848151811061188d5761188d61579e565b60200260200101818152505060018484815181106118ad576118ad61579e565b602002602001018181525050505080806118c6906157ca565b91505061176f565b506118ea88838360405180602001604052806000815250613640565b5050505050505050565b606081518351146119595760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610c33565b6000835167ffffffffffffffff81111561197557611975614c24565b60405190808252806020026020018201604052801561199e578160200160208202803683370190505b50905060005b8451811015611a16576119e98582815181106119c2576119c261579e565b60200260200101518583815181106119dc576119dc61579e565b6020026020010151610bcc565b8282815181106119fb576119fb61579e565b6020908102919091010152611a0f816157ca565b90506119a4565b509392505050565b6000838152610192602052604090206060908267ffffffffffffffff811115611a4957611a49614c24565b604051908082528060200260200182016040528015611a72578160200160208202803683370190505b50915060005b83811015611b13576000858583818110611a9457611a9461579e565b60008a81526101926020908152604090912054910292909201359250508110611ad057604051630e4eda8d60e21b815260040160405180910390fd5b60008181526008840160205260409020548451859084908110611af557611af561579e565b60209081029190910101525080611b0b816157ca565b915050611a78565b50509392505050565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163003611ba95760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610c33565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611c047f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614611c6f5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610c33565b611c788261333a565b610c8482826001613342565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611d245760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610c33565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b90565b611d52612d55565b610191546000908152610192602052604081208054909103611d875760405163569f9bd760e11b815260040160405180910390fd5b60005b84811015610f24576000868683818110611da657611da661579e565b90506020020135905082600001548110611dd357604051630e4eda8d60e21b815260040160405180910390fd5b848483818110611de557611de561579e565b60009384526008860160209081526040909420930291909101359091555080611e0d816157ca565b915050611d8a565b606060008267ffffffffffffffff811115611e3257611e32614c24565b604051908082528060200260200182016040528015611e5b578160200160208202803683370190505b50905060005b838110156113c2576000858583818110611e7d57611e7d61579e565b60008a81526101926020908152604090912054910292909201359250508110611eb957604051630e4eda8d60e21b815260040160405180910390fd5b6000878152610192602090815260408083208484526005019091529020548351849084908110611eeb57611eeb61579e565b60209081029190910101525080611f01816157ca565b915050611e61565b606060008267ffffffffffffffff811115611f2657611f26614c24565b604051908082528060200260200182016040528015611f4f578160200160208202803683370190505b50905060005b838110156113c2576000858583818110611f7157611f7161579e565b60008a81526101926020908152604090912054910292909201359250508110611fad57604051630e4eda8d60e21b815260040160405180910390fd5b6000878152610192602090815260408083208484526001019091529020548351849084908110611fdf57611fdf61579e565b60209081029190910101525080611ff5816157ca565b915050611f55565b6120056134ce565b6101915460009081526101926020526040812090600561202b8761019154888888610cda565b600581111561203c5761203c614def565b610191546000908152610192602090815260408083208a8452600a0190915290205491149150336001600160a01b03881614801590612081575061207f87613521565b155b80156120935750612091876135a9565b155b156120b15760405163e1e4e59b60e01b815260040160405180910390fd5b81612195576120c36101915487613807565b6120e0576040516341bfbf2160e11b815260040160405180910390fd5b80600003612101576040516306a1c2a560e41b815260040160405180910390fd5b61019154600090815261019260209081526040808320898452600581018352818420546006909101909252909120541061214e5760405163344fa43b60e01b815260040160405180910390fd5b8034101561216f5760405163344fa43b60e01b815260040160405180910390fd5b8034111561219057604051632ad907fb60e01b815260040160405180910390fd5b6121b4565b34156121b4576040516346d53a8560e11b815260040160405180910390fd5b60006121c36101915488612f8b565b600088815260078601602090815260408083206001600160a01b038d1684528252808320805460ff191660019081179091558b845260068901835281842080548201905581519283019091529181529192506118ea918a918491612fc9565b61222a612d55565b61019180546001019055565b61223e612d55565b612247836124af565b61225082612d0f565b6122598161288c565b505050565b612266612d55565b61019154600090815261019260205260408120805490910361229b5760405163569f9bd760e11b815260040160405180910390fd5b61ffff8411156122be5760405163944aa30560e01b815260040160405180910390fd5b60005b84811015610f245760008686838181106122dd576122dd61579e565b9050602002013590508260000154811061230a57604051630e4eda8d60e21b815260040160405180910390fd5b84848381811061231c5761231c61579e565b60009384526005860160209081526040909420930291909101359091555080612344816157ca565b9150506122c1565b612354612d55565b6113db6000613862565b612366612d55565b600081815261019260205260408120805490918290612384836157ca565b9091555050805460009061239a90600190615830565b600081815260019093016020526040909220919091555050565b6101915460009081526101926020908152604080832084845260058101835281842054600690910190925282205410610c61565b60608167ffffffffffffffff81111561240357612403614c24565b60405190808252806020026020018201604052801561242c578160200160208202803683370190505b50905060005b82811015611a165761245c858585848181106124505761245061579e565b905060200201356138b4565b82828151811061246e5761246e61579e565b6020026020010190600581111561248757612487614def565b9081600581111561249a5761249a614def565b905250806124a7816157ca565b915050612432565b6124b7612d55565b6101915460009081526101926020526040902060020155565b60608167ffffffffffffffff8111156124eb576124eb614c24565b604051908082528060200260200182016040528015612514578160200160208202803683370190505b50905060005b82811015611a165760008484838181106125365761253661579e565b6000898152610192602090815260409091205491029290920135925050811061257257604051630e4eda8d60e21b815260040160405180910390fd5b60008681526101926020908152604080832084845260060190915290205483518490849081106125a4576125a461579e565b602090810291909101015250806125ba816157ca565b91505061251a565b816125cc816131ee565b612259838361393d565b60008281526101926020526040902054606090620f4240908067ffffffffffffffff81111561260757612607614c24565b604051908082528060200260200182016040528015612630578160200160208202803683370190505b50925060005b8181101561272d5760008681526101926020908152604080832084845260058101835281842054600690910190925282205490918290036126965760008684815181106126855761268561579e565b602002602001018181525050612718565b600085836126a4828561588d565b6126af90600261588d565b6126b991906158d3565b6126c39190615901565b6126cd908961588d565b90506126da600287615a59565b6126e4828561588d565b6126ee91906158d3565b6126f89084615a68565b87858151811061270a5761270a61579e565b602002602001018181525050505b50508080612725906157ca565b915050612636565b50505092915050565b600054610100900460ff16158080156127565750600054600160ff909116105b806127705750303b158015612770575060005460ff166001145b6127e25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c33565b6000805460ff191660011790558015612805576000805461ff0019166101001790555b61280e84613948565b612816613978565b61281e6139a7565b6128266139d6565b61282e613a1c565b612836613a1c565b6128408383612daf565b8015612886576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b612894612d55565b6101915460009081526101926020526040902060040155565b60006128be61019154858585612ec3565b949350505050565b6128ce612d55565b61019154600090815261019260205260408120905b84811015610f245760008686838181106128ff576128ff61579e565b905060200201359050600085858481811061291c5761291c61579e565b600094855260018701602090815260409095209402919091013590925550819050612946816157ca565b9150506128e3565b612956612d55565b6113db613a43565b6000612968613a80565b905090565b60008181526101926020526040902060609081612988613a80565b156129cf576040517f2269732d666573746976616c2d6f70656e223a7472756500000000000000000060208201526037016040516020818303038152906040529050612a0d565b6040517f2269732d666573746976616c2d6f70656e223a66616c73650000000000000000602082015260380160405160208183030381529060405290505b604080517f226172742d706965636573223a7b00000000000000000000000000000000000060208201528151600e818303018152602e90910190915260005b8354811015612b02576000612a618783612f8b565b905082612a6f826020613ad6565b612a92612a7c8a866138b4565b6005811115612a8d57612a8d614def565b613c7f565b604051602001612aa493929190615a90565b604051602081830303815290604052925060018560000154612ac69190615830565b8214612aef5782604051602001612add9190615af0565b60405160208183030381529060405292505b5080612afa816157ca565b915050612a4c565b5080604051602001612b149190615b15565b60405160208183030381529060405290508181604051602001612b38929190615b3a565b6040516020818303038152906040529350505050919050565b60608367ffffffffffffffff811115612b6c57612b6c614c24565b604051908082528060200260200182016040528015612b95578160200160208202803683370190505b50905060005b84811015612c2657612bd38888888885818110612bba57612bba61579e565b905060200201358787868181106117b4576117b461579e565b828281518110612be557612be561579e565b60200260200101906005811115612bfe57612bfe614def565b90816005811115612c1157612c11614def565b90525080612c1e816157ca565b915050612b9b565b509695505050505050565b612c39612d55565b61ffff811115612c5c5760405163944aa30560e01b815260040160405180910390fd5b6101915460009081526101926020526040902055565b846001600160a01b0381163314612c8c57612c8c336131ee565b610f248686868686613d80565b612ca1612d55565b6001600160a01b038116612d065760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c33565b610c9981613862565b612d17612d55565b6101915460009081526101926020526040902060030155565b60006001600160e01b0319821663152a902d60e11b1480610c615750610c6182613e0c565b6097546001600160a01b031633146113db5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c33565b6127106bffffffffffffffffffffffff82161115612e225760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610c33565b6001600160a01b038216612e785760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610c33565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b9091021761015f55565b6067610c848282615bd7565b600084815261019260209081526040808320868452600801909152812054612eec848285613e5c565b9695505050505050565b6000828152610192602052604081206002810154808303612f1c57600092505050610c61565b6000858152610192602090815260408083208784526001019091528120546004840154909190612f4d908390615c97565b612f57908461581d565b90506000846003015484612f6b919061581d565b905042828110801590612f7e5750818111155b9998505050505050505050565b600082815261019260205260408120548210612fba57604051630e4eda8d60e21b815260040160405180910390fd5b5061ffff1660109190911b1790565b6001600160a01b0384166130295760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610c33565b33600061303585613e72565b9050600061304285613e72565b905060008681526065602090815260408083206001600160a01b038b1684529091528120805487929061307690849061581d565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46130d683600089898989613ebd565b50505050505050565b6130e7614062565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000828152610160602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff169282019290925282916131b257506040805180820190915261015f546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b6020810151600090612710906131d6906bffffffffffffffffffffffff1687615c97565b6131e09190615cae565b915196919550909350505050565b6daaeb6d7670e522a718067333cd4e3b15610c9957604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561325b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327f9190615cc2565b610c9957604051633b79c77360e21b81526001600160a01b0382166004820152602401610c33565b6001600160a01b0385163314806132c357506132c38533610a99565b6133265760405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201526d195c881bdc88185c1c1c9bdd995960921b6064820152608401610c33565b61333385858585856140b4565b5050505050565b610c99612d55565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615613375576122598361430d565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156133cf575060408051601f3d908101601f191682019092526133cc91810190615cdf565b60015b6134415760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608401610c33565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146134c25760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610c33565b506122598383836143cb565b60c95460ff16156113db5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610c33565b60006d76a84fef008cdabe6409d2fe638b80639c395bc2336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529086166024820152604401602060405180830381865afa158015613585573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd39190615cc2565b600073c3aa9bc72bd623168860a1e5c6a4530d3d80456c33604051634ba4f2cf60e11b81526001600160a01b03858116600483015291821691831690639749e59e90602401602060405180830381865afa15801561360b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061362f9190615cf8565b6001600160a01b0316149392505050565b6001600160a01b0384166136a05760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610c33565b81518351146137025760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610c33565b3360005b845181101561379f578381815181106137215761372161579e565b60200260200101516065600087848151811061373f5761373f61579e565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254613787919061581d565b90915550819050613797816157ca565b915050613706565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516137f0929190615d15565b60405180910390a4613333816000878787876143f0565b600082815261019260209081526040808320848452600181019092528220546004820154839061a8c09061383c908490615c97565b846002015461384b919061581d565b613855919061581d565b4210159695505050505050565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000828152610192602052604081205482106138e357604051630e4eda8d60e21b815260040160405180910390fd5b600083815261019260209081526040808320858452600581018352818420546006909101909252909120541061391b57506000610c61565b6139286101915483612ef6565b61393457506002610c61565b50600392915050565b610c843383836144ec565b600054610100900460ff1661396f5760405162461bcd60e51b8152600401610c3390615d3a565b610c99816145cc565b600054610100900460ff1661399f5760405162461bcd60e51b8152600401610c3390615d3a565b6113db6145f3565b600054610100900460ff166139ce5760405162461bcd60e51b8152600401610c3390615d3a565b6113db614623565b600054610100900460ff166139fd5760405162461bcd60e51b8152600401610c3390615d3a565b6113db733cc6cdda760b79bafa08df41ecfa224f810dceb66001614656565b600054610100900460ff166113db5760405162461bcd60e51b8152600401610c3390615d3a565b613a4b6134ce565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586131143390565b610191546000908152610192602052604081206002810154808303613aa85760009250505090565b6000826003015482613aba919061581d565b905042828110801590613acd5750818111155b94505050505090565b60606000613ae5836002615c97565b613af090600261581d565b67ffffffffffffffff811115613b0857613b08614c24565b6040519080825280601f01601f191660200182016040528015613b32576020820181803683370190505b509050600360fc1b81600081518110613b4d57613b4d61579e565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613b7c57613b7c61579e565b60200101906001600160f81b031916908160001a9053506000613ba0846002615c97565b613bab90600161581d565b90505b6001811115613c30577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613bec57613bec61579e565b1a60f81b828281518110613c0257613c0261579e565b60200101906001600160f81b031916908160001a90535060049490941c93613c2981615d97565b9050613bae565b508315610cd35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c33565b606081600003613ca65750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613cd05780613cba816157ca565b9150613cc99050600a83615cae565b9150613caa565b60008167ffffffffffffffff811115613ceb57613ceb614c24565b6040519080825280601f01601f191660200182016040528015613d15576020820181803683370190505b5090505b84156128be57613d2a600183615830565b9150613d37600a86615dae565b613d4290603061581d565b60f81b818381518110613d5757613d5761579e565b60200101906001600160f81b031916908160001a905350613d79600a86615cae565b9450613d19565b6001600160a01b038516331480613d9c5750613d9c8533610a99565b613dff5760405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201526d195c881bdc88185c1c1c9bdd995960921b6064820152608401610c33565b61333385858585856147f5565b60006001600160e01b03198216636cdb3d1360e11b1480613e3d57506001600160e01b031982166303a24d0760e21b145b80610c6157506301ffc9a760e01b6001600160e01b0319831614610c61565b600082613e6985846149a4565b14949350505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613eac57613eac61579e565b602090810291909101015292915050565b6001600160a01b0384163b15610f245760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190613f019089908990889088908890600401615dc2565b6020604051808303816000875af1925050508015613f3c575060408051601f3d908101601f19168201909252613f3991810190615e05565b60015b613ff157613f48615e22565b806308c379a003613f815750613f5c615e3d565b80613f675750613f83565b8060405162461bcd60e51b8152600401610c339190614f0a565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610c33565b6001600160e01b0319811663f23a6e6160e01b146130d65760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610c33565b60c95460ff166113db5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610c33565b81518351146141165760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610c33565b6001600160a01b03841661417a5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610c33565b3360005b84518110156142a757600085828151811061419b5761419b61579e565b6020026020010151905060008583815181106141b9576141b961579e565b60209081029190910181015160008481526065835260408082206001600160a01b038e16835290935291909120549091508181101561424d5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610c33565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061428c90849061581d565b92505081905550505050806142a0906157ca565b905061417e565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516142f7929190615d15565b60405180910390a4610f248187878787876143f0565b6001600160a01b0381163b61438a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610c33565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6143d483614a10565b6000825111806143e15750805b15612259576128868383614a50565b6001600160a01b0384163b15610f245760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906144349089908990889088908890600401615ec7565b6020604051808303816000875af192505050801561446f575060408051601f3d908101601f1916820190925261446c91810190615e05565b60015b61447b57613f48615e22565b6001600160e01b0319811663bc197c8160e01b146130d65760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610c33565b816001600160a01b0316836001600160a01b03160361455f5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610c33565b6001600160a01b03838116600081815260666020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600054610100900460ff16610c905760405162461bcd60e51b8152600401610c3390615d3a565b600054610100900460ff1661461a5760405162461bcd60e51b8152600401610c3390615d3a565b6113db33613862565b600054610100900460ff1661464a5760405162461bcd60e51b8152600401610c3390615d3a565b60c9805460ff19169055565b600054610100900460ff1661467d5760405162461bcd60e51b8152600401610c3390615d3a565b6daaeb6d7670e522a718067333cd4e3b15610c845760405163c3c5a54760e01b81523060048201526daaeb6d7670e522a718067333cd4e9063c3c5a547906024016020604051808303816000875af11580156146dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147019190615cc2565b610c8457801561477557604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b15801561476157600080fd5b505af1158015610f24573d6000803e3d6000fd5b6001600160a01b038216156147c45760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401614747565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401614747565b6001600160a01b0384166148595760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610c33565b33600061486585613e72565b9050600061487285613e72565b905060008681526065602090815260408083206001600160a01b038c168452909152902054858110156148fa5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610c33565b60008781526065602090815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061493990849061581d565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4614999848a8a8a8a8a613ebd565b505050505050505050565b600081815b8451811015611a165760008582815181106149c6576149c661579e565b602002602001015190508083116149ec57600083815260208290526040902092506149fd565b600081815260208490526040902092505b5080614a08816157ca565b9150506149a9565b614a198161430d565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b614ab85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610c33565b600080846001600160a01b031684604051614ad39190615f25565b600060405180830381855af49150503d8060008114614b0e576040519150601f19603f3d011682016040523d82523d6000602084013e614b13565b606091505b5091509150610e2d8282604051806060016040528060278152602001615f426027913960608315614b45575081610cd3565b610cd38383815115613f675781518083602001fd5b6001600160a01b0381168114610c9957600080fd5b60008060408385031215614b8257600080fd5b8235614b8d81614b5a565b946020939093013593505050565b6001600160e01b031981168114610c9957600080fd5b600060208284031215614bc357600080fd5b8135610cd381614b9b565b80356bffffffffffffffffffffffff81168114614bea57600080fd5b919050565b60008060408385031215614c0257600080fd5b8235614c0d81614b5a565b9150614c1b60208401614bce565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715614c6057614c60614c24565b6040525050565b600082601f830112614c7857600080fd5b813567ffffffffffffffff811115614c9257614c92614c24565b604051614ca9601f8301601f191660200182614c3a565b818152846020838601011115614cbe57600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215614ced57600080fd5b813567ffffffffffffffff811115614d0457600080fd5b6128be84828501614c67565b60008060408385031215614d2357600080fd5b823591506020830135614d3581614b5a565b809150509250929050565b60008083601f840112614d5257600080fd5b50813567ffffffffffffffff811115614d6a57600080fd5b6020830191508360208260051b850101111561144057600080fd5b600080600080600060808688031215614d9d57600080fd5b8535614da881614b5a565b94506020860135935060408601359250606086013567ffffffffffffffff811115614dd257600080fd5b614dde88828901614d40565b969995985093965092949392505050565b634e487b7160e01b600052602160045260246000fd5b60068110614e2357634e487b7160e01b600052602160045260246000fd5b9052565b60208101610c618284614e05565b60008060008060408587031215614e4b57600080fd5b843567ffffffffffffffff80821115614e6357600080fd5b614e6f88838901614d40565b90965094506020870135915080821115614e8857600080fd5b50614e9587828801614d40565b95989497509550505050565b600060208284031215614eb357600080fd5b5035919050565b60005b83811015614ed5578181015183820152602001614ebd565b50506000910152565b60008151808452614ef6816020860160208601614eba565b601f01601f19169290920160200192915050565b602081526000610cd36020830184614ede565b600067ffffffffffffffff821115614f3757614f37614c24565b5060051b60200190565b600082601f830112614f5257600080fd5b81356020614f5f82614f1d565b604051614f6c8282614c3a565b83815260059390931b8501820192828101915086841115614f8c57600080fd5b8286015b84811015612c26578035614fa381614b5a565b8352918301918301614f90565b600082601f830112614fc157600080fd5b81356020614fce82614f1d565b604051614fdb8282614c3a565b83815260059390931b8501820192828101915086841115614ffb57600080fd5b8286015b84811015612c265780358352918301918301614fff565b6000806000806080858703121561502c57600080fd5b8435935060208501359250604085013567ffffffffffffffff8082111561505257600080fd5b61505e88838901614f41565b9350606087013591508082111561507457600080fd5b5061508187828801614fb0565b91505092959194509250565b600081518084526020808501945080840160005b838110156150bd578151875295820195908201906001016150a1565b509495945050505050565b602081526000610cd3602083018461508d565b600080600080600080600080600080600060c08c8e0312156150fc57600080fd5b8b359a5067ffffffffffffffff8060208e0135111561511a57600080fd5b61512a8e60208f01358f01614d40565b909b50995060408d013581101561514057600080fd5b6151508e60408f01358f01614d40565b909950975060608d013581101561516657600080fd5b6151768e60608f01358f01614d40565b909750955060808d013581101561518c57600080fd5b61519c8e60808f01358f01614d40565b909550935060a08d01358110156151b257600080fd5b506151c38d60a08e01358e01614d40565b81935080925050509295989b509295989b9093969950565b6000806000604084860312156151f057600080fd5b83359250602084013567ffffffffffffffff81111561520e57600080fd5b61521a86828701614d40565b9497909650939450505050565b6000806040838503121561523a57600080fd5b50508035926020909101359150565b600080600080600060a0868803121561526157600080fd5b853561526c81614b5a565b9450602086013561527c81614b5a565b9350604086013567ffffffffffffffff8082111561529957600080fd5b6152a589838a01614fb0565b945060608801359150808211156152bb57600080fd5b6152c789838a01614fb0565b935060808801359150808211156152dd57600080fd5b506152ea88828901614c67565b9150509295509295909350565b60006020828403121561530957600080fd5b8135610cd381614b5a565b60008060008060006060868803121561532c57600080fd5b853561533781614b5a565b9450602086013567ffffffffffffffff8082111561535457600080fd5b61536089838a01614d40565b9096509450604088013591508082111561537957600080fd5b50614dde88828901614d40565b6000806040838503121561539957600080fd5b823567ffffffffffffffff808211156153b157600080fd5b6153bd86838701614f41565b935060208501359150808211156153d357600080fd5b506153e085828601614fb0565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561542257835183529284019291840191600101615406565b50909695505050505050565b6000806040838503121561544157600080fd5b823561544c81614b5a565b9150602083013567ffffffffffffffff81111561546857600080fd5b6153e085828601614c67565b6000806000806060858703121561548a57600080fd5b843561549581614b5a565b935060208501359250604085013567ffffffffffffffff8111156154b857600080fd5b614e9587828801614d40565b6000806000606084860312156154d957600080fd5b505081359360208301359350604090920135919050565b6020808252825182820181905260009190848201906040850190845b818110156154225761551f838551614e05565b928401929184019160010161550c565b8015158114610c9957600080fd5b6000806040838503121561555057600080fd5b823561555b81614b5a565b91506020830135614d358161552f565b60008060006060848603121561558057600080fd5b833567ffffffffffffffff81111561559757600080fd5b6155a386828701614c67565b93505060208401356155b481614b5a565b91506155c260408501614bce565b90509250925092565b6000806000606084860312156155e057600080fd5b8335925060208085013567ffffffffffffffff8111156155ff57600080fd5b8501601f8101871361561057600080fd5b803561561b81614f1d565b6040516156288282614c3a565b82815260059290921b830184019184810191508983111561564857600080fd5b928401925b828410156156665783358252928401929084019061564d565b96999698505050506040949094013593505050565b6000806000806000806080878903121561569457600080fd5b863561569f81614b5a565b955060208701359450604087013567ffffffffffffffff808211156156c357600080fd5b6156cf8a838b01614d40565b909650945060608901359150808211156156e857600080fd5b506156f589828a01614d40565b979a9699509497509295939492505050565b6000806040838503121561571a57600080fd5b823561572581614b5a565b91506020830135614d3581614b5a565b600080600080600060a0868803121561574d57600080fd5b853561575881614b5a565b9450602086013561576881614b5a565b93506040860135925060608601359150608086013567ffffffffffffffff81111561579257600080fd5b6152ea88828901614c67565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016157dc576157dc6157b4565b5060010190565b600181811c908216806157f757607f821691505b60208210810361581757634e487b7160e01b600052602260045260246000fd5b50919050565b80820180821115610c6157610c616157b4565b81810381811115610c6157610c616157b4565b6000808335601e1984360301811261585a57600080fd5b83018035915067ffffffffffffffff82111561587557600080fd5b6020019150600581901b360382131561144057600080fd5b80820260008212600160ff1b841416156158a9576158a96157b4565b8181058314821517610c6157610c616157b4565b634e487b7160e01b600052601260045260246000fd5b6000826158e2576158e26158bd565b600160ff1b8214600019841416156158fc576158fc6157b4565b500590565b8181036000831280158383131683831282161715615921576159216157b4565b5092915050565b80825b600180861161593a575061596c565b816001600160ff1b0304821115615953576159536157b4565b8086161561596057918102915b9490941c93800261592b565b935093915050565b600082801561598a57600181146159945761599d565b6001915050610c61565b82915050610c61565b50816159ab57506000610c61565b506001600082138082146159c45780156159e2576159fb565b826001600160ff1b03048311156159dd576159dd6157b4565b6159fb565b826001600160ff1b03058312156159fb576159fb6157b4565b5080831615615a075750805b615a178360011c83840283615928565b806001600160ff1b03048211600083131615615a3557615a356157b4565b60008212600160ff1b82900583121615615a5157615a516157b4565b029392505050565b6000610cd360ff841683615974565b8082018281126000831280158216821582161715615a8857615a886157b4565b505092915050565b60008451615aa2818460208901614eba565b601160f91b9083019081528451615ac0816001840160208901614eba565b61111d60f11b600192909101918201528351615ae3816003840160208801614eba565b0160030195945050505050565b60008251615b02818460208701614eba565b600b60fa1b920191825250600101919050565b60008251615b27818460208701614eba565b607d60f81b920191825250600101919050565b607b60f81b815260008351615b56816001850160208801614eba565b600b60fa1b6001918401918201528351615b77816002840160208801614eba565b607d60f81b60029290910191820152600301949350505050565b601f82111561225957600081815260208120601f850160051c81016020861015615bb85750805b601f850160051c820191505b81811015610f2457828155600101615bc4565b815167ffffffffffffffff811115615bf157615bf1614c24565b615c0581615bff84546157e3565b84615b91565b602080601f831160018114615c3a5760008415615c225750858301515b600019600386901b1c1916600185901b178555610f24565b600085815260208120601f198616915b82811015615c6957888601518255948401946001909101908401615c4a565b5085821015615c875787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082028115828204841417610c6157610c616157b4565b600082615cbd57615cbd6158bd565b500490565b600060208284031215615cd457600080fd5b8151610cd38161552f565b600060208284031215615cf157600080fd5b5051919050565b600060208284031215615d0a57600080fd5b8151610cd381614b5a565b604081526000615d28604083018561508d565b8281036020840152610e2d818561508d565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600081615da657615da66157b4565b506000190190565b600082615dbd57615dbd6158bd565b500690565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152615dfa60a0830184614ede565b979650505050505050565b600060208284031215615e1757600080fd5b8151610cd381614b9b565b600060033d1115611d475760046000803e5060005160e01c90565b600060443d1015615e4b5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715615e7b57505050505090565b8285019150815181811115615e935750505050505090565b843d8701016020828501011115615ead5750505050505090565b615ebc60208286010187614c3a565b509095945050505050565b60006001600160a01b03808816835280871660208401525060a06040830152615ef360a083018661508d565b8281036060840152615f05818661508d565b90508281036080840152615f198185614ede565b98975050505050505050565b60008251615f37818460208701614eba565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212208632e0a83d3daf457b94710931261a592522ec4a4e9b8e89ba93f179be96dd1b64736f6c63430008110033

Deployed Bytecode

0x6080604052600436106103965760003560e01c806363c8eb08116101dc578063ae4d40a211610102578063d9df60ec116100a0578063f242432a1161006f578063f242432a14610ae7578063f2fde38b14610b07578063f5d709a114610b27578063f6be71d114610bac57600080fd5b8063d9df60ec14610a47578063dc29338214610a67578063e985e9c514610a7e578063ea6b054e14610ac757600080fd5b8063b3338577116100dc578063b3338577146109dd578063bdf79675146109fd578063d1c6a55f14610a12578063d797acb414610a2757600080fd5b8063ae4d40a21461097d578063b1a0a9301461099d578063b2ada9fc146109bd57600080fd5b80637f6c14e71161017a57806393ec25d81161014957806393ec25d8146108f55780639a72f28f1461091d578063a22cb4651461093d578063ae0b07301461095d57600080fd5b80637f6c14e71461086a5780638261096f1461088a57806382d95df5146108b75780638da5cb5b146108d757600080fd5b80636a66bed2116101b65780636a66bed2146107f55780636ec95dc114610815578063715018a614610835578063779a58641461084a57600080fd5b806363c8eb08146107ad578063641ce140146107cd57806367e7b9ee146107e057600080fd5b80632a55205a116102c15780634760decb1161025f57806352d1902d1161022e57806352d1902d14610740578063535de9a11461075557806358ae35cc146107755780635c975abb1461079557600080fd5b80634760decb146106c05780634e1273f4146106e05780634ef41a71146107005780634f1ef2861461072d57600080fd5b80633659cfe61161029b5780633659cfe6146106555780633ccfd60b14610675578063447043761461068a578063466a76b1146106a057600080fd5b80632a55205a146105d65780632eb2c2d6146106155780633112de9a1461063557600080fd5b80630e89341c116103395780631bb25016116103085780631bb2501614610561578063221a1a561461058157806322cd40ad146105a15780632384d838146105c157600080fd5b80630e89341c146104ad5780630f37ce44146104da578063180dcd7e14610514578063194ccc8c1461053457600080fd5b806302fe53051161037557806302fe53051461042057806303780733146104405780630863a969146104605780630e06a2961461048d57600080fd5b8062fdd58e1461039b57806301ffc9a7146103ce57806302fa7c47146103fe575b600080fd5b3480156103a757600080fd5b506103bb6103b6366004614b6f565b610bcc565b6040519081526020015b60405180910390f35b3480156103da57600080fd5b506103ee6103e9366004614bb1565b610c67565b60405190151581526020016103c5565b34801561040a57600080fd5b5061041e610419366004614bef565b610c72565b005b34801561042c57600080fd5b5061041e61043b366004614cdb565b610c88565b34801561044c57600080fd5b506103ee61045b366004614d10565b610c9c565b34801561046c57600080fd5b5061048061047b366004614d85565b610cda565b6040516103c59190614e27565b34801561049957600080fd5b5061041e6104a8366004614e35565b610e36565b3480156104b957600080fd5b506104cd6104c8366004614ea1565b610f2c565b6040516103c59190614f0a565b3480156104e657600080fd5b506104fc6d76a84fef008cdabe6409d2fe638b81565b6040516001600160a01b0390911681526020016103c5565b34801561052057600080fd5b5061041e61052f366004615016565b610fc0565b34801561054057600080fd5b5061055461054f366004614ea1565b611154565b6040516103c591906150c8565b34801561056d57600080fd5b5061041e61057c366004614d10565b611222565b34801561058d57600080fd5b5061041e61059c3660046150db565b611280565b3480156105ad57600080fd5b506105546105bc3660046151db565b6112ce565b3480156105cd57600080fd5b5061041e6113cb565b3480156105e257600080fd5b506105f66105f1366004615227565b6113dd565b604080516001600160a01b0390931683526020830191909152016103c5565b34801561062157600080fd5b5061041e610630366004615249565b611447565b34801561064157600080fd5b506103bb610650366004615227565b61146e565b34801561066157600080fd5b5061041e6106703660046152f7565b61147a565b34801561068157600080fd5b5061041e6115f2565b34801561069657600080fd5b506103bb61a8c081565b3480156106ac57600080fd5b506103ee6106bb366004614ea1565b611665565b3480156106cc57600080fd5b5061041e6106db366004615314565b611674565b3480156106ec57600080fd5b506105546106fb366004615386565b6118f4565b34801561070c57600080fd5b5061072061071b3660046151db565b611a1e565b6040516103c591906153ea565b61041e61073b36600461542e565b611b1c565b34801561074c57600080fd5b506103bb611c84565b34801561076157600080fd5b5061041e610770366004614e35565b611d4a565b34801561078157600080fd5b506105546107903660046151db565b611e15565b3480156107a157600080fd5b5060c95460ff166103ee565b3480156107b957600080fd5b506105546107c83660046151db565b611f09565b61041e6107db366004615474565b611ffd565b3480156107ec57600080fd5b5061041e612222565b34801561080157600080fd5b5061041e6108103660046154c4565b612236565b34801561082157600080fd5b5061041e610830366004614e35565b61225e565b34801561084157600080fd5b5061041e61234c565b34801561085657600080fd5b5061041e610865366004614ea1565b61235e565b34801561087657600080fd5b506103ee610885366004614ea1565b6123b4565b34801561089657600080fd5b506108aa6108a53660046151db565b6123e8565b6040516103c591906154f0565b3480156108c357600080fd5b5061041e6108d2366004614ea1565b6124af565b3480156108e357600080fd5b506097546001600160a01b03166104fc565b34801561090157600080fd5b506104fc73c3aa9bc72bd623168860a1e5c6a4530d3d80456c81565b34801561092957600080fd5b506105546109383660046151db565b6124d0565b34801561094957600080fd5b5061041e61095836600461553d565b6125c2565b34801561096957600080fd5b50610720610978366004615227565b6125d6565b34801561098957600080fd5b5061041e61099836600461556b565b612736565b3480156109a957600080fd5b5061041e6109b8366004614ea1565b61288c565b3480156109c957600080fd5b506103ee6109d83660046155cb565b6128ad565b3480156109e957600080fd5b5061041e6109f8366004614e35565b6128c6565b348015610a0957600080fd5b5061041e61294e565b348015610a1e57600080fd5b506103ee61295e565b348015610a3357600080fd5b506104cd610a42366004614ea1565b61296d565b348015610a5357600080fd5b506108aa610a6236600461567b565b612b51565b348015610a7357600080fd5b506103bb6101915481565b348015610a8a57600080fd5b506103ee610a99366004615707565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b348015610ad357600080fd5b5061041e610ae2366004614ea1565b612c31565b348015610af357600080fd5b5061041e610b02366004615735565b612c72565b348015610b1357600080fd5b5061041e610b223660046152f7565b612c99565b348015610b3357600080fd5b50610b7b610b42366004614ea1565b6101926020526000908152604090208054600282015460038301546004840154600990940154929391929091906001600160a01b031685565b6040805195865260208601949094529284019190915260608301526001600160a01b0316608082015260a0016103c5565b348015610bb857600080fd5b5061041e610bc7366004614ea1565b612d0f565b60006001600160a01b038316610c3c5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526065602090815260408083206001600160a01b03861684529091529020545b92915050565b6000610c6182612d30565b610c7a612d55565b610c848282612daf565b5050565b610c90612d55565b610c9981612eb7565b50565b6101915460009081526101926020908152604080832085845260070182528083206001600160a01b038516845290915281205460ff165b9392505050565b6040516bffffffffffffffffffffffff19606087901b166020820152600090819060340160408051601f19818403018152918152815160209283012060008981526101929093529120549091508510610d4657604051630e4eda8d60e21b815260040160405180910390fd5b60008681526101926020908152604080832088845260070182528083206001600160a01b038b16845290915290205460ff1615610d87576004915050610e2d565b6000868152610192602090815260408083208884526005810183528184205460069091019092529091205410610dc1576000915050610e2d565b610e018686868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250879250612ec3915050565b610e0f576001915050610e2d565b610e198686612ef6565b610e27576002915050610e2d565b60059150505b95945050505050565b610e3e612d55565b610191546000908152610192602052604081208054909103610e735760405163569f9bd760e11b815260040160405180910390fd5b61ffff841115610e965760405163944aa30560e01b815260040160405180910390fd5b60005b84811015610f24576000868683818110610eb557610eb561579e565b90506020020135905082600001548110610ee257604051630e4eda8d60e21b815260040160405180910390fd5b848483818110610ef457610ef461579e565b6000938452600a860160209081526040909420930291909101359091555080610f1c816157ca565b915050610e99565b505050505050565b606060678054610f3b906157e3565b80601f0160208091040260200160405190810160405280929190818152602001828054610f67906157e3565b8015610fb45780601f10610f8957610100808354040283529160200191610fb4565b820191906000526020600020905b815481529060010190602001808311610f9757829003601f168201915b50505050509050919050565b610fc8612d55565b60008481526101926020526040902080548410610ff857604051630e4eda8d60e21b815260040160405180910390fd5b60006110048686612f8b565b90506000805b8551811015611100576000878152600785016020526040812087516001929089908590811061103b5761103b61579e565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff02191690831515021790555084818151811061108c5761108c61579e565b60200260200101518261109f919061581d565b91506110ee8682815181106110b6576110b661579e565b6020026020010151848784815181106110d1576110d161579e565b602002602001015160405180602001604052806000815250612fc9565b806110f8816157ca565b91505061100a565b5060008681526005840160205260408120805483929061112190849061581d565b909155505060008681526006840160205260408120805483929061114690849061581d565b909155505050505050505050565b600081815261019260205260409020546060908067ffffffffffffffff81111561118057611180614c24565b6040519080825280602002602001820160405280156111a9578160200160208202803683370190505b50915060005b8181101561121b57600084815261019260209081526040808320848452600681018352818420546005909101909252909120546111ec9190615830565b8382815181106111fe576111fe61579e565b602090810291909101015280611213816157ca565b9150506111af565b5050919050565b61122a612d55565b6101915482111561124e57604051630e4eda8d60e21b815260040160405180910390fd5b6000918252610192602052604090912060090180546001600160a01b0319166001600160a01b03909216919091179055565b611288612d55565b6112918b612c31565b61129d8a8a8a8a6128c6565b6112a98a8a888861225e565b6112b58a8a8484610e36565b6112c18a8a8686611d4a565b5050505050505050505050565b606060008267ffffffffffffffff8111156112eb576112eb614c24565b604051908082528060200260200182016040528015611314578160200160208202803683370190505b50905060005b838110156113c25760008585838181106113365761133661579e565b60008a8152610192602090815260409091205491029290920135925050811061137257604051630e4eda8d60e21b815260040160405180910390fd5b600087815261019260209081526040808320848452600a0190915290205483518490849081106113a4576113a461579e565b602090810291909101015250806113ba816157ca565b91505061131a565b50949350505050565b6113d3612d55565b6113db6130df565b565b6000806000806113ed8686613131565b601088901c60008181526101926020526040902060090154929450909250906001600160a01b03161561143957600081815261019260205260409020600901546001600160a01b031692505b5090925090505b9250929050565b846001600160a01b038116331461146157611461336131ee565b610f2486868686866132a7565b6000610cd38383612f8b565b6001600160a01b037f000000000000000000000000d66c101c9255c890126c41c158bf6dca0a6acf6a1630036115075760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610c33565b7f000000000000000000000000d66c101c9255c890126c41c158bf6dca0a6acf6a6001600160a01b03166115627f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146115cd5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610c33565b6115d68161333a565b60408051600080825260208201909252610c9991839190613342565b6115fa612d55565b6040514790600090339083908381818185875af1925050503d806000811461163e576040519150601f19603f3d011682016040523d82523d6000602084013e611643565b606091505b5050905080610c845760405163e1afaf6560e01b815260040160405180910390fd5b6000610c616101915483612ef6565b61167c6134ce565b61019154600090815261019260205260409020336001600160a01b038716148015906116ae57506116ac86613521565b155b80156116c057506116be866135a9565b155b156116de5760405163e1e4e59b60e01b815260040160405180910390fd5b60008467ffffffffffffffff8111156116f9576116f9614c24565b604051908082528060200260200182016040528015611722578160200160208202803683370190505b50905060008567ffffffffffffffff81111561174057611740614c24565b604051908082528060200260200182016040528015611769578160200160208202803683370190505b50905060005b868110156118ce57600088888381811061178b5761178b61579e565b60200291909101359150600590506117c68b61019154848b8b888181106117b4576117b461579e565b905060200281019061047b9190615843565b60058111156117d7576117d7614def565b146117f55760405163344fa43b60e01b815260040160405180910390fd5b60006118046101915483612f8b565b9050600186600701600084815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff02191690831515021790555085600601600083815260200190815260200160002060008154600101919050819055508085848151811061188d5761188d61579e565b60200260200101818152505060018484815181106118ad576118ad61579e565b602002602001018181525050505080806118c6906157ca565b91505061176f565b506118ea88838360405180602001604052806000815250613640565b5050505050505050565b606081518351146119595760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610c33565b6000835167ffffffffffffffff81111561197557611975614c24565b60405190808252806020026020018201604052801561199e578160200160208202803683370190505b50905060005b8451811015611a16576119e98582815181106119c2576119c261579e565b60200260200101518583815181106119dc576119dc61579e565b6020026020010151610bcc565b8282815181106119fb576119fb61579e565b6020908102919091010152611a0f816157ca565b90506119a4565b509392505050565b6000838152610192602052604090206060908267ffffffffffffffff811115611a4957611a49614c24565b604051908082528060200260200182016040528015611a72578160200160208202803683370190505b50915060005b83811015611b13576000858583818110611a9457611a9461579e565b60008a81526101926020908152604090912054910292909201359250508110611ad057604051630e4eda8d60e21b815260040160405180910390fd5b60008181526008840160205260409020548451859084908110611af557611af561579e565b60209081029190910101525080611b0b816157ca565b915050611a78565b50509392505050565b6001600160a01b037f000000000000000000000000d66c101c9255c890126c41c158bf6dca0a6acf6a163003611ba95760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610c33565b7f000000000000000000000000d66c101c9255c890126c41c158bf6dca0a6acf6a6001600160a01b0316611c047f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614611c6f5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610c33565b611c788261333a565b610c8482826001613342565b6000306001600160a01b037f000000000000000000000000d66c101c9255c890126c41c158bf6dca0a6acf6a1614611d245760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610c33565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b90565b611d52612d55565b610191546000908152610192602052604081208054909103611d875760405163569f9bd760e11b815260040160405180910390fd5b60005b84811015610f24576000868683818110611da657611da661579e565b90506020020135905082600001548110611dd357604051630e4eda8d60e21b815260040160405180910390fd5b848483818110611de557611de561579e565b60009384526008860160209081526040909420930291909101359091555080611e0d816157ca565b915050611d8a565b606060008267ffffffffffffffff811115611e3257611e32614c24565b604051908082528060200260200182016040528015611e5b578160200160208202803683370190505b50905060005b838110156113c2576000858583818110611e7d57611e7d61579e565b60008a81526101926020908152604090912054910292909201359250508110611eb957604051630e4eda8d60e21b815260040160405180910390fd5b6000878152610192602090815260408083208484526005019091529020548351849084908110611eeb57611eeb61579e565b60209081029190910101525080611f01816157ca565b915050611e61565b606060008267ffffffffffffffff811115611f2657611f26614c24565b604051908082528060200260200182016040528015611f4f578160200160208202803683370190505b50905060005b838110156113c2576000858583818110611f7157611f7161579e565b60008a81526101926020908152604090912054910292909201359250508110611fad57604051630e4eda8d60e21b815260040160405180910390fd5b6000878152610192602090815260408083208484526001019091529020548351849084908110611fdf57611fdf61579e565b60209081029190910101525080611ff5816157ca565b915050611f55565b6120056134ce565b6101915460009081526101926020526040812090600561202b8761019154888888610cda565b600581111561203c5761203c614def565b610191546000908152610192602090815260408083208a8452600a0190915290205491149150336001600160a01b03881614801590612081575061207f87613521565b155b80156120935750612091876135a9565b155b156120b15760405163e1e4e59b60e01b815260040160405180910390fd5b81612195576120c36101915487613807565b6120e0576040516341bfbf2160e11b815260040160405180910390fd5b80600003612101576040516306a1c2a560e41b815260040160405180910390fd5b61019154600090815261019260209081526040808320898452600581018352818420546006909101909252909120541061214e5760405163344fa43b60e01b815260040160405180910390fd5b8034101561216f5760405163344fa43b60e01b815260040160405180910390fd5b8034111561219057604051632ad907fb60e01b815260040160405180910390fd5b6121b4565b34156121b4576040516346d53a8560e11b815260040160405180910390fd5b60006121c36101915488612f8b565b600088815260078601602090815260408083206001600160a01b038d1684528252808320805460ff191660019081179091558b845260068901835281842080548201905581519283019091529181529192506118ea918a918491612fc9565b61222a612d55565b61019180546001019055565b61223e612d55565b612247836124af565b61225082612d0f565b6122598161288c565b505050565b612266612d55565b61019154600090815261019260205260408120805490910361229b5760405163569f9bd760e11b815260040160405180910390fd5b61ffff8411156122be5760405163944aa30560e01b815260040160405180910390fd5b60005b84811015610f245760008686838181106122dd576122dd61579e565b9050602002013590508260000154811061230a57604051630e4eda8d60e21b815260040160405180910390fd5b84848381811061231c5761231c61579e565b60009384526005860160209081526040909420930291909101359091555080612344816157ca565b9150506122c1565b612354612d55565b6113db6000613862565b612366612d55565b600081815261019260205260408120805490918290612384836157ca565b9091555050805460009061239a90600190615830565b600081815260019093016020526040909220919091555050565b6101915460009081526101926020908152604080832084845260058101835281842054600690910190925282205410610c61565b60608167ffffffffffffffff81111561240357612403614c24565b60405190808252806020026020018201604052801561242c578160200160208202803683370190505b50905060005b82811015611a165761245c858585848181106124505761245061579e565b905060200201356138b4565b82828151811061246e5761246e61579e565b6020026020010190600581111561248757612487614def565b9081600581111561249a5761249a614def565b905250806124a7816157ca565b915050612432565b6124b7612d55565b6101915460009081526101926020526040902060020155565b60608167ffffffffffffffff8111156124eb576124eb614c24565b604051908082528060200260200182016040528015612514578160200160208202803683370190505b50905060005b82811015611a165760008484838181106125365761253661579e565b6000898152610192602090815260409091205491029290920135925050811061257257604051630e4eda8d60e21b815260040160405180910390fd5b60008681526101926020908152604080832084845260060190915290205483518490849081106125a4576125a461579e565b602090810291909101015250806125ba816157ca565b91505061251a565b816125cc816131ee565b612259838361393d565b60008281526101926020526040902054606090620f4240908067ffffffffffffffff81111561260757612607614c24565b604051908082528060200260200182016040528015612630578160200160208202803683370190505b50925060005b8181101561272d5760008681526101926020908152604080832084845260058101835281842054600690910190925282205490918290036126965760008684815181106126855761268561579e565b602002602001018181525050612718565b600085836126a4828561588d565b6126af90600261588d565b6126b991906158d3565b6126c39190615901565b6126cd908961588d565b90506126da600287615a59565b6126e4828561588d565b6126ee91906158d3565b6126f89084615a68565b87858151811061270a5761270a61579e565b602002602001018181525050505b50508080612725906157ca565b915050612636565b50505092915050565b600054610100900460ff16158080156127565750600054600160ff909116105b806127705750303b158015612770575060005460ff166001145b6127e25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c33565b6000805460ff191660011790558015612805576000805461ff0019166101001790555b61280e84613948565b612816613978565b61281e6139a7565b6128266139d6565b61282e613a1c565b612836613a1c565b6128408383612daf565b8015612886576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b612894612d55565b6101915460009081526101926020526040902060040155565b60006128be61019154858585612ec3565b949350505050565b6128ce612d55565b61019154600090815261019260205260408120905b84811015610f245760008686838181106128ff576128ff61579e565b905060200201359050600085858481811061291c5761291c61579e565b600094855260018701602090815260409095209402919091013590925550819050612946816157ca565b9150506128e3565b612956612d55565b6113db613a43565b6000612968613a80565b905090565b60008181526101926020526040902060609081612988613a80565b156129cf576040517f2269732d666573746976616c2d6f70656e223a7472756500000000000000000060208201526037016040516020818303038152906040529050612a0d565b6040517f2269732d666573746976616c2d6f70656e223a66616c73650000000000000000602082015260380160405160208183030381529060405290505b604080517f226172742d706965636573223a7b00000000000000000000000000000000000060208201528151600e818303018152602e90910190915260005b8354811015612b02576000612a618783612f8b565b905082612a6f826020613ad6565b612a92612a7c8a866138b4565b6005811115612a8d57612a8d614def565b613c7f565b604051602001612aa493929190615a90565b604051602081830303815290604052925060018560000154612ac69190615830565b8214612aef5782604051602001612add9190615af0565b60405160208183030381529060405292505b5080612afa816157ca565b915050612a4c565b5080604051602001612b149190615b15565b60405160208183030381529060405290508181604051602001612b38929190615b3a565b6040516020818303038152906040529350505050919050565b60608367ffffffffffffffff811115612b6c57612b6c614c24565b604051908082528060200260200182016040528015612b95578160200160208202803683370190505b50905060005b84811015612c2657612bd38888888885818110612bba57612bba61579e565b905060200201358787868181106117b4576117b461579e565b828281518110612be557612be561579e565b60200260200101906005811115612bfe57612bfe614def565b90816005811115612c1157612c11614def565b90525080612c1e816157ca565b915050612b9b565b509695505050505050565b612c39612d55565b61ffff811115612c5c5760405163944aa30560e01b815260040160405180910390fd5b6101915460009081526101926020526040902055565b846001600160a01b0381163314612c8c57612c8c336131ee565b610f248686868686613d80565b612ca1612d55565b6001600160a01b038116612d065760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c33565b610c9981613862565b612d17612d55565b6101915460009081526101926020526040902060030155565b60006001600160e01b0319821663152a902d60e11b1480610c615750610c6182613e0c565b6097546001600160a01b031633146113db5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c33565b6127106bffffffffffffffffffffffff82161115612e225760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610c33565b6001600160a01b038216612e785760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610c33565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b9091021761015f55565b6067610c848282615bd7565b600084815261019260209081526040808320868452600801909152812054612eec848285613e5c565b9695505050505050565b6000828152610192602052604081206002810154808303612f1c57600092505050610c61565b6000858152610192602090815260408083208784526001019091528120546004840154909190612f4d908390615c97565b612f57908461581d565b90506000846003015484612f6b919061581d565b905042828110801590612f7e5750818111155b9998505050505050505050565b600082815261019260205260408120548210612fba57604051630e4eda8d60e21b815260040160405180910390fd5b5061ffff1660109190911b1790565b6001600160a01b0384166130295760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610c33565b33600061303585613e72565b9050600061304285613e72565b905060008681526065602090815260408083206001600160a01b038b1684529091528120805487929061307690849061581d565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46130d683600089898989613ebd565b50505050505050565b6130e7614062565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000828152610160602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff169282019290925282916131b257506040805180820190915261015f546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b6020810151600090612710906131d6906bffffffffffffffffffffffff1687615c97565b6131e09190615cae565b915196919550909350505050565b6daaeb6d7670e522a718067333cd4e3b15610c9957604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561325b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327f9190615cc2565b610c9957604051633b79c77360e21b81526001600160a01b0382166004820152602401610c33565b6001600160a01b0385163314806132c357506132c38533610a99565b6133265760405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201526d195c881bdc88185c1c1c9bdd995960921b6064820152608401610c33565b61333385858585856140b4565b5050505050565b610c99612d55565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615613375576122598361430d565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156133cf575060408051601f3d908101601f191682019092526133cc91810190615cdf565b60015b6134415760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608401610c33565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146134c25760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610c33565b506122598383836143cb565b60c95460ff16156113db5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610c33565b60006d76a84fef008cdabe6409d2fe638b80639c395bc2336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529086166024820152604401602060405180830381865afa158015613585573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd39190615cc2565b600073c3aa9bc72bd623168860a1e5c6a4530d3d80456c33604051634ba4f2cf60e11b81526001600160a01b03858116600483015291821691831690639749e59e90602401602060405180830381865afa15801561360b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061362f9190615cf8565b6001600160a01b0316149392505050565b6001600160a01b0384166136a05760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610c33565b81518351146137025760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610c33565b3360005b845181101561379f578381815181106137215761372161579e565b60200260200101516065600087848151811061373f5761373f61579e565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254613787919061581d565b90915550819050613797816157ca565b915050613706565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516137f0929190615d15565b60405180910390a4613333816000878787876143f0565b600082815261019260209081526040808320848452600181019092528220546004820154839061a8c09061383c908490615c97565b846002015461384b919061581d565b613855919061581d565b4210159695505050505050565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000828152610192602052604081205482106138e357604051630e4eda8d60e21b815260040160405180910390fd5b600083815261019260209081526040808320858452600581018352818420546006909101909252909120541061391b57506000610c61565b6139286101915483612ef6565b61393457506002610c61565b50600392915050565b610c843383836144ec565b600054610100900460ff1661396f5760405162461bcd60e51b8152600401610c3390615d3a565b610c99816145cc565b600054610100900460ff1661399f5760405162461bcd60e51b8152600401610c3390615d3a565b6113db6145f3565b600054610100900460ff166139ce5760405162461bcd60e51b8152600401610c3390615d3a565b6113db614623565b600054610100900460ff166139fd5760405162461bcd60e51b8152600401610c3390615d3a565b6113db733cc6cdda760b79bafa08df41ecfa224f810dceb66001614656565b600054610100900460ff166113db5760405162461bcd60e51b8152600401610c3390615d3a565b613a4b6134ce565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586131143390565b610191546000908152610192602052604081206002810154808303613aa85760009250505090565b6000826003015482613aba919061581d565b905042828110801590613acd5750818111155b94505050505090565b60606000613ae5836002615c97565b613af090600261581d565b67ffffffffffffffff811115613b0857613b08614c24565b6040519080825280601f01601f191660200182016040528015613b32576020820181803683370190505b509050600360fc1b81600081518110613b4d57613b4d61579e565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613b7c57613b7c61579e565b60200101906001600160f81b031916908160001a9053506000613ba0846002615c97565b613bab90600161581d565b90505b6001811115613c30577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613bec57613bec61579e565b1a60f81b828281518110613c0257613c0261579e565b60200101906001600160f81b031916908160001a90535060049490941c93613c2981615d97565b9050613bae565b508315610cd35760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c33565b606081600003613ca65750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613cd05780613cba816157ca565b9150613cc99050600a83615cae565b9150613caa565b60008167ffffffffffffffff811115613ceb57613ceb614c24565b6040519080825280601f01601f191660200182016040528015613d15576020820181803683370190505b5090505b84156128be57613d2a600183615830565b9150613d37600a86615dae565b613d4290603061581d565b60f81b818381518110613d5757613d5761579e565b60200101906001600160f81b031916908160001a905350613d79600a86615cae565b9450613d19565b6001600160a01b038516331480613d9c5750613d9c8533610a99565b613dff5760405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201526d195c881bdc88185c1c1c9bdd995960921b6064820152608401610c33565b61333385858585856147f5565b60006001600160e01b03198216636cdb3d1360e11b1480613e3d57506001600160e01b031982166303a24d0760e21b145b80610c6157506301ffc9a760e01b6001600160e01b0319831614610c61565b600082613e6985846149a4565b14949350505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613eac57613eac61579e565b602090810291909101015292915050565b6001600160a01b0384163b15610f245760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190613f019089908990889088908890600401615dc2565b6020604051808303816000875af1925050508015613f3c575060408051601f3d908101601f19168201909252613f3991810190615e05565b60015b613ff157613f48615e22565b806308c379a003613f815750613f5c615e3d565b80613f675750613f83565b8060405162461bcd60e51b8152600401610c339190614f0a565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610c33565b6001600160e01b0319811663f23a6e6160e01b146130d65760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610c33565b60c95460ff166113db5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610c33565b81518351146141165760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610c33565b6001600160a01b03841661417a5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610c33565b3360005b84518110156142a757600085828151811061419b5761419b61579e565b6020026020010151905060008583815181106141b9576141b961579e565b60209081029190910181015160008481526065835260408082206001600160a01b038e16835290935291909120549091508181101561424d5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610c33565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061428c90849061581d565b92505081905550505050806142a0906157ca565b905061417e565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516142f7929190615d15565b60405180910390a4610f248187878787876143f0565b6001600160a01b0381163b61438a5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610c33565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6143d483614a10565b6000825111806143e15750805b15612259576128868383614a50565b6001600160a01b0384163b15610f245760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906144349089908990889088908890600401615ec7565b6020604051808303816000875af192505050801561446f575060408051601f3d908101601f1916820190925261446c91810190615e05565b60015b61447b57613f48615e22565b6001600160e01b0319811663bc197c8160e01b146130d65760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610c33565b816001600160a01b0316836001600160a01b03160361455f5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610c33565b6001600160a01b03838116600081815260666020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600054610100900460ff16610c905760405162461bcd60e51b8152600401610c3390615d3a565b600054610100900460ff1661461a5760405162461bcd60e51b8152600401610c3390615d3a565b6113db33613862565b600054610100900460ff1661464a5760405162461bcd60e51b8152600401610c3390615d3a565b60c9805460ff19169055565b600054610100900460ff1661467d5760405162461bcd60e51b8152600401610c3390615d3a565b6daaeb6d7670e522a718067333cd4e3b15610c845760405163c3c5a54760e01b81523060048201526daaeb6d7670e522a718067333cd4e9063c3c5a547906024016020604051808303816000875af11580156146dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147019190615cc2565b610c8457801561477557604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b15801561476157600080fd5b505af1158015610f24573d6000803e3d6000fd5b6001600160a01b038216156147c45760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401614747565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401614747565b6001600160a01b0384166148595760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610c33565b33600061486585613e72565b9050600061487285613e72565b905060008681526065602090815260408083206001600160a01b038c168452909152902054858110156148fa5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610c33565b60008781526065602090815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061493990849061581d565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4614999848a8a8a8a8a613ebd565b505050505050505050565b600081815b8451811015611a165760008582815181106149c6576149c661579e565b602002602001015190508083116149ec57600083815260208290526040902092506149fd565b600081815260208490526040902092505b5080614a08816157ca565b9150506149a9565b614a198161430d565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b614ab85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610c33565b600080846001600160a01b031684604051614ad39190615f25565b600060405180830381855af49150503d8060008114614b0e576040519150601f19603f3d011682016040523d82523d6000602084013e614b13565b606091505b5091509150610e2d8282604051806060016040528060278152602001615f426027913960608315614b45575081610cd3565b610cd38383815115613f675781518083602001fd5b6001600160a01b0381168114610c9957600080fd5b60008060408385031215614b8257600080fd5b8235614b8d81614b5a565b946020939093013593505050565b6001600160e01b031981168114610c9957600080fd5b600060208284031215614bc357600080fd5b8135610cd381614b9b565b80356bffffffffffffffffffffffff81168114614bea57600080fd5b919050565b60008060408385031215614c0257600080fd5b8235614c0d81614b5a565b9150614c1b60208401614bce565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715614c6057614c60614c24565b6040525050565b600082601f830112614c7857600080fd5b813567ffffffffffffffff811115614c9257614c92614c24565b604051614ca9601f8301601f191660200182614c3a565b818152846020838601011115614cbe57600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215614ced57600080fd5b813567ffffffffffffffff811115614d0457600080fd5b6128be84828501614c67565b60008060408385031215614d2357600080fd5b823591506020830135614d3581614b5a565b809150509250929050565b60008083601f840112614d5257600080fd5b50813567ffffffffffffffff811115614d6a57600080fd5b6020830191508360208260051b850101111561144057600080fd5b600080600080600060808688031215614d9d57600080fd5b8535614da881614b5a565b94506020860135935060408601359250606086013567ffffffffffffffff811115614dd257600080fd5b614dde88828901614d40565b969995985093965092949392505050565b634e487b7160e01b600052602160045260246000fd5b60068110614e2357634e487b7160e01b600052602160045260246000fd5b9052565b60208101610c618284614e05565b60008060008060408587031215614e4b57600080fd5b843567ffffffffffffffff80821115614e6357600080fd5b614e6f88838901614d40565b90965094506020870135915080821115614e8857600080fd5b50614e9587828801614d40565b95989497509550505050565b600060208284031215614eb357600080fd5b5035919050565b60005b83811015614ed5578181015183820152602001614ebd565b50506000910152565b60008151808452614ef6816020860160208601614eba565b601f01601f19169290920160200192915050565b602081526000610cd36020830184614ede565b600067ffffffffffffffff821115614f3757614f37614c24565b5060051b60200190565b600082601f830112614f5257600080fd5b81356020614f5f82614f1d565b604051614f6c8282614c3a565b83815260059390931b8501820192828101915086841115614f8c57600080fd5b8286015b84811015612c26578035614fa381614b5a565b8352918301918301614f90565b600082601f830112614fc157600080fd5b81356020614fce82614f1d565b604051614fdb8282614c3a565b83815260059390931b8501820192828101915086841115614ffb57600080fd5b8286015b84811015612c265780358352918301918301614fff565b6000806000806080858703121561502c57600080fd5b8435935060208501359250604085013567ffffffffffffffff8082111561505257600080fd5b61505e88838901614f41565b9350606087013591508082111561507457600080fd5b5061508187828801614fb0565b91505092959194509250565b600081518084526020808501945080840160005b838110156150bd578151875295820195908201906001016150a1565b509495945050505050565b602081526000610cd3602083018461508d565b600080600080600080600080600080600060c08c8e0312156150fc57600080fd5b8b359a5067ffffffffffffffff8060208e0135111561511a57600080fd5b61512a8e60208f01358f01614d40565b909b50995060408d013581101561514057600080fd5b6151508e60408f01358f01614d40565b909950975060608d013581101561516657600080fd5b6151768e60608f01358f01614d40565b909750955060808d013581101561518c57600080fd5b61519c8e60808f01358f01614d40565b909550935060a08d01358110156151b257600080fd5b506151c38d60a08e01358e01614d40565b81935080925050509295989b509295989b9093969950565b6000806000604084860312156151f057600080fd5b83359250602084013567ffffffffffffffff81111561520e57600080fd5b61521a86828701614d40565b9497909650939450505050565b6000806040838503121561523a57600080fd5b50508035926020909101359150565b600080600080600060a0868803121561526157600080fd5b853561526c81614b5a565b9450602086013561527c81614b5a565b9350604086013567ffffffffffffffff8082111561529957600080fd5b6152a589838a01614fb0565b945060608801359150808211156152bb57600080fd5b6152c789838a01614fb0565b935060808801359150808211156152dd57600080fd5b506152ea88828901614c67565b9150509295509295909350565b60006020828403121561530957600080fd5b8135610cd381614b5a565b60008060008060006060868803121561532c57600080fd5b853561533781614b5a565b9450602086013567ffffffffffffffff8082111561535457600080fd5b61536089838a01614d40565b9096509450604088013591508082111561537957600080fd5b50614dde88828901614d40565b6000806040838503121561539957600080fd5b823567ffffffffffffffff808211156153b157600080fd5b6153bd86838701614f41565b935060208501359150808211156153d357600080fd5b506153e085828601614fb0565b9150509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561542257835183529284019291840191600101615406565b50909695505050505050565b6000806040838503121561544157600080fd5b823561544c81614b5a565b9150602083013567ffffffffffffffff81111561546857600080fd5b6153e085828601614c67565b6000806000806060858703121561548a57600080fd5b843561549581614b5a565b935060208501359250604085013567ffffffffffffffff8111156154b857600080fd5b614e9587828801614d40565b6000806000606084860312156154d957600080fd5b505081359360208301359350604090920135919050565b6020808252825182820181905260009190848201906040850190845b818110156154225761551f838551614e05565b928401929184019160010161550c565b8015158114610c9957600080fd5b6000806040838503121561555057600080fd5b823561555b81614b5a565b91506020830135614d358161552f565b60008060006060848603121561558057600080fd5b833567ffffffffffffffff81111561559757600080fd5b6155a386828701614c67565b93505060208401356155b481614b5a565b91506155c260408501614bce565b90509250925092565b6000806000606084860312156155e057600080fd5b8335925060208085013567ffffffffffffffff8111156155ff57600080fd5b8501601f8101871361561057600080fd5b803561561b81614f1d565b6040516156288282614c3a565b82815260059290921b830184019184810191508983111561564857600080fd5b928401925b828410156156665783358252928401929084019061564d565b96999698505050506040949094013593505050565b6000806000806000806080878903121561569457600080fd5b863561569f81614b5a565b955060208701359450604087013567ffffffffffffffff808211156156c357600080fd5b6156cf8a838b01614d40565b909650945060608901359150808211156156e857600080fd5b506156f589828a01614d40565b979a9699509497509295939492505050565b6000806040838503121561571a57600080fd5b823561572581614b5a565b91506020830135614d3581614b5a565b600080600080600060a0868803121561574d57600080fd5b853561575881614b5a565b9450602086013561576881614b5a565b93506040860135925060608601359150608086013567ffffffffffffffff81111561579257600080fd5b6152ea88828901614c67565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016157dc576157dc6157b4565b5060010190565b600181811c908216806157f757607f821691505b60208210810361581757634e487b7160e01b600052602260045260246000fd5b50919050565b80820180821115610c6157610c616157b4565b81810381811115610c6157610c616157b4565b6000808335601e1984360301811261585a57600080fd5b83018035915067ffffffffffffffff82111561587557600080fd5b6020019150600581901b360382131561144057600080fd5b80820260008212600160ff1b841416156158a9576158a96157b4565b8181058314821517610c6157610c616157b4565b634e487b7160e01b600052601260045260246000fd5b6000826158e2576158e26158bd565b600160ff1b8214600019841416156158fc576158fc6157b4565b500590565b8181036000831280158383131683831282161715615921576159216157b4565b5092915050565b80825b600180861161593a575061596c565b816001600160ff1b0304821115615953576159536157b4565b8086161561596057918102915b9490941c93800261592b565b935093915050565b600082801561598a57600181146159945761599d565b6001915050610c61565b82915050610c61565b50816159ab57506000610c61565b506001600082138082146159c45780156159e2576159fb565b826001600160ff1b03048311156159dd576159dd6157b4565b6159fb565b826001600160ff1b03058312156159fb576159fb6157b4565b5080831615615a075750805b615a178360011c83840283615928565b806001600160ff1b03048211600083131615615a3557615a356157b4565b60008212600160ff1b82900583121615615a5157615a516157b4565b029392505050565b6000610cd360ff841683615974565b8082018281126000831280158216821582161715615a8857615a886157b4565b505092915050565b60008451615aa2818460208901614eba565b601160f91b9083019081528451615ac0816001840160208901614eba565b61111d60f11b600192909101918201528351615ae3816003840160208801614eba565b0160030195945050505050565b60008251615b02818460208701614eba565b600b60fa1b920191825250600101919050565b60008251615b27818460208701614eba565b607d60f81b920191825250600101919050565b607b60f81b815260008351615b56816001850160208801614eba565b600b60fa1b6001918401918201528351615b77816002840160208801614eba565b607d60f81b60029290910191820152600301949350505050565b601f82111561225957600081815260208120601f850160051c81016020861015615bb85750805b601f850160051c820191505b81811015610f2457828155600101615bc4565b815167ffffffffffffffff811115615bf157615bf1614c24565b615c0581615bff84546157e3565b84615b91565b602080601f831160018114615c3a5760008415615c225750858301515b600019600386901b1c1916600185901b178555610f24565b600085815260208120601f198616915b82811015615c6957888601518255948401946001909101908401615c4a565b5085821015615c875787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082028115828204841417610c6157610c616157b4565b600082615cbd57615cbd6158bd565b500490565b600060208284031215615cd457600080fd5b8151610cd38161552f565b600060208284031215615cf157600080fd5b5051919050565b600060208284031215615d0a57600080fd5b8151610cd381614b5a565b604081526000615d28604083018561508d565b8281036020840152610e2d818561508d565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201527f6e697469616c697a696e67000000000000000000000000000000000000000000606082015260800190565b600081615da657615da66157b4565b506000190190565b600082615dbd57615dbd6158bd565b500690565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152615dfa60a0830184614ede565b979650505050505050565b600060208284031215615e1757600080fd5b8151610cd381614b9b565b600060033d1115611d475760046000803e5060005160e01c90565b600060443d1015615e4b5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715615e7b57505050505090565b8285019150815181811115615e935750505050505090565b843d8701016020828501011115615ead5750505050505090565b615ebc60208286010187614c3a565b509095945050505050565b60006001600160a01b03808816835280871660208401525060a06040830152615ef360a083018661508d565b8281036060840152615f05818661508d565b90508281036080840152615f198185614ede565b98975050505050505050565b60008251615f37818460208701614eba565b919091019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212208632e0a83d3daf457b94710931261a592522ec4a4e9b8e89ba93f179be96dd1b64736f6c63430008110033

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

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.