ETH Price: $3,326.87 (+3.32%)
Gas: 3.41 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unstake173966102023-06-03 0:31:35608 days ago1685752295IN
0x83f6049b...aABBa6787
0 ETH0.0043328827.17766066
Unstake169371942023-03-30 2:49:11673 days ago1680144551IN
0x83f6049b...aABBa6787
0 ETH0.0063021132.71310067
Stake167270152023-02-28 13:40:47702 days ago1677591647IN
0x83f6049b...aABBa6787
0 ETH0.013672129.46021957
Unstake167269892023-02-28 13:35:35702 days ago1677591335IN
0x83f6049b...aABBa6787
0 ETH0.0054568128.32530633
Add To Pool165579622023-02-04 20:59:59726 days ago1675544399IN
0x83f6049b...aABBa6787
0 ETH0.0064529929.53641331
Unstake165160222023-01-30 0:21:11732 days ago1675038071IN
0x83f6049b...aABBa6787
0 ETH0.00234317.00736887
Unstake165006352023-01-27 20:48:35734 days ago1674852515IN
0x83f6049b...aABBa6787
0 ETH0.0017186118.56157457
Unstake164991562023-01-27 15:50:35734 days ago1674834635IN
0x83f6049b...aABBa6787
0 ETH0.0037534338.53077823
Add To Pool164626472023-01-22 13:29:35739 days ago1674394175IN
0x83f6049b...aABBa6787
0 ETH0.0031629614.87699155
Unstake164626422023-01-22 13:28:35739 days ago1674394115IN
0x83f6049b...aABBa6787
0 ETH0.0014510515.3281701
Stake164197652023-01-16 13:51:47745 days ago1673877107IN
0x83f6049b...aABBa6787
0 ETH0.0040798315.7371977
Stake163774162023-01-10 15:50:59751 days ago1673365859IN
0x83f6049b...aABBa6787
0 ETH0.0054739920.75952237
Add To Pool161570392022-12-10 21:37:35782 days ago1670708255IN
0x83f6049b...aABBa6787
0 ETH0.0027535914
Add To Pool161074732022-12-03 23:09:11789 days ago1670108951IN
0x83f6049b...aABBa6787
0 ETH0.0021549111.50956298
Unstake161074712022-12-03 23:08:47789 days ago1670108927IN
0x83f6049b...aABBa6787
0 ETH0.0008866311.65547079
Stake161074672022-12-03 23:07:59789 days ago1670108879IN
0x83f6049b...aABBa6787
0 ETH0.002793811.91205952
Unstake161026742022-12-03 7:03:35790 days ago1670051015IN
0x83f6049b...aABBa6787
0 ETH0.001146412.38286634
Stake160805142022-11-30 4:47:35793 days ago1669783655IN
0x83f6049b...aABBa6787
0 ETH0.0049390211.65758282
Stake160493322022-11-25 20:18:11797 days ago1669407491IN
0x83f6049b...aABBa6787
0 ETH0.0030133311.42772295
Unstake160487382022-11-25 18:18:47797 days ago1669400327IN
0x83f6049b...aABBa6787
0 ETH0.0027448812.43278277
Unstake159463192022-11-11 10:55:59812 days ago1668164159IN
0x83f6049b...aABBa6787
0 ETH0.0013292514.35786466
Unstake159389742022-11-10 10:18:35813 days ago1668075515IN
0x83f6049b...aABBa6787
0 ETH0.00415621.68356841
Stake159298292022-11-09 3:35:59814 days ago1667964959IN
0x83f6049b...aABBa6787
0 ETH0.0056687716.49435059
Unstake157568732022-10-15 23:42:59838 days ago1665877379IN
0x83f6049b...aABBa6787
0 ETH0.0019456315.21171332
Unstake156857062022-10-06 1:12:59848 days ago1665018779IN
0x83f6049b...aABBa6787
0 ETH0.0015959812.47802339
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
173966102023-06-03 0:31:35608 days ago1685752295
0x83f6049b...aABBa6787
0 ETH
173966102023-06-03 0:31:35608 days ago1685752295
0x83f6049b...aABBa6787
0 ETH
173966102023-06-03 0:31:35608 days ago1685752295
0x83f6049b...aABBa6787
0 ETH
173966102023-06-03 0:31:35608 days ago1685752295
0x83f6049b...aABBa6787
0 ETH
169371942023-03-30 2:49:11673 days ago1680144551
0x83f6049b...aABBa6787
0 ETH
169371942023-03-30 2:49:11673 days ago1680144551
0x83f6049b...aABBa6787
0 ETH
169371942023-03-30 2:49:11673 days ago1680144551
0x83f6049b...aABBa6787
0 ETH
169371942023-03-30 2:49:11673 days ago1680144551
0x83f6049b...aABBa6787
0 ETH
167270152023-02-28 13:40:47702 days ago1677591647
0x83f6049b...aABBa6787
0 ETH
167270152023-02-28 13:40:47702 days ago1677591647
0x83f6049b...aABBa6787
0 ETH
167270152023-02-28 13:40:47702 days ago1677591647
0x83f6049b...aABBa6787
0 ETH
167270152023-02-28 13:40:47702 days ago1677591647
0x83f6049b...aABBa6787
0 ETH
167270152023-02-28 13:40:47702 days ago1677591647
0x83f6049b...aABBa6787
0 ETH
167270152023-02-28 13:40:47702 days ago1677591647
0x83f6049b...aABBa6787
0 ETH
167270152023-02-28 13:40:47702 days ago1677591647
0x83f6049b...aABBa6787
0 ETH
167270152023-02-28 13:40:47702 days ago1677591647
0x83f6049b...aABBa6787
0 ETH
167270152023-02-28 13:40:47702 days ago1677591647
0x83f6049b...aABBa6787
0 ETH
167270152023-02-28 13:40:47702 days ago1677591647
0x83f6049b...aABBa6787
0 ETH
167270152023-02-28 13:40:47702 days ago1677591647
0x83f6049b...aABBa6787
0 ETH
167270152023-02-28 13:40:47702 days ago1677591647
0x83f6049b...aABBa6787
0 ETH
167269892023-02-28 13:35:35702 days ago1677591335
0x83f6049b...aABBa6787
0 ETH
167269892023-02-28 13:35:35702 days ago1677591335
0x83f6049b...aABBa6787
0 ETH
167269892023-02-28 13:35:35702 days ago1677591335
0x83f6049b...aABBa6787
0 ETH
167269892023-02-28 13:35:35702 days ago1677591335
0x83f6049b...aABBa6787
0 ETH
165579622023-02-04 20:59:59726 days ago1675544399
0x83f6049b...aABBa6787
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MetaPopitStaking

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 12 : MetaPopitStaking.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma abicoder v2;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./libraries/Recoverable.sol";
import "./interfaces/ITokenStake.sol";

/**
 * @title MetaPopitStaking
 * @notice MetaPopit Staking contract
 * https://www.metapopit.com
 */
