Contract 0xefa254e7d5b1d10434e6f9518f96b378967f0bad

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x21058e05a43c2b53498acfb1a038fec2c4f7a952d69ac072b2851e6cf4af8b150x6080604090248222022-04-01 9:20:59312 days 1 hr ago0x0724668e123a4888dfa854ce452b40d28540001d IN  Create: HideNSeek0 ETH0.047264677297 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xa6af97d478f7b8aff05ac5dd340a8490204d05b6ad5960e84c025ca3724de5e4372804752022-11-11 17:47:0587 days 17 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0xd1dda0e52473bbf1b2bd21ea5db581f69927a4f5646f67e02c812d5c340cfdf7259712212022-09-22 13:38:31137 days 21 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0xf8c29abd71c0c3e57298926461bf457d9bb2cee525e007a80f040ff6b7f98a67246339192022-09-14 17:22:09145 days 17 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0xb3aef5301eae1b5bc11913d08de99c9c5f4c188bdc601a19b071749cd3d0df76246336932022-09-14 17:19:16145 days 17 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0x181ef9b480dc813e51dd43ebd28cbdaaf579cc07a09b0c4eebf7f4a7738ba4b5239806042022-09-10 18:31:20149 days 16 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0xc88c4197718f867f0f88f88d00d5e60d826bd4d2ae2f474a702278f56009e410236020642022-09-08 14:41:24151 days 20 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0x1abf2227d399559ff186b182b67ff17439447c98609893f7ce6372e11400d384234825922022-09-08 2:18:02152 days 8 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0x9a4880f6f49bbd0256e491cb2e438c31103278d2576078dba00bc96544b117cb229257992022-09-05 8:27:06155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0x1161240d81744d891944459982b916297a141a6c531f9de421c36222b76c086b229252362022-09-05 8:24:32155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0x9666029502f9f50c1e9c1e98952336345d09cdb25f8c32d1e96829953e479124229249052022-09-05 8:23:00155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0xc2c61471a28a77d0fab5b2683fc25ff640091c59019debca400bcc41407423d6229247682022-09-05 8:22:13155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0x4596bd0470a04d2624dcc5431c525fd3e13403ba3e962188860f0ab8df013941229247232022-09-05 8:21:59155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0xe9a73d7da1f5bca943a604c52f66f4b35c8565beb9934d078c0359a6d19000f7229246332022-09-05 8:21:32155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0x75e84d63026c15a4d5e2ad0f27bd3f9f27aa1d111b3820a7f7f222c5f4fb7bfe229245192022-09-05 8:20:51155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0xb96620b0d44ca0c94fcb030ad57a2bd63c729511c33c2e7b30460ea15d737a63229244862022-09-05 8:20:42155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0xa93fbc81a63e304d05faf5fe01a067bab7d841564afa78f507c996dbe86f9c3c229244172022-09-05 8:20:20155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0x89ea3445cc3676f788980fcf0474d1641e65aead769079ada06b875b44435ec4229243822022-09-05 8:20:11155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0xd329a5a3cad04f719811f6f74271f2e8fd0282cfa0928b4750da2c964e3a67a3229243002022-09-05 8:19:47155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0x826bcf6f03125b371f02fe2be644cdfb6b23548dba8fb5784af7ea9a6d744b39229242462022-09-05 8:19:30155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0x205e0bd7dcd0851ac76835ccc06831d201163b9f0fb106c8f9d3187e66ca5a28229232792022-09-05 8:14:27155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0xa30398272ec18f42877e71c20750df4fbd000f449f9b6aa92ca3a341ce94fe20229232482022-09-05 8:14:18155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0x20aae74d5f9886e6d21bb381692ea4d4b805ae38b1f5314961e973fd8508790c229232062022-09-05 8:14:09155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0x75c1a90583489390e9c54cb0d099beb846e28c17df63523f0b6129edd66f6c24229231802022-09-05 8:14:01155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0x71e29eb791868aa3547b5498c2f8ebff0e1697357b36e54692b1eead6c41eb9d229231432022-09-05 8:13:50155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
0x14fa1624a0c24a5597c125e7343d334dcc8bec05633cd8f113294ee898424874229230612022-09-05 8:13:30155 days 2 hrs ago 0x6999af008fe1676f31091ab628933cbfca7bd6f8 0xefa254e7d5b1d10434e6f9518f96b378967f0bad0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HideNSeek

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 15 : HideNSeek.sol
// SPDX-License-Identifier: MIT LICENSE
pragma solidity >0.8.0;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./IHideNSeekV2.sol";
import "./HideNSeekGameLogicV3.sol";
import "./IBOO.sol";
import "./IPeekABoo.sol";
import "./IStakeManager.sol";
import "./ILevel.sol";

contract HideNSeek is Initializable, IHideNSeekV2, HideNSeekGameLogicV3 {
    function initialize() public initializer {
        __Ownable_init();
        GHOST_COSTS = [20 ether, 30 ether, 40 ether];
        BUSTER_COSTS = [10 ether, 20 ether, 30 ether];
        BUSTER_BONUS = [5 ether, 10 ether];
        ghostReceive = [0 ether, 5 ether, 10 ether];
    }

    modifier onlyStakedOwner(uint256 tId) {
        require(
            sm.isStaked(tId, address(this)) && sm.ownerOf(tId) == _msgSender(),
            "not staked or not owner"
        );
        _;
    }

    function stakePeekABoo(uint256[] calldata tokenIds) external {
        IStakeManager smRef = sm;

        for (uint256 i = 0; i < tokenIds.length; i++) {
            smRef.stakePABOnService(tokenIds[i], address(this), _msgSender());
        }
    }

    function unstakePeekABoo(uint256[] calldata tokenIds) external {
        IPeekABoo peekabooRef = peekaboo;
        IStakeManager smRef = sm;
        uint256 asId = 0;
        uint256 len = 0;

        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(
                smRef.ownerOf(tokenIds[i]) == _msgSender(),
                "Not your token."
            );
            smRef.unstakePeekABoo(tokenIds[i]);
            if (peekabooRef.getTokenTraits(tokenIds[i]).isGhost) {
                len = TIDtoActiveSessions[tokenIds[i]].length;
                for (uint256 j = 0; j < len; j++) {
                    asId = TIDtoActiveSessions[tokenIds[i]][0];
                    removeActiveGhostMap(tokenIds[i], asId);
                    boo.transfer(
                        TIDtoGMS[tokenIds[i]][asId].owner,
                        TIDtoGMS[tokenIds[i]][asId].balance
                    );
                    TIDtoGMS[tokenIds[i]][asId].balance = 0;
                    TIDtoGMS[tokenIds[i]][asId].active = false;
                }
            }
        }
    }

    function createGhostMaps(uint256 tId, bytes32[] calldata cmm)
        external
        onlyStakedOwner(tId)
    {
        IPeekABoo peekabooRef = peekaboo;
        IStakeManager smRef = sm;

        require(peekabooRef.getTokenTraits(tId).isGhost, "Not a ghost");
        require(
            peekabooRef.getGhostMapGridFromTokenId(tId).initialized,
            "Ghostmap is not initialized"
        );

        smRef.claimEnergy(tId);
        smRef.useEnergy(tId, cmm.length);

        uint256 difficulty = peekabooRef
            .getGhostMapGridFromTokenId(tId)
            .difficulty;
        uint256 cost = GHOST_COSTS[difficulty];
        uint256 sId;
        for (uint256 i = 0; i < cmm.length; i++) {
            sId = TIDtoNextSessionNumber[tId];
            TIDtoGMS[tId][sId].active = true;
            TIDtoGMS[tId][sId].tokenId = tId;
            TIDtoGMS[tId][sId].sessionId = sId;
            TIDtoGMS[tId][sId].difficulty = difficulty;
            TIDtoGMS[tId][sId].cost = cost;
            TIDtoGMS[tId][sId].balance = cost;
            TIDtoGMS[tId][sId].commitment = cmm[i];
            TIDtoGMS[tId][sId].owner = _msgSender();
            TIDtoNextSessionNumber[tId] = sId + 1;
            TIDtoActiveSessions[tId].push(sId);
            activeSessions.push(Session(tId, sId, _msgSender(), address(0x0)));
            emit GhostMapCreated(msg.sender, tId, sId);
        }
        boo.transferFrom(msg.sender, address(this), cost * cmm.length);
    }

    function claimGhostMaps(
        uint256 tId,
        uint256[] calldata sId,
        int256[2][] calldata gps,
        uint256[] calldata nonces
    ) external onlyStakedOwner(tId) {
        require(
            sId.length == nonces.length && sId.length == gps.length,
            "Incorrect lengths"
        );
        if (_msgSender() != ACS)
            for (uint256 i = 0; i < sId.length; i++) {
                claimGhostMap(tId, sId[i], gps[i], nonces[i]);
            }
    }

    function rescueSession(uint256 tokenId, uint256 sessionId)
        external
        onlyOwner
    {
        GhostMapSession memory gms = TIDtoGMS[tokenId][sessionId];

        boo.transfer(gms.owner, gms.cost);
        boo.transfer(gms.busterPlayer, gms.balance - gms.cost);
        clearMap(tokenId, sessionId, gms.owner, gms.busterPlayer);
    }

    function claimBusterSession(uint256 tokenId, uint256 sessionId) external {
        GhostMapSession memory gms = TIDtoGMS[tokenId][sessionId];
        require(gms.active, "Session no longer active");
        require(gms.busterPlayer == _msgSender(), "must be the buster player");
        require(
            block.timestamp - 1 days >= gms.playedTime,
            "ghost player has time"
        );

        updateExp(gms, false, true);
        boo.transfer(gms.busterPlayer, gms.balance);
        clearMap(tokenId, sessionId, gms.owner, gms.busterPlayer);
    }

    function generateLockedSession() external {
        require(
            lockedSessions[_msgSender()].lockedBy == address(0x0),
            "Already locked a session"
        );
        uint256 index = pseudoRandom(_msgSender()) % activeSessions.length;
        uint256 count = 0;
        uint256 tokenId = activeSessions[index].tokenId;
        uint256 sessionId = activeSessions[index].sessionId;
        while (activeSessions[index].owner == _msgSender() || TIDtoGMS[tokenId][sessionId].active == false) {
            require(count < 5, "Preventing infinite loop");
            index =
                (pseudoRandom(_msgSender()) + index) %
                activeSessions.length;
            tokenId = activeSessions[index].tokenId;
            sessionId = activeSessions[index].sessionId;
            count++;
        }
        activeSessions[index].lockedBy = _msgSender();
        Session memory session = activeSessions[index];
        GhostMapSession memory gms = TIDtoGMS[session.tokenId][
            session.sessionId
        ];

        boo.transferFrom(
            _msgSender(),
            address(this),
            BUSTER_COSTS[gms.difficulty]
        );
        TIDtoGMS[session.tokenId][session.sessionId].balance += BUSTER_COSTS[
            gms.difficulty
        ];
        lockedSessions[_msgSender()] = session;
        TIDtoGMS[session.tokenId][session.sessionId].lockedTime = block
            .timestamp;
        removeActiveGhostMap(session.tokenId, session.sessionId);
    }

    function playGameSession(uint256[] calldata bi, int256[2][] calldata bp)
        external
    {
        IStakeManager smRef = sm;
        require(
            lockedSessions[_msgSender()].lockedBy != address(0x0),
            "You have not locked in a session yet"
        );
        uint256 tokenId = lockedSessions[_msgSender()].tokenId;
        uint256 sessionId = lockedSessions[_msgSender()].sessionId;
        GhostMapSession memory gms = TIDtoGMS[tokenId][sessionId];

        for (uint256 i = 0; i < bi.length; i++) {
            smRef.claimEnergy(bi[i]);
            smRef.useEnergy(bi[i], 1);
        }

        playRequirements(bi, bp, tokenId);
        playGame(bi, bp, tokenId, sessionId);
        TIDtoGMS[tokenId][sessionId].playedTime = block.timestamp;
        emit PlayedGame(_msgSender(), tokenId, sessionId);
        claimableSessions[gms.owner].push(lockedSessions[_msgSender()]);
        claimableSessions[_msgSender()].push(lockedSessions[_msgSender()]);
        delete lockedSessions[_msgSender()];
    }

    //Admin Access
    function getLockedSession() external view returns (Session memory) {
        return lockedSessions[_msgSender()];
    }

    // Public READ Game Method
    function getGhostMapSessionStats(uint256 tokenId, uint256 sessionId)
        external
        view
        returns (GhostMapSession memory)
    {
        return TIDtoGMS[tokenId][sessionId];
    }

    function getTokenIdActiveSessions(uint256 tokenId)
        external
        view
        returns (uint256[] memory)
    {
        return TIDtoActiveSessions[tokenId];
    }

    function matchHistory(address owner)
        external
        view
        returns (GhostMapSession[] memory)
    {
        uint256[2][] memory mh = ownerMatchHistory[owner];
        GhostMapSession[] memory hnsHistory = new GhostMapSession[](mh.length);

        for (uint256 i = 0; i < mh.length; i++) {
            hnsHistory[i] = TIDtoGMS[mh[i][0]][mh[i][1]];
        }
        return hnsHistory;
    }

    function numberOfClaimableSessions(address owner)
        external
        view
        returns (uint256)
    {
        return claimableSessions[owner].length;
    }
}

