ETH Price: $1,568.15 (-0.83%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Method Block
From
To
0x60806040153270182022-08-12 12:38:13983 days ago1660307893  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakeAirdrop

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 15 : StakeAirdrop.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-contracts/contracts/utils/math/SafeMath.sol";
import {AirdropAccessControl} from "../src/utils/AirdropAccessControl.sol";
import {FireCatTransfer} from "../src/utils/FireCatTransfer.sol";
import {IStakeAirdrop} from "../src/interfaces/IStakeAirdrop.sol";

/**
 * @title FireCat's StakeAirdrop contract
 * @notice main: stake, claim, topUP
 * @author FireCat Finance
 */
contract StakeAirdrop is IStakeAirdrop, FireCatTransfer, AirdropAccessControl {
    using SafeMath for uint256;

    event SetStakeOn(bool isStakeOn_);
    event SetClaimOn(bool isClaimOn_);
    event SetImportOn(bool isImportOn_);
    event SetTopUpAmount(uint256 topUpAmount_);
    event SetCycleTime(uint256 startAt_, uint256 expiredAt_);
    event SetReleaseConfig(uint256[] releaseTimePeriod_, uint256[] releaseNumFactor_);
    event TopUp(address user_, uint256 amount_, uint256 totalSupplyNew_);
    event Staked(address user_, uint256 actualAddAmount_, uint256 totalStakedNew_);
    event Claimed(address user_, uint256 actualSubAmount_, uint256 totalClaimedNew_);
    event ExportStaked(uint256 startIndex_, uint256 endIndex_);

    /**
    * @dev switch on/off the stake function.
    */
    bool public isStakeOn = false;

    /**
    * @dev switch on/off the claim function.
    */
    bool public isClaimOn = false;

     /**
    * @dev switch on/off the importStaked function.
    */
    bool public isImportOn = false;

    address public airdropToken;
    address public stakeToken;
    uint256 public cycleId;

    /**
    * @dev the start timestamp of the stake.
    */
    uint256 private _startAt;

    /**
    * @dev the expired timestamp of the stake.
    */
    uint256 private _expiredAt;

    /**
    * @dev the release time period, such as: [1660000000, 1660000010, 1660000020]
    */
    uint256[] private _releaseTimePeriod;

    /**
    * @dev the release num factor, such as: [30, 30, 40]
    */
    uint256[] private _releaseNumFactor;

    /**
    * @dev the total airdrop amount which is alread exists in the contract.
    */
    uint256 private _totalSupply;
    
    /**
    * @dev the total staked amount which is alread exists in the contract.
    */
    uint256 private _totalStaked;

    /**
    * @dev the total claimed amount which is already transfer from this contract.
    */
    uint256 private _totalClaimed;

    /**
    * @dev the airdrop amount which is shoule be transfer to this contract.
    */
    uint256 private _topUpAmount;

    /**
    * @dev the number of user.
    */
    uint256 private _totalUser;

    /**
    * @dev the array of user
    */
    address[] private _totalUserArray;
    
    /**
    * @dev the label of user who has staked.
    */
    mapping(address => bool) _isMarked;

    /**
    * @dev the staked amount of user.
    */
    mapping(address => uint256) private _staked;

    /**
    * @dev the claimed amount of user.
    */
    mapping(address => uint256) private _claimed;

    function initialize(address admin, uint256 cycleId_, address airdropToken_, address stakeToken_) initializer public {
        cycleId = cycleId_;
        airdropToken = airdropToken_;
        stakeToken = stakeToken_;
        __AccessControl_init();
        __ReentrancyGuard_init();
        _setupRole(DEFAULT_ADMIN_ROLE, admin);
    }

    modifier modifyLocked() {
        require(_totalClaimed == 0, "ARD:E07");
        _;
    }

    modifier beforeStake() {
        require(isStakeOn, "ARD:E05");
        _;
    }

    modifier beforeClaim() {
        require(isClaimOn, "ARD:E05");
        _;
    }

    /// @inheritdoc IStakeAirdrop
    function cycle() public view returns (uint256, uint256) {
        return (_startAt, _expiredAt);
    }

    /// @inheritdoc IStakeAirdrop
    function releaseTimePeriod() public view returns (uint256[] memory) {
        return _releaseTimePeriod;
    }

    /// @inheritdoc IStakeAirdrop
    function releaseNumFactor() public view returns (uint256[] memory) {
        return _releaseNumFactor;
    }

    /// @inheritdoc IStakeAirdrop
    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    /// @inheritdoc IStakeAirdrop
    function topUpAmount() public view returns (uint256) {
        return _topUpAmount;
    }

    /// @inheritdoc IStakeAirdrop
    function totalStaked() public view returns (uint256) {
        return _totalStaked;
    }

    /// @inheritdoc IStakeAirdrop
    function totalClaimed() public view returns (uint256) {
        return _totalClaimed;
    }

    /// @inheritdoc IStakeAirdrop
    function totalUser() public view returns (uint256) {
        return _totalUser;
    }

    /// @inheritdoc IStakeAirdrop
    function stakedOf(address user_) public view returns (uint256) {
        return _staked[user_];
    }

    /// @inheritdoc IStakeAirdrop
    function claimedOf(address user_) public view returns (uint256) {
        return _claimed[user_];
    }

    /// @inheritdoc IStakeAirdrop
    function exportStaked(uint256 startIndex, uint256 endIndex) public view returns(address[] memory, uint256[] memory) {
        uint256 arrayLen = endIndex + 1;
        address[] memory userArray = new address[](arrayLen);
        uint256[] memory userStaked = new uint256[](arrayLen);
        for (uint256 i = startIndex; i < arrayLen; i++) {
            uint256 index = i - startIndex;
            address user = _totalUserArray[i];

            userArray[index] = user;
            userStaked[index] = _staked[user];
        }
        return (userArray, userStaked);
    }

    /// @inheritdoc IStakeAirdrop
    function reviewOf(address user_) public view returns (uint256, uint256, uint256) {
        // totalClaim = _totalSupply * userStaked / totalStaked;
        uint256 totalClaim = _totalSupply.mul(_staked[user_]).div(_totalStaked);

        // _claimFactor = _releaseNumFactor[0] + _releaseNumFactor[1] + _releaseNumFactor[n] + ...;
        uint256 _claimFactor = _selectSumFactor();

        // _maxFakeClaim = totalClaim * _claimFactor / 100;
        uint256 _maxFakeClaim = totalClaim.mul(_claimFactor).div(100);

        // _availableClaim = _maxFakeClaim - user_claimed;
        uint256 availableClaim = _maxFakeClaim.sub(_claimed[user_]);

        // lockedClaim = totalClaim - _maxFakeClaim; 
        uint256 lockedClaim = totalClaim.sub(_maxFakeClaim);

        require(totalClaim <= _totalSupply, "ADR:E08");
        require(availableClaim + _claimed[user_] <= _maxFakeClaim, "ADR:E09");
        require(lockedClaim + _maxFakeClaim <= totalClaim, "ARD:E10");

        return (availableClaim, lockedClaim, totalClaim);
    }

    /**
    * @notice record user address when user stake the token.
    * @param user_ address
    */
    function _markUser(address user_) internal {
        if (!_isMarked[user_]) {
            _isMarked[user_] = true;
            _totalUserArray.push(user_);
            _totalUser += 1;
        }
    }

    /**
    * @notice calculate the sum of releaseNumFactor when timestamp is bigger than last release timePeriod.
    * @return claimFactor
    */
    function _selectSumFactor() internal view returns (uint256) {
        uint256 claimFactor = 0;
        for (uint256 i = 0; i < _releaseTimePeriod.length; i++) {
            if (block.timestamp > _releaseTimePeriod[i]) {
                // _releaseNumFactor[0] + _releaseNumFactor[1] + _releaseNumFactor[n] + ...;
                claimFactor += _releaseNumFactor[i];
            }
        }
        return claimFactor;
    }

    /**
    * @notice calculate the sum of totalStaked.
    * @return totalStaked
    */
    function _updateTotalStaked() internal returns (uint256) {
        uint256 totalStakedNew = 0;
        for (uint256 i = 0; i < _totalUserArray.length; i++) {
            totalStakedNew += _staked[_totalUserArray[i]];
        }
        _totalStaked = totalStakedNew;
        return _totalStaked;
    }

    /// @inheritdoc IStakeAirdrop
    function setStakeOn(bool isStakeOn_) external onlyRole(DATA_ADMIN) {
        isStakeOn = isStakeOn_;
        emit SetStakeOn(isStakeOn_);
    }

    /// @inheritdoc IStakeAirdrop
    function setClaimOn(bool isClaimOn_) external onlyRole(DATA_ADMIN) {
        isClaimOn = isClaimOn_;
        emit SetClaimOn(isClaimOn_);
    }

    /// @inheritdoc IStakeAirdrop
    function setImportOn(bool isImportOn_) external onlyRole(DATA_ADMIN) {
        isImportOn = isImportOn_;
        emit SetImportOn(isImportOn_);
    }

    /// @inheritdoc IStakeAirdrop
    function setTopUpAmount(uint256 topUpAmount_) external modifyLocked onlyRole(DATA_ADMIN) {
        _topUpAmount = topUpAmount_;
        emit SetTopUpAmount(topUpAmount_);
    }

    /// @inheritdoc IStakeAirdrop
    function setCycleTime(uint256 startAt_, uint256 expiredAt_) external modifyLocked onlyRole(DATA_ADMIN) {
        require(startAt_ > block.timestamp && expiredAt_ > startAt_, "ARD:E11");
        _startAt = startAt_;
        _expiredAt = expiredAt_;
        emit SetCycleTime(startAt_, expiredAt_);
    }

    /// @inheritdoc IStakeAirdrop
    function setReleaseConfig(uint256[] memory releaseTimePeriod_, uint256[] memory releaseNumFactor_) external modifyLocked onlyRole(DATA_ADMIN) {
        require(releaseTimePeriod_.length > 0, "ARD:E12");
        require(releaseTimePeriod_.length == releaseNumFactor_.length, "ARD:E06");
        require(releaseTimePeriod_[0] > _expiredAt, "ARD:E13");

        uint256 arrayLen = releaseTimePeriod_.length;
        uint256 releaseNumTotal = 0;
        for (uint256 i = 0; i < arrayLen; i++) {
            if (i + 1 < arrayLen) {
                require(releaseTimePeriod_[i] < releaseTimePeriod_[i + 1], "ARD:E14");
            }

            releaseNumTotal += releaseNumFactor_[i];
        }
        require(releaseNumTotal == 100, "ARD:E15");

        _releaseTimePeriod = releaseTimePeriod_;
        _releaseNumFactor = releaseNumFactor_;
        emit SetReleaseConfig(releaseTimePeriod_, releaseNumFactor_);
    }

    /// @inheritdoc IStakeAirdrop
    function importStaked(address[] memory userArray_, uint256[] memory userStaked_) external modifyLocked onlyRole(DATA_ADMIN) returns (uint256) {
        require(isImportOn, "ARD:E05");
        require(userArray_.length == userStaked_.length, "ARD:E06");

        for (uint256 i = 0; i < userArray_.length; i++) {
            address uesr = userArray_[i];
            uint256 userStaked = userStaked_[i];
            _staked[uesr] = userStaked;
            _markUser(uesr);
        }
        isImportOn = false;
        return _updateTotalStaked();
    }

    /// @inheritdoc IStakeAirdrop
    function withdrawRemaining(address token, uint256 amount) external nonReentrant onlyRole(DATA_ADMIN) returns (uint256) {
        require(!isClaimOn, "ARD:E16");
        return withdraw(token, amount);
    }

    /// @inheritdoc IStakeAirdrop
    function topUp(uint256 addAmount) external modifyLocked onlyRole(DATA_ADMIN) returns (uint256) {
        require(IERC20(airdropToken).balanceOf(msg.sender) >= addAmount, "ARD:E02");
        require(addAmount == _topUpAmount, "ARD:E04");

        uint256 actualAddAmount = doTransferIn(airdropToken, msg.sender, addAmount);
        // totalReservesNew + actualAddAmount
        uint256 totalSupplyNew = _totalSupply.add(actualAddAmount);

        /* Revert on overflow */
        require(totalSupplyNew > _totalSupply, "ARD:E03");

        _totalSupply = totalSupplyNew;
        emit TopUp(msg.sender, actualAddAmount, totalSupplyNew);
        return actualAddAmount;
    }

    /// @inheritdoc IStakeAirdrop
    function stake(uint256 amount) external beforeStake nonReentrant returns (uint256) {
        require(block.timestamp > _startAt && block.timestamp < _expiredAt, "ARD:E01");
        require(IERC20(stakeToken).balanceOf(msg.sender) >= amount, "ARD:E02");

        uint256 actualAddAmount = doTransferIn(stakeToken, msg.sender, amount);
        uint256 totalStakedNew = _totalStaked.add(actualAddAmount);

        require(totalStakedNew > _totalStaked, "ARD:E03");

        _totalStaked = totalStakedNew;
        _staked[msg.sender] = _staked[msg.sender].add(actualAddAmount);

        _markUser(msg.sender);
        emit Staked(msg.sender, actualAddAmount, totalStakedNew);
        return actualAddAmount;
    }

    /// @inheritdoc IStakeAirdrop
    function claim() external beforeClaim nonReentrant returns (uint256) {
        (uint256 availableClaim, uint256 lockedClaim, uint256 totalClaim) = reviewOf(msg.sender);
        require(availableClaim > 0, "ARD:E00");

        IERC20(airdropToken).approve(msg.sender, availableClaim);
        uint256 actualClaimedAmount = doTransferOut(airdropToken, msg.sender, availableClaim);
        _claimed[msg.sender] = _claimed[msg.sender].add(actualClaimedAmount);
        _totalClaimed = _totalClaimed.add(actualClaimedAmount);
        emit Claimed(msg.sender, actualClaimedAmount, _totalClaimed);
        return actualClaimedAmount;
    }

}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 3 of 15 : 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 15 : AirdropAccessControl.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol";


abstract contract AirdropAccessControl is AccessControlUpgradeable {
    // market administrator
    bytes32 public constant MARKET_ADMIN = bytes32(keccak256(abi.encodePacked("Market_Admin")));

    // data administrator
    bytes32 public constant DATA_ADMIN = bytes32(keccak256(abi.encodePacked("Data_Admin")));

}

File 5 of 15 : FireCatTransfer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-contracts-upgradeable/contracts/security/ReentrancyGuardUpgradeable.sol";

contract FireCatTransfer is ReentrancyGuardUpgradeable {
    event Withdraw(address sender_, address token_, uint256 amount_);

     /**
     * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee.
     * @param token_ address.
     * @param from_ address.
     * @param amount_ uint.
     * @return transfer_num.
     */
    function doTransferIn(address token_, address from_, uint amount_) internal returns (uint) {
        uint balanceBefore = IERC20(token_).balanceOf(address(this));
        IERC20(token_).transferFrom(from_, address(this), amount_);

        bool success;
        assembly {
            switch returndatasize()
                case 0 {                       // This is a non-standard ERC-20
                    success := not(0)          // set success to true
                }
                case 32 {                      // This is a compliant ERC-20
                    returndatacopy(0, 0, 32)
                    success := mload(0)        // Set `success = returndata` of external call
                }
                default {                      // This is an excessively non-compliant ERC-20, revert.
                    revert(0, 0)
                }
        }
        require(success, "TOKEN_TRANSFER_IN_FAILED");
        uint balanceAfter = IERC20(token_).balanceOf(address(this));
        require(balanceAfter >= balanceBefore, "TOKEN_TRANSFER_IN_OVERFLOW");
        return balanceAfter - balanceBefore;  // underflow already checked above, just subtract
    }

    /**
     * @dev Performs a transfer out, ideally returning an explanatory error code upon failure tather than reverting.
     *  If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract.
     *  If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions.
     * @param token_ address.
     * @param to_ address.
     * @param amount_ uint.
     * @return transfer_num.
     */
    function doTransferOut(address token_, address to_, uint256 amount_) internal returns (uint) {
        uint balanceBefore = IERC20(token_).balanceOf(address(this));
        IERC20(token_).transfer(to_, amount_);

        bool success;
        assembly {
            switch returndatasize()
                case 0 {                      // This is a non-standard ERC-20
                    success := not(0)          // set success to true
                }
                case 32 {                     // This is a compliant ERC-20
                    returndatacopy(0, 0, 32)
                    success := mload(0)        // Set `success = returndata` of external call
                }
                default {                     // This is an excessively non-compliant ERC-20, revert.
                    revert(0, 0)
                }
        }
        require(success, "TOKEN_TRANSFER_IN_FAILED");
        uint balanceAfter = IERC20(token_).balanceOf(address(this));
        require(balanceAfter <= balanceBefore, "TOKEN_TRANSFER_IN_OVERFLOW");
        return balanceBefore - balanceAfter;  // underflow already checked above, just subtract
    }

    /**
    * @notice The interface of IERC20 token withdrawn.
    * @dev Call doTransferOut, transfer token to owner.
    * @param token address.
    * @param amount uint256.
    * @return actualSubAmount.
    */
    function withdraw(address token, uint256 amount) internal returns (uint) {
        require(token != address(0), "TOKEN_CANT_BE_ZERO");
        require(IERC20(token).balanceOf(address(this)) >= amount, "NOT_ENOUGH_TOKEN");
        IERC20(token).approve(msg.sender, amount);
        uint256 actualSubAmount = doTransferOut(token, msg.sender, amount);
        emit Withdraw(msg.sender, token, actualSubAmount);
        return actualSubAmount;
    }

}

File 6 of 15 : IStakeAirdrop.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

/**
* @notice IStakeAirdrop
*/
interface IStakeAirdrop {
    /**
    * @notice the stake time period
    * @return startAt, expiredAt 
    */
    function cycle() external view returns (uint256, uint256);

    /**
    * @notice the release time period
    * @return releaseTimePeriod
    */
    function releaseTimePeriod() external view returns (uint256[] memory);

    /**
    * @notice the release num factor
    * @return releaseNumFactor
    */
    function releaseNumFactor() external view returns (uint256[] memory);

    /**
    * @notice the stake token
    * @return stakeToken
    */
    function stakeToken() external view returns (address);

    /**
    * @notice the airdrop token
    * @return airdropToken
    */
    function airdropToken() external view returns (address);

    /**
    * @notice the airdrop amount, topUp amonut must be equal this value.
    * @return airdropAmount
    */
    function topUpAmount() external view returns (uint256);

    /**
    * @notice the airdrop amount, after topUp(), this value will be equal to topUpAmount.
    * @return totalSupply
    */
    function totalSupply() external view returns (uint256);

    /**
    * @notice the total staked amount.
    * @return totalStaked
    */
    function totalStaked() external view returns (uint256);

    /**
    * @notice the total claimed amount.
    * @return totalClaimed
    */
    function totalClaimed() external view returns (uint256);

    /**
    * @notice the amout of user who has staked.
    * @dev when user staked, this value will be add 1.
    * @return totalUser
    */
    function totalUser() external view returns (uint256);

    /**
    * @notice the staked amount of user.
    * @param user_ address
    * @return stakedAmount
    */
    function stakedOf(address user_) external view returns (uint256);

    /**
    * @notice the claimed amount of user.
    * @param user_ address
    * @return claimedAmount
    */
    function claimedOf(address user_) external view returns (uint256);

    /**
    * @notice export staked user, staked amount
    * @dev start index of array, end index of array.
    * @param startIndex uint256
    * @param endIndex uint256
    * @return stakedUser, stakedAmount
    */
    function exportStaked(uint256 startIndex, uint256 endIndex) external view returns(address[] memory, uint256[] memory);

    /**
    * @notice check the aridrop of user.
    * @param user_ address
    * @return availableClaim, lockedClaim, totalClaim
    */
    function reviewOf(address user_) external view returns (uint256, uint256, uint256);

    /**
    * @notice the stake switch, default is false
    * @param isStakeOn_ bool
    */
    function setStakeOn(bool isStakeOn_) external;

    /**
    * @notice the claim switch, default is false
    * @param isClaimOn_ bool
    */
    function setClaimOn(bool isClaimOn_) external;

    /**
    * @notice the import staked switch, default is false
    * @param isImportOn_ bool
    */
    function setImportOn(bool isImportOn_) external;

    /**
    * @notice set the airdrop amount
    * @param topUpAmount_ uint256
    */
    function setTopUpAmount(uint256 topUpAmount_) external;

    /**
    * @notice set the stake time period
    * @param startAt_ uint256
    * @param expiredAt_ uint256
    */
    function setCycleTime(uint256 startAt_, uint256 expiredAt_) external;

    /**
    * @notice set the release time period, release num factor
    * @param releaseTimePeriod_ uint256[]
    * @param releaseNumFactor_ uint256[]
    */
    function setReleaseConfig(uint256[] memory releaseTimePeriod_, uint256[] memory releaseNumFactor_) external;

    /**
    * @notice import staked user, staked amonut.
    * @param userArray_ address[]
    * @param userStaked_ uint256[]
    * @return result
    */
    function importStaked(address[] memory userArray_, uint256[] memory userStaked_) external returns (uint256);

    /**
    * @notice The interface of IERC20 withdrawn.
    * @dev Trasfer token to admin.
    * @param token address.
    * @param amount uint256.
    * @return actualSubAmount.
    */
    function withdrawRemaining(address token, uint256 amount) external returns (uint256);

    /**
    * @notice topUp the airdrop amount.
    * @param addAmount uint256
    * @return actualTopUpAmount
    */
    function topUp(uint256 addAmount) external returns (uint256);

    /**
    * @notice the interface of stake.
    * @param amount_ uint256
    * @return actualStakedAmount
    */
    function stake(uint256 amount_) external returns (uint256);

    /**
    * @notice the interface of claim.
    * @return actualClaimedAmount
    */
    function claim() external  returns (uint256);
}

File 7 of 15 : AccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControlUpgradeable.sol";
import "../utils/ContextUpgradeable.sol";
import "../utils/StringsUpgradeable.sol";
import "../utils/introspection/ERC165Upgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {
    function __AccessControl_init() internal onlyInitializing {
    }

    function __AccessControl_init_unchained() internal onlyInitializing {
    }
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        StringsUpgradeable.toHexString(account),
                        " is missing role ",
                        StringsUpgradeable.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }

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

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

pragma solidity ^0.8.0;
import "../proxy/utils/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].
 */
abstract contract ReentrancyGuardUpgradeable is Initializable {
    // 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;

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

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _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() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // 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;
    }

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

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

File 9 of 15 : IAccessControlUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControlUpgradeable {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

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

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

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

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

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

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

File 11 of 15 : StringsUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

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

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

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

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

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

pragma solidity ^0.8.0;

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

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal onlyInitializing {
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }

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

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

pragma solidity ^0.8.2;

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

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

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

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

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

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "solmate/=lib/solmate/src/",
    "src/=src/",
    "test/=test/",
    "script/=script/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user_","type":"address"},{"indexed":false,"internalType":"uint256","name":"actualSubAmount_","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalClaimedNew_","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startIndex_","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endIndex_","type":"uint256"}],"name":"ExportStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isClaimOn_","type":"bool"}],"name":"SetClaimOn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startAt_","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expiredAt_","type":"uint256"}],"name":"SetCycleTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isImportOn_","type":"bool"}],"name":"SetImportOn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"releaseTimePeriod_","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"releaseNumFactor_","type":"uint256[]"}],"name":"SetReleaseConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isStakeOn_","type":"bool"}],"name":"SetStakeOn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"topUpAmount_","type":"uint256"}],"name":"SetTopUpAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user_","type":"address"},{"indexed":false,"internalType":"uint256","name":"actualAddAmount_","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalStakedNew_","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user_","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount_","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalSupplyNew_","type":"uint256"}],"name":"TopUp","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender_","type":"address"},{"indexed":false,"internalType":"address","name":"token_","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DATA_ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MARKET_ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"airdropToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user_","type":"address"}],"name":"claimedOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cycle","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cycleId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"startIndex","type":"uint256"},{"internalType":"uint256","name":"endIndex","type":"uint256"}],"name":"exportStaked","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"userArray_","type":"address[]"},{"internalType":"uint256[]","name":"userStaked_","type":"uint256[]"}],"name":"importStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"uint256","name":"cycleId_","type":"uint256"},{"internalType":"address","name":"airdropToken_","type":"address"},{"internalType":"address","name":"stakeToken_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isClaimOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isImportOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isStakeOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"releaseNumFactor","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"releaseTimePeriod","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user_","type":"address"}],"name":"reviewOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isClaimOn_","type":"bool"}],"name":"setClaimOn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startAt_","type":"uint256"},{"internalType":"uint256","name":"expiredAt_","type":"uint256"}],"name":"setCycleTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isImportOn_","type":"bool"}],"name":"setImportOn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"releaseTimePeriod_","type":"uint256[]"},{"internalType":"uint256[]","name":"releaseNumFactor_","type":"uint256[]"}],"name":"setReleaseConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isStakeOn_","type":"bool"}],"name":"setStakeOn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"topUpAmount_","type":"uint256"}],"name":"setTopUpAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakeToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user_","type":"address"}],"name":"stakedOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"addAmount","type":"uint256"}],"name":"topUp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"topUpAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

