ETH Price: $3,010.17 (-8.18%)

Contract

0x3D591226E28c81440eE11e87d731c47dB6dD7F4D
 
Transaction Hash
Method
Block
From
To
Withdraw NF Ts200364012024-06-07 0:34:59220 days ago1717720499IN
0x3D591226...dB6dD7F4D
0 ETH0.0015358912.18479996
Withdraw NF Ts200195492024-06-04 16:07:59223 days ago1717517279IN
0x3D591226...dB6dD7F4D
0 ETH0.0044662521.50339407
Withdraw NF Ts198893562024-05-17 11:20:59241 days ago1715944859IN
0x3D591226...dB6dD7F4D
0 ETH0.001079411.58165166
Withdraw NF Ts195731792024-04-03 5:31:11285 days ago1712122271IN
0x3D591226...dB6dD7F4D
0 ETH0.0056141423.3417006
Withdraw NF Ts195731742024-04-03 5:30:11285 days ago1712122211IN
0x3D591226...dB6dD7F4D
0 ETH0.0066639223.66956223
Withdraw NF Ts194433642024-03-15 22:37:59303 days ago1710542279IN
0x3D591226...dB6dD7F4D
0 ETH0.0028299536.12216495
Stake NF Ts191041892024-01-28 9:36:59351 days ago1706434619IN
0x3D591226...dB6dD7F4D
0 ETH0.0065402713.7553863
Withdraw NF Ts191041352024-01-28 9:26:11351 days ago1706433971IN
0x3D591226...dB6dD7F4D
0 ETH0.0028022314.96712053
Withdraw NF Ts186851302023-11-30 14:51:59410 days ago1701355919IN
0x3D591226...dB6dD7F4D
0 ETH0.0145519951.67831172
Withdraw NF Ts186851272023-11-30 14:51:23410 days ago1701355883IN
0x3D591226...dB6dD7F4D
0 ETH0.0111485652.13190829
Stake NF Ts186543152023-11-26 7:19:11414 days ago1700983151IN
0x3D591226...dB6dD7F4D
0 ETH0.0081351819.02402862
Withdraw NF Ts185991662023-11-18 13:57:23422 days ago1700315843IN
0x3D591226...dB6dD7F4D
0 ETH0.002786429.89320323
Stake NF Ts183772342023-10-18 12:27:35453 days ago1697632055IN
0x3D591226...dB6dD7F4D
0 ETH0.0017132510.9246451
Withdraw NF Ts183772322023-10-18 12:27:11453 days ago1697632031IN
0x3D591226...dB6dD7F4D
0 ETH0.0012966413.91073453
Stake NF Ts182523142023-10-01 1:10:23470 days ago1696122623IN
0x3D591226...dB6dD7F4D
0 ETH0.001585410.11017004
Withdraw NF Ts182523122023-10-01 1:09:59470 days ago1696122599IN
0x3D591226...dB6dD7F4D
0 ETH0.000925349.92855555
Stake NF Ts180885962023-09-08 2:02:47493 days ago1694138567IN
0x3D591226...dB6dD7F4D
0 ETH0.0056547411.60480409
Stake NF Ts180417952023-09-01 12:46:59500 days ago1693572419IN
0x3D591226...dB6dD7F4D
0 ETH0.0020387213
Withdraw NF Ts180417862023-09-01 12:45:11500 days ago1693572311IN
0x3D591226...dB6dD7F4D
0 ETH0.0016546815
Stake NF Ts180095332023-08-28 0:21:47504 days ago1693182107IN
0x3D591226...dB6dD7F4D
0 ETH0.0020860313.30269555
Withdraw NF Ts180095252023-08-28 0:20:11504 days ago1693182011IN
0x3D591226...dB6dD7F4D
0 ETH0.0012741213.67081762
Withdraw NF Ts179902082023-08-25 7:26:11507 days ago1692948371IN
0x3D591226...dB6dD7F4D
0 ETH0.0020466318.58604432
Withdraw NF Ts179768692023-08-23 10:39:59509 days ago1692787199IN
0x3D591226...dB6dD7F4D
0 ETH0.0018389316.698
Stake NF Ts178962382023-08-12 3:55:47520 days ago1691812547IN
0x3D591226...dB6dD7F4D
0 ETH0.0022862211.43110031
Stake NF Ts178086562023-07-30 21:55:23532 days ago1690754123IN
0x3D591226...dB6dD7F4D
0 ETH0.0035979216.25828146
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakePoolV2

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 9 : StakePoolV2.sol
/***
* MIT License
* ===========
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*                             
*     __  _____    __    ____ 
*    / / / /   |  / /   / __ \
*   / /_/ / /| | / /   / / / /
*  / __  / ___ |/ /___/ /_/ / 
* /_/ /_/_/  |_/_____/\____/  
*                             
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/security//ReentrancyGuard.sol";

contract StakePoolV2 is ReentrancyGuard, Pausable, Ownable {

    using SafeMath for uint256;
    using EnumerableSet for EnumerableSet.UintSet;

    IERC721 public _erc721;
    uint256 public _stakeLimit;

    struct StakeCondition{
        uint256 duration;
        uint256 rewardRate;
    }

    struct StakeInfo{
        uint256 startTime;
        uint256 accumulateTime;
    }

    struct StakeRecord{
        uint256 tokenId;
        uint256 accumulateTime;
        uint256 extraTime;
        uint256 stakeTime;
        uint256 leftLockTime;
    }

    EnumerableSet.UintSet private _stakeTypes;
    mapping(uint256 => StakeCondition) public _stakeCondition;  // staketype=>StakeCondition;
    mapping(uint256 => mapping(address => EnumerableSet.UintSet)) private _recordStakeIds;  // staketype=>address=>tokenids;
    mapping(uint256 => mapping(address => EnumerableSet.UintSet)) private _curStakeIds;  // staketype=>address=>tokenids;
    mapping(uint256 => mapping(address => mapping( uint256 => StakeInfo ))) public _stakeInfos; //staketype=>address=>tokenid=>StakeInfo

    event eStake( uint256 tokenId, address owner, uint256 action, uint256 timestamp );
    event eWithdraw( uint256 tokenId, address owner, uint256 action,uint256 duration, uint256 timestamp );

    constructor(IERC721 erc721, uint256 stakeLimit) {
        _erc721 = erc721;
        _stakeLimit = stakeLimit;

        setStakeCondition(0,0,0);
        setStakeCondition(1,7*24*3600,100);
        setStakeCondition(2,30*24*3600,200);
    }


    function setErc721(IERC721 erc721) public onlyOwner{
        _erc721 = erc721;
    }
    
    function setLimit(uint256 limit) public onlyOwner{
        _stakeLimit = limit;
    }

    function close(uint256 stakeType) public onlyOwner{
        _stakeTypes.remove(stakeType);
    }

    function setStakeCondition(uint256 stakeType, uint256 duration, uint256 rewardRate) public onlyOwner{
        _stakeCondition[stakeType].duration = duration;
        _stakeCondition[stakeType].rewardRate = rewardRate;

        _stakeTypes.add(stakeType);
    }
    
    function onERC721Received(address /*operator*/ , address /*from*/ , uint256 /*tokenId*/, bytes calldata  /*data*/) external pure returns (bytes4) {

        return this.onERC721Received.selector;
    }

    function getCurStakeTokens(uint256 stakeType, address owner) public view returns(uint256[] memory ){

        require(_stakeTypes.contains(stakeType), "invalid stake type !");

        return _curStakeIds[stakeType][owner].values();
    }

    function getRecordStakeTokens(uint256 stakeType, address owner) public view returns(uint256[] memory ){

        require(_stakeTypes.contains(stakeType), "invalid stake type !");

        return _recordStakeIds[stakeType][owner].values();
    }

    function getStakeTypes() public view returns(uint256[] memory ){
        return _stakeTypes.values();
    }

    function getCurStakeInfo(uint256 stakeType, address owner) public view returns(StakeRecord[] memory ){

        uint256[] memory tokenIds  = _curStakeIds[stakeType][owner].values();

        StakeRecord[] memory records = new StakeRecord[](tokenIds.length);

        return _getStakeInfo(stakeType,owner,tokenIds,records, 0);

    }

    function getStakeInfo(uint256 stakeType,address owner) public view returns(StakeRecord[] memory ){

        uint256[] memory tokenIds  = _recordStakeIds[stakeType][owner].values();

        StakeRecord[] memory records = new StakeRecord[](tokenIds.length);

        return _getStakeInfo(stakeType,owner,tokenIds,records, 0);

    }

    function getAllStakeInfo(address owner) public view returns(StakeRecord[] memory ){

        uint256 alllen = 0;
        for(uint256 i=0; i<_stakeTypes.length(); i++){
            alllen += _recordStakeIds[_stakeTypes.at(i)][owner].length();
        }

        StakeRecord[] memory records = new StakeRecord[](alllen);
        uint256 offset = 0;
        for(uint256 i=0; i<_stakeTypes.length(); i++){
           
            uint256[] memory tokenIds  = _recordStakeIds[_stakeTypes.at(i)][owner].values();
            if(tokenIds.length >0){
                records = _getStakeInfo(_stakeTypes.at(i),owner,tokenIds,records,offset);
                offset += _recordStakeIds[_stakeTypes.at(i)][owner].length();
            }
        }

        return records;
    }


    function _getStakeInfo(uint256 stakeType, address owner, uint256[] memory tokenIds, StakeRecord[] memory records,uint256 offset ) 
    internal view returns (StakeRecord[] memory ) {

        require(_stakeTypes.contains(stakeType), "invalid stake type !");

        
        for( uint256 i=0; i<tokenIds.length; i++){
            
            uint256 start = i + offset;
            records[start].tokenId = tokenIds[i];
            StakeInfo memory sInfo = _stakeInfos[stakeType][owner][tokenIds[i]];
            records[start].accumulateTime = sInfo.accumulateTime;
            records[start].leftLockTime=0;
            records[start].extraTime=0;
            records[start].stakeTime=0;
            
            if(sInfo.startTime>0){
  
                uint256 delta = block.timestamp.sub(sInfo.startTime);
                uint256 duration = _stakeCondition[stakeType].duration;

                if(duration==0){
                    records[start].extraTime=delta;

                }
                else if(delta<duration){
                    records[start].leftLockTime = duration.sub(delta);
                }

                records[start].stakeTime=delta;
            }
        }

        return records;
    }

    function stakeNFTs(uint256 stakeType, uint256[] calldata nftList) public whenNotPaused nonReentrant {

        require(_stakeTypes.contains(stakeType), "invalid stake type !");

        uint256 stakeAmount = nftList.length+_curStakeIds[stakeType][msg.sender].length();
        require( stakeAmount <= _stakeLimit, "stake amount over limit! " );

        for( uint256 i=0; i<nftList.length; i++){

            _erc721.safeTransferFrom(msg.sender, address(this), nftList[i]);
        
            _curStakeIds[stakeType][msg.sender].add(nftList[i]);
            _recordStakeIds[stakeType][msg.sender].add(nftList[i]);

            _stakeInfos[stakeType][msg.sender][nftList[i]].startTime=block.timestamp;

            emit eStake(nftList[i], msg.sender, stakeType, block.timestamp);

        }

    }

    function withdrawNFTs( uint256 stakeType, uint256[] calldata nftList) public whenNotPaused nonReentrant {

        for (uint256 i = 0; i<nftList.length; i++) {

            uint256 tokenId = nftList[i];
            require(_stakeTypes.contains(stakeType), "invalid stake type !");
            require(_curStakeIds[stakeType][msg.sender].contains(tokenId),"invalid tokenid or staketype!");

            StakeInfo storage sInfo = _stakeInfos[stakeType][msg.sender][tokenId];
            uint256 delta = block.timestamp.sub(sInfo.startTime);

            require(delta >= _stakeCondition[stakeType].duration ,"token pledge has not expired!");

            if(_stakeCondition[stakeType].duration>0){
                delta = _stakeCondition[stakeType].duration;
            }

            _curStakeIds[stakeType][msg.sender].remove(tokenId);
            _erc721.safeTransferFrom(address(this), msg.sender, tokenId);

            sInfo.startTime = 0;
            uint256 reward = (_stakeCondition[stakeType].rewardRate*delta/10000).add(delta);
            sInfo.accumulateTime = sInfo.accumulateTime.add(reward);

            emit eWithdraw(tokenId, msg.sender, stakeType, reward, block.timestamp);
        }
       
    }

    function withdrawByType(uint256 stakeType) public whenNotPaused nonReentrant {

        uint256[] memory ids = _curStakeIds[stakeType][msg.sender].values();
        require(ids.length>0,"there are not any nfts staking");

        for (uint256 i = 0; i <ids.length; i++) {
            _withdraw(stakeType, ids[i]);
        }
    }

    function withdrawAll() public whenNotPaused nonReentrant {

        uint256 stakeType;
        for(uint256 k=0; k<_stakeTypes.length(); k++){
            stakeType = _stakeTypes.at(k);

            uint256[] memory ids = _curStakeIds[stakeType][msg.sender].values();
            // require(ids.length>0,"there are not any nfts staking");

            for (uint256 i = 0; i <ids.length; i++) {
                _withdraw(stakeType, ids[i]);
            }
        }
    }

    function _withdraw(uint256 stakeType, uint256 tokenId ) internal   {

        require(_stakeTypes.contains(stakeType), "invalid stake type !");

        StakeInfo storage sInfo = _stakeInfos[stakeType][msg.sender][tokenId];

        require(_curStakeIds[stakeType][msg.sender].contains(tokenId),"invalid tokenid or staketype!");
        //require( sInfo.startTime >0, "invalid stake status! ");

        uint256 delta = block.timestamp.sub(sInfo.startTime);
        
        if(delta>=_stakeCondition[stakeType].duration ){

            if(_stakeCondition[stakeType].duration>0){
                delta = _stakeCondition[stakeType].duration;
            }

            _curStakeIds[stakeType][msg.sender].remove(tokenId);
            _erc721.safeTransferFrom(address(this), msg.sender, tokenId);

            sInfo.startTime = 0;
            uint256 reward = (_stakeCondition[stakeType].rewardRate*delta/10000).add(delta);
            sInfo.accumulateTime = sInfo.accumulateTime.add(reward);

            emit eWithdraw(tokenId, msg.sender, stakeType, reward, block.timestamp);
        }
    }


    function pause() public onlyOwner{
        if(paused()){
            _pause();
        }
        else{
            _unpause();
        }
    }

}

