ETH Price: $2,417.86 (-2.07%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60a06040162376612022-12-22 3:50:11683 days ago1671681011IN
 Create: OKXFootballCup
0 ETH0.0620171412

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;

    error OnlyMintToCaller();

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

    event ETHStakeEnabled(bool enable);

    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

    // ----- update v2 -----
    uint256 public ethStakePrice;
    uint256 public ethTotalStaking;
    mapping(address => uint256) public ethStakeAmountMap;
    bool public ethStakeEnabled;

    // ----- update v3 -----
    mapping(address => bool) public transferPausedMap;

    // -----

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

    function initializeV2() public reinitializer(2) {
        ethStakePrice = IStake(stakeContract).ethStakePrice();
    }

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

    // ---- 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 +
            ethStakeAmountMap[account] /
            ethStakePrice;
    }

    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 to,
        uint256 id,
        uint256 amount,
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public payable stageOne idRange(id) {
        if (to != msg.sender) revert OnlyMintToCaller();
        _verify(amount, hash, v, r, s);
        _checkIdMintPausedTime(id);
        ethStakeEnabled ? _ethMintStake(amount) : _mintStake(amount);
        _mint(to, id, amount, "0x");
    }

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

    function mintBatchWithETH(
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public payable stageOne idsRange(ids) {
        uint256 totalMintAmount = _totalMintAmount(amounts);
        _verify(totalMintAmount, hash, v, r, s);
        _checkIdsMintPausedTime(ids);
        _ethMintStake(totalMintAmount);
        _mintBatch(msg.sender, 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 = mintedAmountOf(msg.sender);
        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 = 0;
        totalMintFee = totalMintAmount * stakePrice;

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

        totalStaking += totalMintFee;

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

    function _ethMintStake(uint256 totalMintAmount) internal {
        // mint amount (stake amount) already checked in _verify
        uint256 totalMintFee = 0;
        totalMintFee = totalMintAmount * ethStakePrice;

        require(
            msg.value >= totalMintFee,
            "FootballCup: mint fee(ETH) not enough"
        );

        IStake(stakeContract).depositETH{value: totalMintFee}(msg.sender);

        ethTotalStaking += totalMintFee;

        ethStakeAmountMap[msg.sender] =
            ethStakeAmountMap[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 withdraw(uint256 bonusAmount, bytes32[] memory proof)
        external
        stageThree
    {
        uint256 blockRate = _blockRateMap[msg.sender];
        //withdraw stake
        IStake(stakeContract).unstake(msg.sender, blockRate);

        if (transferPausedMap[msg.sender]) return; // allow unstake but no bonus

        //withdraw  bonus
        if (_eventCanceled == false && bonusAmount > 0) {
            IBonus(bonusContract).withdraw(msg.sender, bonusAmount, proof);
        }
    }

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

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

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

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

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

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

    // ---- only admin or owner ----

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

    function pauseTransfer(address[] calldata accounts, bool action)
        external
        onlyAdminOrOwner
    {
        uint256 length = accounts.length;
        for (uint256 i = 0; i < length; ) {
            transferPausedMap[accounts[i]] = action;
            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 setEthStakeEnable(bool active) public onlyAdminOrOwner {
        ethStakeEnabled = active;
        emit ETHStakeEnabled(active);
    }

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

    function snapshot(
        uint256 id,
        uint256 pageSize,
        uint256 pageIndex // 0,1,2...
    )
        public
        view
        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);

        require(
            !transferPausedMap[from],
            "FootballCup: transfer from blocklist"
        );

        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 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

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

File 3 of 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 4 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 5 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 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 : 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 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 : 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 12 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 13 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 14 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);
}

File 15 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 16 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 17 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 18 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 19 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 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 : 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 22 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 23 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 24 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 25 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 bonusAmount,
        bytes32[] memory proof
    ) external;

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

    function elimination(uint256 winner, uint256 loser) external;

    function setMintBonus(uint256 id, uint256 bonus) external;
}

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

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

    function stakePrice() external returns (uint256);

    function depositETH(address from) external payable;

    function ethStakePrice() external returns (uint256);

    function unstake(address to, uint256 blockRate)
        external
        returns (uint256 unstakedAmount, uint256 unstakedETHAmount);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"OnlyMintToCaller","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"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":"bool","name":"enable","type":"bool"}],"name":"ETHStakeEnabled","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":"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":"address","name":"","type":"address"}],"name":"ethStakeAmountMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethStakeEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethStakePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethTotalStaking","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"initializeV2","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":"to","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":"payable","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":"payable","type":"function"},{"inputs":[{"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":"mintBatchWithETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"bool","name":"action","type":"bool"}],"name":"pauseTransfer","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":"_blockRate","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":"bool","name":"active","type":"bool"}],"name":"setEthStakeEnable","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":"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":"address","name":"","type":"address"}],"name":"transferPausedMap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":[{"internalType":"uint256","name":"bonusAmount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60a06040523060805234801561001457600080fd5b50608051615c8a6200004d60003960008181611271015281816112b101528181611661015281816116a101526117d10152615c8a6000f3fe6080604052600436106104045760003560e01c8063729f4fde11610213578063bd85b03911610123578063e985e9c5116100ab578063f28f84321161007a578063f28f843214610cc8578063f2fde38b14610cdf578063f875d93114610cff578063fb77f28314610d1f578063fe992c9814610d3f57600080fd5b8063e985e9c514610c32578063f0f359b714610c7b578063f11745df14610c92578063f242432a14610ca857600080fd5b8063d141da00116100f2578063d141da0014610b97578063d5b3621b14610bb2578063d7c077ad14610bd2578063dc5540c314610bf2578063e93c020014610c1257600080fd5b8063bd85b03914610b15578063c213859214610b42578063c2ee0a5714610b55578063c52bd7f514610b7757600080fd5b8063956fcbc1116101a6578063a22cb46511610175578063a22cb46514610a7c578063a733dbe714610a9c578063aaf10f4214610aaf578063b6ea0b6d14610ac4578063bbcb2b8514610af557600080fd5b8063956fcbc1146109d157806395d89b4114610a065780639924557214610a37578063a023cf6914610a6557600080fd5b80638594a336116101e25780638594a3361461095c578063862440e21461097c5780638da5cb5b1461099c578063931e2e49146109ba57600080fd5b8063729f4fde146108dd5780637dc7ec12146108f0578063827a560b14610925578063856979041461094557600080fd5b8063319cf24e1161031957806352d1902d116102a15780636939850e116102705780636939850e146108415780636a8e5bfc14610862578063704b6c0214610891578063715018a6146108b1578063717a002b146108c657600080fd5b806352d1902d146107d75780635cd8a76b146107ec57806360679d94146108015780636691070e1461082157600080fd5b8063486da2ca116102e8578063486da2ca146107285780634e1273f4146107485780634f1ef286146107755780634f558e791461078857806351c66dce146107b757600080fd5b8063319cf24e146106a857806336317972146106c85780633659cfe6146106e8578063485cc9551461070857600080fd5b806317f374951161039c578063222936751161036b57806322293675146105fc5780632287e96a1461061c5780632866ed211461063c578063287f1c30146106575780632eb2c2d61461068857600080fd5b806317f374951461056857806318160ddd146105885780631a1862271461059d5780631b2d1887146105dc57600080fd5b806306fdde03116103d857806306fdde03146104bc5780630e89341c14610503578063165defa41461052357806317c8ac6f1461053a57600080fd5b8062fdd58e1461040957806301ffc9a71461043c578063020ea3661461046c578063030104191461049a575b600080fd5b34801561041557600080fd5b506104296104243660046148e8565b610d76565b6040519081526020015b60405180910390f35b34801561044857600080fd5b5061045c610457366004614928565b610e11565b6040519015158152602001610433565b34801561047857600080fd5b50610429610487366004614945565b6101ad6020526000908152604090205481565b3480156104a657600080fd5b506104ba6104b5366004614960565b610e61565b005b3480156104c857600080fd5b506104f66040518060400160405280600e81526020016d04f4b58466f6f7462616c6c4375760941b81525081565b60405161043391906149c9565b34801561050f57600080fd5b506104f661051e366004614960565b610ebd565b34801561052f57600080fd5b506104296101965481565b34801561054657600080fd5b50610429610555366004614945565b6101976020526000908152604090205481565b34801561057457600080fd5b506104ba610583366004614960565b610ec8565b34801561059457600080fd5b50610429610ed6565b3480156105a957600080fd5b50610193546105c4906201000090046001600160a01b031681565b6040516001600160a01b039091168152602001610433565b3480156105e857600080fd5b506104ba6105f73660046149dc565b610f0d565b34801561060857600080fd5b506104ba610617366004614a0e565b610fb9565b34801561062857600080fd5b506101935461045c90610100900460ff1681565b34801561064857600080fd5b506101935461045c9060ff1681565b34801561066357600080fd5b5061045c610672366004614960565b61019b6020526000908152604090205460ff1681565b34801561069457600080fd5b506104ba6106a3366004614b7c565b61100a565b3480156106b457600080fd5b506104ba6106c3366004614c25565b611056565b3480156106d457600080fd5b506104ba6106e3366004614c88565b6110ca565b3480156106f457600080fd5b506104ba610703366004614945565b611267565b34801561071457600080fd5b506104ba610723366004614d2f565b61132f565b34801561073457600080fd5b506104ba610743366004614960565b6114d5565b34801561075457600080fd5b50610768610763366004614d62565b61152e565b6040516104339190614e50565b6104ba610783366004614e63565b611657565b34801561079457600080fd5b5061045c6107a3366004614960565b600090815260c96020526040902054151590565b3480156107c357600080fd5b506104ba6107d23660046149dc565b61170c565b3480156107e357600080fd5b506104296117c4565b3480156107f857600080fd5b506104ba611878565b34801561080d57600080fd5b5061042961081c366004614945565b611985565b34801561082d57600080fd5b506104ba61083c366004614c25565b6119e0565b34801561084d57600080fd5b50610194546105c4906001600160a01b031681565b34801561086e57600080fd5b5061088261087d366004614ea6565b611bd7565b60405161043393929190614f0b565b34801561089d57600080fd5b506104ba6108ac366004614945565b611de7565b3480156108bd57600080fd5b506104ba611e12565b3480156108d257600080fd5b506104296101925481565b6104ba6108eb366004614f52565b611e26565b3480156108fc57600080fd5b5061091061090b3660046149dc565b611f37565b60408051928352602083019190915201610433565b34801561093157600080fd5b506104ba610940366004614a0e565b611f74565b34801561095157600080fd5b506104296101ac5481565b34801561096857600080fd5b506104ba610977366004614a0e565b611ffe565b34801561098857600080fd5b506104ba610997366004614fe1565b612080565b3480156109a857600080fd5b506033546001600160a01b03166105c4565b3480156109c657600080fd5b506104296101915481565b3480156109dd57600080fd5b506109106109ec366004614960565b61019a602052600090815260409020805460019091015482565b348015610a1257600080fd5b506104f6604051806040016040528060058152602001644f4b58464360d81b81525081565b348015610a4357600080fd5b50610429610a52366004614960565b600090815261019d602052604090205490565b348015610a7157600080fd5b506104296101955481565b348015610a8857600080fd5b506104ba610a97366004615031565b612092565b6104ba610aaa36600461505b565b61209d565b348015610abb57600080fd5b506105c46121b0565b348015610ad057600080fd5b5061045c610adf366004614945565b6101af6020526000908152604090205460ff1681565b348015610b0157600080fd5b506104ba610b10366004614a0e565b6121bf565b348015610b2157600080fd5b50610429610b30366004614960565b600090815260c9602052604090205490565b6104ba610b503660046150be565b612241565b348015610b6157600080fd5b50610b6a61237c565b6040516104339190615143565b348015610b8357600080fd5b506104ba610b923660046148e8565b612389565b348015610ba357600080fd5b506101ae5461045c9060ff1681565b348015610bbe57600080fd5b506104ba610bcd366004614960565b61242b565b348015610bde57600080fd5b506104ba610bed366004615156565b612439565b348015610bfe57600080fd5b506104ba610c0d366004614945565b6124f3565b348015610c1e57600080fd5b506104ba610c2d366004614945565b61251e565b348015610c3e57600080fd5b5061045c610c4d366004614d2f565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205460ff1690565b348015610c8757600080fd5b506104296101ab5481565b348015610c9e57600080fd5b506101a054610429565b348015610cb457600080fd5b506104ba610cc33660046151c1565b612549565b348015610cd457600080fd5b506104296101985481565b348015610ceb57600080fd5b506104ba610cfa366004614945565b61258e565b348015610d0b57600080fd5b506104ba610d1a366004615225565b612604565b348015610d2b57600080fd5b506104ba610d3a3660046149dc565b6126ad565b348015610d4b57600080fd5b50610429610d5a366004614945565b6001600160a01b031660009081526101a1602052604090205490565b60006001600160a01b038316610de65760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526097602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b1480610e4257506001600160e01b031982166303a24d0760e21b145b80610e0b57506301ffc9a760e01b6001600160e01b0319831614610e0b565b6101a5546001600160a01b0316331480610e8557506033546001600160a01b031633145b610ea15760405162461bcd60e51b8152600401610ddd906152a8565b600090815261019b60205260409020805460ff19166001179055565b6060610e0b82612726565b610ed0612806565b61019255565b60008060015b60208111610f0757600081815260c96020526040902054610efd90836152f3565b9150600101610edc565b50919050565b6101a5546001600160a01b0316331480610f3257506101a4546001600160a01b031633145b610f4e5760405162461bcd60e51b8152600401610ddd90615306565b61019454604051631b2d188760e01b815260048101849052602481018390526001600160a01b0390911690631b2d1887906044015b600060405180830381600087803b158015610f9d57600080fd5b505af1158015610fb1573d6000803e3d6000fd5b505050505050565b610fc1612806565b6101a7805460ff19168215159081179091556040519081527f62966c6ab42ddb1bf366e57cca01b5c361a03ced13c736f055d388148d10273e906020015b60405180910390a150565b6001600160a01b03851633148061102657506110268533610c4d565b6110425760405162461bcd60e51b8152600401610ddd90615347565b61104f8585858585612860565b5050505050565b6101a5546001600160a01b031633148061107b57506101a4546001600160a01b031633145b6110975760405162461bcd60e51b8152600401610ddd90615306565b610194546040516318ce792760e11b81526001600160a01b039091169063319cf24e90610f839085908590600401615396565b61019354610100900460ff166111315760405162461bcd60e51b815260206004820152602660248201527f466f6f7462616c6c4375703a207769746864726177206973206e6f74206163746044820152651a5d985d195960d21b6064820152608401610ddd565b3360008181526101aa60205260409081902054610193549151630615339760e51b815260048101939093526024830181905291620100009091046001600160a01b03169063c2a672e09060440160408051808303816000875af115801561119c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c091906153bb565b50503360009081526101af602052604090205460ff16156111e057505050565b6101a75460ff161580156111f45750600083115b15611261576101945460405163077668cb60e51b81526001600160a01b039091169063eecd19609061122e903390879087906004016153df565b600060405180830381600087803b15801561124857600080fd5b505af115801561125c573d6000803e3d6000fd5b505050505b505b5050565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036112af5760405162461bcd60e51b8152600401610ddd9061543c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166112e1612a05565b6001600160a01b0316146113075760405162461bcd60e51b8152600401610ddd90615488565b61131081612a21565b6040805160008082526020820190925261132c91839190612a29565b50565b600054610100900460ff161580801561134f5750600054600160ff909116105b806113695750303b158015611369575060005460ff166001145b6113855760405162461bcd60e51b8152600401610ddd906154d4565b6000805460ff1916600117905580156113a8576000805461ff0019166101001790555b6113c060405180602001604052806000815250612b99565b6113c8612bc9565b6113d0612bf8565b6113d8612c1f565b6113e0612bf8565b610193805462010000600160b01b031916620100006001600160a01b038681168202929092179283905561019480546001600160a01b0319168684161790556040805163a023cf6960e01b81529051919093049091169163a023cf6991600480830192602092919082900301816000875af1158015611463573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114879190615522565b610195558015611261576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b6101a5546001600160a01b03163314806114f957506033546001600160a01b031633145b6115155760405162461bcd60e51b8152600401610ddd906152a8565b600090815261019b60205260409020805460ff19169055565b606081518351146115935760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610ddd565b600083516001600160401b038111156115ae576115ae614a29565b6040519080825280602002602001820160405280156115d7578160200160208202803683370190505b50905060005b845181101561164f576116228582815181106115fb576115fb61553b565b60200260200101518583815181106116155761161561553b565b6020026020010151610d76565b8282815181106116345761163461553b565b602090810291909101015261164881615551565b90506115dd565b509392505050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361169f5760405162461bcd60e51b8152600401610ddd9061543c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166116d1612a05565b6001600160a01b0316146116f75760405162461bcd60e51b8152600401610ddd90615488565b61170082612a21565b61126382826001612a29565b6101935460ff1661172f5760405162461bcd60e51b8152600401610ddd9061556a565b60408051600180825281830190925260009160208083019080368337505060408051600180825281830190925292935060009291506020808301908036833701905050905083826000815181106117885761178861553b565b60200260200101818152505082816000815181106117a8576117a861553b565b6020026020010181815250506117be82826119e0565b50505050565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146118645760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610ddd565b50600080516020615c0e8339815191525b90565b600054600290610100900460ff1615801561189a575060005460ff8083169116105b6118b65760405162461bcd60e51b8152600401610ddd906154d4565b6000805461ffff191660ff831617610100178155610193546040805163f0f359b760e01b815290516001600160a01b0362010000909304929092169263f0f359b79260048084019360209390839003909101908290875af115801561191f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119439190615522565b6101ab556000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610fff565b6101ab546001600160a01b03821660009081526101ad602052604081205490916119ae916155ad565b610195546001600160a01b038416600090815261019760205260409020546119d691906155ad565b610e0b91906152f3565b6101935460ff16611a035760405162461bcd60e51b8152600401610ddd9061556a565b8151829060005b81811015611a63576000838281518110611a2657611a2661553b565b602002602001015190506020811180611a3d575080155b15611a5a5760405162461bcd60e51b8152600401610ddd906155cf565b50600101611a0a565b508251845114611ac75760405162461bcd60e51b815260206004820152602960248201527f466f6f7462616c6c4375703a20636c61696d20706172616d206c656e677468206044820152680dcdee840dac2e8c6d60bb1b6064820152608401610ddd565b835160005b81811015611b64576000868281518110611ae857611ae861553b565b60200260200101519050611afb81612c4e565b600081815261019b602052604090205460ff1615611b5b5760405162461bcd60e51b815260206004820152601f60248201527f466f6f7462616c6c4375703a20636c61696d207374696c6c20706175736564006044820152606401610ddd565b50600101611acc565b50610194546040516331e82a2160e11b81526001600160a01b03909116906363d0544290611b9a90339089908990600401615616565b600060405180830381600087803b158015611bb457600080fd5b505af1158015611bc8573d6000803e3d6000fd5b5050505061104f338686612cd4565b600083815261019f60205260408120606091829181611bf582612eeb565b90506000611c038789615656565b9050818110611c645760405162461bcd60e51b815260206004820152602760248201527f466f6f7462616c6c4375703a20736e617073686f742073697a65206f7574206f6044820152661988189bdd5b9960ca1b6064820152608401610ddd565b6000611c708284615675565b905088811115611c7d5750875b806001600160401b03811115611c9557611c95614a29565b604051908082528060200260200182016040528015611cbe578160200160208202803683370190505b509650806001600160401b03811115611cd957611cd9614a29565b604051908082528060200260200182016040528015611d02578160200160208202803683370190505b50955060005b81811015611dbf57611d24611d1d84836152f3565b8690612ef5565b888281518110611d3657611d3661553b565b6001600160a01b0390921660209283029190910182015260008c815261019e9091526040812090611d71611d6a86856152f3565b8890612ef5565b6001600160a01b03166001600160a01b0316815260200190815260200160002054878281518110611da457611da461553b565b6020908102919091010152611db881615551565b9050611d08565b5060008a815261019f60205260409020611dd890612eeb565b94505050505093509350939050565b611def612806565b6101a580546001600160a01b0319166001600160a01b0392909216919091179055565b611e1a612806565b611e246000612f01565b565b600061019154118015611e3b57506101915442115b611e575760405162461bcd60e51b8152600401610ddd90615688565b610192544210611e795760405162461bcd60e51b8152600401610ddd906156bf565b8551869060005b81811015611ed9576000838281518110611e9c57611e9c61553b565b602002602001015190506020811180611eb3575080155b15611ed05760405162461bcd60e51b8152600401610ddd906155cf565b50600101611e80565b506000611ee588612f53565b9050611ef48188888888612f98565b611efd896131ab565b611f06816131e2565b611f2c338a8a60405180604001604052806002815260200161060f60f31b815250613301565b505050505050505050565b6101996020528160005260406000208181548110611f5457600080fd5b600091825260209091206002909102018054600190910154909250905082565b6101a5546001600160a01b0316331480611f9857506033546001600160a01b031633145b611fb45760405162461bcd60e51b8152600401610ddd906152a8565b61019380548215156101000261ff00199091161790556040517fec1b77658f85d79ea7a466c2a357dabff976fe264665c7ae9dd3095c268eaa3c90610fff90831515815260200190565b6101a5546001600160a01b031633148061202257506033546001600160a01b031633145b61203e5760405162461bcd60e51b8152600401610ddd906152a8565b6101ae805460ff19168215159081179091556040519081527fe410a1c4338fb50b085510ace4144551f6b73d7874f14d147a07fe68661e783f90602001610fff565b612088612806565b611263828261345c565b6112633383836134b9565b6000610191541180156120b257506101915442115b6120ce5760405162461bcd60e51b8152600401610ddd90615688565b6101925442106120f05760405162461bcd60e51b8152600401610ddd906156bf565b8560018110158015612103575060208111155b61211f5760405162461bcd60e51b8152600401610ddd906155cf565b6001600160a01b038816331461214857604051637e7f3ad560e01b815260040160405180910390fd5b6121558686868686612f98565b61215e87613599565b6101ae5460ff1661217757612172866136c8565b612180565b612180866131e2565b6121a688888860405180604001604052806002815260200161060f60f31b81525061378e565b5050505050505050565b60006121ba612a05565b905090565b6101a5546001600160a01b03163314806121e357506033546001600160a01b031633145b6121ff5760405162461bcd60e51b8152600401610ddd906152a8565b610193805460ff19168215159081179091556040519081527f1edd4dc7f91a5992aba0f39c0428bcf4df13d001eebc26eb188307d057f14a0790602001610fff565b60006101915411801561225657506101915442115b6122725760405162461bcd60e51b8152600401610ddd90615688565b6101925442106122945760405162461bcd60e51b8152600401610ddd906156bf565b8551869060005b818110156122f45760008382815181106122b7576122b761553b565b6020026020010151905060208111806122ce575080155b156122eb5760405162461bcd60e51b8152600401610ddd906155cf565b5060010161229b565b506001600160a01b038916331461231e57604051637e7f3ad560e01b815260040160405180910390fd5b600061232988612f53565b90506123388188888888612f98565b612341896131ab565b61234a816136c8565b6123708a8a8a60405180604001604052806002815260200161060f60f31b815250613301565b50505050505050505050565b60606121ba6101a8613870565b612391612806565b6127108111156124015760405162461bcd60e51b815260206004820152603560248201527f466f6f7462616c6c4375703a207769746864726177526174652063616e206e6f6044820152740742067726561746572207468616e2031305f30303605c1b6064820152608401610ddd565b61240d6101a88361387d565b506001600160a01b0390911660009081526101aa6020526040902055565b612433612806565b61019155565b6101a5546001600160a01b031633148061245d57506033546001600160a01b031633145b6124795760405162461bcd60e51b8152600401610ddd906152a8565b805160208201518082106124cf5760405162461bcd60e51b815260206004820181905260248201527f466f6f7462616c6c4375703a20737461727454696d65203e20656e6454696d656044820152606401610ddd565b50508051600092835261019a60209081526040909320908155910151600190910155565b6124fb612806565b6101a280546001600160a01b0319166001600160a01b0392909216919091179055565b612526612806565b6101a380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03851633148061256557506125658533610c4d565b6125815760405162461bcd60e51b8152600401610ddd90615347565b61104f8585858585613892565b612596612806565b6001600160a01b0381166125fb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ddd565b61132c81612f01565b6101a5546001600160a01b031633148061262857506033546001600160a01b031633145b6126445760405162461bcd60e51b8152600401610ddd906152a8565b8160005b8181101561104f57826101af60008787858181106126685761266861553b565b905060200201602081019061267d9190614945565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055600101612648565b6101a5546001600160a01b03163314806126d157506033546001600160a01b031633145b6126ed5760405162461bcd60e51b8152600401610ddd906152a8565b6101945460405163fb77f28360e01b815260048101849052602481018390526001600160a01b039091169063fb77f28390604401610f83565b600081815260fc6020526040812080546060929190612744906156f6565b80601f0160208091040260200160405190810160405280929190818152602001828054612770906156f6565b80156127bd5780601f10612792576101008083540402835291602001916127bd565b820191906000526020600020905b8154815290600101906020018083116127a057829003601f168201915b5050505050905060008151116127db576127d6836139c3565b6127ff565b60fb816040516020016127ef92919061572a565b6040516020818303038152906040525b9392505050565b6033546001600160a01b03163314611e245760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ddd565b81518351146128815760405162461bcd60e51b8152600401610ddd906157b1565b6001600160a01b0384166128a75760405162461bcd60e51b8152600401610ddd906157f9565b336128b6818787878787613a57565b60005b845181101561299f5760008582815181106128d6576128d661553b565b6020026020010151905060008583815181106128f4576128f461553b565b60209081029190910181015160008481526097835260408082206001600160a01b038e1683529093529190912054909150818110156129455760405162461bcd60e51b8152600401610ddd9061583e565b60008381526097602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906129849084906152f3565b925050819055505050508061299890615551565b90506128b9565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516129ef929190615396565b60405180910390a4610fb1818787878787613d6e565b600080516020615c0e833981519152546001600160a01b031690565b61132c612806565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612a6157612a5c83613ec9565b611261565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612abb575060408051601f3d908101601f19168201909252612ab891810190615522565b60015b612b1e5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610ddd565b600080516020615c0e8339815191528114612b8d5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610ddd565b50611261838383613f65565b600054610100900460ff16612bc05760405162461bcd60e51b8152600401610ddd90615888565b61132c81613f8a565b600054610100900460ff16612bf05760405162461bcd60e51b8152600401610ddd90615888565b611e24613fba565b600054610100900460ff16611e245760405162461bcd60e51b8152600401610ddd90615888565b600054610100900460ff16612c465760405162461bcd60e51b8152600401610ddd90615888565b611e24613fea565b600081815261019a6020526040902054421080612c7c5750600081815261019a602052604090206001015442115b61132c5760405162461bcd60e51b8152602060048201526024808201527f466f6f7462616c6c4375703a20636f6d7065746574696f6e206973206f6e20676044820152636f696e6760e01b6064820152608401610ddd565b6001600160a01b038316612d365760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610ddd565b8051825114612d575760405162461bcd60e51b8152600401610ddd906157b1565b6000339050612d7a81856000868660405180602001604052806000815250613a57565b60005b8351811015612e7e576000848281518110612d9a57612d9a61553b565b602002602001015190506000848381518110612db857612db861553b565b60209081029190910181015160008481526097835260408082206001600160a01b038c168352909352919091205490915081811015612e455760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610ddd565b60009283526097602090815260408085206001600160a01b038b1686529091529092209103905580612e7681615551565b915050612d7d565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612ecf929190615396565b60405180910390a46040805160208101909152600090526117be565b6000610e0b825490565b60006127ff838361402d565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051600090815b81811015612f9157838181518110612f7457612f7461553b565b602002602001015183612f8791906152f3565b9250600101612f5a565b5050919050565b60008481526101a6602052604090205460ff16156130065760405162461bcd60e51b815260206004820152602560248201527f466f6f7462616c6c4375703a206861736820636f64652068617665206265656e604482015264081d5cd95960da1b6064820152608401610ddd565b60008481526101a660205260408120805460ff1916600117905561302c85858585614057565b9050600061303933611985565b6101a2549091506001600160a01b038381169116148061306757506101a3546001600160a01b038381169116145b6130bf5760405162461bcd60e51b815260206004820152602360248201527f466f6f7462616c6c4375703a20696e76616c69642063616c6c207369676e617460448201526275726560e81b6064820152608401610ddd565b60036130cb88836152f3565b11156131285760405162461bcd60e51b815260206004820152602660248201527f466f6f7462616c6c4375703a2066726565206d696e742072656163682074686560448201526520636170203360d01b6064820152608401610ddd565b6101a3546001600160a01b039081169083160361125c5761314987826152f3565b60011461125c5760405162461bcd60e51b815260206004820152602a60248201527f466f6f7462616c6c4375703a2066726565206d696e74207265616368207468656044820152692077656220636170203160b01b6064820152608401610ddd565b805160005b81811015611261576131da8382815181106131cd576131cd61553b565b6020026020010151613599565b6001016131b0565b60006101ab54826131f39190615656565b9050803410156132535760405162461bcd60e51b815260206004820152602560248201527f466f6f7462616c6c4375703a206d696e74206665652845544829206e6f7420656044820152640dcdeeaced60db1b6064820152608401610ddd565b61019354604051631696d40360e11b8152336004820152620100009091046001600160a01b031690632d2da8069083906024016000604051808303818588803b15801561329f57600080fd5b505af11580156132b3573d6000803e3d6000fd5b5050505050806101ac60008282546132cb91906152f3565b90915550503360009081526101ad60205260409020546132ec9082906152f3565b3360009081526101ad60205260409020555050565b6001600160a01b0384166133275760405162461bcd60e51b8152600401610ddd906158d3565b81518351146133485760405162461bcd60e51b8152600401610ddd906157b1565b3361335881600087878787613a57565b60005b84518110156133f4578381815181106133765761337661553b565b6020026020010151609760008784815181106133945761339461553b565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546133dc91906152f3565b909155508190506133ec81615551565b91505061335b565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051613445929190615396565b60405180910390a461104f81600087878787613d6e565b600082815260fc60205260409020613474828261595a565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b6134a084610ebd565b6040516134ad91906149c9565b60405180910390a25050565b816001600160a01b0316836001600160a01b03160361352c5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610ddd565b6001600160a01b03838116600081815260986020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008181526101996020908152604080832080548251818502810185019093528083529192909190849084015b8282101561360c578382906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050815260200190600101906135c6565b5050825192935060009150505b818110156117be578281815181106136335761363361553b565b60200260200101516000015142108061366857508281815181106136595761365961553b565b60200260200101516020015142115b6136c05760405162461bcd60e51b8152602060048201526024808201527f466f6f7462616c6c4375703a20636f6d7065746974696f6e206973206f6e20676044820152636f696e6760e01b6064820152608401610ddd565b600101613619565b600061019554826136d99190615656565b610193546040516311f9fbc960e21b8152336004820152602481018390529192506201000090046001600160a01b0316906347e7ef2490604401600060405180830381600087803b15801561372d57600080fd5b505af1158015613741573d6000803e3d6000fd5b5050505080610196600082825461375891906152f3565b909155505033600090815261019760205260409020546137799082906152f3565b33600090815261019760205260409020555050565b6001600160a01b0384166137b45760405162461bcd60e51b8152600401610ddd906158d3565b3360006137c08561407f565b905060006137cd8561407f565b90506137de83600089858589613a57565b60008681526097602090815260408083206001600160a01b038b168452909152812080548792906138109084906152f3565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461125c836000898989896140ca565b606060006127ff83614185565b60006127ff836001600160a01b0384166141e0565b6001600160a01b0384166138b85760405162461bcd60e51b8152600401610ddd906157f9565b3360006138c48561407f565b905060006138d18561407f565b90506138e1838989858589613a57565b60008681526097602090815260408083206001600160a01b038c168452909152902054858110156139245760405162461bcd60e51b8152600401610ddd9061583e565b60008781526097602090815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906139639084906152f3565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611f2c848a8a8a8a8a6140ca565b6060609980546139d2906156f6565b80601f01602080910402602001604051908101604052809291908181526020018280546139fe906156f6565b8015613a4b5780601f10613a2057610100808354040283529160200191613a4b565b820191906000526020600020905b815481529060010190602001808311613a2e57829003601f168201915b50505050509050919050565b613a6586868686868661422f565b6001600160a01b03851660009081526101af602052604090205460ff1615613adb5760405162461bcd60e51b8152602060048201526024808201527f466f6f7462616c6c4375703a207472616e736665722066726f6d20626c6f636b6044820152631b1a5cdd60e21b6064820152608401610ddd565b825160005b818110156121a6576000858281518110613afc57613afc61553b565b602002602001015190506000858381518110613b1a57613b1a61553b565b6020026020010151905060006001600160a01b0316896001600160a01b031614158015613b475750600081115b15613c56576001600160a01b03891660009081526101a1602052604081208054839290613b75908490615675565b9091555050600082815261019e602090815260408083206001600160a01b038d16845290915281208054839290613bad908490615675565b90915550506001600160a01b03891660009081526101a160205260408120549003613bec5760016101a06000828254613be69190615675565b90915550505b600082815261019e602090815260408083206001600160a01b038d1684529091528120549003613c5657600082815261019d60205260408120805460019290613c36908490615675565b9091555050600082815261019f60205260409020613c54908a6143a8565b505b6001600160a01b03881615801590613c6e5750600081115b15613d64576001600160a01b03881660008181526101a160208181526040808420805488865261019e845282862096865295835290842054929091529091849190613cb983866152f3565b9091555050600084815261019e602090815260408083206001600160a01b038e16845290915281208054859290613cf19084906152f3565b90915550506000829003613d195760016101a06000828254613d1391906152f3565b90915550505b80600003613d6157600084815261019d60205260408120805460019290613d419084906152f3565b9091555050600084815261019f60205260409020613d5f908b61387d565b505b50505b5050600101613ae0565b6001600160a01b0384163b15610fb15760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613db29089908990889088908890600401615a19565b6020604051808303816000875af1925050508015613ded575060408051601f3d908101601f19168201909252613dea91810190615a77565b60015b613e9957613df9615a94565b806308c379a003613e325750613e0d615aaf565b80613e185750613e34565b8060405162461bcd60e51b8152600401610ddd91906149c9565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610ddd565b6001600160e01b0319811663bc197c8160e01b1461125c5760405162461bcd60e51b8152600401610ddd90615b38565b6001600160a01b0381163b613f365760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610ddd565b600080516020615c0e83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b613f6e836143bd565b600082511180613f7b5750805b15611261576117be83836143fd565b600054610100900460ff16613fb15760405162461bcd60e51b8152600401610ddd90615888565b61132c816144f1565b600054610100900460ff16613fe15760405162461bcd60e51b8152600401610ddd90615888565b611e2433612f01565b600054610100900460ff166140115760405162461bcd60e51b8152600401610ddd90615888565b60408051602081019091526000815260fb9061132c908261595a565b60008260000182815481106140445761404461553b565b9060005260206000200154905092915050565b6000806000614068878787876144fd565b91509150614075816145ea565b5095945050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106140b9576140b961553b565b602090810291909101015292915050565b6001600160a01b0384163b15610fb15760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061410e9089908990889088908890600401615b80565b6020604051808303816000875af1925050508015614149575060408051601f3d908101601f1916820190925261414691810190615a77565b60015b61415557613df9615a94565b6001600160e01b0319811663f23a6e6160e01b1461125c5760405162461bcd60e51b8152600401610ddd90615b38565b606081600001805480602002602001604051908101604052809291908181526020018280548015613a4b57602002820191906000526020600020905b8154815260200190600101908083116141c15750505050509050919050565b600081815260018301602052604081205461422757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610e0b565b506000610e0b565b6001600160a01b0385166142b65760005b83518110156142b45782818151811061425b5761425b61553b565b602002602001015160c960008684815181106142795761427961553b565b60200260200101518152602001908152602001600020600082825461429e91906152f3565b909155506142ad905081615551565b9050614240565b505b6001600160a01b038416610fb15760005b835181101561125c5760008482815181106142e4576142e461553b565b6020026020010151905060008483815181106143025761430261553b565b60200260200101519050600060c96000848152602001908152602001600020549050818110156143855760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610ddd565b600092835260c96020526040909220910390556143a181615551565b90506142c7565b60006127ff836001600160a01b0384166147a0565b6143c681613ec9565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6144655760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610ddd565b600080846001600160a01b0316846040516144809190615bc5565b600060405180830381855af49150503d80600081146144bb576040519150601f19603f3d011682016040523d82523d6000602084013e6144c0565b606091505b50915091506144e88282604051806060016040528060278152602001615c2e60279139614893565b95945050505050565b6099611263828261595a565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561453457506000905060036145e1565b8460ff16601b1415801561454c57508460ff16601c14155b1561455d57506000905060046145e1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156145b1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166145da576000600192509250506145e1565b9150600090505b94509492505050565b60008160048111156145fe576145fe615be1565b036146065750565b600181600481111561461a5761461a615be1565b036146675760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610ddd565b600281600481111561467b5761467b615be1565b036146c85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610ddd565b60038160048111156146dc576146dc615be1565b036147345760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610ddd565b600481600481111561474857614748615be1565b0361132c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610ddd565b600081815260018301602052604081205480156148895760006147c4600183615675565b85549091506000906147d890600190615675565b905081811461483d5760008660000182815481106147f8576147f861553b565b906000526020600020015490508087600001848154811061481b5761481b61553b565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061484e5761484e615bf7565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610e0b565b6000915050610e0b565b606083156148a25750816127ff565b8251156148b25782518084602001fd5b8160405162461bcd60e51b8152600401610ddd91906149c9565b80356001600160a01b03811681146148e357600080fd5b919050565b600080604083850312156148fb57600080fd5b614904836148cc565b946020939093013593505050565b6001600160e01b03198116811461132c57600080fd5b60006020828403121561493a57600080fd5b81356127ff81614912565b60006020828403121561495757600080fd5b6127ff826148cc565b60006020828403121561497257600080fd5b5035919050565b60005b8381101561499457818101518382015260200161497c565b50506000910152565b600081518084526149b5816020860160208601614979565b601f01601f19169290920160200192915050565b6020815260006127ff602083018461499d565b600080604083850312156149ef57600080fd5b50508035926020909101359150565b803580151581146148e357600080fd5b600060208284031215614a2057600080fd5b6127ff826149fe565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715614a6457614a64614a29565b6040525050565b60006001600160401b03821115614a8457614a84614a29565b5060051b60200190565b600082601f830112614a9f57600080fd5b81356020614aac82614a6b565b604051614ab98282614a3f565b83815260059390931b8501820192828101915086841115614ad957600080fd5b8286015b84811015614af45780358352918301918301614add565b509695505050505050565b60006001600160401b03831115614b1857614b18614a29565b604051614b2f601f8501601f191660200182614a3f565b809150838152848484011115614b4457600080fd5b83836020830137600060208583010152509392505050565b600082601f830112614b6d57600080fd5b6127ff83833560208501614aff565b600080600080600060a08688031215614b9457600080fd5b614b9d866148cc565b9450614bab602087016148cc565b935060408601356001600160401b0380821115614bc757600080fd5b614bd389838a01614a8e565b94506060880135915080821115614be957600080fd5b614bf589838a01614a8e565b93506080880135915080821115614c0b57600080fd5b50614c1888828901614b5c565b9150509295509295909350565b60008060408385031215614c3857600080fd5b82356001600160401b0380821115614c4f57600080fd5b614c5b86838701614a8e565b93506020850135915080821115614c7157600080fd5b50614c7e85828601614a8e565b9150509250929050565b60008060408385031215614c9b57600080fd5b823591506020808401356001600160401b03811115614cb957600080fd5b8401601f81018613614cca57600080fd5b8035614cd581614a6b565b604051614ce28282614a3f565b82815260059290921b8301840191848101915088831115614d0257600080fd5b928401925b82841015614d2057833582529284019290840190614d07565b80955050505050509250929050565b60008060408385031215614d4257600080fd5b614d4b836148cc565b9150614d59602084016148cc565b90509250929050565b60008060408385031215614d7557600080fd5b82356001600160401b0380821115614d8c57600080fd5b818501915085601f830112614da057600080fd5b81356020614dad82614a6b565b604051614dba8282614a3f565b83815260059390931b8501820192828101915089841115614dda57600080fd5b948201945b83861015614dff57614df0866148cc565b82529482019490820190614ddf565b96505086013592505080821115614c7157600080fd5b600081518084526020808501945080840160005b83811015614e4557815187529582019590820190600101614e29565b509495945050505050565b6020815260006127ff6020830184614e15565b60008060408385031215614e7657600080fd5b614e7f836148cc565b915060208301356001600160401b03811115614e9a57600080fd5b614c7e85828601614b5c565b600080600060608486031215614ebb57600080fd5b505081359360208301359350604090920135919050565b600081518084526020808501945080840160005b83811015614e455781516001600160a01b031687529582019590820190600101614ee6565b606081526000614f1e6060830186614ed2565b8281036020840152614f308186614e15565b915050826040830152949350505050565b803560ff811681146148e357600080fd5b60008060008060008060c08789031215614f6b57600080fd5b86356001600160401b0380821115614f8257600080fd5b614f8e8a838b01614a8e565b97506020890135915080821115614fa457600080fd5b50614fb189828a01614a8e565b95505060408701359350614fc760608801614f41565b92506080870135915060a087013590509295509295509295565b60008060408385031215614ff457600080fd5b8235915060208301356001600160401b0381111561501157600080fd5b8301601f8101851361502257600080fd5b614c7e85823560208401614aff565b6000806040838503121561504457600080fd5b61504d836148cc565b9150614d59602084016149fe565b600080600080600080600060e0888a03121561507657600080fd5b61507f886148cc565b96506020880135955060408801359450606088013593506150a260808901614f41565b925060a0880135915060c0880135905092959891949750929550565b600080600080600080600060e0888a0312156150d957600080fd5b6150e2886148cc565b965060208801356001600160401b03808211156150fe57600080fd5b61510a8b838c01614a8e565b975060408a013591508082111561512057600080fd5b5061512d8a828b01614a8e565b955050606088013593506150a260808901614f41565b6020815260006127ff6020830184614ed2565b600080828403606081121561516a57600080fd5b833592506040601f198201121561518057600080fd5b50604051604081018181106001600160401b03821117156151a3576151a3614a29565b60409081526020858101358352940135938101939093525092909150565b600080600080600060a086880312156151d957600080fd5b6151e2866148cc565b94506151f0602087016148cc565b9350604086013592506060860135915060808601356001600160401b0381111561521957600080fd5b614c1888828901614b5c565b60008060006040848603121561523a57600080fd5b83356001600160401b038082111561525157600080fd5b818601915086601f83011261526557600080fd5b81358181111561527457600080fd5b8760208260051b850101111561528957600080fd5b60209283019550935061529f91860190506149fe565b90509250925092565b6020808252818101527f466f6f7462616c6c4375703a206f6e6c792061646d696e206f72206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610e0b57610e0b6152dd565b60208082526021908201527f466f6f7462616c6c4375703a206f6e6c792061646d696e206f722073657276656040820152603960f91b606082015260800190565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b6040815260006153a96040830185614e15565b82810360208401526144e88185614e15565b600080604083850312156153ce57600080fd5b505080516020909101519092909150565b6001600160a01b038416815260208082018490526060604083018190528351908301819052600091848101916080850190845b8181101561542e57845183529383019391830191600101615412565b509098975050505050505050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60006020828403121561553457600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600060018201615563576155636152dd565b5060010190565b60208082526023908201527f466f6f7462616c6c4375703a20636c61696d206973206e6f74206163746976616040820152621d195960ea1b606082015260800190565b6000826155ca57634e487b7160e01b600052601260045260246000fd5b500490565b60208082526027908201527f466f6f7462616c6c4375703a20746f6b656e206964206f7574206f662072616e60408201526633b2901896999960c91b606082015260800190565b6001600160a01b038416815260606020820181905260009061563a90830185614e15565b828103604084015261564c8185614e15565b9695505050505050565b6000816000190483118215151615615670576156706152dd565b500290565b81810381811115610e0b57610e0b6152dd565b6020808252601b908201527f466f6f7462616c6c4375703a206d696e74206e6f742073746172740000000000604082015260600190565b6020808252601d908201527f466f6f7462616c6c4375703a206d696e7420737461676520656e646564000000604082015260600190565b600181811c9082168061570a57607f821691505b602082108103610f0757634e487b7160e01b600052602260045260246000fd5b6000808454615738816156f6565b60018281168015615750576001811461576557615794565b60ff1984168752821515830287019450615794565b8860005260208060002060005b8581101561578b5781548a820152908401908201615772565b50505082870194505b5050505083516157a8818360208801614979565b01949350505050565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b601f82111561126157600081815260208120601f850160051c8101602086101561593b5750805b601f850160051c820191505b81811015610fb157828155600101615947565b81516001600160401b0381111561597357615973614a29565b6159878161598184546156f6565b84615914565b602080601f8311600181146159bc57600084156159a45750858301515b600019600386901b1c1916600185901b178555610fb1565b600085815260208120601f198616915b828110156159eb578886015182559484019460019091019084016159cc565b5085821015615a095787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0386811682528516602082015260a060408201819052600090615a4590830186614e15565b8281036060840152615a578186614e15565b90508281036080840152615a6b818561499d565b98975050505050505050565b600060208284031215615a8957600080fd5b81516127ff81614912565b600060033d11156118755760046000803e5060005160e01c90565b600060443d1015615abd5790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715615aec57505050505090565b8285019150815181811115615b045750505050505090565b843d8701016020828501011115615b1e5750505050505090565b615b2d60208286010187614a3f565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090615bba9083018461499d565b979650505050505050565b60008251615bd7818460208701614979565b9190910192915050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d70a7f0527957a566c0056c7bc7a7f95e6dccc987c0fad80a37dea806d73bacb64736f6c63430008100033

Deployed Bytecode

0x6080604052600436106104045760003560e01c8063729f4fde11610213578063bd85b03911610123578063e985e9c5116100ab578063f28f84321161007a578063f28f843214610cc8578063f2fde38b14610cdf578063f875d93114610cff578063fb77f28314610d1f578063fe992c9814610d3f57600080fd5b8063e985e9c514610c32578063f0f359b714610c7b578063f11745df14610c92578063f242432a14610ca857600080fd5b8063d141da00116100f2578063d141da0014610b97578063d5b3621b14610bb2578063d7c077ad14610bd2578063dc5540c314610bf2578063e93c020014610c1257600080fd5b8063bd85b03914610b15578063c213859214610b42578063c2ee0a5714610b55578063c52bd7f514610b7757600080fd5b8063956fcbc1116101a6578063a22cb46511610175578063a22cb46514610a7c578063a733dbe714610a9c578063aaf10f4214610aaf578063b6ea0b6d14610ac4578063bbcb2b8514610af557600080fd5b8063956fcbc1146109d157806395d89b4114610a065780639924557214610a37578063a023cf6914610a6557600080fd5b80638594a336116101e25780638594a3361461095c578063862440e21461097c5780638da5cb5b1461099c578063931e2e49146109ba57600080fd5b8063729f4fde146108dd5780637dc7ec12146108f0578063827a560b14610925578063856979041461094557600080fd5b8063319cf24e1161031957806352d1902d116102a15780636939850e116102705780636939850e146108415780636a8e5bfc14610862578063704b6c0214610891578063715018a6146108b1578063717a002b146108c657600080fd5b806352d1902d146107d75780635cd8a76b146107ec57806360679d94146108015780636691070e1461082157600080fd5b8063486da2ca116102e8578063486da2ca146107285780634e1273f4146107485780634f1ef286146107755780634f558e791461078857806351c66dce146107b757600080fd5b8063319cf24e146106a857806336317972146106c85780633659cfe6146106e8578063485cc9551461070857600080fd5b806317f374951161039c578063222936751161036b57806322293675146105fc5780632287e96a1461061c5780632866ed211461063c578063287f1c30146106575780632eb2c2d61461068857600080fd5b806317f374951461056857806318160ddd146105885780631a1862271461059d5780631b2d1887146105dc57600080fd5b806306fdde03116103d857806306fdde03146104bc5780630e89341c14610503578063165defa41461052357806317c8ac6f1461053a57600080fd5b8062fdd58e1461040957806301ffc9a71461043c578063020ea3661461046c578063030104191461049a575b600080fd5b34801561041557600080fd5b506104296104243660046148e8565b610d76565b6040519081526020015b60405180910390f35b34801561044857600080fd5b5061045c610457366004614928565b610e11565b6040519015158152602001610433565b34801561047857600080fd5b50610429610487366004614945565b6101ad6020526000908152604090205481565b3480156104a657600080fd5b506104ba6104b5366004614960565b610e61565b005b3480156104c857600080fd5b506104f66040518060400160405280600e81526020016d04f4b58466f6f7462616c6c4375760941b81525081565b60405161043391906149c9565b34801561050f57600080fd5b506104f661051e366004614960565b610ebd565b34801561052f57600080fd5b506104296101965481565b34801561054657600080fd5b50610429610555366004614945565b6101976020526000908152604090205481565b34801561057457600080fd5b506104ba610583366004614960565b610ec8565b34801561059457600080fd5b50610429610ed6565b3480156105a957600080fd5b50610193546105c4906201000090046001600160a01b031681565b6040516001600160a01b039091168152602001610433565b3480156105e857600080fd5b506104ba6105f73660046149dc565b610f0d565b34801561060857600080fd5b506104ba610617366004614a0e565b610fb9565b34801561062857600080fd5b506101935461045c90610100900460ff1681565b34801561064857600080fd5b506101935461045c9060ff1681565b34801561066357600080fd5b5061045c610672366004614960565b61019b6020526000908152604090205460ff1681565b34801561069457600080fd5b506104ba6106a3366004614b7c565b61100a565b3480156106b457600080fd5b506104ba6106c3366004614c25565b611056565b3480156106d457600080fd5b506104ba6106e3366004614c88565b6110ca565b3480156106f457600080fd5b506104ba610703366004614945565b611267565b34801561071457600080fd5b506104ba610723366004614d2f565b61132f565b34801561073457600080fd5b506104ba610743366004614960565b6114d5565b34801561075457600080fd5b50610768610763366004614d62565b61152e565b6040516104339190614e50565b6104ba610783366004614e63565b611657565b34801561079457600080fd5b5061045c6107a3366004614960565b600090815260c96020526040902054151590565b3480156107c357600080fd5b506104ba6107d23660046149dc565b61170c565b3480156107e357600080fd5b506104296117c4565b3480156107f857600080fd5b506104ba611878565b34801561080d57600080fd5b5061042961081c366004614945565b611985565b34801561082d57600080fd5b506104ba61083c366004614c25565b6119e0565b34801561084d57600080fd5b50610194546105c4906001600160a01b031681565b34801561086e57600080fd5b5061088261087d366004614ea6565b611bd7565b60405161043393929190614f0b565b34801561089d57600080fd5b506104ba6108ac366004614945565b611de7565b3480156108bd57600080fd5b506104ba611e12565b3480156108d257600080fd5b506104296101925481565b6104ba6108eb366004614f52565b611e26565b3480156108fc57600080fd5b5061091061090b3660046149dc565b611f37565b60408051928352602083019190915201610433565b34801561093157600080fd5b506104ba610940366004614a0e565b611f74565b34801561095157600080fd5b506104296101ac5481565b34801561096857600080fd5b506104ba610977366004614a0e565b611ffe565b34801561098857600080fd5b506104ba610997366004614fe1565b612080565b3480156109a857600080fd5b506033546001600160a01b03166105c4565b3480156109c657600080fd5b506104296101915481565b3480156109dd57600080fd5b506109106109ec366004614960565b61019a602052600090815260409020805460019091015482565b348015610a1257600080fd5b506104f6604051806040016040528060058152602001644f4b58464360d81b81525081565b348015610a4357600080fd5b50610429610a52366004614960565b600090815261019d602052604090205490565b348015610a7157600080fd5b506104296101955481565b348015610a8857600080fd5b506104ba610a97366004615031565b612092565b6104ba610aaa36600461505b565b61209d565b348015610abb57600080fd5b506105c46121b0565b348015610ad057600080fd5b5061045c610adf366004614945565b6101af6020526000908152604090205460ff1681565b348015610b0157600080fd5b506104ba610b10366004614a0e565b6121bf565b348015610b2157600080fd5b50610429610b30366004614960565b600090815260c9602052604090205490565b6104ba610b503660046150be565b612241565b348015610b6157600080fd5b50610b6a61237c565b6040516104339190615143565b348015610b8357600080fd5b506104ba610b923660046148e8565b612389565b348015610ba357600080fd5b506101ae5461045c9060ff1681565b348015610bbe57600080fd5b506104ba610bcd366004614960565b61242b565b348015610bde57600080fd5b506104ba610bed366004615156565b612439565b348015610bfe57600080fd5b506104ba610c0d366004614945565b6124f3565b348015610c1e57600080fd5b506104ba610c2d366004614945565b61251e565b348015610c3e57600080fd5b5061045c610c4d366004614d2f565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205460ff1690565b348015610c8757600080fd5b506104296101ab5481565b348015610c9e57600080fd5b506101a054610429565b348015610cb457600080fd5b506104ba610cc33660046151c1565b612549565b348015610cd457600080fd5b506104296101985481565b348015610ceb57600080fd5b506104ba610cfa366004614945565b61258e565b348015610d0b57600080fd5b506104ba610d1a366004615225565b612604565b348015610d2b57600080fd5b506104ba610d3a3660046149dc565b6126ad565b348015610d4b57600080fd5b50610429610d5a366004614945565b6001600160a01b031660009081526101a1602052604090205490565b60006001600160a01b038316610de65760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526097602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b1480610e4257506001600160e01b031982166303a24d0760e21b145b80610e0b57506301ffc9a760e01b6001600160e01b0319831614610e0b565b6101a5546001600160a01b0316331480610e8557506033546001600160a01b031633145b610ea15760405162461bcd60e51b8152600401610ddd906152a8565b600090815261019b60205260409020805460ff19166001179055565b6060610e0b82612726565b610ed0612806565b61019255565b60008060015b60208111610f0757600081815260c96020526040902054610efd90836152f3565b9150600101610edc565b50919050565b6101a5546001600160a01b0316331480610f3257506101a4546001600160a01b031633145b610f4e5760405162461bcd60e51b8152600401610ddd90615306565b61019454604051631b2d188760e01b815260048101849052602481018390526001600160a01b0390911690631b2d1887906044015b600060405180830381600087803b158015610f9d57600080fd5b505af1158015610fb1573d6000803e3d6000fd5b505050505050565b610fc1612806565b6101a7805460ff19168215159081179091556040519081527f62966c6ab42ddb1bf366e57cca01b5c361a03ced13c736f055d388148d10273e906020015b60405180910390a150565b6001600160a01b03851633148061102657506110268533610c4d565b6110425760405162461bcd60e51b8152600401610ddd90615347565b61104f8585858585612860565b5050505050565b6101a5546001600160a01b031633148061107b57506101a4546001600160a01b031633145b6110975760405162461bcd60e51b8152600401610ddd90615306565b610194546040516318ce792760e11b81526001600160a01b039091169063319cf24e90610f839085908590600401615396565b61019354610100900460ff166111315760405162461bcd60e51b815260206004820152602660248201527f466f6f7462616c6c4375703a207769746864726177206973206e6f74206163746044820152651a5d985d195960d21b6064820152608401610ddd565b3360008181526101aa60205260409081902054610193549151630615339760e51b815260048101939093526024830181905291620100009091046001600160a01b03169063c2a672e09060440160408051808303816000875af115801561119c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c091906153bb565b50503360009081526101af602052604090205460ff16156111e057505050565b6101a75460ff161580156111f45750600083115b15611261576101945460405163077668cb60e51b81526001600160a01b039091169063eecd19609061122e903390879087906004016153df565b600060405180830381600087803b15801561124857600080fd5b505af115801561125c573d6000803e3d6000fd5b505050505b505b5050565b6001600160a01b037f00000000000000000000000080082d548c0308efc90db4ebdd93958514d9ffaf1630036112af5760405162461bcd60e51b8152600401610ddd9061543c565b7f00000000000000000000000080082d548c0308efc90db4ebdd93958514d9ffaf6001600160a01b03166112e1612a05565b6001600160a01b0316146113075760405162461bcd60e51b8152600401610ddd90615488565b61131081612a21565b6040805160008082526020820190925261132c91839190612a29565b50565b600054610100900460ff161580801561134f5750600054600160ff909116105b806113695750303b158015611369575060005460ff166001145b6113855760405162461bcd60e51b8152600401610ddd906154d4565b6000805460ff1916600117905580156113a8576000805461ff0019166101001790555b6113c060405180602001604052806000815250612b99565b6113c8612bc9565b6113d0612bf8565b6113d8612c1f565b6113e0612bf8565b610193805462010000600160b01b031916620100006001600160a01b038681168202929092179283905561019480546001600160a01b0319168684161790556040805163a023cf6960e01b81529051919093049091169163a023cf6991600480830192602092919082900301816000875af1158015611463573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114879190615522565b610195558015611261576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b6101a5546001600160a01b03163314806114f957506033546001600160a01b031633145b6115155760405162461bcd60e51b8152600401610ddd906152a8565b600090815261019b60205260409020805460ff19169055565b606081518351146115935760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610ddd565b600083516001600160401b038111156115ae576115ae614a29565b6040519080825280602002602001820160405280156115d7578160200160208202803683370190505b50905060005b845181101561164f576116228582815181106115fb576115fb61553b565b60200260200101518583815181106116155761161561553b565b6020026020010151610d76565b8282815181106116345761163461553b565b602090810291909101015261164881615551565b90506115dd565b509392505050565b6001600160a01b037f00000000000000000000000080082d548c0308efc90db4ebdd93958514d9ffaf16300361169f5760405162461bcd60e51b8152600401610ddd9061543c565b7f00000000000000000000000080082d548c0308efc90db4ebdd93958514d9ffaf6001600160a01b03166116d1612a05565b6001600160a01b0316146116f75760405162461bcd60e51b8152600401610ddd90615488565b61170082612a21565b61126382826001612a29565b6101935460ff1661172f5760405162461bcd60e51b8152600401610ddd9061556a565b60408051600180825281830190925260009160208083019080368337505060408051600180825281830190925292935060009291506020808301908036833701905050905083826000815181106117885761178861553b565b60200260200101818152505082816000815181106117a8576117a861553b565b6020026020010181815250506117be82826119e0565b50505050565b6000306001600160a01b037f00000000000000000000000080082d548c0308efc90db4ebdd93958514d9ffaf16146118645760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610ddd565b50600080516020615c0e8339815191525b90565b600054600290610100900460ff1615801561189a575060005460ff8083169116105b6118b65760405162461bcd60e51b8152600401610ddd906154d4565b6000805461ffff191660ff831617610100178155610193546040805163f0f359b760e01b815290516001600160a01b0362010000909304929092169263f0f359b79260048084019360209390839003909101908290875af115801561191f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119439190615522565b6101ab556000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602001610fff565b6101ab546001600160a01b03821660009081526101ad602052604081205490916119ae916155ad565b610195546001600160a01b038416600090815261019760205260409020546119d691906155ad565b610e0b91906152f3565b6101935460ff16611a035760405162461bcd60e51b8152600401610ddd9061556a565b8151829060005b81811015611a63576000838281518110611a2657611a2661553b565b602002602001015190506020811180611a3d575080155b15611a5a5760405162461bcd60e51b8152600401610ddd906155cf565b50600101611a0a565b508251845114611ac75760405162461bcd60e51b815260206004820152602960248201527f466f6f7462616c6c4375703a20636c61696d20706172616d206c656e677468206044820152680dcdee840dac2e8c6d60bb1b6064820152608401610ddd565b835160005b81811015611b64576000868281518110611ae857611ae861553b565b60200260200101519050611afb81612c4e565b600081815261019b602052604090205460ff1615611b5b5760405162461bcd60e51b815260206004820152601f60248201527f466f6f7462616c6c4375703a20636c61696d207374696c6c20706175736564006044820152606401610ddd565b50600101611acc565b50610194546040516331e82a2160e11b81526001600160a01b03909116906363d0544290611b9a90339089908990600401615616565b600060405180830381600087803b158015611bb457600080fd5b505af1158015611bc8573d6000803e3d6000fd5b5050505061104f338686612cd4565b600083815261019f60205260408120606091829181611bf582612eeb565b90506000611c038789615656565b9050818110611c645760405162461bcd60e51b815260206004820152602760248201527f466f6f7462616c6c4375703a20736e617073686f742073697a65206f7574206f6044820152661988189bdd5b9960ca1b6064820152608401610ddd565b6000611c708284615675565b905088811115611c7d5750875b806001600160401b03811115611c9557611c95614a29565b604051908082528060200260200182016040528015611cbe578160200160208202803683370190505b509650806001600160401b03811115611cd957611cd9614a29565b604051908082528060200260200182016040528015611d02578160200160208202803683370190505b50955060005b81811015611dbf57611d24611d1d84836152f3565b8690612ef5565b888281518110611d3657611d3661553b565b6001600160a01b0390921660209283029190910182015260008c815261019e9091526040812090611d71611d6a86856152f3565b8890612ef5565b6001600160a01b03166001600160a01b0316815260200190815260200160002054878281518110611da457611da461553b565b6020908102919091010152611db881615551565b9050611d08565b5060008a815261019f60205260409020611dd890612eeb565b94505050505093509350939050565b611def612806565b6101a580546001600160a01b0319166001600160a01b0392909216919091179055565b611e1a612806565b611e246000612f01565b565b600061019154118015611e3b57506101915442115b611e575760405162461bcd60e51b8152600401610ddd90615688565b610192544210611e795760405162461bcd60e51b8152600401610ddd906156bf565b8551869060005b81811015611ed9576000838281518110611e9c57611e9c61553b565b602002602001015190506020811180611eb3575080155b15611ed05760405162461bcd60e51b8152600401610ddd906155cf565b50600101611e80565b506000611ee588612f53565b9050611ef48188888888612f98565b611efd896131ab565b611f06816131e2565b611f2c338a8a60405180604001604052806002815260200161060f60f31b815250613301565b505050505050505050565b6101996020528160005260406000208181548110611f5457600080fd5b600091825260209091206002909102018054600190910154909250905082565b6101a5546001600160a01b0316331480611f9857506033546001600160a01b031633145b611fb45760405162461bcd60e51b8152600401610ddd906152a8565b61019380548215156101000261ff00199091161790556040517fec1b77658f85d79ea7a466c2a357dabff976fe264665c7ae9dd3095c268eaa3c90610fff90831515815260200190565b6101a5546001600160a01b031633148061202257506033546001600160a01b031633145b61203e5760405162461bcd60e51b8152600401610ddd906152a8565b6101ae805460ff19168215159081179091556040519081527fe410a1c4338fb50b085510ace4144551f6b73d7874f14d147a07fe68661e783f90602001610fff565b612088612806565b611263828261345c565b6112633383836134b9565b6000610191541180156120b257506101915442115b6120ce5760405162461bcd60e51b8152600401610ddd90615688565b6101925442106120f05760405162461bcd60e51b8152600401610ddd906156bf565b8560018110158015612103575060208111155b61211f5760405162461bcd60e51b8152600401610ddd906155cf565b6001600160a01b038816331461214857604051637e7f3ad560e01b815260040160405180910390fd5b6121558686868686612f98565b61215e87613599565b6101ae5460ff1661217757612172866136c8565b612180565b612180866131e2565b6121a688888860405180604001604052806002815260200161060f60f31b81525061378e565b5050505050505050565b60006121ba612a05565b905090565b6101a5546001600160a01b03163314806121e357506033546001600160a01b031633145b6121ff5760405162461bcd60e51b8152600401610ddd906152a8565b610193805460ff19168215159081179091556040519081527f1edd4dc7f91a5992aba0f39c0428bcf4df13d001eebc26eb188307d057f14a0790602001610fff565b60006101915411801561225657506101915442115b6122725760405162461bcd60e51b8152600401610ddd90615688565b6101925442106122945760405162461bcd60e51b8152600401610ddd906156bf565b8551869060005b818110156122f45760008382815181106122b7576122b761553b565b6020026020010151905060208111806122ce575080155b156122eb5760405162461bcd60e51b8152600401610ddd906155cf565b5060010161229b565b506001600160a01b038916331461231e57604051637e7f3ad560e01b815260040160405180910390fd5b600061232988612f53565b90506123388188888888612f98565b612341896131ab565b61234a816136c8565b6123708a8a8a60405180604001604052806002815260200161060f60f31b815250613301565b50505050505050505050565b60606121ba6101a8613870565b612391612806565b6127108111156124015760405162461bcd60e51b815260206004820152603560248201527f466f6f7462616c6c4375703a207769746864726177526174652063616e206e6f6044820152740742067726561746572207468616e2031305f30303605c1b6064820152608401610ddd565b61240d6101a88361387d565b506001600160a01b0390911660009081526101aa6020526040902055565b612433612806565b61019155565b6101a5546001600160a01b031633148061245d57506033546001600160a01b031633145b6124795760405162461bcd60e51b8152600401610ddd906152a8565b805160208201518082106124cf5760405162461bcd60e51b815260206004820181905260248201527f466f6f7462616c6c4375703a20737461727454696d65203e20656e6454696d656044820152606401610ddd565b50508051600092835261019a60209081526040909320908155910151600190910155565b6124fb612806565b6101a280546001600160a01b0319166001600160a01b0392909216919091179055565b612526612806565b6101a380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03851633148061256557506125658533610c4d565b6125815760405162461bcd60e51b8152600401610ddd90615347565b61104f8585858585613892565b612596612806565b6001600160a01b0381166125fb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ddd565b61132c81612f01565b6101a5546001600160a01b031633148061262857506033546001600160a01b031633145b6126445760405162461bcd60e51b8152600401610ddd906152a8565b8160005b8181101561104f57826101af60008787858181106126685761266861553b565b905060200201602081019061267d9190614945565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055600101612648565b6101a5546001600160a01b03163314806126d157506033546001600160a01b031633145b6126ed5760405162461bcd60e51b8152600401610ddd906152a8565b6101945460405163fb77f28360e01b815260048101849052602481018390526001600160a01b039091169063fb77f28390604401610f83565b600081815260fc6020526040812080546060929190612744906156f6565b80601f0160208091040260200160405190810160405280929190818152602001828054612770906156f6565b80156127bd5780601f10612792576101008083540402835291602001916127bd565b820191906000526020600020905b8154815290600101906020018083116127a057829003601f168201915b5050505050905060008151116127db576127d6836139c3565b6127ff565b60fb816040516020016127ef92919061572a565b6040516020818303038152906040525b9392505050565b6033546001600160a01b03163314611e245760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ddd565b81518351146128815760405162461bcd60e51b8152600401610ddd906157b1565b6001600160a01b0384166128a75760405162461bcd60e51b8152600401610ddd906157f9565b336128b6818787878787613a57565b60005b845181101561299f5760008582815181106128d6576128d661553b565b6020026020010151905060008583815181106128f4576128f461553b565b60209081029190910181015160008481526097835260408082206001600160a01b038e1683529093529190912054909150818110156129455760405162461bcd60e51b8152600401610ddd9061583e565b60008381526097602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906129849084906152f3565b925050819055505050508061299890615551565b90506128b9565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516129ef929190615396565b60405180910390a4610fb1818787878787613d6e565b600080516020615c0e833981519152546001600160a01b031690565b61132c612806565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612a6157612a5c83613ec9565b611261565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612abb575060408051601f3d908101601f19168201909252612ab891810190615522565b60015b612b1e5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401610ddd565b600080516020615c0e8339815191528114612b8d5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401610ddd565b50611261838383613f65565b600054610100900460ff16612bc05760405162461bcd60e51b8152600401610ddd90615888565b61132c81613f8a565b600054610100900460ff16612bf05760405162461bcd60e51b8152600401610ddd90615888565b611e24613fba565b600054610100900460ff16611e245760405162461bcd60e51b8152600401610ddd90615888565b600054610100900460ff16612c465760405162461bcd60e51b8152600401610ddd90615888565b611e24613fea565b600081815261019a6020526040902054421080612c7c5750600081815261019a602052604090206001015442115b61132c5760405162461bcd60e51b8152602060048201526024808201527f466f6f7462616c6c4375703a20636f6d7065746574696f6e206973206f6e20676044820152636f696e6760e01b6064820152608401610ddd565b6001600160a01b038316612d365760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610ddd565b8051825114612d575760405162461bcd60e51b8152600401610ddd906157b1565b6000339050612d7a81856000868660405180602001604052806000815250613a57565b60005b8351811015612e7e576000848281518110612d9a57612d9a61553b565b602002602001015190506000848381518110612db857612db861553b565b60209081029190910181015160008481526097835260408082206001600160a01b038c168352909352919091205490915081811015612e455760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610ddd565b60009283526097602090815260408085206001600160a01b038b1686529091529092209103905580612e7681615551565b915050612d7d565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051612ecf929190615396565b60405180910390a46040805160208101909152600090526117be565b6000610e0b825490565b60006127ff838361402d565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051600090815b81811015612f9157838181518110612f7457612f7461553b565b602002602001015183612f8791906152f3565b9250600101612f5a565b5050919050565b60008481526101a6602052604090205460ff16156130065760405162461bcd60e51b815260206004820152602560248201527f466f6f7462616c6c4375703a206861736820636f64652068617665206265656e604482015264081d5cd95960da1b6064820152608401610ddd565b60008481526101a660205260408120805460ff1916600117905561302c85858585614057565b9050600061303933611985565b6101a2549091506001600160a01b038381169116148061306757506101a3546001600160a01b038381169116145b6130bf5760405162461bcd60e51b815260206004820152602360248201527f466f6f7462616c6c4375703a20696e76616c69642063616c6c207369676e617460448201526275726560e81b6064820152608401610ddd565b60036130cb88836152f3565b11156131285760405162461bcd60e51b815260206004820152602660248201527f466f6f7462616c6c4375703a2066726565206d696e742072656163682074686560448201526520636170203360d01b6064820152608401610ddd565b6101a3546001600160a01b039081169083160361125c5761314987826152f3565b60011461125c5760405162461bcd60e51b815260206004820152602a60248201527f466f6f7462616c6c4375703a2066726565206d696e74207265616368207468656044820152692077656220636170203160b01b6064820152608401610ddd565b805160005b81811015611261576131da8382815181106131cd576131cd61553b565b6020026020010151613599565b6001016131b0565b60006101ab54826131f39190615656565b9050803410156132535760405162461bcd60e51b815260206004820152602560248201527f466f6f7462616c6c4375703a206d696e74206665652845544829206e6f7420656044820152640dcdeeaced60db1b6064820152608401610ddd565b61019354604051631696d40360e11b8152336004820152620100009091046001600160a01b031690632d2da8069083906024016000604051808303818588803b15801561329f57600080fd5b505af11580156132b3573d6000803e3d6000fd5b5050505050806101ac60008282546132cb91906152f3565b90915550503360009081526101ad60205260409020546132ec9082906152f3565b3360009081526101ad60205260409020555050565b6001600160a01b0384166133275760405162461bcd60e51b8152600401610ddd906158d3565b81518351146133485760405162461bcd60e51b8152600401610ddd906157b1565b3361335881600087878787613a57565b60005b84518110156133f4578381815181106133765761337661553b565b6020026020010151609760008784815181106133945761339461553b565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546133dc91906152f3565b909155508190506133ec81615551565b91505061335b565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051613445929190615396565b60405180910390a461104f81600087878787613d6e565b600082815260fc60205260409020613474828261595a565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b6134a084610ebd565b6040516134ad91906149c9565b60405180910390a25050565b816001600160a01b0316836001600160a01b03160361352c5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610ddd565b6001600160a01b03838116600081815260986020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008181526101996020908152604080832080548251818502810185019093528083529192909190849084015b8282101561360c578382906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050815260200190600101906135c6565b5050825192935060009150505b818110156117be578281815181106136335761363361553b565b60200260200101516000015142108061366857508281815181106136595761365961553b565b60200260200101516020015142115b6136c05760405162461bcd60e51b8152602060048201526024808201527f466f6f7462616c6c4375703a20636f6d7065746974696f6e206973206f6e20676044820152636f696e6760e01b6064820152608401610ddd565b600101613619565b600061019554826136d99190615656565b610193546040516311f9fbc960e21b8152336004820152602481018390529192506201000090046001600160a01b0316906347e7ef2490604401600060405180830381600087803b15801561372d57600080fd5b505af1158015613741573d6000803e3d6000fd5b5050505080610196600082825461375891906152f3565b909155505033600090815261019760205260409020546137799082906152f3565b33600090815261019760205260409020555050565b6001600160a01b0384166137b45760405162461bcd60e51b8152600401610ddd906158d3565b3360006137c08561407f565b905060006137cd8561407f565b90506137de83600089858589613a57565b60008681526097602090815260408083206001600160a01b038b168452909152812080548792906138109084906152f3565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461125c836000898989896140ca565b606060006127ff83614185565b60006127ff836001600160a01b0384166141e0565b6001600160a01b0384166138b85760405162461bcd60e51b8152600401610ddd906157f9565b3360006138c48561407f565b905060006138d18561407f565b90506138e1838989858589613a57565b60008681526097602090815260408083206001600160a01b038c168452909152902054858110156139245760405162461bcd60e51b8152600401610ddd9061583e565b60008781526097602090815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906139639084906152f3565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611f2c848a8a8a8a8a6140ca565b6060609980546139d2906156f6565b80601f01602080910402602001604051908101604052809291908181526020018280546139fe906156f6565b8015613a4b5780601f10613a2057610100808354040283529160200191613a4b565b820191906000526020600020905b815481529060010190602001808311613a2e57829003601f168201915b50505050509050919050565b613a6586868686868661422f565b6001600160a01b03851660009081526101af602052604090205460ff1615613adb5760405162461bcd60e51b8152602060048201526024808201527f466f6f7462616c6c4375703a207472616e736665722066726f6d20626c6f636b6044820152631b1a5cdd60e21b6064820152608401610ddd565b825160005b818110156121a6576000858281518110613afc57613afc61553b565b602002602001015190506000858381518110613b1a57613b1a61553b565b6020026020010151905060006001600160a01b0316896001600160a01b031614158015613b475750600081115b15613c56576001600160a01b03891660009081526101a1602052604081208054839290613b75908490615675565b9091555050600082815261019e602090815260408083206001600160a01b038d16845290915281208054839290613bad908490615675565b90915550506001600160a01b03891660009081526101a160205260408120549003613bec5760016101a06000828254613be69190615675565b90915550505b600082815261019e602090815260408083206001600160a01b038d1684529091528120549003613c5657600082815261019d60205260408120805460019290613c36908490615675565b9091555050600082815261019f60205260409020613c54908a6143a8565b505b6001600160a01b03881615801590613c6e5750600081115b15613d64576001600160a01b03881660008181526101a160208181526040808420805488865261019e845282862096865295835290842054929091529091849190613cb983866152f3565b9091555050600084815261019e602090815260408083206001600160a01b038e16845290915281208054859290613cf19084906152f3565b90915550506000829003613d195760016101a06000828254613d1391906152f3565b90915550505b80600003613d6157600084815261019d60205260408120805460019290613d419084906152f3565b9091555050600084815261019f60205260409020613d5f908b61387d565b505b50505b5050600101613ae0565b6001600160a01b0384163b15610fb15760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613db29089908990889088908890600401615a19565b6020604051808303816000875af1925050508015613ded575060408051601f3d908101601f19168201909252613dea91810190615a77565b60015b613e9957613df9615a94565b806308c379a003613e325750613e0d615aaf565b80613e185750613e34565b8060405162461bcd60e51b8152600401610ddd91906149c9565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610ddd565b6001600160e01b0319811663bc197c8160e01b1461125c5760405162461bcd60e51b8152600401610ddd90615b38565b6001600160a01b0381163b613f365760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401610ddd565b600080516020615c0e83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b613f6e836143bd565b600082511180613f7b5750805b15611261576117be83836143fd565b600054610100900460ff16613fb15760405162461bcd60e51b8152600401610ddd90615888565b61132c816144f1565b600054610100900460ff16613fe15760405162461bcd60e51b8152600401610ddd90615888565b611e2433612f01565b600054610100900460ff166140115760405162461bcd60e51b8152600401610ddd90615888565b60408051602081019091526000815260fb9061132c908261595a565b60008260000182815481106140445761404461553b565b9060005260206000200154905092915050565b6000806000614068878787876144fd565b91509150614075816145ea565b5095945050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106140b9576140b961553b565b602090810291909101015292915050565b6001600160a01b0384163b15610fb15760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061410e9089908990889088908890600401615b80565b6020604051808303816000875af1925050508015614149575060408051601f3d908101601f1916820190925261414691810190615a77565b60015b61415557613df9615a94565b6001600160e01b0319811663f23a6e6160e01b1461125c5760405162461bcd60e51b8152600401610ddd90615b38565b606081600001805480602002602001604051908101604052809291908181526020018280548015613a4b57602002820191906000526020600020905b8154815260200190600101908083116141c15750505050509050919050565b600081815260018301602052604081205461422757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610e0b565b506000610e0b565b6001600160a01b0385166142b65760005b83518110156142b45782818151811061425b5761425b61553b565b602002602001015160c960008684815181106142795761427961553b565b60200260200101518152602001908152602001600020600082825461429e91906152f3565b909155506142ad905081615551565b9050614240565b505b6001600160a01b038416610fb15760005b835181101561125c5760008482815181106142e4576142e461553b565b6020026020010151905060008483815181106143025761430261553b565b60200260200101519050600060c96000848152602001908152602001600020549050818110156143855760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610ddd565b600092835260c96020526040909220910390556143a181615551565b90506142c7565b60006127ff836001600160a01b0384166147a0565b6143c681613ec9565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6144655760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610ddd565b600080846001600160a01b0316846040516144809190615bc5565b600060405180830381855af49150503d80600081146144bb576040519150601f19603f3d011682016040523d82523d6000602084013e6144c0565b606091505b50915091506144e88282604051806060016040528060278152602001615c2e60279139614893565b95945050505050565b6099611263828261595a565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561453457506000905060036145e1565b8460ff16601b1415801561454c57508460ff16601c14155b1561455d57506000905060046145e1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156145b1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166145da576000600192509250506145e1565b9150600090505b94509492505050565b60008160048111156145fe576145fe615be1565b036146065750565b600181600481111561461a5761461a615be1565b036146675760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610ddd565b600281600481111561467b5761467b615be1565b036146c85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610ddd565b60038160048111156146dc576146dc615be1565b036147345760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610ddd565b600481600481111561474857614748615be1565b0361132c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610ddd565b600081815260018301602052604081205480156148895760006147c4600183615675565b85549091506000906147d890600190615675565b905081811461483d5760008660000182815481106147f8576147f861553b565b906000526020600020015490508087600001848154811061481b5761481b61553b565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061484e5761484e615bf7565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610e0b565b6000915050610e0b565b606083156148a25750816127ff565b8251156148b25782518084602001fd5b8160405162461bcd60e51b8152600401610ddd91906149c9565b80356001600160a01b03811681146148e357600080fd5b919050565b600080604083850312156148fb57600080fd5b614904836148cc565b946020939093013593505050565b6001600160e01b03198116811461132c57600080fd5b60006020828403121561493a57600080fd5b81356127ff81614912565b60006020828403121561495757600080fd5b6127ff826148cc565b60006020828403121561497257600080fd5b5035919050565b60005b8381101561499457818101518382015260200161497c565b50506000910152565b600081518084526149b5816020860160208601614979565b601f01601f19169290920160200192915050565b6020815260006127ff602083018461499d565b600080604083850312156149ef57600080fd5b50508035926020909101359150565b803580151581146148e357600080fd5b600060208284031215614a2057600080fd5b6127ff826149fe565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715614a6457614a64614a29565b6040525050565b60006001600160401b03821115614a8457614a84614a29565b5060051b60200190565b600082601f830112614a9f57600080fd5b81356020614aac82614a6b565b604051614ab98282614a3f565b83815260059390931b8501820192828101915086841115614ad957600080fd5b8286015b84811015614af45780358352918301918301614add565b509695505050505050565b60006001600160401b03831115614b1857614b18614a29565b604051614b2f601f8501601f191660200182614a3f565b809150838152848484011115614b4457600080fd5b83836020830137600060208583010152509392505050565b600082601f830112614b6d57600080fd5b6127ff83833560208501614aff565b600080600080600060a08688031215614b9457600080fd5b614b9d866148cc565b9450614bab602087016148cc565b935060408601356001600160401b0380821115614bc757600080fd5b614bd389838a01614a8e565b94506060880135915080821115614be957600080fd5b614bf589838a01614a8e565b93506080880135915080821115614c0b57600080fd5b50614c1888828901614b5c565b9150509295509295909350565b60008060408385031215614c3857600080fd5b82356001600160401b0380821115614c4f57600080fd5b614c5b86838701614a8e565b93506020850135915080821115614c7157600080fd5b50614c7e85828601614a8e565b9150509250929050565b60008060408385031215614c9b57600080fd5b823591506020808401356001600160401b03811115614cb957600080fd5b8401601f81018613614cca57600080fd5b8035614cd581614a6b565b604051614ce28282614a3f565b82815260059290921b8301840191848101915088831115614d0257600080fd5b928401925b82841015614d2057833582529284019290840190614d07565b80955050505050509250929050565b60008060408385031215614d4257600080fd5b614d4b836148cc565b9150614d59602084016148cc565b90509250929050565b60008060408385031215614d7557600080fd5b82356001600160401b0380821115614d8c57600080fd5b818501915085601f830112614da057600080fd5b81356020614dad82614a6b565b604051614dba8282614a3f565b83815260059390931b8501820192828101915089841115614dda57600080fd5b948201945b83861015614dff57614df0866148cc565b82529482019490820190614ddf565b96505086013592505080821115614c7157600080fd5b600081518084526020808501945080840160005b83811015614e4557815187529582019590820190600101614e29565b509495945050505050565b6020815260006127ff6020830184614e15565b60008060408385031215614e7657600080fd5b614e7f836148cc565b915060208301356001600160401b03811115614e9a57600080fd5b614c7e85828601614b5c565b600080600060608486031215614ebb57600080fd5b505081359360208301359350604090920135919050565b600081518084526020808501945080840160005b83811015614e455781516001600160a01b031687529582019590820190600101614ee6565b606081526000614f1e6060830186614ed2565b8281036020840152614f308186614e15565b915050826040830152949350505050565b803560ff811681146148e357600080fd5b60008060008060008060c08789031215614f6b57600080fd5b86356001600160401b0380821115614f8257600080fd5b614f8e8a838b01614a8e565b97506020890135915080821115614fa457600080fd5b50614fb189828a01614a8e565b95505060408701359350614fc760608801614f41565b92506080870135915060a087013590509295509295509295565b60008060408385031215614ff457600080fd5b8235915060208301356001600160401b0381111561501157600080fd5b8301601f8101851361502257600080fd5b614c7e85823560208401614aff565b6000806040838503121561504457600080fd5b61504d836148cc565b9150614d59602084016149fe565b600080600080600080600060e0888a03121561507657600080fd5b61507f886148cc565b96506020880135955060408801359450606088013593506150a260808901614f41565b925060a0880135915060c0880135905092959891949750929550565b600080600080600080600060e0888a0312156150d957600080fd5b6150e2886148cc565b965060208801356001600160401b03808211156150fe57600080fd5b61510a8b838c01614a8e565b975060408a013591508082111561512057600080fd5b5061512d8a828b01614a8e565b955050606088013593506150a260808901614f41565b6020815260006127ff6020830184614ed2565b600080828403606081121561516a57600080fd5b833592506040601f198201121561518057600080fd5b50604051604081018181106001600160401b03821117156151a3576151a3614a29565b60409081526020858101358352940135938101939093525092909150565b600080600080600060a086880312156151d957600080fd5b6151e2866148cc565b94506151f0602087016148cc565b9350604086013592506060860135915060808601356001600160401b0381111561521957600080fd5b614c1888828901614b5c565b60008060006040848603121561523a57600080fd5b83356001600160401b038082111561525157600080fd5b818601915086601f83011261526557600080fd5b81358181111561527457600080fd5b8760208260051b850101111561528957600080fd5b60209283019550935061529f91860190506149fe565b90509250925092565b6020808252818101527f466f6f7462616c6c4375703a206f6e6c792061646d696e206f72206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610e0b57610e0b6152dd565b60208082526021908201527f466f6f7462616c6c4375703a206f6e6c792061646d696e206f722073657276656040820152603960f91b606082015260800190565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b6040815260006153a96040830185614e15565b82810360208401526144e88185614e15565b600080604083850312156153ce57600080fd5b505080516020909101519092909150565b6001600160a01b038416815260208082018490526060604083018190528351908301819052600091848101916080850190845b8181101561542e57845183529383019391830191600101615412565b509098975050505050505050565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60006020828403121561553457600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600060018201615563576155636152dd565b5060010190565b60208082526023908201527f466f6f7462616c6c4375703a20636c61696d206973206e6f74206163746976616040820152621d195960ea1b606082015260800190565b6000826155ca57634e487b7160e01b600052601260045260246000fd5b500490565b60208082526027908201527f466f6f7462616c6c4375703a20746f6b656e206964206f7574206f662072616e60408201526633b2901896999960c91b606082015260800190565b6001600160a01b038416815260606020820181905260009061563a90830185614e15565b828103604084015261564c8185614e15565b9695505050505050565b6000816000190483118215151615615670576156706152dd565b500290565b81810381811115610e0b57610e0b6152dd565b6020808252601b908201527f466f6f7462616c6c4375703a206d696e74206e6f742073746172740000000000604082015260600190565b6020808252601d908201527f466f6f7462616c6c4375703a206d696e7420737461676520656e646564000000604082015260600190565b600181811c9082168061570a57607f821691505b602082108103610f0757634e487b7160e01b600052602260045260246000fd5b6000808454615738816156f6565b60018281168015615750576001811461576557615794565b60ff1984168752821515830287019450615794565b8860005260208060002060005b8581101561578b5781548a820152908401908201615772565b50505082870194505b5050505083516157a8818360208801614979565b01949350505050565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b601f82111561126157600081815260208120601f850160051c8101602086101561593b5750805b601f850160051c820191505b81811015610fb157828155600101615947565b81516001600160401b0381111561597357615973614a29565b6159878161598184546156f6565b84615914565b602080601f8311600181146159bc57600084156159a45750858301515b600019600386901b1c1916600185901b178555610fb1565b600085815260208120601f198616915b828110156159eb578886015182559484019460019091019084016159cc565b5085821015615a095787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b0386811682528516602082015260a060408201819052600090615a4590830186614e15565b8281036060840152615a578186614e15565b90508281036080840152615a6b818561499d565b98975050505050505050565b600060208284031215615a8957600080fd5b81516127ff81614912565b600060033d11156118755760046000803e5060005160e01c90565b600060443d1015615abd5790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715615aec57505050505090565b8285019150815181811115615b045750505050505090565b843d8701016020828501011115615b1e5750505050505090565b615b2d60208286010187614a3f565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090615bba9083018461499d565b979650505050505050565b60008251615bd7818460208701614979565b9190910192915050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fdfe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220d70a7f0527957a566c0056c7bc7a7f95e6dccc987c0fad80a37dea806d73bacb64736f6c63430008100033

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.