ETH Price: $2,207.47 (-4.92%)

Contract

0x1bd1fE123FE9f6c05F97390b00d38af4cD2f6d61
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Paused139008072021-12-29 14:36:481157 days ago1640788608IN
0x1bd1fE12...4cD2f6d61
0 ETH0.00315891112.61721914
Claim Many From ...138968162021-12-28 23:56:261157 days ago1640735786IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0170395198.38680228
Claim Many From ...138931472021-12-28 10:19:041158 days ago1640686744IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0182304744.89468488
Claim Many From ...138923362021-12-28 7:19:001158 days ago1640675940IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0233622197.30729817
Claim Many From ...138902332021-12-27 23:22:461158 days ago1640647366IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0205675166.0214106
Claim Many From ...138899982021-12-27 22:31:201158 days ago1640644280IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0164778550.66788273
Remove From Wait...138897532021-12-27 21:38:421158 days ago1640641122IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0067277563.7321053
Claim Many From ...138897182021-12-27 21:31:541158 days ago1640640714IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0874684654.78070721
Claim Many From ...138896462021-12-27 21:18:151158 days ago1640639895IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0234650675.34668543
Claim Many From ...138893272021-12-27 20:12:081158 days ago1640635928IN
0x1bd1fE12...4cD2f6d61
0 ETH0.05089296107.48840183
Claim Many From ...138890232021-12-27 19:02:521158 days ago1640631772IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0161137166.30831909
Claim Many From ...138879782021-12-27 14:56:001159 days ago1640616960IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0116285174.5565816
Claim Many From ...138879742021-12-27 14:55:061159 days ago1640616906IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0115828974.26405557
Claim Many From ...138879702021-12-27 14:54:281159 days ago1640616868IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0135831973.77121198
Claim Many From ...138875052021-12-27 13:11:031159 days ago1640610663IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0195373762.94745187
Claim Many From ...138866282021-12-27 9:59:521159 days ago1640599192IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0115526745.33626955
Claim Many From ...138864742021-12-27 9:23:451159 days ago1640597025IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0114030649.06991709
Claim Many From ...138864132021-12-27 9:12:341159 days ago1640596354IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0083364834.80756537
Claim Many From ...138861282021-12-27 8:14:211159 days ago1640592861IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0152228536
Claim Many From ...138859392021-12-27 7:35:331159 days ago1640590533IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0202170950.12891776
Claim Many From ...138858932021-12-27 7:25:521159 days ago1640589952IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0112365252.06046539
Claim Many From ...138857692021-12-27 6:58:461159 days ago1640588326IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0190708159.46732134
Claim Many From ...138855292021-12-27 5:57:501159 days ago1640584670IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0332427265.9632811
Claim Many From ...138855242021-12-27 5:56:371159 days ago1640584597IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0123264466.67989976
Claim Many From ...138853972021-12-27 5:26:491159 days ago1640582809IN
0x1bd1fE12...4cD2f6d61
0 ETH0.0158491255.01944269
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
138968162021-12-28 23:56:261157 days ago1640735786
0x1bd1fE12...4cD2f6d61
0 ETH
138968162021-12-28 23:56:261157 days ago1640735786
0x1bd1fE12...4cD2f6d61
0 ETH
138968042021-12-28 23:53:091157 days ago1640735589
0x1bd1fE12...4cD2f6d61
0 ETH
138968042021-12-28 23:53:091157 days ago1640735589
0x1bd1fE12...4cD2f6d61
0 ETH
138968042021-12-28 23:53:091157 days ago1640735589
0x1bd1fE12...4cD2f6d61
0 ETH
138968042021-12-28 23:53:091157 days ago1640735589
0x1bd1fE12...4cD2f6d61
0 ETH
138968042021-12-28 23:53:091157 days ago1640735589
0x1bd1fE12...4cD2f6d61
0 ETH
138968042021-12-28 23:53:091157 days ago1640735589
0x1bd1fE12...4cD2f6d61
0 ETH
138968042021-12-28 23:53:091157 days ago1640735589
0x1bd1fE12...4cD2f6d61
0 ETH
138968042021-12-28 23:53:091157 days ago1640735589
0x1bd1fE12...4cD2f6d61
0 ETH
138968042021-12-28 23:53:091157 days ago1640735589
0x1bd1fE12...4cD2f6d61
0 ETH
138968002021-12-28 23:51:181157 days ago1640735478
0x1bd1fE12...4cD2f6d61
0 ETH
138968002021-12-28 23:51:181157 days ago1640735478
0x1bd1fE12...4cD2f6d61
0 ETH
138952562021-12-28 18:07:511157 days ago1640714871
0x1bd1fE12...4cD2f6d61
0 ETH
138952562021-12-28 18:07:511157 days ago1640714871
0x1bd1fE12...4cD2f6d61
0 ETH
138931472021-12-28 10:19:041158 days ago1640686744
0x1bd1fE12...4cD2f6d61
0 ETH
138931472021-12-28 10:19:041158 days ago1640686744
0x1bd1fE12...4cD2f6d61
0 ETH
138931472021-12-28 10:19:041158 days ago1640686744
0x1bd1fE12...4cD2f6d61
0 ETH
138931472021-12-28 10:19:041158 days ago1640686744
0x1bd1fE12...4cD2f6d61
0 ETH
138931472021-12-28 10:19:041158 days ago1640686744
0x1bd1fE12...4cD2f6d61
0 ETH
138931472021-12-28 10:19:041158 days ago1640686744
0x1bd1fE12...4cD2f6d61
0 ETH
138931472021-12-28 10:19:041158 days ago1640686744
0x1bd1fE12...4cD2f6d61
0 ETH
138931472021-12-28 10:19:041158 days ago1640686744
0x1bd1fE12...4cD2f6d61
0 ETH
138923362021-12-28 7:19:001158 days ago1640675940
0x1bd1fE12...4cD2f6d61
0 ETH
138923362021-12-28 7:19:001158 days ago1640675940
0x1bd1fE12...4cD2f6d61
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Hive

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : Hive.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./ICryptoBees.sol";
import "./IHoney.sol";
import "./IHive.sol";
import "./IAttack.sol";