File 2 of 9 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 3 of 9 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 4 of 9 : 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);
}

File 5 of 9 : 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 6 of 9 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (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`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

File 7 of 9 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

File 8 of 9 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 9 of 9 : 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);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC721","name":"erc721","type":"address"},{"internalType":"uint256","name":"stakeLimit","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"action","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"eStake","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"action","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"eWithdraw","type":"event"},{"inputs":[],"name":"_erc721","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_stakeCondition","outputs":[{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"rewardRate","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"_stakeInfos","outputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"accumulateTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_stakeLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"stakeType","type":"uint256"}],"name":"close","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getAllStakeInfo","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"accumulateTime","type":"uint256"},{"internalType":"uint256","name":"extraTime","type":"uint256"},{"internalType":"uint256","name":"stakeTime","type":"uint256"},{"internalType":"uint256","name":"leftLockTime","type":"uint256"}],"internalType":"struct StakePoolV2.StakeRecord[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"stakeType","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"getCurStakeInfo","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"accumulateTime","type":"uint256"},{"internalType":"uint256","name":"extraTime","type":"uint256"},{"internalType":"uint256","name":"stakeTime","type":"uint256"},{"internalType":"uint256","name":"leftLockTime","type":"uint256"}],"internalType":"struct StakePoolV2.StakeRecord[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"stakeType","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"getCurStakeTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"stakeType","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"getRecordStakeTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"stakeType","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"getStakeInfo","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"accumulateTime","type":"uint256"},{"internalType":"uint256","name":"extraTime","type":"uint256"},{"internalType":"uint256","name":"stakeTime","type":"uint256"},{"internalType":"uint256","name":"leftLockTime","type":"uint256"}],"internalType":"struct StakePoolV2.StakeRecord[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStakeTypes","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"erc721","type":"address"}],"name":"setErc721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"setLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stakeType","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"rewardRate","type":"uint256"}],"name":"setStakeCondition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stakeType","type":"uint256"},{"internalType":"uint256[]","name":"nftList","type":"uint256[]"}],"name":"stakeNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stakeType","type":"uint256"}],"name":"withdrawByType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stakeType","type":"uint256"},{"internalType":"uint256[]","name":"nftList","type":"uint256[]"}],"name":"withdrawNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620020d7380380620020d7833981016040819052620000349162000209565b60016000819055805460ff191690556200004e33620000a8565b600280546001600160a01b0319166001600160a01b03841617905560038190556200007c6000808062000102565b6200008e600162093a80606462000102565b620000a0600262278d0060c862000102565b505062000245565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001546001600160a01b03610100909104163314620001675760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b60008381526006602090815260409091208381556001018290556200019a9060049085906200120d620001a0821b17901c565b50505050565b6000620001ae8383620001b7565b90505b92915050565b60008181526001830160205260408120546200020057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001b1565b506000620001b1565b600080604083850312156200021d57600080fd5b82516001600160a01b03811681146200023557600080fd5b6020939093015192949293505050565b611e8280620002556000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c80638456cb59116100c3578063a1bd52aa1161007c578063a1bd52aa14610339578063b7f038291461034c578063c598b86d1461035f578063d062209f14610372578063f2fde38b14610385578063f899ccd61461039857600080fd5b80638456cb5914610274578063853828b61461027c5780638da5cb5b14610284578063983cd000146102ae5780639aa51ae0146102fb5780639de40cb81461031257600080fd5b806353226591116101155780635322659114610208578063559566b91461021b5780635c975abb1461022e5780635cb7d00b14610244578063715018a614610257578063833802c71461025f57600080fd5b80630aebeb4e1461015d578063150b7a021461017257806322d1076c146101af57806327ea6f2b146101cf578063316644b3146101e25780634fa20980146101f5575b600080fd5b61017061016b3660046119f8565b6103ab565b005b610191610180366004611a26565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020015b60405180910390f35b6101c26101bd366004611ac5565b6103f3565b6040516101a69190611af5565b6101706101dd3660046119f8565b6104bf565b6101706101f03660046119f8565b6104f4565b610170610203366004611b63565b6105fe565b610170610216366004611b8f565b610656565b6101c2610229366004611c0e565b610925565b60015460ff1660405190151581526020016101a6565b6101c2610252366004611ac5565b610b17565b610170610bd7565b610267610c13565b6040516101a69190611c2b565b610170610c24565b610170610c6f565b60015461010090046001600160a01b03165b6040516001600160a01b0390911681526020016101a6565b6102e66102bc366004611c6f565b60096020908152600093845260408085208252928452828420905282529020805460019091015482565b604080519283526020830191909152016101a6565b61030460035481565b6040519081526020016101a6565b6102e66103203660046119f8565b6006602052600090815260409020805460019091015482565b610267610347366004611ac5565b610d53565b600254610296906001600160a01b031681565b61017061036d366004611b8f565b610dae565b610267610380366004611ac5565b6110c6565b610170610393366004611c0e565b61111a565b6101706103a6366004611c0e565b6111bb565b6001546001600160a01b036101009091041633146103e45760405162461bcd60e51b81526004016103db90611ca7565b60405180910390fd5b6103ef600482611219565b5050565b60008281526008602090815260408083206001600160a01b038516845290915281206060919061042290611225565b90506000815167ffffffffffffffff81111561044057610440611cdc565b6040519080825280602002602001820160405280156104a357816020015b6104906040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b81526020019060019003908161045e5790505b5090506104b4858584846000611232565b925050505b92915050565b6001546001600160a01b036101009091041633146104ef5760405162461bcd60e51b81526004016103db90611ca7565b600355565b60015460ff16156105175760405162461bcd60e51b81526004016103db90611cf2565b6002600054036105395760405162461bcd60e51b81526004016103db90611d1c565b60026000908155818152600860209081526040808320338452909152812061056090611225565b905060008151116105b35760405162461bcd60e51b815260206004820152601e60248201527f746865726520617265206e6f7420616e79206e667473207374616b696e67000060448201526064016103db565b60005b81518110156105f4576105e2838383815181106105d5576105d5611d53565b6020026020010151611483565b806105ec81611d7f565b9150506105b6565b5050600160005550565b6001546001600160a01b0361010090910416331461062e5760405162461bcd60e51b81526004016103db90611ca7565b600083815260066020526040902082815560010181905561065060048461120d565b50505050565b60015460ff16156106795760405162461bcd60e51b81526004016103db90611cf2565b60026000540361069b5760405162461bcd60e51b81526004016103db90611d1c565b60026000556106ab6004846116a7565b6106c75760405162461bcd60e51b81526004016103db90611d98565b600083815260086020908152604080832033845290915281206106e9906116bf565b6106f39083611dc6565b90506003548111156107475760405162461bcd60e51b815260206004820152601960248201527f7374616b6520616d6f756e74206f766572206c696d697421200000000000000060448201526064016103db565b60005b82811015610919576002546001600160a01b03166342842e0e333087878681811061077757610777611d53565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b1580156107ce57600080fd5b505af11580156107e2573d6000803e3d6000fd5b505050506108208484838181106107fb576107fb611d53565b600089815260086020908152604080832033845282529091209391020135905061120d565b5061085b84848381811061083657610836611d53565b600089815260076020908152604080832033845282529091209391020135905061120d565b5060008581526009602090815260408083203384529091528120429186868581811061088957610889611d53565b905060200201358152602001908152602001600020600001819055507f89196cf824da3a14503a66e3b7fc9c9236352033b9c8e15857520133c438ae418484838181106108d8576108d8611d53565b60408051602092830294909401358452339184019190915282018890525042606082015260800160405180910390a18061091181611d7f565b91505061074a565b50506001600055505050565b60606000805b61093560046116bf565b8110156109a2576109846007600061094e6004856116c9565b81526020019081526020016000206000866001600160a01b03166001600160a01b031681526020019081526020016000206116bf565b61098e9083611dc6565b91508061099a81611d7f565b91505061092b565b5060008167ffffffffffffffff8111156109be576109be611cdc565b604051908082528060200260200182016040528015610a2157816020015b610a0e6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b8152602001906001900390816109dc5790505b5090506000805b610a3260046116bf565b811015610b0d576000610a82600782610a4c6004866116c9565b81526020019081526020016000206000896001600160a01b03166001600160a01b03168152602001908152602001600020611225565b805190915015610afa57610aa3610a9a6004846116c9565b88838787611232565b9350610aed60076000610ab76004866116c9565b81526020019081526020016000206000896001600160a01b03166001600160a01b031681526020019081526020016000206116bf565b610af79084611dc6565b92505b5080610b0581611d7f565b915050610a28565b5090949350505050565b60008281526007602090815260408083206001600160a01b0385168452909152812060609190610b4690611225565b90506000815167ffffffffffffffff811115610b6457610b64611cdc565b6040519080825280602002602001820160405280156104a357816020015b610bb46040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b815260200190600190039081610b825790505090506104b4858584846000611232565b6001546001600160a01b03610100909104163314610c075760405162461bcd60e51b81526004016103db90611ca7565b610c1160006116d5565b565b6060610c1f6004611225565b905090565b6001546001600160a01b03610100909104163314610c545760405162461bcd60e51b81526004016103db90611ca7565b60015460ff1615610c6757610c1161172f565b610c1161179e565b60015460ff1615610c925760405162461bcd60e51b81526004016103db90611cf2565b600260005403610cb45760405162461bcd60e51b81526004016103db90611d1c565b60026000908155805b610cc760046116bf565b811015610d4a57610cd96004826116c9565b6000818152600860209081526040808320338452909152812091935090610cff90611225565b905060005b8151811015610d3557610d23848383815181106105d5576105d5611d53565b80610d2d81611d7f565b915050610d04565b50508080610d4290611d7f565b915050610cbd565b50506001600055565b6060610d606004846116a7565b610d7c5760405162461bcd60e51b81526004016103db90611d98565b60008381526007602090815260408083206001600160a01b03861684529091529020610da790611225565b9392505050565b60015460ff1615610dd15760405162461bcd60e51b81526004016103db90611cf2565b600260005403610df35760405162461bcd60e51b81526004016103db90611d1c565b600260009081555b818110156110bb576000838383818110610e1757610e17611d53565b905060200201359050610e348560046116a790919063ffffffff16565b610e505760405162461bcd60e51b81526004016103db90611d98565b60008581526008602090815260408083203384529091529020610e7390826116a7565b610ebf5760405162461bcd60e51b815260206004820152601d60248201527f696e76616c696420746f6b656e6964206f72207374616b65747970652100000060448201526064016103db565b6000858152600960209081526040808320338452825280832084845290915281208054909190610ef0904290611818565b600088815260066020526040902054909150811015610f515760405162461bcd60e51b815260206004820152601d60248201527f746f6b656e20706c6564676520686173206e6f7420657870697265642100000060448201526064016103db565b60008781526006602052604090205415610f7657506000868152600660205260409020545b60008781526008602090815260408083203384529091529020610f999084611219565b50600254604051632142170760e11b8152306004820152336024820152604481018590526001600160a01b03909116906342842e0e90606401600060405180830381600087803b158015610fec57600080fd5b505af1158015611000573d6000803e3d6000fd5b50506000808555898152600660205260408120600101549092506110409150839061271090611030908390611dde565b61103a9190611dfd565b90611824565b60018401549091506110529082611824565b600184015560408051858152336020820152908101899052606081018290524260808201527fb5ca1e2fa47737d225644d3966260bb470ca50a551e64f4629cc1c812a7701459060a00160405180910390a15050505080806110b390611d7f565b915050610dfb565b505060016000555050565b60606110d36004846116a7565b6110ef5760405162461bcd60e51b81526004016103db90611d98565b60008381526008602090815260408083206001600160a01b03861684529091529020610da790611225565b6001546001600160a01b0361010090910416331461114a5760405162461bcd60e51b81526004016103db90611ca7565b6001600160a01b0381166111af5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103db565b6111b8816116d5565b50565b6001546001600160a01b036101009091041633146111eb5760405162461bcd60e51b81526004016103db90611ca7565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000610da78383611830565b6000610da7838361187f565b60606000610da783611972565b606061123f6004876116a7565b61125b5760405162461bcd60e51b81526004016103db90611d98565b60005b84518110156114785760006112738483611dc6565b905085828151811061128757611287611d53565b60200260200101518582815181106112a1576112a1611d53565b6020908102919091018101519190915260008981526009825260408082206001600160a01b038b168352909252908120875182908990869081106112e7576112e7611d53565b60200260200101518152602001908152602001600020604051806040016040529081600082015481526020016001820154815250509050806020015186838151811061133557611335611d53565b60200260200101516020018181525050600086838151811061135957611359611d53565b60200260200101516080018181525050600086838151811061137d5761137d611d53565b6020026020010151604001818152505060008683815181106113a1576113a1611d53565b6020908102919091010151606001528051156114635780516000906113c7904290611818565b60008b81526006602052604081205491925081900361140857818885815181106113f3576113f3611d53565b6020026020010151604001818152505061143d565b8082101561143d5761141a8183611818565b88858151811061142c5761142c611d53565b602002602001015160800181815250505b8188858151811061145057611450611d53565b6020026020010151606001818152505050505b5050808061147090611d7f565b91505061125e565b509195945050505050565b61148e6004836116a7565b6114aa5760405162461bcd60e51b81526004016103db90611d98565b60008281526009602090815260408083203380855290835281842085855283528184208685526008845282852091855292529091206114e990836116a7565b6115355760405162461bcd60e51b815260206004820152601d60248201527f696e76616c696420746f6b656e6964206f72207374616b65747970652100000060448201526064016103db565b8054600090611545904290611818565b6000858152600660205260409020549091508110610650576000848152600660205260409020541561158257506000838152600660205260409020545b600084815260086020908152604080832033845290915290206115a59084611219565b50600254604051632142170760e11b8152306004820152336024820152604481018590526001600160a01b03909116906342842e0e90606401600060405180830381600087803b1580156115f857600080fd5b505af115801561160c573d6000803e3d6000fd5b505060008085558681526006602052604081206001015490925061163c9150839061271090611030908390611dde565b600184015490915061164e9082611824565b600184015560408051858152336020820152908101869052606081018290524260808201527fb5ca1e2fa47737d225644d3966260bb470ca50a551e64f4629cc1c812a7701459060a00160405180910390a15050505050565b60008181526001830160205260408120541515610da7565b60006104b9825490565b6000610da783836119ce565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60015460ff16156117525760405162461bcd60e51b81526004016103db90611cf2565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b60015460ff166117e75760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016103db565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611781565b6000610da78284611e1f565b6000610da78284611dc6565b6000818152600183016020526040812054611877575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556104b9565b5060006104b9565b600081815260018301602052604081205480156119685760006118a3600183611e1f565b85549091506000906118b790600190611e1f565b905081811461191c5760008660000182815481106118d7576118d7611d53565b90600052602060002001549050808760000184815481106118fa576118fa611d53565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061192d5761192d611e36565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506104b9565b60009150506104b9565b6060816000018054806020026020016040519081016040528092919081815260200182805480156119c257602002820191906000526020600020905b8154815260200190600101908083116119ae575b50505050509050919050565b60008260000182815481106119e5576119e5611d53565b9060005260206000200154905092915050565b600060208284031215611a0a57600080fd5b5035919050565b6001600160a01b03811681146111b857600080fd5b600080600080600060808688031215611a3e57600080fd5b8535611a4981611a11565b94506020860135611a5981611a11565b935060408601359250606086013567ffffffffffffffff80821115611a7d57600080fd5b818801915088601f830112611a9157600080fd5b813581811115611aa057600080fd5b896020828501011115611ab257600080fd5b9699959850939650602001949392505050565b60008060408385031215611ad857600080fd5b823591506020830135611aea81611a11565b809150509250929050565b602080825282518282018190526000919060409081850190868401855b82811015611b565781518051855286810151878601528581015186860152606080820151908601526080908101519085015260a09093019290850190600101611b12565b5091979650505050505050565b600080600060608486031215611b7857600080fd5b505081359360208301359350604090920135919050565b600080600060408486031215611ba457600080fd5b83359250602084013567ffffffffffffffff80821115611bc357600080fd5b818601915086601f830112611bd757600080fd5b813581811115611be657600080fd5b8760208260051b8501011115611bfb57600080fd5b6020830194508093505050509250925092565b600060208284031215611c2057600080fd5b8135610da781611a11565b6020808252825182820181905260009190848201906040850190845b81811015611c6357835183529284019291840191600101611c47565b50909695505050505050565b600080600060608486031215611c8457600080fd5b833592506020840135611c9681611a11565b929592945050506040919091013590565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052604160045260246000fd5b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611d9157611d91611d69565b5060010190565b602080825260149082015273696e76616c6964207374616b652074797065202160601b604082015260600190565b60008219821115611dd957611dd9611d69565b500190565b6000816000190483118215151615611df857611df8611d69565b500290565b600082611e1a57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015611e3157611e31611d69565b500390565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220c62b8d067a8ffd83d67d670a13176f8fed27de3d909b77872be6a828894884ea64736f6c634300080f00330000000000000000000000009d20cff2db7e1c23c3fc6ef000ea0f36b428e3f50000000000000000000000000000000000000000000000000000000000000005

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101585760003560e01c80638456cb59116100c3578063a1bd52aa1161007c578063a1bd52aa14610339578063b7f038291461034c578063c598b86d1461035f578063d062209f14610372578063f2fde38b14610385578063f899ccd61461039857600080fd5b80638456cb5914610274578063853828b61461027c5780638da5cb5b14610284578063983cd000146102ae5780639aa51ae0146102fb5780639de40cb81461031257600080fd5b806353226591116101155780635322659114610208578063559566b91461021b5780635c975abb1461022e5780635cb7d00b14610244578063715018a614610257578063833802c71461025f57600080fd5b80630aebeb4e1461015d578063150b7a021461017257806322d1076c146101af57806327ea6f2b146101cf578063316644b3146101e25780634fa20980146101f5575b600080fd5b61017061016b3660046119f8565b6103ab565b005b610191610180366004611a26565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020015b60405180910390f35b6101c26101bd366004611ac5565b6103f3565b6040516101a69190611af5565b6101706101dd3660046119f8565b6104bf565b6101706101f03660046119f8565b6104f4565b610170610203366004611b63565b6105fe565b610170610216366004611b8f565b610656565b6101c2610229366004611c0e565b610925565b60015460ff1660405190151581526020016101a6565b6101c2610252366004611ac5565b610b17565b610170610bd7565b610267610c13565b6040516101a69190611c2b565b610170610c24565b610170610c6f565b60015461010090046001600160a01b03165b6040516001600160a01b0390911681526020016101a6565b6102e66102bc366004611c6f565b60096020908152600093845260408085208252928452828420905282529020805460019091015482565b604080519283526020830191909152016101a6565b61030460035481565b6040519081526020016101a6565b6102e66103203660046119f8565b6006602052600090815260409020805460019091015482565b610267610347366004611ac5565b610d53565b600254610296906001600160a01b031681565b61017061036d366004611b8f565b610dae565b610267610380366004611ac5565b6110c6565b610170610393366004611c0e565b61111a565b6101706103a6366004611c0e565b6111bb565b6001546001600160a01b036101009091041633146103e45760405162461bcd60e51b81526004016103db90611ca7565b60405180910390fd5b6103ef600482611219565b5050565b60008281526008602090815260408083206001600160a01b038516845290915281206060919061042290611225565b90506000815167ffffffffffffffff81111561044057610440611cdc565b6040519080825280602002602001820160405280156104a357816020015b6104906040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b81526020019060019003908161045e5790505b5090506104b4858584846000611232565b925050505b92915050565b6001546001600160a01b036101009091041633146104ef5760405162461bcd60e51b81526004016103db90611ca7565b600355565b60015460ff16156105175760405162461bcd60e51b81526004016103db90611cf2565b6002600054036105395760405162461bcd60e51b81526004016103db90611d1c565b60026000908155818152600860209081526040808320338452909152812061056090611225565b905060008151116105b35760405162461bcd60e51b815260206004820152601e60248201527f746865726520617265206e6f7420616e79206e667473207374616b696e67000060448201526064016103db565b60005b81518110156105f4576105e2838383815181106105d5576105d5611d53565b6020026020010151611483565b806105ec81611d7f565b9150506105b6565b5050600160005550565b6001546001600160a01b0361010090910416331461062e5760405162461bcd60e51b81526004016103db90611ca7565b600083815260066020526040902082815560010181905561065060048461120d565b50505050565b60015460ff16156106795760405162461bcd60e51b81526004016103db90611cf2565b60026000540361069b5760405162461bcd60e51b81526004016103db90611d1c565b60026000556106ab6004846116a7565b6106c75760405162461bcd60e51b81526004016103db90611d98565b600083815260086020908152604080832033845290915281206106e9906116bf565b6106f39083611dc6565b90506003548111156107475760405162461bcd60e51b815260206004820152601960248201527f7374616b6520616d6f756e74206f766572206c696d697421200000000000000060448201526064016103db565b60005b82811015610919576002546001600160a01b03166342842e0e333087878681811061077757610777611d53565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b1580156107ce57600080fd5b505af11580156107e2573d6000803e3d6000fd5b505050506108208484838181106107fb576107fb611d53565b600089815260086020908152604080832033845282529091209391020135905061120d565b5061085b84848381811061083657610836611d53565b600089815260076020908152604080832033845282529091209391020135905061120d565b5060008581526009602090815260408083203384529091528120429186868581811061088957610889611d53565b905060200201358152602001908152602001600020600001819055507f89196cf824da3a14503a66e3b7fc9c9236352033b9c8e15857520133c438ae418484838181106108d8576108d8611d53565b60408051602092830294909401358452339184019190915282018890525042606082015260800160405180910390a18061091181611d7f565b91505061074a565b50506001600055505050565b60606000805b61093560046116bf565b8110156109a2576109846007600061094e6004856116c9565b81526020019081526020016000206000866001600160a01b03166001600160a01b031681526020019081526020016000206116bf565b61098e9083611dc6565b91508061099a81611d7f565b91505061092b565b5060008167ffffffffffffffff8111156109be576109be611cdc565b604051908082528060200260200182016040528015610a2157816020015b610a0e6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b8152602001906001900390816109dc5790505b5090506000805b610a3260046116bf565b811015610b0d576000610a82600782610a4c6004866116c9565b81526020019081526020016000206000896001600160a01b03166001600160a01b03168152602001908152602001600020611225565b805190915015610afa57610aa3610a9a6004846116c9565b88838787611232565b9350610aed60076000610ab76004866116c9565b81526020019081526020016000206000896001600160a01b03166001600160a01b031681526020019081526020016000206116bf565b610af79084611dc6565b92505b5080610b0581611d7f565b915050610a28565b5090949350505050565b60008281526007602090815260408083206001600160a01b0385168452909152812060609190610b4690611225565b90506000815167ffffffffffffffff811115610b6457610b64611cdc565b6040519080825280602002602001820160405280156104a357816020015b610bb46040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b815260200190600190039081610b825790505090506104b4858584846000611232565b6001546001600160a01b03610100909104163314610c075760405162461bcd60e51b81526004016103db90611ca7565b610c1160006116d5565b565b6060610c1f6004611225565b905090565b6001546001600160a01b03610100909104163314610c545760405162461bcd60e51b81526004016103db90611ca7565b60015460ff1615610c6757610c1161172f565b610c1161179e565b60015460ff1615610c925760405162461bcd60e51b81526004016103db90611cf2565b600260005403610cb45760405162461bcd60e51b81526004016103db90611d1c565b60026000908155805b610cc760046116bf565b811015610d4a57610cd96004826116c9565b6000818152600860209081526040808320338452909152812091935090610cff90611225565b905060005b8151811015610d3557610d23848383815181106105d5576105d5611d53565b80610d2d81611d7f565b915050610d04565b50508080610d4290611d7f565b915050610cbd565b50506001600055565b6060610d606004846116a7565b610d7c5760405162461bcd60e51b81526004016103db90611d98565b60008381526007602090815260408083206001600160a01b03861684529091529020610da790611225565b9392505050565b60015460ff1615610dd15760405162461bcd60e51b81526004016103db90611cf2565b600260005403610df35760405162461bcd60e51b81526004016103db90611d1c565b600260009081555b818110156110bb576000838383818110610e1757610e17611d53565b905060200201359050610e348560046116a790919063ffffffff16565b610e505760405162461bcd60e51b81526004016103db90611d98565b60008581526008602090815260408083203384529091529020610e7390826116a7565b610ebf5760405162461bcd60e51b815260206004820152601d60248201527f696e76616c696420746f6b656e6964206f72207374616b65747970652100000060448201526064016103db565b6000858152600960209081526040808320338452825280832084845290915281208054909190610ef0904290611818565b600088815260066020526040902054909150811015610f515760405162461bcd60e51b815260206004820152601d60248201527f746f6b656e20706c6564676520686173206e6f7420657870697265642100000060448201526064016103db565b60008781526006602052604090205415610f7657506000868152600660205260409020545b60008781526008602090815260408083203384529091529020610f999084611219565b50600254604051632142170760e11b8152306004820152336024820152604481018590526001600160a01b03909116906342842e0e90606401600060405180830381600087803b158015610fec57600080fd5b505af1158015611000573d6000803e3d6000fd5b50506000808555898152600660205260408120600101549092506110409150839061271090611030908390611dde565b61103a9190611dfd565b90611824565b60018401549091506110529082611824565b600184015560408051858152336020820152908101899052606081018290524260808201527fb5ca1e2fa47737d225644d3966260bb470ca50a551e64f4629cc1c812a7701459060a00160405180910390a15050505080806110b390611d7f565b915050610dfb565b505060016000555050565b60606110d36004846116a7565b6110ef5760405162461bcd60e51b81526004016103db90611d98565b60008381526008602090815260408083206001600160a01b03861684529091529020610da790611225565b6001546001600160a01b0361010090910416331461114a5760405162461bcd60e51b81526004016103db90611ca7565b6001600160a01b0381166111af5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103db565b6111b8816116d5565b50565b6001546001600160a01b036101009091041633146111eb5760405162461bcd60e51b81526004016103db90611ca7565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000610da78383611830565b6000610da7838361187f565b60606000610da783611972565b606061123f6004876116a7565b61125b5760405162461bcd60e51b81526004016103db90611d98565b60005b84518110156114785760006112738483611dc6565b905085828151811061128757611287611d53565b60200260200101518582815181106112a1576112a1611d53565b6020908102919091018101519190915260008981526009825260408082206001600160a01b038b168352909252908120875182908990869081106112e7576112e7611d53565b60200260200101518152602001908152602001600020604051806040016040529081600082015481526020016001820154815250509050806020015186838151811061133557611335611d53565b60200260200101516020018181525050600086838151811061135957611359611d53565b60200260200101516080018181525050600086838151811061137d5761137d611d53565b6020026020010151604001818152505060008683815181106113a1576113a1611d53565b6020908102919091010151606001528051156114635780516000906113c7904290611818565b60008b81526006602052604081205491925081900361140857818885815181106113f3576113f3611d53565b6020026020010151604001818152505061143d565b8082101561143d5761141a8183611818565b88858151811061142c5761142c611d53565b602002602001015160800181815250505b8188858151811061145057611450611d53565b6020026020010151606001818152505050505b5050808061147090611d7f565b91505061125e565b509195945050505050565b61148e6004836116a7565b6114aa5760405162461bcd60e51b81526004016103db90611d98565b60008281526009602090815260408083203380855290835281842085855283528184208685526008845282852091855292529091206114e990836116a7565b6115355760405162461bcd60e51b815260206004820152601d60248201527f696e76616c696420746f6b656e6964206f72207374616b65747970652100000060448201526064016103db565b8054600090611545904290611818565b6000858152600660205260409020549091508110610650576000848152600660205260409020541561158257506000838152600660205260409020545b600084815260086020908152604080832033845290915290206115a59084611219565b50600254604051632142170760e11b8152306004820152336024820152604481018590526001600160a01b03909116906342842e0e90606401600060405180830381600087803b1580156115f857600080fd5b505af115801561160c573d6000803e3d6000fd5b505060008085558681526006602052604081206001015490925061163c9150839061271090611030908390611dde565b600184015490915061164e9082611824565b600184015560408051858152336020820152908101869052606081018290524260808201527fb5ca1e2fa47737d225644d3966260bb470ca50a551e64f4629cc1c812a7701459060a00160405180910390a15050505050565b60008181526001830160205260408120541515610da7565b60006104b9825490565b6000610da783836119ce565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60015460ff16156117525760405162461bcd60e51b81526004016103db90611cf2565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b60015460ff166117e75760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016103db565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611781565b6000610da78284611e1f565b6000610da78284611dc6565b6000818152600183016020526040812054611877575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556104b9565b5060006104b9565b600081815260018301602052604081205480156119685760006118a3600183611e1f565b85549091506000906118b790600190611e1f565b905081811461191c5760008660000182815481106118d7576118d7611d53565b90600052602060002001549050808760000184815481106118fa576118fa611d53565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061192d5761192d611e36565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506104b9565b60009150506104b9565b6060816000018054806020026020016040519081016040528092919081815260200182805480156119c257602002820191906000526020600020905b8154815260200190600101908083116119ae575b50505050509050919050565b60008260000182815481106119e5576119e5611d53565b9060005260206000200154905092915050565b600060208284031215611a0a57600080fd5b5035919050565b6001600160a01b03811681146111b857600080fd5b600080600080600060808688031215611a3e57600080fd5b8535611a4981611a11565b94506020860135611a5981611a11565b935060408601359250606086013567ffffffffffffffff80821115611a7d57600080fd5b818801915088601f830112611a9157600080fd5b813581811115611aa057600080fd5b896020828501011115611ab257600080fd5b9699959850939650602001949392505050565b60008060408385031215611ad857600080fd5b823591506020830135611aea81611a11565b809150509250929050565b602080825282518282018190526000919060409081850190868401855b82811015611b565781518051855286810151878601528581015186860152606080820151908601526080908101519085015260a09093019290850190600101611b12565b5091979650505050505050565b600080600060608486031215611b7857600080fd5b505081359360208301359350604090920135919050565b600080600060408486031215611ba457600080fd5b83359250602084013567ffffffffffffffff80821115611bc357600080fd5b818601915086601f830112611bd757600080fd5b813581811115611be657600080fd5b8760208260051b8501011115611bfb57600080fd5b6020830194508093505050509250925092565b600060208284031215611c2057600080fd5b8135610da781611a11565b6020808252825182820181905260009190848201906040850190845b81811015611c6357835183529284019291840191600101611c47565b50909695505050505050565b600080600060608486031215611c8457600080fd5b833592506020840135611c9681611a11565b929592945050506040919091013590565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052604160045260246000fd5b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611d9157611d91611d69565b5060010190565b602080825260149082015273696e76616c6964207374616b652074797065202160601b604082015260600190565b60008219821115611dd957611dd9611d69565b500190565b6000816000190483118215151615611df857611df8611d69565b500290565b600082611e1a57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015611e3157611e31611d69565b500390565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220c62b8d067a8ffd83d67d670a13176f8fed27de3d909b77872be6a828894884ea64736f6c634300080f0033

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

0000000000000000000000009d20cff2db7e1c23c3fc6ef000ea0f36b428e3f50000000000000000000000000000000000000000000000000000000000000005

-----Decoded View---------------
Arg [0] : erc721 (address): 0x9D20Cff2dB7E1C23c3FC6Ef000ea0F36B428E3f5
Arg [1] : stakeLimit (uint256): 5

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000009d20cff2db7e1c23c3fc6ef000ea0f36b428e3f5
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000005


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.