contract MetaPopitStaking is Ownable, Recoverable {
    using Counters for Counters.Counter;

    struct TokenInfo {
        uint256 level;
        uint256 pool;
        bool redeemed;
    }
    struct OwnerInfo {
        uint256 hints;
        uint256 staked;
        uint256 startHintTime;
        bool redeemed;
    }
    struct PoolInfo {
        uint256 depositTime;
        uint256 levelSpeed;
        uint256[] tokens;
        address owner;
    }

    uint256 public constant SPEED_RESOLUTION = 1000;

    bool public isStakingClosed;
    uint256 public stakedTokenCount;
    uint256 public maxLevelTeamSize;
    uint256 public maxHintTeamSize;
    address public immutable collection;

    Counters.Counter private _poolCounter;

    // speeds per number of NFT
    mapping(uint256 => uint256) private _levelSpeed;
    mapping(uint256 => uint256) private _hintSpeed;

    // mapping poolId => PoolInfo
    mapping(uint256 => PoolInfo) private _poolInfos;
    // mapping tokenId => TokenInfo
    mapping(uint256 => TokenInfo) private _tokenInfos;
    // mapping owner => OwnerInfo
    mapping(address => OwnerInfo) private _ownerInfos;

    event Stake(address indexed account, uint256 poolIndex, uint256[] tokenIds);
    event UnStake(address indexed account, uint256 poolIndex, uint256[] tokenIds);
    event RedeemToken(uint256 tokenId, uint256 level);
    event RedeemAccount(address indexed account, uint256 hints);
    event StakingClosed();

    modifier whenTokensNotStaked(uint256[] memory tokenIds) {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(!ITokenStake(collection).isTokenStaked(tokenIds[i]), "MetaPopitStaking: Token already staked");
        }
        _;
    }

    modifier whenStakingOpened() {
        require(!isStakingClosed, "MetaPopitStaking: staking closed");
        _;
    }

    constructor(address _collection) {
        collection = _collection;
    }

    function _getNextPoolId() internal returns (uint256) {
        _poolCounter.increment();
        return _poolCounter.current();
    }

    /**
     * @dev returns the current pending reward based on current value and speed
     */
    function _getPendingRewards(
        uint256 currentValue,
        uint256 depositTime,
        uint256 speed
    ) internal view returns (uint256 pendingReward, uint256 nextRewardDate) {
        pendingReward = currentValue;
        nextRewardDate = 0;

        if (speed > 0) {
            uint256 currentDate = depositTime * SPEED_RESOLUTION;
            uint256 maxDate = block.timestamp * SPEED_RESOLUTION;
            uint256 increment = speed;

            pendingReward = 0;
            while (currentDate <= maxDate) {
                pendingReward += 1;

                if (pendingReward > currentValue) {
                    currentDate += increment;
                }

                increment *= 2;
            }

            nextRewardDate = currentDate / SPEED_RESOLUTION;
        }
    }

    /**
     * @dev Apply completed pending level rewards for a token
     */
    function _applyPendingLevel(
        uint256 tokenId,
        uint256 depositTime,
        uint256 levelSpeed
    ) internal {
        if (depositTime > 0 && levelSpeed > 0) {
            (uint256 pendingLevel, ) = _getPendingRewards(_tokenInfos[tokenId].level, depositTime, levelSpeed);
            if (pendingLevel > 0) _tokenInfos[tokenId].level = pendingLevel - 1;
        }
    }

    /**
     * @dev Apply completed pending hints rewards for a user
     */
    function _applyPendingHints(address account) internal {
        if (_ownerInfos[account].staked == 0 || _ownerInfos[account].redeemed || _ownerInfos[account].startHintTime == 0) return;

        uint256 hintSpeed = getHintSpeed(_ownerInfos[account].staked);
        if (hintSpeed > 0) {
            (uint256 pendingHints, ) = _getPendingRewards(
                _ownerInfos[account].hints,
                _ownerInfos[account].startHintTime,
                hintSpeed
            );

            if (pendingHints > 0) {
                _ownerInfos[account].hints = pendingHints - 1;
            }
        }

        _ownerInfos[account].startHintTime = 0;
    }

    /**
     * @dev returns the current level state for token
     */
    function getLevel(uint256 tokenId)
        public
        view
        returns (
            uint256 level,
            uint256 pendingLevel,
            uint256 nextLevelDate,
            uint256 levelSpeed,
            uint256 poolId,
            bool redeemed
        )
    {
        level = _tokenInfos[tokenId].level;
        poolId = _tokenInfos[tokenId].pool;
        redeemed = _tokenInfos[tokenId].redeemed;
        levelSpeed = 0;

        if (_tokenInfos[tokenId].pool != 0) {
            (pendingLevel, nextLevelDate) = _getPendingRewards(
                _tokenInfos[tokenId].level,
                _poolInfos[_tokenInfos[tokenId].pool].depositTime,
                _poolInfos[_tokenInfos[tokenId].pool].levelSpeed
            );
            levelSpeed = _poolInfos[_tokenInfos[tokenId].pool].levelSpeed;
        }
    }

    /**
     * @dev returns the current hint state for a user
     */
    function getHints(address account)
        public
        view
        returns (
            uint256 hints,
            uint256 pendingHints,
            uint256 nextHintDate,
            uint256 hintSpeed,
            bool redeemed
        )
    {
        hints = _ownerInfos[account].hints;
        redeemed = _ownerInfos[account].redeemed;
        hintSpeed = 0;

        if (_ownerInfos[account].startHintTime != 0) {
            hintSpeed = getHintSpeed(_ownerInfos[account].staked);
            (pendingHints, nextHintDate) = _getPendingRewards(
                _ownerInfos[account].hints,
                _ownerInfos[account].startHintTime,
                hintSpeed
            );
        }
    }

    /**
     * @dev returns `true` if `tokenId` is staked
     */
    function isStaked(uint256 tokenId) public view returns (bool) {
        return _tokenInfos[tokenId].pool != 0;
    }

    /**
     * @dev returns stake info for a token (poolIndex, deposit time and rewards speed)
     */
    function getStakeInfo(uint256 tokenId)
        public
        view
        returns (
            uint256 poolIndex,
            uint256 depositTime,
            uint256 levelSpeed
        )
    {
        uint256 poolId = _tokenInfos[tokenId].pool;
        if (poolId == 0) {
            poolIndex = 0;
            depositTime = 0;
            levelSpeed = 0;
        } else {
            poolIndex = poolId;
            depositTime = _poolInfos[poolId].depositTime;
            levelSpeed = _poolInfos[poolId].levelSpeed;
        }
    }

    /**
     * @dev returns the info for a pool
     */
    function getPoolInfo(uint256 poolIndex) public view returns (PoolInfo memory pool) {
        pool = _poolInfos[poolIndex];
    }

    /**
     * @dev returns the info for a token
     */
    function getTokenInfo(uint256 tokenId) public view returns (TokenInfo memory tokenInfo) {
        tokenInfo = _tokenInfos[tokenId];
    }

    function _redeemToken(uint256 tokenId) internal {
        require(_tokenInfos[tokenId].pool == 0, "MetaPopitStaking: Must unstake before redeem");
        _tokenInfos[tokenId].redeemed = true;
        emit RedeemToken(tokenId, _tokenInfos[tokenId].level);
    }

    function _redeemAccount(address account) internal {
        _applyPendingHints(account);
        _ownerInfos[account].redeemed = true;
        _ownerInfos[account].startHintTime = 0;
        emit RedeemAccount(account, _ownerInfos[account].hints);
    }

    /**
     * @dev returns `true` if `tokenId` is redeemed
     */
    function isTokenRedeemed(uint256 tokenId) public view returns (bool) {
        return _tokenInfos[tokenId].redeemed;
    }

    /**
     * @dev returns `true` if `tokenId` is redeemed
     */
    function isAccountRedeemed(address account) public view returns (bool) {
        return _ownerInfos[account].redeemed;
    }

    function _stake(address tokenOwner, uint256[] memory tokenIds)
        internal
        whenStakingOpened
        whenTokensNotStaked(tokenIds)
    {
        uint256 poolIndex = _getNextPoolId();
        _poolInfos[poolIndex] = PoolInfo({
            depositTime: block.timestamp,
            levelSpeed: getLevelSpeed(tokenIds.length),
            tokens: tokenIds,
            owner: tokenOwner
        });

        if (_ownerInfos[tokenOwner].staked < maxHintTeamSize) {
            _applyPendingHints(tokenOwner);
            _ownerInfos[tokenOwner].startHintTime = block.timestamp;
        }
        _ownerInfos[tokenOwner].staked += tokenIds.length;
        stakedTokenCount += tokenIds.length;

        for (uint256 i = 0; i < tokenIds.length; i++) {
            uint256 tokenId = tokenIds[i];
            require(!_tokenInfos[tokenId].redeemed, "MetaPopitStaking: Rewards already redeemed");
            require(ITokenStake(collection).ownerOf(tokenId) == tokenOwner, "MetaPopitStaking: Not owner");
            _tokenInfos[tokenId].pool = poolIndex;
            ITokenStake(collection).stakeToken(tokenId);
        }

        emit Stake(tokenOwner, poolIndex, tokenIds);
    }

    function _unstake(uint256 poolId, bool redeemRewards) internal {
        require(_poolInfos[poolId].owner != address(0), "MetaPopitStaking: invalid pool");
        PoolInfo memory pool = _poolInfos[poolId];
        delete _poolInfos[poolId];

        if (_ownerInfos[pool.owner].staked - pool.tokens.length < maxHintTeamSize) {
            _applyPendingHints(pool.owner);
            _ownerInfos[pool.owner].startHintTime = block.timestamp;
        }
        _ownerInfos[pool.owner].staked -= pool.tokens.length;

        for (uint256 i = 0; i < pool.tokens.length; i++) {
            _tokenInfos[pool.tokens[i]].pool = 0;
            _applyPendingLevel(pool.tokens[i], pool.depositTime, pool.levelSpeed);
            if (redeemRewards) _redeemToken(pool.tokens[i]);
            ITokenStake(collection).unstakeToken(pool.tokens[i]);
        }

        stakedTokenCount -= pool.tokens.length;
        emit UnStake(pool.owner, poolId, pool.tokens);
    }

    /**
     * @dev Stake a group of tokens in a pool
     */
    function stake(uint256[] calldata tokenIds) external {
        require(tokenIds.length <= maxLevelTeamSize, "MetaPopitStaking: above max team size");
        _stake(_msgSender(), tokenIds);
    }

    /**
     * @dev Ustake tokens from `poolId``
     * @param redeemRewards : redeem rewards for token if set to `true`
     */
    function unstake(uint256 poolId, bool redeemRewards) external {
        require(_poolInfos[poolId].owner == _msgSender(), "MetaPopitStaking: not owner of pool");
        _unstake(poolId, redeemRewards);
    }

    /**
     * @dev Batch stake a group of tokens in multiple pools
     */
    function batchStake(uint256[][] calldata batchTokenIds) external {
        for (uint256 i = 0; i < batchTokenIds.length; i++) {
            require(batchTokenIds[i].length <= maxLevelTeamSize, "MetaPopitStaking: above max team size");
            _stake(_msgSender(), batchTokenIds[i]);
        }
    }

    /**
     * @dev Batch unstake token from a list of pools
     * @param redeemRewards : redeem rewards for token if set to `true`
     */
    function batchUnstake(uint256[] calldata poolIds, bool redeemRewards) external {
        for (uint256 i = 0; i < poolIds.length; i++) {
            require(_poolInfos[poolIds[i]].owner == _msgSender(), "MetaPopitStaking: not owner of pool");
            _unstake(poolIds[i], redeemRewards);
        }
    }

    /**
     * @dev Stake `tokenIds` in a existing pool
     */
    function addToPool(uint256 poolId, uint256[] calldata tokenIds)
        external
        whenStakingOpened
        whenTokensNotStaked(tokenIds)
    {
        require(_poolInfos[poolId].owner == _msgSender(), "MetaPopitStaking: not owner of pool");
        require(
            _poolInfos[poolId].tokens.length + tokenIds.length <= maxLevelTeamSize,
            "MetaPopitStaking: above max team size"
        );

        // apply pending rewards
        if (_ownerInfos[_msgSender()].staked < maxHintTeamSize) {
            _applyPendingHints(_msgSender());
            _ownerInfos[_msgSender()].startHintTime = block.timestamp;
        }
        _ownerInfos[_msgSender()].staked += tokenIds.length;

        uint256 oldLength = _poolInfos[poolId].tokens.length;
        uint256[] memory newTokenIds = new uint256[](oldLength + tokenIds.length);
        for (uint256 i = 0; i < _poolInfos[poolId].tokens.length; i++) {
            _applyPendingLevel(
                _poolInfos[poolId].tokens[i],
                _poolInfos[poolId].depositTime,
                _poolInfos[poolId].levelSpeed
            );
            newTokenIds[i] = _poolInfos[poolId].tokens[i];
        }

        // stake new tokens
        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(!_tokenInfos[tokenIds[i]].redeemed, "MetaPopitStaking: Rewards already redeemed");
            require(ITokenStake(collection).ownerOf(tokenIds[i]) == _msgSender(), "MetaPopitStaking: Not owner");
            ITokenStake(collection).stakeToken(tokenIds[i]);
            newTokenIds[oldLength + i] = tokenIds[i];
            _tokenInfos[tokenIds[i]].pool = poolId;
        }

        // update pool infos
        _poolInfos[poolId].depositTime = block.timestamp;
        _poolInfos[poolId].levelSpeed = getLevelSpeed(newTokenIds.length);
        _poolInfos[poolId].tokens = newTokenIds;

        stakedTokenCount += tokenIds.length;
        emit Stake(_msgSender(), poolId, tokenIds);
    }

    /**
     * @dev Redeem the final rewards for a token.
     * Once redeemed a token cannot be staked in this contract anymore
     */
    function redeemToken(uint256 tokenId) external {
        require(!_tokenInfos[tokenId].redeemed, "MetaPopitStaking: Token already redeemed");
        require(ITokenStake(collection).ownerOf(tokenId) == _msgSender(), "MetaPopitStaking: not owner");
        _redeemToken(tokenId);
    }

    /**
     * @dev Redeem the final rewards for an account.
     * Once redeemed hints are not incremented any more
     */
    function redeemAccount() external {
        require(!_ownerInfos[_msgSender()].redeemed, "MetaPopitStaking: Account already redeemed");
        _redeemAccount(_msgSender());
    }

    /**
     * @dev returns the level speed for a `teamSize`
     */
    function getLevelSpeed(uint256 teamSize) public view returns (uint256) {
        if (teamSize > maxLevelTeamSize) {
            return _levelSpeed[maxLevelTeamSize];
        }
        return _levelSpeed[teamSize];
    }

    /**
     * @dev returns the hint speed for a `teamSize`
     */
    function getHintSpeed(uint256 teamSize) public view returns (uint256) {
        if (teamSize > maxHintTeamSize) {
            return _hintSpeed[maxHintTeamSize];
        }
        return _hintSpeed[teamSize];
    }

    /**
     * @dev Update the base speed of level and hint rewards
     * only callable by owner
     */
    function setSpeeds(uint256[] calldata levelSpeed, uint256[] calldata hintSpeed) external onlyOwner {
        maxLevelTeamSize = levelSpeed.length;
        maxHintTeamSize = hintSpeed.length;

        for (uint256 i = 0; i < levelSpeed.length; i++) {
            _levelSpeed[i + 1] = levelSpeed[i];
        }

        for (uint256 i = 0; i < hintSpeed.length; i++) {
            _hintSpeed[i + 1] = hintSpeed[i];
        }
    }

    /**
     * @dev Close the staking
     * only callable by owner
     */
    function closeStaking() external onlyOwner {
        require(!isStakingClosed, "MetaPopitStaking: staking already closed");
        isStakingClosed = true;
        emit StakingClosed();
    }
}