contract Hive is IHive, Ownable, IERC721Receiver, Pausable {
    using Strings for uint256;
    using Strings for uint48;
    using Strings for uint32;
    using Strings for uint16;
    using Strings for uint8;

    event AddedToHive(address indexed owner, uint256 indexed hiveId, uint256 tokenId, uint256 timestamp);
    event AddedToWaitingRoom(address indexed owner, uint256 indexed tokenId, uint256 timestamp);
    event RemovedFromWaitingRoom(address indexed owner, uint256 indexed tokenId, uint256 timestamp);
    event TokenClaimed(address indexed owner, uint256 indexed tokenId, uint256 earned);
    event HiveRestarted(uint256 indexed hiveId);
    event HiveFull(address indexed owner, uint256 hiveId, uint256 tokenId, uint256 timestamp);

    // contract references
    ICryptoBees beesContract;
    IAttack attackContract;

    // maps tokenId to hives
    mapping(uint256 => BeeHive) public hives;

    mapping(uint256 => Bee) public waitingRoom;

    // bee must have stay 1 day in the hive
    uint256 public constant MINIMUM_TO_EXIT = 1 days;

    // number of Bees staked
    uint256 public totalBeesStaked;
    // hive to stake in
    uint256 public availableHive;
    // extra hives above minted / 100
    uint256 public extraHives = 2;
    // emergency rescue to allow unstaking without any checks but without $HONEY
    bool public rescueEnabled = false;

    constructor() {}

    function setContracts(address _BEES, address _ATTACK) external onlyOwner {
        beesContract = ICryptoBees(_BEES);
        attackContract = IAttack(_ATTACK);
    }

    /** STAKING */

    /**
     * calculates how much $honey a bee got so far
     * it's progressive based on the hive age
     * it's precalculated off chain to save gas
     */
    // how much a hive creates honey each day of it's life
    uint16[] accDaily = [400, 480, 576, 690, 830, 1000, 1200];
    uint16[] accCombined = [400, 880, 1456, 2146, 2976, 3976, 5176];

    function calculateAccumulation(uint256 start, uint256 end) internal view returns (uint256 owed) {
        uint256 d = (end - start) / 1 days;
        if (d > 6) d = 6;
        uint256 left = end - start;
        if (left > d * 1 days) left = left - (d * 1 days);
        else left = 0;
        if (d > 0) owed = accCombined[d - 1];
        owed += ((left * accDaily[d]) / 1 days);
    }

    function calculateBeeOwed(uint256 hiveId, uint256 tokenId) public view returns (uint256 owed) {
        uint256 since = hives[hiveId].bees[tokenId].since;
        owed = calculateAccumulation(hives[hiveId].startedTimestamp, block.timestamp);
        if (since > hives[hiveId].startedTimestamp) {
            owed -= calculateAccumulation(hives[hiveId].startedTimestamp, since);
        }
        if (since < hives[hiveId].lastCollectedHoneyTimestamp && hives[hiveId].startedTimestamp < hives[hiveId].lastCollectedHoneyTimestamp) {
            if (owed > hives[hiveId].collectionAmountPerBee) owed -= hives[hiveId].collectionAmountPerBee;
            else owed = 0;
        }
    }

    /**
     * stakes an unknown Token type
     * @param account the address of the staker
     * @param tokenId the ID of the Token to add
     */
    function addToWaitingRoom(address account, uint256 tokenId) external whenNotPaused {
        require(_msgSender() == address(beesContract), "HIVE:ADD TO WAITING ROOM:ONLY BEES CONTRACT");
        waitingRoom[tokenId] = Bee({owner: account, tokenId: uint16(tokenId), index: 0, since: uint48(block.timestamp)});
        emit AddedToWaitingRoom(account, tokenId, block.timestamp);
    }

    /**
     * either unstakes or adds to hive
     * @param tokenId the ID of the token
     */
    function removeFromWaitingRoom(uint256 tokenId, uint256 hiveId) external whenNotPaused {
        Bee memory token = waitingRoom[tokenId];
        if (token.tokenId > 0 && beesContract.getTokenData(token.tokenId)._type == 1) {
            if (availableHive != 0 && hiveId == 0 && hives[availableHive].beesArray.length < 100) hiveId = availableHive;
            if (hiveId == 0) {
                uint256 totalHives = ((beesContract.getMinted() / 100) + extraHives);
                for (uint256 i = 1; i <= totalHives; i++) {
                    if (hives[i].beesArray.length < 100) {
                        hiveId = i;
                        availableHive = i;
                        break;
                    }
                }
            }
            _addBeeToHive(token.owner, tokenId, hiveId);
            delete waitingRoom[tokenId];
        } else if (token.tokenId > 0 && beesContract.getTokenData(token.tokenId)._type > 1) {
            beesContract.performSafeTransferFrom(address(this), _msgSender(), tokenId); // send the bear/beekeeper back
            delete waitingRoom[tokenId];
            emit TokenClaimed(_msgSender(), tokenId, 0);
        } else if (token.tokenId > 0) {
            require(_msgSender() == owner() || token.owner == _msgSender(), "CANNOT REMOVE UNREVEALED TOKEN");
            beesContract.performSafeTransferFrom(address(this), _msgSender(), tokenId); // send the bear/beekeeper back
            delete waitingRoom[tokenId];
            emit TokenClaimed(_msgSender(), tokenId, 0);
        }
    }

    /**
     * adds Bees to the Hive
     * @param account the address of the staker
     * @param tokenIds the IDs of the Bees
     * @param hiveIds the IDs of the Hives
     */
    function addManyToHive(
        address account,
        uint16[] calldata tokenIds,
        uint16[] calldata hiveIds
    ) external whenNotPaused {
        require(account == _msgSender() || _msgSender() == address(beesContract), "DONT GIVE YOUR TOKENS AWAY");
        require(tokenIds.length == hiveIds.length, "THE ARGUMENTS LENGTHS DO NOT MATCH");
        uint256 totalHives = ((beesContract.getMinted() / 100) + extraHives);
        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(beesContract.getTokenData(tokenIds[i])._type == 1, "TOKEN MUST BE A BEE");

            require(totalHives >= hiveIds[i], "HIVE NOT AVAILABLE");

            // dont do this step if its a mint + stake
            if (_msgSender() != address(beesContract)) {
                require(beesContract.getOwnerOf(tokenIds[i]) == _msgSender(), "AINT YO TOKEN");
                beesContract.performTransferFrom(_msgSender(), address(this), tokenIds[i]);
            }
            _addBeeToHive(account, tokenIds[i], hiveIds[i]);
        }
    }

    /**
     * adds a single Bee to a specific Hive
     * @param account the address of the staker
     * @param tokenId the ID of the Bee to add
     * @param hiveId the ID of the Hive
     */
    function _addBeeToHive(
        address account,
        uint256 tokenId,
        uint256 hiveId
    ) internal {
        uint256 index = hives[hiveId].beesArray.length;
        require(index < 100, "HIVE IS FULL");
        require(hiveId > 0, "HIVE 0 NOT AVAILABLE");
        if (hives[hiveId].startedTimestamp == 0) hives[hiveId].startedTimestamp = uint32(block.timestamp);
        hives[hiveId].bees[tokenId] = Bee({owner: account, tokenId: uint16(tokenId), index: uint8(index), since: uint48(block.timestamp)});
        hives[hiveId].beesArray.push(uint16(tokenId));
        if (hives[hiveId].beesArray.length < 90 && availableHive != hiveId) {
            availableHive = hiveId;
        }
        totalBeesStaked += 1;
        emit AddedToHive(account, hiveId, tokenId, block.timestamp);
    }

    /** CLAIMING / UNSTAKING */

    /**
     * change hive or unstake and realize $HONEY earnings
     * it requires it has 1 day worth of $HONEY unclaimed
     * @param tokenIds the IDs of the tokens to claim earnings from
     * @param hiveIds the IDs of the Hives for each Bee
     * @param newHiveIds the IDs of new Hives (or to unstake if it's -1)
     */
    function claimManyFromHive(
        uint16[] calldata tokenIds,
        uint16[] calldata hiveIds,
        uint16[] calldata newHiveIds
    ) external whenNotPaused {
        require(tokenIds.length == hiveIds.length && tokenIds.length == newHiveIds.length, "THE ARGUMENTS LENGTHS DO NOT MATCH");
        for (uint256 i = 0; i < tokenIds.length; i++) {
            _claimBeeFromHive(tokenIds[i], hiveIds[i], newHiveIds[i]);
        }
    }

    /**
     * change hive or unstake and realize $HONEY earnings
     * @param tokenId the ID of the Bee to claim earnings from
     * @param hiveId the ID of the Hive where the Bee is
     * @param newHiveId the ID of the Hive where the Bee want to go (-1 for unstake)
     * @return owed - the amount of $HONEY earned
     */
    function _claimBeeFromHive(
        uint256 tokenId,
        uint256 hiveId,
        uint256 newHiveId
    ) internal returns (uint256 owed) {
        Bee memory bee = hives[hiveId].bees[tokenId];
        require(bee.owner == _msgSender(), "YOU ARE NOT THE OWNER");
        if (!rescueEnabled) {
            require(block.timestamp - bee.since > MINIMUM_TO_EXIT, "YOU NEED MORE HONEY TO GET OUT OF THE HIVE");
        }
        owed = calculateBeeOwed(hiveId, tokenId);
        beesContract.increaseTokensPot(bee.owner, owed);
        if (newHiveId == 0) {
            beesContract.performSafeTransferFrom(address(this), _msgSender(), tokenId); // send the bee back
            uint256 index = hives[hiveId].bees[tokenId].index;

            if (index != hives[hiveId].beesArray.length - 1) {
                uint256 lastIndex = hives[hiveId].beesArray.length - 1;
                uint256 lastTokenIndex = hives[hiveId].beesArray[lastIndex];
                hives[hiveId].beesArray[index] = uint16(lastTokenIndex);
                hives[hiveId].bees[lastTokenIndex].index = uint8(index);
            }
            hives[hiveId].beesArray.pop();
            delete hives[hiveId].bees[tokenId];

            totalBeesStaked -= 1;
            emit TokenClaimed(_msgSender(), tokenId, owed);
        } else if (hives[newHiveId].beesArray.length < 100) {
            uint256 index = hives[hiveId].bees[tokenId].index;
            if (index != hives[hiveId].beesArray.length - 1) {
                uint256 lastIndex = hives[hiveId].beesArray.length - 1;
                uint256 lastTokenIndex = hives[hiveId].beesArray[lastIndex];
                hives[hiveId].beesArray[index] = uint16(lastTokenIndex);
                hives[hiveId].bees[lastTokenIndex].index = uint8(index);
            }
            hives[hiveId].beesArray.pop();
            delete hives[hiveId].bees[tokenId];

            uint256 newIndex = hives[newHiveId].beesArray.length;
            hives[newHiveId].bees[tokenId] = Bee({owner: _msgSender(), tokenId: uint16(tokenId), index: uint8(newIndex), since: uint48(block.timestamp)}); // reset stake
            if (hives[newHiveId].startedTimestamp == 0) hives[newHiveId].startedTimestamp = uint32(block.timestamp);
            hives[newHiveId].beesArray.push(uint16(tokenId));
            if (newIndex < 90 && availableHive != newHiveId) {
                availableHive = newHiveId;
            }
            emit AddedToHive(_msgSender(), newHiveId, tokenId, block.timestamp);
        } else {
            emit HiveFull(_msgSender(), newHiveId, tokenId, block.timestamp);
        }
    }

    // GETTERS / SETTERS
    function getLastStolenHoneyTimestamp(uint256 hiveId) external view returns (uint256 lastStolenHoneyTimestamp) {
        lastStolenHoneyTimestamp = hives[hiveId].lastStolenHoneyTimestamp;
    }

    function getHiveProtectionBears(uint256 hiveId) external view returns (uint256 hiveProtectionBears) {
        hiveProtectionBears = hives[hiveId].hiveProtectionBears;
    }

    function isHiveProtectedFromKeepers(uint256 hiveId) external view returns (bool) {
        return hives[hiveId].collectionAmount > 0 ? true : false;
    }

    function getHiveOccupancy(uint256 hiveId) external view returns (uint256 occupancy) {
        occupancy = hives[hiveId].beesArray.length;
    }

    function getBeeSinceTimestamp(uint256 hiveId, uint256 tokenId) external view returns (uint256 since) {
        since = hives[hiveId].bees[tokenId].since;
    }

    function getBeeTokenId(uint256 hiveId, uint256 index) external view returns (uint256 tokenId) {
        tokenId = hives[hiveId].beesArray[index];
    }

    function setBeeSince(
        uint256 hiveId,
        uint256 tokenId,
        uint48 since
    ) external {
        require(_msgSender() == address(attackContract), "ONLY ATTACK CONTRACT CAN CALL THIS");
        hives[hiveId].bees[tokenId].since = since;
    }

    function incSuccessfulAttacks(uint256 hiveId) external {
        require(_msgSender() == address(attackContract), "ONLY ATTACK CONTRACT CAN CALL THIS");
        hives[hiveId].successfulAttacks += 1;
    }

    function incTotalAttacks(uint256 hiveId) external {
        require(_msgSender() == address(attackContract), "ONLY ATTACK CONTRACT CAN CALL THIS");
        hives[hiveId].totalAttacks += 1;
    }

    function setBearAttackData(
        uint256 hiveId,
        uint32 timestamp,
        uint32 protection
    ) external {
        require(_msgSender() == address(attackContract), "ONLY ATTACK CONTRACT CAN CALL THIS");
        hives[hiveId].lastStolenHoneyTimestamp = timestamp;
        hives[hiveId].hiveProtectionBears = protection;
    }

    function setKeeperAttackData(
        uint256 hiveId,
        uint32 timestamp,
        uint32 collected,
        uint32 collectedPerBee
    ) external {
        require(_msgSender() == address(attackContract), "ONLY ATTACK CONTRACT CAN CALL THIS");
        hives[hiveId].lastCollectedHoneyTimestamp = timestamp;
        hives[hiveId].collectionAmount = collected;
        hives[hiveId].collectionAmountPerBee = collectedPerBee;
    }

    function resetHive(uint256 hiveId) external {
        require(_msgSender() == address(attackContract) || _msgSender() == owner(), "ONLY ATTACK CONTRACT CAN CALL THIS");
        hives[hiveId].startedTimestamp = uint32(block.timestamp);
        hives[hiveId].lastCollectedHoneyTimestamp = 0;
        hives[hiveId].hiveProtectionBears = 0;
        hives[hiveId].lastStolenHoneyTimestamp = 0;
        hives[hiveId].collectionAmount = 0;
        hives[hiveId].collectionAmountPerBee = 0;
        hives[hiveId].successfulAttacks = 0;
        hives[hiveId].totalAttacks = 0;
        emit HiveRestarted(hiveId);
    }

    /** ADMIN */

    function setRescueEnabled(bool _enabled) external onlyOwner {
        rescueEnabled = _enabled;
    }

    function setExtraHives(uint256 _extra) external onlyOwner {
        extraHives = _extra;
    }

    function setPaused(bool _paused) external onlyOwner {
        if (_paused) _pause();
        else _unpause();
    }

    function setAvailableHive(uint256 _hiveId) external onlyOwner {
        availableHive = _hiveId;
    }

    /** READ ONLY */

    function getInfoOnBee(uint256 tokenId, uint256 hiveId) public view returns (Bee memory) {
        return hives[hiveId].bees[tokenId];
    }

    function getHiveAge(uint256 hiveId) external view returns (uint32) {
        return hives[hiveId].startedTimestamp;
    }

    function getHiveSuccessfulAttacks(uint256 hiveId) external view returns (uint8) {
        return hives[hiveId].successfulAttacks;
    }

    function getWaitingRoomOwner(uint256 tokenId) external view returns (address) {
        return waitingRoom[tokenId].owner;
    }

    function getInfoOnHive(uint256 hiveId) public view returns (string memory) {
        return
            string(
                abi.encodePacked(
                    uint32(hives[hiveId].startedTimestamp).toString(),
                    ",",
                    uint32(hives[hiveId].lastCollectedHoneyTimestamp).toString(),
                    ",",
                    uint32(hives[hiveId].lastStolenHoneyTimestamp).toString(),
                    ",",
                    uint32(hives[hiveId].hiveProtectionBears).toString(),
                    ",",
                    uint32(hives[hiveId].collectionAmount).toString(),
                    ",",
                    uint16(hives[hiveId].beesArray.length).toString(),
                    ",",
                    uint8(hives[hiveId].successfulAttacks).toString(),
                    ",",
                    uint8(hives[hiveId].totalAttacks).toString()
                )
            );
    }

    function getInfoOnHives(uint256 _start, uint256 _to) public view returns (string memory) {
        string memory result;
        uint256 minted = beesContract.getMinted();
        if (minted == 0) minted = 1;
        uint256 to = _to > 0 ? _to : ((minted / 100) + extraHives);
        uint256 start = _start > 0 ? _start : 1;
        for (uint256 i = start; i <= to; i++) {
            result = string(abi.encodePacked(result, uint16(i).toString(), ":", getInfoOnHive(i), ";"));
        }
        return result;
    }

    function onERC721Received(
        address,
        address from,
        uint256,
        bytes calldata
    ) external pure override returns (bytes4) {
        require(from == address(0x0), "Cannot send tokens to Hive directly");
        return IERC721Receiver.onERC721Received.selector;
    }
}

