ETH Price: $3,435.22 (+1.61%)
Gas: 2 Gwei

Contract

0x34817D263d1881482dcF0aC0a5FaDAB0B907f514
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x60a06040159019232022-11-05 6:07:47603 days ago1667628467IN
 Create: OKXFootballCup
0 ETH0.0555084811.05836617

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OKXFootballCup

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 26 : OKXFootballCup.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155URIStorageUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol";
import "./interfaces/IStake.sol";
import "./interfaces/IBonus.sol";

// import "hardhat/console.sol";
// import "forge-std/console.sol";

contract OKXFootballCup is
    Initializable,
    OwnableUpgradeable,
    ERC1155SupplyUpgradeable,
    ERC1155URIStorageUpgradeable,
    UUPSUpgradeable
{
    using SafeERC20Upgradeable for IERC20Upgradeable;

    using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet;

    /**
     * @dev Emitted when the cancelEvent is triggered.
     */
    event Canceled(bool cancel);

    /**
     * @dev Emitted when claim is enabled.
     */
    event ClaimEnabled(bool enable);

    /**
     * @dev Emitted when withdraw is enabled.
     */
    event WithdrawEnabled(bool enable);

    /**
     * @dev Emitted when withdraw stake.
     */
    event UnStaked(address indexed account, uint256 amount);

    struct PauseTimeStruct {
        uint256 startTime;
        uint256 endTime;
    }

    string public constant name = "OKXFootballCup";
    string public constant symbol = "OKXFC";

    uint256 public mintStartTime;
    uint256 public mintEndTime;

    bool public claimEnabled;
    bool public withdrawEnabled;

    address public stakeContract;
    address public bonusContract;
    uint256 public stakePrice;

    uint256 public totalStaking;
    mapping(address => uint256) public stakeAmountMap; //Staker address to stake balance
    uint256 public totalMintForDrop;

    mapping(uint256 => PauseTimeStruct[]) public mintPauseTimeMap;
    mapping(uint256 => PauseTimeStruct) public claimPauseTimeMap;
    mapping(uint256 => bool) public _pauseClaimMap; //unable claim before game start

    uint256 private logIndex;
    mapping(uint256 => uint256) private _totalHolder;
    mapping(uint256 => mapping(address => uint256)) private _holderMap;
    mapping(uint256 => EnumerableSetUpgradeable.AddressSet) private _holderSets;

    uint256 private _totalHolderForAll;
    mapping(address => uint256) private _holderMapForAll;

    address private _appSignerAccount;
    address private _webSignerAccount;
    address private _serverAccount;
    address private _admin;

    mapping(bytes32 => bool) private _apiHashMap;

    bool private _eventCanceled;

    EnumerableSetUpgradeable.AddressSet private _blocklist;
    mapping(address => uint256) private _blockRateMap;

    /**** these now in Bonus ****/
    // uint256 public totalBonus;
    // uint256 public totalMintBonus;
    // uint256 public totalGroupBonus;
    // uint256 public claimedMintBonus;
    // mapping(address => uint256) private _groupBonusMap; //Bonus address to amount
    // mapping(uint256 => uint256) private _totalMintBonusMap; //tokenId to token bonus
    // mapping(address => uint256) private _eliminationBonusMap; //Bonus address to amount

    // -----

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

    function initialize(address _stakeContract, address _bonusContract)
        public
        initializer
    {
        __ERC1155_init("");
        __Ownable_init();
        __ERC1155Supply_init();
        __ERC1155URIStorage_init();
        __UUPSUpgradeable_init();

        stakeContract = _stakeContract;
        bonusContract = _bonusContract;
        stakePrice = IStake(stakeContract).stakePrice();
    }

    modifier stageOne() {
        require(
            mintStartTime > 0 && block.timestamp > mintStartTime,
            "FootballCup: mint not start"
        );
        require(block.timestamp < mintEndTime, "FootballCup: mint stage ended");
        _;
    }

    modifier stageTwo() {
        require(claimEnabled, "FootballCup: claim is not activated");
        _;
    }

    modifier stageThree() {
        require(withdrawEnabled, "FootballCup: withdraw is not activated");
        _;
    }

    modifier idRange(uint256 id) {
        require(id >= 1 && id <= 32, "FootballCup: token id out of range 1-32");
        _;
    }

    modifier idsRange(uint256[] memory ids) {
        uint256 length = ids.length;

        for (uint256 i = 0; i < length; ) {
            uint256 id = ids[i];
            if (id > 32 || id <= 0) {
                revert("FootballCup: token id out of range 1-32");
            }
            unchecked {
                ++i;
            }
        }
        _;
    }

    modifier onlyAdminOrOwner() {
        require(
            msg.sender == _admin || msg.sender == owner(),
            "FootballCup: only admin or owner"
        );
        _;
    }

    modifier onlyAdminOrServer() {
        require(
            msg.sender == _admin || msg.sender == _serverAccount,
            "FootballCup: only admin or server"
        );
        _;
    }

    modifier onlyServerOrOwner() {
        require(
            msg.sender == owner() || msg.sender == _serverAccount,
            "FootballCup: only server or owner"
        );
        _;
    }

    // ---- methods ----

    function totalHolder(uint256 id) public view returns (uint256) {
        return _totalHolder[id];
    }

    function totalHolder() public view returns (uint256) {
        return _totalHolderForAll;
    }

    function totalSupply() public view returns (uint256) {
        uint256 _totalSupply;
        for (uint256 id = 1; id <= 32; ) {
            _totalSupply += totalSupply(id);
            unchecked {
                ++id;
            }
        }
        return _totalSupply;
    }

    /**
     * @dev balance of all team NFT
     */
    function balanceOfAll(address account) public view returns (uint256) {
        return _holderMapForAll[account];
    }

    function uri(uint256 tokenId)
        public
        view
        override(ERC1155Upgradeable, ERC1155URIStorageUpgradeable)
        returns (string memory)
    {
        return ERC1155URIStorageUpgradeable.uri(tokenId);
    }

    function getBlockList() public view returns (address[] memory) {
        return _blocklist.values();
    }

    function mintedAmountOf(address account) public view returns (uint256) {
        return stakeAmountMap[account] / stakePrice;
    }

    function _checkIdMintPausedTime(uint256 id) internal view {
        PauseTimeStruct[] memory pauseTimeArray = mintPauseTimeMap[id];
        uint256 length = pauseTimeArray.length;

        for (uint256 i = 0; i < length; ) {
            require(
                block.timestamp < pauseTimeArray[i].startTime ||
                    block.timestamp > pauseTimeArray[i].endTime,
                "FootballCup: competition is on going"
            );

            unchecked {
                ++i;
            }
        }
    }

    function _checkIdsMintPausedTime(uint256[] memory ids) internal view {
        uint256 length = ids.length;

        for (uint256 i = 0; i < length; ) {
            _checkIdMintPausedTime(ids[i]);
            unchecked {
                ++i;
            }
        }
    }

    function mint(
        address account,
        uint256 id,
        uint256 amount,
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public stageOne idRange(id) {
        _verify(amount, hash, v, r, s);
        _checkIdMintPausedTime(id);
        _mintStake(amount);
        _mint(account, id, amount, "0x");
    }

    function mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public stageOne idsRange(ids) {
        uint256 totalMintAmount = _totalMintAmount(amounts);
        _verify(totalMintAmount, hash, v, r, s);
        _checkIdsMintPausedTime(ids);
        _mintStake(totalMintAmount);
        _mintBatch(to, ids, amounts, "0x");
    }

    function _verify(
        uint256 amount,
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        require(
            _apiHashMap[hash] == false,
            "FootballCup: hash code have been used"
        );
        _apiHashMap[hash] = true;
        address signer = ECDSAUpgradeable.recover(hash, v, r, s);
        uint256 mintedAmount = stakeAmountMap[msg.sender] / stakePrice;
        require(
            signer == _appSignerAccount || signer == _webSignerAccount,
            "FootballCup: invalid call signature"
        );
        require(
            mintedAmount + amount <= 3,
            "FootballCup: free mint reach the cap 3"
        );
        if (signer == _webSignerAccount) {
            require(
                mintedAmount + amount == 1,
                "FootballCup: free mint reach the web cap 1"
            );
        }
    }

    function _mintStake(uint256 totalMintAmount) internal {
        // mint amount (stake amount) already checked in _verify
        uint256 totalMintFee;
        totalMintFee += totalMintAmount * stakePrice;

        IStake(stakeContract).deposit(msg.sender, totalMintFee);

        totalStaking += totalMintFee;

        stakeAmountMap[msg.sender] = stakeAmountMap[msg.sender] + totalMintFee;
    }

    function _totalMintAmount(uint256[] memory amounts)
        internal
        pure
        returns (uint256 totalMintAmount)
    {
        uint256 length = amounts.length;
        for (uint256 i = 0; i < length; ) {
            totalMintAmount += amounts[i];
            unchecked {
                ++i;
            }
        }
    }

    function claimBonus(uint256 id, uint256 amount) external stageTwo {
        uint256[] memory ids = new uint256[](1);
        uint256[] memory amounts = new uint256[](1);

        ids[0] = id;
        amounts[0] = amount;

        claimBatchBonus(ids, amounts);
    }

    function _checkIdClaimPausedTime(uint256 id) internal view {
        require(
            block.timestamp < claimPauseTimeMap[id].startTime ||
                block.timestamp > claimPauseTimeMap[id].endTime,
            "FootballCup: competetion is on going"
        );
    }

    function claimBatchBonus(uint256[] memory ids, uint256[] memory amounts)
        public
        stageTwo
        idsRange(ids)
    {
        require(
            ids.length == amounts.length,
            "FootballCup: claim param length not match"
        );
        uint256 length = ids.length;
        for (uint256 i = 0; i < length; ) {
            uint256 id = ids[i];

            _checkIdClaimPausedTime(id);
            require(
                _pauseClaimMap[id] == false,
                "FootballCup: claim still paused"
            );
            unchecked {
                i++;
            }
        }

        IBonus(bonusContract).claim(msg.sender, ids, amounts);
        _burnBatch(msg.sender, ids, amounts);
    }

    function _unstake() internal {
        address owner = msg.sender;
        uint256 stakeAmount = stakeAmountMap[owner];

        stakeAmountMap[owner] = 0;
        totalStaking -= stakeAmount;

        IStake(stakeContract).withdraw(owner, stakeAmount);
        emit UnStaked(owner, stakeAmount);
    }

    function withdraw() external stageThree {
        //withdraw stake
        if (stakeAmountMap[msg.sender] > 0) {
            _unstake();
        }

        //withdraw  bonus
        if (_eventCanceled == false) {
            uint256 withdrawRate = _blockRateMap[msg.sender];
            IBonus(bonusContract).withdraw(msg.sender, withdrawRate);
        }
    }

    // ---- only owner ----

    function setAppSignerAccount(address appSignerAccount) public onlyOwner {
        _appSignerAccount = appSignerAccount;
    }

    function setWebSignerAccount(address webSignerAccount) public onlyOwner {
        _webSignerAccount = webSignerAccount;
    }

    function setServerAccount(address serverAccount) public onlyOwner {
        _serverAccount = serverAccount;
    }

    function setAdmin(address admin) public onlyOwner {
        _admin = admin;
    }

    function setBlockList(address _blockAddress, uint256 _withdrawRate)
        public
        onlyOwner
    {
        require(
            _withdrawRate < 10_000,
            "FootballCup: withdrawRate can not greater than 10_000"
        );
        _blocklist.add(_blockAddress);
        _blockRateMap[_blockAddress] = _withdrawRate;
    }

    function setURI(uint256 tokenId, string memory tokenURI) public onlyOwner {
        _setURI(tokenId, tokenURI);
    }

    function setMintStartTime(uint256 _mintStartTime) public onlyOwner {
        mintStartTime = _mintStartTime;
    }

    function setMintEndTime(uint256 _mintEndTime) public onlyOwner {
        mintEndTime = _mintEndTime;
    }

    function cancelEvent(bool cancel) public onlyOwner {
        _eventCanceled = cancel;

        emit Canceled(cancel);
    }

    function _authorizeUpgrade(address newImplementation)
        internal
        override
        onlyOwner
    {}

    // ---- only admin or server ----
    function groupStageEnds(uint256[] memory winners, uint256[] memory losers)
        external
        onlyAdminOrServer
    {
        IBonus(bonusContract).groupStageEnds(winners, losers);
    }

    function elimination(uint256 winner, uint256 loser)
        external
        onlyAdminOrServer
    {
        IBonus(bonusContract).elimination(winner, loser);
    }

    function setGroupBonus(address[] memory accounts, uint256[] memory bonus)
        external
        onlyAdminOrServer
    {
        IBonus(bonusContract).setGroupBonus(accounts, bonus);
    }

    // ---- only admin or owner ----
    function mintForDrop(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts
    ) external onlyAdminOrOwner stageOne idsRange(ids) {
        _checkIdsMintPausedTime(ids);
        _mintBatch(to, ids, amounts, "0x");
        totalMintForDrop += _totalMintAmount(amounts);
    }

    function setMintBonus(uint256 id, uint256 bonus) external onlyAdminOrOwner {
        IBonus(bonusContract).setMintBonus(id, bonus);
    }

    function setPauseMintTimes(
        uint256 id,
        PauseTimeStruct[] memory pauseTimeArray
    ) public onlyAdminOrOwner {
        uint256 length = pauseTimeArray.length;
        // empty the array first
        delete mintPauseTimeMap[id];

        for (uint256 i; i < length; ) {
            uint256 startTime = pauseTimeArray[i].startTime;
            uint256 endTime = pauseTimeArray[i].endTime;
            require(startTime < endTime, "FootballCup: startTime > endTime");
            mintPauseTimeMap[id].push(pauseTimeArray[i]);
            unchecked {
                ++i;
            }
        }
    }

    function setPauseClaimTimes(uint256 id, PauseTimeStruct memory pauseTime)
        external
        onlyAdminOrOwner
    {
        uint256 startTime = pauseTime.startTime;
        uint256 endTime = pauseTime.endTime;
        require(startTime < endTime, "FootballCup: startTime > endTime");
        claimPauseTimeMap[id].startTime = pauseTime.startTime;
        claimPauseTimeMap[id].endTime = pauseTime.endTime;
    }

    function pauseClaim(uint256 id) external onlyAdminOrOwner {
        _pauseClaimMap[id] = true;
    }

    function unpauseClaim(uint256 id) external onlyAdminOrOwner {
        _pauseClaimMap[id] = false;
    }

    function setClaimEnable(bool active) public onlyAdminOrOwner {
        claimEnabled = active;
        emit ClaimEnabled(active);
    }

    function setWithdrawEnable(bool active) public onlyAdminOrOwner {
        withdrawEnabled = active;
        emit WithdrawEnabled(active);
    }

    function getImplementation() public view returns (address) {
        return _getImplementation();
    }

    function snapshot(
        uint256 id,
        uint256 pageSize,
        uint256 pageIndex // 0,1,2...
    )
        public
        view
        onlyServerOrOwner
        returns (
            address[] memory accounts,
            uint256[] memory amounts,
            uint256 snapshotSize // snapshotSize
        )
    {
        EnumerableSetUpgradeable.AddressSet storage holderSet = _holderSets[id];
        uint256 length = holderSet.length();
        uint256 skip = pageSize * pageIndex;
        require(skip < length, "FootballCup: snapshot size out of bound");
        uint256 unread = length - skip;
        if (unread > pageSize) {
            unread = pageSize;
        }
        accounts = new address[](unread);
        amounts = new uint256[](unread);
        for (uint256 i = 0; i < unread; ++i) {
            accounts[i] = holderSet.at(i + skip);
            amounts[i] = _holderMap[id][holderSet.at(i + skip)];
        }
        snapshotSize = _holderSets[id].length();
    }

    // The following functions are overrides required by Solidity.

    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal override(ERC1155Upgradeable, ERC1155SupplyUpgradeable) {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);

        uint256 length = ids.length;

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

            if (from != address(0) && amount > 0) {
                _holderMapForAll[from] -= amount;
                _holderMap[id][from] -= amount;

                if (_holderMapForAll[from] == 0) {
                    _totalHolderForAll -= 1;
                }

                if (_holderMap[id][from] == 0) {
                    _totalHolder[id] -= 1;
                    _holderSets[id].remove(from);
                }
            }

            if (to != address(0) && amount > 0) {
                uint256 holderMapForAllBefore = _holderMapForAll[to];
                uint256 holderMapBefore = _holderMap[id][to];

                _holderMapForAll[to] += amount;
                _holderMap[id][to] += amount;

                if (holderMapForAllBefore == 0) {
                    _totalHolderForAll += 1;
                }

                if (holderMapBefore == 0) {
                    _totalHolder[id] += 1;
                    _holderSets[id].add(to);
                }
            }

            unchecked {
                ++i;
            }
        }
    }
}

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