File 2 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 3 of 12 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 4 of 12 : Recoverable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma abicoder v2;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "../interfaces/IRecoverable.sol";

abstract contract Recoverable is Ownable, IRecoverable {
    using SafeERC20 for IERC20;

    event NonFungibleTokenRecovery(address indexed token, uint256 tokenId);
    event TokenRecovery(address indexed token, uint256 amount);
    event EthRecovery(uint256 amount);

    /**
     * @notice Allows the owner to recover non-fungible tokens sent to the contract by mistake
     * @param _token: NFT token address
     * @param _tokenId: tokenId
     * @dev Callable by owner
     */
    function recoverNonFungibleToken(address _token, uint256 _tokenId) external virtual onlyOwner {
        IERC721(_token).transferFrom(address(this), address(msg.sender), _tokenId);
        emit NonFungibleTokenRecovery(_token, _tokenId);
    }

    /**
     * @notice Allows the owner to recover tokens sent to the contract by mistake
     * @param _token: token address
     * @dev Callable by owner
     */
    function recoverToken(address _token) external virtual onlyOwner {
        uint256 balance = IERC20(_token).balanceOf(address(this));
        require(balance != 0, "Operations: Cannot recover zero balance");

        IERC20(_token).safeTransfer(address(msg.sender), balance);
        emit TokenRecovery(_token, balance);
    }

    function recoverEth(address payable _to) external virtual onlyOwner {
        uint256 balance = address(this).balance;
        _to.transfer(balance);
        emit EthRecovery(balance);
    }
}

File 5 of 12 : ITokenStake.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

interface ITokenStake is IERC721 {
    function isTokenStaked(uint256 tokenId) external returns (bool);

    function stakeToken(uint256 tokenId) external;

    function unstakeToken(uint256 tokenId) external;
}

File 6 of 12 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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;
    }
}

File 7 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 8 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 12 : IRecoverable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IRecoverable {
    /**
     * @notice Allows the owner to recover non-fungible tokens sent to the NFT contract by mistake and this contract
     * @param _token: NFT token address
     * @param _tokenId: tokenId
     * @dev Callable by owner
     */
    function recoverNonFungibleToken(address _token, uint256 _tokenId) external;

    /**
     * @notice Allows the owner to recover tokens sent to the NFT contract and this contract by mistake
     * @param _token: token address
     * @dev Callable by owner
     */
    function recoverToken(address _token) external;

    /**
     * @notice Allows the owner to recover ETH sent to the NFT contract ans and contract by mistake
     * @param _to: target address
     * @dev Callable by owner
     */
    function recoverEth(address payable _to) external;
}