File 2 of 10 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 3 of 10 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

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

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

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

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

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

File 4 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * 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 Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _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);
    }
}

File 5 of 10 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 6 of 10 : ICryptoBees.sol
//Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

// import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

interface ICryptoBees {
    struct Token {
        uint8 _type;
        uint8 color;
        uint8 eyes;
        uint8 mouth;
        uint8 nose;
        uint8 hair;
        uint8 accessory;
        uint8 feelers;
        uint8 strength;
        uint48 lastAttackTimestamp;
        uint48 cooldownTillTimestamp;
    }

    function getMinted() external view returns (uint256 m);

    function increaseTokensPot(address _owner, uint256 amount) external;

    function updateTokensLastAttack(
        uint256 tokenId,
        uint48 timestamp,
        uint48 till
    ) external;

    function mint(
        address addr,
        uint256 tokenId,
        bool stake
    ) external;

    function setPaused(bool _paused) external;

    function getTokenData(uint256 tokenId) external view returns (Token memory token);

    function getOwnerOf(uint256 tokenId) external view returns (address);

    function doesExist(uint256 tokenId) external view returns (bool exists);

    function performTransferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external;

    function performSafeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;
}

File 7 of 10 : IHoney.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.9;

interface IHoney {
    function mint(address to, uint256 amount) external;

    function mintGiveaway(address[] calldata addresses, uint256 amount) external;

    function burn(address from, uint256 amount) external;

    function disableGiveaway() external;

    function addController(address controller) external;

    function removeController(address controller) external;
}

File 8 of 10 : IHive.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.9;

interface IHive {
    struct Bee {
        address owner;
        uint32 tokenId;
        uint48 since;
        uint8 index;
    }

    struct BeeHive {
        uint32 startedTimestamp;
        uint32 lastCollectedHoneyTimestamp;
        uint32 hiveProtectionBears;
        uint32 lastStolenHoneyTimestamp;
        uint32 collectionAmount;
        uint32 collectionAmountPerBee;
        uint8 successfulAttacks;
        uint8 totalAttacks;
        mapping(uint256 => Bee) bees;
        uint16[] beesArray;
    }

    function addManyToHive(
        address account,
        uint16[] calldata tokenIds,
        uint16[] calldata hiveIds
    ) external;

    function claimManyFromHive(
        uint16[] calldata tokenIds,
        uint16[] calldata hiveIds,
        uint16[] calldata newHiveIds
    ) external;

    function addToWaitingRoom(address account, uint256 tokenId) external;

    function removeFromWaitingRoom(uint256 tokenId, uint256 hiveId) external;

    function setRescueEnabled(bool _enabled) external;

    function setPaused(bool _paused) external;

    function setBeeSince(
        uint256 hiveId,
        uint256 tokenId,
        uint48 since
    ) external;

    function calculateBeeOwed(uint256 hiveId, uint256 tokenId) external view returns (uint256 owed);

    function incSuccessfulAttacks(uint256 hiveId) external;

    function incTotalAttacks(uint256 hiveId) external;

    function setBearAttackData(
        uint256 hiveId,
        uint32 timestamp,
        uint32 protection
    ) external;

    function setKeeperAttackData(
        uint256 hiveId,
        uint32 timestamp,
        uint32 collected,
        uint32 collectedPerBee
    ) external;

    function getLastStolenHoneyTimestamp(uint256 hiveId) external view returns (uint256 lastStolenHoneyTimestamp);

    function getHiveProtectionBears(uint256 hiveId) external view returns (uint256 hiveProtectionBears);

    function isHiveProtectedFromKeepers(uint256 hiveId) external view returns (bool);

    function getHiveOccupancy(uint256 hiveId) external view returns (uint256 occupancy);

    function getBeeSinceTimestamp(uint256 hiveId, uint256 tokenId) external view returns (uint256 since);

    function getBeeTokenId(uint256 hiveId, uint256 index) external view returns (uint256 tokenId);

    function getHiveAge(uint256 hiveId) external view returns (uint32);

    function getHiveSuccessfulAttacks(uint256 hiveId) external view returns (uint8);

    function getWaitingRoomOwner(uint256 tokenId) external view returns (address);

    function resetHive(uint256 hiveId) external;
}

File 9 of 10 : IAttack.sol
// SPDX-License-Identifier: MIT LICENSE

pragma solidity ^0.8.9;

interface IAttack {
    struct Settings {
        uint8 bearChance;
        uint8 beekeeperMultiplier;
        uint24 hiveProtectionBear;
        uint24 hiveProtectionKeeper;
        uint24 bearCooldownBase;
        uint24 bearCooldownPerHiveDay;
        uint24 beekeeperCooldownBase;
        uint24 beekeeperCooldownPerHiveDay;
        uint8 attacksToRestart;
    }
    struct UnresolvedAttack {
        uint24 tokenId;
        uint48 nonce;
        uint64 block;
        uint32 howMuch;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"hiveId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"AddedToHive","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"AddedToWaitingRoom","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"hiveId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"HiveFull","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"hiveId","type":"uint256"}],"name":"HiveRestarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"RemovedFromWaitingRoom","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"earned","type":"uint256"}],"name":"TokenClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"MINIMUM_TO_EXIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"},{"internalType":"uint16[]","name":"hiveIds","type":"uint16[]"}],"name":"addManyToHive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"addToWaitingRoom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableHive","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"calculateBeeOwed","outputs":[{"internalType":"uint256","name":"owed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"tokenIds","type":"uint16[]"},{"internalType":"uint16[]","name":"hiveIds","type":"uint16[]"},{"internalType":"uint16[]","name":"newHiveIds","type":"uint16[]"}],"name":"claimManyFromHive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"extraHives","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getBeeSinceTimestamp","outputs":[{"internalType":"uint256","name":"since","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getBeeTokenId","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"}],"name":"getHiveAge","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"}],"name":"getHiveOccupancy","outputs":[{"internalType":"uint256","name":"occupancy","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"}],"name":"getHiveProtectionBears","outputs":[{"internalType":"uint256","name":"hiveProtectionBears","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"}],"name":"getHiveSuccessfulAttacks","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"hiveId","type":"uint256"}],"name":"getInfoOnBee","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint32","name":"tokenId","type":"uint32"},{"internalType":"uint48","name":"since","type":"uint48"},{"internalType":"uint8","name":"index","type":"uint8"}],"internalType":"struct IHive.Bee","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"}],"name":"getInfoOnHive","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getInfoOnHives","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"}],"name":"getLastStolenHoneyTimestamp","outputs":[{"internalType":"uint256","name":"lastStolenHoneyTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getWaitingRoomOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"hives","outputs":[{"internalType":"uint32","name":"startedTimestamp","type":"uint32"},{"internalType":"uint32","name":"lastCollectedHoneyTimestamp","type":"uint32"},{"internalType":"uint32","name":"hiveProtectionBears","type":"uint32"},{"internalType":"uint32","name":"lastStolenHoneyTimestamp","type":"uint32"},{"internalType":"uint32","name":"collectionAmount","type":"uint32"},{"internalType":"uint32","name":"collectionAmountPerBee","type":"uint32"},{"internalType":"uint8","name":"successfulAttacks","type":"uint8"},{"internalType":"uint8","name":"totalAttacks","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"}],"name":"incSuccessfulAttacks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"}],"name":"incTotalAttacks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"}],"name":"isHiveProtectedFromKeepers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"hiveId","type":"uint256"}],"name":"removeFromWaitingRoom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rescueEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"}],"name":"resetHive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_hiveId","type":"uint256"}],"name":"setAvailableHive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"},{"internalType":"uint32","name":"timestamp","type":"uint32"},{"internalType":"uint32","name":"protection","type":"uint32"}],"name":"setBearAttackData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint48","name":"since","type":"uint48"}],"name":"setBeeSince","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_BEES","type":"address"},{"internalType":"address","name":"_ATTACK","type":"address"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_extra","type":"uint256"}],"name":"setExtraHives","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"hiveId","type":"uint256"},{"internalType":"uint32","name":"timestamp","type":"uint32"},{"internalType":"uint32","name":"collected","type":"uint32"},{"internalType":"uint32","name":"collectedPerBee","type":"uint32"}],"name":"setKeeperAttackData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setRescueEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalBeesStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"waitingRoom","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint32","name":"tokenId","type":"uint32"},{"internalType":"uint48","name":"since","type":"uint48"},{"internalType":"uint8","name":"index","type":"uint8"}],"stateMutability":"view","type":"function"}]

