GLMR Price: $0.012405 (+2.47%)

Contract

0xEF0be11FB62294af66Eede3c7cDF977b365b7C39

Overview

GLMR Balance

Moonbeam Chain LogoMoonbeam Chain LogoMoonbeam Chain Logo0 GLMR

GLMR Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Reward Gibbon146756052026-03-03 2:11:3013 days ago1772503890IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Create Player146755842026-03-03 2:09:1813 days ago1772503758IN
0xEF0be11F...b365b7C39
0 GLMR0.0052937132.75
Reward Gibbon146366412026-02-27 21:24:0016 days ago1772227440IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon146186352026-02-26 10:17:0018 days ago1772101020IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon146185962026-02-26 10:12:1218 days ago1772100732IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Create Player146185452026-02-26 10:07:0618 days ago1772100426IN
0xEF0be11F...b365b7C39
0 GLMR0.0052937132.75
Reward Gibbon146175132026-02-26 8:07:2418 days ago1772093244IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon146086562026-02-25 14:39:4218 days ago1772030382IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon146086422026-02-25 14:37:4818 days ago1772030268IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon146086182026-02-25 14:35:1218 days ago1772030112IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon146086052026-02-25 14:33:2419 days ago1772030004IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon146085952026-02-25 14:32:0619 days ago1772029926IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon145954412026-02-24 12:49:4220 days ago1771937382IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon145947102026-02-24 11:22:2420 days ago1771932144IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon145718582026-02-22 14:56:4821 days ago1771772208IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon145558792026-02-21 7:25:5423 days ago1771658754IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon145451222026-02-20 9:56:2424 days ago1771581384IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon145335402026-02-19 11:20:1825 days ago1771500018IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon145299282026-02-19 4:23:3025 days ago1771475010IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon145221442026-02-18 12:35:5426 days ago1771418154IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon144977862026-02-16 13:16:1828 days ago1771247778IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon144977702026-02-16 13:14:1828 days ago1771247658IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon144977582026-02-16 13:13:0028 days ago1771247580IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon144946212026-02-16 7:07:4828 days ago1771225668IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
Reward Gibbon144945932026-02-16 7:04:3028 days ago1771225470IN
0xEF0be11F...b365b7C39
0 GLMR0.0051553732.75
View all transactions

View more zero value Internal Transactions in Advanced View mode

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TheGreatEscape

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
No with 200 runs

Other Settings:
shanghai EvmVersion
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.2;

import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

/**************************************************
 * @title THE GREAT ESCAPE - v5 - moonbeam network
 * @author mar1dev
 * @notice TGE Game Smart Contract allowing apes to go bananas

  /~\
 C oo
 _( ^)
/   ~\
 **************************************************/