File 2 of 15 : IStakeManager.sol
// SPDX-License-Identifier: MIT LICENSE
pragma solidity >0.8.0;

interface IStakeManager {
    function stakePABOnService(
        uint256 tokenId,
        address service,
        address owner
    ) external;

    function isStaked(uint256 tokenId, address service)
        external
        view
        returns (bool);

    function unstakePeekABoo(uint256 tokenId) external;

    function getServices() external view returns (address[] memory);

    function isService(address service) external view returns (bool);

    function initializeEnergy(uint256 tokenId) external;

    function claimEnergy(uint256 tokenId) external;

    function useEnergy(uint256 tokenId, uint256 amount) external;

    function ownerOf(uint256 tokenId) external returns (address);

    function tokensOf(address owner) external returns (uint256[] memory);
}

File 3 of 15 : IPeekABoo.sol
// SPDX-License-Identifier: MIT LICENSE
pragma solidity >0.8.0;
import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol";

interface IPeekABoo is IERC721Upgradeable {
    struct PeekABooTraits {
        bool isGhost;
        uint256 background;
        uint256 back;
        uint256 bodyColor;
        uint256 hat;
        uint256 face;
        uint256 clothesOrHelmet;
        uint256 hands;
        uint64 ability;
        uint64 revealShape;
        uint64 tier;
        uint64 level;
    }

    struct GhostMap {
        uint256[10][10] grid;
        int256 gridSize;
        uint256 difficulty;
        bool initialized;
    }

    function devMint(address to, uint256[] memory types) external;

    function mint(uint256[] calldata types, bytes32[] memory proof) external;

    function publicMint(uint256[] calldata types) external payable;

    function getTokenTraits(uint256 tokenId)
        external
        view
        returns (PeekABooTraits memory);

    function setTokenTraits(
        uint256 tokenId,
        uint256 traitType,
        uint256 traitId
    ) external;

    function setMultipleTokenTraits(
        uint256 tokenId,
        uint256[] calldata traitTypes,
        uint256[] calldata traitIds
    ) external;

    function getGhostMapGridFromTokenId(uint256 tokenId)
        external
        view
        returns (GhostMap memory);

    function mintPhase2(
        uint256 tokenId,
        uint256[] memory types,
        uint256 amount,
        uint256 booAmount
    ) external;

    function incrementLevel(uint256 tokenId) external;

    function incrementTier(uint256 tokenId) external;

    function getPhase1Minted() external view returns (uint256 result);

    function getPhase2Minted() external view returns (uint256 result);

    function withdraw() external;
}

File 4 of 15 : ILevel.sol
// SPDX-License-Identifier: MIT LICENSE
pragma solidity ^0.8.0;

import "./IPeekABoo.sol";
import "./IStakeManager.sol";

interface ILevel {
    function updateExp(
        uint256 tokenId,
        bool won,
        uint256 difficulty
    ) external;

    function expAmount(uint256 tokenId) external view returns (uint256);

    function isUnlocked(
        uint256 tokenId,
        uint256 traitType,
        uint256 traitId
    ) external returns (bool);

    function getUnlockedTraits(uint256 tokenId, uint256 traitType)
        external
        returns (uint256);
}

File 5 of 15 : IHideNSeekV2.sol
// SPDX-License-Identifier: MIT LICENSE
pragma solidity >0.8.0;

interface IHideNSeekV2 {
    struct GhostMapSession {
        bool active;
        uint256 tokenId;
        uint256 sessionId;
        uint256 difficulty;
        uint256 cost;
        uint256 balance;
        bytes32 commitment;
        address owner;
        address busterPlayer;
        uint256 numberOfBusters;
        uint256[3] busterTokenIds;
        int256[2][3] busterPositions;
        uint256 lockedTime;
        uint256 playedTime;
        bool won;
    }

    struct Session {
        uint256 tokenId;
        uint256 sessionId;
        address owner;
        address lockedBy;
    }

    function stakePeekABoo(uint256[] calldata tokenIds) external;

    function unstakePeekABoo(uint256[] calldata tokenIds) external;

    function claimGhostMaps(
        uint256 tokenId,
        uint256[] calldata sessionIds,
        int256[2][] calldata ghostPositions,
        uint256[] calldata nonces
    ) external;

    function playGameSession(uint256[] calldata bi, int256[2][] calldata bp)
        external;

    function getGhostMapSessionStats(uint256 tokenId, uint256 sessionId)
        external
        view
        returns (GhostMapSession memory);

    function getLockedSession() external returns (Session memory);

    function getTokenIdActiveSessions(uint256 tokenId)
        external
        view
        returns (uint256[] memory);

    function matchHistory(address owner)
        external
        view
        returns (GhostMapSession[] memory);

    function numberOfClaimableSessions(address owner)
        external
        view
        returns (uint256);

    function claimBusterSession(uint256 tokenId, uint256 sessionId) external;

    function createGhostMaps(uint256 tokenId, bytes32[] calldata commitments)
        external;

    function rescueSession(uint256 tokenId, uint256 sessionId) external;
}

File 6 of 15 : IBOO.sol
// SPDX-License-Identifier: MIT LICENSE
pragma solidity >0.8.0;
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";

interface IBOO is IERC20Upgradeable {
    function mint(address to, uint256 amount) external;

    function burn(address from, uint256 amount) external;

    function cap() external view returns (uint256);

    function setAllocationAddress(address fundingAddress, uint256 allocation) external;

    function removeAllocationAddress(address fundingAddress) external;
}

File 7 of 15 : HideNSeekGameLogicV3.sol
// SPDX-License-Identifier: MIT LICENSE
pragma solidity >0.8.0;

import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./IHideNSeekV2.sol";
import "./HideNSeekBaseV2.sol";
import "./IPeekABoo.sol";
import "./IBOO.sol";