600260079081556008805460ff1916905561016060405261019060809081526101e060a05261024060c0526102b260e05261033e610100526103e8610120526104b06101405262000054916009919062000123565b506040805160e081018252610190815261037060208201526105b0918101919091526108626060820152610ba06080820152610f8860a082015261143860c0820152620000a690600a90600762000123565b50348015620000b457600080fd5b50620000c033620000d3565b6000805460ff60a01b19169055620001ea565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82805482825590600052602060002090600f01601090048101928215620001c15791602002820160005b838211156200018f57835183826101000a81548161ffff021916908361ffff16021790555092602001926002016020816001010492830192600103026200014d565b8015620001bf5782816101000a81549061ffff02191690556002016020816001010492830192600103026200018f565b505b50620001cf929150620001d3565b5090565b5b80821115620001cf5760008155600101620001d4565b6136af80620001fa6000396000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c8063706efb901161013b5780639bd048a4116100b8578063c75b625c1161007c578063c75b625c146107e3578063d8952a4914610810578063dd77467614610823578063f2fde38b1461082c578063ffbed9431461083f57600080fd5b80639bd048a414610731578063a0048c2b14610744578063a69b608914610757578063a852ad5814610792578063c5584ca0146107a557600080fd5b806384e98e81116100ff57806384e98e81146106a05780638da5cb5b146106e15780639145f8d5146106f2578063980916e5146107155780639b04690b1461071e57600080fd5b8063706efb90146105a4578063715018a6146105b757806376531008146105bf5780637ce85210146105d2578063818d45f01461060e57600080fd5b806338b2bd0e116101c9578063486a80291161018d578063486a8029146104685780635c975abb1461047b578063604c48431461048d57806367f6c0ad146104a05780636c0d18601461059157600080fd5b806338b2bd0e146103d857806339db714f146103eb5780633b2f492e146104085780633d01c300146104285780633f1924921461045557600080fd5b80631c95772f116102105780631c95772f1461037e578063263cf36814610391578063304dc353146103a8578063317afea4146103bb57806337a386b9146103ce57600080fd5b806306042b1c1461024d57806311e872f314610262578063150b7a021461032c578063151216b61461035857806316c38b3c1461036b575b600080fd5b61026061025b366004612d64565b610852565b005b6102d3610270366004612db1565b60036020526000908152604090205463ffffffff808216916401000000008104821691600160401b8204811691600160601b8104821691600160801b8204811691600160a01b81049091169060ff600160c01b8204811691600160c81b90041688565b6040805163ffffffff998a1681529789166020890152958816958701959095529286166060860152908516608085015290931660a083015260ff92831660c08301529190911660e0820152610100015b60405180910390f35b61033f61033a366004612ddf565b6108fe565b6040516001600160e01b03199091168152602001610323565b610260610366366004612eca565b610975565b610260610379366004612f4d565b610e75565b61026061038c366004612db1565b610eb8565b61039a60055481565b604051908152602001610323565b61039a6103b6366004612f76565b610ee7565b6102606103c9366004612f76565b610f33565b61039a6201518081565b6102606103e6366004612db1565b611422565b6008546103f89060ff1681565b6040519015158152602001610323565b61041b610416366004612f76565b61149c565b6040516103239190612fc8565b61039a610436366004612db1565b600090815260036020526040902054600160401b900463ffffffff1690565b6103f8610463366004612db1565b6115d2565b610260610476366004612db1565b611602565b600054600160a01b900460ff166103f8565b61026061049b366004612ffb565b611631565b6105446104ae366004612f76565b6040805160808101825260008082526020820181905291810182905260608101919091525060009081526003602090815260408083209383526001909301815290829020825160808101845290546001600160a01b0381168252600160a01b810463ffffffff1692820192909252600160c01b820465ffffffffffff1692810192909252600160f01b900460ff16606082015290565b604051610323919081516001600160a01b0316815260208083015163ffffffff169082015260408083015165ffffffffffff169082015260609182015160ff169181019190915260800190565b61026061059f366004612db1565b6116bb565b6102606105b2366004612db1565b61171a565b6102606117b0565b6102606105cd366004612f4d565b6117e6565b6105fc6105e0366004612db1565b600090815260036020526040902054600160c01b900460ff1690565b60405160ff9091168152602001610323565b61066161061c366004612db1565b6004602052600090815260409020546001600160a01b03811690600160a01b810463ffffffff1690600160c01b810465ffffffffffff1690600160f01b900460ff1684565b604080516001600160a01b03909516855263ffffffff909316602085015265ffffffffffff9091169183019190915260ff166060820152608001610323565b6106c96106ae366004612db1565b6000908152600460205260409020546001600160a01b031690565b6040516001600160a01b039091168152602001610323565b6000546001600160a01b03166106c9565b61039a610700366004612db1565b60009081526003602052604090206002015490565b61039a60065481565b61026061072c36600461304b565b611823565b61026061073f366004613084565b61189b565b61041b610752366004612db1565b611996565b61077d610765366004612db1565b60009081526003602052604090205463ffffffff1690565b60405163ffffffff9091168152602001610323565b6102606107a036600461311e565b611adc565b61039a6107b3366004612f76565b600091825260036020908152604080842092845260019092019052902054600160c01b900465ffffffffffff1690565b61039a6107f1366004612db1565b600090815260036020526040902054600160601b900463ffffffff1690565b61026061081e36600461314a565b611c63565b61039a60075481565b61026061083a366004613183565b611cbb565b61039a61084d366004612f76565b611d53565b6002546001600160a01b0316336001600160a01b03161461088e5760405162461bcd60e51b8152600401610885906131a0565b60405180910390fd5b600093845260036020526040909320805463ffffffff948516600160a01b0263ffffffff60a01b19938616600160801b0263ffffffff60801b1996909516640100000000029590951673ffffffff0000000000000000ffffffff0000000019909116179290921716919091179055565b60006001600160a01b038516156109635760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f742073656e6420746f6b656e7320746f2048697665206469726563604482015262746c7960e81b6064820152608401610885565b50630a85bd0160e11b95945050505050565b600054600160a01b900460ff161561099f5760405162461bcd60e51b8152600401610885906131e2565b6001600160a01b0385163314806109c957506001546001600160a01b0316336001600160a01b0316145b610a155760405162461bcd60e51b815260206004820152601a60248201527f444f4e54204749564520594f555220544f4b454e5320415741590000000000006044820152606401610885565b828114610a345760405162461bcd60e51b81526004016108859061320c565b60006007546064600160009054906101000a90046001600160a01b03166001600160a01b031663ac72200d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8957600080fd5b505afa158015610a9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac1919061324e565b610acb9190613293565b610ad591906132a7565b905060005b84811015610e6c576001546001600160a01b031663b09afec1878784818110610b0557610b056132bf565b9050602002016020810190610b1a91906132d5565b6040516001600160e01b031960e084901b16815261ffff90911660048201526024016101606040518083038186803b158015610b5557600080fd5b505afa158015610b69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8d9190613363565b6000015160ff16600114610bd95760405162461bcd60e51b8152602060048201526013602482015272544f4b454e204d55535420424520412042454560681b6044820152606401610885565b838382818110610beb57610beb6132bf565b9050602002016020810190610c0091906132d5565b61ffff16821015610c485760405162461bcd60e51b815260206004820152601260248201527148495645204e4f5420415641494c41424c4560701b6044820152606401610885565b6001546001600160a01b0316336001600160a01b031614610dfb5760015433906001600160a01b03166383638710888885818110610c8857610c886132bf565b9050602002016020810190610c9d91906132d5565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b158015610cd757600080fd5b505afa158015610ceb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0f919061343d565b6001600160a01b031614610d555760405162461bcd60e51b815260206004820152600d60248201526c20a4a72a102ca7902a27a5a2a760991b6044820152606401610885565b6001546001600160a01b031663bfc628f43330898986818110610d7a57610d7a6132bf565b9050602002016020810190610d8f91906132d5565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015261ffff166044820152606401600060405180830381600087803b158015610de257600080fd5b505af1158015610df6573d6000803e3d6000fd5b505050505b610e5a87878784818110610e1157610e116132bf565b9050602002016020810190610e2691906132d5565b61ffff16868685818110610e3c57610e3c6132bf565b9050602002016020810190610e5191906132d5565b61ffff16611e8e565b80610e648161345a565b915050610ada565b50505050505050565b6000546001600160a01b03163314610e9f5760405162461bcd60e51b815260040161088590613475565b8015610eb057610ead612161565b50565b610ead6121e3565b6000546001600160a01b03163314610ee25760405162461bcd60e51b815260040161088590613475565b600755565b6000828152600360205260408120600201805483908110610f0a57610f0a6132bf565b60009182526020909120601082040154600f9091166002026101000a900461ffff169392505050565b600054600160a01b900460ff1615610f5d5760405162461bcd60e51b8152600401610885906131e2565b600082815260046020908152604091829020825160808101845290546001600160a01b0381168252600160a01b810463ffffffff16928201839052600160c01b810465ffffffffffff1693820193909352600160f01b90920460ff1660608301521580159061105a5750600154602082015160405163b09afec160e01b815263ffffffff90911660048201526001600160a01b039091169063b09afec1906024016101606040518083038186803b15801561101757600080fd5b505afa15801561102b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104f9190613363565b6000015160ff166001145b156111b4576006541580159061106e575081155b801561108e57506006546000908152600360205260409020600201546064115b156110995760065491505b816111875760006007546064600160009054906101000a90046001600160a01b03166001600160a01b031663ac72200d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110f357600080fd5b505afa158015611107573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112b919061324e565b6111359190613293565b61113f91906132a7565b905060015b8181116111845760008181526003602052604090206002015460641115611172576006819055925082611184565b8061117c8161345a565b915050611144565b50505b8051611194908484611e8e565b5050600090815260046020526040902080546001600160f81b0319169055565b6000816020015163ffffffff16118015611258575060018054602083015160405163b09afec160e01b815263ffffffff90911660048201526001600160a01b039091169063b09afec1906024016101606040518083038186803b15801561121a57600080fd5b505afa15801561122e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112529190613363565b5160ff16115b1561133d576001546001600160a01b03166345ee95bf30336040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101869052606401600060405180830381600087803b1580156112bf57600080fd5b505af11580156112d3573d6000803e3d6000fd5b505050600084815260046020526040902080546001600160f81b03191690555082336001600160a01b03167fcb1e26772e882480176a3e649a5f7937dc0ec3f50126283faf56f927b070be80600060405161133091815260200190565b60405180910390a3505050565b602081015163ffffffff161561141d576000546001600160a01b031633148061136f575080516001600160a01b031633145b6113bb5760405162461bcd60e51b815260206004820152601e60248201527f43414e4e4f542052454d4f564520554e52455645414c454420544f4b454e00006044820152606401610885565b6001546001600160a01b03166345ee95bf30336040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101869052606401600060405180830381600087803b1580156112bf57600080fd5b505050565b6002546001600160a01b0316336001600160a01b0316146114555760405162461bcd60e51b8152600401610885906131a0565b6000818152600360205260409020805460019190601890611481908490600160c01b900460ff166134aa565b92506101000a81548160ff021916908360ff16021790555050565b6060806000600160009054906101000a90046001600160a01b03166001600160a01b031663ac72200d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114ef57600080fd5b505afa158015611503573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611527919061324e565b905080611532575060015b600080851161155857600754611549606484613293565b61155391906132a7565b61155a565b845b9050600080871161156c57600161156e565b865b9050805b8281116115c657846115878261ffff16612267565b61159083611996565b6040516020016115a2939291906134eb565b604051602081830303815290604052945080806115be9061345a565b915050611572565b50929695505050505050565b600081815260036020526040812054600160801b900463ffffffff166115f95760006115fc565b60015b92915050565b6000546001600160a01b0316331461162c5760405162461bcd60e51b815260040161088590613475565b600655565b6002546001600160a01b0316336001600160a01b0316146116645760405162461bcd60e51b8152600401610885906131a0565b60009283526003602052604090922080546fffffffffffffffff00000000000000001916600160601b63ffffffff938416026bffffffff0000000000000000191617600160401b9290931691909102919091179055565b6002546001600160a01b0316336001600160a01b0316146116ee5760405162461bcd60e51b8152600401610885906131a0565b6000818152600360205260409020805460019190601990611481908490600160c81b900460ff166134aa565b6002546001600160a01b0316336001600160a01b0316148061174657506000546001600160a01b031633145b6117625760405162461bcd60e51b8152600401610885906131a0565b60008181526003602052604080822080546001600160d01b03191663ffffffff42161790555182917f68553b192d5b3562f209de50014847f4ac4463f32523974c9b7ae8e47ed700ba91a250565b6000546001600160a01b031633146117da5760405162461bcd60e51b815260040161088590613475565b6117e4600061236d565b565b6000546001600160a01b031633146118105760405162461bcd60e51b815260040161088590613475565b6008805460ff1916911515919091179055565b6002546001600160a01b0316336001600160a01b0316146118565760405162461bcd60e51b8152600401610885906131a0565b6000928352600360209081526040808520938552600190930190529120805465ffffffffffff909216600160c01b0265ffffffffffff60c01b19909216919091179055565b600054600160a01b900460ff16156118c55760405162461bcd60e51b8152600401610885906131e2565b84831480156118d357508481145b6118ef5760405162461bcd60e51b81526004016108859061320c565b60005b85811015610e6c5761198387878381811061190f5761190f6132bf565b905060200201602081019061192491906132d5565b61ffff1686868481811061193a5761193a6132bf565b905060200201602081019061194f91906132d5565b61ffff16858585818110611965576119656132bf565b905060200201602081019061197a91906132d5565b61ffff166123bd565b508061198e8161345a565b9150506118f2565b6000818152600360205260409020546060906119b79063ffffffff16612267565b6000838152600360205260409020546119dd90640100000000900463ffffffff16612267565b600084815260036020526040902054611a0290600160601b900463ffffffff16612267565b600085815260036020526040902054611a2790600160401b900463ffffffff16612267565b600086815260036020526040902054611a4c90600160801b900463ffffffff16612267565b600087815260036020526040902060020154611a6b9061ffff16612267565b600088815260036020526040902054611a8d90600160c01b900460ff16612267565b600089815260036020526040902054611aaf90600160c81b900460ff16612267565b604051602001611ac6989796959493929190613549565b6040516020818303038152906040529050919050565b600054600160a01b900460ff1615611b065760405162461bcd60e51b8152600401610885906131e2565b6001546001600160a01b0316336001600160a01b031614611b7d5760405162461bcd60e51b815260206004820152602b60248201527f484956453a41444420544f2057414954494e4720524f4f4d3a4f4e4c5920424560448201526a1154c810d3d395149050d560aa1b6064820152608401610885565b604080516080810182526001600160a01b0384811680835261ffff8516602080850191825265ffffffffffff428181168789019081526000606089018181528b825260048652908a90209851895496519251915160ff16600160f01b0260ff60f01b1992909516600160c01b029190911666ffffffffffffff60c01b1963ffffffff909316600160a01b026001600160c01b031990971691909816179490941793909316949094179390931790935592519182528392917f6b46095c89e5ffb905f79d2ed1a69abe4e5ec62e394034d2e557d69031b2e5b6910160405180910390a35050565b6000546001600160a01b03163314611c8d5760405162461bcd60e51b815260040161088590613475565b600180546001600160a01b039384166001600160a01b03199182161790915560028054929093169116179055565b6000546001600160a01b03163314611ce55760405162461bcd60e51b815260040161088590613475565b6001600160a01b038116611d4a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610885565b610ead8161236d565b6000828152600360208181526040808420858552600181018352908420548685529290915254600160c01b90910465ffffffffffff1690611d9a9063ffffffff1642612c37565b60008581526003602052604090205490925063ffffffff16811115611de557600084815260036020526040902054611dd89063ffffffff1682612c37565b611de29083613619565b91505b600084815260036020526040902054640100000000900463ffffffff1681108015611e2d575060008481526003602052604090205463ffffffff640100000000820481169116105b15611e8757600084815260036020526040902054600160a01b900463ffffffff16821115611e8257600084815260036020526040902054611e7b90600160a01b900463ffffffff1683613619565b9150611e87565b600091505b5092915050565b60008181526003602052604090206002015460648110611edf5760405162461bcd60e51b815260206004820152600c60248201526b12125591481254c81195531360a21b6044820152606401610885565b60008211611f265760405162461bcd60e51b8152602060048201526014602482015273484956452030204e4f5420415641494c41424c4560601b6044820152606401610885565b60008281526003602052604090205463ffffffff16611f61576000828152600360205260409020805463ffffffff19164263ffffffff161790555b6040518060800160405280856001600160a01b031681526020018461ffff1663ffffffff1681526020014265ffffffffffff1681526020018260ff1681525060036000848152602001908152602001600020600101600085815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548165ffffffffffff021916908365ffffffffffff160217905550606082015181600001601e6101000a81548160ff021916908360ff160217905550905050600360008381526020019081526020016000206002018390806001815401808255809150506001900390600052602060002090601091828204019190066002029091909190916101000a81548161ffff021916908361ffff160217905550605a60036000848152602001908152602001600020600201805490501080156120f357508160065414155b156120fe5760068290555b60016005600082825461211191906132a7565b90915550506040805184815242602082015283916001600160a01b038716917f28012f8306b52aa90a99cbaf534a23a7f3fa2cd4e0dbdc26b9feb8a4f289f845910160405180910390a350505050565b600054600160a01b900460ff161561218b5760405162461bcd60e51b8152600401610885906131e2565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121c63390565b6040516001600160a01b03909116815260200160405180910390a1565b600054600160a01b900460ff166122335760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610885565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336121c6565b60608161228b5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156122b5578061229f8161345a565b91506122ae9050600a83613293565b915061228f565b60008167ffffffffffffffff8111156122d0576122d06132f9565b6040519080825280601f01601f1916602001820160405280156122fa576020820181803683370190505b5090505b84156123655761230f600183613619565b915061231c600a86613630565b6123279060306132a7565b60f81b81838151811061233c5761233c6132bf565b60200101906001600160f81b031916908160001a90535061235e600a86613293565b94506122fe565b949350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008281526003602090815260408083208684526001018252808320815160808101835290546001600160a01b038116808352600160a01b820463ffffffff1694830194909452600160c01b810465ffffffffffff1692820192909252600160f01b90910460ff1660608201529033146124715760405162461bcd60e51b81526020600482015260156024820152742ca7aa9020a922902727aa102a24229027aba722a960591b6044820152606401610885565b60085460ff166124f75762015180816040015165ffffffffffff16426124979190613619565b116124f75760405162461bcd60e51b815260206004820152602a60248201527f594f55204e454544204d4f524520484f4e455920544f20474554204f5554204f6044820152694620544845204849564560b01b6064820152608401610885565b6125018486611d53565b60015482516040516318a1e01760e01b81526001600160a01b0391821660048201526024810184905292945016906318a1e01790604401600060405180830381600087803b15801561255257600080fd5b505af1158015612566573d6000803e3d6000fd5b5050505082600014156127fe576001546001600160a01b03166345ee95bf30336040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101889052606401600060405180830381600087803b1580156125d557600080fd5b505af11580156125e9573d6000803e3d6000fd5b50505060008581526003602081815260408084208a85526001808201845291852054948a905292909152600290910154600160f01b90920460ff16925061262f91613619565b81146127335760008581526003602052604081206002015461265390600190613619565b6000878152600360205260408120600201805492935090918390811061267b5761267b6132bf565b90600052602060002090601091828204019190066002029054906101000a900461ffff1661ffff169050806003600089815260200190815260200160002060020184815481106126cd576126cd6132bf565b6000918252602080832060108304018054600f9093166002026101000a61ffff81810219909416959093169290920293909317905588815260038252604080822093825260019390930190915220805460ff60f01b1916600160f01b60ff851602179055505b600085815260036020526040902060020180548061275357612753613644565b60008281526020808220601060001990940193840401805461ffff6002600f8716026101000a0219169055919092558682526003815260408083208984526001908101909252822080546001600160f81b031916905560058054919290916127bc908490613619565b9091555050604051838152869033907fcb1e26772e882480176a3e649a5f7937dc0ec3f50126283faf56f927b070be809060200160405180910390a350612c2f565b60008381526003602052604090206002015460641115612bec57600084815260036020818152604080842089855260018082018452918520549489905292909152600290910154600160f01b90920460ff169161285b9190613619565b811461295f5760008581526003602052604081206002015461287f90600190613619565b600087815260036020526040812060020180549293509091839081106128a7576128a76132bf565b90600052602060002090601091828204019190066002029054906101000a900461ffff1661ffff169050806003600089815260200190815260200160002060020184815481106128f9576128f96132bf565b6000918252602080832060108304018054600f9093166002026101000a61ffff81810219909416959093169290920293909317905588815260038252604080822093825260019390930190915220805460ff60f01b1916600160f01b60ff851602179055505b600085815260036020526040902060020180548061297f5761297f613644565b60008281526020808220601060001994909401938404018054600f851660029081026101000a61ffff021990911690915592909355878152600380845260408083208b8452600101855280832080546001600160f81b0319169055888352935282902001548151608081019092529080336001600160a01b031681526020018861ffff1663ffffffff1681526020014265ffffffffffff1681526020018260ff1681525060036000878152602001908152602001600020600101600089815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548165ffffffffffff021916908365ffffffffffff160217905550606082015181600001601e6101000a81548160ff021916908360ff1602179055509050506003600086815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1660001415612b44576000858152600360205260409020805463ffffffff19164263ffffffff161790555b60008581526003602090815260408220600290810180546001810182559084529190922060108204018054600f9092169092026101000a61ffff81810219909216918a1602179055605a81108015612b9e57508460065414155b15612ba95760068590555b60408051888152426020820152869133917f28012f8306b52aa90a99cbaf534a23a7f3fa2cd4e0dbdc26b9feb8a4f289f845910160405180910390a35050612c2f565b60408051848152602081018790524281830152905133917fa126222912162138a0267624928cef49c401638f9a1a0b40e89a477761fe1c23919081900360600190a25b509392505050565b60008062015180612c488585613619565b612c529190613293565b90506006811115612c61575060065b6000612c6d8585613619565b9050612c7c826201518061365a565b811115612ca157612c90826201518061365a565b612c9a9082613619565b9050612ca5565b5060005b8115612ced57600a612cb8600184613619565b81548110612cc857612cc86132bf565b60009182526020909120601082040154600f9091166002026101000a900461ffff1692505b6201518060098381548110612d0457612d046132bf565b60009182526020909120601082040154612d2e91600f166002026101000a900461ffff168361365a565b612d389190613293565b612d4290846132a7565b95945050505050565b803563ffffffff81168114612d5f57600080fd5b919050565b60008060008060808587031215612d7a57600080fd5b84359350612d8a60208601612d4b565b9250612d9860408601612d4b565b9150612da660608601612d4b565b905092959194509250565b600060208284031215612dc357600080fd5b5035919050565b6001600160a01b0381168114610ead57600080fd5b600080600080600060808688031215612df757600080fd5b8535612e0281612dca565b94506020860135612e1281612dca565b935060408601359250606086013567ffffffffffffffff80821115612e3657600080fd5b818801915088601f830112612e4a57600080fd5b813581811115612e5957600080fd5b896020828501011115612e6b57600080fd5b9699959850939650602001949392505050565b60008083601f840112612e9057600080fd5b50813567ffffffffffffffff811115612ea857600080fd5b6020830191508360208260051b8501011115612ec357600080fd5b9250929050565b600080600080600060608688031215612ee257600080fd5b8535612eed81612dca565b9450602086013567ffffffffffffffff80821115612f0a57600080fd5b612f1689838a01612e7e565b90965094506040880135915080821115612f2f57600080fd5b50612f3c88828901612e7e565b969995985093965092949392505050565b600060208284031215612f5f57600080fd5b81358015158114612f6f57600080fd5b9392505050565b60008060408385031215612f8957600080fd5b50508035926020909101359150565b60005b83811015612fb3578181015183820152602001612f9b565b83811115612fc2576000848401525b50505050565b6020815260008251806020840152612fe7816040850160208701612f98565b601f01601f19169190910160400192915050565b60008060006060848603121561301057600080fd5b8335925061302060208501612d4b565b915061302e60408501612d4b565b90509250925092565b65ffffffffffff81168114610ead57600080fd5b60008060006060848603121561306057600080fd5b8335925060208401359150604084013561307981613037565b809150509250925092565b6000806000806000806060878903121561309d57600080fd5b863567ffffffffffffffff808211156130b557600080fd5b6130c18a838b01612e7e565b909850965060208901359150808211156130da57600080fd5b6130e68a838b01612e7e565b909650945060408901359150808211156130ff57600080fd5b5061310c89828a01612e7e565b979a9699509497509295939492505050565b6000806040838503121561313157600080fd5b823561313c81612dca565b946020939093013593505050565b6000806040838503121561315d57600080fd5b823561316881612dca565b9150602083013561317881612dca565b809150509250929050565b60006020828403121561319557600080fd5b8135612f6f81612dca565b60208082526022908201527f4f4e4c592041545441434b20434f4e54524143542043414e2043414c4c205448604082015261495360f01b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526022908201527f54484520415247554d454e5453204c454e4754485320444f204e4f54204d4154604082015261086960f31b606082015260800190565b60006020828403121561326057600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000826132a2576132a2613267565b500490565b600082198211156132ba576132ba61327d565b500190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156132e757600080fd5b813561ffff81168114612f6f57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051610160810167ffffffffffffffff8111828210171561334157634e487b7160e01b600052604160045260246000fd5b60405290565b805160ff81168114612d5f57600080fd5b8051612d5f81613037565b6000610160828403121561337657600080fd5b61337e61330f565b61338783613347565b815261339560208401613347565b60208201526133a660408401613347565b60408201526133b760608401613347565b60608201526133c860808401613347565b60808201526133d960a08401613347565b60a08201526133ea60c08401613347565b60c08201526133fb60e08401613347565b60e082015261010061340e818501613347565b90820152610120613420848201613358565b90820152610140613432848201613358565b908201529392505050565b60006020828403121561344f57600080fd5b8151612f6f81612dca565b600060001982141561346e5761346e61327d565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060ff821660ff84168060ff038211156134c7576134c761327d565b019392505050565b600081516134e1818560208601612f98565b9290920192915050565b600084516134fd818460208901612f98565b845190830190613511818360208901612f98565b601d60f91b9101908152835161352e816001840160208801612f98565b603b60f81b6001929091019182015260020195945050505050565b6000895161355b818460208e01612f98565b8083019050600b60fa1b8082528a5161357b816001850160208f01612f98565b600192019182018190528951613598816002850160208e01612f98565b6002920191820181905288516135b5816003850160208d01612f98565b6003920191820181905287516135d2816004850160208c01612f98565b600492019182015261360a6136046135f16135fe81600586018b6134cf565b600b60fa1b815260010190565b886134cf565b856134cf565b9b9a5050505050505050505050565b60008282101561362b5761362b61327d565b500390565b60008261363f5761363f613267565b500690565b634e487b7160e01b600052603160045260246000fd5b60008160001904831182151516156136745761367461327d565b50029056fea26469706673582212204004196e2d5318d0cd0a19d5075f4cc914586a07bd030feff7ff17e31cc09cfb64736f6c63430008090033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102485760003560e01c8063706efb901161013b5780639bd048a4116100b8578063c75b625c1161007c578063c75b625c146107e3578063d8952a4914610810578063dd77467614610823578063f2fde38b1461082c578063ffbed9431461083f57600080fd5b80639bd048a414610731578063a0048c2b14610744578063a69b608914610757578063a852ad5814610792578063c5584ca0146107a557600080fd5b806384e98e81116100ff57806384e98e81146106a05780638da5cb5b146106e15780639145f8d5146106f2578063980916e5146107155780639b04690b1461071e57600080fd5b8063706efb90146105a4578063715018a6146105b757806376531008146105bf5780637ce85210146105d2578063818d45f01461060e57600080fd5b806338b2bd0e116101c9578063486a80291161018d578063486a8029146104685780635c975abb1461047b578063604c48431461048d57806367f6c0ad146104a05780636c0d18601461059157600080fd5b806338b2bd0e146103d857806339db714f146103eb5780633b2f492e146104085780633d01c300146104285780633f1924921461045557600080fd5b80631c95772f116102105780631c95772f1461037e578063263cf36814610391578063304dc353146103a8578063317afea4146103bb57806337a386b9146103ce57600080fd5b806306042b1c1461024d57806311e872f314610262578063150b7a021461032c578063151216b61461035857806316c38b3c1461036b575b600080fd5b61026061025b366004612d64565b610852565b005b6102d3610270366004612db1565b60036020526000908152604090205463ffffffff808216916401000000008104821691600160401b8204811691600160601b8104821691600160801b8204811691600160a01b81049091169060ff600160c01b8204811691600160c81b90041688565b6040805163ffffffff998a1681529789166020890152958816958701959095529286166060860152908516608085015290931660a083015260ff92831660c08301529190911660e0820152610100015b60405180910390f35b61033f61033a366004612ddf565b6108fe565b6040516001600160e01b03199091168152602001610323565b610260610366366004612eca565b610975565b610260610379366004612f4d565b610e75565b61026061038c366004612db1565b610eb8565b61039a60055481565b604051908152602001610323565b61039a6103b6366004612f76565b610ee7565b6102606103c9366004612f76565b610f33565b61039a6201518081565b6102606103e6366004612db1565b611422565b6008546103f89060ff1681565b6040519015158152602001610323565b61041b610416366004612f76565b61149c565b6040516103239190612fc8565b61039a610436366004612db1565b600090815260036020526040902054600160401b900463ffffffff1690565b6103f8610463366004612db1565b6115d2565b610260610476366004612db1565b611602565b600054600160a01b900460ff166103f8565b61026061049b366004612ffb565b611631565b6105446104ae366004612f76565b6040805160808101825260008082526020820181905291810182905260608101919091525060009081526003602090815260408083209383526001909301815290829020825160808101845290546001600160a01b0381168252600160a01b810463ffffffff1692820192909252600160c01b820465ffffffffffff1692810192909252600160f01b900460ff16606082015290565b604051610323919081516001600160a01b0316815260208083015163ffffffff169082015260408083015165ffffffffffff169082015260609182015160ff169181019190915260800190565b61026061059f366004612db1565b6116bb565b6102606105b2366004612db1565b61171a565b6102606117b0565b6102606105cd366004612f4d565b6117e6565b6105fc6105e0366004612db1565b600090815260036020526040902054600160c01b900460ff1690565b60405160ff9091168152602001610323565b61066161061c366004612db1565b6004602052600090815260409020546001600160a01b03811690600160a01b810463ffffffff1690600160c01b810465ffffffffffff1690600160f01b900460ff1684565b604080516001600160a01b03909516855263ffffffff909316602085015265ffffffffffff9091169183019190915260ff166060820152608001610323565b6106c96106ae366004612db1565b6000908152600460205260409020546001600160a01b031690565b6040516001600160a01b039091168152602001610323565b6000546001600160a01b03166106c9565b61039a610700366004612db1565b60009081526003602052604090206002015490565b61039a60065481565b61026061072c36600461304b565b611823565b61026061073f366004613084565b61189b565b61041b610752366004612db1565b611996565b61077d610765366004612db1565b60009081526003602052604090205463ffffffff1690565b60405163ffffffff9091168152602001610323565b6102606107a036600461311e565b611adc565b61039a6107b3366004612f76565b600091825260036020908152604080842092845260019092019052902054600160c01b900465ffffffffffff1690565b61039a6107f1366004612db1565b600090815260036020526040902054600160601b900463ffffffff1690565b61026061081e36600461314a565b611c63565b61039a60075481565b61026061083a366004613183565b611cbb565b61039a61084d366004612f76565b611d53565b6002546001600160a01b0316336001600160a01b03161461088e5760405162461bcd60e51b8152600401610885906131a0565b60405180910390fd5b600093845260036020526040909320805463ffffffff948516600160a01b0263ffffffff60a01b19938616600160801b0263ffffffff60801b1996909516640100000000029590951673ffffffff0000000000000000ffffffff0000000019909116179290921716919091179055565b60006001600160a01b038516156109635760405162461bcd60e51b815260206004820152602360248201527f43616e6e6f742073656e6420746f6b656e7320746f2048697665206469726563604482015262746c7960e81b6064820152608401610885565b50630a85bd0160e11b95945050505050565b600054600160a01b900460ff161561099f5760405162461bcd60e51b8152600401610885906131e2565b6001600160a01b0385163314806109c957506001546001600160a01b0316336001600160a01b0316145b610a155760405162461bcd60e51b815260206004820152601a60248201527f444f4e54204749564520594f555220544f4b454e5320415741590000000000006044820152606401610885565b828114610a345760405162461bcd60e51b81526004016108859061320c565b60006007546064600160009054906101000a90046001600160a01b03166001600160a01b031663ac72200d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8957600080fd5b505afa158015610a9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac1919061324e565b610acb9190613293565b610ad591906132a7565b905060005b84811015610e6c576001546001600160a01b031663b09afec1878784818110610b0557610b056132bf565b9050602002016020810190610b1a91906132d5565b6040516001600160e01b031960e084901b16815261ffff90911660048201526024016101606040518083038186803b158015610b5557600080fd5b505afa158015610b69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8d9190613363565b6000015160ff16600114610bd95760405162461bcd60e51b8152602060048201526013602482015272544f4b454e204d55535420424520412042454560681b6044820152606401610885565b838382818110610beb57610beb6132bf565b9050602002016020810190610c0091906132d5565b61ffff16821015610c485760405162461bcd60e51b815260206004820152601260248201527148495645204e4f5420415641494c41424c4560701b6044820152606401610885565b6001546001600160a01b0316336001600160a01b031614610dfb5760015433906001600160a01b03166383638710888885818110610c8857610c886132bf565b9050602002016020810190610c9d91906132d5565b6040516001600160e01b031960e084901b16815261ffff909116600482015260240160206040518083038186803b158015610cd757600080fd5b505afa158015610ceb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0f919061343d565b6001600160a01b031614610d555760405162461bcd60e51b815260206004820152600d60248201526c20a4a72a102ca7902a27a5a2a760991b6044820152606401610885565b6001546001600160a01b031663bfc628f43330898986818110610d7a57610d7a6132bf565b9050602002016020810190610d8f91906132d5565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015261ffff166044820152606401600060405180830381600087803b158015610de257600080fd5b505af1158015610df6573d6000803e3d6000fd5b505050505b610e5a87878784818110610e1157610e116132bf565b9050602002016020810190610e2691906132d5565b61ffff16868685818110610e3c57610e3c6132bf565b9050602002016020810190610e5191906132d5565b61ffff16611e8e565b80610e648161345a565b915050610ada565b50505050505050565b6000546001600160a01b03163314610e9f5760405162461bcd60e51b815260040161088590613475565b8015610eb057610ead612161565b50565b610ead6121e3565b6000546001600160a01b03163314610ee25760405162461bcd60e51b815260040161088590613475565b600755565b6000828152600360205260408120600201805483908110610f0a57610f0a6132bf565b60009182526020909120601082040154600f9091166002026101000a900461ffff169392505050565b600054600160a01b900460ff1615610f5d5760405162461bcd60e51b8152600401610885906131e2565b600082815260046020908152604091829020825160808101845290546001600160a01b0381168252600160a01b810463ffffffff16928201839052600160c01b810465ffffffffffff1693820193909352600160f01b90920460ff1660608301521580159061105a5750600154602082015160405163b09afec160e01b815263ffffffff90911660048201526001600160a01b039091169063b09afec1906024016101606040518083038186803b15801561101757600080fd5b505afa15801561102b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104f9190613363565b6000015160ff166001145b156111b4576006541580159061106e575081155b801561108e57506006546000908152600360205260409020600201546064115b156110995760065491505b816111875760006007546064600160009054906101000a90046001600160a01b03166001600160a01b031663ac72200d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156110f357600080fd5b505afa158015611107573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061112b919061324e565b6111359190613293565b61113f91906132a7565b905060015b8181116111845760008181526003602052604090206002015460641115611172576006819055925082611184565b8061117c8161345a565b915050611144565b50505b8051611194908484611e8e565b5050600090815260046020526040902080546001600160f81b0319169055565b6000816020015163ffffffff16118015611258575060018054602083015160405163b09afec160e01b815263ffffffff90911660048201526001600160a01b039091169063b09afec1906024016101606040518083038186803b15801561121a57600080fd5b505afa15801561122e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112529190613363565b5160ff16115b1561133d576001546001600160a01b03166345ee95bf30336040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101869052606401600060405180830381600087803b1580156112bf57600080fd5b505af11580156112d3573d6000803e3d6000fd5b505050600084815260046020526040902080546001600160f81b03191690555082336001600160a01b03167fcb1e26772e882480176a3e649a5f7937dc0ec3f50126283faf56f927b070be80600060405161133091815260200190565b60405180910390a3505050565b602081015163ffffffff161561141d576000546001600160a01b031633148061136f575080516001600160a01b031633145b6113bb5760405162461bcd60e51b815260206004820152601e60248201527f43414e4e4f542052454d4f564520554e52455645414c454420544f4b454e00006044820152606401610885565b6001546001600160a01b03166345ee95bf30336040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101869052606401600060405180830381600087803b1580156112bf57600080fd5b505050565b6002546001600160a01b0316336001600160a01b0316146114555760405162461bcd60e51b8152600401610885906131a0565b6000818152600360205260409020805460019190601890611481908490600160c01b900460ff166134aa565b92506101000a81548160ff021916908360ff16021790555050565b6060806000600160009054906101000a90046001600160a01b03166001600160a01b031663ac72200d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156114ef57600080fd5b505afa158015611503573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611527919061324e565b905080611532575060015b600080851161155857600754611549606484613293565b61155391906132a7565b61155a565b845b9050600080871161156c57600161156e565b865b9050805b8281116115c657846115878261ffff16612267565b61159083611996565b6040516020016115a2939291906134eb565b604051602081830303815290604052945080806115be9061345a565b915050611572565b50929695505050505050565b600081815260036020526040812054600160801b900463ffffffff166115f95760006115fc565b60015b92915050565b6000546001600160a01b0316331461162c5760405162461bcd60e51b815260040161088590613475565b600655565b6002546001600160a01b0316336001600160a01b0316146116645760405162461bcd60e51b8152600401610885906131a0565b60009283526003602052604090922080546fffffffffffffffff00000000000000001916600160601b63ffffffff938416026bffffffff0000000000000000191617600160401b9290931691909102919091179055565b6002546001600160a01b0316336001600160a01b0316146116ee5760405162461bcd60e51b8152600401610885906131a0565b6000818152600360205260409020805460019190601990611481908490600160c81b900460ff166134aa565b6002546001600160a01b0316336001600160a01b0316148061174657506000546001600160a01b031633145b6117625760405162461bcd60e51b8152600401610885906131a0565b60008181526003602052604080822080546001600160d01b03191663ffffffff42161790555182917f68553b192d5b3562f209de50014847f4ac4463f32523974c9b7ae8e47ed700ba91a250565b6000546001600160a01b031633146117da5760405162461bcd60e51b815260040161088590613475565b6117e4600061236d565b565b6000546001600160a01b031633146118105760405162461bcd60e51b815260040161088590613475565b6008805460ff1916911515919091179055565b6002546001600160a01b0316336001600160a01b0316146118565760405162461bcd60e51b8152600401610885906131a0565b6000928352600360209081526040808520938552600190930190529120805465ffffffffffff909216600160c01b0265ffffffffffff60c01b19909216919091179055565b600054600160a01b900460ff16156118c55760405162461bcd60e51b8152600401610885906131e2565b84831480156118d357508481145b6118ef5760405162461bcd60e51b81526004016108859061320c565b60005b85811015610e6c5761198387878381811061190f5761190f6132bf565b905060200201602081019061192491906132d5565b61ffff1686868481811061193a5761193a6132bf565b905060200201602081019061194f91906132d5565b61ffff16858585818110611965576119656132bf565b905060200201602081019061197a91906132d5565b61ffff166123bd565b508061198e8161345a565b9150506118f2565b6000818152600360205260409020546060906119b79063ffffffff16612267565b6000838152600360205260409020546119dd90640100000000900463ffffffff16612267565b600084815260036020526040902054611a0290600160601b900463ffffffff16612267565b600085815260036020526040902054611a2790600160401b900463ffffffff16612267565b600086815260036020526040902054611a4c90600160801b900463ffffffff16612267565b600087815260036020526040902060020154611a6b9061ffff16612267565b600088815260036020526040902054611a8d90600160c01b900460ff16612267565b600089815260036020526040902054611aaf90600160c81b900460ff16612267565b604051602001611ac6989796959493929190613549565b6040516020818303038152906040529050919050565b600054600160a01b900460ff1615611b065760405162461bcd60e51b8152600401610885906131e2565b6001546001600160a01b0316336001600160a01b031614611b7d5760405162461bcd60e51b815260206004820152602b60248201527f484956453a41444420544f2057414954494e4720524f4f4d3a4f4e4c5920424560448201526a1154c810d3d395149050d560aa1b6064820152608401610885565b604080516080810182526001600160a01b0384811680835261ffff8516602080850191825265ffffffffffff428181168789019081526000606089018181528b825260048652908a90209851895496519251915160ff16600160f01b0260ff60f01b1992909516600160c01b029190911666ffffffffffffff60c01b1963ffffffff909316600160a01b026001600160c01b031990971691909816179490941793909316949094179390931790935592519182528392917f6b46095c89e5ffb905f79d2ed1a69abe4e5ec62e394034d2e557d69031b2e5b6910160405180910390a35050565b6000546001600160a01b03163314611c8d5760405162461bcd60e51b815260040161088590613475565b600180546001600160a01b039384166001600160a01b03199182161790915560028054929093169116179055565b6000546001600160a01b03163314611ce55760405162461bcd60e51b815260040161088590613475565b6001600160a01b038116611d4a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610885565b610ead8161236d565b6000828152600360208181526040808420858552600181018352908420548685529290915254600160c01b90910465ffffffffffff1690611d9a9063ffffffff1642612c37565b60008581526003602052604090205490925063ffffffff16811115611de557600084815260036020526040902054611dd89063ffffffff1682612c37565b611de29083613619565b91505b600084815260036020526040902054640100000000900463ffffffff1681108015611e2d575060008481526003602052604090205463ffffffff640100000000820481169116105b15611e8757600084815260036020526040902054600160a01b900463ffffffff16821115611e8257600084815260036020526040902054611e7b90600160a01b900463ffffffff1683613619565b9150611e87565b600091505b5092915050565b60008181526003602052604090206002015460648110611edf5760405162461bcd60e51b815260206004820152600c60248201526b12125591481254c81195531360a21b6044820152606401610885565b60008211611f265760405162461bcd60e51b8152602060048201526014602482015273484956452030204e4f5420415641494c41424c4560601b6044820152606401610885565b60008281526003602052604090205463ffffffff16611f61576000828152600360205260409020805463ffffffff19164263ffffffff161790555b6040518060800160405280856001600160a01b031681526020018461ffff1663ffffffff1681526020014265ffffffffffff1681526020018260ff1681525060036000848152602001908152602001600020600101600085815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548165ffffffffffff021916908365ffffffffffff160217905550606082015181600001601e6101000a81548160ff021916908360ff160217905550905050600360008381526020019081526020016000206002018390806001815401808255809150506001900390600052602060002090601091828204019190066002029091909190916101000a81548161ffff021916908361ffff160217905550605a60036000848152602001908152602001600020600201805490501080156120f357508160065414155b156120fe5760068290555b60016005600082825461211191906132a7565b90915550506040805184815242602082015283916001600160a01b038716917f28012f8306b52aa90a99cbaf534a23a7f3fa2cd4e0dbdc26b9feb8a4f289f845910160405180910390a350505050565b600054600160a01b900460ff161561218b5760405162461bcd60e51b8152600401610885906131e2565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121c63390565b6040516001600160a01b03909116815260200160405180910390a1565b600054600160a01b900460ff166122335760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610885565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336121c6565b60608161228b5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156122b5578061229f8161345a565b91506122ae9050600a83613293565b915061228f565b60008167ffffffffffffffff8111156122d0576122d06132f9565b6040519080825280601f01601f1916602001820160405280156122fa576020820181803683370190505b5090505b84156123655761230f600183613619565b915061231c600a86613630565b6123279060306132a7565b60f81b81838151811061233c5761233c6132bf565b60200101906001600160f81b031916908160001a90535061235e600a86613293565b94506122fe565b949350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008281526003602090815260408083208684526001018252808320815160808101835290546001600160a01b038116808352600160a01b820463ffffffff1694830194909452600160c01b810465ffffffffffff1692820192909252600160f01b90910460ff1660608201529033146124715760405162461bcd60e51b81526020600482015260156024820152742ca7aa9020a922902727aa102a24229027aba722a960591b6044820152606401610885565b60085460ff166124f75762015180816040015165ffffffffffff16426124979190613619565b116124f75760405162461bcd60e51b815260206004820152602a60248201527f594f55204e454544204d4f524520484f4e455920544f20474554204f5554204f6044820152694620544845204849564560b01b6064820152608401610885565b6125018486611d53565b60015482516040516318a1e01760e01b81526001600160a01b0391821660048201526024810184905292945016906318a1e01790604401600060405180830381600087803b15801561255257600080fd5b505af1158015612566573d6000803e3d6000fd5b5050505082600014156127fe576001546001600160a01b03166345ee95bf30336040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015260448101889052606401600060405180830381600087803b1580156125d557600080fd5b505af11580156125e9573d6000803e3d6000fd5b50505060008581526003602081815260408084208a85526001808201845291852054948a905292909152600290910154600160f01b90920460ff16925061262f91613619565b81146127335760008581526003602052604081206002015461265390600190613619565b6000878152600360205260408120600201805492935090918390811061267b5761267b6132bf565b90600052602060002090601091828204019190066002029054906101000a900461ffff1661ffff169050806003600089815260200190815260200160002060020184815481106126cd576126cd6132bf565b6000918252602080832060108304018054600f9093166002026101000a61ffff81810219909416959093169290920293909317905588815260038252604080822093825260019390930190915220805460ff60f01b1916600160f01b60ff851602179055505b600085815260036020526040902060020180548061275357612753613644565b60008281526020808220601060001990940193840401805461ffff6002600f8716026101000a0219169055919092558682526003815260408083208984526001908101909252822080546001600160f81b031916905560058054919290916127bc908490613619565b9091555050604051838152869033907fcb1e26772e882480176a3e649a5f7937dc0ec3f50126283faf56f927b070be809060200160405180910390a350612c2f565b60008381526003602052604090206002015460641115612bec57600084815260036020818152604080842089855260018082018452918520549489905292909152600290910154600160f01b90920460ff169161285b9190613619565b811461295f5760008581526003602052604081206002015461287f90600190613619565b600087815260036020526040812060020180549293509091839081106128a7576128a76132bf565b90600052602060002090601091828204019190066002029054906101000a900461ffff1661ffff169050806003600089815260200190815260200160002060020184815481106128f9576128f96132bf565b6000918252602080832060108304018054600f9093166002026101000a61ffff81810219909416959093169290920293909317905588815260038252604080822093825260019390930190915220805460ff60f01b1916600160f01b60ff851602179055505b600085815260036020526040902060020180548061297f5761297f613644565b60008281526020808220601060001994909401938404018054600f851660029081026101000a61ffff021990911690915592909355878152600380845260408083208b8452600101855280832080546001600160f81b0319169055888352935282902001548151608081019092529080336001600160a01b031681526020018861ffff1663ffffffff1681526020014265ffffffffffff1681526020018260ff1681525060036000878152602001908152602001600020600101600089815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160000160146101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160186101000a81548165ffffffffffff021916908365ffffffffffff160217905550606082015181600001601e6101000a81548160ff021916908360ff1602179055509050506003600086815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1660001415612b44576000858152600360205260409020805463ffffffff19164263ffffffff161790555b60008581526003602090815260408220600290810180546001810182559084529190922060108204018054600f9092169092026101000a61ffff81810219909216918a1602179055605a81108015612b9e57508460065414155b15612ba95760068590555b60408051888152426020820152869133917f28012f8306b52aa90a99cbaf534a23a7f3fa2cd4e0dbdc26b9feb8a4f289f845910160405180910390a35050612c2f565b60408051848152602081018790524281830152905133917fa126222912162138a0267624928cef49c401638f9a1a0b40e89a477761fe1c23919081900360600190a25b509392505050565b60008062015180612c488585613619565b612c529190613293565b90506006811115612c61575060065b6000612c6d8585613619565b9050612c7c826201518061365a565b811115612ca157612c90826201518061365a565b612c9a9082613619565b9050612ca5565b5060005b8115612ced57600a612cb8600184613619565b81548110612cc857612cc86132bf565b60009182526020909120601082040154600f9091166002026101000a900461ffff1692505b6201518060098381548110612d0457612d046132bf565b60009182526020909120601082040154612d2e91600f166002026101000a900461ffff168361365a565b612d389190613293565b612d4290846132a7565b95945050505050565b803563ffffffff81168114612d5f57600080fd5b919050565b60008060008060808587031215612d7a57600080fd5b84359350612d8a60208601612d4b565b9250612d9860408601612d4b565b9150612da660608601612d4b565b905092959194509250565b600060208284031215612dc357600080fd5b5035919050565b6001600160a01b0381168114610ead57600080fd5b600080600080600060808688031215612df757600080fd5b8535612e0281612dca565b94506020860135612e1281612dca565b935060408601359250606086013567ffffffffffffffff80821115612e3657600080fd5b818801915088601f830112612e4a57600080fd5b813581811115612e5957600080fd5b896020828501011115612e6b57600080fd5b9699959850939650602001949392505050565b60008083601f840112612e9057600080fd5b50813567ffffffffffffffff811115612ea857600080fd5b6020830191508360208260051b8501011115612ec357600080fd5b9250929050565b600080600080600060608688031215612ee257600080fd5b8535612eed81612dca565b9450602086013567ffffffffffffffff80821115612f0a57600080fd5b612f1689838a01612e7e565b90965094506040880135915080821115612f2f57600080fd5b50612f3c88828901612e7e565b969995985093965092949392505050565b600060208284031215612f5f57600080fd5b81358015158114612f6f57600080fd5b9392505050565b60008060408385031215612f8957600080fd5b50508035926020909101359150565b60005b83811015612fb3578181015183820152602001612f9b565b83811115612fc2576000848401525b50505050565b6020815260008251806020840152612fe7816040850160208701612f98565b601f01601f19169190910160400192915050565b60008060006060848603121561301057600080fd5b8335925061302060208501612d4b565b915061302e60408501612d4b565b90509250925092565b65ffffffffffff81168114610ead57600080fd5b60008060006060848603121561306057600080fd5b8335925060208401359150604084013561307981613037565b809150509250925092565b6000806000806000806060878903121561309d57600080fd5b863567ffffffffffffffff808211156130b557600080fd5b6130c18a838b01612e7e565b909850965060208901359150808211156130da57600080fd5b6130e68a838b01612e7e565b909650945060408901359150808211156130ff57600080fd5b5061310c89828a01612e7e565b979a9699509497509295939492505050565b6000806040838503121561313157600080fd5b823561313c81612dca565b946020939093013593505050565b6000806040838503121561315d57600080fd5b823561316881612dca565b9150602083013561317881612dca565b809150509250929050565b60006020828403121561319557600080fd5b8135612f6f81612dca565b60208082526022908201527f4f4e4c592041545441434b20434f4e54524143542043414e2043414c4c205448604082015261495360f01b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526022908201527f54484520415247554d454e5453204c454e4754485320444f204e4f54204d4154604082015261086960f31b606082015260800190565b60006020828403121561326057600080fd5b5051919050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000826132a2576132a2613267565b500490565b600082198211156132ba576132ba61327d565b500190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156132e757600080fd5b813561ffff81168114612f6f57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051610160810167ffffffffffffffff8111828210171561334157634e487b7160e01b600052604160045260246000fd5b60405290565b805160ff81168114612d5f57600080fd5b8051612d5f81613037565b6000610160828403121561337657600080fd5b61337e61330f565b61338783613347565b815261339560208401613347565b60208201526133a660408401613347565b60408201526133b760608401613347565b60608201526133c860808401613347565b60808201526133d960a08401613347565b60a08201526133ea60c08401613347565b60c08201526133fb60e08401613347565b60e082015261010061340e818501613347565b90820152610120613420848201613358565b90820152610140613432848201613358565b908201529392505050565b60006020828403121561344f57600080fd5b8151612f6f81612dca565b600060001982141561346e5761346e61327d565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060ff821660ff84168060ff038211156134c7576134c761327d565b019392505050565b600081516134e1818560208601612f98565b9290920192915050565b600084516134fd818460208901612f98565b845190830190613511818360208901612f98565b601d60f91b9101908152835161352e816001840160208801612f98565b603b60f81b6001929091019182015260020195945050505050565b6000895161355b818460208e01612f98565b8083019050600b60fa1b8082528a5161357b816001850160208f01612f98565b600192019182018190528951613598816002850160208e01612f98565b6002920191820181905288516135b5816003850160208d01612f98565b6003920191820181905287516135d2816004850160208c01612f98565b600492019182015261360a6136046135f16135fe81600586018b6134cf565b600b60fa1b815260010190565b886134cf565b856134cf565b9b9a5050505050505050505050565b60008282101561362b5761362b61327d565b500390565b60008261363f5761363f613267565b500690565b634e487b7160e01b600052603160045260246000fd5b60008160001904831182151516156136745761367461327d565b50029056fea26469706673582212204004196e2d5318d0cd0a19d5075f4cc914586a07bd030feff7ff17e31cc09cfb64736f6c63430008090033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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