ETH Price: $3,112.89 (+1.39%)

Contract

0x0173627B52159CB065978Dc79d19124bB1861126
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...182899622023-10-06 7:26:23407 days ago1696577183IN
0x0173627B...bB1861126
0 ETH0.000230798.04589737
Withdraw Stuck E...182869382023-10-05 21:18:23407 days ago1696540703IN
0x0173627B...bB1861126
0 ETH0.000199128.21963916
Withdraw Tokens182869362023-10-05 21:17:59407 days ago1696540679IN
0x0173627B...bB1861126
0 ETH0.002598427.82941598
Withdraw Tokens182868842023-10-05 21:07:35407 days ago1696540055IN
0x0173627B...bB1861126
0 ETH0.000703789.86313536
Withdraw Tokens182868812023-10-05 21:06:59407 days ago1696540019IN
0x0173627B...bB1861126
0 ETH0.002864839.4786349
Transfer Ownersh...182868722023-10-05 21:05:11407 days ago1696539911IN
0x0173627B...bB1861126
0 ETH0.000251758.77300069
Stake182723902023-10-03 20:29:11409 days ago1696364951IN
0x0173627B...bB1861126
0 ETH0.0032527415.59634436
Stake182714962023-10-03 17:29:23409 days ago1696354163IN
0x0173627B...bB1861126
0 ETH0.0032637615.65552075
Stake182693152023-10-03 10:07:47409 days ago1696327667IN
0x0173627B...bB1861126
0 ETH0.0022677711.39963375
Stake182680102023-10-03 5:46:11410 days ago1696311971IN
0x0173627B...bB1861126
0 ETH0.001249985.9958683
Stake182678332023-10-03 5:10:35410 days ago1696309835IN
0x0173627B...bB1861126
0 ETH0.002480866.07451584
Stake182632682023-10-02 13:52:35410 days ago1696254755IN
0x0173627B...bB1861126
0 ETH0.0034112616.16445466
Stake182609112023-10-02 5:59:47411 days ago1696226387IN
0x0173627B...bB1861126
0 ETH0.001741528.35609247
Stake182602412023-10-02 3:44:23411 days ago1696218263IN
0x0173627B...bB1861126
0 ETH0.001295346.21344668
Stake182594232023-10-02 1:00:23411 days ago1696208423IN
0x0173627B...bB1861126
0 ETH0.00085326.88986873
Stake182593722023-10-02 0:49:59411 days ago1696207799IN
0x0173627B...bB1861126
0 ETH0.00129376.13030391
Stake182584452023-10-01 21:43:59411 days ago1696196639IN
0x0173627B...bB1861126
0 ETH0.002012469.6518963
Stake182584362023-10-01 21:42:11411 days ago1696196531IN
0x0173627B...bB1861126
0 ETH0.001671188.01856255
Stake182214372023-09-26 17:28:23416 days ago1695749303IN
0x0173627B...bB1861126
0 ETH0.0065767931.56729066
Stake182193452023-09-26 10:26:11416 days ago1695723971IN
0x0173627B...bB1861126
0 ETH0.0017792215.02924754
Stake182160522023-09-25 23:22:35417 days ago1695684155IN
0x0173627B...bB1861126
0 ETH0.001750277.21675331
Withdraw182155662023-09-25 21:44:47417 days ago1695678287IN
0x0173627B...bB1861126
0 ETH0.0020535823.18232727
Stake182155322023-09-25 21:37:59417 days ago1695677879IN
0x0173627B...bB1861126
0 ETH0.0046127219.01918738
Transfer182143432023-09-25 17:39:47417 days ago1695663587IN
0x0173627B...bB1861126
0 ETH0.0004177819.84246999
Transfer182138422023-09-25 15:58:47417 days ago1695657527IN
0x0173627B...bB1861126
0 ETH0.0003006914.28161669
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FT500StakingWithRewards

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 6 : FT500StakingWithRewards.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

contract FT500StakingWithRewards is Ownable {
    using SafeMath for uint256;

    IERC20 public stakingToken;
    uint256 public totalStaked;
    uint256 public totalRewards;

    struct Stake {
        uint256 amount;
        uint256 startTime;
        uint256 duration; // 1, 3, 6, or 12 months represented as seconds
        uint256 tier; // Tier 1, 2, 3, 4, or 5
        uint256 reward;
        uint256 rewardDebt;
    }

    // Mapping of user addresses to their staking positions
    mapping(address => Stake) public stakes;

    bool public ethHarvestActive = false;
    
    uint256[5][] public rewardPercentages = [
        [200, 400, 800, 1600], // Tier 1
        [300, 600, 1200, 1800], // Tier 2
        [400, 800, 1600, 2000], // Tier 3
        [500, 1000, 2000, 2500], // Tier 4
        [800, 1600, 2400, 3200] // Tier 5
    ];

    uint256 internal accRewardPerToken;

    // ==============
    //   CONSTANTS
    // ==============
    uint256 internal constant PRECISION = 1e18;


    // ==============
    //    EVENTS
    // ==============
    event Deposit(address indexed user, uint256 indexed stakedAmount);

    event Withdraw(address indexed user, uint256 indexed withdrawAmount);

    event HarvestEth(address indexed user, uint256 indexed harvestAmount);

    event RewardsAdded(uint256 amount);

    constructor(address _stakingToken) {
        stakingToken = IERC20(_stakingToken);
    }

    // Stake tokens with a specified lockup period and tier
    function stake(uint256 amount, uint256 duration) external {
        
        require(duration == 1 || duration == 3 || duration == 6 || duration == 12, "Invalid duration");

        // Transfer tokens to the contract
        require(stakingToken.transferFrom(msg.sender, address(this), amount), "Transfer failed");
        
        //check if user already has stake
        if(stakes[msg.sender].amount > 0){
            totalStaked = totalStaked.sub(stakes[msg.sender].amount);
            totalRewards = totalRewards.sub(stakes[msg.sender].reward);
            amount += stakes[msg.sender].amount;
        } 

        
        uint8 tier;
        if(amount < 100_000 * 1e18){
            tier = 1;    
        }else if(amount >= 100_000 * 1e18 && amount < 250_000 * 1e18){
            tier = 2;
        }else if(amount >= 250_000 * 1e18 && amount < 500_000 * 1e18){
            tier = 3;
        }else if(amount >= 500_000 * 1e18 && amount < 1_000_000 * 1e18){
            tier = 4;
        }else if(amount >= 1_000_000 * 1e18){
            tier = 5;
        }

        require(tier >= 1 && tier <= 5, "Invalid tier");

        uint8 rewardPecentageIndex;

        if(duration == 1){
            rewardPecentageIndex = 1;
        }else if(duration == 3){
            rewardPecentageIndex = 2;
        }else if(duration == 6){
            rewardPecentageIndex = 3;
        }else if(duration == 12){
            rewardPecentageIndex = 4;
        }


        uint256 rewardPercentage = rewardPercentages[tier - 1][rewardPecentageIndex - 1];

        // use updated amount to calculate reward
        uint256 reward = amount.mul(rewardPercentage).div(10_000);

        // Update user's staking position
        stakes[msg.sender] = Stake(amount, block.timestamp, duration * 30 days, tier, reward, 0);
        _updateUserDebt(msg.sender, amount);

        // Update total staked amount
        totalStaked = totalStaked.add(amount);
        // Update total reward
        totalRewards = totalRewards.add(reward);
    }

    // Withdraw staked tokens and rewards
    function withdraw() external {
        Stake storage userStake = stakes[msg.sender];
        require(userStake.amount > 0, "No staking position");

        _harvestEth();

        uint256 stakedAmount = userStake.amount;
        uint256 rewards = stakes[msg.sender].reward;

        // Calculate the time elapsed since the start of the stake
        uint256 elapsedTime = block.timestamp.sub(userStake.startTime);

        //else take earlyWithdrawal fees

        // Update total staked amount
        totalStaked = totalStaked.sub(stakedAmount);
        //  update total rewards
        totalRewards = totalRewards.sub(rewards);

        if(elapsedTime >= userStake.duration){
            delete stakes[msg.sender];
            //if stake time is elapsed, send rewards and send back staked funds
            require(stakingToken.transfer(msg.sender, rewards+stakedAmount), "Transfer failed");

        }else{
            delete stakes[msg.sender];

            // Calculate the early withdrawal fee (10% of the staked amount)
            uint256 earlyWithdrawalFee = (stakedAmount.mul(10)).div(100);
            // Adjust the staked amount after applying the fee
            stakedAmount = stakedAmount.sub(earlyWithdrawalFee);
            require(stakingToken.transfer(msg.sender, stakedAmount), "Transfer failed");
        }
    }
    //claim rewards
    function claimRewards() external{
        // ensure user has stake
        Stake storage userStake = stakes[msg.sender];
        require(userStake.amount > 0, "No staking position");

        uint256 rewards = userStake.reward;

        // Calculate the time elapsed since the start of the stake
        uint256 elapsedTime = block.timestamp.sub(userStake.startTime);
        require(elapsedTime >= userStake.duration, "Staking duration not completed");
        
        
        totalRewards = totalRewards.sub(rewards);
        stakes[msg.sender].reward = 0;
        require(stakingToken.transfer(msg.sender, rewards), "Transfer failed");
    }

    function recommit() external {
        // ensure user has stake
        Stake storage userStake = stakes[msg.sender];
        require(userStake.amount > 0, "No staking position");

        uint256 stakedAmount = userStake.amount;
        uint256 rewards = userStake.reward;

        // Calculate the time elapsed since the start of the stake
        uint256 elapsedTime = block.timestamp.sub(userStake.startTime);
        require(elapsedTime >= userStake.duration, "Staking duration not completed");
        
        totalStaked = totalStaked.sub(stakedAmount);
        totalRewards = totalRewards.sub(rewards);

        //update staked amount
        stakedAmount = stakedAmount.add(rewards);
        //update rewards based on increased amount
        uint8 rewardPecentageIndex;

        //recalculate reward and tier  
        uint256 duration = userStake.duration / 30 days;

        if(duration == 1){
            rewardPecentageIndex = 1;
        }else if(duration == 3){
            rewardPecentageIndex = 2;
        }else if(duration == 6){
            rewardPecentageIndex = 3;
        }else if(duration == 12){
            rewardPecentageIndex = 4;
        }

        uint8 tier;

        if(stakedAmount < 100_000 * 1e18){
            tier = 1;    
        }else if(stakedAmount >= 100_000 * 1e18 && stakedAmount < 250_000 * 1e18){
            tier = 2;
        }else if(stakedAmount >= 250_000 * 1e18 && stakedAmount < 500_000 * 1e18){
            tier = 3;
        }else if(stakedAmount >= 500_000 * 1e18 && stakedAmount < 1_000_000 * 1e18){
            tier = 4;
        }else if(stakedAmount >= 1_000_000 * 1e18){
            tier = 5;
        }

        require(tier >= 1 && tier <= 5, "Invalid tier");
        uint256 rewardPercentage = rewardPercentages[tier - 1][rewardPecentageIndex - 1];

        // use updated amount to calculate reward
        uint256 newReward = stakedAmount.mul(rewardPercentage).div(10_000);

        // Update total staked amount
        totalStaked = totalStaked.add(stakedAmount);
        // Update total reward
        totalRewards = totalRewards.add(newReward);

        stakes[msg.sender].amount = stakedAmount;
        stakes[msg.sender].amount = stakedAmount;
        stakes[msg.sender].startTime = block.timestamp;
        stakes[msg.sender].duration = duration * 30 days;      
        stakes[msg.sender].tier = tier;
        stakes[msg.sender].reward = newReward;

        _updateUserDebt(msg.sender, stakedAmount);

    }

    // Owner-only function to withdraw any remaining tokens from the contract
    function withdrawTokens(address tokenAddress, uint256 amount) external onlyOwner {
        IERC20 token = IERC20(tokenAddress);
        require(token.balanceOf(address(this)) > 0, "No tokens to withdraw");
        require(token.transfer(owner(), amount), "Transfer failed");
    }

    // Owner-only function to change the staking token
    function changeStakingToken(address newToken) external onlyOwner {
        stakingToken = IERC20(newToken);
    }

    // Check if a wallet has staked
    function hasStake(address user) external view returns (bool) {
        return stakes[user].amount > 0;
    }
    
    function withdrawStuckEth(address toAddr) external onlyOwner {
        (bool success, ) = toAddr.call{value: address(this).balance}("");
        require(success);
    }

    receive() external payable {}

    // =============
    //    ADMIN
    // =============

    // Distribute rewards
    function distributeRewards(uint amount) external payable onlyOwner {
        require(msg.value == amount, "Enter correct amount");
        
        if (totalStaked > 0) accRewardPerToken += (amount * PRECISION) / totalStaked;

        emit RewardsAdded(amount);
    }

    // Harvest rewards
    function _harvestEth() internal {

        uint256 minimumStakeDuration = 14 days;
        Stake memory _stake = stakes[msg.sender];
        uint256 elapsedTime = block.timestamp.sub(_stake.startTime);

        if(ethHarvestActive && elapsedTime >= minimumStakeDuration){
            require(ethHarvestActive, "Harvesting not started");
            uint pendingRewards = _pendingHarvestRewards(_stake);

            stakes[msg.sender].rewardDebt =
                (_stake.amount * accRewardPerToken) /
                PRECISION;

            (bool success, ) = msg.sender.call{value: pendingRewards}("");
            require(success);

            emit HarvestEth(msg.sender, pendingRewards);
        }
    }

    function harvestEth() public {

        require(ethHarvestActive, "Harvesting not started");
        uint256 minimumStakeDuration = 14 days;
        Stake memory _stake = stakes[msg.sender];
        uint256 elapsedTime = block.timestamp.sub(_stake.startTime);

        require(elapsedTime >= minimumStakeDuration, "Minimum staking duration not reached");

        _harvestEth();
    }

    function toggleEthHarvesting(bool _value) external payable onlyOwner {
        ethHarvestActive = _value;
    }
    // Rewards to be harvested
    function _pendingHarvestRewards(Stake memory _stake) internal view returns (uint) {
        return
            (_stake.amount * accRewardPerToken) / PRECISION - _stake.rewardDebt;
    }

    function _updateUserDebt(address user, uint256 newAmount) internal {
        stakes[user].rewardDebt = (newAmount * accRewardPerToken) / PRECISION;
    }

    function getPendingHarvestRewards() external view returns (uint){
        return _pendingHarvestRewards(stakes[msg.sender]);
    }
}