abstract contract HideNSeekGameLogicV3 is OwnableUpgradeable, HideNSeekBaseV2 {
    function playGame(
        uint256[] calldata busterIds,
        int256[2][] calldata busterPos,
        uint256 tokenId,
        uint256 sessionId
    ) internal {
        TIDtoGMS[tokenId][sessionId].busterPlayer = _msgSender();
        TIDtoGMS[tokenId][sessionId].numberOfBusters = busterIds.length;
        for (uint256 i = 0; i < busterIds.length; i++) {
            TIDtoGMS[tokenId][sessionId].busterTokenIds[i] = busterIds[i];
            TIDtoGMS[tokenId][sessionId].busterPositions[i] = busterPos[i];
        }
    }

    // Returns true if ghost wins, false if ghost loses
    function verifyGame(
        IHideNSeekV2.GhostMapSession memory gms,
        int256[2] calldata ghostPosition
    ) internal returns (bool) {
        IPeekABoo peekabooRef = peekaboo;

        for (uint256 i = 0; i < gms.numberOfBusters; i++) {
            // Ghost reveal logic
            if (
                doesRadiusReveal(
                    gms.busterPositions[i],
                    peekabooRef
                        .getTokenTraits(gms.busterTokenIds[i])
                        .revealShape,
                    gms.busterTokenIds[i],
                    ghostPosition
                ) ||
                (
                    gms.busterTokenIds.length == 1
                        ? doesAbilityReveal(
                            gms.busterPositions[i],
                            gms.busterTokenIds[i],
                            ghostPosition
                        )
                        : (
                            gms.busterTokenIds.length == 2
                                ? doesAbilityReveal(
                                    gms.busterPositions[i],
                                    gms.busterTokenIds[i],
                                    ghostPosition,
                                    gms.busterPositions[(i == 0) ? 1 : 0]
                                )
                                : doesAbilityReveal(
                                    gms.busterPositions[i],
                                    gms.busterTokenIds[i],
                                    ghostPosition,
                                    gms.busterPositions[(i == 0) ? 2 : 0],
                                    gms.busterPositions[(i == 1) ? 2 : 1]
                                )
                        )
                )
            ) {
                //Boo Generator Cashing
                // if (peekabooRef.getTokenTraits(gms.busterTokenIds[i]).ability == 6) {
                //     booRef.mint(gms.busterPlayer, 10 ether);
                // }

                return true;
            }
        }
        return false;
    }

    function doesRadiusReveal(
        int256[2] memory busterPosition,
        uint256 revealShape,
        uint256 busterId,
        int256[2] memory ghostPosition
    ) internal view returns (bool) {
        // NormalRevealShape
        if (revealShape == 0) {
            for (int256 i = -1; i <= 1; i++) {
                for (int256 j = -1; j <= 1; j++) {
                    if (
                        (ghostPosition[0] == busterPosition[0] + i &&
                            ghostPosition[1] == busterPosition[1] + j)
                    ) return true;
                }
            }
        }
        // PlusRevealShape
        else if (revealShape == 1) {
            for (int256 i = -2; i <= 2; i++) {
                if (
                    (ghostPosition[0] == busterPosition[0] &&
                        ghostPosition[1] == busterPosition[1] + i) ||
                    (ghostPosition[0] == busterPosition[0] + i &&
                        ghostPosition[1] == busterPosition[1])
                ) return true;
            }
        }
        // XRevealShape
        else if (revealShape == 2) {
            for (int256 i = -2; i <= 2; i++) {
                if (
                    ghostPosition[0] == busterPosition[0] + i &&
                    ghostPosition[1] == busterPosition[1] + i
                ) {
                    return true;
                }
            }
        }

        return false;
    }

    function doesAbilityReveal(
        int256[2] memory bp,
        uint256 busterId,
        int256[2] memory gp,
        int256[2] memory otherBuster1,
        int256[2] memory otherBuster2
    ) internal view returns (bool) {
        IPeekABoo peekabooRef = peekaboo;
        //LightBuster
        if (peekabooRef.getTokenTraits(busterId).ability == 1) {
            if (gp[0] == bp[0]) return true;
        }
        //HomeBound
        else if (peekabooRef.getTokenTraits(busterId).ability == 2) {
            if (
                ((bp[0] == otherBuster1[0]) && (bp[0] == gp[0])) || // Buster 1 on same row
                ((bp[0] == otherBuster2[0]) && (bp[0] == gp[0])) || // Buster 2 on same row
                ((bp[1] == otherBuster1[1]) && (bp[1] == gp[1])) || // Buster 1 on same column
                ((bp[1] == otherBuster2[1]) && (bp[1] == gp[1]))
            ) // Buster 2 on same column
            {
                return true;
            }
        }
        //GreenGoo
        else if (peekabooRef.getTokenTraits(busterId).ability == 3) {
            if (gp[1] == bp[1]) {
                return true;
            }
        }
        //StandUnited
        else if (peekabooRef.getTokenTraits(busterId).ability == 4) {
            if (
                isBusterAdjacent(bp, otherBuster1) ||
                isBusterAdjacent(bp, otherBuster2)
            ) {
                for (int256 i = -2; i <= 2; i++) {
                    for (int256 j = -2; i <= 2; i++) {
                        if ((gp[0] == bp[0] + i && gp[1] == bp[1] + j))
                            return true;
                    }
                }
            }
        }
        //HolyCross
        else if (peekabooRef.getTokenTraits(busterId).ability == 5) {
            if (gp[0] == bp[0] || gp[1] == bp[1]) {
                return true;
            }
        }

        return false;
    }

    function doesAbilityReveal(
        int256[2] memory busterPosition,
        uint256 busterId,
        int256[2] memory ghostPosition,
        int256[2] memory otherBuster1
    ) internal view returns (bool) {
        IPeekABoo peekabooRef = peekaboo;
        //LightBuster
        if (peekabooRef.getTokenTraits(busterId).ability == 1) {
            if (ghostPosition[0] == busterPosition[0]) return true;
        }
        //HomeBound
        else if (peekabooRef.getTokenTraits(busterId).ability == 2) {
            if (
                ((busterPosition[0] == otherBuster1[0]) &&
                    (busterPosition[0] == ghostPosition[0])) || // Buster 1 on same row
                ((busterPosition[1] == otherBuster1[1]) &&
                    (busterPosition[1] == ghostPosition[1]))
            ) // Buster 1 on same column
            {
                return true;
            }
        }
        //GreenGoo
        else if (peekabooRef.getTokenTraits(busterId).ability == 3) {
            if (ghostPosition[1] == busterPosition[1]) {
                return true;
            }
        }
        //StandUnited
        else if (peekabooRef.getTokenTraits(busterId).ability == 4) {
            if (isBusterAdjacent(busterPosition, otherBuster1)) {
                for (int256 i = -2; i <= 2; i++) {
                    for (int256 j = -2; i <= 2; i++) {
                        if (
                            (ghostPosition[0] == busterPosition[0] + i &&
                                ghostPosition[1] == busterPosition[1] + j)
                        ) return true;
                    }
                }
            }
        }
        //HolyCross
        else if (peekabooRef.getTokenTraits(busterId).ability == 5) {
            if (
                ghostPosition[0] == busterPosition[0] ||
                ghostPosition[1] == busterPosition[1]
            ) {
                return true;
            }
        }

        return false;
    }

    function doesAbilityReveal(
        int256[2] memory busterPosition,
        uint256 busterId,
        int256[2] memory ghostPosition
    ) internal view returns (bool) {
        IPeekABoo peekabooRef = peekaboo;
        //LightBuster
        if (peekabooRef.getTokenTraits(busterId).ability == 1) {
            if (ghostPosition[0] == busterPosition[0]) return true;
        }
        //GreenGoo
        else if (peekabooRef.getTokenTraits(busterId).ability == 3) {
            if (ghostPosition[1] == busterPosition[1]) {
                return true;
            }
        }
        //HolyCross
        else if (peekabooRef.getTokenTraits(busterId).ability == 5) {
            if (
                ghostPosition[0] == busterPosition[0] ||
                ghostPosition[1] == busterPosition[1]
            ) {
                return true;
            }
        }

        return false;
    }

    function isBusterAdjacent(int256[2] memory pos1, int256[2] memory pos2)
        internal
        pure
        returns (bool)
    {
        int256 difference = pos1[0] + pos1[1] - (pos2[0] + pos2[1]);
        return difference <= 1 && difference >= -1;
    }

    function verifyCommitment(
        uint256 tokenId,
        uint256 sessionId,
        int256[2] calldata ghostPosition,
        uint256 nonce
    ) internal view returns (bool) {
        return
            bytes32(
                keccak256(
                    abi.encodePacked(
                        tokenId,
                        ghostPosition[0],
                        ghostPosition[1],
                        nonce
                    )
                )
            ) == TIDtoGMS[tokenId][sessionId].commitment;
    }

    function hasEnoughBooToFund(
        uint256[] calldata booFundingAmount,
        address sender
    ) internal view returns (bool) {
        uint256 totalBooFundingAmount;
        for (uint256 i = 0; i < booFundingAmount.length; i++) {
            totalBooFundingAmount += booFundingAmount[i];
        }
        return boo.balanceOf(sender) >= totalBooFundingAmount;
    }

    function isNotInBound(uint256 tokenId, int256[2] calldata position)
        internal
        view
        returns (bool)
    {
        IPeekABoo.GhostMap memory ghostMap = peekaboo
            .getGhostMapGridFromTokenId(tokenId);
        if (
            ghostMap.grid[uint256(position[1])][uint256(position[0])] == 1 ||
            position[0] < 0 ||
            position[0] > ghostMap.gridSize - 1 ||
            position[1] < 0 ||
            position[1] > ghostMap.gridSize - 1
        ) {
            return true;
        }
        return false;
    }

    function claimGhostMap(
        uint256 tokenId,
        uint256 sessionId,
        int256[2] calldata ghostPosition,
        uint256 nonce
    ) internal {
        IBOO booRef = boo;
        IHideNSeekV2.GhostMapSession memory gms = TIDtoGMS[tokenId][sessionId];
        uint256 difficulty = gms.difficulty;
        require(gms.active, "Session no longer active");
        require(
            gms.numberOfBusters > 0 && gms.busterPlayer != address(0),
            "No one has played yet"
        );
        bool overTime = block.timestamp - 1 days >= gms.lockedTime;
        bool notInbound = isNotInBound(tokenId, ghostPosition);

        if (overTime) {
            updateExp(gms, true, false);
            booRef.transfer(gms.owner, gms.balance);
            emit GameComplete(
                gms.owner,
                gms.busterPlayer,
                tokenId,
                sessionId,
                difficulty,
                gms.balance,
                0
            );
            TIDtoGMS[tokenId][sessionId].won = true;
        }

        if (!overTime) {
            require(
                verifyCommitment(tokenId, sessionId, ghostPosition, nonce),
                "Commitment incorrect, please do not cheat"
            );
            if (notInbound) {
                updateExp(gms, false, true);
                booRef.transfer(gms.busterPlayer, gms.balance);
                emit GameComplete(
                    gms.busterPlayer,
                    gms.owner,
                    tokenId,
                    sessionId,
                    difficulty,
                    gms.balance,
                    0
                );
            }
        }

        uint256 busterReceive;
        if (!overTime && !notInbound) {
            if (verifyGame(gms, ghostPosition)) {
                busterReceive =
                    gms.balance -
                    ghostReceive[gms.numberOfBusters - 1];
                booRef.transfer(gms.busterPlayer, busterReceive);
                booRef.transfer(
                    gms.owner,
                    ghostReceive[gms.numberOfBusters - 1]
                );
                if (gms.numberOfBusters == 1) {
                    booRef.mint(gms.busterPlayer, BUSTER_BONUS[1]);
                } else if (gms.numberOfBusters == 2) {
                    booRef.mint(gms.busterPlayer, BUSTER_BONUS[0]);
                }

                updateExp(gms, false, true);
                emit GameComplete(
                    gms.busterPlayer,
                    gms.owner,
                    tokenId,
                    sessionId,
                    difficulty,
                    busterReceive,
                    ghostReceive[gms.numberOfBusters - 1]
                );
            } else {
                booRef.transfer(gms.owner, gms.balance);

                updateExp(gms, true, false);
                emit GameComplete(
                    gms.owner,
                    gms.busterPlayer,
                    tokenId,
                    sessionId,
                    difficulty,
                    gms.balance,
                    0
                );
                TIDtoGMS[tokenId][sessionId].won = true;
            }
        }
        clearMap(tokenId, sessionId, gms.owner, gms.busterPlayer);
    }

    function pseudoRandom(address sender) internal returns (uint256) {
        return
            uint256(
                keccak256(
                    abi.encodePacked(
                        sender,
                        tx.gasprice,
                        block.timestamp,
                        activeSessions.length,
                        sender
                    )
                )
            );
    }

    function removeActiveGhostMap(uint256 tokenId, uint256 sessionId) internal {
        for (uint256 i = 0; i < activeSessions.length; i++) {
            if (
                activeSessions[i].tokenId == tokenId &&
                activeSessions[i].sessionId == sessionId
            ) {
                activeSessions[i] = activeSessions[activeSessions.length - 1];
                activeSessions.pop();
                break;
            }
        }
        for (uint256 i = 0; i < TIDtoActiveSessions[tokenId].length; i++) {
            if (TIDtoActiveSessions[tokenId][i] == sessionId) {
                TIDtoActiveSessions[tokenId][i] = TIDtoActiveSessions[tokenId][
                    TIDtoActiveSessions[tokenId].length - 1
                ];
                TIDtoActiveSessions[tokenId].pop();
                return;
            }
        }
    }

    function removeClaimableSession(
        address owner,
        uint256 tokenId,
        uint256 sessionId
    ) internal {
        uint256 _len = claimableSessions[owner].length;
        for (uint256 i = 0; i < _len; i++) {
            if (
                claimableSessions[owner][i].tokenId == tokenId &&
                claimableSessions[owner][i].sessionId == sessionId
            ) {
                claimableSessions[owner][i] = claimableSessions[owner][
                    _len - 1
                ];
                claimableSessions[owner].pop();
                return;
            }
        }
    }

    function notSamePosition(int256[2] calldata pos1, int256[2] calldata pos2)
        internal
        pure
        returns (bool)
    {
        return !(pos1[0] == pos2[0] && pos1[1] == pos2[1]);
    }

    function clearMap(
        uint256 tokenId,
        uint256 sessionId,
        address gp,
        address bp
    ) internal {
        TIDtoGMS[tokenId][sessionId].balance = 0;
        TIDtoGMS[tokenId][sessionId].active = false;
        ownerMatchHistory[gp].push([tokenId, sessionId]);
        ownerMatchHistory[bp].push([tokenId, sessionId]);

        removeClaimableSession(gp, tokenId, sessionId);
        removeClaimableSession(bp, tokenId, sessionId);
    }

    function createCommitment(
        uint256 tId,
        int256[2] calldata gp,
        uint256 nonce
    ) public pure returns (bytes32) {
        return bytes32(keccak256(abi.encodePacked(tId, gp[0], gp[1], nonce)));
    }

    function playRequirements(
        uint256[] calldata bi,
        int256[2][] calldata bp,
        uint256 tokenId
    ) internal {
        IStakeManager smRef = sm;
        IPeekABoo peekabooRef = peekaboo;

        require(bi.length == bp.length, "Incorrect lengths");
        require(
            bi.length <= 3 && bi.length > 0,
            "Can only play with up to 3 busters"
        );

        require(
            smRef.ownerOf(bi[0]) == _msgSender(),
            "Not staked or not your buster"
        );
        require(
            !peekabooRef.getTokenTraits(bi[0]).isGhost,
            "You can't play with a ghost"
        );
        require(!isNotInBound(tokenId, bp[0]), "buster1 not inbound");

        if (bi.length == 2) {
            require(
                smRef.ownerOf(bi[1]) == _msgSender(),
                "Not staked or not your buster"
            );
            require(
                !peekabooRef.getTokenTraits(bi[1]).isGhost,
                "You can't play with a ghost"
            );
            require(
                notSamePosition(bp[0], bp[1]),
                "buster1 pos cannot be same as buster2"
            );
            require(!isNotInBound(tokenId, bp[1]), "buster2 not inbound");
        } else if (bi.length == 3) {
            require(
                smRef.ownerOf(bi[1]) == _msgSender() &&
                    smRef.ownerOf(bi[2]) == _msgSender(),
                "Not staked or not your buster"
            );
            require(
                !peekabooRef.getTokenTraits(bi[1]).isGhost &&
                    !peekabooRef.getTokenTraits(bi[2]).isGhost,
                "You can't play with a ghost"
            );

            require(
                notSamePosition(bp[0], bp[1]) &&
                    notSamePosition(bp[0], bp[2]) &&
                    notSamePosition(bp[1], bp[2]),
                "buster pos cannot be same"
            );
            require(!isNotInBound(tokenId, bp[1]), "buster2 not inbound");
            require(!isNotInBound(tokenId, bp[2]), "buster3 not inbound");
        }
    }

    function updateExp(
        IHideNSeekV2.GhostMapSession memory gms,
        bool ghostStatus,
        bool busterStatus
    ) internal {
        level.updateExp(gms.tokenId, ghostStatus, gms.difficulty);
        for (uint256 i = 0; i < gms.numberOfBusters; i++) {
            level.updateExp(
                gms.busterTokenIds[i],
                busterStatus,
                gms.difficulty
            );
        }
    }

    function setPeekABoo(address _peekaboo) external onlyOwner {
        peekaboo = IPeekABoo(_peekaboo);
    }

    function setBOO(address _boo) external onlyOwner {
        boo = IBOO(_boo);
    }

    function setStakeManager(address _sm) external onlyOwner {
        sm = IStakeManager(_sm);
    }

    function setLevel(address _level) external onlyOwner {
        level = ILevel(_level);
    }

    function setGhostReceive(uint256[3] memory _ghostReceive) external {
        ghostReceive = _ghostReceive;
    }

    function setAutoClaimServer(address autoClaimAddress) external onlyOwner {
        ACS = autoClaimAddress;
    }

    function setGhostCost(uint256[3] memory _GHOST_COST) external onlyOwner {
        GHOST_COSTS = _GHOST_COST;
    }

    function setBusterCost(uint256[3] memory _BUSTER_COST) external onlyOwner {
        BUSTER_COSTS = _BUSTER_COST;
    }

    function setBonus(uint256[2] memory _BONUS) external onlyOwner {
        BUSTER_BONUS = _BONUS;
    }

    function adminTransfer(address to, uint256 amount) external onlyOwner {
        boo.transfer(to, amount);
    }
}