interface IStake {
    function deposit(address from, uint256 amount) external;

    function withdraw(address to, uint256 amount) external;

    function stakePrice() external returns (uint256);
}

File 3 of 26 : IBonus.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IBonus {
    function claim(
        address owner,
        uint256[] memory ids,
        uint256[] memory amounts
    ) external;

    function withdraw(address owner, uint256 withdrawRate) external;

    function groupStageEnds(uint256[] memory winners, uint256[] memory losers)
        external;

    function elimination(uint256 winner, uint256 loser) external;

    function setMintBonus(uint256 id, uint256 bonus) external;

    function setGroupBonus(address[] memory accounts, uint256[] memory bonus)
        external;
}

File 4 of 26 : 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 5 of 26 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library 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 functionCall(target, data, "Address: low-level call failed");
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

File 6 of 26 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

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

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * 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. Equivalent to `reinitializer(1)`.
     */
    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.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so 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.
     *
     * 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.
     */
    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.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

File 7 of 26 : UUPSUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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 that the this implementation remains valid after 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 8 of 26 : EnumerableSetUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 *  Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.
 *  See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 *  In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.
 * ====
 */
library EnumerableSetUpgradeable {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 9 of 26 : ERC1155SupplyUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Extension of ERC1155 that adds tracking of total supply per id.
 *
 * Useful for scenarios where Fungible and Non-fungible tokens have to be
 * clearly identified. Note: While a totalSupply of 1 might mean the
 * corresponding is an NFT, there is no guarantees that no other token with the
 * same id are not going to be minted.
 */
abstract contract ERC1155SupplyUpgradeable is Initializable, ERC1155Upgradeable {
    function __ERC1155Supply_init() internal onlyInitializing {
    }

    function __ERC1155Supply_init_unchained() internal onlyInitializing {
    }
    mapping(uint256 => uint256) private _totalSupply;

    /**
     * @dev Total amount of tokens in with a given id.
     */
    function totalSupply(uint256 id) public view virtual returns (uint256) {
        return _totalSupply[id];
    }

    /**
     * @dev Indicates whether any token exist with a given id, or not.
     */
    function exists(uint256 id) public view virtual returns (bool) {
        return ERC1155SupplyUpgradeable.totalSupply(id) > 0;
    }

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);

        if (from == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                _totalSupply[ids[i]] += amounts[i];
            }
        }

        if (to == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                uint256 id = ids[i];
                uint256 amount = amounts[i];
                uint256 supply = _totalSupply[id];
                require(supply >= amount, "ERC1155: burn amount exceeds totalSupply");
                unchecked {
                    _totalSupply[id] = supply - amount;
                }
            }
        }
    }

    /**
     * @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 26 : ERC1155URIStorageUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155URIStorage.sol)

pragma solidity ^0.8.0;

import "../../../utils/StringsUpgradeable.sol";
import "../ERC1155Upgradeable.sol";
import "../../../proxy/utils/Initializable.sol";

/**
 * @dev ERC1155 token with storage based token URI management.
 * Inspired by the ERC721URIStorage extension
 *
 * _Available since v4.6._
 */