File 2 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 6 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 4 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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 5 of 6 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 6 of 6 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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;
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_stakingToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"stakedAmount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"harvestAmount","type":"uint256"}],"name":"HarvestEth","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardsAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"withdrawAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"newToken","type":"address"}],"name":"changeStakingToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"distributeRewards","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"ethHarvestActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPendingHarvestRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvestEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"hasStake","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recommit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardPercentages","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakes","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"tier","type":"uint256"},{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_value","type":"bool"}],"name":"toggleEthHarvesting","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"totalRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"toAddr","type":"address"}],"name":"withdrawStuckEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6005805460ff1916815560c8610120908152610190610140819052610320610160819052610640610180819052608093845261012c6101a09081526102586101c0526104b06101e0526107086102005260a0526102209283526102408290526102608190526107d061028081905260c0939093526101f46102a09081526103e86102c0526102e0939093526109c46103005260e0929092526103a06040528080526103409190915261096061036052610c806103805261010052620000c8916006919062000178565b50348015620000d5575f80fd5b5060405162001aeb38038062001aeb833981016040819052620000f89162000262565b620001033362000129565b600180546001600160a01b0319166001600160a01b039290921691909117905562000291565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054828255905f5260205f20906005028101928215620001c5579160200282015b82811115620001c5578251620001b49083906004620001d7565b50916020019190600501906200019a565b50620001d39291506200021c565b5090565b82600581019282156200020e579160200282015b828111156200020e578251829061ffff16905591602001919060010190620001eb565b50620001d39291506200024c565b80821115620001d3575f80825560018201819055600282018190556003820181905560048201556005016200021c565b5b80821115620001d3575f81556001016200024d565b5f6020828403121562000273575f80fd5b81516001600160a01b03811681146200028a575f80fd5b9392505050565b61184c806200029f5f395ff3fe608060405260043610610129575f3560e01c8063718b558e116100a85780638da5cb5b1161006d5780638da5cb5b1461032c578063a7b2f10214610348578063b4b87d781461035b578063b7a43ba11461037a578063e73e14bf146103a3578063f2fde38b146103d9575f80fd5b8063718b558e1461028e57806372f702f3146102a25780637b0472f0146102d95780637ca8448a146102f8578063817b1cd214610317575f80fd5b8063372500ab116100ee578063372500ab1461022b5780633ccfd60b1461023f57806359974e38146102535780636213f83514610266578063715018a61461027a575f80fd5b806306b091f9146101345780630db9f53e146101555780630e15561a1461016957806316934fc414610191578063285d333b1461020c575f80fd5b3661013057005b5f80fd5b34801561013f575f80fd5b5061015361014e36600461164a565b6103f8565b005b348015610160575f80fd5b50610153610564565b348015610174575f80fd5b5061017e60035481565b6040519081526020015b60405180910390f35b34801561019c575f80fd5b506101df6101ab366004611672565b600460208190525f918252604090912080546001820154600283015460038401549484015460059094015492949193909286565b604080519687526020870195909552938501929092526060840152608083015260a082015260c001610188565b348015610217575f80fd5b50610153610226366004611672565b610678565b348015610236575f80fd5b506101536106a2565b34801561024a575f80fd5b50610153610797565b61015361026136600461168b565b6109eb565b348015610271575f80fd5b50610153610aac565b348015610285575f80fd5b50610153610dc5565b348015610299575f80fd5b5061017e610dd8565b3480156102ad575f80fd5b506001546102c1906001600160a01b031681565b6040516001600160a01b039091168152602001610188565b3480156102e4575f80fd5b506101536102f33660046116a2565b610e39565b348015610303575f80fd5b50610153610312366004611672565b611222565b348015610322575f80fd5b5061017e60025481565b348015610337575f80fd5b505f546001600160a01b03166102c1565b6101536103563660046116cf565b611289565b348015610366575f80fd5b5061017e6103753660046116a2565b6112a4565b348015610385575f80fd5b506005546103939060ff1681565b6040519015158152602001610188565b3480156103ae575f80fd5b506103936103bd366004611672565b6001600160a01b03165f90815260046020526040902054151590565b3480156103e4575f80fd5b506101536103f3366004611672565b6112d5565b61040061134e565b6040516370a0823160e01b815230600482015282905f906001600160a01b038316906370a0823190602401602060405180830381865afa158015610446573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061046a91906116f1565b116104b45760405162461bcd60e51b81526020600482015260156024820152744e6f20746f6b656e7320746f20776974686472617760581b60448201526064015b60405180910390fd5b806001600160a01b031663a9059cbb6104d45f546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018590526044015b6020604051808303815f875af115801561051f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105439190611708565b61055f5760405162461bcd60e51b81526004016104ab90611723565b505050565b60055460ff166105af5760405162461bcd60e51b815260206004820152601660248201527512185c9d995cdd1a5b99c81b9bdd081cdd185c9d195960521b60448201526064016104ab565b335f908152600460208181526040808420815160c0810183528154815260018201549381018490526002820154928101929092526003810154606083015292830154608082015260059092015460a08301526212750092906106129042906113a7565b9050828110156106705760405162461bcd60e51b8152602060048201526024808201527f4d696e696d756d207374616b696e67206475726174696f6e206e6f742072656160448201526318da195960e21b60648201526084016104ab565b61055f6113bb565b61068061134e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b335f90815260046020526040902080546106ce5760405162461bcd60e51b81526004016104ab9061174c565b600481015460018201545f906106e59042906113a7565b9050826002015481101561073b5760405162461bcd60e51b815260206004820152601e60248201527f5374616b696e67206475726174696f6e206e6f7420636f6d706c65746564000060448201526064016104ab565b60035461074890836113a7565b600355335f818152600460208190526040808320820192909255600154915163a9059cbb60e01b815290810192909252602482018490526001600160a01b03169063a9059cbb90604401610503565b335f90815260046020526040902080546107c35760405162461bcd60e51b81526004016104ab9061174c565b6107cb6113bb565b8054335f9081526004602081905260408220015460018401549091906107f29042906113a7565b60025490915061080290846113a7565b60025560035461081290836113a7565b600355600284015481106108fe57335f81815260046020819052604082208281556001808201849055600282018490556003820184905591810183905560050191909155546001600160a01b03169063a9059cbb90610871868661178d565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af11580156108b9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108dd9190611708565b6108f95760405162461bcd60e51b81526004016104ab90611723565b6109e5565b335f9081526004602081905260408220828155600181018390556002810183905560038101839055908101829055600501819055610948606461094286600a611548565b90611553565b905061095484826113a7565b60015460405163a9059cbb60e01b8152336004820152602481018390529195506001600160a01b03169063a9059cbb906044016020604051808303815f875af11580156109a3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109c79190611708565b6109e35760405162461bcd60e51b81526004016104ab90611723565b505b50505050565b6109f361134e565b803414610a395760405162461bcd60e51b8152602060048201526014602482015273115b9d195c8818dbdc9c9958dd08185b5bdd5b9d60621b60448201526064016104ab565b60025415610a7657600254610a56670de0b6b3a7640000836117a0565b610a6091906117b7565b60075f828254610a70919061178d565b90915550505b6040518181527ff8fad42e780bfa5459be3fe691e8ba1aec70342250112139c5771c3fd155f3129060200160405180910390a150565b335f9081526004602052604090208054610ad85760405162461bcd60e51b81526004016104ab9061174c565b8054600482015460018301545f90610af19042906113a7565b90508360020154811015610b475760405162461bcd60e51b815260206004820152601e60248201527f5374616b696e67206475726174696f6e206e6f7420636f6d706c65746564000060448201526064016104ab565b600254610b5490846113a7565b600255600354610b6490836113a7565b600355610b71838361155e565b92505f8062278d008660020154610b8891906117b7565b905080600103610b9b5760019150610bca565b80600303610bac5760029150610bca565b80600603610bbd5760039150610bca565b80600c03610bca57600491505b5f69152d02c7e14af6800000861015610be557506001610c8a565b69152d02c7e14af68000008610158015610c0857506934f086f3b33b6840000086105b15610c1557506002610c8a565b6934f086f3b33b684000008610158015610c3857506969e10de76676d080000086105b15610c4557506003610c8a565b6969e10de76676d08000008610158015610c68575069d3c21bcecceda100000086105b15610c7557506004610c8a565b69d3c21bcecceda10000008610610c8a575060055b60018160ff1610158015610ca2575060058160ff1611155b610cdd5760405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103a34b2b960a11b60448201526064016104ab565b5f6006610ceb6001846117d6565b60ff1681548110610cfe57610cfe6117ef565b905f5260205f209060050201600185610d1791906117d6565b60ff1660058110610d2a57610d2a6117ef565b015490505f610d3f6127106109428a85611548565b600254909150610d4f908961155e565b600255600354610d5f908261155e565b600355335f90815260046020526040902088815542600190910155610d878462278d006117a0565b335f818152600460208190526040909120600281019390935560ff8616600384015591909101829055610dba9089611569565b505050505050505050565b610dcd61134e565b610dd65f6115ac565b565b335f908152600460208181526040808420815160c081018352815481526001820154938101939093526002810154918301919091526003810154606083015291820154608082015260059091015460a0820152610e34906115fb565b905090565b8060011480610e485750806003145b80610e535750806006145b80610e5e575080600c145b610e9d5760405162461bcd60e51b815260206004820152601060248201526f24b73b30b634b210323ab930ba34b7b760811b60448201526064016104ab565b6001546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303815f875af1158015610ef1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f159190611708565b610f315760405162461bcd60e51b81526004016104ab90611723565b335f9081526004602052604090205415610fa157335f90815260046020526040902054600254610f60916113a7565b600255335f9081526004602081905260409091200154600354610f82916113a7565b600355335f90815260046020526040902054610f9e908361178d565b91505b5f69152d02c7e14af6800000831015610fbc57506001611061565b69152d02c7e14af68000008310158015610fdf57506934f086f3b33b6840000083105b15610fec57506002611061565b6934f086f3b33b68400000831015801561100f57506969e10de76676d080000083105b1561101c57506003611061565b6969e10de76676d0800000831015801561103f575069d3c21bcecceda100000083105b1561104c57506004611061565b69d3c21bcecceda10000008310611061575060055b60018160ff1610158015611079575060058160ff1611155b6110b45760405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103a34b2b960a11b60448201526064016104ab565b5f826001036110c5575060016110f1565b826003036110d5575060026110f1565b826006036110e5575060036110f1565b82600c036110f1575060045b5f60066110ff6001856117d6565b60ff1681548110611112576111126117ef565b905f5260205f20906005020160018361112b91906117d6565b60ff166005811061113e5761113e6117ef565b015490505f6111536127106109428885611548565b6040805160c08101825288815242602082015291925081016111788762278d006117a0565b81526020018560ff1681526020018281526020015f81525060045f336001600160a01b03166001600160a01b031681526020019081526020015f205f820151815f01556020820151816001015560408201518160020155606082015181600301556080820151816004015560a082015181600501559050506111fa3387611569565b600254611207908761155e565b600255600354611217908261155e565b600355505050505050565b61122a61134e565b5f816001600160a01b0316476040515f6040518083038185875af1925050503d805f8114611273576040519150601f19603f3d011682016040523d82523d5f602084013e611278565b606091505b5050905080611285575f80fd5b5050565b61129161134e565b6005805460ff1916911515919091179055565b600682815481106112b3575f80fd5b905f5260205f20906005020181600581106112cc575f80fd5b01549150829050565b6112dd61134e565b6001600160a01b0381166113425760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104ab565b61134b816115ac565b50565b5f546001600160a01b03163314610dd65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104ab565b5f6113b28284611803565b90505b92915050565b335f908152600460208181526040808420815160c0810183528154815260018201549381018490526002820154928101929092526003810154606083015292830154608082015260059092015460a083015262127500929061141e9042906113a7565b60055490915060ff1680156114335750828110155b1561055f5760055460ff166114835760405162461bcd60e51b815260206004820152601660248201527512185c9d995cdd1a5b99c81b9bdd081cdd185c9d195960521b60448201526064016104ab565b5f61148d836115fb565b9050670de0b6b3a7640000600754845f01516114a991906117a0565b6114b391906117b7565b335f8181526004602052604080822060050193909355915183908381818185875af1925050503d805f8114611503576040519150601f19603f3d011682016040523d82523d5f602084013e611508565b606091505b5050905080611515575f80fd5b604051829033907f30a69d4d95828372a8e9e9475c89adc0f7fb0049acbf0a20aeeeb02d85f5fa31905f90a35050505050565b5f6113b282846117a0565b5f6113b282846117b7565b5f6113b2828461178d565b670de0b6b3a76400006007548261158091906117a0565b61158a91906117b7565b6001600160a01b039092165f9081526004602052604090206005019190915550565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f8160a00151670de0b6b3a7640000600754845f015161161b91906117a0565b61162591906117b7565b6113b59190611803565b80356001600160a01b0381168114611645575f80fd5b919050565b5f806040838503121561165b575f80fd5b6116648361162f565b946020939093013593505050565b5f60208284031215611682575f80fd5b6113b28261162f565b5f6020828403121561169b575f80fd5b5035919050565b5f80604083850312156116b3575f80fd5b50508035926020909101359150565b801515811461134b575f80fd5b5f602082840312156116df575f80fd5b81356116ea816116c2565b9392505050565b5f60208284031215611701575f80fd5b5051919050565b5f60208284031215611718575f80fd5b81516116ea816116c2565b6020808252600f908201526e151c985b9cd9995c8819985a5b1959608a1b604082015260600190565b60208082526013908201527227379039ba30b5b4b733903837b9b4ba34b7b760691b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b808201808211156113b5576113b5611779565b80820281158282048414176113b5576113b5611779565b5f826117d157634e487b7160e01b5f52601260045260245ffd5b500490565b60ff82811682821603908111156113b5576113b5611779565b634e487b7160e01b5f52603260045260245ffd5b818103818111156113b5576113b561177956fea2646970667358221220795d944d50da83dd99bf2d3cb79ac8343f402b121f661fd87c965e8c5991419864736f6c63430008140033000000000000000000000000ac7fa7d455fdab8390c4ab9f793520521d266597