File 8 of 15 : HideNSeekBaseV2.sol
// SPDX-License-Identifier: MIT LICENSE
pragma solidity >0.8.0;

import "./IHideNSeekV2.sol";
import "./IPeekABoo.sol";
import "./IStakeManager.sol";
import "./IBOO.sol";
import "./ILevel.sol";

contract HideNSeekBaseV2 {
    // reference to the peekaboo smart contract
    IPeekABoo public peekaboo;
    IBOO public boo;
    IStakeManager public sm;
    ILevel public level;
    address ACS;

    mapping(uint256 => mapping(uint256 => IHideNSeekV2.GhostMapSession))
        public TIDtoGMS;
    mapping(uint256 => uint256) public TIDtoNextSessionNumber;
    mapping(uint256 => uint256[]) public TIDtoActiveSessions;
    mapping(address => uint256[2][]) public ownerMatchHistory;
    mapping(address => IHideNSeekV2.Session[]) public claimableSessions;
    mapping(address => IHideNSeekV2.Session) lockedSessions;
    IHideNSeekV2.Session[] activeSessions;

    uint256[3] public GHOST_COSTS;
    uint256[3] public BUSTER_COSTS;
    uint256[2] public BUSTER_BONUS;

    event StakedPeekABoo(address from, uint256 tokenId);
    event UnstakedPeekABoo(address from, uint256 tokenId);
    event ClaimedGhostMap(uint256 tokenId, uint256 sessionId);
    event PlayedGame(address from, uint256 tokenId, uint256 sessionId);
    event GhostMapCreated(
        address indexed ghostPlayer,
        uint256 indexed tokenId,
        uint256 session
    );
    event GameComplete(
        address winner,
        address loser,
        uint256 indexed tokenId,
        uint256 indexed session,
        uint256 difficulty,
        uint256 winnerAmount,
        uint256 loserAmount
    );

    uint256[3] public ghostReceive;
}

File 9 of 15 : IERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 10 of 15 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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

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

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

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

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

File 11 of 15 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

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

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

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

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

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

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

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

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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 12 of 15 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 13 of 15 : IERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20Upgradeable {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

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

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

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

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 15 of 15 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

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

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

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sessionId","type":"uint256"}],"name":"ClaimedGhostMap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"winner","type":"address"},{"indexed":false,"internalType":"address","name":"loser","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"session","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"difficulty","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"winnerAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"loserAmount","type":"uint256"}],"name":"GameComplete","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"ghostPlayer","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"session","type":"uint256"}],"name":"GhostMapCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sessionId","type":"uint256"}],"name":"PlayedGame","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"StakedPeekABoo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"UnstakedPeekABoo","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"BUSTER_BONUS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"BUSTER_COSTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"GHOST_COSTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"TIDtoActiveSessions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"TIDtoGMS","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"sessionId","type":"uint256"},{"internalType":"uint256","name":"difficulty","type":"uint256"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"bytes32","name":"commitment","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"busterPlayer","type":"address"},{"internalType":"uint256","name":"numberOfBusters","type":"uint256"},{"internalType":"uint256","name":"lockedTime","type":"uint256"},{"internalType":"uint256","name":"playedTime","type":"uint256"},{"internalType":"bool","name":"won","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"TIDtoNextSessionNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"adminTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"boo","outputs":[{"internalType":"contract IBOO","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"sessionId","type":"uint256"}],"name":"claimBusterSession","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tId","type":"uint256"},{"internalType":"uint256[]","name":"sId","type":"uint256[]"},{"internalType":"int256[2][]","name":"gps","type":"int256[2][]"},{"internalType":"uint256[]","name":"nonces","type":"uint256[]"}],"name":"claimGhostMaps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimableSessions","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"sessionId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"lockedBy","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tId","type":"uint256"},{"internalType":"int256[2]","name":"gp","type":"int256[2]"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"createCommitment","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tId","type":"uint256"},{"internalType":"bytes32[]","name":"cmm","type":"bytes32[]"}],"name":"createGhostMaps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"generateLockedSession","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"sessionId","type":"uint256"}],"name":"getGhostMapSessionStats","outputs":[{"components":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"sessionId","type":"uint256"},{"internalType":"uint256","name":"difficulty","type":"uint256"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"bytes32","name":"commitment","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"busterPlayer","type":"address"},{"internalType":"uint256","name":"numberOfBusters","type":"uint256"},{"internalType":"uint256[3]","name":"busterTokenIds","type":"uint256[3]"},{"internalType":"int256[2][3]","name":"busterPositions","type":"int256[2][3]"},{"internalType":"uint256","name":"lockedTime","type":"uint256"},{"internalType":"uint256","name":"playedTime","type":"uint256"},{"internalType":"bool","name":"won","type":"bool"}],"internalType":"struct IHideNSeekV2.GhostMapSession","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLockedSession","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"sessionId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"lockedBy","type":"address"}],"internalType":"struct IHideNSeekV2.Session","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenIdActiveSessions","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ghostReceive","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"level","outputs":[{"internalType":"contract ILevel","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"matchHistory","outputs":[{"components":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"sessionId","type":"uint256"},{"internalType":"uint256","name":"difficulty","type":"uint256"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"bytes32","name":"commitment","type":"bytes32"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"busterPlayer","type":"address"},{"internalType":"uint256","name":"numberOfBusters","type":"uint256"},{"internalType":"uint256[3]","name":"busterTokenIds","type":"uint256[3]"},{"internalType":"int256[2][3]","name":"busterPositions","type":"int256[2][3]"},{"internalType":"uint256","name":"lockedTime","type":"uint256"},{"internalType":"uint256","name":"playedTime","type":"uint256"},{"internalType":"bool","name":"won","type":"bool"}],"internalType":"struct IHideNSeekV2.GhostMapSession[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"numberOfClaimableSessions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"ownerMatchHistory","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"peekaboo","outputs":[{"internalType":"contract IPeekABoo","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"bi","type":"uint256[]"},{"internalType":"int256[2][]","name":"bp","type":"int256[2][]"}],"name":"playGameSession","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"sessionId","type":"uint256"}],"name":"rescueSession","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"autoClaimAddress","type":"address"}],"name":"setAutoClaimServer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_boo","type":"address"}],"name":"setBOO","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[2]","name":"_BONUS","type":"uint256[2]"}],"name":"setBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[3]","name":"_BUSTER_COST","type":"uint256[3]"}],"name":"setBusterCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[3]","name":"_GHOST_COST","type":"uint256[3]"}],"name":"setGhostCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[3]","name":"_ghostReceive","type":"uint256[3]"}],"name":"setGhostReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_level","type":"address"}],"name":"setLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_peekaboo","type":"address"}],"name":"setPeekABoo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sm","type":"address"}],"name":"setStakeManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sm","outputs":[{"internalType":"contract IStakeManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"stakePeekABoo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unstakePeekABoo","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5061618980620000216000396000f3fe608060405234801561001057600080fd5b50600436106102535760003560e01c8063829e472111610146578063b8063947116100c3578063e0f46a7e11610087578063e0f46a7e14610574578063e62deb9814610677578063ea1e97ff1461070c578063ec429abb1461071f578063f17e48ec14610732578063f2fde38b1461074557600080fd5b8063b806394714610520578063baf34e3514610533578063d772ac6b14610546578063da8c36af14610559578063de491c231461056c57600080fd5b80639b19d0c81161010a5780639b19d0c8146104b45780639ee1a691146104c7578063a1122459146104da578063aa237e3f146104fa578063afd6e65d1461050d57600080fd5b8063829e47211461043457806387b5b05e1461045d5780638da5cb5b1461047057806392cb910114610481578063943b57181461049457600080fd5b80634b3df200116101d457806370019c6c1161019857806370019c6c146103de5780637052fb97146103f1578063715018a6146104115780637cd570b6146104195780638129fc1c1461042c57600080fd5b80634b3df2001461035a5780635024b104146103855780635b2df6ef146103a55780636783e7fb146103b85780636fd5ae15146103cb57600080fd5b80632a615cf81161021b5780632a615cf8146102ed5780632b69c7f71461030e5780633ec2b9af14610321578063419cd50b14610334578063462720f91461034757600080fd5b806306a3faac1461025857806309dc8d1c1461026d5780630e7c67fc1461028057806319a0b269146102935780632092406a146102da575b600080fd5b61026b6102663660046156c3565b610758565b005b61026b61027b366004615742565b61079c565b61026b61028e3660046157af565b6107a9565b6102a66102a13660046157cc565b6107f5565b6040805194855260208501939093526001600160a01b03918216928401929092521660608201526080015b60405180910390f35b61026b6102e8366004615843565b610848565b6103006102fb366004615884565b610ca4565b6040519081526020016102d1565b61030061031c366004615884565b610cbb565b61026b61032f36600461589d565b610ccb565b61026b6103423660046157af565b610f7d565b6103006103553660046158bf565b610fc9565b60665461036d906001600160a01b031681565b6040516001600160a01b0390911681526020016102d1565b61039861039336600461589d565b61100b565b6040516102d19190615a35565b61026b6103b33660046157af565b61117b565b61026b6103c6366004615742565b6111c7565b60685461036d906001600160a01b031681565b61026b6103ec366004615a44565b6111fe565b6103006103ff366004615884565b606b6020526000908152604090205481565b61026b6118ad565b60675461036d906001600160a01b031681565b61026b6118e3565b6103006104423660046157af565b6001600160a01b03166000908152606e602052604090205490565b61030061046b36600461589d565b611a9a565b6033546001600160a01b031661036d565b61026b61048f3660046157af565b611acb565b6104a76104a23660046157af565b611b17565b6040516102d19190615a8f565b61026b6104c2366004615b22565b611e0d565b61026b6104d5366004615843565b612031565b6104ed6104e8366004615884565b6120f8565b6040516102d19190615bc5565b61026b61050836600461589d565b61215a565b61030061051b366004615bfd565b6123ff565b61026b61052e366004615c32565b612441565b61026b610541366004615742565b612900565b610300610554366004615884565b612937565b60655461036d906001600160a01b031681565b61026b612947565b61060561058236600461589d565b606a602090815260009283526040808420909152908252902080546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a015460138b015460148c01546015909c015460ff9b8c169c9a9b999a98999798969795966001600160a01b0395861696959094169492939192168d565b604080519d15158e5260208e019c909c529a8c019990995260608b019790975260808a019590955260a089019390935260c08801919091526001600160a01b0390811660e08801521661010086015261012085015261014084015261016083015215156101808201526101a0016102d1565b6040805160808082018352600080835260208084018290528385018290526060938401829052338252606f815290849020845180840186528154808252600183015482850190815260028401546001600160a01b03908116848a0190815260039095015481169388019384528851928352905194820194909452915183169582019590955293511691830191909152016102d1565b61026b61071a3660046157af565b612edb565b61030061072d366004615884565b612f27565b61026b6107403660046157cc565b612f37565b61026b6107533660046157af565b612fd6565b6033546001600160a01b0316331461078b5760405162461bcd60e51b815260040161078290615c9d565b60405180910390fd5b61079860778260026153e1565b5050565b610798607982600361541f565b6033546001600160a01b031633146107d35760405162461bcd60e51b815260040161078290615c9d565b606780546001600160a01b0319166001600160a01b0392909216919091179055565b606e602052816000526040600020818154811061081157600080fd5b6000918252602090912060049091020180546001820154600283015460039093015491945092506001600160a01b03918216911684565b6065546067546001600160a01b039182169116600080805b85811015610c9b57336001600160a01b038516636352211e89898581811061088a5761088a615cd2565b905060200201356040518263ffffffff1660e01b81526004016108af91815260200190565b6020604051808303816000875af11580156108ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f29190615ce8565b6001600160a01b03161461093a5760405162461bcd60e51b815260206004820152600f60248201526e2737ba103cb7bab9103a37b5b2b71760891b6044820152606401610782565b836001600160a01b031663060ce4e488888481811061095b5761095b615cd2565b905060200201356040518263ffffffff1660e01b815260040161098091815260200190565b600060405180830381600087803b15801561099a57600080fd5b505af11580156109ae573d6000803e3d6000fd5b50505050846001600160a01b03166394e568478888848181106109d3576109d3615cd2565b905060200201356040518263ffffffff1660e01b81526004016109f891815260200190565b61018060405180830381865afa158015610a16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3a9190615d31565b5115610c8957606c6000888884818110610a5657610a56615cd2565b90506020020135815260200190815260200160002080549050915060005b82811015610c8757606c6000898985818110610a9257610a92615cd2565b905060200201358152602001908152602001600020600081548110610ab957610ab9615cd2565b90600052602060002001549350610ae8888884818110610adb57610adb615cd2565b905060200201358561306e565b6066546001600160a01b031663a9059cbb606a60008b8b87818110610b0f57610b0f615cd2565b6020908102929092013583525081810192909252604090810160009081208982529092528120600701546001600160a01b031690606a908c8c88818110610b5857610b58615cd2565b9050602002013581526020019081526020016000206000888152602001908152602001600020600501546040518363ffffffff1660e01b8152600401610b9f929190615dec565b6020604051808303816000875af1158015610bbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be29190615e05565b506000606a60008a8a86818110610bfb57610bfb615cd2565b9050602002013581526020019081526020016000206000868152602001908152602001600020600501819055506000606a60008a8a86818110610c4057610c40615cd2565b6020908102929092013583525081810192909252604090810160009081208882529092529020805460ff191691151591909117905580610c7f81615e36565b915050610a74565b505b80610c9381615e36565b915050610860565b50505050505050565b60798160038110610cb457600080fd5b0154905081565b60748160038110610cb457600080fd5b6033546001600160a01b03163314610cf55760405162461bcd60e51b815260040161078290615c9d565b6000828152606a60209081526040808320848452825280832081516101e081018352815460ff161515815260018201549381019390935260028101548383015260038082015460608086019190915260048301546080860152600583015460a0860152600683015460c086015260078301546001600160a01b0390811660e08701526008840154166101008601526009830154610120860152835190810193849052919261014085019291600a85019182845b815481526020019060010190808311610da85750505091835250506040805160608101909152602090910190600d830160036000835b82821015610e2457604080518082019182905290600284810287019182845b815481526020019060010190808311610dfd57505050505081526020019060010190610dde565b5050509082525060138201546020820152601482015460408083019190915260159092015460ff16151560609091015260665460e08301516080840151925163a9059cbb60e01b81529394506001600160a01b039091169263a9059cbb92610e8f9291600401615dec565b6020604051808303816000875af1158015610eae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed29190615e05565b50606654610100820151608083015160a08401516001600160a01b039093169263a9059cbb9291610f0291615e51565b6040518363ffffffff1660e01b8152600401610f1f929190615dec565b6020604051808303816000875af1158015610f3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f629190615e05565b50610f7883838360e001518461010001516132e4565b505050565b6033546001600160a01b03163314610fa75760405162461bcd60e51b815260040161078290615c9d565b606580546001600160a01b0319166001600160a01b0392909216919091179055565b60408051602080820186905284358284015284810135606083015260808083018590528351808403909101815260a090920190925280519101205b9392505050565b61101361544c565b6000838152606a6020908152604080832085845282529182902082516101e081018452815460ff161515815260018201549281019290925260028101548284015260038082015460608085019190915260048301546080850152600583015460a0850152600683015460c085015260078301546001600160a01b0390811660e08601526008840154166101008501526009830154610120850152845190810194859052929391926101408501929091600a85019182845b8154815260200190600101908083116110ca5750505091835250506040805160608101909152602090910190600d830160036000835b8282101561114657604080518082019182905290600284810287019182845b81548152602001906001019080831161111f57505050505081526020019060010190611100565b50505090825250601382015460208201526014820154604082015260159091015460ff16151560609091015290505b92915050565b6033546001600160a01b031633146111a55760405162461bcd60e51b815260040161078290615c9d565b606980546001600160a01b0319166001600160a01b0392909216919091179055565b6033546001600160a01b031633146111f15760405162461bcd60e51b815260040161078290615c9d565b610798607482600361541f565b6067546040516321c4542560e21b81526004810185905230602482015284916001600160a01b031690638711509490604401602060405180830381865afa15801561124d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112719190615e05565b80156112f75750336067546040516331a9108f60e11b8152600481018490526001600160a01b039283169290911690636352211e906024016020604051808303816000875af11580156112c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ec9190615ce8565b6001600160a01b0316145b61133d5760405162461bcd60e51b81526020600482015260176024820152763737ba1039ba30b5b2b21037b9103737ba1037bbb732b960491b6044820152606401610782565b6065546067546040516394e5684760e01b8152600481018790526001600160a01b03928316929091169082906394e568479060240161018060405180830381865afa158015611390573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b49190615d31565b516113ef5760405162461bcd60e51b815260206004820152600b60248201526a139bdd08184819da1bdcdd60aa1b6044820152606401610782565b6040516320aeff8960e11b8152600481018790526001600160a01b0383169063415dff1290602401610ce060405180830381865afa158015611435573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114599190615e68565b606001516114a95760405162461bcd60e51b815260206004820152601b60248201527f47686f73746d6170206973206e6f7420696e697469616c697a656400000000006044820152606401610782565b604051630ccc702360e41b8152600481018790526001600160a01b0382169063ccc7023090602401600060405180830381600087803b1580156114eb57600080fd5b505af11580156114ff573d6000803e3d6000fd5b50506040516317bad50b60e11b815260048101899052602481018790526001600160a01b0384169250632f75aa169150604401600060405180830381600087803b15801561154c57600080fd5b505af1158015611560573d6000803e3d6000fd5b50506040516320aeff8960e11b815260048101899052600092506001600160a01b038516915063415dff1290602401610ce060405180830381865afa1580156115ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d19190615e68565b6040015190506000607182600381106115ec576115ec615cd2565b015490506000805b8781101561180b5760008a8152606b6020908152604080832054606a8352818420818552909252909120805460ff19166001908117825581018c9055600281018290556003810186905560048101859055600501849055915088888281811061165f5761165f615cd2565b60008d8152606a6020908152604080832088845282529091209102929092013560068301555060070180546001600160a01b031916331790556116a3826001615f41565b60008b8152606b6020908152604080832093909355606c81528282208054600180820183559184528284200186905583516080810185528e81528083018781523382870181815260608401878152607080549687018155909752925160049094027f8f6b23ffa15f0465e3176e15ca644cf24f86dc1312fe715484e3c4aead5eb78b81019490945590517f8f6b23ffa15f0465e3176e15ca644cf24f86dc1312fe715484e3c4aead5eb78c84015590517f8f6b23ffa15f0465e3176e15ca644cf24f86dc1312fe715484e3c4aead5eb78d830180546001600160a01b03199081166001600160a01b039384161790915594517f8f6b23ffa15f0465e3176e15ca644cf24f86dc1312fe715484e3c4aead5eb78e909301805490951692169190911790925591518481528c927f79348131f74fc4e027d69030639333e9dd8bd9cf93210920ea3fc14643ebbe3e910160405180910390a38061180381615e36565b9150506115f4565b506066546001600160a01b03166323b872dd33306118298b87615f59565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af115801561187d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118a19190615e05565b50505050505050505050565b6033546001600160a01b031633146118d75760405162461bcd60e51b815260040161078290615c9d565b6118e160006133b6565b565b600054610100900460ff166118fe5760005460ff1615611902565b303b155b6119655760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610782565b600054610100900460ff16158015611987576000805461ffff19166101011790555b61198f613408565b604080516060810182526801158e460913d0000081526801a055690d9db80000602082015268022b1c8c1227a00000918101919091526119d39060719060036154e7565b5060408051606081018252678ac7230489e8000081526801158e460913d0000060208201526801a055690d9db8000091810191909152611a179060749060036154e7565b5060408051808201909152674563918244f400008152678ac7230489e800006020820152611a49906077906002615522565b506040805160608101825260008152674563918244f400006020820152678ac7230489e8000091810191909152611a8490607990600361555b565b508015611a97576000805461ff00191690555b50565b606c6020528160005260406000208181548110611ab657600080fd5b90600052602060002001600091509150505481565b6033546001600160a01b03163314611af55760405162461bcd60e51b815260040161078290615c9d565b606680546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166000908152606d60209081526040808320805482518185028101850190935280835260609493849084015b82821015611b9c5760008481526020902060408051808201918290529160028581029091019182845b815481526020019060010190808311611b7557505050505081526020019060010190611b4c565b505050509050600081516001600160401b03811115611bbd57611bbd61563f565b604051908082528060200260200182016040528015611bf657816020015b611be361544c565b815260200190600190039081611bdb5790505b50905060005b8251811015611e0557606a6000848381518110611c1b57611c1b615cd2565b6020026020010151600060028110611c3557611c35615cd2565b602002015181526020019081526020016000206000848381518110611c5c57611c5c615cd2565b6020026020010151600160028110611c7657611c76615cd2565b60209081029190910151825281810192909252604090810160002081516101e081018352815460ff161515815260018201549381019390935260028101548383015260038082015460608086019190915260048301546080860152600583015460a0860152600683015460c086015260078301546001600160a01b0390811660e08701526008840154166101008601526009830154610120860152835190810193849052919261014085019291600a85019182845b815481526020019060010190808311611d2b5750505091835250506040805160608101909152602090910190600d830160036000835b82821015611da757604080518082019182905290600284810287019182845b815481526020019060010190808311611d8057505050505081526020019060010190611d61565b50505090825250601382015460208201526014820154604082015260159091015460ff1615156060909101528251839083908110611de757611de7615cd2565b60200260200101819052508080611dfd90615e36565b915050611bfc565b509392505050565b6067546040516321c4542560e21b81526004810189905230602482015288916001600160a01b031690638711509490604401602060405180830381865afa158015611e5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e809190615e05565b8015611f065750336067546040516331a9108f60e11b8152600481018490526001600160a01b039283169290911690636352211e906024016020604051808303816000875af1158015611ed7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611efb9190615ce8565b6001600160a01b0316145b611f4c5760405162461bcd60e51b81526020600482015260176024820152763737ba1039ba30b5b2b21037b9103737ba1037bbb732b960491b6044820152606401610782565b8582148015611f5a57508584145b611f9a5760405162461bcd60e51b8152602060048201526011602482015270496e636f7272656374206c656e6774687360781b6044820152606401610782565b6069546001600160a01b0316336001600160a01b0316146120275760005b868110156120255761201389898984818110611fd657611fd6615cd2565b90506020020135888885818110611fef57611fef615cd2565b90506040020187878681811061200757612007615cd2565b90506020020135613437565b8061201d81615e36565b915050611fb8565b505b5050505050505050565b6067546001600160a01b031660005b828110156120f257816001600160a01b031663c3b527fa85858481811061206957612069615cd2565b90506020020135306120783390565b6040516001600160e01b031960e086901b16815260048101939093526001600160a01b039182166024840152166044820152606401600060405180830381600087803b1580156120c757600080fd5b505af11580156120db573d6000803e3d6000fd5b5050505080806120ea90615e36565b915050612040565b50505050565b6000818152606c602090815260409182902080548351818402810184019094528084526060939283018282801561214e57602002820191906000526020600020905b81548152602001906001019080831161213a575b50505050509050919050565b6000828152606a60209081526040808320848452825280832081516101e081018352815460ff161515815260018201549381019390935260028101548383015260038082015460608086019190915260048301546080860152600583015460a0860152600683015460c086015260078301546001600160a01b0390811660e08701526008840154166101008601526009830154610120860152835190810193849052919261014085019291600a85019182845b81548152602001906001019080831161220d5750505091835250506040805160608101909152602090910190600d830160036000835b8282101561228957604080518082019182905290600284810287019182845b81548152602001906001019080831161226257505050505081526020019060010190612243565b50505090825250601382015460208201526014820154604082015260159091015460ff16151560609091015280519091506123015760405162461bcd60e51b815260206004820152601860248201527753657373696f6e206e6f206c6f6e6765722061637469766560401b6044820152606401610782565b6101008101516001600160a01b0316331461235e5760405162461bcd60e51b815260206004820152601960248201527f6d757374206265207468652062757374657220706c61796572000000000000006044820152606401610782565b6101a08101516123716201518042615e51565b10156123b75760405162461bcd60e51b815260206004820152601560248201527467686f737420706c61796572206861732074696d6560581b6044820152606401610782565b6123c48160006001613c66565b60665461010082015160a083015160405163a9059cbb60e01b81526001600160a01b039093169263a9059cbb92610f1f929091600401615dec565b606d602052826000526040600020828154811061241b57600080fd5b9060005260206000209060020201816002811061243757600080fd5b0154925083915050565b606754336000908152606f60205260409020600301546001600160a01b0391821691166124bc5760405162461bcd60e51b8152602060048201526024808201527f596f752068617665206e6f74206c6f636b656420696e20612073657373696f6e604482015263081e595d60e21b6064820152608401610782565b336000908152606f602090815260408083208054600191820154818652606a8552838620818752855283862084516101e081018652815460ff1615158152938101549584019590955260028501548385015260038086015460608086019190915260048701546080860152600587015460a0860152600687015460c086015260078701546001600160a01b0390811660e0870152600888015416610100860152600987015461012086015285519081019586905292969195919491926101408501929091600a85019182845b8154815260200190600101908083116125885750505091835250506040805160608101909152602090910190600d830160036000835b8282101561260457604080518082019182905290600284810287019182845b8154815260200190600101908083116125dd575050505050815260200190600101906125be565b50505090825250601382015460208201526014820154604082015260159091015460ff161515606090910152905060005b8781101561274a57846001600160a01b031663ccc702308a8a8481811061265e5761265e615cd2565b905060200201356040518263ffffffff1660e01b815260040161268391815260200190565b600060405180830381600087803b15801561269d57600080fd5b505af11580156126b1573d6000803e3d6000fd5b50505050846001600160a01b0316632f75aa168a8a848181106126d6576126d6615cd2565b9050602002013560016040518363ffffffff1660e01b8152600401612705929190918252602082015260400190565b600060405180830381600087803b15801561271f57600080fd5b505af1158015612733573d6000803e3d6000fd5b50505050808061274290615e36565b915050612635565b506127588888888887613d93565b612766888888888787614659565b6000838152606a6020908152604080832085845282529182902042601490910155815133815290810185905280820184905290517f1672eae23529a9b0ac1de0bfdabd150ca14cba776759455856ec36f8a28462cf9181900360600190a160e08101516001600160a01b039081166000908152606e6020818152604080842033808652606f808552838720835460018082018655948952868920825460049092020190815584820154948101949094556002808201549085018054918b166001600160a01b031992831617905560039182015491909401805491909916931692909217909655858552929091528220929091906001600160a01b039081168252602080830193909352604091820160009081208554600180820188559683528583208254600490920201908155868201548188015560028083015481830180549187166001600160a01b031992831617905560039384015492840180549390961692811692909217909455338352606f90955292812081815594850155830180548316905591909101805490911690555050505050505050565b6033546001600160a01b0316331461292a5760405162461bcd60e51b815260040161078290615c9d565b610798607182600361541f565b60778160028110610cb457600080fd5b336000908152606f60205260409020600301546001600160a01b0316156129b05760405162461bcd60e51b815260206004820152601860248201527f416c7265616479206c6f636b656420612073657373696f6e00000000000000006044820152606401610782565b6070546000906129bf33614755565b6129c99190615f78565b9050600080607083815481106129e1576129e1615cd2565b9060005260206000209060040201600001549050600060708481548110612a0a57612a0a615cd2565b90600052602060002090600402016001015490505b336001600160a01b031660708581548110612a3c57612a3c615cd2565b60009182526020909120600260049092020101546001600160a01b03161480612a7f57506000828152606a6020908152604080832084845290915290205460ff16155b15612b585760058310612ad45760405162461bcd60e51b815260206004820152601860248201527f50726576656e74696e6720696e66696e697465206c6f6f7000000000000000006044820152606401610782565b60705484612ae133614755565b612aeb9190615f41565b612af59190615f78565b935060708481548110612b0a57612b0a615cd2565b906000526020600020906004020160000154915060708481548110612b3157612b31615cd2565b90600052602060002090600402016001015490508280612b5090615e36565b935050612a1f565b3360708581548110612b6c57612b6c615cd2565b906000526020600020906004020160030160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600060708581548110612bb657612bb6615cd2565b600091825260208083206040805160808082018352600495860290930180548083526001808301548488019081526002808501546001600160a01b03908116878901526003958601548116606080890191909152948c52606a8a52878c2092518c52918952868b2087516101e081018952815460ff161515815293810154998401999099528801548287015287840154828401529787015495810195909552600586015460a0860152600686015460c08601526007860154871660e08601526008860154909616610100850152600985015461012085015282519586019283905290965091936101408501929091600a8501919082845b815481526020019060010190808311612cad5750505091835250506040805160608101909152602090910190600d830160036000835b82821015612d2957604080518082019182905290600284810287019182845b815481526020019060010190808311612d0257505050505081526020019060010190612ce3565b50505090825250601382015460208201526014820154604082015260159091015460ff1615156060909101526066549091506001600160a01b03166323b872dd33306074856060015160038110612d8257612d82615cd2565b01546040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af1158015612dd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dfc9190615e05565b506074816060015160038110612e1457612e14615cd2565b015482516000908152606a6020908152604080832082870151845290915281206005018054909190612e47908490615f41565b9091555050336000908152606f60209081526040808320855180825586840180516001840155878401516002840180546001600160a01b039283166001600160a01b03199182161790915560608a015160039095018054959092169416939093179092558452606a8352818420815185529092529091204260139091015582519051612ed3919061306e565b505050505050565b6033546001600160a01b03163314612f055760405162461bcd60e51b815260040161078290615c9d565b606880546001600160a01b0319166001600160a01b0392909216919091179055565b60718160038110610cb457600080fd5b6033546001600160a01b03163314612f615760405162461bcd60e51b815260040161078290615c9d565b60665460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90612f939085908590600401615dec565b6020604051808303816000875af1158015612fb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f789190615e05565b6033546001600160a01b031633146130005760405162461bcd60e51b815260040161078290615c9d565b6001600160a01b0381166130655760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610782565b611a97816133b6565b60005b6070548110156131de57826070828154811061308f5761308f615cd2565b9060005260206000209060040201600001541480156130d1575081607082815481106130bd576130bd615cd2565b906000526020600020906004020160010154145b156131cc57607080546130e690600190615e51565b815481106130f6576130f6615cd2565b90600052602060002090600402016070828154811061311757613117615cd2565b6000918252602090912082546004909202019081556001808301549082015560028083015490820180546001600160a01b03199081166001600160a01b03938416179091556003938401549390920180549092169216919091179055607080548061318457613184615f9a565b60008281526020812060046000199093019283020181815560018101919091556002810180546001600160a01b031990811690915560039091018054909116905590556131de565b806131d681615e36565b915050613071565b5060005b6000838152606c6020526040902054811015610f78576000838152606c6020526040902080548391908390811061321b5761321b615cd2565b906000526020600020015414156132d2576000838152606c60205260409020805461324890600190615e51565b8154811061325857613258615cd2565b9060005260206000200154606c6000858152602001908152602001600020828154811061328757613287615cd2565b9060005260206000200181905550606c60008481526020019081526020016000208054806132b7576132b7615f9a565b60019003818190600052602060002001600090559055505050565b806132dc81615e36565b9150506131e2565b6000848152606a60209081526040808320868452825280832060058101849055805460ff191690556001600160a01b0385168352606d82528083208151808301909252878252818301879052805460018101825590845291909220613351926002928302909101916153e1565b506001600160a01b0381166000908152606d60209081526040808320815180830190925287825281830187905280546001810182559084529190922061339f926002928302909101916153e1565b506133ab8285856147ab565b6120f28185856147ab565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff1661342f5760405162461bcd60e51b815260040161078290615fb0565b6118e16149b0565b6066546000858152606a60209081526040808320878452825280832081516101e081018352815460ff161515815260018201549381019390935260028101548383015260038082015460608086019190915260048301546080860152600583015460a0860152600683015460c086015260078301546001600160a01b0390811660e087015260088401548116610100870152600984015461012087015284519182019485905290961695919261014085019291600a85019182845b8154815260200190600101908083116134f25750505091835250506040805160608101909152602090910190600d830160036000835b8282101561356e57604080518082019182905290600284810287019182845b81548152602001906001019080831161354757505050505081526020019060010190613528565b50505090825250601382015460208201526014820154604082015260159091015460ff1615156060918201528101518151919250906135ea5760405162461bcd60e51b815260206004820152601860248201527753657373696f6e206e6f206c6f6e6765722061637469766560401b6044820152606401610782565b600082610120015111801561360c57506101008201516001600160a01b031615155b6136505760405162461bcd60e51b8152602060048201526015602482015274139bc81bdb99481a185cc81c1b185e5959081e595d605a1b6044820152606401610782565b6101808201516000906136666201518042615e51565b10159050600061367689886149e0565b905081156137685761368b8460016000613c66565b60e084015160a085015160405163a9059cbb60e01b81526001600160a01b0388169263a9059cbb926136bf92600401615dec565b6020604051808303816000875af11580156136de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137029190615e05565b5087896000805160206161348339815191528660e00151876101000151878960a001516000604051613738959493929190615ffb565b60405180910390a36000898152606a602090815260408083208b84529091529020601501805460ff191660011790555b816138a15761377989898989614af9565b6137d75760405162461bcd60e51b815260206004820152602960248201527f436f6d6d69746d656e7420696e636f72726563742c20706c6561736520646f206044820152681b9bdd0818da19585d60ba1b6064820152608401610782565b80156138a1576137ea8460006001613c66565b61010084015160a085015160405163a9059cbb60e01b81526001600160a01b0388169263a9059cbb9261381f92600401615dec565b6020604051808303816000875af115801561383e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138629190615e05565b5087896000805160206161348339815191528661010001518760e00151878960a001516000604051613898959493929190615ffb565b60405180910390a35b6000821580156138af575081155b15613c51576138be8589614b5c565b15613b6757607960018661012001516138d79190615e51565b600381106138e7576138e7615cd2565b01548560a001516138f89190615e51565b61010086015160405163a9059cbb60e01b81529192506001600160a01b0388169163a9059cbb9161392d918590600401615dec565b6020604051808303816000875af115801561394c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139709190615e05565b50856001600160a01b031663a9059cbb8660e00151607960018961012001516139999190615e51565b600381106139a9576139a9615cd2565b01546040518363ffffffff1660e01b81526004016139c8929190615dec565b6020604051808303816000875af11580156139e7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a0b9190615e05565b5084610120015160011415613a84576101008501516078546040516340c10f1960e01b81526001600160a01b038916926340c10f1992613a4d92600401615dec565b600060405180830381600087803b158015613a6757600080fd5b505af1158015613a7b573d6000803e3d6000fd5b50505050613af8565b84610120015160021415613af8576101008501516077546040516340c10f1960e01b81526001600160a01b038916926340c10f1992613ac592600401615dec565b600060405180830381600087803b158015613adf57600080fd5b505af1158015613af3573d6000803e3d6000fd5b505050505b613b058560006001613c66565b888a6000805160206161348339815191528761010001518860e001518886607960018d6101200151613b379190615e51565b60038110613b4757613b47615cd2565b0154604051613b5a959493929190615ffb565b60405180910390a3613c51565b60e085015160a086015160405163a9059cbb60e01b81526001600160a01b0389169263a9059cbb92613b9b92600401615dec565b6020604051808303816000875af1158015613bba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613bde9190615e05565b50613bec8560016000613c66565b888a6000805160206161348339815191528760e00151886101000151888a60a001516000604051613c21959493929190615ffb565b60405180910390a360008a8152606a602090815260408083208c84529091529020601501805460ff191660011790555b6118a18a8a8760e001518861010001516132e4565b606854602084015160608501516040516308f0ed1960e41b81526004810192909252841515602483015260448201526001600160a01b0390911690638f0ed19090606401600060405180830381600087803b158015613cc457600080fd5b505af1158015613cd8573d6000803e3d6000fd5b5050505060005b8361012001518110156120f2576068546101408501516001600160a01b0390911690638f0ed190908360038110613d1857613d18615cd2565b602002015160608701516040516001600160e01b031960e085901b168152600481019290925285151560248301526044820152606401600060405180830381600087803b158015613d6857600080fd5b505af1158015613d7c573d6000803e3d6000fd5b505050508080613d8b90615e36565b915050613cdf565b6067546065546001600160a01b039182169116858414613de95760405162461bcd60e51b8152602060048201526011602482015270496e636f7272656374206c656e6774687360781b6044820152606401610782565b60038611801590613df957508515155b613e505760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c7920706c6179207769746820757020746f2033206275737465604482015261727360f01b6064820152608401610782565b336001600160a01b038316636352211e8989600081613e7157613e71615cd2565b905060200201356040518263ffffffff1660e01b8152600401613e9691815260200190565b6020604051808303816000875af1158015613eb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ed99190615ce8565b6001600160a01b031614613eff5760405162461bcd60e51b81526004016107829061602c565b806001600160a01b03166394e5684788886000818110613f2157613f21615cd2565b905060200201356040518263ffffffff1660e01b8152600401613f4691815260200190565b61018060405180830381865afa158015613f64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f889190615d31565b5115613fa65760405162461bcd60e51b815260040161078290616063565b613fc88386866000818110613fbd57613fbd615cd2565b9050604002016149e0565b1561400b5760405162461bcd60e51b8152602060048201526013602482015272189d5cdd195c8c481b9bdd081a5b989bdd5b99606a1b6044820152606401610782565b600286141561425f57336001600160a01b038316636352211e8989600181811061403757614037615cd2565b905060200201356040518263ffffffff1660e01b815260040161405c91815260200190565b6020604051808303816000875af115801561407b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061409f9190615ce8565b6001600160a01b0316146140c55760405162461bcd60e51b81526004016107829061602c565b806001600160a01b03166394e56847888860018181106140e7576140e7615cd2565b905060200201356040518263ffffffff1660e01b815260040161410c91815260200190565b61018060405180830381865afa15801561412a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061414e9190615d31565b511561416c5760405162461bcd60e51b815260040161078290616063565b6141a68585600081811061418257614182615cd2565b9050604002018686600181811061419b5761419b615cd2565b905060400201614d69565b6142005760405162461bcd60e51b815260206004820152602560248201527f6275737465723120706f732063616e6e6f742062652073616d6520617320627560448201526439ba32b91960d91b6064820152608401610782565b6142178386866001818110613fbd57613fbd615cd2565b1561425a5760405162461bcd60e51b8152602060048201526013602482015272189d5cdd195c8c881b9bdd081a5b989bdd5b99606a1b6044820152606401610782565b610c9b565b6003861415610c9b57336001600160a01b038316636352211e8989600181811061428b5761428b615cd2565b905060200201356040518263ffffffff1660e01b81526004016142b091815260200190565b6020604051808303816000875af11580156142cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142f39190615ce8565b6001600160a01b031614801561439a5750336001600160a01b038316636352211e8989600281811061432757614327615cd2565b905060200201356040518263ffffffff1660e01b815260040161434c91815260200190565b6020604051808303816000875af115801561436b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061438f9190615ce8565b6001600160a01b0316145b6143b65760405162461bcd60e51b81526004016107829061602c565b806001600160a01b03166394e56847888860018181106143d8576143d8615cd2565b905060200201356040518263ffffffff1660e01b81526004016143fd91815260200190565b61018060405180830381865afa15801561441b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061443f9190615d31565b511580156144d45750806001600160a01b03166394e568478888600281811061446a5761446a615cd2565b905060200201356040518263ffffffff1660e01b815260040161448f91815260200190565b61018060405180830381865afa1580156144ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144d19190615d31565b51155b6144f05760405162461bcd60e51b815260040161078290616063565b6145068585600081811061418257614182615cd2565b801561453c575061453c8585600081811061452357614523615cd2565b9050604002018686600281811061419b5761419b615cd2565b801561455957506145598585600181811061452357614523615cd2565b6145a55760405162461bcd60e51b815260206004820152601960248201527f62757374657220706f732063616e6e6f742062652073616d65000000000000006044820152606401610782565b6145bc8386866001818110613fbd57613fbd615cd2565b156145ff5760405162461bcd60e51b8152602060048201526013602482015272189d5cdd195c8c881b9bdd081a5b989bdd5b99606a1b6044820152606401610782565b6146168386866002818110613fbd57613fbd615cd2565b15610c9b5760405162461bcd60e51b8152602060048201526013602482015272189d5cdd195c8cc81b9bdd081a5b989bdd5b99606a1b6044820152606401610782565b6000828152606a6020908152604080832084845290915281206008810180546001600160a01b031916331790556009018690555b85811015610c9b578686828181106146a7576146a7615cd2565b6000868152606a6020908152604080832088845282529091209102929092013591600a01905082600381106146de576146de615cd2565b01558484828181106146f2576146f2615cd2565b905060400201606a60008581526020019081526020016000206000848152602001908152602001600020600d01826003811061473057614730615cd2565b60020201906002614742929190615593565b508061474d81615e36565b91505061468d565b6070546040805160609390931b6bffffffffffffffffffffffff191660208085018290523a6034860152426054860152607485019390935260948401528051608881850301815260a89093019052815191012090565b6001600160a01b0383166000908152606e6020526040812054905b818110156149a9576001600160a01b0385166000908152606e602052604090208054859190839081106147fb576147fb615cd2565b90600052602060002090600402016000015414801561485657506001600160a01b0385166000908152606e6020526040902080548491908390811061484257614842615cd2565b906000526020600020906004020160010154145b15614997576001600160a01b0385166000908152606e6020526040902061487e600184615e51565b8154811061488e5761488e615cd2565b9060005260206000209060040201606e6000876001600160a01b03166001600160a01b0316815260200190815260200160002082815481106148d2576148d2615cd2565b6000918252602080832084546004909302019182556001808501549083015560028085015490830180546001600160a01b03199081166001600160a01b0393841617909155600395860154959093018054909316948116949094179091559187168152606e9091526040902080548061494d5761494d615f9a565b60008281526020812060046000199093019283020181815560018101919091556002810180546001600160a01b031990811690915560039091018054909116905590555050505050565b806149a181615e36565b9150506147c6565b5050505050565b600054610100900460ff166149d75760405162461bcd60e51b815260040161078290615fb0565b6118e1336133b6565b6065546040516320aeff8960e11b81526004810184905260009182916001600160a01b039091169063415dff1290602401610ce060405180830381865afa158015614a2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a539190615e68565b80519091506020840135600a8110614a6d57614a6d615cd2565b60200201518335600a8110614a8457614a84615cd2565b602002015160011480614a98575060008335125b80614ab3575060018160200151614aaf919061609a565b8335135b80614ac2575060006020840135125b80614ae0575060018160200151614ad9919061609a565b6020840135135b15614aef576001915050611175565b5060009392505050565b6000848152606a6020908152604080832086845282528083206006015481518084018990528635928101929092529185013560608201526080810184905260a001604051602081830303815290604052805190602001201490505b949350505050565b6065546000906001600160a01b0316815b846101200151811015614d5e57614c768561016001518260038110614b9457614b94615cd2565b6020020151836001600160a01b03166394e568478861014001518560038110614bbf57614bbf615cd2565b60200201516040518263ffffffff1660e01b8152600401614be291815260200190565b61018060405180830381865afa158015614c00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614c249190615d31565b61012001516001600160401b03168761014001518460038110614c4957614c49615cd2565b60200201516040805180820182529089906002908390839080828437600092019190915250614d8b915050565b80614d3c5750614d3c8561016001518260038110614c9657614c96615cd2565b60200201518661014001518360038110614cb257614cb2615cd2565b6020020151604080518082018252908890600290839083908082843760009201919091525050506101608901518515614cec576000614cef565b60025b60ff1660038110614d0257614d02615cd2565b602002015189610160015186600114614d1c576001614d1f565b60025b60ff1660038110614d3257614d32615cd2565b6020020151614f05565b15614d4c57600192505050611175565b80614d5681615e36565b915050614b6d565b506000949350505050565b600082358235148015614d83575060208381013590830135145b159392505050565b600083614e13576000195b60018113614e0d576000195b60018113614dfa578651614db79083906160d9565b8451148015614dd857506020870151614dd19082906160d9565b6020850151145b15614de857600192505050614b54565b80614df28161611a565b915050614da2565b5080614e058161611a565b915050614d96565b50614d5e565b8360011415614e95576001195b60028113614e0d5785518351148015614e4b57506020860151614e449082906160d9565b6020840151145b80614e7457508551614e5e9082906160d9565b8351148015614e74575060208087015190840151145b15614e83576001915050614b54565b80614e8d8161611a565b915050614e20565b8360021415614d5e576001195b60028113614ef9578551614eb79082906160d9565b8351148015614ed857506020860151614ed19082906160d9565b6020840151145b15614ee7576001915050614b54565b80614ef18161611a565b915050614ea2565b50506000949350505050565b6065546040516394e5684760e01b8152600481018690526000916001600160a01b03169081906394e568479060240161018060405180830381865afa158015614f52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614f769190615d31565b61010001516001600160401b031660011415614fac5786518560005b60200201511415614fa7576001915050615308565b615302565b6040516394e5684760e01b8152600481018790526001600160a01b038216906394e568479060240161018060405180830381865afa158015614ff2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906150169190615d31565b61010001516001600160401b0316600214156150ae578351875114801561503e575084518751145b80615056575082518751148015615056575084518751145b8061507a57506020808501519088015114801561507a575060208086015190880151145b8061509f57506020808401519088015114801561509f57506020850151876001614f92565b15614fa7576001915050615308565b6040516394e5684760e01b8152600481018790526001600160a01b038216906394e568479060240161018060405180830381865afa1580156150f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906151189190615d31565b61010001516001600160401b03166003141561513b576020870151856001614f92565b6040516394e5684760e01b8152600481018790526001600160a01b038216906394e568479060240161018060405180830381865afa158015615181573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906151a59190615d31565b61010001516001600160401b03166004141561525c576151c58785615396565b806151d557506151d58784615396565b15614fa7576001195b60028113615256576001195b600282136152435788516151ff9083906160d9565b8751148015615220575060208901516152199082906160d9565b6020880151145b156152315760019350505050615308565b8161523b8161611a565b9250506151ea565b508061524e8161611a565b9150506151de565b50615302565b6040516394e5684760e01b8152600481018790526001600160a01b038216906394e568479060240161018060405180830381865afa1580156152a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906152c69190615d31565b61010001516001600160401b031660051415615302578651855114806152f3575060208088015190860151145b15615302576001915050615308565b60009150505b95945050505050565b60028113615389576001195b600282136153765787516153329083906160d9565b86511480156153535750602088015161534c9082906160d9565b6020870151145b156153645760019350505050614b54565b8161536e8161611a565b92505061531d565b50806153818161611a565b915050615311565b5050600095945050505050565b6020810151815160009182916153ac91906160d9565b602085015185516153bd91906160d9565b6153c7919061609a565b905060018113158015614b54575060001913159392505050565b826002810192821561540f579160200282015b8281111561540f5782518255916020019190600101906153f4565b5061541b9291506155c1565b5090565b826003810192821561540f579160200282018281111561540f5782518255916020019190600101906153f4565b604051806101e0016040528060001515815260200160008152602001600081526020016000815260200160008152602001600081526020016000801916815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016154bd6155d6565b81526020016154ca6155f4565b815260200160008152602001600081526020016000151581525090565b826003810192821561540f579160200282015b8281111561540f578251829068ffffffffffffffffff169055916020019190600101906154fa565b826002810192821561540f579160200282015b8281111561540f57825182906001600160401b0316905591602001919060010190615535565b826003810192821561540f579160200282018281111561540f57825182906001600160401b0316905591602001919060010190615535565b826002810192821561540f579160200282015b8281111561540f5782358255916020019190600101906155a6565b5b8082111561541b57600081556001016155c2565b60405180606001604052806003906020820280368337509192915050565b60405180606001604052806003905b61560b615621565b8152602001906001900390816156035790505090565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b600052604160045260246000fd5b60405161018081016001600160401b03811182821017156156785761567861563f565b60405290565b604051608081016001600160401b03811182821017156156785761567861563f565b60405161014081016001600160401b03811182821017156156785761567861563f565b6000604082840312156156d557600080fd5b82601f8301126156e457600080fd5b604051604081018181106001600160401b03821117156157065761570661563f565b806040525080604084018581111561571d57600080fd5b845b8181101561573757803583526020928301920161571f565b509195945050505050565b60006060828403121561575457600080fd5b82601f83011261576357600080fd5b604051606081018181106001600160401b03821117156157855761578561563f565b60405280606084018581111561571d57600080fd5b6001600160a01b0381168114611a9757600080fd5b6000602082840312156157c157600080fd5b81356110048161579a565b600080604083850312156157df57600080fd5b82356157ea8161579a565b946020939093013593505050565b60008083601f84011261580a57600080fd5b5081356001600160401b0381111561582157600080fd5b6020830191508360208260051b850101111561583c57600080fd5b9250929050565b6000806020838503121561585657600080fd5b82356001600160401b0381111561586c57600080fd5b615878858286016157f8565b90969095509350505050565b60006020828403121561589657600080fd5b5035919050565b600080604083850312156158b057600080fd5b50508035926020909101359150565b6000806000608084860312156158d457600080fd5b8335925060608401858111156158e957600080fd5b60208501925080359150509250925092565b8060005b60038110156120f25781518452602093840193909101906001016158ff565b806000805b60038110156149a957825185835b6002811015615950578251825260209283019290910190600101615931565b5050506040949094019360209290920191600101615923565b8051151582526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c083015260e08101516159c560e08401826001600160a01b03169052565b50610100818101516001600160a01b0316908301526101208082015190830152610140808201516159f8828501826158fb565b50506101608101516101a0615a0f8185018361591e565b610180830151610260850152820151610280840152506101c0015115156102a090910152565b6102c081016111758284615969565b600080600060408486031215615a5957600080fd5b8335925060208401356001600160401b03811115615a7657600080fd5b615a82868287016157f8565b9497909650939450505050565b6020808252825182820181905260009190848201906040850190845b81811015615ad257615abe838551615969565b928401926102c09290920191600101615aab565b50909695505050505050565b60008083601f840112615af057600080fd5b5081356001600160401b03811115615b0757600080fd5b6020830191508360208260061b850101111561583c57600080fd5b60008060008060008060006080888a031215615b3d57600080fd5b8735965060208801356001600160401b0380821115615b5b57600080fd5b615b678b838c016157f8565b909850965060408a0135915080821115615b8057600080fd5b615b8c8b838c01615ade565b909650945060608a0135915080821115615ba557600080fd5b50615bb28a828b016157f8565b989b979a50959850939692959293505050565b6020808252825182820181905260009190848201906040850190845b81811015615ad257835183529284019291840191600101615be1565b600080600060608486031215615c1257600080fd5b8335615c1d8161579a565b95602085013595506040909401359392505050565b60008060008060408587031215615c4857600080fd5b84356001600160401b0380821115615c5f57600080fd5b615c6b888389016157f8565b90965094506020870135915080821115615c8457600080fd5b50615c9187828801615ade565b95989497509550505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060208284031215615cfa57600080fd5b81516110048161579a565b80518015158114615d1557600080fd5b919050565b80516001600160401b0381168114615d1557600080fd5b60006101808284031215615d4457600080fd5b615d4c615655565b615d5583615d05565b81526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e0820152610100615dab818501615d1a565b90820152610120615dbd848201615d1a565b90820152610140615dcf848201615d1a565b90820152610160615de1848201615d1a565b908201529392505050565b6001600160a01b03929092168252602082015260400190565b600060208284031215615e1757600080fd5b61100482615d05565b634e487b7160e01b600052601160045260246000fd5b6000600019821415615e4a57615e4a615e20565b5060010190565b600082821015615e6357615e63615e20565b500390565b6000610ce08284031215615e7b57600080fd5b615e8361567e565b601f8481850112615e9357600080fd5b615e9b6156a0565b80610c80860187811115615eae57600080fd5b865b81811015615f11578885820112615ec75760008081fd5b615ecf6156a0565b8061014083018b811115615ee35760008081fd5b835b81811015615efd578051845260209384019301615ee5565b505085525060209093019261014001615eb0565b509084525160208401525050610ca08301516040820152615f35610cc08401615d05565b60608201529392505050565b60008219821115615f5457615f54615e20565b500190565b6000816000190483118215151615615f7357615f73615e20565b500290565b600082615f9557634e487b7160e01b600052601260045260246000fd5b500690565b634e487b7160e01b600052603160045260246000fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b03958616815293909416602084015260408301919091526060820152608081019190915260a00190565b6020808252601d908201527f4e6f74207374616b6564206f72206e6f7420796f757220627573746572000000604082015260600190565b6020808252601b908201527f596f752063616e277420706c6179207769746820612067686f73740000000000604082015260600190565b60008083128015600160ff1b8501841216156160b8576160b8615e20565b6001600160ff1b03840183138116156160d3576160d3615e20565b50500390565b600080821280156001600160ff1b03849003851316156160fb576160fb615e20565b600160ff1b839003841281161561611457616114615e20565b50500190565b60006001600160ff1b03821415615e4a57615e4a615e2056feb50a5330a1d22e4c86e141658e745abecd71401f198a58ce9385a2b74c615ef4a2646970667358221220ca6b90e38ab9daa00c8339eb282f565f9ac5cf84f048ab40fb998db8bc192d3564736f6c634300080a0033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.