Contract 0x0913da3b2b0e4ad75c4759fc4f1c30b81b8a9345 1

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x4f1d482dadff22e019a09e65145edadedcdbc61253b11ac239e380a0bec5d79f0x6080604048321662021-05-19 2:09:28159 days 14 hrs ago0xd849fa4d5475276568ec21f6debf1c8a889aa81b IN  Contract Creation0 HT0.0015703491
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NodeStaking

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 8 : NodeStaking.sol
// SPDX-License-Identifier: MIT

//SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.6.0;
import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/utils/EnumerableSet.sol";
import "@openzeppelin/contracts-ethereum-package/contracts/utils/Address.sol";
import { OwnableUpgradeSafe } from "@openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol";
import { ReentrancyGuardUpgradeSafe } from "@openzeppelin/contracts-ethereum-package/contracts/utils/ReentrancyGuard.sol";

contract NodeStaking is ReentrancyGuardUpgradeSafe, OwnableUpgradeSafe {
    using SafeMath for uint256;
    using EnumerableSet for EnumerableSet.AddressSet;
    using Address for address;
    //
    // CONSTANT
    //


    //
    // EVENTS
    //
    event ValidatorCandidateAdded(address indexed candidate);
    event ValidatorCandidateRemoved(address indexed candidate, address indexed operator);

    event SetLockingDuration(uint256 lockingDuration);
    event Staking(address indexed staker, uint256 amount);
    event Unstaking(address indexed staker, uint256 lockingEndTime);
    event Withdraw(address indexed staker, uint256 amount);

    //
    // STRUCT and Enum
    //
    // 质押状态: 无效 未质押、已质押、锁定中、已取回
    enum StakingStage { INVALID, NOSTAKE, STAKED, LOCKING, WITHDRAWED }

    struct ValidatorStatus {
        // 是否存在
        bool exist;
        // 质押数量
        uint256 amount;
        // 质押状态
        StakingStage stage;
        // 时间戳
        uint256 timestamp;
        // 区块号
        uint256 blockNumber;
        // 锁定结束时间
        uint256 lockingEndTime;
    }

    //**********************************************************//
    //    Can not change the order of below state variables     //
    //**********************************************************//

    //staking amount threshold
    // 质押上限
    uint256 public stakingAmountThreshold;

    //locking time, default 15 days
    // 锁定期,默认为15天
    uint256 public lockingDuration;

    // 验证候选人名单
    EnumerableSet.AddressSet private _validatorCandidateList;

    // key by staker address
    // 验证候选人状态
    mapping(address => ValidatorStatus) public validatorStatusMap;

    // help polling the stakers' information
    // 质押者列表
    // 质押者是验证候选人的子集
    address[] public stakers;

    //**********************************************************//
    //    Can not change the order of above state variables     //
    //**********************************************************//



    //◥◤◥◤◥◤◥◤◥◤◥◤◥◤◥◤ add state variables below ◥◤◥◤◥◤◥◤◥◤◥◤◥◤◥◤//

    //◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣ add state variables above ◢◣◢◣◢◣◢◣◢◣◢◣◢◣◢◣//
    uint256[50] private __gap;

    function initialize(
        uint256 _stakingAmountThreshold,
        uint256 _lockingDuration
    ) external initializer {
        __Ownable_init();
        __ReentrancyGuard_init();

        require(_stakingAmountThreshold != uint256(0), "NodeStaking: staking amount threshold is zero!");
        // 质押上限
        stakingAmountThreshold = _stakingAmountThreshold;
        // 锁定周期
        lockingDuration = _lockingDuration;
    }

    //
    // FUNCTIONS
    //

    // 质押
    function stake() public payable nonReentrant() {
        // 检查用户质押ht大于质押上限
        require(msg.value >= stakingAmountThreshold, "NodeStaking: staking amount is lower than staking amount threshold!");
        address msgSender = _msgSender();
        // 检查白名单,只有验证候选人才能质押
        require(isValidatorCandidate(msgSender), "NodeStaking: not a validator candidate!");
        // 获取验证人状态信息
        ValidatorStatus storage validator = validatorStatusMap[msgSender];
        // 检查验证者不存在
        // 解除质押,将从白名单移除,因此无法再次质押
        require(!validator.exist, "NodeStaking: Already participated in staking!");

        stakers.push(msgSender);

        // 验证者状态更新
        validator.exist = true;
        validator.amount = stakingAmountThreshold;
        validator.stage = StakingStage.STAKED;
        validator.timestamp = block.timestamp;
        validator.blockNumber = block.number;

        // 获取用户质押与质押上限的差值
        uint256 diff = msg.value.sub(stakingAmountThreshold);

        //return back the extra amount
        // 大于0返还
        if(diff > 0) {
            _msgSender().transfer(diff);
        }

        emit Staking(msgSender, stakingAmountThreshold);
    }

    // 解质押
    function unstake() external {
        address msgSender = _msgSender();
        ValidatorStatus storage validator = validatorStatusMap[msgSender];
        require(validator.exist, "NodeStaking: NOT EXIST!");

        // 如果用户状态为已质押状态
        require(validator.stage == StakingStage.STAKED, "NodeStaking: invalid staking status!");

        // 状态更新为锁定中
        validator.stage = StakingStage.LOCKING;
        // 验证者锁定结束时间 = 当前时间戳 + 锁定周期
        validator.lockingEndTime = block.timestamp.add(lockingDuration);
        // 删除白名单
        _removeValidatorCandidate(msgSender);
        emit Unstaking(msgSender, validator.lockingEndTime);
    }

    // 取回质押
    function withdraw() external nonReentrant {
        address msgSender = _msgSender();
        ValidatorStatus storage validator = validatorStatusMap[msgSender];

        // 如果可以取回
        require(isWithdrawable(msgSender), "NodeStaking: asset is still locking!");

        // 验证者状态 = 已领取
        validator.stage = StakingStage.WITHDRAWED;
        // 取回数量 = 质押数量
        uint256 amount = validator.amount;
        // 质押者质押数量 = 0
        validator.amount = uint256(0);
        _msgSender().transfer(amount);
        emit Withdraw(msgSender, stakingAmountThreshold);
    }

    // 设置锁定周期
    function setLockingDuration(uint256 _lockingDuration) external onlyOwner {
        lockingDuration = _lockingDuration;
        emit SetLockingDuration(lockingDuration);
    }

    // 添加验证候选人,限owner调用
    // 已经赎回退出的地址,不能再添加进白名单。
    function addValidatorCandidate(address _validatorCandidate) public onlyOwner returns (bool) {
        require(_validatorCandidate != address(0), "NodeStaking: ZERO_ADDRESS.");
        require(!_validatorCandidate.isContract(), "NodeStaking: Refuse Contract Address.");

        // 获取验证人状态信息
        ValidatorStatus storage validator = validatorStatusMap[_validatorCandidate];
        // 解除质押,将从白名单移除,因此无法再次被添加至白名单
        require(!validator.exist, "NodeStaking: no entry for historic address!");

        // 添加验证候选人
        bool addResult = EnumerableSet.add(_validatorCandidateList, _validatorCandidate);
        if(addResult) {
            emit ValidatorCandidateAdded(_validatorCandidate);
        }
        return addResult;
    }

    // 移除验证候选人,限owner调用
    function delValidatorCandidate(address _validatorCandidate) public onlyOwner returns (bool) {
        return _removeValidatorCandidate(_validatorCandidate);
    }

    //
    // VIEW FUNCTIONS
    //
    // 获取验证候选人长度
    function getValidatorCandidatesLength() public view returns (uint256) {
        return EnumerableSet.length(_validatorCandidateList);
    }

    // 检查是否为验证候选人
    function isValidatorCandidate(address _validatorCandidate) public view returns (bool) {
        return EnumerableSet.contains(_validatorCandidateList, _validatorCandidate);
    }

    // 获取验证候选人
    function getValidatorCandidate(uint256 _index) public view returns (address){
        require(_index < getValidatorCandidatesLength(), "NodeStaking: INDEX_OUT_OF_BOUNDS");
        return EnumerableSet.at(_validatorCandidateList, _index);
    }

    // 获取目标地址的质押状态
    function getValidatorCandidateStakingStatus(address _validatorCandidate) public view returns (bool, uint256, StakingStage, uint256, uint256, uint256) {
        // ValidatorStatus ret;
        // 获取验证人状态信息
        ValidatorStatus storage status = validatorStatusMap[_validatorCandidate];
        if(status.exist) {
            return (status.exist, status.amount, status.stage, status.timestamp, status.blockNumber, status.lockingEndTime);
        } else if(isValidatorCandidate(_validatorCandidate)) {
            // 没有质押记录,但是在白名单中, 质押状态为未质押
            return (false, 0, StakingStage.NOSTAKE, 0, 0, 0);
        } else {
            // 没有质押记录,也不在白名单中, 质押状态为无效
            return (false, 0, StakingStage.INVALID, 0, 0, 0);
        }
    }

    // 是否可以取回
    function isWithdrawable(address _staker) public view returns (bool) {
        if (_staker == address(0)) {
            return false;
        }
        // 获取验证候选人信息
        ValidatorStatus storage validator = validatorStatusMap[_staker];
        // 候选人存在 && 候选人状态 == 锁定状态 && 当前区块时间 >= 锁定结束时间
        return (validator.exist && validator.stage == StakingStage.LOCKING && block.timestamp >= validator.lockingEndTime);
    }

    // 获取质押者数量
    function getStakersLength() public view returns (uint256) {
        return stakers.length;
    }

    //
    // Private
    //
    // 移除白名单
    function _removeValidatorCandidate(address _validatorCandidate) private returns (bool) {
        require(_validatorCandidate != address(0), "NodeStaking: ZERO_ADDRESS.");
        bool removeResult = EnumerableSet.remove(_validatorCandidateList, _validatorCandidate);
        if(removeResult) {
            emit ValidatorCandidateRemoved(_validatorCandidate, msg.sender);
        }
        return removeResult;
    }

}