Deployed Bytecode

0x608060405260043610610129575f3560e01c8063718b558e116100a85780638da5cb5b1161006d5780638da5cb5b1461032c578063a7b2f10214610348578063b4b87d781461035b578063b7a43ba11461037a578063e73e14bf146103a3578063f2fde38b146103d9575f80fd5b8063718b558e1461028e57806372f702f3146102a25780637b0472f0146102d95780637ca8448a146102f8578063817b1cd214610317575f80fd5b8063372500ab116100ee578063372500ab1461022b5780633ccfd60b1461023f57806359974e38146102535780636213f83514610266578063715018a61461027a575f80fd5b806306b091f9146101345780630db9f53e146101555780630e15561a1461016957806316934fc414610191578063285d333b1461020c575f80fd5b3661013057005b5f80fd5b34801561013f575f80fd5b5061015361014e36600461164a565b6103f8565b005b348015610160575f80fd5b50610153610564565b348015610174575f80fd5b5061017e60035481565b6040519081526020015b60405180910390f35b34801561019c575f80fd5b506101df6101ab366004611672565b600460208190525f918252604090912080546001820154600283015460038401549484015460059094015492949193909286565b604080519687526020870195909552938501929092526060840152608083015260a082015260c001610188565b348015610217575f80fd5b50610153610226366004611672565b610678565b348015610236575f80fd5b506101536106a2565b34801561024a575f80fd5b50610153610797565b61015361026136600461168b565b6109eb565b348015610271575f80fd5b50610153610aac565b348015610285575f80fd5b50610153610dc5565b348015610299575f80fd5b5061017e610dd8565b3480156102ad575f80fd5b506001546102c1906001600160a01b031681565b6040516001600160a01b039091168152602001610188565b3480156102e4575f80fd5b506101536102f33660046116a2565b610e39565b348015610303575f80fd5b50610153610312366004611672565b611222565b348015610322575f80fd5b5061017e60025481565b348015610337575f80fd5b505f546001600160a01b03166102c1565b6101536103563660046116cf565b611289565b348015610366575f80fd5b5061017e6103753660046116a2565b6112a4565b348015610385575f80fd5b506005546103939060ff1681565b6040519015158152602001610188565b3480156103ae575f80fd5b506103936103bd366004611672565b6001600160a01b03165f90815260046020526040902054151590565b3480156103e4575f80fd5b506101536103f3366004611672565b6112d5565b61040061134e565b6040516370a0823160e01b815230600482015282905f906001600160a01b038316906370a0823190602401602060405180830381865afa158015610446573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061046a91906116f1565b116104b45760405162461bcd60e51b81526020600482015260156024820152744e6f20746f6b656e7320746f20776974686472617760581b60448201526064015b60405180910390fd5b806001600160a01b031663a9059cbb6104d45f546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018590526044015b6020604051808303815f875af115801561051f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105439190611708565b61055f5760405162461bcd60e51b81526004016104ab90611723565b505050565b60055460ff166105af5760405162461bcd60e51b815260206004820152601660248201527512185c9d995cdd1a5b99c81b9bdd081cdd185c9d195960521b60448201526064016104ab565b335f908152600460208181526040808420815160c0810183528154815260018201549381018490526002820154928101929092526003810154606083015292830154608082015260059092015460a08301526212750092906106129042906113a7565b9050828110156106705760405162461bcd60e51b8152602060048201526024808201527f4d696e696d756d207374616b696e67206475726174696f6e206e6f742072656160448201526318da195960e21b60648201526084016104ab565b61055f6113bb565b61068061134e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b335f90815260046020526040902080546106ce5760405162461bcd60e51b81526004016104ab9061174c565b600481015460018201545f906106e59042906113a7565b9050826002015481101561073b5760405162461bcd60e51b815260206004820152601e60248201527f5374616b696e67206475726174696f6e206e6f7420636f6d706c65746564000060448201526064016104ab565b60035461074890836113a7565b600355335f818152600460208190526040808320820192909255600154915163a9059cbb60e01b815290810192909252602482018490526001600160a01b03169063a9059cbb90604401610503565b335f90815260046020526040902080546107c35760405162461bcd60e51b81526004016104ab9061174c565b6107cb6113bb565b8054335f9081526004602081905260408220015460018401549091906107f29042906113a7565b60025490915061080290846113a7565b60025560035461081290836113a7565b600355600284015481106108fe57335f81815260046020819052604082208281556001808201849055600282018490556003820184905591810183905560050191909155546001600160a01b03169063a9059cbb90610871868661178d565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af11580156108b9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108dd9190611708565b6108f95760405162461bcd60e51b81526004016104ab90611723565b6109e5565b335f9081526004602081905260408220828155600181018390556002810183905560038101839055908101829055600501819055610948606461094286600a611548565b90611553565b905061095484826113a7565b60015460405163a9059cbb60e01b8152336004820152602481018390529195506001600160a01b03169063a9059cbb906044016020604051808303815f875af11580156109a3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109c79190611708565b6109e35760405162461bcd60e51b81526004016104ab90611723565b505b50505050565b6109f361134e565b803414610a395760405162461bcd60e51b8152602060048201526014602482015273115b9d195c8818dbdc9c9958dd08185b5bdd5b9d60621b60448201526064016104ab565b60025415610a7657600254610a56670de0b6b3a7640000836117a0565b610a6091906117b7565b60075f828254610a70919061178d565b90915550505b6040518181527ff8fad42e780bfa5459be3fe691e8ba1aec70342250112139c5771c3fd155f3129060200160405180910390a150565b335f9081526004602052604090208054610ad85760405162461bcd60e51b81526004016104ab9061174c565b8054600482015460018301545f90610af19042906113a7565b90508360020154811015610b475760405162461bcd60e51b815260206004820152601e60248201527f5374616b696e67206475726174696f6e206e6f7420636f6d706c65746564000060448201526064016104ab565b600254610b5490846113a7565b600255600354610b6490836113a7565b600355610b71838361155e565b92505f8062278d008660020154610b8891906117b7565b905080600103610b9b5760019150610bca565b80600303610bac5760029150610bca565b80600603610bbd5760039150610bca565b80600c03610bca57600491505b5f69152d02c7e14af6800000861015610be557506001610c8a565b69152d02c7e14af68000008610158015610c0857506934f086f3b33b6840000086105b15610c1557506002610c8a565b6934f086f3b33b684000008610158015610c3857506969e10de76676d080000086105b15610c4557506003610c8a565b6969e10de76676d08000008610158015610c68575069d3c21bcecceda100000086105b15610c7557506004610c8a565b69d3c21bcecceda10000008610610c8a575060055b60018160ff1610158015610ca2575060058160ff1611155b610cdd5760405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103a34b2b960a11b60448201526064016104ab565b5f6006610ceb6001846117d6565b60ff1681548110610cfe57610cfe6117ef565b905f5260205f209060050201600185610d1791906117d6565b60ff1660058110610d2a57610d2a6117ef565b015490505f610d3f6127106109428a85611548565b600254909150610d4f908961155e565b600255600354610d5f908261155e565b600355335f90815260046020526040902088815542600190910155610d878462278d006117a0565b335f818152600460208190526040909120600281019390935560ff8616600384015591909101829055610dba9089611569565b505050505050505050565b610dcd61134e565b610dd65f6115ac565b565b335f908152600460208181526040808420815160c081018352815481526001820154938101939093526002810154918301919091526003810154606083015291820154608082015260059091015460a0820152610e34906115fb565b905090565b8060011480610e485750806003145b80610e535750806006145b80610e5e575080600c145b610e9d5760405162461bcd60e51b815260206004820152601060248201526f24b73b30b634b210323ab930ba34b7b760811b60448201526064016104ab565b6001546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303815f875af1158015610ef1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f159190611708565b610f315760405162461bcd60e51b81526004016104ab90611723565b335f9081526004602052604090205415610fa157335f90815260046020526040902054600254610f60916113a7565b600255335f9081526004602081905260409091200154600354610f82916113a7565b600355335f90815260046020526040902054610f9e908361178d565b91505b5f69152d02c7e14af6800000831015610fbc57506001611061565b69152d02c7e14af68000008310158015610fdf57506934f086f3b33b6840000083105b15610fec57506002611061565b6934f086f3b33b68400000831015801561100f57506969e10de76676d080000083105b1561101c57506003611061565b6969e10de76676d0800000831015801561103f575069d3c21bcecceda100000083105b1561104c57506004611061565b69d3c21bcecceda10000008310611061575060055b60018160ff1610158015611079575060058160ff1611155b6110b45760405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103a34b2b960a11b60448201526064016104ab565b5f826001036110c5575060016110f1565b826003036110d5575060026110f1565b826006036110e5575060036110f1565b82600c036110f1575060045b5f60066110ff6001856117d6565b60ff1681548110611112576111126117ef565b905f5260205f20906005020160018361112b91906117d6565b60ff166005811061113e5761113e6117ef565b015490505f6111536127106109428885611548565b6040805160c08101825288815242602082015291925081016111788762278d006117a0565b81526020018560ff1681526020018281526020015f81525060045f336001600160a01b03166001600160a01b031681526020019081526020015f205f820151815f01556020820151816001015560408201518160020155606082015181600301556080820151816004015560a082015181600501559050506111fa3387611569565b600254611207908761155e565b600255600354611217908261155e565b600355505050505050565b61122a61134e565b5f816001600160a01b0316476040515f6040518083038185875af1925050503d805f8114611273576040519150601f19603f3d011682016040523d82523d5f602084013e611278565b606091505b5050905080611285575f80fd5b5050565b61129161134e565b6005805460ff1916911515919091179055565b600682815481106112b3575f80fd5b905f5260205f20906005020181600581106112cc575f80fd5b01549150829050565b6112dd61134e565b6001600160a01b0381166113425760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104ab565b61134b816115ac565b50565b5f546001600160a01b03163314610dd65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104ab565b5f6113b28284611803565b90505b92915050565b335f908152600460208181526040808420815160c0810183528154815260018201549381018490526002820154928101929092526003810154606083015292830154608082015260059092015460a083015262127500929061141e9042906113a7565b60055490915060ff1680156114335750828110155b1561055f5760055460ff166114835760405162461bcd60e51b815260206004820152601660248201527512185c9d995cdd1a5b99c81b9bdd081cdd185c9d195960521b60448201526064016104ab565b5f61148d836115fb565b9050670de0b6b3a7640000600754845f01516114a991906117a0565b6114b391906117b7565b335f8181526004602052604080822060050193909355915183908381818185875af1925050503d805f8114611503576040519150601f19603f3d011682016040523d82523d5f602084013e611508565b606091505b5050905080611515575f80fd5b604051829033907f30a69d4d95828372a8e9e9475c89adc0f7fb0049acbf0a20aeeeb02d85f5fa31905f90a35050505050565b5f6113b282846117a0565b5f6113b282846117b7565b5f6113b2828461178d565b670de0b6b3a76400006007548261158091906117a0565b61158a91906117b7565b6001600160a01b039092165f9081526004602052604090206005019190915550565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f8160a00151670de0b6b3a7640000600754845f015161161b91906117a0565b61162591906117b7565b6113b59190611803565b80356001600160a01b0381168114611645575f80fd5b919050565b5f806040838503121561165b575f80fd5b6116648361162f565b946020939093013593505050565b5f60208284031215611682575f80fd5b6113b28261162f565b5f6020828403121561169b575f80fd5b5035919050565b5f80604083850312156116b3575f80fd5b50508035926020909101359150565b801515811461134b575f80fd5b5f602082840312156116df575f80fd5b81356116ea816116c2565b9392505050565b5f60208284031215611701575f80fd5b5051919050565b5f60208284031215611718575f80fd5b81516116ea816116c2565b6020808252600f908201526e151c985b9cd9995c8819985a5b1959608a1b604082015260600190565b60208082526013908201527227379039ba30b5b4b733903837b9b4ba34b7b760691b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b808201808211156113b5576113b5611779565b80820281158282048414176113b5576113b5611779565b5f826117d157634e487b7160e01b5f52601260045260245ffd5b500490565b60ff82811682821603908111156113b5576113b5611779565b634e487b7160e01b5f52603260045260245ffd5b818103818111156113b5576113b561177956fea2646970667358221220795d944d50da83dd99bf2d3cb79ac8343f402b121f661fd87c965e8c5991419864736f6c63430008140033

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

000000000000000000000000ac7fa7d455fdab8390c4ab9f793520521d266597

-----Decoded View---------------
Arg [0] : _stakingToken (address): 0xAc7Fa7D455fdAB8390C4aB9f793520521d266597

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


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.