contract TheGreatEscape is Ownable(msg.sender), ReentrancyGuard {
    /// @notice address of the bananas contract
    IERC20 glmbAddress;

    /// @notice address of xcUSDC token
    IERC20 usdcAddress;

    /// @notice exchange rate: USDC amount (with 6 decimals) per 1 GLMB (with 18 decimals)
    /// @notice initial value: 20000 (0.02 * 10^6) USDC = 1 GLMB
    uint256 public usdcToGlmbRate = 20000;

    /// @notice number of blocks locked after a game
    uint256 private lockTime = 1200;

    /// @notice counter for regular games
    uint256 public gamesCounter = 0;

    /// @notice counter for lobby mode
    uint256 public trainingCounter = 0;

    /// @notice PVP match counter
    uint256 matchesCounter = 0;

    /// @notice team royalties fees for PVP
    uint256 pvpSplit = 7;

    /// @notice royalties to withdraw
    uint256 public pvpRoyalties = 0;

    /// @notice revenues to withdraw
    uint256 revenues = 0;

    /// @notice unlock price
    uint256 unlockPrice = 0.15 ether;

    /// @notice used to prevent reentrancy attacks
    bool private locked;

    /// @notice free GLMB given upon registration
    uint256 freeGlmb = 3 ether;

    /// @notice Player storage structure
    struct Player {
        /// @notice mirror address used to sign txns
        address internalAddress;
        /// @notice amount of GLMB loaded inside the game contract
        uint glmbAvailable;
        /// @notice counter for games played by this player
        uint gamesPlayed;
    }

    struct Match {
        /// @notice player who created the match
        address initiator;
        /// @notice player who joined the match
        address joiner;
        /// @notice is the match already over
        bool isOver;
        /// @notice block when the match started
        uint256 startedBlock;
        /// @notice block when the match ended
        uint256 endBlock;
        /// @notice id of the bidding price
        uint8 bid;
        /// @notice 1 (initiator) or 2 (owner) won
        uint8 winner;
    }

    /// @notice GLMJ ID -> Locked until block
    mapping(uint16 => uint256) public lockedGlmj;

    /// @notice GLMA ID -> Locked until block
    mapping(uint16 => uint256) public lockedGlma;

    /// @notice GIBBON ID -> Locked until block
    mapping(uint16 => uint256) public lockedGibbon;

    /// @notice jBoost ID -> Price
    mapping(uint8 => uint256) public jBoost;

    /// @notice Real Player Wallet -> Player Data
    mapping(address => Player) public players;

    /// @notice Internal Wallet -> Real Player Wallet
    mapping(address => address) public playersReversed;

    /// @notice Runner address -> True
    mapping(address => bool) public admins;

    /// @notice Price to level up
    mapping(uint8 => uint256) public levels;

    /// @notice PVP matches for logging
    mapping(uint256 => Match) public matches;

    /// @notice bid available for matches
    mapping(uint8 => uint256) public bids;

    /// @notice spirits type and price
    mapping(uint8 => uint256) public spirits;

    constructor() {
        // important addresses
        admins[0xbCe5F532Fdba96F131682E97ce4aFEa8b778480C] = true;
        glmbAddress = IERC20(0xD10078FDbc835726c79533a4a19db40CFAd69d7f);
        usdcAddress = IERC20(0xFFfffffF7D2B0B761Af01Ca8e25242976ac0aD7D);

        // LVL prices in GLMB
        levels[2] = 1500000000000000000;
        levels[3] = 2250000000000000000;
        levels[4] = 3000000000000000000;
        levels[5] = 4500000000000000000;
        levels[6] = 6000000000000000000;
        levels[7] = 7500000000000000000;
        levels[8] = 10500000000000000000;
        levels[9] = 12000000000000000000;
        levels[10] = 13500000000000000000;
        levels[11] = 18000000000000000000;
        levels[12] = 24000000000000000000;
        levels[13] = 30000000000000000000;
        levels[14] = 36000000000000000000;
        levels[15] = 42000000000000000000;
        levels[16] = 57000000000000000000;
        levels[17] = 78000000000000000000;
        levels[18] = 105000000000000000000;
        levels[19] = 144000000000000000000;
        levels[20] = 165000000000000000000;

        // JBOOST price in GLMB
        jBoost[1] = 2500000000000000000; // Banana bounce
        jBoost[2] = 3000000000000000000; // Ape Mana
        jBoost[3] = 4500000000000000000; // Turbo Boost
        jBoost[4] = 6000000000000000000; // Resurrection
        jBoost[5] = 6000000000000000000; // Banana Gun

        // PVP bets in GLMB
        bids[1] = 1000000000000000000;
        bids[2] = 5000000000000000000;
        bids[3] = 10000000000000000000;
    }

    // ========================================
    // Modifiers
    // ========================================

    modifier onlyAdmin() {
        address sender = msg.sender;
        require(admins[sender] == true, "Sender not authorized.");
        _;
    }

    // ========================================
    // Events
    // ========================================

    /// @notice emitted when a regular game is launched
    event EnteredGame(
        address indexed _from,
        uint indexed _id,
        uint _nftId,
        uint8 _collectionId
    );

    /// @notice emitted when a regular game is over
    event GameOver(address indexed user_address, uint256 score, uint256 timestamp);

    /// @notice emitted when someone is training
    event EnteredTraining(address indexed _from, uint indexed _id);

    /// @notice emitted when a gibbon is unlocking a level
    event LeveledUp(address indexed _from, uint8 indexed _level);

    /// @notice emitted when a player is unlocking an Ape
    event ApeUnlocked(
        address indexed _from,
        uint8 _collectionId,
        uint16 _nftId
    );

    /// @notice emitted when a player is depositing GLMB into the game
    event Deposited(address indexed user, uint256 amount);

    /// @notice emitted when a player is getting automated rewards
    event RewardedGibbon(address indexed user, uint256 amount);

    /// @notice emitted when a player is reseting its Gibbon
    event GibbonReset(address indexed user);

    /// @notice emitted when the admin withdrawn revenues
    event RevenuesWithdrawn(address indexed admin, uint256 amount);

    // ========================================
    // Public Functions
    // ========================================

    /**
     * @notice Regular enter game function using gasless mirror wallet signing.
     * @dev Need existing player + enough GLMB deposited + ownership over assets
     * @param _collectionId: type of NFT played (1 GLMA, 2 GLMJ, 3 Gibbon)
     * @param _tokenId: GLMJ id to play with
     * @param _jBoost: Jungle Booster id to play with
     */

    function enterGameGasLess(
        uint8 _collectionId,
        uint16 _tokenId,
        uint8 _jBoost
    ) public payable {
        address sender = msg.sender;
        address realPlayer = playersReversed[sender];
        uint256 playerGlmbAvailable = players[realPlayer].glmbAvailable;

        // jBoost check and deduction
        if (_jBoost > 0) {
            require(
                playerGlmbAvailable >= jBoost[_jBoost],
                "Not enough GLMB loaded in your account"
            );
            playerGlmbAvailable -= jBoost[_jBoost];
            revenues += jBoost[_jBoost];
        }

        // Call the appropriate internal function for the specified collection (GLMA, GLMJ, Gibbon)
        if (_collectionId == 1) {
            enterGLMA(realPlayer, _tokenId);
        } else if (_collectionId == 2) {
            enterGLMJ(realPlayer, _tokenId);
        } else if (_collectionId == 3) {
            enterGibbon(realPlayer, _tokenId);
        }

        // Update player's internal GLMB balance
        players[realPlayer].glmbAvailable = playerGlmbAvailable;
        gamesCounter++;
        players[realPlayer].gamesPlayed++;
    }

    /**
     * @notice Regular enter game function using gasless mirror wallet signing.
     * @dev Need existing player + enough GLMB deposited + ownership over assets
     * @param _realPlayer: EVM address of the real player entering the game.
     * @param _tokenId: GLMA token ID to play with
     */
    function enterGLMA(address _realPlayer, uint16 _tokenId) internal {
        require(
            lockedGlma[_tokenId] <= block.number,
            "Your GLMA is still locked"
        );
        lockedGlma[_tokenId] = block.number + lockTime;
        emit EnteredGame(_realPlayer, gamesCounter, _tokenId, 1);
    }

    /**
     * @notice Regular enter game function using gasless mirror wallet signing.
     * @dev Need existing player + enough GLMB deposited + ownership over assets
     * @param _realPlayer: EVM address of the real player entering the game.
     * @param _tokenId: GLMJ token ID to play with
     */
    function enterGLMJ(address _realPlayer, uint16 _tokenId) internal {
        require(
            lockedGlmj[_tokenId] <= block.number,
            "Your GLMJ is still locked"
        );
        lockedGlmj[_tokenId] = block.number + lockTime;
        emit EnteredGame(_realPlayer, gamesCounter, _tokenId, 2);
    }

    /**
     * @notice Regular enter game function using gasless mirror wallet signing.
     * @dev Need existing player + enough GLMB deposited + ownership over assets
     * @param _realPlayer: EVM address of the real player entering the game.
     * @param _tokenId: Gibbon ID to play with, computed offchain
     */
    function enterGibbon(address _realPlayer, uint16 _tokenId) internal {
        require(
            lockedGibbon[_tokenId] <= block.number,
            "Your Gibbon is still locked"
        );
        lockedGibbon[_tokenId] = block.number + lockTime;
        emit EnteredGame(_realPlayer, gamesCounter, _tokenId, 3);
    }

    /**
     * @notice Allow players to train without relaying the txn
     */
    function enterTrainingMode() public payable {
        address sender = msg.sender;
        emit EnteredTraining(sender, trainingCounter);
        trainingCounter++;
    }

    /**
     * @notice Allow players to unlock an Ape using fruits Shakes in its player wallet
     * @param _tokenId: Token ID to unlock
     * @param _collectionId: Token ID to unlock
     */
    function unlockApe(
        uint16 _tokenId,
        uint8 _collectionId
    ) public payable {
        address sender = msg.sender;
        address realPlayer = playersReversed[sender];
        require(
            players[realPlayer].glmbAvailable >= unlockPrice,
            "Not enough GLMB in your account"
        );
        players[realPlayer].glmbAvailable -= unlockPrice;
        if (_collectionId == 1) {
            lockedGlma[_tokenId] = block.number;
        } else if (_collectionId == 2) {
            lockedGlmj[_tokenId] = block.number;
        }
         else if (_collectionId == 3) {
            lockedGibbon[_tokenId] = block.number;
        }
        emit ApeUnlocked(realPlayer, _collectionId, _tokenId);
    }

    // ========================================
    // Back-End Functions
    // ========================================

    /**
     * @notice Allow player to level up its gibbon
     * @param _level: level to pass
     */
    function levelUpGibbon(
        address _player,
        uint8 _level
    ) public payable onlyOwner {
        require(
            players[_player].glmbAvailable >= levels[_level],
            "Not enough GLMB loaded in your account"
        );
        players[_player].glmbAvailable -= levels[_level];
        revenues += levels[_level];
        emit LeveledUp(_player, _level);
    }

    /**
     * @notice Let an user create a PVP match by chosing the bid amount
     * @param _initiator: player who created the match
     * @param _bid: id related to bids price (public mapping)
     */
    function createMatch(
        address _initiator,
        uint8 _bid,
        uint256 _id
    ) public payable onlyOwner {
        require(
            players[_initiator].glmbAvailable >= bids[_bid],
            "Not enough GLMB loaded in your account"
        );
        players[_initiator].glmbAvailable =
            players[_initiator].glmbAvailable -
            bids[_bid];
        matches[_id].initiator = _initiator;
        matches[_id].joiner = 0x0000000000000000000000000000000000000000;
        matches[_id].isOver = false;
        matches[_id].startedBlock = block.number;
        matches[_id].bid = _bid;
        matches[_id].winner = 0;
        matchesCounter++;
    }

    /**
     * @notice Allowing easy game tracking
     * @dev Deployer Required
     */
    function endGame(address playerAddress, uint256 score) external onlyOwner {
        emit GameOver(playerAddress, score, block.timestamp);
    }

    /**
     * @notice Let an user joins a PVP match based on its ID
     * @dev Deployer Required
     * @param _joiner: player who's joining the match
     * @param _matchId: match ID to join (to get by API fetch OR matchesCounter)
     */
    function joinMatch(
        address _joiner,
        uint256 _matchId
    ) public payable onlyOwner {
        uint8 bidId = matches[_matchId].bid;
        require(
            players[_joiner].glmbAvailable >= bids[bidId],
            "Not enough GLMB loaded in your account"
        );
        require(
            matches[_matchId].isOver == false,
            "This match is already over"
        );
        require(
            matches[_matchId].initiator != _joiner,
            "Can join't a match made by the same addy"
        );
        players[_joiner].glmbAvailable =
            players[_joiner].glmbAvailable -
            bids[bidId];
        matches[_matchId].joiner = _joiner;
    }

    /**
     * @notice Settle a game by defining the winner and dealing with bids transfer and royalties
     * @dev Deployer Required
     * @param _matchId: match to settle
     * @param _winner: 1 is initiator or 2 is joiner
     */
    function settleMatch(
        uint256 _matchId,
        uint8 _winner
    ) public payable onlyOwner {
        uint8 bidId = matches[_matchId].bid;
        uint256 bidAmount = bids[bidId];
        if (_winner == 1) {
            address winner = matches[_matchId].initiator;
            uint256 increaseAmount = (bidAmount * 2) -
                (((bidAmount * 2) * pvpSplit) / 100);
            players[winner].glmbAvailable += increaseAmount;
            matches[_matchId].winner = _winner;
            pvpRoyalties += (((bidAmount * 2) * pvpSplit) / 100);
        }
        if (_winner == 2) {
            address winner = matches[_matchId].joiner;
            uint256 increaseAmount = (bidAmount * 2) -
                (((bidAmount * 2) * pvpSplit) / 100);
            players[winner].glmbAvailable += increaseAmount;
            matches[_matchId].winner = _winner;
            pvpRoyalties += (((bidAmount * 2) * pvpSplit) / 100);
        }
        matches[_matchId].isOver = true;
        matches[_matchId].endBlock = block.number;
    }

    /**
     * @notice Cancel the games by sending back the glmb to the player wallets
     * @dev Deployer Required
     * @param _ids: matches to settle
     */
    function resolveMatches(uint256[] memory _ids) public payable onlyOwner {
        for (uint256 i = 0; i < _ids.length; i++) {
            uint8 bidId = matches[_ids[i]].bid;
            uint256 bidAmount = bids[bidId];
            address winner = matches[_ids[i]].initiator;
            players[winner].glmbAvailable += bidAmount;
            matches[_ids[i]].isOver = true;
            matches[_ids[i]].endBlock = block.number;
        }
    }

    /**
     * @notice Necessary to create the mirror wallet
     * @dev Deployer Required
     * @param _playerWallet: real EOW of user
     * @param _internalWallet: walled used to relay txns
     */
    function createPlayer(
        address _playerWallet,
        address _internalWallet
    ) public payable onlyOwner {
        require(
            players[_playerWallet].internalAddress ==
                0x0000000000000000000000000000000000000000,
            "Player already exists"
        );
        players[_playerWallet].internalAddress = _internalWallet;
        players[_playerWallet].glmbAvailable = freeGlmb;
        players[_playerWallet].gamesPlayed = 0;
        playersReversed[_internalWallet] = _playerWallet;
    }

    /**
     * @notice Variant of createPlayer function for SC migration/bulk
     * @dev Deployer Required
     * @param _playerWallet[]: real EOW of user
     * @param _internalWallet[]: walled used to relay txns
     * @param _glmbAvailable[]: glmb in the account's internal wallet
     * @param _played[]: number of previously total games played
     */
    function createPlayers(
        address[] memory _playerWallet,
        address[] memory _internalWallet,
        uint256[] memory _glmbAvailable,
        uint256[] memory _played
    ) public payable onlyOwner {
        require(
            _playerWallet.length == _internalWallet.length &&
                _internalWallet.length == _glmbAvailable.length &&
                _glmbAvailable.length == _played.length,
            "Array lengths do not match"
        );
        for (uint256 i = 0; i < _playerWallet.length; i++) {
            address playerWallet = _playerWallet[i];
            address internalWallet = _internalWallet[i];
            uint256 glmbAvailable = _glmbAvailable[i];
            uint256 played = _played[i];
            players[playerWallet] = Player({
                internalAddress: internalWallet,
                glmbAvailable: glmbAvailable,
                gamesPlayed: played
            });
            playersReversed[_internalWallet[i]] = playerWallet;
        }
    }

    /**
     * @notice Based on Moonbeam's deposit
     * @dev Deployer Required
     * @param _playerWallet: real EOW of user
     * @param _amount: amount of glmb to deposit
     */
    function addGlmb(
        address[] memory _playerWallet,
        uint256[] memory _amount
    ) public payable onlyOwner {
        for (uint256 i = 0; i < _playerWallet.length; i++) {
            players[_playerWallet[i]].glmbAvailable += _amount[i];
        }
    }

    /**
     * @notice Give automated gibbon rewards
     * @dev Offchain computation
     * @param _player: account to reward
     * @param _amount: GLMB to give, must be less than 1 GLMB
     */
    function rewardGibbon(
        address _player,
        uint256 _amount
    ) public payable onlyOwner {
        require(_amount <= 1 ether, "Something weird is happening");
        players[_player].glmbAvailable += _amount;
        emit RewardedGibbon(_player, _amount);
    }

    /**
     * @notice Unlock apes without spending Shakes
     * @dev Deployer Required
     * @param _collectionsId: 1 for GLMA, 2 for GLMJ
     * @param _tokensId: tokens ID to unlock
     */
    function unlockApes(
        uint8[] calldata _collectionsId,
        uint16[] calldata _tokensId
    ) public payable onlyOwner {
        for (uint256 i = 0; i < _collectionsId.length; i++) {
            if (_collectionsId[i] == 1) {
                lockedGlma[_tokensId[i]] = block.number;
            } else if (_collectionsId[i] == 2) {
                lockedGlmj[_tokensId[i]] = block.number;
            }
             else if (_collectionsId[i] == 3) {
                lockedGibbon[_tokensId[i]] = block.number;
            }
        }
    }

    /**
     * @notice Let an user deposit GLMB or USDC inside the SC linked to his mirror wallet
     * @param _amount: amount of tokens to deposit (GLMB if _isUSDC is false, USDC if _isUSDC is true)
     * @param _beneficiary: address to deposit tokens to
     * @param _isUSDC: true if depositing USDC, false if depositing GLMB
    */
    function depositFunds (uint256 _amount, address _beneficiary, bool _isUSDC) public nonReentrant {
        require(_amount > 0, "Amount must be greater than zero");

        uint256 glmbAmount;

        if (_isUSDC) {
            // Transfer USDC from sender to contract
            bool success = usdcAddress.transferFrom(msg.sender, address(this), _amount);
            require(success, "USDC transfer failed");

            // Convert USDC to GLMB: (USDC_amount * 10^18) / usdcToGlmbRate
            // Since USDC has 6 decimals and GLMB has 18 decimals
            glmbAmount = (_amount * 1e18) / usdcToGlmbRate;
        } else {
            // Transfer GLMB from sender to contract
            bool success = glmbAddress.transferFrom(msg.sender, address(this), _amount);
            require(success, "GLMB transfer failed");
            glmbAmount = _amount;
        }

        players[_beneficiary].glmbAvailable += glmbAmount;
        emit Deposited(_beneficiary, glmbAmount);
    }

    // ========================================
    // Admins Functions
    // ========================================

    /**
     * @notice Used by core team to withdraw rewards
     * @dev Admin required.
     * @param _token: token address to withdraw
     * @param _amount: amount of tokens to withdraw
     */
    function adminWithdraw(
        address _token,
        uint256 _amount
    ) public payable onlyAdmin {
        address payable payable_addr = payable(msg.sender);
        if (_token == address(0x0)) {
            payable_addr.transfer(_amount);
            return;
        }
        IERC20 token = IERC20(_token);
        token.transfer(msg.sender, _amount);
    }

    /**
     * @notice Withdraw consumables revenues and reset it
     * @dev Admin required.
     */

    /**
     * @notice Set the bids IDs & prices
     * @dev Admin required.
     * @param _bidId: bid ID
     * @param _price: bid price in GLMB
     */
    function setBidPrice(uint8 _bidId, uint256 _price) public onlyAdmin {
        bids[_bidId] = _price;
    }

    /**
     * @notice Set the split in % for the team
     * @dev Admin required.
     * @param _fee: bid ID
     */
    function setPvPSplit(uint8 _fee) public onlyAdmin {
        pvpSplit = _fee;
    }

    /**
     * @notice Set a new levelup price
     * @dev Admin required.
     * @param _level: level to modify
     * @param _amount: new amount
     */
    function setLevelPrice(
        uint8 _level,
        uint256 _amount
    ) public payable onlyAdmin {
        levels[_level] = _amount;
    }

    /**
     * @notice Set a wallet address to admin status.
     * Admin required.
     * @param _admin: new admin to invite
     */
    function setNewAdmin(address _admin) public onlyAdmin {
        admins[_admin] = true;
    }

    /**
     * @notice Set the regular lock time for NFTs
     * @dev Admin required.
     * @param _newLock: new lock in block number to set
     */
    function setLockTime(
        uint256 _newLock
    ) public onlyAdmin {
        lockTime = _newLock;
    }

    /**
     * @notice Set the jungle booster id & prices
     * @dev Admin required.
     * @param _boostId: jungle boost ID
     * @param _price: jungle boost price in GLMB
     */
    function setBoostPrices(uint8 _boostId, uint256 _price) public onlyAdmin {
        jBoost[_boostId] = _price;
    }

    /**
     * @notice Set the free GLMB given upon registration
     * @dev Admin required.
     * @param _amount: new amount of free glmb
     */
    function setFreeGlmb(uint256 _amount) public onlyAdmin {
        freeGlmb = _amount;
    }

    /**
     * @notice Set the unlock price
     * @dev Admin required.
     * @param _amount: new amount of free shakes given
     */
    function setUnlockPrice(uint256 _amount) public onlyAdmin {
        unlockPrice = _amount;
    }

    /**
     * @notice Set the USDC to GLMB exchange rate
     * @dev Owner required.
     * @param _rate: new exchange rate (USDC amount with 6 decimals per 1 GLMB)
     * @notice Example: 20000 = 0.02 USDC per 1 GLMB
     */
    function setUsdcToGlmbRate(uint256 _rate) public onlyOwner {
        require(_rate > 0, "Rate must be greater than zero");
        usdcToGlmbRate = _rate;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721URIStorage.sol)

pragma solidity ^0.8.20;

import {ERC721} from "../ERC721.sol";
import {Strings} from "../../../utils/Strings.sol";
import {IERC4906} from "../../../interfaces/IERC4906.sol";
import {IERC165} from "../../../interfaces/IERC165.sol";

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorage is IERC4906, ERC721 {
    using Strings for uint256;

    // Interface ID as defined in ERC-4906. This does not correspond to a traditional interface ID as ERC-4906 only
    // defines events and does not include any external function.
    bytes4 private constant ERC4906_INTERFACE_ID = bytes4(0x49064906);

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireOwned(tokenId);

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via string.concat).
        if (bytes(_tokenURI).length > 0) {
            return string.concat(base, _tokenURI);
        }

        return super.tokenURI(tokenId);
    }

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.20;