File 11 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_collection","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EthRecovery","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NonFungibleTokenRecovery","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"hints","type":"uint256"}],"name":"RedeemAccount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"level","type":"uint256"}],"name":"RedeemToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[],"name":"StakingClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenRecovery","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"poolIndex","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"UnStake","type":"event"},{"inputs":[],"name":"SPEED_RESOLUTION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"addToPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[][]","name":"batchTokenIds","type":"uint256[][]"}],"name":"batchStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"poolIds","type":"uint256[]"},{"internalType":"bool","name":"redeemRewards","type":"bool"}],"name":"batchUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closeStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collection","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"teamSize","type":"uint256"}],"name":"getHintSpeed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getHints","outputs":[{"internalType":"uint256","name":"hints","type":"uint256"},{"internalType":"uint256","name":"pendingHints","type":"uint256"},{"internalType":"uint256","name":"nextHintDate","type":"uint256"},{"internalType":"uint256","name":"hintSpeed","type":"uint256"},{"internalType":"bool","name":"redeemed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getLevel","outputs":[{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"uint256","name":"pendingLevel","type":"uint256"},{"internalType":"uint256","name":"nextLevelDate","type":"uint256"},{"internalType":"uint256","name":"levelSpeed","type":"uint256"},{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"bool","name":"redeemed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"teamSize","type":"uint256"}],"name":"getLevelSpeed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"}],"name":"getPoolInfo","outputs":[{"components":[{"internalType":"uint256","name":"depositTime","type":"uint256"},{"internalType":"uint256","name":"levelSpeed","type":"uint256"},{"internalType":"uint256[]","name":"tokens","type":"uint256[]"},{"internalType":"address","name":"owner","type":"address"}],"internalType":"struct MetaPopitStaking.PoolInfo","name":"pool","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getStakeInfo","outputs":[{"internalType":"uint256","name":"poolIndex","type":"uint256"},{"internalType":"uint256","name":"depositTime","type":"uint256"},{"internalType":"uint256","name":"levelSpeed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenInfo","outputs":[{"components":[{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"uint256","name":"pool","type":"uint256"},{"internalType":"bool","name":"redeemed","type":"bool"}],"internalType":"struct MetaPopitStaking.TokenInfo","name":"tokenInfo","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isAccountRedeemed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isStaked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isStakingClosed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isTokenRedeemed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxHintTeamSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLevelTeamSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"}],"name":"recoverEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"recoverNonFungibleToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"redeemToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"levelSpeed","type":"uint256[]"},{"internalType":"uint256[]","name":"hintSpeed","type":"uint256[]"}],"name":"setSpeeds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakedTokenCount","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":"poolId","type":"uint256"},{"internalType":"bool","name":"redeemRewards","type":"bool"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040523480156200001157600080fd5b506040516200318a3803806200318a8339810160408190526200003491620000a1565b6200003f3362000051565b6001600160a01b0316608052620000d3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000b457600080fd5b81516001600160a01b0381168114620000cc57600080fd5b9392505050565b6080516130636200012760003960008181610330015281816105bf01528181610bdd015281816110270152818161113301528181611c3b01528181611f3b01528181612057015261239601526130636000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c80638c7a63ae1161010f578063bb0fd147116100a2578063dc338c2411610071578063dc338c24146104ec578063e6683d22146104f5578063f2fde38b146104fe578063f6ee0ec31461051157600080fd5b8063bb0fd1471461046e578063be7d236614610481578063ce40fbaf146104a7578063d86cb0a5146104e457600080fd5b80639be65a60116100de5780639be65a60146104105780639ebea88c14610423578063b4a59ef614610436578063baa51f861461044957600080fd5b80638c7a63ae146103ac5780638da5cb5b146103e3578063906b58e6146103f457806398cfe5871461040857600080fd5b80633fa9e52711610187578063715018a611610156578063715018a6146103105780637504db3e146103185780637de1e5361461032b57806386481d401461036a57600080fd5b80633fa9e527146102ce57806342295fb3146102e1578063631bde64146102ea5780636fc15aac146102fd57600080fd5b806321536184116101c357806321536184146102455780632a55f4ee146102585780632f380b35146102975780633836b38a146102b757600080fd5b8063013054c2146101ea57806309813482146101ff5780630fbf0a9314610232575b600080fd5b6101fd6101f8366004612aaf565b610524565b005b61021261020d366004612aaf565b61069b565b604080519384526020840192909252908201526060015b60405180910390f35b6101fd610240366004612b14565b6106ee565b6101fd610253366004612b14565b61078f565b610287610266366004612b6b565b6001600160a01b031660009081526009602052604090206003015460ff1690565b6040519015158152602001610229565b6102aa6102a5366004612aaf565b610895565b6040516102299190612b88565b6102c060035481565b604051908152602001610229565b6101fd6102dc366004612c05565b61095f565b6102c06103e881565b6101fd6102f8366004612c7f565b610a69565b6101fd61030b366004612cd6565b610b44565b6101fd6112fa565b6101fd610326366004612b6b565b61134e565b6103527f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610229565b61037d610378366004612aaf565b611406565b6040805196875260208701959095529385019290925260608401526080830152151560a082015260c001610229565b6103bf6103ba366004612aaf565b611497565b60408051825181526020808401519082015291810151151590820152606001610229565b6000546001600160a01b0316610352565b60005461028790600160a01b900460ff1681565b6101fd6114fb565b6101fd61041e366004612b6b565b6115ea565b6101fd610431366004612d22565b611766565b6102c0610444366004612aaf565b6117e5565b610287610457366004612aaf565b600090815260086020526040902060010154151590565b6101fd61047c366004612d52565b61181b565b61028761048f366004612aaf565b60009081526008602052604090206002015460ff1690565b6104ba6104b5366004612b6b565b611904565b6040805195865260208601949094529284019190915260608301521515608082015260a001610229565b6101fd61199a565b6102c060015481565b6102c060025481565b6101fd61050c366004612b6b565b611a19565b6102c061051f366004612aaf565b611acf565b60008181526008602052604090206002015460ff161561059c5760405162461bcd60e51b815260206004820152602860248201527f4d657461506f7069745374616b696e673a20546f6b656e20616c7265616479206044820152671c995919595b595960c21b60648201526084015b60405180910390fd5b336040516331a9108f60e11b8152600481018390526001600160a01b03918216917f00000000000000000000000000000000000000000000000000000000000000001690636352211e9060240160206040518083038186803b15801561060157600080fd5b505afa158015610615573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106399190612d7e565b6001600160a01b03161461068f5760405162461bcd60e51b815260206004820152601b60248201527f4d657461506f7069745374616b696e673a206e6f74206f776e657200000000006044820152606401610593565b61069881611b05565b50565b60008181526008602052604081206001015481908190806106c7576000935060009250600091506106e6565b6000818152600760205260409020805460019091015491945092509050825b509193909250565b60025481111561074e5760405162461bcd60e51b815260206004820152602560248201527f4d657461506f7069745374616b696e673a2061626f7665206d6178207465616d6044820152642073697a6560d81b6064820152608401610593565b61078b33838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611bd292505050565b5050565b60005b81811015610890576002548383838181106107af576107af612d9b565b90506020028101906107c19190612db1565b9050111561081f5760405162461bcd60e51b815260206004820152602560248201527f4d657461506f7069745374616b696e673a2061626f7665206d6178207465616d6044820152642073697a6560d81b6064820152608401610593565b61087e3384848481811061083557610835612d9b565b90506020028101906108479190612db1565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611bd292505050565b8061088881612e11565b915050610792565b505050565b6108c9604051806080016040528060008152602001600081526020016060815260200160006001600160a01b031681525090565b6000828152600760209081526040918290208251608081018452815481526001820154818401526002820180548551818602810186018752818152929593949386019383018282801561093b57602002820191906000526020600020905b815481526020019060010190808311610927575b5050509183525050600391909101546001600160a01b031660209091015292915050565b6000546001600160a01b031633146109a75760405162461bcd60e51b8152602060048201819052602482015260008051602061300e8339815191526044820152606401610593565b6002839055600381905560005b83811015610a09578484828181106109ce576109ce612d9b565b90506020020135600560008360016109e69190612e2c565b815260208101919091526040016000205580610a0181612e11565b9150506109b4565b5060005b81811015610a6257828282818110610a2757610a27612d9b565b9050602002013560066000836001610a3f9190612e2c565b815260208101919091526040016000205580610a5a81612e11565b915050610a0d565b5050505050565b60005b82811015610b3e573360076000868685818110610a8b57610a8b612d9b565b60209081029290920135835250810191909152604001600020600301546001600160a01b031614610b0a5760405162461bcd60e51b815260206004820152602360248201527f4d657461506f7069745374616b696e673a206e6f74206f776e6572206f6620706044820152621bdbdb60ea1b6064820152608401610593565b610b2c848483818110610b1f57610b1f612d9b565b9050602002013583612119565b80610b3681612e11565b915050610a6c565b50505050565b600054600160a01b900460ff1615610b9e5760405162461bcd60e51b815260206004820181905260248201527f4d657461506f7069745374616b696e673a207374616b696e6720636c6f7365646044820152606401610593565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250925050505b8151811015610d02577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f0a52424838381518110610c1c57610c1c612d9b565b60200260200101516040518263ffffffff1660e01b8152600401610c4291815260200190565b602060405180830381600087803b158015610c5c57600080fd5b505af1158015610c70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c949190612e44565b15610cf05760405162461bcd60e51b815260206004820152602660248201527f4d657461506f7069745374616b696e673a20546f6b656e20616c7265616479206044820152651cdd185ad95960d21b6064820152608401610593565b80610cfa81612e11565b915050610bd2565b506000848152600760205260409020600301546001600160a01b03163314610d785760405162461bcd60e51b815260206004820152602360248201527f4d657461506f7069745374616b696e673a206e6f74206f776e6572206f6620706044820152621bdbdb60ea1b6064820152608401610593565b60028054600086815260076020526040902090910154610d99908490612e2c565b1115610df55760405162461bcd60e51b815260206004820152602560248201527f4d657461506f7069745374616b696e673a2061626f7665206d6178207465616d6044820152642073697a6560d81b6064820152608401610593565b600354336000908152600960205260409020600101541015610e3157610e1a336124b3565b336000908152600960205260409020426002909101555b3360009081526009602052604081206001018054849290610e53908490612e2c565b909155505060008481526007602052604081206002015490610e758483612e2c565b67ffffffffffffffff811115610e8d57610e8d612e61565b604051908082528060200260200182016040528015610eb6578160200160208202803683370190505b50905060005b600087815260076020526040902060020154811015610f825760008781526007602052604090206002018054610f25919083908110610efd57610efd612d9b565b60009182526020808320909101548a83526007909152604090912080546001909101546125c8565b6000878152600760205260409020600201805482908110610f4857610f48612d9b565b9060005260206000200154828281518110610f6557610f65612d9b565b602090810291909101015280610f7a81612e11565b915050610ebc565b5060005b848110156112515760086000878784818110610fa457610fa4612d9b565b602090810292909201358352508101919091526040016000206002015460ff16156110245760405162461bcd60e51b815260206004820152602a60248201527f4d657461506f7069745374616b696e673a205265776172647320616c726561646044820152691e481c995919595b595960b21b6064820152608401610593565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e88888581811061106657611066612d9b565b905060200201356040518263ffffffff1660e01b815260040161108b91815260200190565b60206040518083038186803b1580156110a357600080fd5b505afa1580156110b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110db9190612d7e565b6001600160a01b0316146111315760405162461bcd60e51b815260206004820152601b60248201527f4d657461506f7069745374616b696e673a204e6f74206f776e657200000000006044820152606401610593565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663cda6b84787878481811061117257611172612d9b565b905060200201356040518263ffffffff1660e01b815260040161119791815260200190565b600060405180830381600087803b1580156111b157600080fd5b505af11580156111c5573d6000803e3d6000fd5b505050508585828181106111db576111db612d9b565b905060200201358282856111ef9190612e2c565b815181106111ff576111ff612d9b565b602002602001018181525050866008600088888581811061122257611222612d9b565b90506020020135815260200190815260200160002060010181905550808061124990612e11565b915050610f86565b506000868152600760205260409020429055805161126e906117e5565b6000878152600760209081526040909120600181019290925582516112999260020191840190612a35565b5084849050600160008282546112af9190612e2c565b909155505060405133907f55331f3fa9ca07b25728aacdb3badf1eacd93d82f1dfe128cc633a137232f966906112ea90899089908990612e77565b60405180910390a2505050505050565b6000546001600160a01b031633146113425760405162461bcd60e51b8152602060048201819052602482015260008051602061300e8339815191526044820152606401610593565b61134c6000612620565b565b6000546001600160a01b031633146113965760405162461bcd60e51b8152602060048201819052602482015260008051602061300e8339815191526044820152606401610593565b60405147906001600160a01b0383169082156108fc029083906000818181858888f193505050501580156113ce573d6000803e3d6000fd5b506040518181527f5c0a34c718716ee467140afbc9fb741fc2980e41d00f04a8f7f635d76484ff479060200160405180910390a15050565b600081815260086020526040812080546001820154600290920154909291829182919060ff16811561148e576000878152600860209081526040808320805460019182015485526007909352922080549201546114639290612670565b6000898152600860209081526040808320600190810154845260079092529091200154919650945092505b91939550919395565b6114bd604051806060016040528060008152602001600081526020016000151581525090565b506000908152600860209081526040918290208251606081018452815481526001820154928101929092526002015460ff1615159181019190915290565b6000546001600160a01b031633146115435760405162461bcd60e51b8152602060048201819052602482015260008051602061300e8339815191526044820152606401610593565b600054600160a01b900460ff16156115ae5760405162461bcd60e51b815260206004820152602860248201527f4d657461506f7069745374616b696e673a207374616b696e6720616c726561646044820152671e4818db1bdcd95960c21b6064820152608401610593565b6000805460ff60a01b1916600160a01b1781556040517f5e0ff495077a830a1f92088545bae65274cc65d979385b39703c9fc05f2dc4209190a1565b6000546001600160a01b031633146116325760405162461bcd60e51b8152602060048201819052602482015260008051602061300e8339815191526044820152606401610593565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b15801561167457600080fd5b505afa158015611688573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ac9190612ed3565b90508061170b5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207a65726f2060448201526662616c616e636560c81b6064820152608401610593565b61171f6001600160a01b03831633836126f4565b816001600160a01b03167f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e988260405161175a91815260200190565b60405180910390a25050565b6000828152600760205260409020600301546001600160a01b031633146117db5760405162461bcd60e51b815260206004820152602360248201527f4d657461506f7069745374616b696e673a206e6f74206f776e6572206f6620706044820152621bdbdb60ea1b6064820152608401610593565b61078b8282612119565b600060025482111561180857505060025460009081526005602052604090205490565b5060009081526005602052604090205490565b6000546001600160a01b031633146118635760405162461bcd60e51b8152602060048201819052602482015260008051602061300e8339815191526044820152606401610593565b6040516323b872dd60e01b8152306004820152336024820152604481018290526001600160a01b038316906323b872dd90606401600060405180830381600087803b1580156118b157600080fd5b505af11580156118c5573d6000803e3d6000fd5b50505050816001600160a01b03167f861c3ea25dbda3af0bf5d258ba8582c0276c9446b1479e817be3f1b4a89acf918260405161175a91815260200190565b6001600160a01b0381166000908152600960205260408120805460038201546002909201549092918291829160ff169015611991576001600160a01b03861660009081526009602052604090206001015461195e90611acf565b6001600160a01b0387166000908152600960205260409020805460029091015491935061198b9184612670565b90945092505b91939590929450565b3360009081526009602052604090206003015460ff1615611a105760405162461bcd60e51b815260206004820152602a60248201527f4d657461506f7069745374616b696e673a204163636f756e7420616c726561646044820152691e481c995919595b595960b21b6064820152608401610593565b61134c3361275b565b6000546001600160a01b03163314611a615760405162461bcd60e51b8152602060048201819052602482015260008051602061300e8339815191526044820152606401610593565b6001600160a01b038116611ac65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610593565b61069881612620565b6000600354821115611af257505060035460009081526006602052604090205490565b5060009081526006602052604090205490565b60008181526008602052604090206001015415611b795760405162461bcd60e51b815260206004820152602c60248201527f4d657461506f7069745374616b696e673a204d75737420756e7374616b65206260448201526b65666f72652072656465656d60a01b6064820152608401610593565b60008181526008602090815260409182902060028101805460ff19166001179055548251848152918201527f57e4b043e953e434944a3b974b27c3f3f96c31110ea0fb2224c90edecd07e026910160405180910390a150565b600054600160a01b900460ff1615611c2c5760405162461bcd60e51b815260206004820181905260248201527f4d657461506f7069745374616b696e673a207374616b696e6720636c6f7365646044820152606401610593565b8060005b8151811015611d60577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f0a52424838381518110611c7a57611c7a612d9b565b60200260200101516040518263ffffffff1660e01b8152600401611ca091815260200190565b602060405180830381600087803b158015611cba57600080fd5b505af1158015611cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf29190612e44565b15611d4e5760405162461bcd60e51b815260206004820152602660248201527f4d657461506f7069745374616b696e673a20546f6b656e20616c7265616479206044820152651cdd185ad95960d21b6064820152608401610593565b80611d5881612e11565b915050611c30565b506000611d6b6127d2565b90506040518060800160405280428152602001611d8885516117e5565b815260208082018690526001600160a01b03871660409283015260008481526007825282902083518155838201516001820155918301518051611dd19260028501920190612a35565b5060609190910151600391820180546001600160a01b0319166001600160a01b0392831617905590549085166000908152600960205260409020600101541015611e3e57611e1e846124b3565b6001600160a01b0384166000908152600960205260409020426002909101555b82516001600160a01b03851660009081526009602052604081206001018054909190611e6b908490612e2c565b9091555050825160018054600090611e84908490612e2c565b90915550600090505b83518110156120cf576000848281518110611eaa57611eaa612d9b565b6020908102919091018101516000818152600890925260409091206002015490915060ff1615611f2f5760405162461bcd60e51b815260206004820152602a60248201527f4d657461506f7069745374616b696e673a205265776172647320616c726561646044820152691e481c995919595b595960b21b6064820152608401610593565b856001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e836040518263ffffffff1660e01b8152600401611f8791815260200190565b60206040518083038186803b158015611f9f57600080fd5b505afa158015611fb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd79190612d7e565b6001600160a01b03161461202d5760405162461bcd60e51b815260206004820152601b60248201527f4d657461506f7069745374616b696e673a204e6f74206f776e657200000000006044820152606401610593565b600081815260086020526040908190206001018490555163cda6b84760e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063cda6b84790602401600060405180830381600087803b1580156120a357600080fd5b505af11580156120b7573d6000803e3d6000fd5b505050505080806120c790612e11565b915050611e8d565b50836001600160a01b03167f55331f3fa9ca07b25728aacdb3badf1eacd93d82f1dfe128cc633a137232f966828560405161210b929190612eec565b60405180910390a250505050565b6000828152600760205260409020600301546001600160a01b03166121805760405162461bcd60e51b815260206004820152601e60248201527f4d657461506f7069745374616b696e673a20696e76616c696420706f6f6c00006044820152606401610593565b60008281526007602090815260408083208151608081018352815481526001820154818501526002820180548451818702810187018652818152929593948601938301828280156121f057602002820191906000526020600020905b8154815260200190600101908083116121dc575b5050509183525050600391909101546001600160a01b03166020918201526000858152600790915260408120818155600181018290559192506122366002830182612a80565b50600390810180546001600160a01b0319169055546040808301515160608401516001600160a01b031660009081526009602052919091206001015461227c9190612f3a565b10156122b35761228f81606001516124b3565b60608101516001600160a01b03166000908152600960205260409020426002909101555b6040808201515160608301516001600160a01b0316600090815260096020529182206001018054919290916122e9908490612f3a565b90915550600090505b816040015151811015612444576000600860008460400151848151811061231b5761231b612d9b565b60200260200101518152602001908152602001600020600101819055506123688260400151828151811061235157612351612d9b565b6020026020010151836000015184602001516125c8565b8215612394576123948260400151828151811061238757612387612d9b565b6020026020010151611b05565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632cfb6688836040015183815181106123d9576123d9612d9b565b60200260200101516040518263ffffffff1660e01b81526004016123ff91815260200190565b600060405180830381600087803b15801561241957600080fd5b505af115801561242d573d6000803e3d6000fd5b50505050808061243c90612e11565b9150506122f2565b508060400151516001600082825461245c9190612f3a565b9250508190555080606001516001600160a01b03167f4df2f3841fcba7a6eb8c9d9a655ebae34343968e394881a663ff0f24d0c10c4c8483604001516040516124a6929190612eec565b60405180910390a2505050565b6001600160a01b03811660009081526009602052604090206001015415806124f657506001600160a01b03811660009081526009602052604090206003015460ff165b8061251a57506001600160a01b038116600090815260096020526040902060020154155b156125225750565b6001600160a01b03811660009081526009602052604081206001015461254790611acf565b905080156125aa576001600160a01b0382166000908152600960205260408120805460029091015461257a919084612670565b50905080156125a85761258e600182612f3a565b6001600160a01b0384166000908152600960205260409020555b505b506001600160a01b0316600090815260096020526040812060020155565b6000821180156125d85750600081115b15610890576000838152600860205260408120546125f7908484612670565b5090508015610b3e5761260b600182612f3a565b60008581526008602052604090205550505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82600082156126ec5760006126876103e886612f51565b905060006126976103e842612f51565b600094509050845b8183116126da576126b1600186612e2c565b9450878511156126c8576126c58184612e2c565b92505b6126d3600282612f51565b905061269f565b6126e66103e884612f70565b93505050505b935093915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b1790526108909084906127e9565b612764816124b3565b6001600160a01b03811660008181526009602052604080822060038101805460ff191660011790556002810192909255905490517ff97fbc72b5527d28c9e9dacc392b548067afae0facbc74ccbc458a814475f24c916127c79190815260200190565b60405180910390a250565b60006127e2600480546001019055565b5060045490565b600061283e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166128bb9092919063ffffffff16565b805190915015610890578080602001905181019061285c9190612e44565b6108905760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610593565b60606128ca84846000856128d4565b90505b9392505050565b6060824710156129355760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610593565b843b6129835760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610593565b600080866001600160a01b0316858760405161299f9190612fbe565b60006040518083038185875af1925050503d80600081146129dc576040519150601f19603f3d011682016040523d82523d6000602084013e6129e1565b606091505b50915091506129f18282866129fc565b979650505050505050565b60608315612a0b5750816128cd565b825115612a1b5782518084602001fd5b8160405162461bcd60e51b81526004016105939190612fda565b828054828255906000526020600020908101928215612a70579160200282015b82811115612a70578251825591602001919060010190612a55565b50612a7c929150612a9a565b5090565b508054600082559060005260206000209081019061069891905b5b80821115612a7c5760008155600101612a9b565b600060208284031215612ac157600080fd5b5035919050565b60008083601f840112612ada57600080fd5b50813567ffffffffffffffff811115612af257600080fd5b6020830191508360208260051b8501011115612b0d57600080fd5b9250929050565b60008060208385031215612b2757600080fd5b823567ffffffffffffffff811115612b3e57600080fd5b612b4a85828601612ac8565b90969095509350505050565b6001600160a01b038116811461069857600080fd5b600060208284031215612b7d57600080fd5b81356128cd81612b56565b6000602080835260a0830184518285015281850151604085015260408501516080606086015281815180845260c0870191508483019350600092505b80831015612be45783518252928401926001929092019190840190612bc4565b506001600160a01b0360608801511660808701528094505050505092915050565b60008060008060408587031215612c1b57600080fd5b843567ffffffffffffffff80821115612c3357600080fd5b612c3f88838901612ac8565b90965094506020870135915080821115612c5857600080fd5b50612c6587828801612ac8565b95989497509550505050565b801515811461069857600080fd5b600080600060408486031215612c9457600080fd5b833567ffffffffffffffff811115612cab57600080fd5b612cb786828701612ac8565b9094509250506020840135612ccb81612c71565b809150509250925092565b600080600060408486031215612ceb57600080fd5b83359250602084013567ffffffffffffffff811115612d0957600080fd5b612d1586828701612ac8565b9497909650939450505050565b60008060408385031215612d3557600080fd5b823591506020830135612d4781612c71565b809150509250929050565b60008060408385031215612d6557600080fd5b8235612d7081612b56565b946020939093013593505050565b600060208284031215612d9057600080fd5b81516128cd81612b56565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112612dc857600080fd5b83018035915067ffffffffffffffff821115612de357600080fd5b6020019150600581901b3603821315612b0d57600080fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415612e2557612e25612dfb565b5060010190565b60008219821115612e3f57612e3f612dfb565b500190565b600060208284031215612e5657600080fd5b81516128cd81612c71565b634e487b7160e01b600052604160045260246000fd5b8381526040602082015281604082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115612eb657600080fd5b8260051b8085606085013760009201606001918252509392505050565b600060208284031215612ee557600080fd5b5051919050565b6000604082018483526020604081850152818551808452606086019150828701935060005b81811015612f2d57845183529383019391830191600101612f11565b5090979650505050505050565b600082821015612f4c57612f4c612dfb565b500390565b6000816000190483118215151615612f6b57612f6b612dfb565b500290565b600082612f8d57634e487b7160e01b600052601260045260246000fd5b500490565b60005b83811015612fad578181015183820152602001612f95565b83811115610b3e5750506000910152565b60008251612fd0818460208701612f92565b9190910192915050565b6020815260008251806020840152612ff9816040850160208701612f92565b601f01601f1916919091016040019291505056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220155d77725cb2e7cdb4c8ee58f910529f3c5fa74f0021b5db9b8cb14aa6b4dc5e64736f6c63430008090033000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f29798

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101e55760003560e01c80638c7a63ae1161010f578063bb0fd147116100a2578063dc338c2411610071578063dc338c24146104ec578063e6683d22146104f5578063f2fde38b146104fe578063f6ee0ec31461051157600080fd5b8063bb0fd1471461046e578063be7d236614610481578063ce40fbaf146104a7578063d86cb0a5146104e457600080fd5b80639be65a60116100de5780639be65a60146104105780639ebea88c14610423578063b4a59ef614610436578063baa51f861461044957600080fd5b80638c7a63ae146103ac5780638da5cb5b146103e3578063906b58e6146103f457806398cfe5871461040857600080fd5b80633fa9e52711610187578063715018a611610156578063715018a6146103105780637504db3e146103185780637de1e5361461032b57806386481d401461036a57600080fd5b80633fa9e527146102ce57806342295fb3146102e1578063631bde64146102ea5780636fc15aac146102fd57600080fd5b806321536184116101c357806321536184146102455780632a55f4ee146102585780632f380b35146102975780633836b38a146102b757600080fd5b8063013054c2146101ea57806309813482146101ff5780630fbf0a9314610232575b600080fd5b6101fd6101f8366004612aaf565b610524565b005b61021261020d366004612aaf565b61069b565b604080519384526020840192909252908201526060015b60405180910390f35b6101fd610240366004612b14565b6106ee565b6101fd610253366004612b14565b61078f565b610287610266366004612b6b565b6001600160a01b031660009081526009602052604090206003015460ff1690565b6040519015158152602001610229565b6102aa6102a5366004612aaf565b610895565b6040516102299190612b88565b6102c060035481565b604051908152602001610229565b6101fd6102dc366004612c05565b61095f565b6102c06103e881565b6101fd6102f8366004612c7f565b610a69565b6101fd61030b366004612cd6565b610b44565b6101fd6112fa565b6101fd610326366004612b6b565b61134e565b6103527f000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f2979881565b6040516001600160a01b039091168152602001610229565b61037d610378366004612aaf565b611406565b6040805196875260208701959095529385019290925260608401526080830152151560a082015260c001610229565b6103bf6103ba366004612aaf565b611497565b60408051825181526020808401519082015291810151151590820152606001610229565b6000546001600160a01b0316610352565b60005461028790600160a01b900460ff1681565b6101fd6114fb565b6101fd61041e366004612b6b565b6115ea565b6101fd610431366004612d22565b611766565b6102c0610444366004612aaf565b6117e5565b610287610457366004612aaf565b600090815260086020526040902060010154151590565b6101fd61047c366004612d52565b61181b565b61028761048f366004612aaf565b60009081526008602052604090206002015460ff1690565b6104ba6104b5366004612b6b565b611904565b6040805195865260208601949094529284019190915260608301521515608082015260a001610229565b6101fd61199a565b6102c060015481565b6102c060025481565b6101fd61050c366004612b6b565b611a19565b6102c061051f366004612aaf565b611acf565b60008181526008602052604090206002015460ff161561059c5760405162461bcd60e51b815260206004820152602860248201527f4d657461506f7069745374616b696e673a20546f6b656e20616c7265616479206044820152671c995919595b595960c21b60648201526084015b60405180910390fd5b336040516331a9108f60e11b8152600481018390526001600160a01b03918216917f000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f297981690636352211e9060240160206040518083038186803b15801561060157600080fd5b505afa158015610615573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106399190612d7e565b6001600160a01b03161461068f5760405162461bcd60e51b815260206004820152601b60248201527f4d657461506f7069745374616b696e673a206e6f74206f776e657200000000006044820152606401610593565b61069881611b05565b50565b60008181526008602052604081206001015481908190806106c7576000935060009250600091506106e6565b6000818152600760205260409020805460019091015491945092509050825b509193909250565b60025481111561074e5760405162461bcd60e51b815260206004820152602560248201527f4d657461506f7069745374616b696e673a2061626f7665206d6178207465616d6044820152642073697a6560d81b6064820152608401610593565b61078b33838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611bd292505050565b5050565b60005b81811015610890576002548383838181106107af576107af612d9b565b90506020028101906107c19190612db1565b9050111561081f5760405162461bcd60e51b815260206004820152602560248201527f4d657461506f7069745374616b696e673a2061626f7665206d6178207465616d6044820152642073697a6560d81b6064820152608401610593565b61087e3384848481811061083557610835612d9b565b90506020028101906108479190612db1565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611bd292505050565b8061088881612e11565b915050610792565b505050565b6108c9604051806080016040528060008152602001600081526020016060815260200160006001600160a01b031681525090565b6000828152600760209081526040918290208251608081018452815481526001820154818401526002820180548551818602810186018752818152929593949386019383018282801561093b57602002820191906000526020600020905b815481526020019060010190808311610927575b5050509183525050600391909101546001600160a01b031660209091015292915050565b6000546001600160a01b031633146109a75760405162461bcd60e51b8152602060048201819052602482015260008051602061300e8339815191526044820152606401610593565b6002839055600381905560005b83811015610a09578484828181106109ce576109ce612d9b565b90506020020135600560008360016109e69190612e2c565b815260208101919091526040016000205580610a0181612e11565b9150506109b4565b5060005b81811015610a6257828282818110610a2757610a27612d9b565b9050602002013560066000836001610a3f9190612e2c565b815260208101919091526040016000205580610a5a81612e11565b915050610a0d565b5050505050565b60005b82811015610b3e573360076000868685818110610a8b57610a8b612d9b565b60209081029290920135835250810191909152604001600020600301546001600160a01b031614610b0a5760405162461bcd60e51b815260206004820152602360248201527f4d657461506f7069745374616b696e673a206e6f74206f776e6572206f6620706044820152621bdbdb60ea1b6064820152608401610593565b610b2c848483818110610b1f57610b1f612d9b565b9050602002013583612119565b80610b3681612e11565b915050610a6c565b50505050565b600054600160a01b900460ff1615610b9e5760405162461bcd60e51b815260206004820181905260248201527f4d657461506f7069745374616b696e673a207374616b696e6720636c6f7365646044820152606401610593565b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250925050505b8151811015610d02577f000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f297986001600160a01b031663f0a52424838381518110610c1c57610c1c612d9b565b60200260200101516040518263ffffffff1660e01b8152600401610c4291815260200190565b602060405180830381600087803b158015610c5c57600080fd5b505af1158015610c70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c949190612e44565b15610cf05760405162461bcd60e51b815260206004820152602660248201527f4d657461506f7069745374616b696e673a20546f6b656e20616c7265616479206044820152651cdd185ad95960d21b6064820152608401610593565b80610cfa81612e11565b915050610bd2565b506000848152600760205260409020600301546001600160a01b03163314610d785760405162461bcd60e51b815260206004820152602360248201527f4d657461506f7069745374616b696e673a206e6f74206f776e6572206f6620706044820152621bdbdb60ea1b6064820152608401610593565b60028054600086815260076020526040902090910154610d99908490612e2c565b1115610df55760405162461bcd60e51b815260206004820152602560248201527f4d657461506f7069745374616b696e673a2061626f7665206d6178207465616d6044820152642073697a6560d81b6064820152608401610593565b600354336000908152600960205260409020600101541015610e3157610e1a336124b3565b336000908152600960205260409020426002909101555b3360009081526009602052604081206001018054849290610e53908490612e2c565b909155505060008481526007602052604081206002015490610e758483612e2c565b67ffffffffffffffff811115610e8d57610e8d612e61565b604051908082528060200260200182016040528015610eb6578160200160208202803683370190505b50905060005b600087815260076020526040902060020154811015610f825760008781526007602052604090206002018054610f25919083908110610efd57610efd612d9b565b60009182526020808320909101548a83526007909152604090912080546001909101546125c8565b6000878152600760205260409020600201805482908110610f4857610f48612d9b565b9060005260206000200154828281518110610f6557610f65612d9b565b602090810291909101015280610f7a81612e11565b915050610ebc565b5060005b848110156112515760086000878784818110610fa457610fa4612d9b565b602090810292909201358352508101919091526040016000206002015460ff16156110245760405162461bcd60e51b815260206004820152602a60248201527f4d657461506f7069745374616b696e673a205265776172647320616c726561646044820152691e481c995919595b595960b21b6064820152608401610593565b337f000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f297986001600160a01b0316636352211e88888581811061106657611066612d9b565b905060200201356040518263ffffffff1660e01b815260040161108b91815260200190565b60206040518083038186803b1580156110a357600080fd5b505afa1580156110b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110db9190612d7e565b6001600160a01b0316146111315760405162461bcd60e51b815260206004820152601b60248201527f4d657461506f7069745374616b696e673a204e6f74206f776e657200000000006044820152606401610593565b7f000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f297986001600160a01b031663cda6b84787878481811061117257611172612d9b565b905060200201356040518263ffffffff1660e01b815260040161119791815260200190565b600060405180830381600087803b1580156111b157600080fd5b505af11580156111c5573d6000803e3d6000fd5b505050508585828181106111db576111db612d9b565b905060200201358282856111ef9190612e2c565b815181106111ff576111ff612d9b565b602002602001018181525050866008600088888581811061122257611222612d9b565b90506020020135815260200190815260200160002060010181905550808061124990612e11565b915050610f86565b506000868152600760205260409020429055805161126e906117e5565b6000878152600760209081526040909120600181019290925582516112999260020191840190612a35565b5084849050600160008282546112af9190612e2c565b909155505060405133907f55331f3fa9ca07b25728aacdb3badf1eacd93d82f1dfe128cc633a137232f966906112ea90899089908990612e77565b60405180910390a2505050505050565b6000546001600160a01b031633146113425760405162461bcd60e51b8152602060048201819052602482015260008051602061300e8339815191526044820152606401610593565b61134c6000612620565b565b6000546001600160a01b031633146113965760405162461bcd60e51b8152602060048201819052602482015260008051602061300e8339815191526044820152606401610593565b60405147906001600160a01b0383169082156108fc029083906000818181858888f193505050501580156113ce573d6000803e3d6000fd5b506040518181527f5c0a34c718716ee467140afbc9fb741fc2980e41d00f04a8f7f635d76484ff479060200160405180910390a15050565b600081815260086020526040812080546001820154600290920154909291829182919060ff16811561148e576000878152600860209081526040808320805460019182015485526007909352922080549201546114639290612670565b6000898152600860209081526040808320600190810154845260079092529091200154919650945092505b91939550919395565b6114bd604051806060016040528060008152602001600081526020016000151581525090565b506000908152600860209081526040918290208251606081018452815481526001820154928101929092526002015460ff1615159181019190915290565b6000546001600160a01b031633146115435760405162461bcd60e51b8152602060048201819052602482015260008051602061300e8339815191526044820152606401610593565b600054600160a01b900460ff16156115ae5760405162461bcd60e51b815260206004820152602860248201527f4d657461506f7069745374616b696e673a207374616b696e6720616c726561646044820152671e4818db1bdcd95960c21b6064820152608401610593565b6000805460ff60a01b1916600160a01b1781556040517f5e0ff495077a830a1f92088545bae65274cc65d979385b39703c9fc05f2dc4209190a1565b6000546001600160a01b031633146116325760405162461bcd60e51b8152602060048201819052602482015260008051602061300e8339815191526044820152606401610593565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b15801561167457600080fd5b505afa158015611688573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ac9190612ed3565b90508061170b5760405162461bcd60e51b815260206004820152602760248201527f4f7065726174696f6e733a2043616e6e6f74207265636f766572207a65726f2060448201526662616c616e636560c81b6064820152608401610593565b61171f6001600160a01b03831633836126f4565b816001600160a01b03167f14f11966a996e0629572e51064726d2057a80fbd34efc066682c06a71dbb6e988260405161175a91815260200190565b60405180910390a25050565b6000828152600760205260409020600301546001600160a01b031633146117db5760405162461bcd60e51b815260206004820152602360248201527f4d657461506f7069745374616b696e673a206e6f74206f776e6572206f6620706044820152621bdbdb60ea1b6064820152608401610593565b61078b8282612119565b600060025482111561180857505060025460009081526005602052604090205490565b5060009081526005602052604090205490565b6000546001600160a01b031633146118635760405162461bcd60e51b8152602060048201819052602482015260008051602061300e8339815191526044820152606401610593565b6040516323b872dd60e01b8152306004820152336024820152604481018290526001600160a01b038316906323b872dd90606401600060405180830381600087803b1580156118b157600080fd5b505af11580156118c5573d6000803e3d6000fd5b50505050816001600160a01b03167f861c3ea25dbda3af0bf5d258ba8582c0276c9446b1479e817be3f1b4a89acf918260405161175a91815260200190565b6001600160a01b0381166000908152600960205260408120805460038201546002909201549092918291829160ff169015611991576001600160a01b03861660009081526009602052604090206001015461195e90611acf565b6001600160a01b0387166000908152600960205260409020805460029091015491935061198b9184612670565b90945092505b91939590929450565b3360009081526009602052604090206003015460ff1615611a105760405162461bcd60e51b815260206004820152602a60248201527f4d657461506f7069745374616b696e673a204163636f756e7420616c726561646044820152691e481c995919595b595960b21b6064820152608401610593565b61134c3361275b565b6000546001600160a01b03163314611a615760405162461bcd60e51b8152602060048201819052602482015260008051602061300e8339815191526044820152606401610593565b6001600160a01b038116611ac65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610593565b61069881612620565b6000600354821115611af257505060035460009081526006602052604090205490565b5060009081526006602052604090205490565b60008181526008602052604090206001015415611b795760405162461bcd60e51b815260206004820152602c60248201527f4d657461506f7069745374616b696e673a204d75737420756e7374616b65206260448201526b65666f72652072656465656d60a01b6064820152608401610593565b60008181526008602090815260409182902060028101805460ff19166001179055548251848152918201527f57e4b043e953e434944a3b974b27c3f3f96c31110ea0fb2224c90edecd07e026910160405180910390a150565b600054600160a01b900460ff1615611c2c5760405162461bcd60e51b815260206004820181905260248201527f4d657461506f7069745374616b696e673a207374616b696e6720636c6f7365646044820152606401610593565b8060005b8151811015611d60577f000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f297986001600160a01b031663f0a52424838381518110611c7a57611c7a612d9b565b60200260200101516040518263ffffffff1660e01b8152600401611ca091815260200190565b602060405180830381600087803b158015611cba57600080fd5b505af1158015611cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf29190612e44565b15611d4e5760405162461bcd60e51b815260206004820152602660248201527f4d657461506f7069745374616b696e673a20546f6b656e20616c7265616479206044820152651cdd185ad95960d21b6064820152608401610593565b80611d5881612e11565b915050611c30565b506000611d6b6127d2565b90506040518060800160405280428152602001611d8885516117e5565b815260208082018690526001600160a01b03871660409283015260008481526007825282902083518155838201516001820155918301518051611dd19260028501920190612a35565b5060609190910151600391820180546001600160a01b0319166001600160a01b0392831617905590549085166000908152600960205260409020600101541015611e3e57611e1e846124b3565b6001600160a01b0384166000908152600960205260409020426002909101555b82516001600160a01b03851660009081526009602052604081206001018054909190611e6b908490612e2c565b9091555050825160018054600090611e84908490612e2c565b90915550600090505b83518110156120cf576000848281518110611eaa57611eaa612d9b565b6020908102919091018101516000818152600890925260409091206002015490915060ff1615611f2f5760405162461bcd60e51b815260206004820152602a60248201527f4d657461506f7069745374616b696e673a205265776172647320616c726561646044820152691e481c995919595b595960b21b6064820152608401610593565b856001600160a01b03167f000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f297986001600160a01b0316636352211e836040518263ffffffff1660e01b8152600401611f8791815260200190565b60206040518083038186803b158015611f9f57600080fd5b505afa158015611fb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd79190612d7e565b6001600160a01b03161461202d5760405162461bcd60e51b815260206004820152601b60248201527f4d657461506f7069745374616b696e673a204e6f74206f776e657200000000006044820152606401610593565b600081815260086020526040908190206001018490555163cda6b84760e01b8152600481018290527f000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f297986001600160a01b03169063cda6b84790602401600060405180830381600087803b1580156120a357600080fd5b505af11580156120b7573d6000803e3d6000fd5b505050505080806120c790612e11565b915050611e8d565b50836001600160a01b03167f55331f3fa9ca07b25728aacdb3badf1eacd93d82f1dfe128cc633a137232f966828560405161210b929190612eec565b60405180910390a250505050565b6000828152600760205260409020600301546001600160a01b03166121805760405162461bcd60e51b815260206004820152601e60248201527f4d657461506f7069745374616b696e673a20696e76616c696420706f6f6c00006044820152606401610593565b60008281526007602090815260408083208151608081018352815481526001820154818501526002820180548451818702810187018652818152929593948601938301828280156121f057602002820191906000526020600020905b8154815260200190600101908083116121dc575b5050509183525050600391909101546001600160a01b03166020918201526000858152600790915260408120818155600181018290559192506122366002830182612a80565b50600390810180546001600160a01b0319169055546040808301515160608401516001600160a01b031660009081526009602052919091206001015461227c9190612f3a565b10156122b35761228f81606001516124b3565b60608101516001600160a01b03166000908152600960205260409020426002909101555b6040808201515160608301516001600160a01b0316600090815260096020529182206001018054919290916122e9908490612f3a565b90915550600090505b816040015151811015612444576000600860008460400151848151811061231b5761231b612d9b565b60200260200101518152602001908152602001600020600101819055506123688260400151828151811061235157612351612d9b565b6020026020010151836000015184602001516125c8565b8215612394576123948260400151828151811061238757612387612d9b565b6020026020010151611b05565b7f000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f297986001600160a01b0316632cfb6688836040015183815181106123d9576123d9612d9b565b60200260200101516040518263ffffffff1660e01b81526004016123ff91815260200190565b600060405180830381600087803b15801561241957600080fd5b505af115801561242d573d6000803e3d6000fd5b50505050808061243c90612e11565b9150506122f2565b508060400151516001600082825461245c9190612f3a565b9250508190555080606001516001600160a01b03167f4df2f3841fcba7a6eb8c9d9a655ebae34343968e394881a663ff0f24d0c10c4c8483604001516040516124a6929190612eec565b60405180910390a2505050565b6001600160a01b03811660009081526009602052604090206001015415806124f657506001600160a01b03811660009081526009602052604090206003015460ff165b8061251a57506001600160a01b038116600090815260096020526040902060020154155b156125225750565b6001600160a01b03811660009081526009602052604081206001015461254790611acf565b905080156125aa576001600160a01b0382166000908152600960205260408120805460029091015461257a919084612670565b50905080156125a85761258e600182612f3a565b6001600160a01b0384166000908152600960205260409020555b505b506001600160a01b0316600090815260096020526040812060020155565b6000821180156125d85750600081115b15610890576000838152600860205260408120546125f7908484612670565b5090508015610b3e5761260b600182612f3a565b60008581526008602052604090205550505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82600082156126ec5760006126876103e886612f51565b905060006126976103e842612f51565b600094509050845b8183116126da576126b1600186612e2c565b9450878511156126c8576126c58184612e2c565b92505b6126d3600282612f51565b905061269f565b6126e66103e884612f70565b93505050505b935093915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b1790526108909084906127e9565b612764816124b3565b6001600160a01b03811660008181526009602052604080822060038101805460ff191660011790556002810192909255905490517ff97fbc72b5527d28c9e9dacc392b548067afae0facbc74ccbc458a814475f24c916127c79190815260200190565b60405180910390a250565b60006127e2600480546001019055565b5060045490565b600061283e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166128bb9092919063ffffffff16565b805190915015610890578080602001905181019061285c9190612e44565b6108905760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610593565b60606128ca84846000856128d4565b90505b9392505050565b6060824710156129355760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610593565b843b6129835760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610593565b600080866001600160a01b0316858760405161299f9190612fbe565b60006040518083038185875af1925050503d80600081146129dc576040519150601f19603f3d011682016040523d82523d6000602084013e6129e1565b606091505b50915091506129f18282866129fc565b979650505050505050565b60608315612a0b5750816128cd565b825115612a1b5782518084602001fd5b8160405162461bcd60e51b81526004016105939190612fda565b828054828255906000526020600020908101928215612a70579160200282015b82811115612a70578251825591602001919060010190612a55565b50612a7c929150612a9a565b5090565b508054600082559060005260206000209081019061069891905b5b80821115612a7c5760008155600101612a9b565b600060208284031215612ac157600080fd5b5035919050565b60008083601f840112612ada57600080fd5b50813567ffffffffffffffff811115612af257600080fd5b6020830191508360208260051b8501011115612b0d57600080fd5b9250929050565b60008060208385031215612b2757600080fd5b823567ffffffffffffffff811115612b3e57600080fd5b612b4a85828601612ac8565b90969095509350505050565b6001600160a01b038116811461069857600080fd5b600060208284031215612b7d57600080fd5b81356128cd81612b56565b6000602080835260a0830184518285015281850151604085015260408501516080606086015281815180845260c0870191508483019350600092505b80831015612be45783518252928401926001929092019190840190612bc4565b506001600160a01b0360608801511660808701528094505050505092915050565b60008060008060408587031215612c1b57600080fd5b843567ffffffffffffffff80821115612c3357600080fd5b612c3f88838901612ac8565b90965094506020870135915080821115612c5857600080fd5b50612c6587828801612ac8565b95989497509550505050565b801515811461069857600080fd5b600080600060408486031215612c9457600080fd5b833567ffffffffffffffff811115612cab57600080fd5b612cb786828701612ac8565b9094509250506020840135612ccb81612c71565b809150509250925092565b600080600060408486031215612ceb57600080fd5b83359250602084013567ffffffffffffffff811115612d0957600080fd5b612d1586828701612ac8565b9497909650939450505050565b60008060408385031215612d3557600080fd5b823591506020830135612d4781612c71565b809150509250929050565b60008060408385031215612d6557600080fd5b8235612d7081612b56565b946020939093013593505050565b600060208284031215612d9057600080fd5b81516128cd81612b56565b634e487b7160e01b600052603260045260246000fd5b6000808335601e19843603018112612dc857600080fd5b83018035915067ffffffffffffffff821115612de357600080fd5b6020019150600581901b3603821315612b0d57600080fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415612e2557612e25612dfb565b5060010190565b60008219821115612e3f57612e3f612dfb565b500190565b600060208284031215612e5657600080fd5b81516128cd81612c71565b634e487b7160e01b600052604160045260246000fd5b8381526040602082015281604082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115612eb657600080fd5b8260051b8085606085013760009201606001918252509392505050565b600060208284031215612ee557600080fd5b5051919050565b6000604082018483526020604081850152818551808452606086019150828701935060005b81811015612f2d57845183529383019391830191600101612f11565b5090979650505050505050565b600082821015612f4c57612f4c612dfb565b500390565b6000816000190483118215151615612f6b57612f6b612dfb565b500290565b600082612f8d57634e487b7160e01b600052601260045260246000fd5b500490565b60005b83811015612fad578181015183820152602001612f95565b83811115610b3e5750506000910152565b60008251612fd0818460208701612f92565b9190910192915050565b6020815260008251806020840152612ff9816040850160208701612f92565b601f01601f1916919091016040019291505056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220155d77725cb2e7cdb4c8ee58f910529f3c5fa74f0021b5db9b8cb14aa6b4dc5e64736f6c63430008090033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f29798

-----Decoded View---------------
Arg [0] : _collection (address): 0xd9A0139d78fcB906b5a39A9E289a7Ae846F29798

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f29798


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.