abstract contract ERC1155URIStorageUpgradeable is Initializable, ERC1155Upgradeable {
    function __ERC1155URIStorage_init() internal onlyInitializing {
        __ERC1155URIStorage_init_unchained();
    }

    function __ERC1155URIStorage_init_unchained() internal onlyInitializing {
        _baseURI = "";
    }
    using StringsUpgradeable for uint256;

    // Optional base URI
    string private _baseURI;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the concatenation of the `_baseURI`
     * and the token-specific uri if the latter is set
     *
     * This enables the following behaviors:
     *
     * - if `_tokenURIs[tokenId]` is set, then the result is the concatenation
     *   of `_baseURI` and `_tokenURIs[tokenId]` (keep in mind that `_baseURI`
     *   is empty per default);
     *
     * - if `_tokenURIs[tokenId]` is NOT set then we fallback to `super.uri()`
     *   which in most cases will contain `ERC1155._uri`;
     *
     * - if `_tokenURIs[tokenId]` is NOT set, and if the parents do not have a
     *   uri value set, then the result is empty.
     */
    function uri(uint256 tokenId) public view virtual override returns (string memory) {
        string memory tokenURI = _tokenURIs[tokenId];

        // If token URI is set, concatenate base URI and tokenURI (via abi.encodePacked).
        return bytes(tokenURI).length > 0 ? string(abi.encodePacked(_baseURI, tokenURI)) : super.uri(tokenId);
    }

    /**
     * @dev Sets `tokenURI` as the tokenURI of `tokenId`.
     */
    function _setURI(uint256 tokenId, string memory tokenURI) internal virtual {
        _tokenURIs[tokenId] = tokenURI;
        emit URI(uri(tokenId), tokenId);
    }

    /**
     * @dev Sets `baseURI` as the `_baseURI` for all tokens
     */
    function _setBaseURI(string memory baseURI) internal virtual {
        _baseURI = baseURI;
    }

    /**
     * @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 26 : ECDSAUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../StringsUpgradeable.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 12 of 26 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../extensions/draft-IERC20PermitUpgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20Upgradeable {
    using AddressUpgradeable for address;

    function safeTransfer(
        IERC20Upgradeable token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20Upgradeable token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20PermitUpgradeable token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 13 of 26 : 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 14 of 26 : 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 15 of 26 : 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 16 of 26 : 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 17 of 26 : 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 18 of 26 : ERC1155Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

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

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

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try 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 19 of 26 : 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 20 of 26 : 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 21 of 26 : 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 22 of 26 : 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 23 of 26 : 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 24 of 26 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

File 25 of 26 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 26 of 26 : draft-IERC20PermitUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20PermitUpgradeable {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

Contract Security Audit

Contract ABI

[{"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":"bool","name":"cancel","type":"bool"}],"name":"Canceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enable","type":"bool"}],"name":"ClaimEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UnStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enable","type":"bool"}],"name":"WithdrawEnabled","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_pauseClaimMap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOfAll","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":"bonusContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"cancel","type":"bool"}],"name":"cancelEvent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"claimBatchBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claimBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimPauseTimeMap","outputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"winner","type":"uint256"},{"internalType":"uint256","name":"loser","type":"uint256"}],"name":"elimination","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBlockList","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"winners","type":"uint256[]"},{"internalType":"uint256[]","name":"losers","type":"uint256[]"}],"name":"groupStageEnds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakeContract","type":"address"},{"internalType":"address","name":"_bonusContract","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes32","name":"hash","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"mintForDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintPauseTimeMap","outputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"mintedAmountOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"pauseClaim","outputs":[],"stateMutability":"nonpayable","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":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"appSignerAccount","type":"address"}],"name":"setAppSignerAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_blockAddress","type":"address"},{"internalType":"uint256","name":"_withdrawRate","type":"uint256"}],"name":"setBlockList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"active","type":"bool"}],"name":"setClaimEnable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"bonus","type":"uint256[]"}],"name":"setGroupBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"bonus","type":"uint256"}],"name":"setMintBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintEndTime","type":"uint256"}],"name":"setMintEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintStartTime","type":"uint256"}],"name":"setMintStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct OKXFootballCup.PauseTimeStruct","name":"pauseTime","type":"tuple"}],"name":"setPauseClaimTimes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct OKXFootballCup.PauseTimeStruct[]","name":"pauseTimeArray","type":"tuple[]"}],"name":"setPauseMintTimes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"serverAccount","type":"address"}],"name":"setServerAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"tokenURI","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"webSignerAccount","type":"address"}],"name":"setWebSignerAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"active","type":"bool"}],"name":"setWithdrawEnable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"pageSize","type":"uint256"},{"internalType":"uint256","name":"pageIndex","type":"uint256"}],"name":"snapshot","outputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256","name":"snapshotSize","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakeAmountMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakeContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalHolder","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalHolder","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMintForDrop","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaking","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"unpauseClaim","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":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60a06040523060805234801561001457600080fd5b506080516159da6200004d60003960008181611166015281816111a6015281816116ab015281816116eb015261181f01526159da6000f3fe6080604052600436106103cd5760003560e01c80636a8e5bfc116101fd578063aaf10f4211610118578063dc5540c3116100ab578063f242432a1161007a578063f242432a14610c10578063f28f843214610c30578063f2fde38b14610c47578063fb77f28314610c67578063fe992c9814610c8757600080fd5b8063dc5540c314610b71578063e93c020014610b91578063e985e9c514610bb1578063f11745df14610bfa57600080fd5b8063c2ee0a57116100e7578063c2ee0a5714610aef578063c52bd7f514610b11578063d5b3621b14610b31578063d7c077ad14610b5157600080fd5b8063aaf10f4214610a6d578063bbcb2b8514610a82578063bd85b03914610aa2578063c213859214610acf57600080fd5b806392dcf7d311610190578063992455721161015f57806399245572146109e8578063a023cf6914610a16578063a22cb46514610a2d578063a733dbe714610a4d57600080fd5b806392dcf7d31461094b578063931e2e491461096b578063956fcbc11461098257806395d89b41146109b757600080fd5b80637dc7ec12116101cc5780637dc7ec12146108b8578063827a560b146108ed578063862440e21461090d5780638da5cb5b1461092d57600080fd5b80636a8e5bfc1461083d578063704b6c021461086c578063715018a61461088c578063717a002b146108a157600080fd5b8063319cf24e116102ed5780634f558e79116102805780635ef7a4001161024f5780635ef7a400146107bc57806360679d94146107dc5780636691070e146107fc5780636939850e1461081c57600080fd5b80634f558e791461073857806351c66dce1461076757806352d1902d146107875780635c3867e51461079c57600080fd5b8063485cc955116102bc578063485cc955146106b8578063486da2ca146106d85780634e1273f4146106f85780634f1ef2861461072557600080fd5b8063319cf24e1461064357806332ee4ee3146106635780633659cfe6146106835780633ccfd60b146106a357600080fd5b806318160ddd116103655780632287e96a116103345780632287e96a146105b75780632866ed21146105d7578063287f1c30146105f25780632eb2c2d61461062357600080fd5b806318160ddd146105235780631a186227146105385780631b2d188714610577578063222936751461059757600080fd5b80630e89341c116103a15780630e89341c1461049e578063165defa4146104be57806317c8ac6f146104d557806317f374951461050357600080fd5b8062fdd58e146103d257806301ffc9a714610405578063030104191461043557806306fdde0314610457575b600080fd5b3480156103de57600080fd5b506103f26103ed366004614783565b610cbe565b6040519081526020015b60405180910390f35b34801561041157600080fd5b506104256104203660046147c3565b610d59565b60405190151581526020016103fc565b34801561044157600080fd5b506104556104503660046147e0565b610da9565b005b34801561046357600080fd5b506104916040518060400160405280600e81526020016d04f4b58466f6f7462616c6c4375760941b81525081565b6040516103fc9190614849565b3480156104aa57600080fd5b506104916104b93660046147e0565b610e05565b3480156104ca57600080fd5b506103f26101965481565b3480156104e157600080fd5b506103f26104f036600461485c565b6101976020526000908152604090205481565b34801561050f57600080fd5b5061045561051e3660046147e0565b610e10565b34801561052f57600080fd5b506103f2610e1e565b34801561054457600080fd5b506101935461055f906201000090046001600160a01b031681565b6040516001600160a01b0390911681526020016103fc565b34801561058357600080fd5b50610455610592366004614877565b610e55565b3480156105a357600080fd5b506104556105b23660046148a9565b610f01565b3480156105c357600080fd5b506101935461042590610100900460ff1681565b3480156105e357600080fd5b50610193546104259060ff1681565b3480156105fe57600080fd5b5061042561060d3660046147e0565b61019b6020526000908152604090205460ff1681565b34801561062f57600080fd5b5061045561063e366004614a17565b610f52565b34801561064f57600080fd5b5061045561065e366004614ac0565b610f9e565b34801561066f57600080fd5b5061045561067e366004614b23565b611012565b34801561068f57600080fd5b5061045561069e36600461485c565b61115c565b3480156106af57600080fd5b50610455611224565b3480156106c457600080fd5b506104556106d3366004614b96565b611331565b3480156106e457600080fd5b506104556106f33660046147e0565b61151f565b34801561070457600080fd5b50610718610713366004614bc9565b611578565b6040516103fc9190614cb7565b610455610733366004614cca565b6116a1565b34801561074457600080fd5b506104256107533660046147e0565b600090815260c96020526040902054151590565b34801561077357600080fd5b50610455610782366004614877565b61175a565b34801561079357600080fd5b506103f2611812565b3480156107a857600080fd5b506104556107b7366004614bc9565b6118c6565b3480156107c857600080fd5b506104556107d736600461485c565b61193a565b3480156107e857600080fd5b506103f26107f736600461485c565b611965565b34801561080857600080fd5b50610455610817366004614ac0565b61198e565b34801561082857600080fd5b506101945461055f906001600160a01b031681565b34801561084957600080fd5b5061085d610858366004614d0d565b611b85565b6040516103fc93929190614d72565b34801561087857600080fd5b5061045561088736600461485c565b611e27565b34801561089857600080fd5b50610455611e52565b3480156108ad57600080fd5b506103f26101925481565b3480156108c457600080fd5b506108d86108d3366004614877565b611e64565b604080519283526020830191909152016103fc565b3480156108f957600080fd5b506104556109083660046148a9565b611ea1565b34801561091957600080fd5b50610455610928366004614da8565b611f2b565b34801561093957600080fd5b506033546001600160a01b031661055f565b34801561095757600080fd5b50610455610966366004614e46565b611f3d565b34801561097757600080fd5b506103f26101915481565b34801561098e57600080fd5b506108d861099d3660046147e0565b61019a602052600090815260409020805460019091015482565b3480156109c357600080fd5b50610491604051806040016040528060058152602001644f4b58464360d81b81525081565b3480156109f457600080fd5b506103f2610a033660046147e0565b600090815261019d602052604090205490565b348015610a2257600080fd5b506103f26101955481565b348015610a3957600080fd5b50610455610a48366004614ef6565b612095565b348015610a5957600080fd5b50610455610a68366004614f31565b6120a0565b348015610a7957600080fd5b5061055f612171565b348015610a8e57600080fd5b50610455610a9d3660046148a9565b612180565b348015610aae57600080fd5b506103f2610abd3660046147e0565b600090815260c9602052604090205490565b348015610adb57600080fd5b50610455610aea366004614f94565b612202565b348015610afb57600080fd5b50610b04612314565b6040516103fc9190615019565b348015610b1d57600080fd5b50610455610b2c366004614783565b612321565b348015610b3d57600080fd5b50610455610b4c3660046147e0565b6123c2565b348015610b5d57600080fd5b50610455610b6c36600461502c565b6123d0565b348015610b7d57600080fd5b50610455610b8c36600461485c565b61248a565b348015610b9d57600080fd5b50610455610bac36600461485c565b6124b5565b348015610bbd57600080fd5b50610425610bcc366004614b96565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205460ff1690565b348015610c0657600080fd5b506101a0546103f2565b348015610c1c57600080fd5b50610455610c2b366004615050565b6124e0565b348015610c3c57600080fd5b506103f26101985481565b348015610c5357600080fd5b50610455610c6236600461485c565b612525565b348015610c7357600080fd5b50610455610c82366004614877565b61259b565b348015610c9357600080fd5b506103f2610ca236600461485c565b6001600160a01b031660009081526101a1602052604090205490565b60006001600160a01b038316610d2e5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526097602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b1480610d8a57506001600160e01b031982166303a24d0760e21b145b80610d5357506301ffc9a760e01b6001600160e01b0319831614610d53565b6101a5546001600160a01b0316331480610dcd57506033546001600160a01b031633145b610de95760405162461bcd60e51b8152600401610d25906150b4565b600090815261019b60205260409020805460ff19166001179055565b6060610d5382612614565b610e186126f4565b61019255565b60008060015b60208111610e4f57600081815260c96020526040902054610e4590836150ff565b9150600101610e24565b50919050565b6101a5546001600160a01b0316331480610e7a57506101a4546001600160a01b031633145b610e965760405162461bcd60e51b8152600401610d2590615112565b61019454604051631b2d188760e01b815260048101849052602481018390526001600160a01b0390911690631b2d1887906044015b600060405180830381600087803b158015610ee557600080fd5b505af1158015610ef9573d6000803e3d6000fd5b505050505050565b610f096126f4565b6101a7805460ff19168215159081179091556040519081527f62966c6ab42ddb1bf366e57cca01b5c361a03ced13c736f055d388148d10273e906020015b60405180910390a150565b6001600160a01b038516331480610f6e5750610f6e8533610bcc565b610f8a5760405162461bcd60e51b8152600401610d2590615153565b610f97858585858561274e565b5050505050565b6101a5546001600160a01b0316331480610fc357506101a4546001600160a01b031633145b610fdf5760405162461bcd60e51b8152600401610d2590615112565b610194546040516318ce792760e11b81526001600160a01b039091169063319cf24e90610ecb90859085906004016151a2565b6101a5546001600160a01b031633148061103657506033546001600160a01b031633145b6110525760405162461bcd60e51b8152600401610d25906150b4565b60006101915411801561106757506101915442115b6110835760405162461bcd60e51b8152600401610d25906151c7565b6101925442106110a55760405162461bcd60e51b8152600401610d25906151fe565b8151829060005b818110156111055760008382815181106110c8576110c8615235565b6020026020010151905060208111806110df575080155b156110fc5760405162461bcd60e51b8152600401610d259061524b565b506001016110ac565b5061110f846128f3565b61113585858560405180604001604052806002815260200161060f60f31b81525061292a565b61113e83612a85565b610198600082825461115091906150ff565b90915550505050505050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036111a45760405162461bcd60e51b8152600401610d2590615292565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166111d6612aca565b6001600160a01b0316146111fc5760405162461bcd60e51b8152600401610d25906152de565b61120581612ae6565b6040805160008082526020820190925261122191839190612aee565b50565b61019354610100900460ff1661128b5760405162461bcd60e51b815260206004820152602660248201527f466f6f7462616c6c4375703a207769746864726177206973206e6f74206163746044820152651a5d985d195960d21b6064820152608401610d25565b3360009081526101976020526040902054156112a9576112a9612c59565b6101a75460ff16151560000361132f573360008181526101aa6020526040908190205461019454915163f3fef3a360e01b8152600481019390935260248301819052916001600160a01b039091169063f3fef3a390604401600060405180830381600087803b15801561131b57600080fd5b505af1158015610f97573d6000803e3d6000fd5b565b600054610100900460ff16158080156113515750600054600160ff909116105b8061136b5750303b15801561136b575060005460ff166001145b6113ce5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d25565b6000805460ff1916600117905580156113f1576000805461ff0019166101001790555b61140960405180602001604052806000815250612d3d565b611411612d6d565b611419612d9c565b611421612dc3565b611429612d9c565b610193805462010000600160b01b031916620100006001600160a01b038681168202929092179283905561019480546001600160a01b0319168684161790556040805163a023cf6960e01b81529051919093049091169163a023cf6991600480830192602092919082900301816000875af11580156114ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d0919061532a565b61019555801561151a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6101a5546001600160a01b031633148061154357506033546001600160a01b031633145b61155f5760405162461bcd60e51b8152600401610d25906150b4565b600090815261019b60205260409020805460ff19169055565b606081518351146115dd5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610d25565b600083516001600160401b038111156115f8576115f86148c4565b604051908082528060200260200182016040528015611621578160200160208202803683370190505b50905060005b84518110156116995761166c85828151811061164557611645615235565b602002602001015185838151811061165f5761165f615235565b6020026020010151610cbe565b82828151811061167e5761167e615235565b602090810291909101015261169281615343565b9050611627565b509392505050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036116e95760405162461bcd60e51b8152600401610d2590615292565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661171b612aca565b6001600160a01b0316146117415760405162461bcd60e51b8152600401610d25906152de565b61174a82612ae6565b61175682826001612aee565b5050565b6101935460ff1661177d5760405162461bcd60e51b8152600401610d259061535c565b60408051600180825281830190925260009160208083019080368337505060408051600180825281830190925292935060009291506020808301908036833701905050905083826000815181106117d6576117d6615235565b60200260200101818152505082816000815181106117f6576117f6615235565b60200260200101818152505061180c828261198e565b50505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146118b25760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610d25565b5060008051602061595e8339815191525b90565b6101a5546001600160a01b03163314806118eb57506101a4546001600160a01b031633145b6119075760405162461bcd60e51b8152600401610d2590615112565b61019454604051635c3867e560e01b81526001600160a01b0390911690635c3867e590610ecb908590859060040161539f565b6119426126f4565b6101a480546001600160a01b0319166001600160a01b0392909216919091179055565b610195546001600160a01b038216600090815261019760205260408120549091610d53916153b2565b6101935460ff166119b15760405162461bcd60e51b8152600401610d259061535c565b8151829060005b81811015611a115760008382815181106119d4576119d4615235565b6020026020010151905060208111806119eb575080155b15611a085760405162461bcd60e51b8152600401610d259061524b565b506001016119b8565b508251845114611a755760405162461bcd60e51b815260206004820152602960248201527f466f6f7462616c6c4375703a20636c61696d20706172616d206c656e677468206044820152680dcdee840dac2e8c6d60bb1b6064820152608401610d25565b835160005b81811015611b12576000868281518110611a9657611a96615235565b60200260200101519050611aa981612df2565b600081815261019b602052604090205460ff1615611b095760405162461bcd60e51b815260206004820152601f60248201527f466f6f7462616c6c4375703a20636c61696d207374696c6c20706175736564006044820152606401610d25565b50600101611a7a565b50610194546040516331e82a2160e11b81526001600160a01b03909116906363d0544290611b48903390899089906004016153d4565b600060405180830381600087803b158015611b6257600080fd5b505af1158015611b76573d6000803e3d6000fd5b50505050610f97338686612e78565b6060806000611b9c6033546001600160a01b031690565b6001600160a01b0316336001600160a01b03161480611bc657506101a4546001600160a01b031633145b611c1c5760405162461bcd60e51b815260206004820152602160248201527f466f6f7462616c6c4375703a206f6e6c7920736572766572206f72206f776e656044820152603960f91b6064820152608401610d25565b600086815261019f6020526040812090611c358261308f565b90506000611c438789615414565b9050818110611ca45760405162461bcd60e51b815260206004820152602760248201527f466f6f7462616c6c4375703a20736e617073686f742073697a65206f7574206f6044820152661988189bdd5b9960ca1b6064820152608401610d25565b6000611cb08284615433565b905088811115611cbd5750875b806001600160401b03811115611cd557611cd56148c4565b604051908082528060200260200182016040528015611cfe578160200160208202803683370190505b509650806001600160401b03811115611d1957611d196148c4565b604051908082528060200260200182016040528015611d42578160200160208202803683370190505b50955060005b81811015611dff57611d64611d5d84836150ff565b8690613099565b888281518110611d7657611d76615235565b6001600160a01b0390921660209283029190910182015260008c815261019e9091526040812090611db1611daa86856150ff565b8890613099565b6001600160a01b03166001600160a01b0316815260200190815260200160002054878281518110611de457611de4615235565b6020908102919091010152611df881615343565b9050611d48565b5060008a815261019f60205260409020611e189061308f565b94505050505093509350939050565b611e2f6126f4565b6101a580546001600160a01b0319166001600160a01b0392909216919091179055565b611e5a6126f4565b61132f60006130a5565b6101996020528160005260406000208181548110611e8157600080fd5b600091825260209091206002909102018054600190910154909250905082565b6101a5546001600160a01b0316331480611ec557506033546001600160a01b031633145b611ee15760405162461bcd60e51b8152600401610d25906150b4565b61019380548215156101000261ff00199091161790556040517fec1b77658f85d79ea7a466c2a357dabff976fe264665c7ae9dd3095c268eaa3c90610f4790831515815260200190565b611f336126f4565b61175682826130f7565b6101a5546001600160a01b0316331480611f6157506033546001600160a01b031633145b611f7d5760405162461bcd60e51b8152600401610d25906150b4565b8051600083815261019960205260408120611f979161472c565b60005b8181101561180c576000838281518110611fb657611fb6615235565b60200260200101516000015190506000848381518110611fd857611fd8615235565b60200260200101516020015190508082106120355760405162461bcd60e51b815260206004820181905260248201527f466f6f7462616c6c4375703a20737461727454696d65203e20656e6454696d656044820152606401610d25565b600086815261019960205260409020855186908590811061205857612058615235565b602090810291909101810151825460018181018555600094855293839020825160029092020190815591015190820155929092019150611f9a9050565b611756338383613148565b6000610191541180156120b557506101915442115b6120d15760405162461bcd60e51b8152600401610d25906151c7565b6101925442106120f35760405162461bcd60e51b8152600401610d25906151fe565b8560018110158015612106575060208111155b6121225760405162461bcd60e51b8152600401610d259061524b565b61212f8686868686613228565b6121388761345a565b61214186613589565b61216788888860405180604001604052806002815260200161060f60f31b815250613659565b5050505050505050565b600061217b612aca565b905090565b6101a5546001600160a01b03163314806121a457506033546001600160a01b031633145b6121c05760405162461bcd60e51b8152600401610d25906150b4565b610193805460ff19168215159081179091556040519081527f1edd4dc7f91a5992aba0f39c0428bcf4df13d001eebc26eb188307d057f14a0790602001610f47565b60006101915411801561221757506101915442115b6122335760405162461bcd60e51b8152600401610d25906151c7565b6101925442106122555760405162461bcd60e51b8152600401610d25906151fe565b8551869060005b818110156122b557600083828151811061227857612278615235565b60200260200101519050602081118061228f575080155b156122ac5760405162461bcd60e51b8152600401610d259061524b565b5060010161225c565b5060006122c188612a85565b90506122d08188888888613228565b6122d9896128f3565b6122e281613589565b6123088a8a8a60405180604001604052806002815260200161060f60f31b81525061292a565b50505050505050505050565b606061217b6101a861373b565b6123296126f4565b61271081106123985760405162461bcd60e51b815260206004820152603560248201527f466f6f7462616c6c4375703a207769746864726177526174652063616e206e6f6044820152740742067726561746572207468616e2031305f30303605c1b6064820152608401610d25565b6123a46101a883613748565b506001600160a01b0390911660009081526101aa6020526040902055565b6123ca6126f4565b61019155565b6101a5546001600160a01b03163314806123f457506033546001600160a01b031633145b6124105760405162461bcd60e51b8152600401610d25906150b4565b805160208201518082106124665760405162461bcd60e51b815260206004820181905260248201527f466f6f7462616c6c4375703a20737461727454696d65203e20656e6454696d656044820152606401610d25565b50508051600092835261019a60209081526040909320908155910151600190910155565b6124926126f4565b6101a280546001600160a01b0319166001600160a01b0392909216919091179055565b6124bd6126f4565b6101a380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0385163314806124fc57506124fc8533610bcc565b6125185760405162461bcd60e51b8152600401610d2590615153565b610f97858585858561375d565b61252d6126f4565b6001600160a01b0381166125925760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d25565b611221816130a5565b6101a5546001600160a01b03163314806125bf57506033546001600160a01b031633145b6125db5760405162461bcd60e51b8152600401610d25906150b4565b6101945460405163fb77f28360e01b815260048101849052602481018390526001600160a01b039091169063fb77f28390604401610ecb565b600081815260fc602052604081208054606092919061263290615446565b80601f016020809104026020016040519081016040528092919081815260200182805461265e90615446565b80156126ab5780601f10612680576101008083540402835291602001916126ab565b820191906000526020600020905b81548152906001019060200180831161268e57829003601f168201915b5050505050905060008151116126c9576126c483613899565b6126ed565b60fb816040516020016126dd92919061547a565b6040516020818303038152906040525b9392505050565b6033546001600160a01b0316331461132f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d25565b815183511461276f5760405162461bcd60e51b8152600401610d2590615501565b6001600160a01b0384166127955760405162461bcd60e51b8152600401610d2590615549565b336127a481878787878761392d565b60005b845181101561288d5760008582815181106127c4576127c4615235565b6020026020010151905060008583815181106127e2576127e2615235565b60209081029190910181015160008481526097835260408082206001600160a01b038e1683529093529190912054909150818110156128335760405162461bcd60e51b8152600401610d259061558e565b60008381526097602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906128729084906150ff565b925050819055505050508061288690615343565b90506127a7565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516128dd9291906151a2565b60405180910390a4610ef9818787878787613bce565b805160005b8181101561151a5761292283828151811061291557612915615235565b602002602001015161345a565b6001016128f8565b6001600160a01b0384166129505760405162461bcd60e51b8152600401610d25906155d8565b81518351146129715760405162461bcd60e51b8152600401610d2590615501565b336129818160008787878761392d565b60005b8451811015612a1d5783818151811061299f5761299f615235565b6020026020010151609760008784815181106129bd576129bd615235565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254612a0591906150ff565b90915550819050612a1581615343565b915050612984565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612a6e9291906151a2565b60405180910390a4610f9781600087878787613bce565b8051600090815b81811015612ac357838181518110612aa657612aa6615235565b602002602001015183612ab991906150ff565b9250600101612a8c565b5050919050565b60008051602061595e833981519152546001600160a01b031690565b6112216126f4565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612b215761151a83613d29565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612b7b575060408051601f3d908101601f19168201909252612b789181019061532a565b60015b612bde5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610d25565b60008051602061595e8339815191528114612c4d5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610d25565b5061151a838383613dc5565b33600081815261019760205260408120805490829055610196805491928392612c83908490615433565b90915550506101935460405163f3fef3a360e01b81526001600160a01b03848116600483015260248201849052620100009092049091169063f3fef3a390604401600060405180830381600087803b158015612cde57600080fd5b505af1158015612cf2573d6000803e3d6000fd5b50505050816001600160a01b03167f79d3df6837cc49ff0e09fd3258e6e45594e0703445bb06825e9d75156eaee8f082604051612d3191815260200190565b60405180910390a25050565b600054610100900460ff16612d645760405162461bcd60e51b8152600401610d2590615619565b61122181613dea565b600054610100900460ff16612d945760405162461bcd60e51b8152600401610d2590615619565b61132f613e1a565b600054610100900460ff1661132f5760405162461bcd60e51b8152600401610d2590615619565b600054610100900460ff16612dea5760405162461bcd60e51b8152600401610d2590615619565b61132f613e4a565b600081815261019a6020526040902054421080612e205750600081815261019a602052604090206001015442115b6112215760405162461bcd60e51b8152602060048201526024808201527f466f6f7462616c6c4375703a20636f6d7065746574696f6e206973206f6e20676044820152636f696e6760e01b6064820152608401610d25565b6001600160a01b038316612eda5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610d25565b8051825114612efb5760405162461bcd60e51b8152600401610d2590615501565b6000339050612f1e8185600086866040518060200160405280600081525061392d565b60005b8351811015613022576000848281518110612f3e57612f3e615235565b602002602001015190506000848381518110612f5c57612f5c615235565b60209081029190910181015160008481526097835260408082206001600160a01b038c168352909352919091205490915081811015612fe95760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610d25565b60009283526097602090815260408085206001600160a01b038b168652909152909220910390558061301a81615343565b915050612f21565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516130739291906151a2565b60405180910390a460408051602081019091526000905261180c565b6000610d53825490565b60006126ed8383613e8d565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082815260fc6020526040902061310f82826156aa565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b61313b84610e05565b604051612d319190614849565b816001600160a01b0316836001600160a01b0316036131bb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610d25565b6001600160a01b03838116600081815260986020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008481526101a6602052604090205460ff16156132965760405162461bcd60e51b815260206004820152602560248201527f466f6f7462616c6c4375703a206861736820636f64652068617665206265656e604482015264081d5cd95960da1b6064820152608401610d25565b60008481526101a660205260408120805460ff191660011790556132bc85858585613eb7565b610195543360009081526101976020526040812054929350916132df91906153b2565b6101a2549091506001600160a01b038381169116148061330d57506101a3546001600160a01b038381169116145b6133655760405162461bcd60e51b815260206004820152602360248201527f466f6f7462616c6c4375703a20696e76616c69642063616c6c207369676e617460448201526275726560e81b6064820152608401610d25565b600361337188836150ff565b11156133ce5760405162461bcd60e51b815260206004820152602660248201527f466f6f7462616c6c4375703a2066726565206d696e742072656163682074686560448201526520636170203360d01b6064820152608401610d25565b6101a3546001600160a01b0390811690831603613451576133ef87826150ff565b6001146134515760405162461bcd60e51b815260206004820152602a60248201527f466f6f7462616c6c4375703a2066726565206d696e74207265616368207468656044820152692077656220636170203160b01b6064820152608401610d25565b50505050505050565b60008181526101996020908152604080832080548251818502810185019093528083529192909190849084015b828210156134cd57838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190613487565b5050825192935060009150505b8181101561180c578281815181106134f4576134f4615235565b602002602001015160000151421080613529575082818151811061351a5761351a615235565b60200260200101516020015142115b6135815760405162461bcd60e51b8152602060048201526024808201527f466f6f7462616c6c4375703a20636f6d7065746974696f6e206973206f6e20676044820152636f696e6760e01b6064820152608401610d25565b6001016134da565b6000610195548261359a9190615414565b6135a490826150ff565b610193546040516311f9fbc960e21b8152336004820152602481018390529192506201000090046001600160a01b0316906347e7ef2490604401600060405180830381600087803b1580156135f857600080fd5b505af115801561360c573d6000803e3d6000fd5b5050505080610196600082825461362391906150ff565b909155505033600090815261019760205260409020546136449082906150ff565b33600090815261019760205260409020555050565b6001600160a01b03841661367f5760405162461bcd60e51b8152600401610d25906155d8565b33600061368b85613edf565b9050600061369885613edf565b90506136a98360008985858961392d565b60008681526097602090815260408083206001600160a01b038b168452909152812080548792906136db9084906150ff565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461345183600089898989613f2a565b606060006126ed83613fe5565b60006126ed836001600160a01b038416614040565b6001600160a01b0384166137835760405162461bcd60e51b8152600401610d2590615549565b33600061378f85613edf565b9050600061379c85613edf565b90506137ac83898985858961392d565b60008681526097602090815260408083206001600160a01b038c168452909152902054858110156137ef5760405162461bcd60e51b8152600401610d259061558e565b60008781526097602090815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061382e9084906150ff565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461388e848a8a8a8a8a613f2a565b505050505050505050565b6060609980546138a890615446565b80601f01602080910402602001604051908101604052809291908181526020018280546138d490615446565b80156139215780601f106138f657610100808354040283529160200191613921565b820191906000526020600020905b81548152906001019060200180831161390457829003601f168201915b50505050509050919050565b61393b86868686868661408f565b825160005b8181101561216757600085828151811061395c5761395c615235565b60200260200101519050600085838151811061397a5761397a615235565b6020026020010151905060006001600160a01b0316896001600160a01b0316141580156139a75750600081115b15613ab6576001600160a01b03891660009081526101a16020526040812080548392906139d5908490615433565b9091555050600082815261019e602090815260408083206001600160a01b038d16845290915281208054839290613a0d908490615433565b90915550506001600160a01b03891660009081526101a160205260408120549003613a4c5760016101a06000828254613a469190615433565b90915550505b600082815261019e602090815260408083206001600160a01b038d1684529091528120549003613ab657600082815261019d60205260408120805460019290613a96908490615433565b9091555050600082815261019f60205260409020613ab4908a614208565b505b6001600160a01b03881615801590613ace5750600081115b15613bc4576001600160a01b03881660008181526101a160208181526040808420805488865261019e845282862096865295835290842054929091529091849190613b1983866150ff565b9091555050600084815261019e602090815260408083206001600160a01b038e16845290915281208054859290613b519084906150ff565b90915550506000829003613b795760016101a06000828254613b7391906150ff565b90915550505b80600003613bc157600084815261019d60205260408120805460019290613ba19084906150ff565b9091555050600084815261019f60205260409020613bbf908b613748565b505b50505b5050600101613940565b6001600160a01b0384163b15610ef95760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613c129089908990889088908890600401615769565b6020604051808303816000875af1925050508015613c4d575060408051601f3d908101601f19168201909252613c4a918101906157c7565b60015b613cf957613c596157e4565b806308c379a003613c925750613c6d6157ff565b80613c785750613c94565b8060405162461bcd60e51b8152600401610d259190614849565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610d25565b6001600160e01b0319811663bc197c8160e01b146134515760405162461bcd60e51b8152600401610d2590615888565b6001600160a01b0381163b613d965760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610d25565b60008051602061595e83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b613dce8361421d565b600082511180613ddb5750805b1561151a5761180c838361425d565b600054610100900460ff16613e115760405162461bcd60e51b8152600401610d2590615619565b61122181614351565b600054610100900460ff16613e415760405162461bcd60e51b8152600401610d2590615619565b61132f336130a5565b600054610100900460ff16613e715760405162461bcd60e51b8152600401610d2590615619565b60408051602081019091526000815260fb9061122190826156aa565b6000826000018281548110613ea457613ea4615235565b9060005260206000200154905092915050565b6000806000613ec88787878761435d565b91509150613ed58161444a565b5095945050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613f1957613f19615235565b602090810291909101015292915050565b6001600160a01b0384163b15610ef95760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190613f6e90899089908890889088906004016158d0565b6020604051808303816000875af1925050508015613fa9575060408051601f3d908101601f19168201909252613fa6918101906157c7565b60015b613fb557613c596157e4565b6001600160e01b0319811663f23a6e6160e01b146134515760405162461bcd60e51b8152600401610d2590615888565b60608160000180548060200260200160405190810160405280929190818152602001828054801561392157602002820191906000526020600020905b8154815260200190600101908083116140215750505050509050919050565b600081815260018301602052604081205461408757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610d53565b506000610d53565b6001600160a01b0385166141165760005b8351811015614114578281815181106140bb576140bb615235565b602002602001015160c960008684815181106140d9576140d9615235565b6020026020010151815260200190815260200160002060008282546140fe91906150ff565b9091555061410d905081615343565b90506140a0565b505b6001600160a01b038416610ef95760005b835181101561345157600084828151811061414457614144615235565b60200260200101519050600084838151811061416257614162615235565b60200260200101519050600060c96000848152602001908152602001600020549050818110156141e55760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610d25565b600092835260c960205260409092209103905561420181615343565b9050614127565b60006126ed836001600160a01b038416614600565b61422681613d29565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6142c55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610d25565b600080846001600160a01b0316846040516142e09190615915565b600060405180830381855af49150503d806000811461431b576040519150601f19603f3d011682016040523d82523d6000602084013e614320565b606091505b5091509150614348828260405180606001604052806027815260200161597e602791396146f3565b95945050505050565b609961175682826156aa565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156143945750600090506003614441565b8460ff16601b141580156143ac57508460ff16601c14155b156143bd5750600090506004614441565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614411573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661443a57600060019250925050614441565b9150600090505b94509492505050565b600081600481111561445e5761445e615931565b036144665750565b600181600481111561447a5761447a615931565b036144c75760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610d25565b60028160048111156144db576144db615931565b036145285760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610d25565b600381600481111561453c5761453c615931565b036145945760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610d25565b60048160048111156145a8576145a8615931565b036112215760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610d25565b600081815260018301602052604081205480156146e9576000614624600183615433565b855490915060009061463890600190615433565b905081811461469d57600086600001828154811061465857614658615235565b906000526020600020015490508087600001848154811061467b5761467b615235565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806146ae576146ae615947565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610d53565b6000915050610d53565b606083156147025750816126ed565b8251156147125782518084602001fd5b8160405162461bcd60e51b8152600401610d259190614849565b508054600082556002029060005260206000209081019061122191905b808211156147635760008082556001820155600201614749565b5090565b80356001600160a01b038116811461477e57600080fd5b919050565b6000806040838503121561479657600080fd5b61479f83614767565b946020939093013593505050565b6001600160e01b03198116811461122157600080fd5b6000602082840312156147d557600080fd5b81356126ed816147ad565b6000602082840312156147f257600080fd5b5035919050565b60005b838110156148145781810151838201526020016147fc565b50506000910152565b600081518084526148358160208601602086016147f9565b601f01601f19169290920160200192915050565b6020815260006126ed602083018461481d565b60006020828403121561486e57600080fd5b6126ed82614767565b6000806040838503121561488a57600080fd5b50508035926020909101359150565b8035801515811461477e57600080fd5b6000602082840312156148bb57600080fd5b6126ed82614899565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156148ff576148ff6148c4565b6040525050565b60006001600160401b0382111561491f5761491f6148c4565b5060051b60200190565b600082601f83011261493a57600080fd5b8135602061494782614906565b60405161495482826148da565b83815260059390931b850182019282810191508684111561497457600080fd5b8286015b8481101561498f5780358352918301918301614978565b509695505050505050565b60006001600160401b038311156149b3576149b36148c4565b6040516149ca601f8501601f1916602001826148da565b8091508381528484840111156149df57600080fd5b83836020830137600060208583010152509392505050565b600082601f830112614a0857600080fd5b6126ed8383356020850161499a565b600080600080600060a08688031215614a2f57600080fd5b614a3886614767565b9450614a4660208701614767565b935060408601356001600160401b0380821115614a6257600080fd5b614a6e89838a01614929565b94506060880135915080821115614a8457600080fd5b614a9089838a01614929565b93506080880135915080821115614aa657600080fd5b50614ab3888289016149f7565b9150509295509295909350565b60008060408385031215614ad357600080fd5b82356001600160401b0380821115614aea57600080fd5b614af686838701614929565b93506020850135915080821115614b0c57600080fd5b50614b1985828601614929565b9150509250929050565b600080600060608486031215614b3857600080fd5b614b4184614767565b925060208401356001600160401b0380821115614b5d57600080fd5b614b6987838801614929565b93506040860135915080821115614b7f57600080fd5b50614b8c86828701614929565b9150509250925092565b60008060408385031215614ba957600080fd5b614bb283614767565b9150614bc060208401614767565b90509250929050565b60008060408385031215614bdc57600080fd5b82356001600160401b0380821115614bf357600080fd5b818501915085601f830112614c0757600080fd5b81356020614c1482614906565b604051614c2182826148da565b83815260059390931b8501820192828101915089841115614c4157600080fd5b948201945b83861015614c6657614c5786614767565b82529482019490820190614c46565b96505086013592505080821115614b0c57600080fd5b600081518084526020808501945080840160005b83811015614cac57815187529582019590820190600101614c90565b509495945050505050565b6020815260006126ed6020830184614c7c565b60008060408385031215614cdd57600080fd5b614ce683614767565b915060208301356001600160401b03811115614d0157600080fd5b614b19858286016149f7565b600080600060608486031215614d2257600080fd5b505081359360208301359350604090920135919050565b600081518084526020808501945080840160005b83811015614cac5781516001600160a01b031687529582019590820190600101614d4d565b606081526000614d856060830186614d39565b8281036020840152614d978186614c7c565b915050826040830152949350505050565b60008060408385031215614dbb57600080fd5b8235915060208301356001600160401b03811115614dd857600080fd5b8301601f81018513614de957600080fd5b614b198582356020840161499a565b600060408284031215614e0a57600080fd5b604051604081018181106001600160401b0382111715614e2c57614e2c6148c4565b604052823581526020928301359281019290925250919050565b6000806040808486031215614e5a57600080fd5b833592506020808501356001600160401b03811115614e7857600080fd5b8501601f81018713614e8957600080fd5b8035614e9481614906565b8451614ea082826148da565b82815260069290921b8301840191848101915089831115614ec057600080fd5b928401925b82841015614ee657614ed78a85614df8565b82529285019290840190614ec5565b8096505050505050509250929050565b60008060408385031215614f0957600080fd5b614f1283614767565b9150614bc060208401614899565b803560ff8116811461477e57600080fd5b600080600080600080600060e0888a031215614f4c57600080fd5b614f5588614767565b9650602088013595506040880135945060608801359350614f7860808901614f20565b925060a0880135915060c0880135905092959891949750929550565b600080600080600080600060e0888a031215614faf57600080fd5b614fb888614767565b965060208801356001600160401b0380821115614fd457600080fd5b614fe08b838c01614929565b975060408a0135915080821115614ff657600080fd5b506150038a828b01614929565b95505060608801359350614f7860808901614f20565b6020815260006126ed6020830184614d39565b6000806060838503121561503f57600080fd5b82359150614bc08460208501614df8565b600080600080600060a0868803121561506857600080fd5b61507186614767565b945061507f60208701614767565b9350604086013592506060860135915060808601356001600160401b038111156150a857600080fd5b614ab3888289016149f7565b6020808252818101527f466f6f7462616c6c4375703a206f6e6c792061646d696e206f72206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610d5357610d536150e9565b60208082526021908201527f466f6f7462616c6c4375703a206f6e6c792061646d696e206f722073657276656040820152603960f91b606082015260800190565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b6040815260006151b56040830185614c7c565b82810360208401526143488185614c7c565b6020808252601b908201527f466f6f7462616c6c4375703a206d696e74206e6f742073746172740000000000604082015260600190565b6020808252601d908201527f466f6f7462616c6c4375703a206d696e7420737461676520656e646564000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60208082526027908201527f466f6f7462616c6c4375703a20746f6b656e206964206f7574206f662072616e60408201526633b2901896999960c91b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60006020828403121561533c57600080fd5b5051919050565b600060018201615355576153556150e9565b5060010190565b60208082526023908201527f466f6f7462616c6c4375703a20636c61696d206973206e6f74206163746976616040820152621d195960ea1b606082015260800190565b6040815260006151b56040830185614d39565b6000826153cf57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b03841681526060602082018190526000906153f890830185614c7c565b828103604084015261540a8185614c7c565b9695505050505050565b600081600019048311821515161561542e5761542e6150e9565b500290565b81810381811115610d5357610d536150e9565b600181811c9082168061545a57607f821691505b602082108103610e4f57634e487b7160e01b600052602260045260246000fd5b600080845461548881615446565b600182811680156154a057600181146154b5576154e4565b60ff19841687528215158302870194506154e4565b8860005260208060002060005b858110156154db5781548a8201529084019082016154c2565b50505082870194505b5050505083516154f88183602088016147f9565b01949350505050565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b601f82111561151a57600081815260208120601f850160051c8101602086101561568b5750805b601f850160051c820191505b81811015610ef957828155600101615697565b81516001600160401b038111156156c3576156c36148c4565b6156d7816156d18454615446565b84615664565b602080601f83116001811461570c57600084156156f45750858301515b600019600386901b1c1916600185901b178555610ef9565b600085815260208120601f198616915b8281101561573b5788860151825594840194600190910190840161571c565b50858210156157595787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0386811682528516602082015260a06040820181905260009061579590830186614c7c565b82810360608401526157a78186614c7c565b905082810360808401526157bb818561481d565b98975050505050505050565b6000602082840312156157d957600080fd5b81516126ed816147ad565b600060033d11156118c35760046000803e5060005160e01c90565b600060443d101561580d5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561583c57505050505090565b82850191508151818111156158545750505050505090565b843d870101602082850101111561586e5750505050505090565b61587d602082860101876148da565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061590a9083018461481d565b979650505050505050565b600082516159278184602087016147f9565b9190910192915050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220661bcbf3d4f2b18dd3ef2f5b1ae7b478e860c4c4fbf8ab9f0bf44cdd1835e82e64736f6c63430008100033

Deployed Bytecode

0x6080604052600436106103cd5760003560e01c80636a8e5bfc116101fd578063aaf10f4211610118578063dc5540c3116100ab578063f242432a1161007a578063f242432a14610c10578063f28f843214610c30578063f2fde38b14610c47578063fb77f28314610c67578063fe992c9814610c8757600080fd5b8063dc5540c314610b71578063e93c020014610b91578063e985e9c514610bb1578063f11745df14610bfa57600080fd5b8063c2ee0a57116100e7578063c2ee0a5714610aef578063c52bd7f514610b11578063d5b3621b14610b31578063d7c077ad14610b5157600080fd5b8063aaf10f4214610a6d578063bbcb2b8514610a82578063bd85b03914610aa2578063c213859214610acf57600080fd5b806392dcf7d311610190578063992455721161015f57806399245572146109e8578063a023cf6914610a16578063a22cb46514610a2d578063a733dbe714610a4d57600080fd5b806392dcf7d31461094b578063931e2e491461096b578063956fcbc11461098257806395d89b41146109b757600080fd5b80637dc7ec12116101cc5780637dc7ec12146108b8578063827a560b146108ed578063862440e21461090d5780638da5cb5b1461092d57600080fd5b80636a8e5bfc1461083d578063704b6c021461086c578063715018a61461088c578063717a002b146108a157600080fd5b8063319cf24e116102ed5780634f558e79116102805780635ef7a4001161024f5780635ef7a400146107bc57806360679d94146107dc5780636691070e146107fc5780636939850e1461081c57600080fd5b80634f558e791461073857806351c66dce1461076757806352d1902d146107875780635c3867e51461079c57600080fd5b8063485cc955116102bc578063485cc955146106b8578063486da2ca146106d85780634e1273f4146106f85780634f1ef2861461072557600080fd5b8063319cf24e1461064357806332ee4ee3146106635780633659cfe6146106835780633ccfd60b146106a357600080fd5b806318160ddd116103655780632287e96a116103345780632287e96a146105b75780632866ed21146105d7578063287f1c30146105f25780632eb2c2d61461062357600080fd5b806318160ddd146105235780631a186227146105385780631b2d188714610577578063222936751461059757600080fd5b80630e89341c116103a15780630e89341c1461049e578063165defa4146104be57806317c8ac6f146104d557806317f374951461050357600080fd5b8062fdd58e146103d257806301ffc9a714610405578063030104191461043557806306fdde0314610457575b600080fd5b3480156103de57600080fd5b506103f26103ed366004614783565b610cbe565b6040519081526020015b60405180910390f35b34801561041157600080fd5b506104256104203660046147c3565b610d59565b60405190151581526020016103fc565b34801561044157600080fd5b506104556104503660046147e0565b610da9565b005b34801561046357600080fd5b506104916040518060400160405280600e81526020016d04f4b58466f6f7462616c6c4375760941b81525081565b6040516103fc9190614849565b3480156104aa57600080fd5b506104916104b93660046147e0565b610e05565b3480156104ca57600080fd5b506103f26101965481565b3480156104e157600080fd5b506103f26104f036600461485c565b6101976020526000908152604090205481565b34801561050f57600080fd5b5061045561051e3660046147e0565b610e10565b34801561052f57600080fd5b506103f2610e1e565b34801561054457600080fd5b506101935461055f906201000090046001600160a01b031681565b6040516001600160a01b0390911681526020016103fc565b34801561058357600080fd5b50610455610592366004614877565b610e55565b3480156105a357600080fd5b506104556105b23660046148a9565b610f01565b3480156105c357600080fd5b506101935461042590610100900460ff1681565b3480156105e357600080fd5b50610193546104259060ff1681565b3480156105fe57600080fd5b5061042561060d3660046147e0565b61019b6020526000908152604090205460ff1681565b34801561062f57600080fd5b5061045561063e366004614a17565b610f52565b34801561064f57600080fd5b5061045561065e366004614ac0565b610f9e565b34801561066f57600080fd5b5061045561067e366004614b23565b611012565b34801561068f57600080fd5b5061045561069e36600461485c565b61115c565b3480156106af57600080fd5b50610455611224565b3480156106c457600080fd5b506104556106d3366004614b96565b611331565b3480156106e457600080fd5b506104556106f33660046147e0565b61151f565b34801561070457600080fd5b50610718610713366004614bc9565b611578565b6040516103fc9190614cb7565b610455610733366004614cca565b6116a1565b34801561074457600080fd5b506104256107533660046147e0565b600090815260c96020526040902054151590565b34801561077357600080fd5b50610455610782366004614877565b61175a565b34801561079357600080fd5b506103f2611812565b3480156107a857600080fd5b506104556107b7366004614bc9565b6118c6565b3480156107c857600080fd5b506104556107d736600461485c565b61193a565b3480156107e857600080fd5b506103f26107f736600461485c565b611965565b34801561080857600080fd5b50610455610817366004614ac0565b61198e565b34801561082857600080fd5b506101945461055f906001600160a01b031681565b34801561084957600080fd5b5061085d610858366004614d0d565b611b85565b6040516103fc93929190614d72565b34801561087857600080fd5b5061045561088736600461485c565b611e27565b34801561089857600080fd5b50610455611e52565b3480156108ad57600080fd5b506103f26101925481565b3480156108c457600080fd5b506108d86108d3366004614877565b611e64565b604080519283526020830191909152016103fc565b3480156108f957600080fd5b506104556109083660046148a9565b611ea1565b34801561091957600080fd5b50610455610928366004614da8565b611f2b565b34801561093957600080fd5b506033546001600160a01b031661055f565b34801561095757600080fd5b50610455610966366004614e46565b611f3d565b34801561097757600080fd5b506103f26101915481565b34801561098e57600080fd5b506108d861099d3660046147e0565b61019a602052600090815260409020805460019091015482565b3480156109c357600080fd5b50610491604051806040016040528060058152602001644f4b58464360d81b81525081565b3480156109f457600080fd5b506103f2610a033660046147e0565b600090815261019d602052604090205490565b348015610a2257600080fd5b506103f26101955481565b348015610a3957600080fd5b50610455610a48366004614ef6565b612095565b348015610a5957600080fd5b50610455610a68366004614f31565b6120a0565b348015610a7957600080fd5b5061055f612171565b348015610a8e57600080fd5b50610455610a9d3660046148a9565b612180565b348015610aae57600080fd5b506103f2610abd3660046147e0565b600090815260c9602052604090205490565b348015610adb57600080fd5b50610455610aea366004614f94565b612202565b348015610afb57600080fd5b50610b04612314565b6040516103fc9190615019565b348015610b1d57600080fd5b50610455610b2c366004614783565b612321565b348015610b3d57600080fd5b50610455610b4c3660046147e0565b6123c2565b348015610b5d57600080fd5b50610455610b6c36600461502c565b6123d0565b348015610b7d57600080fd5b50610455610b8c36600461485c565b61248a565b348015610b9d57600080fd5b50610455610bac36600461485c565b6124b5565b348015610bbd57600080fd5b50610425610bcc366004614b96565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205460ff1690565b348015610c0657600080fd5b506101a0546103f2565b348015610c1c57600080fd5b50610455610c2b366004615050565b6124e0565b348015610c3c57600080fd5b506103f26101985481565b348015610c5357600080fd5b50610455610c6236600461485c565b612525565b348015610c7357600080fd5b50610455610c82366004614877565b61259b565b348015610c9357600080fd5b506103f2610ca236600461485c565b6001600160a01b031660009081526101a1602052604090205490565b60006001600160a01b038316610d2e5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526097602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b1480610d8a57506001600160e01b031982166303a24d0760e21b145b80610d5357506301ffc9a760e01b6001600160e01b0319831614610d53565b6101a5546001600160a01b0316331480610dcd57506033546001600160a01b031633145b610de95760405162461bcd60e51b8152600401610d25906150b4565b600090815261019b60205260409020805460ff19166001179055565b6060610d5382612614565b610e186126f4565b61019255565b60008060015b60208111610e4f57600081815260c96020526040902054610e4590836150ff565b9150600101610e24565b50919050565b6101a5546001600160a01b0316331480610e7a57506101a4546001600160a01b031633145b610e965760405162461bcd60e51b8152600401610d2590615112565b61019454604051631b2d188760e01b815260048101849052602481018390526001600160a01b0390911690631b2d1887906044015b600060405180830381600087803b158015610ee557600080fd5b505af1158015610ef9573d6000803e3d6000fd5b505050505050565b610f096126f4565b6101a7805460ff19168215159081179091556040519081527f62966c6ab42ddb1bf366e57cca01b5c361a03ced13c736f055d388148d10273e906020015b60405180910390a150565b6001600160a01b038516331480610f6e5750610f6e8533610bcc565b610f8a5760405162461bcd60e51b8152600401610d2590615153565b610f97858585858561274e565b5050505050565b6101a5546001600160a01b0316331480610fc357506101a4546001600160a01b031633145b610fdf5760405162461bcd60e51b8152600401610d2590615112565b610194546040516318ce792760e11b81526001600160a01b039091169063319cf24e90610ecb90859085906004016151a2565b6101a5546001600160a01b031633148061103657506033546001600160a01b031633145b6110525760405162461bcd60e51b8152600401610d25906150b4565b60006101915411801561106757506101915442115b6110835760405162461bcd60e51b8152600401610d25906151c7565b6101925442106110a55760405162461bcd60e51b8152600401610d25906151fe565b8151829060005b818110156111055760008382815181106110c8576110c8615235565b6020026020010151905060208111806110df575080155b156110fc5760405162461bcd60e51b8152600401610d259061524b565b506001016110ac565b5061110f846128f3565b61113585858560405180604001604052806002815260200161060f60f31b81525061292a565b61113e83612a85565b610198600082825461115091906150ff565b90915550505050505050565b6001600160a01b037f00000000000000000000000034817d263d1881482dcf0ac0a5fadab0b907f5141630036111a45760405162461bcd60e51b8152600401610d2590615292565b7f00000000000000000000000034817d263d1881482dcf0ac0a5fadab0b907f5146001600160a01b03166111d6612aca565b6001600160a01b0316146111fc5760405162461bcd60e51b8152600401610d25906152de565b61120581612ae6565b6040805160008082526020820190925261122191839190612aee565b50565b61019354610100900460ff1661128b5760405162461bcd60e51b815260206004820152602660248201527f466f6f7462616c6c4375703a207769746864726177206973206e6f74206163746044820152651a5d985d195960d21b6064820152608401610d25565b3360009081526101976020526040902054156112a9576112a9612c59565b6101a75460ff16151560000361132f573360008181526101aa6020526040908190205461019454915163f3fef3a360e01b8152600481019390935260248301819052916001600160a01b039091169063f3fef3a390604401600060405180830381600087803b15801561131b57600080fd5b505af1158015610f97573d6000803e3d6000fd5b565b600054610100900460ff16158080156113515750600054600160ff909116105b8061136b5750303b15801561136b575060005460ff166001145b6113ce5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d25565b6000805460ff1916600117905580156113f1576000805461ff0019166101001790555b61140960405180602001604052806000815250612d3d565b611411612d6d565b611419612d9c565b611421612dc3565b611429612d9c565b610193805462010000600160b01b031916620100006001600160a01b038681168202929092179283905561019480546001600160a01b0319168684161790556040805163a023cf6960e01b81529051919093049091169163a023cf6991600480830192602092919082900301816000875af11580156114ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d0919061532a565b61019555801561151a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6101a5546001600160a01b031633148061154357506033546001600160a01b031633145b61155f5760405162461bcd60e51b8152600401610d25906150b4565b600090815261019b60205260409020805460ff19169055565b606081518351146115dd5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610d25565b600083516001600160401b038111156115f8576115f86148c4565b604051908082528060200260200182016040528015611621578160200160208202803683370190505b50905060005b84518110156116995761166c85828151811061164557611645615235565b602002602001015185838151811061165f5761165f615235565b6020026020010151610cbe565b82828151811061167e5761167e615235565b602090810291909101015261169281615343565b9050611627565b509392505050565b6001600160a01b037f00000000000000000000000034817d263d1881482dcf0ac0a5fadab0b907f5141630036116e95760405162461bcd60e51b8152600401610d2590615292565b7f00000000000000000000000034817d263d1881482dcf0ac0a5fadab0b907f5146001600160a01b031661171b612aca565b6001600160a01b0316146117415760405162461bcd60e51b8152600401610d25906152de565b61174a82612ae6565b61175682826001612aee565b5050565b6101935460ff1661177d5760405162461bcd60e51b8152600401610d259061535c565b60408051600180825281830190925260009160208083019080368337505060408051600180825281830190925292935060009291506020808301908036833701905050905083826000815181106117d6576117d6615235565b60200260200101818152505082816000815181106117f6576117f6615235565b60200260200101818152505061180c828261198e565b50505050565b6000306001600160a01b037f00000000000000000000000034817d263d1881482dcf0ac0a5fadab0b907f51416146118b25760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610d25565b5060008051602061595e8339815191525b90565b6101a5546001600160a01b03163314806118eb57506101a4546001600160a01b031633145b6119075760405162461bcd60e51b8152600401610d2590615112565b61019454604051635c3867e560e01b81526001600160a01b0390911690635c3867e590610ecb908590859060040161539f565b6119426126f4565b6101a480546001600160a01b0319166001600160a01b0392909216919091179055565b610195546001600160a01b038216600090815261019760205260408120549091610d53916153b2565b6101935460ff166119b15760405162461bcd60e51b8152600401610d259061535c565b8151829060005b81811015611a115760008382815181106119d4576119d4615235565b6020026020010151905060208111806119eb575080155b15611a085760405162461bcd60e51b8152600401610d259061524b565b506001016119b8565b508251845114611a755760405162461bcd60e51b815260206004820152602960248201527f466f6f7462616c6c4375703a20636c61696d20706172616d206c656e677468206044820152680dcdee840dac2e8c6d60bb1b6064820152608401610d25565b835160005b81811015611b12576000868281518110611a9657611a96615235565b60200260200101519050611aa981612df2565b600081815261019b602052604090205460ff1615611b095760405162461bcd60e51b815260206004820152601f60248201527f466f6f7462616c6c4375703a20636c61696d207374696c6c20706175736564006044820152606401610d25565b50600101611a7a565b50610194546040516331e82a2160e11b81526001600160a01b03909116906363d0544290611b48903390899089906004016153d4565b600060405180830381600087803b158015611b6257600080fd5b505af1158015611b76573d6000803e3d6000fd5b50505050610f97338686612e78565b6060806000611b9c6033546001600160a01b031690565b6001600160a01b0316336001600160a01b03161480611bc657506101a4546001600160a01b031633145b611c1c5760405162461bcd60e51b815260206004820152602160248201527f466f6f7462616c6c4375703a206f6e6c7920736572766572206f72206f776e656044820152603960f91b6064820152608401610d25565b600086815261019f6020526040812090611c358261308f565b90506000611c438789615414565b9050818110611ca45760405162461bcd60e51b815260206004820152602760248201527f466f6f7462616c6c4375703a20736e617073686f742073697a65206f7574206f6044820152661988189bdd5b9960ca1b6064820152608401610d25565b6000611cb08284615433565b905088811115611cbd5750875b806001600160401b03811115611cd557611cd56148c4565b604051908082528060200260200182016040528015611cfe578160200160208202803683370190505b509650806001600160401b03811115611d1957611d196148c4565b604051908082528060200260200182016040528015611d42578160200160208202803683370190505b50955060005b81811015611dff57611d64611d5d84836150ff565b8690613099565b888281518110611d7657611d76615235565b6001600160a01b0390921660209283029190910182015260008c815261019e9091526040812090611db1611daa86856150ff565b8890613099565b6001600160a01b03166001600160a01b0316815260200190815260200160002054878281518110611de457611de4615235565b6020908102919091010152611df881615343565b9050611d48565b5060008a815261019f60205260409020611e189061308f565b94505050505093509350939050565b611e2f6126f4565b6101a580546001600160a01b0319166001600160a01b0392909216919091179055565b611e5a6126f4565b61132f60006130a5565b6101996020528160005260406000208181548110611e8157600080fd5b600091825260209091206002909102018054600190910154909250905082565b6101a5546001600160a01b0316331480611ec557506033546001600160a01b031633145b611ee15760405162461bcd60e51b8152600401610d25906150b4565b61019380548215156101000261ff00199091161790556040517fec1b77658f85d79ea7a466c2a357dabff976fe264665c7ae9dd3095c268eaa3c90610f4790831515815260200190565b611f336126f4565b61175682826130f7565b6101a5546001600160a01b0316331480611f6157506033546001600160a01b031633145b611f7d5760405162461bcd60e51b8152600401610d25906150b4565b8051600083815261019960205260408120611f979161472c565b60005b8181101561180c576000838281518110611fb657611fb6615235565b60200260200101516000015190506000848381518110611fd857611fd8615235565b60200260200101516020015190508082106120355760405162461bcd60e51b815260206004820181905260248201527f466f6f7462616c6c4375703a20737461727454696d65203e20656e6454696d656044820152606401610d25565b600086815261019960205260409020855186908590811061205857612058615235565b602090810291909101810151825460018181018555600094855293839020825160029092020190815591015190820155929092019150611f9a9050565b611756338383613148565b6000610191541180156120b557506101915442115b6120d15760405162461bcd60e51b8152600401610d25906151c7565b6101925442106120f35760405162461bcd60e51b8152600401610d25906151fe565b8560018110158015612106575060208111155b6121225760405162461bcd60e51b8152600401610d259061524b565b61212f8686868686613228565b6121388761345a565b61214186613589565b61216788888860405180604001604052806002815260200161060f60f31b815250613659565b5050505050505050565b600061217b612aca565b905090565b6101a5546001600160a01b03163314806121a457506033546001600160a01b031633145b6121c05760405162461bcd60e51b8152600401610d25906150b4565b610193805460ff19168215159081179091556040519081527f1edd4dc7f91a5992aba0f39c0428bcf4df13d001eebc26eb188307d057f14a0790602001610f47565b60006101915411801561221757506101915442115b6122335760405162461bcd60e51b8152600401610d25906151c7565b6101925442106122555760405162461bcd60e51b8152600401610d25906151fe565b8551869060005b818110156122b557600083828151811061227857612278615235565b60200260200101519050602081118061228f575080155b156122ac5760405162461bcd60e51b8152600401610d259061524b565b5060010161225c565b5060006122c188612a85565b90506122d08188888888613228565b6122d9896128f3565b6122e281613589565b6123088a8a8a60405180604001604052806002815260200161060f60f31b81525061292a565b50505050505050505050565b606061217b6101a861373b565b6123296126f4565b61271081106123985760405162461bcd60e51b815260206004820152603560248201527f466f6f7462616c6c4375703a207769746864726177526174652063616e206e6f6044820152740742067726561746572207468616e2031305f30303605c1b6064820152608401610d25565b6123a46101a883613748565b506001600160a01b0390911660009081526101aa6020526040902055565b6123ca6126f4565b61019155565b6101a5546001600160a01b03163314806123f457506033546001600160a01b031633145b6124105760405162461bcd60e51b8152600401610d25906150b4565b805160208201518082106124665760405162461bcd60e51b815260206004820181905260248201527f466f6f7462616c6c4375703a20737461727454696d65203e20656e6454696d656044820152606401610d25565b50508051600092835261019a60209081526040909320908155910151600190910155565b6124926126f4565b6101a280546001600160a01b0319166001600160a01b0392909216919091179055565b6124bd6126f4565b6101a380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0385163314806124fc57506124fc8533610bcc565b6125185760405162461bcd60e51b8152600401610d2590615153565b610f97858585858561375d565b61252d6126f4565b6001600160a01b0381166125925760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d25565b611221816130a5565b6101a5546001600160a01b03163314806125bf57506033546001600160a01b031633145b6125db5760405162461bcd60e51b8152600401610d25906150b4565b6101945460405163fb77f28360e01b815260048101849052602481018390526001600160a01b039091169063fb77f28390604401610ecb565b600081815260fc602052604081208054606092919061263290615446565b80601f016020809104026020016040519081016040528092919081815260200182805461265e90615446565b80156126ab5780601f10612680576101008083540402835291602001916126ab565b820191906000526020600020905b81548152906001019060200180831161268e57829003601f168201915b5050505050905060008151116126c9576126c483613899565b6126ed565b60fb816040516020016126dd92919061547a565b6040516020818303038152906040525b9392505050565b6033546001600160a01b0316331461132f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d25565b815183511461276f5760405162461bcd60e51b8152600401610d2590615501565b6001600160a01b0384166127955760405162461bcd60e51b8152600401610d2590615549565b336127a481878787878761392d565b60005b845181101561288d5760008582815181106127c4576127c4615235565b6020026020010151905060008583815181106127e2576127e2615235565b60209081029190910181015160008481526097835260408082206001600160a01b038e1683529093529190912054909150818110156128335760405162461bcd60e51b8152600401610d259061558e565b60008381526097602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906128729084906150ff565b925050819055505050508061288690615343565b90506127a7565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516128dd9291906151a2565b60405180910390a4610ef9818787878787613bce565b805160005b8181101561151a5761292283828151811061291557612915615235565b602002602001015161345a565b6001016128f8565b6001600160a01b0384166129505760405162461bcd60e51b8152600401610d25906155d8565b81518351146129715760405162461bcd60e51b8152600401610d2590615501565b336129818160008787878761392d565b60005b8451811015612a1d5783818151811061299f5761299f615235565b6020026020010151609760008784815181106129bd576129bd615235565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254612a0591906150ff565b90915550819050612a1581615343565b915050612984565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612a6e9291906151a2565b60405180910390a4610f9781600087878787613bce565b8051600090815b81811015612ac357838181518110612aa657612aa6615235565b602002602001015183612ab991906150ff565b9250600101612a8c565b5050919050565b60008051602061595e833981519152546001600160a01b031690565b6112216126f4565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612b215761151a83613d29565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612b7b575060408051601f3d908101601f19168201909252612b789181019061532a565b60015b612bde5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610d25565b60008051602061595e8339815191528114612c4d5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610d25565b5061151a838383613dc5565b33600081815261019760205260408120805490829055610196805491928392612c83908490615433565b90915550506101935460405163f3fef3a360e01b81526001600160a01b03848116600483015260248201849052620100009092049091169063f3fef3a390604401600060405180830381600087803b158015612cde57600080fd5b505af1158015612cf2573d6000803e3d6000fd5b50505050816001600160a01b03167f79d3df6837cc49ff0e09fd3258e6e45594e0703445bb06825e9d75156eaee8f082604051612d3191815260200190565b60405180910390a25050565b600054610100900460ff16612d645760405162461bcd60e51b8152600401610d2590615619565b61122181613dea565b600054610100900460ff16612d945760405162461bcd60e51b8152600401610d2590615619565b61132f613e1a565b600054610100900460ff1661132f5760405162461bcd60e51b8152600401610d2590615619565b600054610100900460ff16612dea5760405162461bcd60e51b8152600401610d2590615619565b61132f613e4a565b600081815261019a6020526040902054421080612e205750600081815261019a602052604090206001015442115b6112215760405162461bcd60e51b8152602060048201526024808201527f466f6f7462616c6c4375703a20636f6d7065746574696f6e206973206f6e20676044820152636f696e6760e01b6064820152608401610d25565b6001600160a01b038316612eda5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610d25565b8051825114612efb5760405162461bcd60e51b8152600401610d2590615501565b6000339050612f1e8185600086866040518060200160405280600081525061392d565b60005b8351811015613022576000848281518110612f3e57612f3e615235565b602002602001015190506000848381518110612f5c57612f5c615235565b60209081029190910181015160008481526097835260408082206001600160a01b038c168352909352919091205490915081811015612fe95760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610d25565b60009283526097602090815260408085206001600160a01b038b168652909152909220910390558061301a81615343565b915050612f21565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516130739291906151a2565b60405180910390a460408051602081019091526000905261180c565b6000610d53825490565b60006126ed8383613e8d565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082815260fc6020526040902061310f82826156aa565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b61313b84610e05565b604051612d319190614849565b816001600160a01b0316836001600160a01b0316036131bb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610d25565b6001600160a01b03838116600081815260986020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008481526101a6602052604090205460ff16156132965760405162461bcd60e51b815260206004820152602560248201527f466f6f7462616c6c4375703a206861736820636f64652068617665206265656e604482015264081d5cd95960da1b6064820152608401610d25565b60008481526101a660205260408120805460ff191660011790556132bc85858585613eb7565b610195543360009081526101976020526040812054929350916132df91906153b2565b6101a2549091506001600160a01b038381169116148061330d57506101a3546001600160a01b038381169116145b6133655760405162461bcd60e51b815260206004820152602360248201527f466f6f7462616c6c4375703a20696e76616c69642063616c6c207369676e617460448201526275726560e81b6064820152608401610d25565b600361337188836150ff565b11156133ce5760405162461bcd60e51b815260206004820152602660248201527f466f6f7462616c6c4375703a2066726565206d696e742072656163682074686560448201526520636170203360d01b6064820152608401610d25565b6101a3546001600160a01b0390811690831603613451576133ef87826150ff565b6001146134515760405162461bcd60e51b815260206004820152602a60248201527f466f6f7462616c6c4375703a2066726565206d696e74207265616368207468656044820152692077656220636170203160b01b6064820152608401610d25565b50505050505050565b60008181526101996020908152604080832080548251818502810185019093528083529192909190849084015b828210156134cd57838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190613487565b5050825192935060009150505b8181101561180c578281815181106134f4576134f4615235565b602002602001015160000151421080613529575082818151811061351a5761351a615235565b60200260200101516020015142115b6135815760405162461bcd60e51b8152602060048201526024808201527f466f6f7462616c6c4375703a20636f6d7065746974696f6e206973206f6e20676044820152636f696e6760e01b6064820152608401610d25565b6001016134da565b6000610195548261359a9190615414565b6135a490826150ff565b610193546040516311f9fbc960e21b8152336004820152602481018390529192506201000090046001600160a01b0316906347e7ef2490604401600060405180830381600087803b1580156135f857600080fd5b505af115801561360c573d6000803e3d6000fd5b5050505080610196600082825461362391906150ff565b909155505033600090815261019760205260409020546136449082906150ff565b33600090815261019760205260409020555050565b6001600160a01b03841661367f5760405162461bcd60e51b8152600401610d25906155d8565b33600061368b85613edf565b9050600061369885613edf565b90506136a98360008985858961392d565b60008681526097602090815260408083206001600160a01b038b168452909152812080548792906136db9084906150ff565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461345183600089898989613f2a565b606060006126ed83613fe5565b60006126ed836001600160a01b038416614040565b6001600160a01b0384166137835760405162461bcd60e51b8152600401610d2590615549565b33600061378f85613edf565b9050600061379c85613edf565b90506137ac83898985858961392d565b60008681526097602090815260408083206001600160a01b038c168452909152902054858110156137ef5760405162461bcd60e51b8152600401610d259061558e565b60008781526097602090815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061382e9084906150ff565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461388e848a8a8a8a8a613f2a565b505050505050505050565b6060609980546138a890615446565b80601f01602080910402602001604051908101604052809291908181526020018280546138d490615446565b80156139215780601f106138f657610100808354040283529160200191613921565b820191906000526020600020905b81548152906001019060200180831161390457829003601f168201915b50505050509050919050565b61393b86868686868661408f565b825160005b8181101561216757600085828151811061395c5761395c615235565b60200260200101519050600085838151811061397a5761397a615235565b6020026020010151905060006001600160a01b0316896001600160a01b0316141580156139a75750600081115b15613ab6576001600160a01b03891660009081526101a16020526040812080548392906139d5908490615433565b9091555050600082815261019e602090815260408083206001600160a01b038d16845290915281208054839290613a0d908490615433565b90915550506001600160a01b03891660009081526101a160205260408120549003613a4c5760016101a06000828254613a469190615433565b90915550505b600082815261019e602090815260408083206001600160a01b038d1684529091528120549003613ab657600082815261019d60205260408120805460019290613a96908490615433565b9091555050600082815261019f60205260409020613ab4908a614208565b505b6001600160a01b03881615801590613ace5750600081115b15613bc4576001600160a01b03881660008181526101a160208181526040808420805488865261019e845282862096865295835290842054929091529091849190613b1983866150ff565b9091555050600084815261019e602090815260408083206001600160a01b038e16845290915281208054859290613b519084906150ff565b90915550506000829003613b795760016101a06000828254613b7391906150ff565b90915550505b80600003613bc157600084815261019d60205260408120805460019290613ba19084906150ff565b9091555050600084815261019f60205260409020613bbf908b613748565b505b50505b5050600101613940565b6001600160a01b0384163b15610ef95760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613c129089908990889088908890600401615769565b6020604051808303816000875af1925050508015613c4d575060408051601f3d908101601f19168201909252613c4a918101906157c7565b60015b613cf957613c596157e4565b806308c379a003613c925750613c6d6157ff565b80613c785750613c94565b8060405162461bcd60e51b8152600401610d259190614849565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610d25565b6001600160e01b0319811663bc197c8160e01b146134515760405162461bcd60e51b8152600401610d2590615888565b6001600160a01b0381163b613d965760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610d25565b60008051602061595e83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b613dce8361421d565b600082511180613ddb5750805b1561151a5761180c838361425d565b600054610100900460ff16613e115760405162461bcd60e51b8152600401610d2590615619565b61122181614351565b600054610100900460ff16613e415760405162461bcd60e51b8152600401610d2590615619565b61132f336130a5565b600054610100900460ff16613e715760405162461bcd60e51b8152600401610d2590615619565b60408051602081019091526000815260fb9061122190826156aa565b6000826000018281548110613ea457613ea4615235565b9060005260206000200154905092915050565b6000806000613ec88787878761435d565b91509150613ed58161444a565b5095945050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613f1957613f19615235565b602090810291909101015292915050565b6001600160a01b0384163b15610ef95760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190613f6e90899089908890889088906004016158d0565b6020604051808303816000875af1925050508015613fa9575060408051601f3d908101601f19168201909252613fa6918101906157c7565b60015b613fb557613c596157e4565b6001600160e01b0319811663f23a6e6160e01b146134515760405162461bcd60e51b8152600401610d2590615888565b60608160000180548060200260200160405190810160405280929190818152602001828054801561392157602002820191906000526020600020905b8154815260200190600101908083116140215750505050509050919050565b600081815260018301602052604081205461408757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610d53565b506000610d53565b6001600160a01b0385166141165760005b8351811015614114578281815181106140bb576140bb615235565b602002602001015160c960008684815181106140d9576140d9615235565b6020026020010151815260200190815260200160002060008282546140fe91906150ff565b9091555061410d905081615343565b90506140a0565b505b6001600160a01b038416610ef95760005b835181101561345157600084828151811061414457614144615235565b60200260200101519050600084838151811061416257614162615235565b60200260200101519050600060c96000848152602001908152602001600020549050818110156141e55760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610d25565b600092835260c960205260409092209103905561420181615343565b9050614127565b60006126ed836001600160a01b038416614600565b61422681613d29565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6142c55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610d25565b600080846001600160a01b0316846040516142e09190615915565b600060405180830381855af49150503d806000811461431b576040519150601f19603f3d011682016040523d82523d6000602084013e614320565b606091505b5091509150614348828260405180606001604052806027815260200161597e602791396146f3565b95945050505050565b609961175682826156aa565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156143945750600090506003614441565b8460ff16601b141580156143ac57508460ff16601c14155b156143bd5750600090506004614441565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614411573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661443a57600060019250925050614441565b9150600090505b94509492505050565b600081600481111561445e5761445e615931565b036144665750565b600181600481111561447a5761447a615931565b036144c75760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610d25565b60028160048111156144db576144db615931565b036145285760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610d25565b600381600481111561453c5761453c615931565b036145945760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610d25565b60048160048111156145a8576145a8615931565b036112215760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610d25565b600081815260018301602052604081205480156146e9576000614624600183615433565b855490915060009061463890600190615433565b905081811461469d57600086600001828154811061465857614658615235565b906000526020600020015490508087600001848154811061467b5761467b615235565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806146ae576146ae615947565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610d53565b6000915050610d53565b606083156147025750816126ed565b8251156147125782518084602001fd5b8160405162461bcd60e51b8152600401610d259190614849565b508054600082556002029060005260206000209081019061122191905b808211156147635760008082556001820155600201614749565b5090565b80356001600160a01b038116811461477e57600080fd5b919050565b6000806040838503121561479657600080fd5b61479f83614767565b946020939093013593505050565b6001600160e01b03198116811461122157600080fd5b6000602082840312156147d557600080fd5b81356126ed816147ad565b6000602082840312156147f257600080fd5b5035919050565b60005b838110156148145781810151838201526020016147fc565b50506000910152565b600081518084526148358160208601602086016147f9565b601f01601f19169290920160200192915050565b6020815260006126ed602083018461481d565b60006020828403121561486e57600080fd5b6126ed82614767565b6000806040838503121561488a57600080fd5b50508035926020909101359150565b8035801515811461477e57600080fd5b6000602082840312156148bb57600080fd5b6126ed82614899565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156148ff576148ff6148c4565b6040525050565b60006001600160401b0382111561491f5761491f6148c4565b5060051b60200190565b600082601f83011261493a57600080fd5b8135602061494782614906565b60405161495482826148da565b83815260059390931b850182019282810191508684111561497457600080fd5b8286015b8481101561498f5780358352918301918301614978565b509695505050505050565b60006001600160401b038311156149b3576149b36148c4565b6040516149ca601f8501601f1916602001826148da565b8091508381528484840111156149df57600080fd5b83836020830137600060208583010152509392505050565b600082601f830112614a0857600080fd5b6126ed8383356020850161499a565b600080600080600060a08688031215614a2f57600080fd5b614a3886614767565b9450614a4660208701614767565b935060408601356001600160401b0380821115614a6257600080fd5b614a6e89838a01614929565b94506060880135915080821115614a8457600080fd5b614a9089838a01614929565b93506080880135915080821115614aa657600080fd5b50614ab3888289016149f7565b9150509295509295909350565b60008060408385031215614ad357600080fd5b82356001600160401b0380821115614aea57600080fd5b614af686838701614929565b93506020850135915080821115614b0c57600080fd5b50614b1985828601614929565b9150509250929050565b600080600060608486031215614b3857600080fd5b614b4184614767565b925060208401356001600160401b0380821115614b5d57600080fd5b614b6987838801614929565b93506040860135915080821115614b7f57600080fd5b50614b8c86828701614929565b9150509250925092565b60008060408385031215614ba957600080fd5b614bb283614767565b9150614bc060208401614767565b90509250929050565b60008060408385031215614bdc57600080fd5b82356001600160401b0380821115614bf357600080fd5b818501915085601f830112614c0757600080fd5b81356020614c1482614906565b604051614c2182826148da565b83815260059390931b8501820192828101915089841115614c4157600080fd5b948201945b83861015614c6657614c5786614767565b82529482019490820190614c46565b96505086013592505080821115614b0c57600080fd5b600081518084526020808501945080840160005b83811015614cac57815187529582019590820190600101614c90565b509495945050505050565b6020815260006126ed6020830184614c7c565b60008060408385031215614cdd57600080fd5b614ce683614767565b915060208301356001600160401b03811115614d0157600080fd5b614b19858286016149f7565b600080600060608486031215614d2257600080fd5b505081359360208301359350604090920135919050565b600081518084526020808501945080840160005b83811015614cac5781516001600160a01b031687529582019590820190600101614d4d565b606081526000614d856060830186614d39565b8281036020840152614d978186614c7c565b915050826040830152949350505050565b60008060408385031215614dbb57600080fd5b8235915060208301356001600160401b03811115614dd857600080fd5b8301601f81018513614de957600080fd5b614b198582356020840161499a565b600060408284031215614e0a57600080fd5b604051604081018181106001600160401b0382111715614e2c57614e2c6148c4565b604052823581526020928301359281019290925250919050565b6000806040808486031215614e5a57600080fd5b833592506020808501356001600160401b03811115614e7857600080fd5b8501601f81018713614e8957600080fd5b8035614e9481614906565b8451614ea082826148da565b82815260069290921b8301840191848101915089831115614ec057600080fd5b928401925b82841015614ee657614ed78a85614df8565b82529285019290840190614ec5565b8096505050505050509250929050565b60008060408385031215614f0957600080fd5b614f1283614767565b9150614bc060208401614899565b803560ff8116811461477e57600080fd5b600080600080600080600060e0888a031215614f4c57600080fd5b614f5588614767565b9650602088013595506040880135945060608801359350614f7860808901614f20565b925060a0880135915060c0880135905092959891949750929550565b600080600080600080600060e0888a031215614faf57600080fd5b614fb888614767565b965060208801356001600160401b0380821115614fd457600080fd5b614fe08b838c01614929565b975060408a0135915080821115614ff657600080fd5b506150038a828b01614929565b95505060608801359350614f7860808901614f20565b6020815260006126ed6020830184614d39565b6000806060838503121561503f57600080fd5b82359150614bc08460208501614df8565b600080600080600060a0868803121561506857600080fd5b61507186614767565b945061507f60208701614767565b9350604086013592506060860135915060808601356001600160401b038111156150a857600080fd5b614ab3888289016149f7565b6020808252818101527f466f6f7462616c6c4375703a206f6e6c792061646d696e206f72206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610d5357610d536150e9565b60208082526021908201527f466f6f7462616c6c4375703a206f6e6c792061646d696e206f722073657276656040820152603960f91b606082015260800190565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b6040815260006151b56040830185614c7c565b82810360208401526143488185614c7c565b6020808252601b908201527f466f6f7462616c6c4375703a206d696e74206e6f742073746172740000000000604082015260600190565b6020808252601d908201527f466f6f7462616c6c4375703a206d696e7420737461676520656e646564000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60208082526027908201527f466f6f7462616c6c4375703a20746f6b656e206964206f7574206f662072616e60408201526633b2901896999960c91b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b60006020828403121561533c57600080fd5b5051919050565b600060018201615355576153556150e9565b5060010190565b60208082526023908201527f466f6f7462616c6c4375703a20636c61696d206973206e6f74206163746976616040820152621d195960ea1b606082015260800190565b6040815260006151b56040830185614d39565b6000826153cf57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b03841681526060602082018190526000906153f890830185614c7c565b828103604084015261540a8185614c7c565b9695505050505050565b600081600019048311821515161561542e5761542e6150e9565b500290565b81810381811115610d5357610d536150e9565b600181811c9082168061545a57607f821691505b602082108103610e4f57634e487b7160e01b600052602260045260246000fd5b600080845461548881615446565b600182811680156154a057600181146154b5576154e4565b60ff19841687528215158302870194506154e4565b8860005260208060002060005b858110156154db5781548a8201529084019082016154c2565b50505082870194505b5050505083516154f88183602088016147f9565b01949350505050565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b601f82111561151a57600081815260208120601f850160051c8101602086101561568b5750805b601f850160051c820191505b81811015610ef957828155600101615697565b81516001600160401b038111156156c3576156c36148c4565b6156d7816156d18454615446565b84615664565b602080601f83116001811461570c57600084156156f45750858301515b600019600386901b1c1916600185901b178555610ef9565b600085815260208120601f198616915b8281101561573b5788860151825594840194600190910190840161571c565b50858210156157595787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0386811682528516602082015260a06040820181905260009061579590830186614c7c565b82810360608401526157a78186614c7c565b905082810360808401526157bb818561481d565b98975050505050505050565b6000602082840312156157d957600080fd5b81516126ed816147ad565b600060033d11156118c35760046000803e5060005160e01c90565b600060443d101561580d5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561583c57505050505090565b82850191508151818111156158545750505050505090565b843d870101602082850101111561586e5750505050505090565b61587d602082860101876148da565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061590a9083018461481d565b979650505050505050565b600082516159278184602087016147f9565b9190910192915050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220661bcbf3d4f2b18dd3ef2f5b1ae7b478e860c4c4fbf8ab9f0bf44cdd1835e82e64736f6c63430008100033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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