608060405260c9805462ffffff1916905534801561001c57600080fd5b50612bf88061002c6000396000f3fe608060405234801561001057600080fd5b506004361061023d5760003560e01c806362e0accb1161013b578063baa3f7ee116100b8578063dd592a321161007c578063dd592a3214610514578063e1604b701461051c578063f3c8378814610524578063f88345ec14610537578063fcbfd5971461054a57600080fd5b8063baa3f7ee1461048f578063ca908f12146104b8578063cbb36355146104e6578063d547741f146104f9578063d54ad2a11461050c57600080fd5b8063a48f197d116100ff578063a48f197d14610425578063a694fc3a14610438578063aa9e370d1461044b578063ae082a5214610453578063af500ba31461046657600080fd5b806362e0accb146103f1578063817b1cd2146103fa57806391d1485414610402578063a217fddf14610415578063a314fb161461041d57600080fd5b8063395ac56a116101c95780634e71d92d1161018d5780634e71d92d1461038757806350017f3e1461038f57806351ed6a30146103a257806353122d13146103b55780636190c9d5146103d657600080fd5b8063395ac56a146103155780633c89c9061461031d57806342c41713146103305780634ca07a80146103425780634d06068a1461035557600080fd5b80632f2ff15d116102105780632f2ff15d146102b2578063358394d8146102c757806336568abe146102da57806338336b35146102ed5780633881d12c1461030057600080fd5b806301ffc9a71461024257806318160ddd1461026a5780632398c2db1461027c578063248a9ca31461028f575b600080fd5b610255610250366004612521565b610557565b60405190151581526020015b60405180910390f35b60d0545b604051908152602001610261565b61026e61028a366004612638565b61058e565b61026e61029d3660046126f8565b60009081526097602052604090206001015490565b6102c56102c0366004612711565b6106f9565b005b6102c56102d536600461273d565b610723565b6102c56102e8366004612711565b610894565b61026e6102fb36600461278a565b610912565b6103086109a2565b60405161026191906127ef565b6103086109fa565b60c9546102559062010000900460ff1681565b60c95461025590610100900460ff1681565b6102c5610350366004612802565b610a50565b60c95461036f90630100000090046001600160a01b031681565b6040516001600160a01b039091168152602001610261565b61026e610b2a565b61026e61039d3660046126f8565b610cd7565b60ca5461036f906001600160a01b031681565b6103c86103c3366004612802565b610ed4565b604051610261929190612824565b60cc5460cd5460408051928352602083019190915201610261565b61026e60cb5481565b60d15461026e565b610255610410366004612711565b61105a565b61026e600081565b61026e611085565b6102c5610433366004612892565b6110ba565b61026e6104463660046126f8565b611131565b61026e611347565b6102c56104613660046126f8565b611356565b61026e6104743660046128af565b6001600160a01b0316600090815260d7602052604090205490565b61026e61049d3660046128af565b6001600160a01b0316600090815260d8602052604090205490565b6104cb6104c63660046128af565b6113d9565b60408051938452602084019290925290820152606001610261565b6102c56104f4366004612892565b611568565b6102c5610507366004612711565b6115e1565b60d25461026e565b60d35461026e565b60d45461026e565b6102c56105323660046128ca565b611606565b6102c5610545366004612892565b611881565b60c9546102559060ff1681565b60006001600160e01b03198216637965db0b60e01b148061058857506301ffc9a760e01b6001600160e01b03198316145b92915050565b600060d2546000146105bb5760405162461bcd60e51b81526004016105b290612917565b60405180910390fd5b6040516020016105ca90612938565b604051602081830303815290604052805190602001206105e9816118f8565b60c95462010000900460ff166106115760405162461bcd60e51b81526004016105b29061294e565b825184511461064c5760405162461bcd60e51b815260206004820152600760248201526620a9221d22981b60c91b60448201526064016105b2565b60005b84518110156106dc57600085828151811061066c5761066c61296f565b60200260200101519050600085838151811061068a5761068a61296f565b602002602001015190508060d76000846001600160a01b03166001600160a01b03168152602001908152602001600020819055506106c782611905565b505080806106d49061299b565b91505061064f565b5060c9805462ff0000191690556106f16119a5565b949350505050565b600082815260976020526040902060010154610714816118f8565b61071e8383611a19565b505050565b600054610100900460ff16158080156107435750600054600160ff909116105b8061075d5750303b15801561075d575060005460ff166001145b6107c05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105b2565b6000805460ff1916600117905580156107e3576000805461ff0019166101001790555b60cb84905560c980546301000000600160b81b03191663010000006001600160a01b03868116919091029190911790915560ca80546001600160a01b031916918416919091179055610833611a9f565b61083b611ac8565b610846600086611af7565b801561088d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050505050565b6001600160a01b03811633146109045760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105b2565b61090e8282611b01565b5050565b600061091c611b68565b60405160200161092b90612938565b6040516020818303038152906040528051906020012061094a816118f8565b60c954610100900460ff161561098c5760405162461bcd60e51b815260206004820152600760248201526620a9221d22989b60c91b60448201526064016105b2565b6109968484611bc1565b91505061058860018055565b606060ce8054806020026020016040519081016040528092919081815260200182805480156109f057602002820191906000526020600020905b8154815260200190600101908083116109dc575b5050505050905090565b606060cf8054806020026020016040519081016040528092919081815260200182805480156109f057602002820191906000526020600020908154815260200190600101908083116109dc575050505050905090565b60d25415610a705760405162461bcd60e51b81526004016105b290612917565b604051602001610a7f90612938565b60405160208183030381529060405280519060200120610a9e816118f8565b4283118015610aac57508282115b610ae25760405162461bcd60e51b81526020600482015260076024820152664152443a45313160c81b60448201526064016105b2565b60cc83905560cd82905560408051848152602081018490527f8ee5ec369f059f74fb314ae7101986db82a3c2dcf1f60ec5a917bfbc749ffcb9910160405180910390a1505050565b60c954600090610100900460ff16610b545760405162461bcd60e51b81526004016105b29061294e565b610b5c611b68565b6000806000610b6a336113d9565b92509250925060008311610baa5760405162461bcd60e51b815260206004820152600760248201526604152443a4530360cc1b60448201526064016105b2565b60c95460405163095ea7b360e01b81523360048201526024810185905263010000009091046001600160a01b03169063095ea7b3906044016020604051808303816000875af1158015610c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2591906129b4565b5060c954600090610c4790630100000090046001600160a01b03163386611d91565b33600090815260d86020526040902054909150610c649082611fbd565b33600090815260d8602052604090205560d254610c819082611fbd565b60d2819055604080513381526020810184905280820192909252517f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a9181900360600190a19350505050610cd460018055565b90565b600060d254600014610cfb5760405162461bcd60e51b81526004016105b290612917565b604051602001610d0a90612938565b60405160208183030381529060405280519060200120610d29816118f8565b60c9546040516370a0823160e01b81523360048201528491630100000090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610d78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9c91906129d1565b1015610dd45760405162461bcd60e51b815260206004820152600760248201526620a9221d22981960c91b60448201526064016105b2565b60d3548314610e0f5760405162461bcd60e51b81526020600482015260076024820152661054910e914c0d60ca1b60448201526064016105b2565b60c954600090610e3090630100000090046001600160a01b03163386611fd0565b90506000610e498260d054611fbd90919063ffffffff16565b905060d0548111610e865760405162461bcd60e51b81526020600482015260076024820152664152443a45303360c81b60448201526064016105b2565b60d081905560408051338152602081018490529081018290527ff0f5a6096b2a43fc10bc314148e9ac3851fd8455384682f3c3cd9d2f0bc71b179060600160405180910390a1509392505050565b6060806000610ee48460016129ea565b905060008167ffffffffffffffff811115610f0157610f0161254b565b604051908082528060200260200182016040528015610f2a578160200160208202803683370190505b50905060008267ffffffffffffffff811115610f4857610f4861254b565b604051908082528060200260200182016040528015610f71578160200160208202803683370190505b509050865b8381101561104d576000610f8a8983612a02565b9050600060d58381548110610fa157610fa161296f565b9060005260206000200160009054906101000a90046001600160a01b0316905080858381518110610fd457610fd461296f565b60200260200101906001600160a01b031690816001600160a01b03168152505060d76000826001600160a01b03166001600160a01b031681526020019081526020016000205484838151811061102c5761102c61296f565b602002602001018181525050505080806110459061299b565b915050610f76565b5090969095509350505050565b60009182526097602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6040516b26b0b935b2ba2fa0b236b4b760a11b6020820152602c015b6040516020818303038152906040528051906020012081565b6040516020016110c990612938565b604051602081830303815290604052805190602001206110e8816118f8565b60c9805460ff19168315159081179091556040519081527f8aba9b102bc9c95c6c94e2c387aaeb41d36fb86b715fe962cad88473d5085b80906020015b60405180910390a15050565b60c95460009060ff166111565760405162461bcd60e51b81526004016105b29061294e565b61115e611b68565b60cc5442118015611170575060cd5442105b6111a65760405162461bcd60e51b81526020600482015260076024820152664152443a45303160c81b60448201526064016105b2565b60ca546040516370a0823160e01b815233600482015283916001600160a01b0316906370a0823190602401602060405180830381865afa1580156111ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121291906129d1565b101561124a5760405162461bcd60e51b815260206004820152600760248201526620a9221d22981960c91b60448201526064016105b2565b60ca54600090611264906001600160a01b03163385611fd0565b9050600061127d8260d154611fbd90919063ffffffff16565b905060d15481116112ba5760405162461bcd60e51b81526020600482015260076024820152664152443a45303360c81b60448201526064016105b2565b60d181905533600090815260d760205260409020546112d99083611fbd565b33600081815260d760205260409020919091556112f590611905565b60408051338152602081018490529081018290527f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee909060600160405180910390a150905061134260018055565b919050565b6040516020016110a190612938565b60d254156113765760405162461bcd60e51b81526004016105b290612917565b60405160200161138590612938565b604051602081830303815290604052805190602001206113a4816118f8565b60d38290556040518281527f5f625396e100b5ad333f4e7b9a2019f5554aa896eeec5f9b0ce1ff1528e813df90602001611125565b60008060008061142560d15461141f60d76000896001600160a01b03166001600160a01b031681526020019081526020016000205460d0546121f790919063ffffffff16565b90612203565b9050600061143161220f565b90506000611444606461141f85856121f7565b6001600160a01b038816600090815260d860205260408120549192509061146c908390612287565b9050600061147a8584612287565b905060d0548511156114b85760405162461bcd60e51b815260206004820152600760248201526608288a4748a60760cb1b60448201526064016105b2565b6001600160a01b038916600090815260d8602052604090205483906114dd90846129ea565b11156115155760405162461bcd60e51b81526020600482015260076024820152664144523a45303960c81b60448201526064016105b2565b8461152084836129ea565b11156115585760405162461bcd60e51b815260206004820152600760248201526604152443a4531360cc1b60448201526064016105b2565b9098909750929550919350505050565b60405160200161157790612938565b60405160208183030381529060405280519060200120611596816118f8565b60c98054831515620100000262ff0000199091161790556040517fb158a1372f9389e1234b875050b317b523496353f06b68398fed7c05585055299061112590841515815260200190565b6000828152609760205260409020600101546115fc816118f8565b61071e8383611b01565b60d254156116265760405162461bcd60e51b81526004016105b290612917565b60405160200161163590612938565b60405160208183030381529060405280519060200120611654816118f8565b600083511161168f5760405162461bcd60e51b815260206004820152600760248201526620a9221d22989960c91b60448201526064016105b2565b81518351146116ca5760405162461bcd60e51b815260206004820152600760248201526620a9221d22981b60c91b60448201526064016105b2565b60cd54836000815181106116e0576116e061296f565b60200260200101511161171f5760405162461bcd60e51b81526020600482015260076024820152664152443a45313360c81b60448201526064016105b2565b82516000805b828110156117ed57826117398260016129ea565b10156117b4578561174b8260016129ea565b8151811061175b5761175b61296f565b60200260200101518682815181106117755761177561296f565b6020026020010151106117b45760405162461bcd60e51b81526020600482015260076024820152661054910e914c4d60ca1b60448201526064016105b2565b8481815181106117c6576117c661296f565b6020026020010151826117d991906129ea565b9150806117e58161299b565b915050611725565b50806064146118285760405162461bcd60e51b81526020600482015260076024820152664152443a45313560c81b60448201526064016105b2565b845161183b9060ce9060208801906124c1565b50835161184f9060cf9060208701906124c1565b507f3c443786c59894f234c14d4270e10778744ac1052d061e731816577d7b4b516b8585604051610884929190612a19565b60405160200161189090612938565b604051602081830303815290604052805190602001206118af816118f8565b60c980548315156101000261ff00199091161790556040517fc57dd726c38e22ae392710b0736d2701e2d7d72dd4f6206bb2aed20d8acf9a029061112590841515815260200190565b6119028133612293565b50565b6001600160a01b038116600090815260d6602052604090205460ff16611902576001600160a01b038116600081815260d660205260408120805460ff1916600190811790915560d5805480830182559083527f51858de9989bf7441865ebdadbf7382c8838edbf830f5d86a9a51ac773676dd60180546001600160a01b03191690931790925560d4805490919061199d9084906129ea565b909155505050565b600080805b60d554811015611a0e5760d7600060d583815481106119cb576119cb61296f565b60009182526020808320909101546001600160a01b031683528201929092526040019020546119fa90836129ea565b915080611a068161299b565b9150506119aa565b5060d1819055919050565b611a23828261105a565b61090e5760008281526097602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611a5b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600054610100900460ff16611ac65760405162461bcd60e51b81526004016105b290612a47565b565b600054610100900460ff16611aef5760405162461bcd60e51b81526004016105b290612a47565b611ac66122ec565b61090e8282611a19565b611b0b828261105a565b1561090e5760008281526097602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600260015403611bba5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105b2565b6002600155565b60006001600160a01b038316611c0e5760405162461bcd60e51b8152602060048201526012602482015271544f4b454e5f43414e545f42455f5a45524f60701b60448201526064016105b2565b6040516370a0823160e01b815230600482015282906001600160a01b038516906370a0823190602401602060405180830381865afa158015611c54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7891906129d1565b1015611cb95760405162461bcd60e51b815260206004820152601060248201526f2727aa2fa2a727aaa3a42faa27a5a2a760811b60448201526064016105b2565b60405163095ea7b360e01b8152336004820152602481018390526001600160a01b0384169063095ea7b3906044016020604051808303816000875af1158015611d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d2a91906129b4565b506000611d38843385611d91565b604080513381526001600160a01b03871660208201529081018290529091507f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9060600160405180910390a19392505050565b60018055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038616906370a0823190602401602060405180830381865afa158015611dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dfe91906129d1565b60405163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529192509086169063a9059cbb906044016020604051808303816000875af1158015611e51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e7591906129b4565b5060003d8015611e8c5760208114611e9657600080fd5b6000199150611ea2565b60206000803e60005191505b5080611eeb5760405162461bcd60e51b81526020600482015260186024820152771513d2d15397d514905394d1915497d25397d1905253115160421b60448201526064016105b2565b6040516370a0823160e01b81523060048201526000906001600160a01b038816906370a0823190602401602060405180830381865afa158015611f32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5691906129d1565b905082811115611fa85760405162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f5700000000000060448201526064016105b2565b611fb28184612a02565b979650505050505050565b6000611fc982846129ea565b9392505050565b6040516370a0823160e01b815230600482015260009081906001600160a01b038616906370a0823190602401602060405180830381865afa158015612019573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203d91906129d1565b6040516323b872dd60e01b81526001600160a01b03868116600483015230602483015260448201869052919250908616906323b872dd906064016020604051808303816000875af1158015612096573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ba91906129b4565b5060003d80156120d157602081146120db57600080fd5b60001991506120e7565b60206000803e60005191505b50806121305760405162461bcd60e51b81526020600482015260186024820152771513d2d15397d514905394d1915497d25397d1905253115160421b60448201526064016105b2565b6040516370a0823160e01b81523060048201526000906001600160a01b038816906370a0823190602401602060405180830381865afa158015612177573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061219b91906129d1565b9050828110156121ed5760405162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f5700000000000060448201526064016105b2565b611fb28382612a02565b6000611fc98284612a92565b6000611fc98284612ab1565b600080805b60ce548110156122815760ce81815481106122315761223161296f565b906000526020600020015442111561226f5760cf81815481106122565761225661296f565b90600052602060002001548261226c91906129ea565b91505b806122798161299b565b915050612214565b50919050565b6000611fc98284612a02565b61229d828261105a565b61090e576122aa81612313565b6122b5836020612325565b6040516020016122c6929190612b03565b60408051601f198184030181529082905262461bcd60e51b82526105b291600401612b78565b600054610100900460ff16611d8b5760405162461bcd60e51b81526004016105b290612a47565b60606105886001600160a01b03831660145b60606000612334836002612a92565b61233f9060026129ea565b67ffffffffffffffff8111156123575761235761254b565b6040519080825280601f01601f191660200182016040528015612381576020820181803683370190505b509050600360fc1b8160008151811061239c5761239c61296f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106123cb576123cb61296f565b60200101906001600160f81b031916908160001a90535060006123ef846002612a92565b6123fa9060016129ea565b90505b6001811115612472576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061242e5761242e61296f565b1a60f81b8282815181106124445761244461296f565b60200101906001600160f81b031916908160001a90535060049490941c9361246b81612bab565b90506123fd565b508315611fc95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105b2565b8280548282559060005260206000209081019282156124fc579160200282015b828111156124fc5782518255916020019190600101906124e1565b5061250892915061250c565b5090565b5b80821115612508576000815560010161250d565b60006020828403121561253357600080fd5b81356001600160e01b031981168114611fc957600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561258a5761258a61254b565b604052919050565b600067ffffffffffffffff8211156125ac576125ac61254b565b5060051b60200190565b80356001600160a01b038116811461134257600080fd5b600082601f8301126125de57600080fd5b813560206125f36125ee83612592565b612561565b82815260059290921b8401810191818101908684111561261257600080fd5b8286015b8481101561262d5780358352918301918301612616565b509695505050505050565b6000806040838503121561264b57600080fd5b823567ffffffffffffffff8082111561266357600080fd5b818501915085601f83011261267757600080fd5b813560206126876125ee83612592565b82815260059290921b840181019181810190898411156126a657600080fd5b948201945b838610156126cb576126bc866125b6565b825294820194908201906126ab565b965050860135925050808211156126e157600080fd5b506126ee858286016125cd565b9150509250929050565b60006020828403121561270a57600080fd5b5035919050565b6000806040838503121561272457600080fd5b82359150612734602084016125b6565b90509250929050565b6000806000806080858703121561275357600080fd5b61275c856125b6565b935060208501359250612771604086016125b6565b915061277f606086016125b6565b905092959194509250565b6000806040838503121561279d57600080fd5b6127a6836125b6565b946020939093013593505050565b600081518084526020808501945080840160005b838110156127e4578151875295820195908201906001016127c8565b509495945050505050565b602081526000611fc960208301846127b4565b6000806040838503121561281557600080fd5b50508035926020909101359150565b604080825283519082018190526000906020906060840190828701845b828110156128665781516001600160a01b031684529284019290840190600101612841565b5050508381038285015261287a81866127b4565b9695505050505050565b801515811461190257600080fd5b6000602082840312156128a457600080fd5b8135611fc981612884565b6000602082840312156128c157600080fd5b611fc9826125b6565b600080604083850312156128dd57600080fd5b823567ffffffffffffffff808211156128f557600080fd5b612901868387016125cd565b935060208501359150808211156126e157600080fd5b6020808252600790820152664152443a45303760c81b604082015260600190565b692230ba30afa0b236b4b760b11b8152600a0190565b6020808252600790820152664152443a45303560c81b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016129ad576129ad612985565b5060010190565b6000602082840312156129c657600080fd5b8151611fc981612884565b6000602082840312156129e357600080fd5b5051919050565b600082198211156129fd576129fd612985565b500190565b600082821015612a1457612a14612985565b500390565b604081526000612a2c60408301856127b4565b8281036020840152612a3e81856127b4565b95945050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000816000190483118215151615612aac57612aac612985565b500290565b600082612ace57634e487b7160e01b600052601260045260246000fd5b500490565b60005b83811015612aee578181015183820152602001612ad6565b83811115612afd576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612b3b816017850160208801612ad3565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612b6c816028840160208801612ad3565b01602801949350505050565b6020815260008251806020840152612b97816040850160208701612ad3565b601f01601f19169190910160400192915050565b600081612bba57612bba612985565b50600019019056fea264697066735822122051b25e25a9430f903acfa2ed097476a419197f728dd9186ca121f23e0300cd8364736f6c634300080e0033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061023d5760003560e01c806362e0accb1161013b578063baa3f7ee116100b8578063dd592a321161007c578063dd592a3214610514578063e1604b701461051c578063f3c8378814610524578063f88345ec14610537578063fcbfd5971461054a57600080fd5b8063baa3f7ee1461048f578063ca908f12146104b8578063cbb36355146104e6578063d547741f146104f9578063d54ad2a11461050c57600080fd5b8063a48f197d116100ff578063a48f197d14610425578063a694fc3a14610438578063aa9e370d1461044b578063ae082a5214610453578063af500ba31461046657600080fd5b806362e0accb146103f1578063817b1cd2146103fa57806391d1485414610402578063a217fddf14610415578063a314fb161461041d57600080fd5b8063395ac56a116101c95780634e71d92d1161018d5780634e71d92d1461038757806350017f3e1461038f57806351ed6a30146103a257806353122d13146103b55780636190c9d5146103d657600080fd5b8063395ac56a146103155780633c89c9061461031d57806342c41713146103305780634ca07a80146103425780634d06068a1461035557600080fd5b80632f2ff15d116102105780632f2ff15d146102b2578063358394d8146102c757806336568abe146102da57806338336b35146102ed5780633881d12c1461030057600080fd5b806301ffc9a71461024257806318160ddd1461026a5780632398c2db1461027c578063248a9ca31461028f575b600080fd5b610255610250366004612521565b610557565b60405190151581526020015b60405180910390f35b60d0545b604051908152602001610261565b61026e61028a366004612638565b61058e565b61026e61029d3660046126f8565b60009081526097602052604090206001015490565b6102c56102c0366004612711565b6106f9565b005b6102c56102d536600461273d565b610723565b6102c56102e8366004612711565b610894565b61026e6102fb36600461278a565b610912565b6103086109a2565b60405161026191906127ef565b6103086109fa565b60c9546102559062010000900460ff1681565b60c95461025590610100900460ff1681565b6102c5610350366004612802565b610a50565b60c95461036f90630100000090046001600160a01b031681565b6040516001600160a01b039091168152602001610261565b61026e610b2a565b61026e61039d3660046126f8565b610cd7565b60ca5461036f906001600160a01b031681565b6103c86103c3366004612802565b610ed4565b604051610261929190612824565b60cc5460cd5460408051928352602083019190915201610261565b61026e60cb5481565b60d15461026e565b610255610410366004612711565b61105a565b61026e600081565b61026e611085565b6102c5610433366004612892565b6110ba565b61026e6104463660046126f8565b611131565b61026e611347565b6102c56104613660046126f8565b611356565b61026e6104743660046128af565b6001600160a01b0316600090815260d7602052604090205490565b61026e61049d3660046128af565b6001600160a01b0316600090815260d8602052604090205490565b6104cb6104c63660046128af565b6113d9565b60408051938452602084019290925290820152606001610261565b6102c56104f4366004612892565b611568565b6102c5610507366004612711565b6115e1565b60d25461026e565b60d35461026e565b60d45461026e565b6102c56105323660046128ca565b611606565b6102c5610545366004612892565b611881565b60c9546102559060ff1681565b60006001600160e01b03198216637965db0b60e01b148061058857506301ffc9a760e01b6001600160e01b03198316145b92915050565b600060d2546000146105bb5760405162461bcd60e51b81526004016105b290612917565b60405180910390fd5b6040516020016105ca90612938565b604051602081830303815290604052805190602001206105e9816118f8565b60c95462010000900460ff166106115760405162461bcd60e51b81526004016105b29061294e565b825184511461064c5760405162461bcd60e51b815260206004820152600760248201526620a9221d22981b60c91b60448201526064016105b2565b60005b84518110156106dc57600085828151811061066c5761066c61296f565b60200260200101519050600085838151811061068a5761068a61296f565b602002602001015190508060d76000846001600160a01b03166001600160a01b03168152602001908152602001600020819055506106c782611905565b505080806106d49061299b565b91505061064f565b5060c9805462ff0000191690556106f16119a5565b949350505050565b600082815260976020526040902060010154610714816118f8565b61071e8383611a19565b505050565b600054610100900460ff16158080156107435750600054600160ff909116105b8061075d5750303b15801561075d575060005460ff166001145b6107c05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105b2565b6000805460ff1916600117905580156107e3576000805461ff0019166101001790555b60cb84905560c980546301000000600160b81b03191663010000006001600160a01b03868116919091029190911790915560ca80546001600160a01b031916918416919091179055610833611a9f565b61083b611ac8565b610846600086611af7565b801561088d576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050505050565b6001600160a01b03811633146109045760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105b2565b61090e8282611b01565b5050565b600061091c611b68565b60405160200161092b90612938565b6040516020818303038152906040528051906020012061094a816118f8565b60c954610100900460ff161561098c5760405162461bcd60e51b815260206004820152600760248201526620a9221d22989b60c91b60448201526064016105b2565b6109968484611bc1565b91505061058860018055565b606060ce8054806020026020016040519081016040528092919081815260200182805480156109f057602002820191906000526020600020905b8154815260200190600101908083116109dc575b5050505050905090565b606060cf8054806020026020016040519081016040528092919081815260200182805480156109f057602002820191906000526020600020908154815260200190600101908083116109dc575050505050905090565b60d25415610a705760405162461bcd60e51b81526004016105b290612917565b604051602001610a7f90612938565b60405160208183030381529060405280519060200120610a9e816118f8565b4283118015610aac57508282115b610ae25760405162461bcd60e51b81526020600482015260076024820152664152443a45313160c81b60448201526064016105b2565b60cc83905560cd82905560408051848152602081018490527f8ee5ec369f059f74fb314ae7101986db82a3c2dcf1f60ec5a917bfbc749ffcb9910160405180910390a1505050565b60c954600090610100900460ff16610b545760405162461bcd60e51b81526004016105b29061294e565b610b5c611b68565b6000806000610b6a336113d9565b92509250925060008311610baa5760405162461bcd60e51b815260206004820152600760248201526604152443a4530360cc1b60448201526064016105b2565b60c95460405163095ea7b360e01b81523360048201526024810185905263010000009091046001600160a01b03169063095ea7b3906044016020604051808303816000875af1158015610c01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2591906129b4565b5060c954600090610c4790630100000090046001600160a01b03163386611d91565b33600090815260d86020526040902054909150610c649082611fbd565b33600090815260d8602052604090205560d254610c819082611fbd565b60d2819055604080513381526020810184905280820192909252517f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a9181900360600190a19350505050610cd460018055565b90565b600060d254600014610cfb5760405162461bcd60e51b81526004016105b290612917565b604051602001610d0a90612938565b60405160208183030381529060405280519060200120610d29816118f8565b60c9546040516370a0823160e01b81523360048201528491630100000090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610d78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9c91906129d1565b1015610dd45760405162461bcd60e51b815260206004820152600760248201526620a9221d22981960c91b60448201526064016105b2565b60d3548314610e0f5760405162461bcd60e51b81526020600482015260076024820152661054910e914c0d60ca1b60448201526064016105b2565b60c954600090610e3090630100000090046001600160a01b03163386611fd0565b90506000610e498260d054611fbd90919063ffffffff16565b905060d0548111610e865760405162461bcd60e51b81526020600482015260076024820152664152443a45303360c81b60448201526064016105b2565b60d081905560408051338152602081018490529081018290527ff0f5a6096b2a43fc10bc314148e9ac3851fd8455384682f3c3cd9d2f0bc71b179060600160405180910390a1509392505050565b6060806000610ee48460016129ea565b905060008167ffffffffffffffff811115610f0157610f0161254b565b604051908082528060200260200182016040528015610f2a578160200160208202803683370190505b50905060008267ffffffffffffffff811115610f4857610f4861254b565b604051908082528060200260200182016040528015610f71578160200160208202803683370190505b509050865b8381101561104d576000610f8a8983612a02565b9050600060d58381548110610fa157610fa161296f565b9060005260206000200160009054906101000a90046001600160a01b0316905080858381518110610fd457610fd461296f565b60200260200101906001600160a01b031690816001600160a01b03168152505060d76000826001600160a01b03166001600160a01b031681526020019081526020016000205484838151811061102c5761102c61296f565b602002602001018181525050505080806110459061299b565b915050610f76565b5090969095509350505050565b60009182526097602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6040516b26b0b935b2ba2fa0b236b4b760a11b6020820152602c015b6040516020818303038152906040528051906020012081565b6040516020016110c990612938565b604051602081830303815290604052805190602001206110e8816118f8565b60c9805460ff19168315159081179091556040519081527f8aba9b102bc9c95c6c94e2c387aaeb41d36fb86b715fe962cad88473d5085b80906020015b60405180910390a15050565b60c95460009060ff166111565760405162461bcd60e51b81526004016105b29061294e565b61115e611b68565b60cc5442118015611170575060cd5442105b6111a65760405162461bcd60e51b81526020600482015260076024820152664152443a45303160c81b60448201526064016105b2565b60ca546040516370a0823160e01b815233600482015283916001600160a01b0316906370a0823190602401602060405180830381865afa1580156111ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121291906129d1565b101561124a5760405162461bcd60e51b815260206004820152600760248201526620a9221d22981960c91b60448201526064016105b2565b60ca54600090611264906001600160a01b03163385611fd0565b9050600061127d8260d154611fbd90919063ffffffff16565b905060d15481116112ba5760405162461bcd60e51b81526020600482015260076024820152664152443a45303360c81b60448201526064016105b2565b60d181905533600090815260d760205260409020546112d99083611fbd565b33600081815260d760205260409020919091556112f590611905565b60408051338152602081018490529081018290527f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee909060600160405180910390a150905061134260018055565b919050565b6040516020016110a190612938565b60d254156113765760405162461bcd60e51b81526004016105b290612917565b60405160200161138590612938565b604051602081830303815290604052805190602001206113a4816118f8565b60d38290556040518281527f5f625396e100b5ad333f4e7b9a2019f5554aa896eeec5f9b0ce1ff1528e813df90602001611125565b60008060008061142560d15461141f60d76000896001600160a01b03166001600160a01b031681526020019081526020016000205460d0546121f790919063ffffffff16565b90612203565b9050600061143161220f565b90506000611444606461141f85856121f7565b6001600160a01b038816600090815260d860205260408120549192509061146c908390612287565b9050600061147a8584612287565b905060d0548511156114b85760405162461bcd60e51b815260206004820152600760248201526608288a4748a60760cb1b60448201526064016105b2565b6001600160a01b038916600090815260d8602052604090205483906114dd90846129ea565b11156115155760405162461bcd60e51b81526020600482015260076024820152664144523a45303960c81b60448201526064016105b2565b8461152084836129ea565b11156115585760405162461bcd60e51b815260206004820152600760248201526604152443a4531360cc1b60448201526064016105b2565b9098909750929550919350505050565b60405160200161157790612938565b60405160208183030381529060405280519060200120611596816118f8565b60c98054831515620100000262ff0000199091161790556040517fb158a1372f9389e1234b875050b317b523496353f06b68398fed7c05585055299061112590841515815260200190565b6000828152609760205260409020600101546115fc816118f8565b61071e8383611b01565b60d254156116265760405162461bcd60e51b81526004016105b290612917565b60405160200161163590612938565b60405160208183030381529060405280519060200120611654816118f8565b600083511161168f5760405162461bcd60e51b815260206004820152600760248201526620a9221d22989960c91b60448201526064016105b2565b81518351146116ca5760405162461bcd60e51b815260206004820152600760248201526620a9221d22981b60c91b60448201526064016105b2565b60cd54836000815181106116e0576116e061296f565b60200260200101511161171f5760405162461bcd60e51b81526020600482015260076024820152664152443a45313360c81b60448201526064016105b2565b82516000805b828110156117ed57826117398260016129ea565b10156117b4578561174b8260016129ea565b8151811061175b5761175b61296f565b60200260200101518682815181106117755761177561296f565b6020026020010151106117b45760405162461bcd60e51b81526020600482015260076024820152661054910e914c4d60ca1b60448201526064016105b2565b8481815181106117c6576117c661296f565b6020026020010151826117d991906129ea565b9150806117e58161299b565b915050611725565b50806064146118285760405162461bcd60e51b81526020600482015260076024820152664152443a45313560c81b60448201526064016105b2565b845161183b9060ce9060208801906124c1565b50835161184f9060cf9060208701906124c1565b507f3c443786c59894f234c14d4270e10778744ac1052d061e731816577d7b4b516b8585604051610884929190612a19565b60405160200161189090612938565b604051602081830303815290604052805190602001206118af816118f8565b60c980548315156101000261ff00199091161790556040517fc57dd726c38e22ae392710b0736d2701e2d7d72dd4f6206bb2aed20d8acf9a029061112590841515815260200190565b6119028133612293565b50565b6001600160a01b038116600090815260d6602052604090205460ff16611902576001600160a01b038116600081815260d660205260408120805460ff1916600190811790915560d5805480830182559083527f51858de9989bf7441865ebdadbf7382c8838edbf830f5d86a9a51ac773676dd60180546001600160a01b03191690931790925560d4805490919061199d9084906129ea565b909155505050565b600080805b60d554811015611a0e5760d7600060d583815481106119cb576119cb61296f565b60009182526020808320909101546001600160a01b031683528201929092526040019020546119fa90836129ea565b915080611a068161299b565b9150506119aa565b5060d1819055919050565b611a23828261105a565b61090e5760008281526097602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611a5b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600054610100900460ff16611ac65760405162461bcd60e51b81526004016105b290612a47565b565b600054610100900460ff16611aef5760405162461bcd60e51b81526004016105b290612a47565b611ac66122ec565b61090e8282611a19565b611b0b828261105a565b1561090e5760008281526097602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600260015403611bba5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105b2565b6002600155565b60006001600160a01b038316611c0e5760405162461bcd60e51b8152602060048201526012602482015271544f4b454e5f43414e545f42455f5a45524f60701b60448201526064016105b2565b6040516370a0823160e01b815230600482015282906001600160a01b038516906370a0823190602401602060405180830381865afa158015611c54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7891906129d1565b1015611cb95760405162461bcd60e51b815260206004820152601060248201526f2727aa2fa2a727aaa3a42faa27a5a2a760811b60448201526064016105b2565b60405163095ea7b360e01b8152336004820152602481018390526001600160a01b0384169063095ea7b3906044016020604051808303816000875af1158015611d06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d2a91906129b4565b506000611d38843385611d91565b604080513381526001600160a01b03871660208201529081018290529091507f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9060600160405180910390a19392505050565b60018055565b6040516370a0823160e01b815230600482015260009081906001600160a01b038616906370a0823190602401602060405180830381865afa158015611dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dfe91906129d1565b60405163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529192509086169063a9059cbb906044016020604051808303816000875af1158015611e51573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e7591906129b4565b5060003d8015611e8c5760208114611e9657600080fd5b6000199150611ea2565b60206000803e60005191505b5080611eeb5760405162461bcd60e51b81526020600482015260186024820152771513d2d15397d514905394d1915497d25397d1905253115160421b60448201526064016105b2565b6040516370a0823160e01b81523060048201526000906001600160a01b038816906370a0823190602401602060405180830381865afa158015611f32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5691906129d1565b905082811115611fa85760405162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f5700000000000060448201526064016105b2565b611fb28184612a02565b979650505050505050565b6000611fc982846129ea565b9392505050565b6040516370a0823160e01b815230600482015260009081906001600160a01b038616906370a0823190602401602060405180830381865afa158015612019573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061203d91906129d1565b6040516323b872dd60e01b81526001600160a01b03868116600483015230602483015260448201869052919250908616906323b872dd906064016020604051808303816000875af1158015612096573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ba91906129b4565b5060003d80156120d157602081146120db57600080fd5b60001991506120e7565b60206000803e60005191505b50806121305760405162461bcd60e51b81526020600482015260186024820152771513d2d15397d514905394d1915497d25397d1905253115160421b60448201526064016105b2565b6040516370a0823160e01b81523060048201526000906001600160a01b038816906370a0823190602401602060405180830381865afa158015612177573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061219b91906129d1565b9050828110156121ed5760405162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f5700000000000060448201526064016105b2565b611fb28382612a02565b6000611fc98284612a92565b6000611fc98284612ab1565b600080805b60ce548110156122815760ce81815481106122315761223161296f565b906000526020600020015442111561226f5760cf81815481106122565761225661296f565b90600052602060002001548261226c91906129ea565b91505b806122798161299b565b915050612214565b50919050565b6000611fc98284612a02565b61229d828261105a565b61090e576122aa81612313565b6122b5836020612325565b6040516020016122c6929190612b03565b60408051601f198184030181529082905262461bcd60e51b82526105b291600401612b78565b600054610100900460ff16611d8b5760405162461bcd60e51b81526004016105b290612a47565b60606105886001600160a01b03831660145b60606000612334836002612a92565b61233f9060026129ea565b67ffffffffffffffff8111156123575761235761254b565b6040519080825280601f01601f191660200182016040528015612381576020820181803683370190505b509050600360fc1b8160008151811061239c5761239c61296f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106123cb576123cb61296f565b60200101906001600160f81b031916908160001a90535060006123ef846002612a92565b6123fa9060016129ea565b90505b6001811115612472576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061242e5761242e61296f565b1a60f81b8282815181106124445761244461296f565b60200101906001600160f81b031916908160001a90535060049490941c9361246b81612bab565b90506123fd565b508315611fc95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105b2565b8280548282559060005260206000209081019282156124fc579160200282015b828111156124fc5782518255916020019190600101906124e1565b5061250892915061250c565b5090565b5b80821115612508576000815560010161250d565b60006020828403121561253357600080fd5b81356001600160e01b031981168114611fc957600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561258a5761258a61254b565b604052919050565b600067ffffffffffffffff8211156125ac576125ac61254b565b5060051b60200190565b80356001600160a01b038116811461134257600080fd5b600082601f8301126125de57600080fd5b813560206125f36125ee83612592565b612561565b82815260059290921b8401810191818101908684111561261257600080fd5b8286015b8481101561262d5780358352918301918301612616565b509695505050505050565b6000806040838503121561264b57600080fd5b823567ffffffffffffffff8082111561266357600080fd5b818501915085601f83011261267757600080fd5b813560206126876125ee83612592565b82815260059290921b840181019181810190898411156126a657600080fd5b948201945b838610156126cb576126bc866125b6565b825294820194908201906126ab565b965050860135925050808211156126e157600080fd5b506126ee858286016125cd565b9150509250929050565b60006020828403121561270a57600080fd5b5035919050565b6000806040838503121561272457600080fd5b82359150612734602084016125b6565b90509250929050565b6000806000806080858703121561275357600080fd5b61275c856125b6565b935060208501359250612771604086016125b6565b915061277f606086016125b6565b905092959194509250565b6000806040838503121561279d57600080fd5b6127a6836125b6565b946020939093013593505050565b600081518084526020808501945080840160005b838110156127e4578151875295820195908201906001016127c8565b509495945050505050565b602081526000611fc960208301846127b4565b6000806040838503121561281557600080fd5b50508035926020909101359150565b604080825283519082018190526000906020906060840190828701845b828110156128665781516001600160a01b031684529284019290840190600101612841565b5050508381038285015261287a81866127b4565b9695505050505050565b801515811461190257600080fd5b6000602082840312156128a457600080fd5b8135611fc981612884565b6000602082840312156128c157600080fd5b611fc9826125b6565b600080604083850312156128dd57600080fd5b823567ffffffffffffffff808211156128f557600080fd5b612901868387016125cd565b935060208501359150808211156126e157600080fd5b6020808252600790820152664152443a45303760c81b604082015260600190565b692230ba30afa0b236b4b760b11b8152600a0190565b6020808252600790820152664152443a45303560c81b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016129ad576129ad612985565b5060010190565b6000602082840312156129c657600080fd5b8151611fc981612884565b6000602082840312156129e357600080fd5b5051919050565b600082198211156129fd576129fd612985565b500190565b600082821015612a1457612a14612985565b500390565b604081526000612a2c60408301856127b4565b8281036020840152612a3e81856127b4565b95945050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000816000190483118215151615612aac57612aac612985565b500290565b600082612ace57634e487b7160e01b600052601260045260246000fd5b500490565b60005b83811015612aee578181015183820152602001612ad6565b83811115612afd576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612b3b816017850160208801612ad3565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612b6c816028840160208801612ad3565b01602801949350505050565b6020815260008251806020840152612b97816040850160208701612ad3565b601f01601f19169190910160400192915050565b600081612bba57612bba612985565b50600019019056fea264697066735822122051b25e25a9430f903acfa2ed097476a419197f728dd9186ca121f23e0300cd8364736f6c634300080e0033

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.