import {ERC721} from "../ERC721.sol";
import {IERC721Enumerable} from "./IERC721Enumerable.sol";
import {IERC165} from "../../../utils/introspection/ERC165.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds enumerability
 * of all the token ids in the contract as well as all token ids owned by each account.
 *
 * CAUTION: `ERC721` extensions that implement custom `balanceOf` logic, such as `ERC721Consecutive`,
 * interfere with enumerability and should not be used together with `ERC721Enumerable`.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    mapping(address owner => mapping(uint256 index => uint256)) private _ownedTokens;
    mapping(uint256 tokenId => uint256) private _ownedTokensIndex;

    uint256[] private _allTokens;
    mapping(uint256 tokenId => uint256) private _allTokensIndex;

    /**
     * @dev An `owner`'s token query was out of bounds for `index`.
     *
     * NOTE: The owner being `address(0)` indicates a global out of bounds index.
     */
    error ERC721OutOfBoundsIndex(address owner, uint256 index);

    /**
     * @dev Batch mint is not allowed.
     */
    error ERC721EnumerableForbiddenBatchMint();

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual returns (uint256) {
        if (index >= balanceOf(owner)) {
            revert ERC721OutOfBoundsIndex(owner, index);
        }
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual returns (uint256) {
        if (index >= totalSupply()) {
            revert ERC721OutOfBoundsIndex(address(0), index);
        }
        return _allTokens[index];
    }

    /**
     * @dev See {ERC721-_update}.
     */
    function _update(address to, uint256 tokenId, address auth) internal virtual override returns (address) {
        address previousOwner = super._update(to, tokenId, auth);

        if (previousOwner == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (previousOwner != to) {
            _removeTokenFromOwnerEnumeration(previousOwner, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (previousOwner != to) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }

        return previousOwner;
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = balanceOf(to) - 1;
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = balanceOf(from);
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }

    /**
     * See {ERC721-_increaseBalance}. We need that to account tokens that were minted in batch
     */
    function _increaseBalance(address account, uint128 amount) internal virtual override {
        if (amount > 0) {
            revert ERC721EnumerableForbiddenBatchMint();
        }
        super._increaseBalance(account, amount);
    }
}

File 7 of 22 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.20;

import {IERC721} from "./IERC721.sol";
import {IERC721Receiver} from "./IERC721Receiver.sol";
import {IERC721Metadata} from "./extensions/IERC721Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {Strings} from "../../utils/Strings.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";
import {IERC721Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors {
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    mapping(uint256 tokenId => address) private _owners;

    mapping(address owner => uint256) private _balances;

    mapping(uint256 tokenId => address) private _tokenApprovals;

    mapping(address owner => mapping(address operator => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual returns (uint256) {
        if (owner == address(0)) {
            revert ERC721InvalidOwner(address(0));
        }
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual returns (address) {
        return _requireOwned(tokenId);
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual returns (string memory) {
        _requireOwned(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual {
        _approve(to, tokenId, _msgSender());
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual returns (address) {
        _requireOwned(tokenId);

        return _getApproved(tokenId);
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public virtual {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists
        // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.
        address previousOwner = _update(to, tokenId, _msgSender());
        if (previousOwner != from) {
            revert ERC721IncorrectOwner(from, tokenId, previousOwner);
        }
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) public {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual {
        transferFrom(from, to, tokenId);
        _checkOnERC721Received(from, to, tokenId, data);
    }

    /**
     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
     *
     * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the
     * core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances
     * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by
     * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`.
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted.
     */
    function _getApproved(uint256 tokenId) internal view virtual returns (address) {
        return _tokenApprovals[tokenId];
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in
     * particular (ignoring whether it is owned by `owner`).
     *
     * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
     * assumption.
     */
    function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) {
        return
            spender != address(0) &&
            (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender);
    }

    /**
     * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner.
     * Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets
     * the `spender` for the specific `tokenId`.
     *
     * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
     * assumption.
     */
    function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual {
        if (!_isAuthorized(owner, spender, tokenId)) {
            if (owner == address(0)) {
                revert ERC721NonexistentToken(tokenId);
            } else {
                revert ERC721InsufficientApproval(spender, tokenId);
            }
        }
    }

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that
     * a uint256 would ever overflow from increments when these increments are bounded to uint128 values.
     *
     * WARNING: Increasing an account's balance using this function tends to be paired with an override of the
     * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership
     * remain consistent with one another.
     */
    function _increaseBalance(address account, uint128 value) internal virtual {
        unchecked {
            _balances[account] += value;
        }
    }

    /**
     * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner
     * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update.
     *
     * The `auth` argument is optional. If the value passed is non 0, then this function will check that
     * `auth` is either the owner of the token, or approved to operate on the token (by the owner).
     *
     * Emits a {Transfer} event.
     *
     * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}.
     */
    function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) {
        address from = _ownerOf(tokenId);

        // Perform (optional) operator check
        if (auth != address(0)) {
            _checkAuthorized(from, auth, tokenId);
        }

        // Execute the update
        if (from != address(0)) {
            // Clear approval. No need to re-authorize or emit the Approval event
            _approve(address(0), tokenId, address(0), false);

            unchecked {
                _balances[from] -= 1;
            }
        }

        if (to != address(0)) {
            unchecked {
                _balances[to] += 1;
            }
        }

        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        return from;
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        address previousOwner = _update(to, tokenId, address(0));
        if (previousOwner != address(0)) {
            revert ERC721InvalidSender(address(0));
        }
    }

    /**
     * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {
        _mint(to, tokenId);
        _checkOnERC721Received(address(0), to, tokenId, data);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal {
        address previousOwner = _update(address(0), tokenId, address(0));
        if (previousOwner == address(0)) {
            revert ERC721NonexistentToken(tokenId);
        }
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(address from, address to, uint256 tokenId) internal {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        address previousOwner = _update(to, tokenId, address(0));
        if (previousOwner == address(0)) {
            revert ERC721NonexistentToken(tokenId);
        } else if (previousOwner != from) {
            revert ERC721IncorrectOwner(from, tokenId, previousOwner);
        }
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients
     * are aware of the ERC721 standard to prevent tokens from being forever locked.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is like {safeTransferFrom} in the sense that it invokes
     * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `tokenId` token must exist and be owned by `from`.
     * - `to` cannot be the zero address.
     * - `from` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(address from, address to, uint256 tokenId) internal {
        _safeTransfer(from, to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {
        _transfer(from, to, tokenId);
        _checkOnERC721Received(from, to, tokenId, data);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is
     * either the owner of the token, or approved to operate on all tokens held by this owner.
     *
     * Emits an {Approval} event.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address to, uint256 tokenId, address auth) internal {
        _approve(to, tokenId, auth, true);
    }

    /**
     * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not
     * emitted in the context of transfers.
     */
    function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual {
        // Avoid reading the owner unless necessary
        if (emitEvent || auth != address(0)) {
            address owner = _requireOwned(tokenId);

            // We do not use _isAuthorized because single-token approvals should not be able to call approve
            if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) {
                revert ERC721InvalidApprover(auth);
            }

            if (emitEvent) {
                emit Approval(owner, to, tokenId);
            }
        }

        _tokenApprovals[tokenId] = to;
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Requirements:
     * - operator can't be the address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
        if (operator == address(0)) {
            revert ERC721InvalidOperator(operator);
        }
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned).
     * Returns the owner.
     *
     * Overrides to ownership logic should be done to {_ownerOf}.
     */
    function _requireOwned(uint256 tokenId) internal view returns (address) {
        address owner = _ownerOf(tokenId);
        if (owner == address(0)) {
            revert ERC721NonexistentToken(tokenId);
        }
        return owner;
    }

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the
     * recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     */
    function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private {
        if (to.code.length > 0) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                if (retval != IERC721Receiver.onERC721Received.selector) {
                    revert ERC721InvalidReceiver(to);
                }
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert ERC721InvalidReceiver(to);
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

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

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

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

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

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

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

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

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        uint256 localValue = value;
        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_DIGITS[localValue & 0xf];
            localValue >>= 4;
        }
        if (localValue != 0) {
            revert StringsInsufficientHexLength(value, length);
        }
        return string(buffer);
    }

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

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

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

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

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

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

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

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

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

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

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

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

            uint256 twos = denominator & (0 - denominator);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

File 12 of 22 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

File 13 of 22 : IERC4906.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC4906.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./IERC165.sol";
import {IERC721} from "./IERC721.sol";

/// @title EIP-721 Metadata Update Extension
interface IERC4906 is IERC165, IERC721 {
    /// @dev This event emits when the metadata of a token is changed.
    /// So that the third-party platforms such as NFT market could
    /// timely update the images and related attributes of the NFT.
    event MetadataUpdate(uint256 _tokenId);

    /// @dev This event emits when the metadata of a range of tokens is changed.
    /// So that the third-party platforms such as NFT market could
    /// timely update the images and related attributes of the NFTs.
    event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.20;

import {IERC721} from "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.20;

import {IERC721} from "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

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

File 19 of 22 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.20;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be
     * reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 22 of 22 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC721} from "../token/ERC721/IERC721.sol";

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "remappings": [],
  "evmVersion": "shanghai"
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint8","name":"_collectionId","type":"uint8"},{"indexed":false,"internalType":"uint16","name":"_nftId","type":"uint16"}],"name":"ApeUnlocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_nftId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"_collectionId","type":"uint8"}],"name":"EnteredGame","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"EnteredTraining","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user_address","type":"address"},{"indexed":false,"internalType":"uint256","name":"score","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"GameOver","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"GibbonReset","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"uint8","name":"_level","type":"uint8"}],"name":"LeveledUp","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":"admin","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RevenuesWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardedGibbon","type":"event"},{"inputs":[{"internalType":"address[]","name":"_playerWallet","type":"address[]"},{"internalType":"uint256[]","name":"_amount","type":"uint256[]"}],"name":"addGlmb","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"adminWithdraw","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"admins","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"bids","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_initiator","type":"address"},{"internalType":"uint8","name":"_bid","type":"uint8"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"createMatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_playerWallet","type":"address"},{"internalType":"address","name":"_internalWallet","type":"address"}],"name":"createPlayer","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_playerWallet","type":"address[]"},{"internalType":"address[]","name":"_internalWallet","type":"address[]"},{"internalType":"uint256[]","name":"_glmbAvailable","type":"uint256[]"},{"internalType":"uint256[]","name":"_played","type":"uint256[]"}],"name":"createPlayers","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"bool","name":"_isUSDC","type":"bool"}],"name":"depositFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"playerAddress","type":"address"},{"internalType":"uint256","name":"score","type":"uint256"}],"name":"endGame","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_collectionId","type":"uint8"},{"internalType":"uint16","name":"_tokenId","type":"uint16"},{"internalType":"uint8","name":"_jBoost","type":"uint8"}],"name":"enterGameGasLess","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"enterTrainingMode","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"gamesCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"jBoost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_joiner","type":"address"},{"internalType":"uint256","name":"_matchId","type":"uint256"}],"name":"joinMatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_player","type":"address"},{"internalType":"uint8","name":"_level","type":"uint8"}],"name":"levelUpGibbon","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"levels","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"lockedGibbon","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"lockedGlma","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"lockedGlmj","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"matches","outputs":[{"internalType":"address","name":"initiator","type":"address"},{"internalType":"address","name":"joiner","type":"address"},{"internalType":"bool","name":"isOver","type":"bool"},{"internalType":"uint256","name":"startedBlock","type":"uint256"},{"internalType":"uint256","name":"endBlock","type":"uint256"},{"internalType":"uint8","name":"bid","type":"uint8"},{"internalType":"uint8","name":"winner","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"players","outputs":[{"internalType":"address","name":"internalAddress","type":"address"},{"internalType":"uint256","name":"glmbAvailable","type":"uint256"},{"internalType":"uint256","name":"gamesPlayed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"playersReversed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pvpRoyalties","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"resolveMatches","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_player","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"rewardGibbon","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_bidId","type":"uint8"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setBidPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_boostId","type":"uint8"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setBoostPrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setFreeGlmb","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_level","type":"uint8"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setLevelPrice","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newLock","type":"uint256"}],"name":"setLockTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setNewAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_fee","type":"uint8"}],"name":"setPvPSplit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setUnlockPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setUsdcToGlmbRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_matchId","type":"uint256"},{"internalType":"uint8","name":"_winner","type":"uint8"}],"name":"settleMatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"spirits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trainingCounter","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":"uint16","name":"_tokenId","type":"uint16"},{"internalType":"uint8","name":"_collectionId","type":"uint8"}],"name":"unlockApe","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8[]","name":"_collectionsId","type":"uint8[]"},{"internalType":"uint16[]","name":"_tokensId","type":"uint16[]"}],"name":"unlockApes","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"usdcToGlmbRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

6080604052614e206004556104b06005555f6006555f6007555f60085560076009555f600a555f600b55670214e8348c4f0000600c556729a2241af62c0000600e553480156200004d575f80fd5b50335f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000c2575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620000b9919062000695565b60405180910390fd5b620000d3816200059160201b60201c565b5060018081905550600160155f73bce5f532fdba96f131682e97ce4afea8b778480c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555073d10078fdbc835726c79533a4a19db40cfad69d7f60025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555073ffffffff7d2b0b761af01ca8e25242976ac0ad7d60035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506714d1120d7b16000060165f600260ff1681526020019081526020015f2081905550671f399b1438a1000060165f600360ff1681526020019081526020015f20819055506729a2241af62c000060165f600460ff1681526020019081526020015f2081905550673e7336287142000060165f600560ff1681526020019081526020015f20819055506753444835ec58000060165f600660ff1681526020019081526020015f20819055506768155a43676e000060165f600760ff1681526020019081526020015f20819055506791b77e5e5d9a000060165f600860ff1681526020019081526020015f208190555067a688906bd8b0000060165f600960ff1681526020019081526020015f208190555067bb59a27953c6000060165f600a60ff1681526020019081526020015f208190555067f9ccd8a1c508000060165f600b60ff1681526020019081526020015f208190555068014d1120d7b160000060165f600c60ff1681526020019081526020015f20819055506801a055690d9db8000060165f600d60ff1681526020019081526020015f20819055506801f399b1438a10000060165f600e60ff1681526020019081526020015f2081905550680246ddf9797668000060165f600f60ff1681526020019081526020015f208190555068031708ae004544000060165f601060ff1681526020019081526020015f208190555068043a77aabd0078000060165f601160ff1681526020019081526020015f20819055506805b12aefafa804000060165f601260ff1681526020019081526020015f20819055506807ce66c50e2840000060165f601360ff1681526020019081526020015f20819055506808f1d5c1cae374000060165f601460ff1681526020019081526020015f20819055506722b1c8c1227a000060125f600160ff1681526020019081526020015f20819055506729a2241af62c000060125f600260ff1681526020019081526020015f2081905550673e7336287142000060125f600360ff1681526020019081526020015f20819055506753444835ec58000060125f600460ff1681526020019081526020015f20819055506753444835ec58000060125f600560ff1681526020019081526020015f2081905550670de0b6b3a764000060185f600160ff1681526020019081526020015f2081905550674563918244f4000060185f600260ff1681526020019081526020015f2081905550678ac7230489e8000060185f600360ff1681526020019081526020015f2081905550620006b0565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6200067d8262000652565b9050919050565b6200068f8162000671565b82525050565b5f602082019050620006aa5f83018462000684565b92915050565b6148df80620006be5f395ff3fe60806040526004361061025b575f3560e01c80638eb657c411610143578063c0046113116100b5578063dd589ace11610079578063dd589ace1461082f578063dda0200e14610859578063e2eb41ff14610875578063e8d74909146108b3578063f2fde38b146108db578063f7ac2e1f146109035761025b565b8063c004611314610777578063c076cb09146107b3578063cce92962146107cf578063d49cecc0146107f7578063d7741631146108135761025b565b8063a09d0dce11610107578063a09d0dce14610689578063ab747b64146106a5578063ae04d45d146106cd578063b1234245146106f5578063b15a2fbc14610731578063b27c9ea11461074d5761025b565b80638eb657c4146105d15780638eec99c8146105ed578063906cbf5714610615578063921237a414610651578063996e78f31461066d5761025b565b806348aff67b116101dc578063715018a6116101a0578063715018a6146104e957806371a24df3146104ff578063791d509f1461051b5780637e00a29f1461055757806387a5978f1461057f5780638da5cb5b146105a75761025b565b806348aff67b146104495780634fc87970146104715780635744197b146104995780635eb6a78f146104a357806361415e29146104cd5761025b565b80632b2dc2e1116102235780632b2dc2e11461035757806335b5e52314610393578063401d4482146103af578063429b62e5146103cb5780634768d4ef146104075761025b565b80630530ac0b1461025f5780630f68a3f31461028757806312a499d8146102a357806323305a72146102df578063290fd99c1461031b575b5f80fd5b34801561026a575f80fd5b50610285600480360381019061028091906133d8565b61092d565b005b6102a1600480360381019061029c919061345d565b6109cf565b005b3480156102ae575f80fd5b506102c960048036038101906102c4919061349b565b610b58565b6040516102d691906134d5565b60405180910390f35b3480156102ea575f80fd5b5061030560048036038101906103009190613525565b610b88565b6040516103129190613568565b60405180910390f35b348015610326575f80fd5b50610341600480360381019061033c91906133d8565b610b9d565b60405161034e9190613568565b60405180910390f35b348015610362575f80fd5b5061037d60048036038101906103789190613525565b610bb2565b60405161038a9190613568565b60405180910390f35b6103ad60048036038101906103a891906135ab565b610bc7565b005b6103c960048036038101906103c491906135ab565b610e92565b005b3480156103d6575f80fd5b506103f160048036038101906103ec919061349b565b61102f565b6040516103fe9190613603565b60405180910390f35b348015610412575f80fd5b5061042d6004803603810190610428919061361c565b61104c565b6040516104409796959493929190613656565b60405180910390f35b348015610454575f80fd5b5061046f600480360381019061046a91906136c3565b6110ee565b005b34801561047c575f80fd5b506104976004803603810190610492919061372b565b6111a3565b005b6104a1611496565b005b3480156104ae575f80fd5b506104b76114fa565b6040516104c49190613568565b60405180910390f35b6104e760048036038101906104e29190613831565b611500565b005b3480156104f4575f80fd5b506104fd6116a1565b005b610519600480360381019061051491906138af565b6116b4565b005b348015610526575f80fd5b50610541600480360381019061053c9190613525565b6118d3565b60405161054e9190613568565b60405180910390f35b348015610562575f80fd5b5061057d600480360381019061057891906136c3565b6118e8565b005b34801561058a575f80fd5b506105a560048036038101906105a0919061361c565b61199d565b005b3480156105b2575f80fd5b506105bb6119f1565b6040516105c891906134d5565b60405180910390f35b6105eb60048036038101906105e691906136c3565b611a18565b005b3480156105f8575f80fd5b50610613600480360381019061060e919061349b565b611acd565b005b348015610620575f80fd5b5061063b600480360381019061063691906133d8565b611bba565b6040516106489190613568565b60405180910390f35b61066b600480360381019061066691906138ed565b611bcf565b005b6106876004803603810190610682919061392b565b611e2b565b005b6106a3600480360381019061069e919061397b565b612092565b005b3480156106b0575f80fd5b506106cb60048036038101906106c691906135ab565b6123ae565b005b3480156106d8575f80fd5b506106f360048036038101906106ee919061361c565b61240a565b005b348015610700575f80fd5b5061071b600480360381019061071691906133d8565b6124a9565b6040516107289190613568565b60405180910390f35b61074b600480360381019061074691906135ab565b6124be565b005b348015610758575f80fd5b506107616125b9565b60405161076e9190613568565b60405180910390f35b348015610782575f80fd5b5061079d600480360381019061079891906133d8565b6125bf565b6040516107aa9190613568565b60405180910390f35b6107cd60048036038101906107c89190613bc1565b6125d4565b005b3480156107da575f80fd5b506107f560048036038101906107f0919061361c565b612689565b005b610811600480360381019061080c9190613c37565b612728565b005b61082d60048036038101906108289190613c87565b6129ce565b005b34801561083a575f80fd5b50610843612c33565b6040516108509190613568565b60405180910390f35b610873600480360381019061086e9190613d5b565b612c39565b005b348015610880575f80fd5b5061089b6004803603810190610896919061349b565b612ddf565b6040516108aa93929190613da2565b60405180910390f35b3480156108be575f80fd5b506108d960048036038101906108d4919061361c565b612e24565b005b3480156108e6575f80fd5b5061090160048036038101906108fc919061349b565b612ec3565b005b34801561090e575f80fd5b50610917612f47565b6040516109249190613568565b60405180910390f35b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff161515146109c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b890613e31565b60405180910390fd5b8160ff166009819055505050565b6109d7612f4d565b60165f8260ff1660ff1681526020019081526020015f205460135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101541015610a71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6890613ebf565b60405180910390fd5b60165f8260ff1660ff1681526020019081526020015f205460135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f828254610ad79190613f0a565b9250508190555060165f8260ff1660ff1681526020019081526020015f2054600b5f828254610b069190613f3d565b925050819055508060ff168273ffffffffffffffffffffffffffffffffffffffff167f61424db07817544e22ef64ffe10fa04fdc3d3533bb5fe1d71a13b26661a9938f60405160405180910390a35050565b6014602052805f5260405f205f915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600f602052805f5260405f205f915090505481565b6019602052805f5260405f205f915090505481565b6011602052805f5260405f205f915090505481565b610bcf612f4d565b5f60175f8381526020019081526020015f206004015f9054906101000a900460ff16905060185f8260ff1660ff1681526020019081526020015f205460135f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101541015610c8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8490613ebf565b60405180910390fd5b5f151560175f8481526020019081526020015f2060010160149054906101000a900460ff16151514610cf4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ceb90613fba565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1660175f8481526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610d94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8b90614048565b60405180910390fd5b60185f8260ff1660ff1681526020019081526020015f205460135f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2060010154610df79190613f0a565b60135f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101819055508260175f8481526020019081526020015f206001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16151514610f26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1d90613e31565b60405180910390fd5b5f3390505f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610fa7578073ffffffffffffffffffffffffffffffffffffffff166108fc8490811502906040515f60405180830381858888f19350505050158015610fa0573d5f803e3d5ffd5b505061102a565b5f8490508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33866040518363ffffffff1660e01b8152600401610fe6929190614066565b6020604051808303815f875af1158015611002573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061102691906140a1565b5050505b505050565b6015602052805f5260405f205f915054906101000a900460ff1681565b6017602052805f5260405f205f91509050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160149054906101000a900460ff1690806002015490806003015490806004015f9054906101000a900460ff16908060040160019054906101000a900460ff16905087565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16151514611182576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117990613e31565b60405180910390fd5b8160125f8560ff1660ff1681526020019081526020015f2081905550505050565b6111ab612fd4565b5f83116111ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e490614116565b60405180910390fd5b5f81156112fe575f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330886040518463ffffffff1660e01b815260040161125393929190614134565b6020604051808303815f875af115801561126f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061129391906140a1565b9050806112d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112cc906141b3565b60405180910390fd5b600454670de0b6b3a7640000866112ec91906141d1565b6112f6919061423f565b9150506113e4565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330886040518463ffffffff1660e01b815260040161135d93929190614134565b6020604051808303815f875af1158015611379573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061139d91906140a1565b9050806113df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d6906142b9565b60405180910390fd5b849150505b8060135f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f8282546114339190613f3d565b925050819055508273ffffffffffffffffffffffffffffffffffffffff167f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4826040516114809190613568565b60405180910390a250611491613023565b505050565b5f3390506007548173ffffffffffffffffffffffffffffffffffffffff167fde9188e054872a979b232ba8dd40a6a0f8c2614060b9de8b5727d6009f2e397c60405160405180910390a360075f8154809291906114f2906142d7565b919050555050565b60065481565b611508612f4d565b5f5b8484905081101561169a57600185858381811061152a5761152961431e565b5b905060200201602081019061153f91906133d8565b60ff1603611591574360105f85858581811061155e5761155d61431e565b5b90506020020160208101906115739190613525565b61ffff1661ffff1681526020019081526020015f2081905550611687565b60028585838181106115a6576115a561431e565b5b90506020020160208101906115bb91906133d8565b60ff160361160d5743600f5f8585858181106115da576115d961431e565b5b90506020020160208101906115ef9190613525565b61ffff1661ffff1681526020019081526020015f2081905550611686565b60038585838181106116225761162161431e565b5b905060200201602081019061163791906133d8565b60ff1603611685574360115f8585858181106116565761165561431e565b5b905060200201602081019061166b9190613525565b61ffff1661ffff1681526020019081526020015f20819055505b5b5b8080611692906142d7565b91505061150a565b5050505050565b6116a9612f4d565b6116b25f61302c565b565b5f3390505f60145f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600c5460135f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2060010154101561179d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161179490614395565b60405180910390fd5b600c5460135f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f8282546117ee9190613f0a565b9250508190555060018360ff1603611823574360105f8661ffff1661ffff1681526020019081526020015f208190555061187d565b60028360ff16036118515743600f5f8661ffff1661ffff1681526020019081526020015f208190555061187c565b60038360ff160361187b574360115f8661ffff1661ffff1681526020019081526020015f20819055505b5b5b8073ffffffffffffffffffffffffffffffffffffffff167f96328c3ad43335b052400004d145d842e2e179684aa2998577d983987bacd9a184866040516118c59291906143c2565b60405180910390a250505050565b6010602052805f5260405f205f915090505481565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1615151461197c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197390613e31565b60405180910390fd5b8160185f8560ff1660ff1681526020019081526020015f2081905550505050565b6119a5612f4d565b5f81116119e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119de90614433565b60405180910390fd5b8060048190555050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16151514611aac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa390613e31565b60405180910390fd5b8160165f8560ff1660ff1681526020019081526020015f2081905550505050565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16151514611b61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5890613e31565b60405180910390fd5b600160155f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505050565b6016602052805f5260405f205f915090505481565b611bd7612f4d565b5f73ffffffffffffffffffffffffffffffffffffffff1660135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ca3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c9a9061449b565b60405180910390fd5b8060135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e5460135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101819055505f60135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600201819055508160145f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b5f3390505f60145f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f60135f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015490505f8460ff161115611f8d5760125f8560ff1660ff1681526020019081526020015f2054811015611f38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f2f90613ebf565b60405180910390fd5b60125f8560ff1660ff1681526020019081526020015f205481611f5b9190613f0a565b905060125f8560ff1660ff1681526020019081526020015f2054600b5f828254611f859190613f3d565b925050819055505b60018660ff1603611fa757611fa282866130ed565b611fd9565b60028660ff1603611fc157611fbc82866131cc565b611fd8565b60038660ff1603611fd757611fd682866132ab565b5b5b5b8060135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001018190555060065f815480929190612030906142d7565b919050555060135f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206002015f815480929190612085906142d7565b9190505550505050505050565b61209a612f4d565b5f60175f8481526020019081526020015f206004015f9054906101000a900460ff1690505f60185f8360ff1660ff1681526020019081526020015f2054905060018360ff160361221d575f60175f8681526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f606460095460028561212d91906141d1565b61213791906141d1565b612141919061423f565b60028461214e91906141d1565b6121589190613f0a565b90508060135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f8282546121a99190613f3d565b925050819055508460175f8881526020019081526020015f2060040160016101000a81548160ff021916908360ff16021790555060646009546002856121ef91906141d1565b6121f991906141d1565b612203919061423f565b600a5f8282546122139190613f3d565b9250508190555050505b60028360ff1603612362575f60175f8681526020019081526020015f206001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f606460095460028561227291906141d1565b61227c91906141d1565b612286919061423f565b60028461229391906141d1565b61229d9190613f0a565b90508060135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f8282546122ee9190613f3d565b925050819055508460175f8881526020019081526020015f2060040160016101000a81548160ff021916908360ff160217905550606460095460028561233491906141d1565b61233e91906141d1565b612348919061423f565b600a5f8282546123589190613f3d565b9250508190555050505b600160175f8681526020019081526020015f2060010160146101000a81548160ff0219169083151502179055504360175f8681526020019081526020015f206003018190555050505050565b6123b6612f4d565b8173ffffffffffffffffffffffffffffffffffffffff167f1b50c41f317db3fa7a72dc1c0120e446244a20ada93b3bbbe43b7197b9c68d7482426040516123fe9291906144b9565b60405180910390a25050565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1615151461249e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161249590613e31565b60405180910390fd5b816005819055505050565b6018602052805f5260405f205f915090505481565b6124c6612f4d565b670de0b6b3a7640000811115612511576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125089061452a565b60405180910390fd5b8060135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f8282546125609190613f3d565b925050819055508173ffffffffffffffffffffffffffffffffffffffff167f9a11e012fd3ef91d9217b59afc4c47576f34ad25c2b086ed33e3aabfb5a1eeec826040516125ad9190613568565b60405180910390a25050565b60045481565b6012602052805f5260405f205f915090505481565b6125dc612f4d565b5f5b8251811015612684578181815181106125fa576125f961431e565b5b602002602001015160135f8584815181106126185761261761431e565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f82825461266a9190613f3d565b92505081905550808061267c906142d7565b9150506125de565b505050565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1615151461271d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161271490613e31565b60405180910390fd5b81600c819055505050565b612730612f4d565b60185f8360ff1660ff1681526020019081526020015f205460135f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015410156127ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127c190613ebf565b60405180910390fd5b60185f8360ff1660ff1681526020019081526020015f205460135f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015461282d9190613f0a565b60135f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101819055508260175f8381526020019081526020015f205f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f60175f8381526020019081526020015f206001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f60175f8381526020019081526020015f2060010160146101000a81548160ff0219169083151502179055504360175f8381526020019081526020015f20600201819055508160175f8381526020019081526020015f206004015f6101000a81548160ff021916908360ff1602179055505f60175f8381526020019081526020015f2060040160016101000a81548160ff021916908360ff16021790555060085f8154809291906129c4906142d7565b9190505550505050565b6129d6612f4d565b825184511480156129e8575081518351145b80156129f5575080518251145b612a34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2b90614592565b60405180910390fd5b5f5b8451811015612c2c575f858281518110612a5357612a5261431e565b5b602002602001015190505f858381518110612a7157612a7061431e565b5b602002602001015190505f858481518110612a8f57612a8e61431e565b5b602002602001015190505f858581518110612aad57612aac61431e565b5b6020026020010151905060405180606001604052808473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281525060135f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155604082015181600201559050508360145f8a8881518110612b9757612b9661431e565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050508080612c24906142d7565b915050612a36565b5050505050565b600a5481565b612c41612f4d565b5f5b8151811015612ddb575f60175f848481518110612c6357612c6261431e565b5b602002602001015181526020019081526020015f206004015f9054906101000a900460ff1690505f60185f8360ff1660ff1681526020019081526020015f205490505f60175f868681518110612cbc57612cbb61431e565b5b602002602001015181526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160135f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f828254612d449190613f3d565b92505081905550600160175f878781518110612d6357612d6261431e565b5b602002602001015181526020019081526020015f2060010160146101000a81548160ff0219169083151502179055504360175f878781518110612da957612da861431e565b5b602002602001015181526020019081526020015f20600301819055505050508080612dd3906142d7565b915050612c43565b5050565b6013602052805f5260405f205f91509050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154905083565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16151514612eb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612eaf90613e31565b60405180910390fd5b81600e819055505050565b612ecb612f4d565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612f3b575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401612f3291906134d5565b60405180910390fd5b612f448161302c565b50565b60075481565b612f5561338a565b73ffffffffffffffffffffffffffffffffffffffff16612f736119f1565b73ffffffffffffffffffffffffffffffffffffffff1614612fd257612f9661338a565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401612fc991906134d5565b60405180910390fd5b565b600260015403613019576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613010906145fa565b60405180910390fd5b6002600181905550565b60018081905550565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b4360105f8361ffff1661ffff1681526020019081526020015f20541115613149576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161314090614662565b60405180910390fd5b600554436131579190613f3d565b60105f8361ffff1661ffff1681526020019081526020015f20819055506006548273ffffffffffffffffffffffffffffffffffffffff167fd27acd4879f5800fa302ee184ba9cd71cbcc0b0b24a6b4d8f3eac17e5ed75df38360016040516131c09291906146f2565b60405180910390a35050565b43600f5f8361ffff1661ffff1681526020019081526020015f20541115613228576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161321f90614763565b60405180910390fd5b600554436132369190613f3d565b600f5f8361ffff1661ffff1681526020019081526020015f20819055506006548273ffffffffffffffffffffffffffffffffffffffff167fd27acd4879f5800fa302ee184ba9cd71cbcc0b0b24a6b4d8f3eac17e5ed75df383600260405161329f9291906147ba565b60405180910390a35050565b4360115f8361ffff1661ffff1681526020019081526020015f20541115613307576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132fe9061482b565b60405180910390fd5b600554436133159190613f3d565b60115f8361ffff1661ffff1681526020019081526020015f20819055506006548273ffffffffffffffffffffffffffffffffffffffff167fd27acd4879f5800fa302ee184ba9cd71cbcc0b0b24a6b4d8f3eac17e5ed75df383600360405161337e929190614882565b60405180910390a35050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f60ff82169050919050565b6133b7816133a2565b81146133c1575f80fd5b50565b5f813590506133d2816133ae565b92915050565b5f602082840312156133ed576133ec61339a565b5b5f6133fa848285016133c4565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61342c82613403565b9050919050565b61343c81613422565b8114613446575f80fd5b50565b5f8135905061345781613433565b92915050565b5f80604083850312156134735761347261339a565b5b5f61348085828601613449565b9250506020613491858286016133c4565b9150509250929050565b5f602082840312156134b0576134af61339a565b5b5f6134bd84828501613449565b91505092915050565b6134cf81613422565b82525050565b5f6020820190506134e85f8301846134c6565b92915050565b5f61ffff82169050919050565b613504816134ee565b811461350e575f80fd5b50565b5f8135905061351f816134fb565b92915050565b5f6020828403121561353a5761353961339a565b5b5f61354784828501613511565b91505092915050565b5f819050919050565b61356281613550565b82525050565b5f60208201905061357b5f830184613559565b92915050565b61358a81613550565b8114613594575f80fd5b50565b5f813590506135a581613581565b92915050565b5f80604083850312156135c1576135c061339a565b5b5f6135ce85828601613449565b92505060206135df85828601613597565b9150509250929050565b5f8115159050919050565b6135fd816135e9565b82525050565b5f6020820190506136165f8301846135f4565b92915050565b5f602082840312156136315761363061339a565b5b5f61363e84828501613597565b91505092915050565b613650816133a2565b82525050565b5f60e0820190506136695f83018a6134c6565b61367660208301896134c6565b61368360408301886135f4565b6136906060830187613559565b61369d6080830186613559565b6136aa60a0830185613647565b6136b760c0830184613647565b98975050505050505050565b5f80604083850312156136d9576136d861339a565b5b5f6136e6858286016133c4565b92505060206136f785828601613597565b9150509250929050565b61370a816135e9565b8114613714575f80fd5b50565b5f8135905061372581613701565b92915050565b5f805f606084860312156137425761374161339a565b5b5f61374f86828701613597565b935050602061376086828701613449565b925050604061377186828701613717565b9150509250925092565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261379c5761379b61377b565b5b8235905067ffffffffffffffff8111156137b9576137b861377f565b5b6020830191508360208202830111156137d5576137d4613783565b5b9250929050565b5f8083601f8401126137f1576137f061377b565b5b8235905067ffffffffffffffff81111561380e5761380d61377f565b5b60208301915083602082028301111561382a57613829613783565b5b9250929050565b5f805f80604085870312156138495761384861339a565b5b5f85013567ffffffffffffffff8111156138665761386561339e565b5b61387287828801613787565b9450945050602085013567ffffffffffffffff8111156138955761389461339e565b5b6138a1878288016137dc565b925092505092959194509250565b5f80604083850312156138c5576138c461339a565b5b5f6138d285828601613511565b92505060206138e3858286016133c4565b9150509250929050565b5f80604083850312156139035761390261339a565b5b5f61391085828601613449565b925050602061392185828601613449565b9150509250929050565b5f805f606084860312156139425761394161339a565b5b5f61394f868287016133c4565b935050602061396086828701613511565b9250506040613971868287016133c4565b9150509250925092565b5f80604083850312156139915761399061339a565b5b5f61399e85828601613597565b92505060206139af858286016133c4565b9150509250929050565b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6139ff826139b9565b810181811067ffffffffffffffff82111715613a1e57613a1d6139c9565b5b80604052505050565b5f613a30613391565b9050613a3c82826139f6565b919050565b5f67ffffffffffffffff821115613a5b57613a5a6139c9565b5b602082029050602081019050919050565b5f613a7e613a7984613a41565b613a27565b90508083825260208201905060208402830185811115613aa157613aa0613783565b5b835b81811015613aca5780613ab68882613449565b845260208401935050602081019050613aa3565b5050509392505050565b5f82601f830112613ae857613ae761377b565b5b8135613af8848260208601613a6c565b91505092915050565b5f67ffffffffffffffff821115613b1b57613b1a6139c9565b5b602082029050602081019050919050565b5f613b3e613b3984613b01565b613a27565b90508083825260208201905060208402830185811115613b6157613b60613783565b5b835b81811015613b8a5780613b768882613597565b845260208401935050602081019050613b63565b5050509392505050565b5f82601f830112613ba857613ba761377b565b5b8135613bb8848260208601613b2c565b91505092915050565b5f8060408385031215613bd757613bd661339a565b5b5f83013567ffffffffffffffff811115613bf457613bf361339e565b5b613c0085828601613ad4565b925050602083013567ffffffffffffffff811115613c2157613c2061339e565b5b613c2d85828601613b94565b9150509250929050565b5f805f60608486031215613c4e57613c4d61339a565b5b5f613c5b86828701613449565b9350506020613c6c868287016133c4565b9250506040613c7d86828701613597565b9150509250925092565b5f805f8060808587031215613c9f57613c9e61339a565b5b5f85013567ffffffffffffffff811115613cbc57613cbb61339e565b5b613cc887828801613ad4565b945050602085013567ffffffffffffffff811115613ce957613ce861339e565b5b613cf587828801613ad4565b935050604085013567ffffffffffffffff811115613d1657613d1561339e565b5b613d2287828801613b94565b925050606085013567ffffffffffffffff811115613d4357613d4261339e565b5b613d4f87828801613b94565b91505092959194509250565b5f60208284031215613d7057613d6f61339a565b5b5f82013567ffffffffffffffff811115613d8d57613d8c61339e565b5b613d9984828501613b94565b91505092915050565b5f606082019050613db55f8301866134c6565b613dc26020830185613559565b613dcf6040830184613559565b949350505050565b5f82825260208201905092915050565b7f53656e646572206e6f7420617574686f72697a65642e000000000000000000005f82015250565b5f613e1b601683613dd7565b9150613e2682613de7565b602082019050919050565b5f6020820190508181035f830152613e4881613e0f565b9050919050565b7f4e6f7420656e6f75676820474c4d42206c6f6164656420696e20796f757220615f8201527f63636f756e740000000000000000000000000000000000000000000000000000602082015250565b5f613ea9602683613dd7565b9150613eb482613e4f565b604082019050919050565b5f6020820190508181035f830152613ed681613e9d565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f613f1482613550565b9150613f1f83613550565b9250828203905081811115613f3757613f36613edd565b5b92915050565b5f613f4782613550565b9150613f5283613550565b9250828201905080821115613f6a57613f69613edd565b5b92915050565b7f54686973206d6174636820697320616c7265616479206f7665720000000000005f82015250565b5f613fa4601a83613dd7565b9150613faf82613f70565b602082019050919050565b5f6020820190508181035f830152613fd181613f98565b9050919050565b7f43616e206a6f696e27742061206d61746368206d6164652062792074686520735f8201527f616d652061646479000000000000000000000000000000000000000000000000602082015250565b5f614032602883613dd7565b915061403d82613fd8565b604082019050919050565b5f6020820190508181035f83015261405f81614026565b9050919050565b5f6040820190506140795f8301856134c6565b6140866020830184613559565b9392505050565b5f8151905061409b81613701565b92915050565b5f602082840312156140b6576140b561339a565b5b5f6140c38482850161408d565b91505092915050565b7f416d6f756e74206d7573742062652067726561746572207468616e207a65726f5f82015250565b5f614100602083613dd7565b915061410b826140cc565b602082019050919050565b5f6020820190508181035f83015261412d816140f4565b9050919050565b5f6060820190506141475f8301866134c6565b61415460208301856134c6565b6141616040830184613559565b949350505050565b7f55534443207472616e73666572206661696c65640000000000000000000000005f82015250565b5f61419d601483613dd7565b91506141a882614169565b602082019050919050565b5f6020820190508181035f8301526141ca81614191565b9050919050565b5f6141db82613550565b91506141e683613550565b92508282026141f481613550565b9150828204841483151761420b5761420a613edd565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61424982613550565b915061425483613550565b92508261426457614263614212565b5b828204905092915050565b7f474c4d42207472616e73666572206661696c65640000000000000000000000005f82015250565b5f6142a3601483613dd7565b91506142ae8261426f565b602082019050919050565b5f6020820190508181035f8301526142d081614297565b9050919050565b5f6142e182613550565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361431357614312613edd565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e6f7420656e6f75676820474c4d4220696e20796f7572206163636f756e74005f82015250565b5f61437f601f83613dd7565b915061438a8261434b565b602082019050919050565b5f6020820190508181035f8301526143ac81614373565b9050919050565b6143bc816134ee565b82525050565b5f6040820190506143d55f830185613647565b6143e260208301846143b3565b9392505050565b7f52617465206d7573742062652067726561746572207468616e207a65726f00005f82015250565b5f61441d601e83613dd7565b9150614428826143e9565b602082019050919050565b5f6020820190508181035f83015261444a81614411565b9050919050565b7f506c6179657220616c72656164792065786973747300000000000000000000005f82015250565b5f614485601583613dd7565b915061449082614451565b602082019050919050565b5f6020820190508181035f8301526144b281614479565b9050919050565b5f6040820190506144cc5f830185613559565b6144d96020830184613559565b9392505050565b7f536f6d657468696e672077656972642069732068617070656e696e67000000005f82015250565b5f614514601c83613dd7565b915061451f826144e0565b602082019050919050565b5f6020820190508181035f83015261454181614508565b9050919050565b7f4172726179206c656e6774687320646f206e6f74206d617463680000000000005f82015250565b5f61457c601a83613dd7565b915061458782614548565b602082019050919050565b5f6020820190508181035f8301526145a981614570565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c005f82015250565b5f6145e4601f83613dd7565b91506145ef826145b0565b602082019050919050565b5f6020820190508181035f830152614611816145d8565b9050919050565b7f596f757220474c4d41206973207374696c6c206c6f636b6564000000000000005f82015250565b5f61464c601983613dd7565b915061465782614618565b602082019050919050565b5f6020820190508181035f83015261467981614640565b9050919050565b5f819050919050565b5f6146a361469e614699846134ee565b614680565b613550565b9050919050565b6146b381614689565b82525050565b5f819050919050565b5f6146dc6146d76146d2846146b9565b614680565b6133a2565b9050919050565b6146ec816146c2565b82525050565b5f6040820190506147055f8301856146aa565b61471260208301846146e3565b9392505050565b7f596f757220474c4d4a206973207374696c6c206c6f636b6564000000000000005f82015250565b5f61474d601983613dd7565b915061475882614719565b602082019050919050565b5f6020820190508181035f83015261477a81614741565b9050919050565b5f819050919050565b5f6147a461479f61479a84614781565b614680565b6133a2565b9050919050565b6147b48161478a565b82525050565b5f6040820190506147cd5f8301856146aa565b6147da60208301846147ab565b9392505050565b7f596f757220476962626f6e206973207374696c6c206c6f636b656400000000005f82015250565b5f614815601b83613dd7565b9150614820826147e1565b602082019050919050565b5f6020820190508181035f83015261484281614809565b9050919050565b5f819050919050565b5f61486c61486761486284614849565b614680565b6133a2565b9050919050565b61487c81614852565b82525050565b5f6040820190506148955f8301856146aa565b6148a26020830184614873565b939250505056fea2646970667358221220c949302f912c29c6b95d3867f20c75779df39e1d5972bde029323b78ba590bd364736f6c63430008140033

Deployed Bytecode

0x60806040526004361061025b575f3560e01c80638eb657c411610143578063c0046113116100b5578063dd589ace11610079578063dd589ace1461082f578063dda0200e14610859578063e2eb41ff14610875578063e8d74909146108b3578063f2fde38b146108db578063f7ac2e1f146109035761025b565b8063c004611314610777578063c076cb09146107b3578063cce92962146107cf578063d49cecc0146107f7578063d7741631146108135761025b565b8063a09d0dce11610107578063a09d0dce14610689578063ab747b64146106a5578063ae04d45d146106cd578063b1234245146106f5578063b15a2fbc14610731578063b27c9ea11461074d5761025b565b80638eb657c4146105d15780638eec99c8146105ed578063906cbf5714610615578063921237a414610651578063996e78f31461066d5761025b565b806348aff67b116101dc578063715018a6116101a0578063715018a6146104e957806371a24df3146104ff578063791d509f1461051b5780637e00a29f1461055757806387a5978f1461057f5780638da5cb5b146105a75761025b565b806348aff67b146104495780634fc87970146104715780635744197b146104995780635eb6a78f146104a357806361415e29146104cd5761025b565b80632b2dc2e1116102235780632b2dc2e11461035757806335b5e52314610393578063401d4482146103af578063429b62e5146103cb5780634768d4ef146104075761025b565b80630530ac0b1461025f5780630f68a3f31461028757806312a499d8146102a357806323305a72146102df578063290fd99c1461031b575b5f80fd5b34801561026a575f80fd5b50610285600480360381019061028091906133d8565b61092d565b005b6102a1600480360381019061029c919061345d565b6109cf565b005b3480156102ae575f80fd5b506102c960048036038101906102c4919061349b565b610b58565b6040516102d691906134d5565b60405180910390f35b3480156102ea575f80fd5b5061030560048036038101906103009190613525565b610b88565b6040516103129190613568565b60405180910390f35b348015610326575f80fd5b50610341600480360381019061033c91906133d8565b610b9d565b60405161034e9190613568565b60405180910390f35b348015610362575f80fd5b5061037d60048036038101906103789190613525565b610bb2565b60405161038a9190613568565b60405180910390f35b6103ad60048036038101906103a891906135ab565b610bc7565b005b6103c960048036038101906103c491906135ab565b610e92565b005b3480156103d6575f80fd5b506103f160048036038101906103ec919061349b565b61102f565b6040516103fe9190613603565b60405180910390f35b348015610412575f80fd5b5061042d6004803603810190610428919061361c565b61104c565b6040516104409796959493929190613656565b60405180910390f35b348015610454575f80fd5b5061046f600480360381019061046a91906136c3565b6110ee565b005b34801561047c575f80fd5b506104976004803603810190610492919061372b565b6111a3565b005b6104a1611496565b005b3480156104ae575f80fd5b506104b76114fa565b6040516104c49190613568565b60405180910390f35b6104e760048036038101906104e29190613831565b611500565b005b3480156104f4575f80fd5b506104fd6116a1565b005b610519600480360381019061051491906138af565b6116b4565b005b348015610526575f80fd5b50610541600480360381019061053c9190613525565b6118d3565b60405161054e9190613568565b60405180910390f35b348015610562575f80fd5b5061057d600480360381019061057891906136c3565b6118e8565b005b34801561058a575f80fd5b506105a560048036038101906105a0919061361c565b61199d565b005b3480156105b2575f80fd5b506105bb6119f1565b6040516105c891906134d5565b60405180910390f35b6105eb60048036038101906105e691906136c3565b611a18565b005b3480156105f8575f80fd5b50610613600480360381019061060e919061349b565b611acd565b005b348015610620575f80fd5b5061063b600480360381019061063691906133d8565b611bba565b6040516106489190613568565b60405180910390f35b61066b600480360381019061066691906138ed565b611bcf565b005b6106876004803603810190610682919061392b565b611e2b565b005b6106a3600480360381019061069e919061397b565b612092565b005b3480156106b0575f80fd5b506106cb60048036038101906106c691906135ab565b6123ae565b005b3480156106d8575f80fd5b506106f360048036038101906106ee919061361c565b61240a565b005b348015610700575f80fd5b5061071b600480360381019061071691906133d8565b6124a9565b6040516107289190613568565b60405180910390f35b61074b600480360381019061074691906135ab565b6124be565b005b348015610758575f80fd5b506107616125b9565b60405161076e9190613568565b60405180910390f35b348015610782575f80fd5b5061079d600480360381019061079891906133d8565b6125bf565b6040516107aa9190613568565b60405180910390f35b6107cd60048036038101906107c89190613bc1565b6125d4565b005b3480156107da575f80fd5b506107f560048036038101906107f0919061361c565b612689565b005b610811600480360381019061080c9190613c37565b612728565b005b61082d60048036038101906108289190613c87565b6129ce565b005b34801561083a575f80fd5b50610843612c33565b6040516108509190613568565b60405180910390f35b610873600480360381019061086e9190613d5b565b612c39565b005b348015610880575f80fd5b5061089b6004803603810190610896919061349b565b612ddf565b6040516108aa93929190613da2565b60405180910390f35b3480156108be575f80fd5b506108d960048036038101906108d4919061361c565b612e24565b005b3480156108e6575f80fd5b5061090160048036038101906108fc919061349b565b612ec3565b005b34801561090e575f80fd5b50610917612f47565b6040516109249190613568565b60405180910390f35b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff161515146109c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b890613e31565b60405180910390fd5b8160ff166009819055505050565b6109d7612f4d565b60165f8260ff1660ff1681526020019081526020015f205460135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101541015610a71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6890613ebf565b60405180910390fd5b60165f8260ff1660ff1681526020019081526020015f205460135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f828254610ad79190613f0a565b9250508190555060165f8260ff1660ff1681526020019081526020015f2054600b5f828254610b069190613f3d565b925050819055508060ff168273ffffffffffffffffffffffffffffffffffffffff167f61424db07817544e22ef64ffe10fa04fdc3d3533bb5fe1d71a13b26661a9938f60405160405180910390a35050565b6014602052805f5260405f205f915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600f602052805f5260405f205f915090505481565b6019602052805f5260405f205f915090505481565b6011602052805f5260405f205f915090505481565b610bcf612f4d565b5f60175f8381526020019081526020015f206004015f9054906101000a900460ff16905060185f8260ff1660ff1681526020019081526020015f205460135f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101541015610c8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8490613ebf565b60405180910390fd5b5f151560175f8481526020019081526020015f2060010160149054906101000a900460ff16151514610cf4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ceb90613fba565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1660175f8481526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610d94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8b90614048565b60405180910390fd5b60185f8260ff1660ff1681526020019081526020015f205460135f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2060010154610df79190613f0a565b60135f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101819055508260175f8481526020019081526020015f206001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16151514610f26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1d90613e31565b60405180910390fd5b5f3390505f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610fa7578073ffffffffffffffffffffffffffffffffffffffff166108fc8490811502906040515f60405180830381858888f19350505050158015610fa0573d5f803e3d5ffd5b505061102a565b5f8490508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33866040518363ffffffff1660e01b8152600401610fe6929190614066565b6020604051808303815f875af1158015611002573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061102691906140a1565b5050505b505050565b6015602052805f5260405f205f915054906101000a900460ff1681565b6017602052805f5260405f205f91509050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160149054906101000a900460ff1690806002015490806003015490806004015f9054906101000a900460ff16908060040160019054906101000a900460ff16905087565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16151514611182576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117990613e31565b60405180910390fd5b8160125f8560ff1660ff1681526020019081526020015f2081905550505050565b6111ab612fd4565b5f83116111ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e490614116565b60405180910390fd5b5f81156112fe575f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330886040518463ffffffff1660e01b815260040161125393929190614134565b6020604051808303815f875af115801561126f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061129391906140a1565b9050806112d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112cc906141b3565b60405180910390fd5b600454670de0b6b3a7640000866112ec91906141d1565b6112f6919061423f565b9150506113e4565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330886040518463ffffffff1660e01b815260040161135d93929190614134565b6020604051808303815f875af1158015611379573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061139d91906140a1565b9050806113df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d6906142b9565b60405180910390fd5b849150505b8060135f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f8282546114339190613f3d565b925050819055508273ffffffffffffffffffffffffffffffffffffffff167f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4826040516114809190613568565b60405180910390a250611491613023565b505050565b5f3390506007548173ffffffffffffffffffffffffffffffffffffffff167fde9188e054872a979b232ba8dd40a6a0f8c2614060b9de8b5727d6009f2e397c60405160405180910390a360075f8154809291906114f2906142d7565b919050555050565b60065481565b611508612f4d565b5f5b8484905081101561169a57600185858381811061152a5761152961431e565b5b905060200201602081019061153f91906133d8565b60ff1603611591574360105f85858581811061155e5761155d61431e565b5b90506020020160208101906115739190613525565b61ffff1661ffff1681526020019081526020015f2081905550611687565b60028585838181106115a6576115a561431e565b5b90506020020160208101906115bb91906133d8565b60ff160361160d5743600f5f8585858181106115da576115d961431e565b5b90506020020160208101906115ef9190613525565b61ffff1661ffff1681526020019081526020015f2081905550611686565b60038585838181106116225761162161431e565b5b905060200201602081019061163791906133d8565b60ff1603611685574360115f8585858181106116565761165561431e565b5b905060200201602081019061166b9190613525565b61ffff1661ffff1681526020019081526020015f20819055505b5b5b8080611692906142d7565b91505061150a565b5050505050565b6116a9612f4d565b6116b25f61302c565b565b5f3390505f60145f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600c5460135f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2060010154101561179d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161179490614395565b60405180910390fd5b600c5460135f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f8282546117ee9190613f0a565b9250508190555060018360ff1603611823574360105f8661ffff1661ffff1681526020019081526020015f208190555061187d565b60028360ff16036118515743600f5f8661ffff1661ffff1681526020019081526020015f208190555061187c565b60038360ff160361187b574360115f8661ffff1661ffff1681526020019081526020015f20819055505b5b5b8073ffffffffffffffffffffffffffffffffffffffff167f96328c3ad43335b052400004d145d842e2e179684aa2998577d983987bacd9a184866040516118c59291906143c2565b60405180910390a250505050565b6010602052805f5260405f205f915090505481565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1615151461197c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161197390613e31565b60405180910390fd5b8160185f8560ff1660ff1681526020019081526020015f2081905550505050565b6119a5612f4d565b5f81116119e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119de90614433565b60405180910390fd5b8060048190555050565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16151514611aac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aa390613e31565b60405180910390fd5b8160165f8560ff1660ff1681526020019081526020015f2081905550505050565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16151514611b61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5890613e31565b60405180910390fd5b600160155f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055505050565b6016602052805f5260405f205f915090505481565b611bd7612f4d565b5f73ffffffffffffffffffffffffffffffffffffffff1660135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ca3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c9a9061449b565b60405180910390fd5b8060135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e5460135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101819055505f60135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600201819055508160145f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b5f3390505f60145f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f60135f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015490505f8460ff161115611f8d5760125f8560ff1660ff1681526020019081526020015f2054811015611f38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f2f90613ebf565b60405180910390fd5b60125f8560ff1660ff1681526020019081526020015f205481611f5b9190613f0a565b905060125f8560ff1660ff1681526020019081526020015f2054600b5f828254611f859190613f3d565b925050819055505b60018660ff1603611fa757611fa282866130ed565b611fd9565b60028660ff1603611fc157611fbc82866131cc565b611fd8565b60038660ff1603611fd757611fd682866132ab565b5b5b5b8060135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001018190555060065f815480929190612030906142d7565b919050555060135f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206002015f815480929190612085906142d7565b9190505550505050505050565b61209a612f4d565b5f60175f8481526020019081526020015f206004015f9054906101000a900460ff1690505f60185f8360ff1660ff1681526020019081526020015f2054905060018360ff160361221d575f60175f8681526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f606460095460028561212d91906141d1565b61213791906141d1565b612141919061423f565b60028461214e91906141d1565b6121589190613f0a565b90508060135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f8282546121a99190613f3d565b925050819055508460175f8881526020019081526020015f2060040160016101000a81548160ff021916908360ff16021790555060646009546002856121ef91906141d1565b6121f991906141d1565b612203919061423f565b600a5f8282546122139190613f3d565b9250508190555050505b60028360ff1603612362575f60175f8681526020019081526020015f206001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f606460095460028561227291906141d1565b61227c91906141d1565b612286919061423f565b60028461229391906141d1565b61229d9190613f0a565b90508060135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f8282546122ee9190613f3d565b925050819055508460175f8881526020019081526020015f2060040160016101000a81548160ff021916908360ff160217905550606460095460028561233491906141d1565b61233e91906141d1565b612348919061423f565b600a5f8282546123589190613f3d565b9250508190555050505b600160175f8681526020019081526020015f2060010160146101000a81548160ff0219169083151502179055504360175f8681526020019081526020015f206003018190555050505050565b6123b6612f4d565b8173ffffffffffffffffffffffffffffffffffffffff167f1b50c41f317db3fa7a72dc1c0120e446244a20ada93b3bbbe43b7197b9c68d7482426040516123fe9291906144b9565b60405180910390a25050565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1615151461249e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161249590613e31565b60405180910390fd5b816005819055505050565b6018602052805f5260405f205f915090505481565b6124c6612f4d565b670de0b6b3a7640000811115612511576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125089061452a565b60405180910390fd5b8060135f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f8282546125609190613f3d565b925050819055508173ffffffffffffffffffffffffffffffffffffffff167f9a11e012fd3ef91d9217b59afc4c47576f34ad25c2b086ed33e3aabfb5a1eeec826040516125ad9190613568565b60405180910390a25050565b60045481565b6012602052805f5260405f205f915090505481565b6125dc612f4d565b5f5b8251811015612684578181815181106125fa576125f961431e565b5b602002602001015160135f8584815181106126185761261761431e565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f82825461266a9190613f3d565b92505081905550808061267c906142d7565b9150506125de565b505050565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff1615151461271d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161271490613e31565b60405180910390fd5b81600c819055505050565b612730612f4d565b60185f8360ff1660ff1681526020019081526020015f205460135f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015410156127ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127c190613ebf565b60405180910390fd5b60185f8360ff1660ff1681526020019081526020015f205460135f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015461282d9190613f0a565b60135f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101819055508260175f8381526020019081526020015f205f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f60175f8381526020019081526020015f206001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f60175f8381526020019081526020015f2060010160146101000a81548160ff0219169083151502179055504360175f8381526020019081526020015f20600201819055508160175f8381526020019081526020015f206004015f6101000a81548160ff021916908360ff1602179055505f60175f8381526020019081526020015f2060040160016101000a81548160ff021916908360ff16021790555060085f8154809291906129c4906142d7565b9190505550505050565b6129d6612f4d565b825184511480156129e8575081518351145b80156129f5575080518251145b612a34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2b90614592565b60405180910390fd5b5f5b8451811015612c2c575f858281518110612a5357612a5261431e565b5b602002602001015190505f858381518110612a7157612a7061431e565b5b602002602001015190505f858481518110612a8f57612a8e61431e565b5b602002602001015190505f858581518110612aad57612aac61431e565b5b6020026020010151905060405180606001604052808473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281525060135f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155604082015181600201559050508360145f8a8881518110612b9757612b9661431e565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050508080612c24906142d7565b915050612a36565b5050505050565b600a5481565b612c41612f4d565b5f5b8151811015612ddb575f60175f848481518110612c6357612c6261431e565b5b602002602001015181526020019081526020015f206004015f9054906101000a900460ff1690505f60185f8360ff1660ff1681526020019081526020015f205490505f60175f868681518110612cbc57612cbb61431e565b5b602002602001015181526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160135f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206001015f828254612d449190613f3d565b92505081905550600160175f878781518110612d6357612d6261431e565b5b602002602001015181526020019081526020015f2060010160146101000a81548160ff0219169083151502179055504360175f878781518110612da957612da861431e565b5b602002602001015181526020019081526020015f20600301819055505050508080612dd3906142d7565b915050612c43565b5050565b6013602052805f5260405f205f91509050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154905083565b5f3390506001151560155f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16151514612eb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612eaf90613e31565b60405180910390fd5b81600e819055505050565b612ecb612f4d565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612f3b575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401612f3291906134d5565b60405180910390fd5b612f448161302c565b50565b60075481565b612f5561338a565b73ffffffffffffffffffffffffffffffffffffffff16612f736119f1565b73ffffffffffffffffffffffffffffffffffffffff1614612fd257612f9661338a565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401612fc991906134d5565b60405180910390fd5b565b600260015403613019576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613010906145fa565b60405180910390fd5b6002600181905550565b60018081905550565b5f805f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050815f806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b4360105f8361ffff1661ffff1681526020019081526020015f20541115613149576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161314090614662565b60405180910390fd5b600554436131579190613f3d565b60105f8361ffff1661ffff1681526020019081526020015f20819055506006548273ffffffffffffffffffffffffffffffffffffffff167fd27acd4879f5800fa302ee184ba9cd71cbcc0b0b24a6b4d8f3eac17e5ed75df38360016040516131c09291906146f2565b60405180910390a35050565b43600f5f8361ffff1661ffff1681526020019081526020015f20541115613228576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161321f90614763565b60405180910390fd5b600554436132369190613f3d565b600f5f8361ffff1661ffff1681526020019081526020015f20819055506006548273ffffffffffffffffffffffffffffffffffffffff167fd27acd4879f5800fa302ee184ba9cd71cbcc0b0b24a6b4d8f3eac17e5ed75df383600260405161329f9291906147ba565b60405180910390a35050565b4360115f8361ffff1661ffff1681526020019081526020015f20541115613307576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132fe9061482b565b60405180910390fd5b600554436133159190613f3d565b60115f8361ffff1661ffff1681526020019081526020015f20819055506006548273ffffffffffffffffffffffffffffffffffffffff167fd27acd4879f5800fa302ee184ba9cd71cbcc0b0b24a6b4d8f3eac17e5ed75df383600360405161337e929190614882565b60405180910390a35050565b5f33905090565b5f604051905090565b5f80fd5b5f80fd5b5f60ff82169050919050565b6133b7816133a2565b81146133c1575f80fd5b50565b5f813590506133d2816133ae565b92915050565b5f602082840312156133ed576133ec61339a565b5b5f6133fa848285016133c4565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61342c82613403565b9050919050565b61343c81613422565b8114613446575f80fd5b50565b5f8135905061345781613433565b92915050565b5f80604083850312156134735761347261339a565b5b5f61348085828601613449565b9250506020613491858286016133c4565b9150509250929050565b5f602082840312156134b0576134af61339a565b5b5f6134bd84828501613449565b91505092915050565b6134cf81613422565b82525050565b5f6020820190506134e85f8301846134c6565b92915050565b5f61ffff82169050919050565b613504816134ee565b811461350e575f80fd5b50565b5f8135905061351f816134fb565b92915050565b5f6020828403121561353a5761353961339a565b5b5f61354784828501613511565b91505092915050565b5f819050919050565b61356281613550565b82525050565b5f60208201905061357b5f830184613559565b92915050565b61358a81613550565b8114613594575f80fd5b50565b5f813590506135a581613581565b92915050565b5f80604083850312156135c1576135c061339a565b5b5f6135ce85828601613449565b92505060206135df85828601613597565b9150509250929050565b5f8115159050919050565b6135fd816135e9565b82525050565b5f6020820190506136165f8301846135f4565b92915050565b5f602082840312156136315761363061339a565b5b5f61363e84828501613597565b91505092915050565b613650816133a2565b82525050565b5f60e0820190506136695f83018a6134c6565b61367660208301896134c6565b61368360408301886135f4565b6136906060830187613559565b61369d6080830186613559565b6136aa60a0830185613647565b6136b760c0830184613647565b98975050505050505050565b5f80604083850312156136d9576136d861339a565b5b5f6136e6858286016133c4565b92505060206136f785828601613597565b9150509250929050565b61370a816135e9565b8114613714575f80fd5b50565b5f8135905061372581613701565b92915050565b5f805f606084860312156137425761374161339a565b5b5f61374f86828701613597565b935050602061376086828701613449565b925050604061377186828701613717565b9150509250925092565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261379c5761379b61377b565b5b8235905067ffffffffffffffff8111156137b9576137b861377f565b5b6020830191508360208202830111156137d5576137d4613783565b5b9250929050565b5f8083601f8401126137f1576137f061377b565b5b8235905067ffffffffffffffff81111561380e5761380d61377f565b5b60208301915083602082028301111561382a57613829613783565b5b9250929050565b5f805f80604085870312156138495761384861339a565b5b5f85013567ffffffffffffffff8111156138665761386561339e565b5b61387287828801613787565b9450945050602085013567ffffffffffffffff8111156138955761389461339e565b5b6138a1878288016137dc565b925092505092959194509250565b5f80604083850312156138c5576138c461339a565b5b5f6138d285828601613511565b92505060206138e3858286016133c4565b9150509250929050565b5f80604083850312156139035761390261339a565b5b5f61391085828601613449565b925050602061392185828601613449565b9150509250929050565b5f805f606084860312156139425761394161339a565b5b5f61394f868287016133c4565b935050602061396086828701613511565b9250506040613971868287016133c4565b9150509250925092565b5f80604083850312156139915761399061339a565b5b5f61399e85828601613597565b92505060206139af858286016133c4565b9150509250929050565b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6139ff826139b9565b810181811067ffffffffffffffff82111715613a1e57613a1d6139c9565b5b80604052505050565b5f613a30613391565b9050613a3c82826139f6565b919050565b5f67ffffffffffffffff821115613a5b57613a5a6139c9565b5b602082029050602081019050919050565b5f613a7e613a7984613a41565b613a27565b90508083825260208201905060208402830185811115613aa157613aa0613783565b5b835b81811015613aca5780613ab68882613449565b845260208401935050602081019050613aa3565b5050509392505050565b5f82601f830112613ae857613ae761377b565b5b8135613af8848260208601613a6c565b91505092915050565b5f67ffffffffffffffff821115613b1b57613b1a6139c9565b5b602082029050602081019050919050565b5f613b3e613b3984613b01565b613a27565b90508083825260208201905060208402830185811115613b6157613b60613783565b5b835b81811015613b8a5780613b768882613597565b845260208401935050602081019050613b63565b5050509392505050565b5f82601f830112613ba857613ba761377b565b5b8135613bb8848260208601613b2c565b91505092915050565b5f8060408385031215613bd757613bd661339a565b5b5f83013567ffffffffffffffff811115613bf457613bf361339e565b5b613c0085828601613ad4565b925050602083013567ffffffffffffffff811115613c2157613c2061339e565b5b613c2d85828601613b94565b9150509250929050565b5f805f60608486031215613c4e57613c4d61339a565b5b5f613c5b86828701613449565b9350506020613c6c868287016133c4565b9250506040613c7d86828701613597565b9150509250925092565b5f805f8060808587031215613c9f57613c9e61339a565b5b5f85013567ffffffffffffffff811115613cbc57613cbb61339e565b5b613cc887828801613ad4565b945050602085013567ffffffffffffffff811115613ce957613ce861339e565b5b613cf587828801613ad4565b935050604085013567ffffffffffffffff811115613d1657613d1561339e565b5b613d2287828801613b94565b925050606085013567ffffffffffffffff811115613d4357613d4261339e565b5b613d4f87828801613b94565b91505092959194509250565b5f60208284031215613d7057613d6f61339a565b5b5f82013567ffffffffffffffff811115613d8d57613d8c61339e565b5b613d9984828501613b94565b91505092915050565b5f606082019050613db55f8301866134c6565b613dc26020830185613559565b613dcf6040830184613559565b949350505050565b5f82825260208201905092915050565b7f53656e646572206e6f7420617574686f72697a65642e000000000000000000005f82015250565b5f613e1b601683613dd7565b9150613e2682613de7565b602082019050919050565b5f6020820190508181035f830152613e4881613e0f565b9050919050565b7f4e6f7420656e6f75676820474c4d42206c6f6164656420696e20796f757220615f8201527f63636f756e740000000000000000000000000000000000000000000000000000602082015250565b5f613ea9602683613dd7565b9150613eb482613e4f565b604082019050919050565b5f6020820190508181035f830152613ed681613e9d565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f613f1482613550565b9150613f1f83613550565b9250828203905081811115613f3757613f36613edd565b5b92915050565b5f613f4782613550565b9150613f5283613550565b9250828201905080821115613f6a57613f69613edd565b5b92915050565b7f54686973206d6174636820697320616c7265616479206f7665720000000000005f82015250565b5f613fa4601a83613dd7565b9150613faf82613f70565b602082019050919050565b5f6020820190508181035f830152613fd181613f98565b9050919050565b7f43616e206a6f696e27742061206d61746368206d6164652062792074686520735f8201527f616d652061646479000000000000000000000000000000000000000000000000602082015250565b5f614032602883613dd7565b915061403d82613fd8565b604082019050919050565b5f6020820190508181035f83015261405f81614026565b9050919050565b5f6040820190506140795f8301856134c6565b6140866020830184613559565b9392505050565b5f8151905061409b81613701565b92915050565b5f602082840312156140b6576140b561339a565b5b5f6140c38482850161408d565b91505092915050565b7f416d6f756e74206d7573742062652067726561746572207468616e207a65726f5f82015250565b5f614100602083613dd7565b915061410b826140cc565b602082019050919050565b5f6020820190508181035f83015261412d816140f4565b9050919050565b5f6060820190506141475f8301866134c6565b61415460208301856134c6565b6141616040830184613559565b949350505050565b7f55534443207472616e73666572206661696c65640000000000000000000000005f82015250565b5f61419d601483613dd7565b91506141a882614169565b602082019050919050565b5f6020820190508181035f8301526141ca81614191565b9050919050565b5f6141db82613550565b91506141e683613550565b92508282026141f481613550565b9150828204841483151761420b5761420a613edd565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61424982613550565b915061425483613550565b92508261426457614263614212565b5b828204905092915050565b7f474c4d42207472616e73666572206661696c65640000000000000000000000005f82015250565b5f6142a3601483613dd7565b91506142ae8261426f565b602082019050919050565b5f6020820190508181035f8301526142d081614297565b9050919050565b5f6142e182613550565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361431357614312613edd565b5b600182019050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e6f7420656e6f75676820474c4d4220696e20796f7572206163636f756e74005f82015250565b5f61437f601f83613dd7565b915061438a8261434b565b602082019050919050565b5f6020820190508181035f8301526143ac81614373565b9050919050565b6143bc816134ee565b82525050565b5f6040820190506143d55f830185613647565b6143e260208301846143b3565b9392505050565b7f52617465206d7573742062652067726561746572207468616e207a65726f00005f82015250565b5f61441d601e83613dd7565b9150614428826143e9565b602082019050919050565b5f6020820190508181035f83015261444a81614411565b9050919050565b7f506c6179657220616c72656164792065786973747300000000000000000000005f82015250565b5f614485601583613dd7565b915061449082614451565b602082019050919050565b5f6020820190508181035f8301526144b281614479565b9050919050565b5f6040820190506144cc5f830185613559565b6144d96020830184613559565b9392505050565b7f536f6d657468696e672077656972642069732068617070656e696e67000000005f82015250565b5f614514601c83613dd7565b915061451f826144e0565b602082019050919050565b5f6020820190508181035f83015261454181614508565b9050919050565b7f4172726179206c656e6774687320646f206e6f74206d617463680000000000005f82015250565b5f61457c601a83613dd7565b915061458782614548565b602082019050919050565b5f6020820190508181035f8301526145a981614570565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c005f82015250565b5f6145e4601f83613dd7565b91506145ef826145b0565b602082019050919050565b5f6020820190508181035f830152614611816145d8565b9050919050565b7f596f757220474c4d41206973207374696c6c206c6f636b6564000000000000005f82015250565b5f61464c601983613dd7565b915061465782614618565b602082019050919050565b5f6020820190508181035f83015261467981614640565b9050919050565b5f819050919050565b5f6146a361469e614699846134ee565b614680565b613550565b9050919050565b6146b381614689565b82525050565b5f819050919050565b5f6146dc6146d76146d2846146b9565b614680565b6133a2565b9050919050565b6146ec816146c2565b82525050565b5f6040820190506147055f8301856146aa565b61471260208301846146e3565b9392505050565b7f596f757220474c4d4a206973207374696c6c206c6f636b6564000000000000005f82015250565b5f61474d601983613dd7565b915061475882614719565b602082019050919050565b5f6020820190508181035f83015261477a81614741565b9050919050565b5f819050919050565b5f6147a461479f61479a84614781565b614680565b6133a2565b9050919050565b6147b48161478a565b82525050565b5f6040820190506147cd5f8301856146aa565b6147da60208301846147ab565b9392505050565b7f596f757220476962626f6e206973207374696c6c206c6f636b656400000000005f82015250565b5f614815601b83613dd7565b9150614820826147e1565b602082019050919050565b5f6020820190508181035f83015261484281614809565b9050919050565b5f819050919050565b5f61486c61486761486284614849565b614680565b6133a2565b9050919050565b61487c81614852565b82525050565b5f6040820190506148955f8301856146aa565b6148a26020830184614873565b939250505056fea2646970667358221220c949302f912c29c6b95d3867f20c75779df39e1d5972bde029323b78ba590bd364736f6c63430008140033

Block Transaction Gas Used Reward
view all blocks collator

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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.