File 2 of 8 : SafeMath.sol
pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @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) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @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 sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

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

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts 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) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts 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 mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 3 of 8 : EnumerableSet.sol
pragma solidity ^0.6.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.0.0, only sets of type `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;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            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] = toDeleteIndex + 1; // All indexes are 1-based

            // 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) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // 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(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(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(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(uint256(_at(set._inner, index)));
    }


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

File 4 of 8 : Address.sol
pragma solidity ^0.6.2;

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }
}

File 5 of 8 : Ownable.sol
pragma solidity ^0.6.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */

    function __Ownable_init() internal initializer {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal initializer {


        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);

    }


    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }

    uint256[49] private __gap;
}

File 6 of 8 : ReentrancyGuard.sol
pragma solidity ^0.6.0;
import "../Initializable.sol";

/**
 * @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].
 */
contract ReentrancyGuardUpgradeSafe is Initializable {
    bool private _notEntered;


    function __ReentrancyGuard_init() internal initializer {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal initializer {


        // Storing an initial 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 percetange 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.
        _notEntered = true;

    }


    /**
     * @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 make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_notEntered, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _notEntered = false;

        _;

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

    uint256[49] private __gap;
}

File 7 of 8 : Context.sol
pragma solidity ^0.6.0;
import "../Initializable.sol";

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN 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.
 */
contract ContextUpgradeSafe is Initializable {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.

    function __Context_init() internal initializer {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal initializer {


    }


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

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }

    uint256[50] private __gap;
}

File 8 of 8 : Initializable.sol
pragma solidity >=0.4.24 <0.7.0;


/**
 * @title Initializable
 *
 * @dev Helper contract to support initializer functions. To use it, replace
 * the constructor with a function that has the `initializer` modifier.
 * WARNING: Unlike constructors, initializer functions must be manually
 * invoked. This applies both to deploying an Initializable contract, as well
 * as extending an Initializable contract via inheritance.
 * WARNING: When used with inheritance, manual care must be taken to not invoke
 * a parent initializer twice, or ensure that all initializers are idempotent,
 * because this is not dealt with automatically as with constructors.
 */
contract Initializable {

  /**
   * @dev Indicates that the contract has been initialized.
   */
  bool private initialized;

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

  /**
   * @dev Modifier to use in the initializer function of a contract.
   */
  modifier initializer() {
    require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized");

    bool isTopLevelCall = !initializing;
    if (isTopLevelCall) {
      initializing = true;
      initialized = true;
    }

    _;

    if (isTopLevelCall) {
      initializing = false;
    }
  }

  /// @dev Returns true if and only if the function is running in the constructor
  function isConstructor() private view returns (bool) {
    // extcodesize checks the size of the code stored in an address, and
    // address returns the current address. Since the code is still not
    // deployed when running a constructor, any checks on its code size will
    // yield zero, making it an effective way to detect if a contract is
    // under construction or not.
    address self = address(this);
    uint256 cs;
    assembly { cs := extcodesize(self) }
    return cs == 0;
  }

  // Reserved storage space to allow for layout changes in the future.
  uint256[50] private ______gap;
}

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

Contract Security Audit

Contract ABI

[{"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":"uint256","name":"lockingDuration","type":"uint256"}],"name":"SetLockingDuration","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staking","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"lockingEndTime","type":"uint256"}],"name":"Unstaking","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"candidate","type":"address"}],"name":"ValidatorCandidateAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"candidate","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"}],"name":"ValidatorCandidateRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"_validatorCandidate","type":"address"}],"name":"addValidatorCandidate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_validatorCandidate","type":"address"}],"name":"delValidatorCandidate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getStakersLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getValidatorCandidate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_validatorCandidate","type":"address"}],"name":"getValidatorCandidateStakingStatus","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"enum NodeStaking.StakingStage","name":"","type":"uint8"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getValidatorCandidatesLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakingAmountThreshold","type":"uint256"},{"internalType":"uint256","name":"_lockingDuration","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_validatorCandidate","type":"address"}],"name":"isValidatorCandidate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_staker","type":"address"}],"name":"isWithdrawable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockingDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockingDuration","type":"uint256"}],"name":"setLockingDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingAmountThreshold","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":[],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"validatorStatusMap","outputs":[{"internalType":"bool","name":"exist","type":"bool"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum NodeStaking.StakingStage","name":"stage","type":"uint8"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"uint256","name":"lockingEndTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50611b73806100206000396000f3fe60806040526004361061015f5760003560e01c8063715018a6116100c0578063cea8c74611610074578063f2fde38b11610059578063f2fde38b1461042f578063fb78268914610462578063fd5e6dd11461048c5761015f565b8063cea8c746146103ea578063e4a30116146103ff5761015f565b80638da5cb5b116100a55780638da5cb5b1461038d5780639fabeb00146103a2578063a0c3f2d2146103b75761015f565b8063715018a6146103325780638bbda3df146103475761015f565b80633f132347116101175780635158115f116100fc5780635158115f146102b75780635d7446f4146102ea5780635f33f4fa1461031d5761015f565b80633f1323471461020657806349b53110146102845761015f565b80632def6620116101485780632def6620146101d25780633a4b66f1146101e95780633ccfd60b146101f15761015f565b806302a1848414610164578063114574f6146101ab575b600080fd5b34801561017057600080fd5b506101976004803603602081101561018757600080fd5b50356001600160a01b03166104b6565b604080519115158252519081900360200190f35b3480156101b757600080fd5b506101c0610522565b60408051918252519081900360200190f35b3480156101de57600080fd5b506101e7610533565b005b6101e7610672565b3480156101fd57600080fd5b506101e76108f0565b34801561021257600080fd5b506102396004803603602081101561022957600080fd5b50356001600160a01b0316610a68565b604051808715151515815260200186815260200185600481111561025957fe5b60ff168152602001848152602001838152602001828152602001965050505050505060405180910390f35b34801561029057600080fd5b50610197600480360360208110156102a757600080fd5b50356001600160a01b0316610b12565b3480156102c357600080fd5b50610197600480360360208110156102da57600080fd5b50356001600160a01b0316610cd0565b3480156102f657600080fd5b506102396004803603602081101561030d57600080fd5b50356001600160a01b0316610d4b565b34801561032957600080fd5b506101c0610d86565b34801561033e57600080fd5b506101e7610d8c565b34801561035357600080fd5b506103716004803603602081101561036a57600080fd5b5035610e4d565b604080516001600160a01b039092168252519081900360200190f35b34801561039957600080fd5b50610371610eb5565b3480156103ae57600080fd5b506101c0610ec4565b3480156103c357600080fd5b50610197600480360360208110156103da57600080fd5b50356001600160a01b0316610eca565b3480156103f657600080fd5b506101c0610ed7565b34801561040b57600080fd5b506101e76004803603604081101561042257600080fd5b5080359060200135610edd565b34801561043b57600080fd5b506101e76004803603602081101561045257600080fd5b50356001600160a01b0316610fd7565b34801561046e57600080fd5b506101e76004803603602081101561048557600080fd5b50356110ef565b34801561049857600080fd5b50610371600480360360208110156104af57600080fd5b5035611194565b60006001600160a01b0382166104ce5750600061051d565b6001600160a01b038216600090815260cd60205260409020805460ff16801561050957506003600282015460ff16600481111561050757fe5b145b8015610519575080600501544210155b9150505b919050565b600061052e60cb6111bb565b905090565b600061053d6111c6565b6001600160a01b038116600090815260cd6020526040902080549192509060ff166105af576040805162461bcd60e51b815260206004820152601760248201527f4e6f64655374616b696e673a204e4f5420455849535421000000000000000000604482015290519081900360640190fd5b60028082015460ff1660048111156105c357fe5b146105ff5760405162461bcd60e51b815260040180806020018281038252602481526020018061198d6024913960400191505060405180910390fd5b60028101805460ff1916600317905560ca5461061c9042906111ca565b600582015561062a8261122b565b50600581015460408051918252516001600160a01b038416917ff2619dcba9802bb8ec071016f659320c48304701ba220f0420bed16f87139a66919081900360200190a25050565b60335460ff166106c9576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6033805460ff1916905560c9543410156107145760405162461bcd60e51b8152600401808060200182810382526043815260200180611a056043913960600191505060405180910390fd5b600061071e6111c6565b905061072981610eca565b6107645760405162461bcd60e51b8152600401808060200182810382526027815260200180611b176027913960400191505060405180910390fd5b6001600160a01b038116600090815260cd60205260409020805460ff16156107bd5760405162461bcd60e51b815260040180806020018281038252602d815260200180611a6d602d913960400191505060405180910390fd5b60ce80546001808201835560009283527fd36cd1c74ef8d7326d8021b776c18fb5a5724b7f7bc93c2f42e43e10ef27d12a909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038616179055825460ff199081168217845560c980549285019290925560028085018054909216179055426003840155436004840155546108539034906112d9565b9050801561089d576108636111c6565b6001600160a01b03166108fc829081150290604051600060405180830381858888f1935050505015801561089b573d6000803e3d6000fd5b505b60c95460408051918252516001600160a01b038516917fb831f69f1cebc12b23cd864ce5bfea2669d01956050a0147d71d418074559c21919081900360200190a250506033805460ff1916600117905550565b60335460ff16610947576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6033805460ff19169055600061095b6111c6565b6001600160a01b038116600090815260cd6020526040902090915061097f826104b6565b6109ba5760405162461bcd60e51b8152600401808060200182810382526024815260200180611af36024913960400191505060405180910390fd5b60028101805460ff1916600417905560018101805460009091556109dc6111c6565b6001600160a01b03166108fc829081150290604051600060405180830381858888f19350505050158015610a14573d6000803e3d6000fd5b5060c95460408051918252516001600160a01b038516917f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364919081900360200190a250506033805460ff1916600117905550565b6001600160a01b038116600090815260cd602052604081208054829182918291829182919060ff1615610acc578054600182015460028301546003840154600485015460059095015460ff9485169b50929950921696509094509092509050610b09565b610ad588610eca565b15610af457506000955085945060019350849250829150819050610b09565b50600095508594508493508392508291508190505b91939550919395565b6000610b1c6111c6565b6097546001600160a01b03908116911614610b7e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038216610bd9576040805162461bcd60e51b815260206004820152601a60248201527f4e6f64655374616b696e673a205a45524f5f414444524553532e000000000000604482015290519081900360640190fd5b610beb826001600160a01b031661131b565b15610c275760405162461bcd60e51b8152600401808060200182810382526025815260200180611a486025913960400191505060405180910390fd5b6001600160a01b038216600090815260cd60205260409020805460ff1615610c805760405162461bcd60e51b815260040180806020018281038252602b815260200180611a9a602b913960400191505060405180910390fd5b6000610c8d60cb85611357565b90508015610519576040516001600160a01b038516907f1a65fe2104720f1b6e950ca6906d3cf2fe8341231bb1a5bfdfd23e3045b76b7490600090a29392505050565b6000610cda6111c6565b6097546001600160a01b03908116911614610d3c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610d458261122b565b92915050565b60cd6020526000908152604090208054600182015460028301546003840154600485015460059095015460ff94851695939490921692909186565b60c95481565b610d946111c6565b6097546001600160a01b03908116911614610df6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6097546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36097805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000610e57610522565b8210610eaa576040805162461bcd60e51b815260206004820181905260248201527f4e6f64655374616b696e673a20494e4445585f4f55545f4f465f424f554e4453604482015290519081900360640190fd5b610d4560cb8361136c565b6097546001600160a01b031690565b60ce5490565b6000610d4560cb83611378565b60ca5481565b600054610100900460ff1680610ef65750610ef661138d565b80610f04575060005460ff16155b610f3f5760405162461bcd60e51b815260040180806020018281038252602e815260200180611ac5602e913960400191505060405180910390fd5b600054610100900460ff16158015610f6a576000805460ff1961ff0019909116610100171660011790555b610f72611393565b610f7a611445565b82610fb65760405162461bcd60e51b815260040180806020018281038252602e8152602001806119d7602e913960400191505060405180910390fd5b60c983905560ca8290558015610fd2576000805461ff00191690555b505050565b610fdf6111c6565b6097546001600160a01b03908116911614611041576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166110865760405162461bcd60e51b81526004018080602001828103825260268152602001806119b16026913960400191505060405180910390fd5b6097546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36097805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6110f76111c6565b6097546001600160a01b03908116911614611159576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60ca8190556040805182815290517fa11b35914f1dd02a892d354f194f7fba70b5a95eca618b4e9f9403ff5a0c327f9181900360200190a150565b60ce81815481106111a157fe5b6000918252602090912001546001600160a01b0316905081565b6000610d45826114da565b3390565b600082820183811015611224576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60006001600160a01b038216611288576040805162461bcd60e51b815260206004820152601a60248201527f4e6f64655374616b696e673a205a45524f5f414444524553532e000000000000604482015290519081900360640190fd5b600061129560cb846114de565b90508015610d455760405133906001600160a01b038516907fc9349ee17e7e30102dba961768d0e565a5d6867af2fdc9de957e91331c43188e90600090a392915050565b600061122483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506114f3565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061134f57508115155b949350505050565b6000611224836001600160a01b03841661158a565b600061122483836115d4565b6000611224836001600160a01b038416611638565b303b1590565b600054610100900460ff16806113ac57506113ac61138d565b806113ba575060005460ff16155b6113f55760405162461bcd60e51b815260040180806020018281038252602e815260200180611ac5602e913960400191505060405180910390fd5b600054610100900460ff16158015611420576000805460ff1961ff0019909116610100171660011790555b611428611650565b6114306116f0565b8015611442576000805461ff00191690555b50565b600054610100900460ff168061145e575061145e61138d565b8061146c575060005460ff16155b6114a75760405162461bcd60e51b815260040180806020018281038252602e815260200180611ac5602e913960400191505060405180910390fd5b600054610100900460ff161580156114d2576000805460ff1961ff0019909116610100171660011790555b6114306117f6565b5490565b6000611224836001600160a01b0384166118a4565b600081848411156115825760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561154757818101518382015260200161152f565b50505050905090810190601f1680156115745780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60006115968383611638565b6115cc57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610d45565b506000610d45565b815460009082106116165760405162461bcd60e51b815260040180806020018281038252602281526020018061196b6022913960400191505060405180910390fd5b82600001828154811061162557fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b600054610100900460ff1680611669575061166961138d565b80611677575060005460ff16155b6116b25760405162461bcd60e51b815260040180806020018281038252602e815260200180611ac5602e913960400191505060405180910390fd5b600054610100900460ff16158015611430576000805460ff1961ff0019909116610100171660011790558015611442576000805461ff001916905550565b600054610100900460ff1680611709575061170961138d565b80611717575060005460ff16155b6117525760405162461bcd60e51b815260040180806020018281038252602e815260200180611ac5602e913960400191505060405180910390fd5b600054610100900460ff1615801561177d576000805460ff1961ff0019909116610100171660011790555b60006117876111c6565b6097805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015611442576000805461ff001916905550565b600054610100900460ff168061180f575061180f61138d565b8061181d575060005460ff16155b6118585760405162461bcd60e51b815260040180806020018281038252602e815260200180611ac5602e913960400191505060405180910390fd5b600054610100900460ff16158015611883576000805460ff1961ff0019909116610100171660011790555b6033805460ff191660011790558015611442576000805461ff001916905550565b6000818152600183016020526040812054801561196057835460001980830191908101906000908790839081106118d757fe5b90600052602060002001549050808760000184815481106118f457fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061192457fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610d45565b6000915050610d4556fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734e6f64655374616b696e673a20696e76616c6964207374616b696e6720737461747573214f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734e6f64655374616b696e673a207374616b696e6720616d6f756e74207468726573686f6c64206973207a65726f214e6f64655374616b696e673a207374616b696e6720616d6f756e74206973206c6f776572207468616e207374616b696e6720616d6f756e74207468726573686f6c64214e6f64655374616b696e673a2052656675736520436f6e747261637420416464726573732e4e6f64655374616b696e673a20416c72656164792070617274696369706174656420696e207374616b696e67214e6f64655374616b696e673a206e6f20656e74727920666f7220686973746f726963206164647265737321436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a65644e6f64655374616b696e673a206173736574206973207374696c6c206c6f636b696e67214e6f64655374616b696e673a206e6f7420612076616c696461746f722063616e64696461746521a2646970667358221220f068957663b13a23c7abeea22aa306089f895d505de29b774ab2a01ccf08b5cb64736f6c63430006060033

Block Transaction Gas Used Reward
Age Block Fee Address Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading