Contract 0xD0e9998145dB15bAa04571C47CECA9Ea7Fd70EFD 2

 
 
Txn Hash
Method
Block
From
To
Value
0xe2c5e9b5593669cbef594ef45ee12f6ba15863a9a54499b8cb329199503be10aUpdate Emission ...158978782022-11-04 16:34:4734 days 21 hrs ago0xa55cde11b2932954603ec754ba0385c650df36be IN  0xd0e9998145db15baa04571c47ceca9ea7fd70efd0 Ether0.00136214 18.8521104
0x303f0593e1715bbafef3aa4cbb783d9ceaf87b85c26a7b2280015a1ac002a334Update Emission ...148471802022-05-26 9:22:25197 days 4 hrs ago0xa55cde11b2932954603ec754ba0385c650df36be IN  0xd0e9998145db15baa04571c47ceca9ea7fd70efd0 Ether0.00222933 30.82347895
0x9519e918d7e5ff0a296bcbc41cbe71bb53742fb39e0b49765d1314a9c07c0749Update Emission ...144844632022-03-30 0:52:08254 days 12 hrs ago0xa55cde11b2932954603ec754ba0385c650df36be IN  0xd0e9998145db15baa04571c47ceca9ea7fd70efd0 Ether0.00250927 36.08492319
0xa3039d335d6b63d9e179169e92016d42f24beaefa2b3839d1e56531a5be89aa6Update Emission ...144844592022-03-30 0:51:24254 days 12 hrs ago0xa55cde11b2932954603ec754ba0385c650df36be IN  0xd0e9998145db15baa04571c47ceca9ea7fd70efd0 Ether0.00283385 40.75262587
0xd3dd346fb4ac1fdbc9fdb8457756521305967c5564ec04f7cbadfcc5f22d798fTransfer Ownersh...144844052022-03-30 0:39:13254 days 13 hrs ago0xb2732b32ad1904ad287199a5620d2862f9f8c804 IN  0xd0e9998145db15baa04571c47ceca9ea7fd70efd0 Ether0.00152323 52.4875085
0x9883202f7458c0514614e1149853bd240c2816f783404bc56abbfacb47f12bcaUpdate Emission ...144777242022-03-28 23:48:50255 days 13 hrs ago0xb2732b32ad1904ad287199a5620d2862f9f8c804 IN  0xd0e9998145db15baa04571c47ceca9ea7fd70efd0 Ether0.00456497 51.0407023
0xdda70c3b320245c60bf5ad345550193b0dcb5d8c4ff5f26905d073cd81b70830Income144777192022-03-28 23:47:41255 days 13 hrs ago0xb2732b32ad1904ad287199a5620d2862f9f8c804 IN  0xd0e9998145db15baa04571c47ceca9ea7fd70efd0 Ether0.0057016 46.36165634
0xf9fa29b9fadd971c819d9bae38f41280b018fbb9d78d4db7ec1cb6c7330bc7cfRegister Stakes144766682022-03-28 19:59:10255 days 17 hrs ago0xb2732b32ad1904ad287199a5620d2862f9f8c804 IN  0xd0e9998145db15baa04571c47ceca9ea7fd70efd0 Ether0.10744964 69.11580927
0xc13849866447e503d3b0557049139a5213b8a21df831c715c403d636a5b48aeeUpdate Handler144766432022-03-28 19:53:31255 days 17 hrs ago0xb2732b32ad1904ad287199a5620d2862f9f8c804 IN  0xd0e9998145db15baa04571c47ceca9ea7fd70efd0 Ether0.003356 72.31985491
0x0a13f38469588ef5352ad27205bfcf6c0c43434c1e98b88019315c9e0cf03ed40x60806040144765942022-03-28 19:43:32255 days 17 hrs ago0xb2732b32ad1904ad287199a5620d2862f9f8c804 IN  Create: SwapRewardsChef0 Ether0.25671457 70.74460898
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SwapRewardsChef

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
No with 200 runs

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

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

interface IUniswapV2Router01 {
    function factory() external pure returns (address);

    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);

    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);

    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);

    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);

    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);

    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);

    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);

    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
    external
    payable
    returns (uint[] memory amounts);

    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
    external
    returns (uint[] memory amounts);

    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
    external
    returns (uint[] memory amounts);

    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
    external
    payable
    returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);

    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);

    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);

    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);

    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);

    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}


interface IWrappedNative is IERC20 {
    function deposit() external payable;

    function withdraw(uint256 wad) external;
}

contract SwapRewardsChef is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // Info of each user.
    struct UserInfo {
        uint256 amount;
        uint256 rewardDebt;
    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken; // Address of LP token contract.
        uint256 allocPoint; // How many allocation points assigned to this pool.
        uint256 lastRewardBlock; // Last block number that reward distribution occurs.
        uint256 accRewardPerShare; // Accumulated reward per share, times 1e18. See below.
        uint256 currentDepositAmount; // Current total deposit amount in this pool
    }

    address public wrappedNativeAddress;

    // The reward token
    IERC20 public rewardToken;
    // Reward tokens created per block.
    uint256 public rewardsPerBlock;

    // Emission Settings
    uint256 public denominationEmitAmount; //Blocks
    uint256 public minimumEmitAmount = 0; //Min Output Per Block
    uint256 public maximumEmitAmount = 1 ether; //Max Output Per Block

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping(address => UserInfo) public userInfo;
    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when mining starts.
    uint256 public startBlock;

    uint256 public remainingRewards = 0;

    // router
    IUniswapV2Router02 public router;

    // handler
    address public handler;

    event Harvest(address indexed user, uint256 amount);
    event Deposit(address indexed user, uint256 amount);
    event Withdraw(address indexed user, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 amount);
    event UpdateEmissionSettings(
        address indexed user,
        uint256 denomination,
        uint256 minimum,
        uint256 maximum,
        uint256 rewardsPerBlock
    );
    event RescueTokens(
        address indexed user,
        address indexed token,
        uint256 amount
    );
    event RegisterMovedStakers();

    constructor(
        address _stakeToken, // Token staked (e.g eterna)
        address _rewardToken, // Token distributed to the user
        address _router, // router
        uint256 _denominationEmitAmount // How many blocks should the rewards last?
    ) public {
        rewardToken = IERC20(_rewardToken);

        poolInfo.push(
            PoolInfo({
        lpToken : IERC20(_stakeToken),
        allocPoint : 100,
        lastRewardBlock : startBlock,
        accRewardPerShare : 0,
        currentDepositAmount : 0
        })
        );

        router = IUniswapV2Router02(_router);
        wrappedNativeAddress = router.WETH();
        denominationEmitAmount = _denominationEmitAmount;
        totalAllocPoint = 100;
    }

    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to)
    private
    pure
    returns (uint256)
    {
        return _to.sub(_from);
    }

    // View function to see pending rewards on frontend.
    function pendingRewards(address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[0];
        UserInfo storage user = userInfo[_user];
        uint256 accRewardPerShare = pool.accRewardPerShare;
        uint256 lpSupply = pool.currentDepositAmount;
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            //calculate total rewards based on remaining funds
            if (remainingRewards > 0) {
                uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
                uint256 totalRewards = multiplier
                .mul(rewardsPerBlock)
                .mul(pool.allocPoint)
                .div(totalAllocPoint);
                totalRewards = Math.min(totalRewards, remainingRewards);
                accRewardPerShare = accRewardPerShare.add(
                    totalRewards.mul(1e18).div(lpSupply)
                );
            }
        }
        return user.amount.mul(accRewardPerShare).div(1e18).sub(user.rewardDebt);
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool() public {
        PoolInfo storage pool = poolInfo[0];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.currentDepositAmount;
        if (lpSupply == 0 || pool.allocPoint == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }

        if (remainingRewards == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }

        //calculate total rewards based on remaining funds
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 totalRewards = multiplier
        .mul(rewardsPerBlock)
        .mul(pool.allocPoint)
        .div(totalAllocPoint);
        totalRewards = Math.min(totalRewards, remainingRewards);
        remainingRewards = remainingRewards.sub(totalRewards);
        pool.accRewardPerShare = pool.accRewardPerShare.add(
            totalRewards.mul(1e18).div(lpSupply)
        );
        pool.lastRewardBlock = block.number;
    }

    function income(uint256 _amount) external nonReentrant {
        updatePool();
        uint256 before = rewardToken.balanceOf(address(this));
        rewardToken.safeTransferFrom(msg.sender, address(this), _amount);
        _amount = rewardToken.balanceOf(address(this)).sub(before);
        remainingRewards = remainingRewards.add(_amount);
        updateEmissionRate();
    }

    function updateEmissionRate() private {
        if (remainingRewards > 0) {
            rewardsPerBlock = remainingRewards.div(denominationEmitAmount);
            rewardsPerBlock = Math.min(maximumEmitAmount, rewardsPerBlock);
            rewardsPerBlock = Math.max(minimumEmitAmount, rewardsPerBlock);
        } else {
            rewardsPerBlock = 0;
        }
    }

    // Deposit LP tokens to Chef
    function deposit(uint256 _amount) public nonReentrant {
        require(msg.sender == handler);
        PoolInfo storage pool = poolInfo[0];
        UserInfo storage user = userInfo[msg.sender];
        updatePool();
        if (user.amount > 0) {
            uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e18).sub(
                user.rewardDebt
            );
            if (pending > 0) {
                safeRewardTransfer(msg.sender, pending, (msg.sender == handler));
                emit Harvest(msg.sender, pending);
            }
        }
        if (_amount > 0) {
            // We add checks for fee tokens
            uint256 before = pool.lpToken.balanceOf(address(this));
            pool.lpToken.safeTransferFrom(msg.sender, address(this), _amount);
            _amount = pool.lpToken.balanceOf(address(this)).sub(before);
            user.amount = user.amount.add(_amount);
            pool.currentDepositAmount = pool.currentDepositAmount.add(_amount);
        }
        user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e18);
        emit Deposit(msg.sender, _amount);
    }

    // Withdraw LP tokens from Chef.
    function withdraw(uint256 _amount) public nonReentrant {
        PoolInfo storage pool = poolInfo[0];
        UserInfo storage user = userInfo[msg.sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool();
        uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e18).sub(
            user.rewardDebt
        );
        if (pending > 0) {
            safeRewardTransfer(msg.sender, pending, (msg.sender == handler));
            emit Harvest(msg.sender, pending);
        }
        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            pool.currentDepositAmount = pool.currentDepositAmount.sub(_amount);
            pool.lpToken.safeTransfer(msg.sender, _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e18);
        emit Withdraw(msg.sender, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw() public nonReentrant {
        PoolInfo storage pool = poolInfo[0];
        UserInfo storage user = userInfo[msg.sender];
        uint256 amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        pool.currentDepositAmount = pool.currentDepositAmount.sub(amount);
        pool.lpToken.safeTransfer(msg.sender, amount);
        emit EmergencyWithdraw(msg.sender, amount);
    }

    struct Stake {
        address user;
        uint256 amount;
    }

    function registerStakes(Stake[] memory _array, uint256 _sumAmount) external onlyOwner {
        PoolInfo storage pool = poolInfo[0];
        for (uint i = 0; i < _array.length; i++) {
            UserInfo memory user;
            user.amount = user.amount.add(_array[i].amount);
            userInfo[_array[i].user] = user;
        }
        pool.currentDepositAmount = pool.currentDepositAmount.add(_sumAmount);
        emit RegisterMovedStakers();
    }

    // Safe rewards transfer function, just in case if rounding error causes pool to not have enough tokens.    // Safe rewards transfer function, just in case if rounding error causes pool to not have enough tokens.
    function safeRewardTransfer(
        address _to,
        uint256 _amount,
        bool _convert
    ) internal {
        PoolInfo memory pool = poolInfo[0];
        if (address(rewardToken) == wrappedNativeAddress) {
            uint256 balance = rewardToken.balanceOf(address(this));
            uint256 transferAmount = Math.min(balance, _amount);

            if (_convert) {
                rewardToken.transfer(_to, transferAmount);
            } else {
                // We swap and send the result
                address[] memory path;
                path[0] = address(rewardToken);
                path[1] = address(pool.lpToken);

                router.swapExactTokensForTokensSupportingFeeOnTransferTokens(
                    transferAmount,
                    0,
                    path,
                    _to,
                    block.timestamp + 60
                );
            }
        } else if (address(rewardToken) == address(pool.lpToken)) {
            // Add a check to prevent stealing from users'funds to pay the rewards
            uint256 balance = rewardToken.balanceOf(address(this)) >
            pool.currentDepositAmount
            ? rewardToken.balanceOf(address(this)) - pool.currentDepositAmount
            : 0;
            uint256 transferAmount = Math.min(balance, _amount);
            rewardToken.transfer(_to, transferAmount);
        } else {
            uint256 balance = rewardToken.balanceOf(address(this));
            uint256 transferAmount = Math.min(balance, _amount);
            if (_convert) {
                rewardToken.transfer(_to, transferAmount);
                // We swap and send the result
                address[] memory path;
                path[0] = address(rewardToken);
                path[1] = wrappedNativeAddress;
                path[2] = address(pool.lpToken);

                router.swapExactTokensForTokensSupportingFeeOnTransferTokens(
                    transferAmount,
                    0,
                    path,
                    _to,
                    block.timestamp + 60
                );
            } else {
                rewardToken.transfer(_to, transferAmount);
            }
        }
    }

    //For unwrapping native tokens
    receive() external payable {}

    function safeTransferETH(address to, uint256 value) internal {
        (bool success,) = to.call{value : value}(new bytes(0));
        require(success, "safeTransferETH: ETH_TRANSFER_FAILED");
    }

    function updateEmissionSettings(
        uint256 denomination,
        uint256 minimum,
        uint256 maximum
    ) external onlyOwner {
        updatePool();
        denominationEmitAmount = denomination;
        minimumEmitAmount = minimum;
        maximumEmitAmount = maximum;
        updateEmissionRate();

        emit UpdateEmissionSettings(
            msg.sender,
            denomination,
            minimum,
            maximum,
            rewardsPerBlock
        );
    }

    function rescueToken(address token, address addressForReceive, uint amount)
    external
    onlyOwner
    {
        IERC20(token).safeTransfer(addressForReceive, amount);
        emit RescueTokens(msg.sender, token, amount);
    }

    function updateHandler(address _handler) external onlyOwner {
        handler = _handler;
    }

}

File 2 of 9 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 substraction 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 3 of 9 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a / b + (a % b == 0 ? 0 : 1);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 6 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_stakeToken","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_router","type":"address"},{"internalType":"uint256","name":"_denominationEmitAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Harvest","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":[],"name":"RegisterMovedStakers","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RescueTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"denomination","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minimum","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maximum","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardsPerBlock","type":"uint256"}],"name":"UpdateEmissionSettings","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"denominationEmitAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"handler","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"income","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maximumEmitAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumEmitAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accRewardPerShare","type":"uint256"},{"internalType":"uint256","name":"currentDepositAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct SwapRewardsChef.Stake[]","name":"_array","type":"tuple[]"},{"internalType":"uint256","name":"_sumAmount","type":"uint256"}],"name":"registerStakes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"remainingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"addressForReceive","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"denomination","type":"uint256"},{"internalType":"uint256","name":"minimum","type":"uint256"},{"internalType":"uint256","name":"maximum","type":"uint256"}],"name":"updateEmissionSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_handler","type":"address"}],"name":"updateHandler","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrappedNativeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526000600655670de0b6b3a76400006007556000600a556000600c553480156200002c57600080fd5b50604051620040b7380380620040b78339818101604052810190620000529190620003fc565b6200007262000066620002d660201b60201c565b620002de60201b60201c565b6001808190555082600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060086040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff16815260200160648152602001600b548152602001600081526020016000815250908060018154018082558091505060019003906000526020600020906005020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155604082015181600201556060820151816003015560808201518160040155505081600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156200024257600080fd5b505afa15801562000257573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200027d9190620003d0565b600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806005819055506064600a8190555050505050620004da565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620003b381620004a6565b92915050565b600081519050620003ca81620004c0565b92915050565b600060208284031215620003e357600080fd5b6000620003f384828501620003a2565b91505092915050565b600080600080608085870312156200041357600080fd5b60006200042387828801620003a2565b94505060206200043687828801620003a2565b93505060406200044987828801620003a2565b92505060606200045c87828801620003b9565b91505092959194509250565b600062000475826200047c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b620004b18162000468565b8114620004bd57600080fd5b50565b620004cb816200049c565b8114620004d757600080fd5b50565b613bcd80620004ea6000396000f3fe6080604052600436106101855760003560e01c8063afb62e56116100d1578063dd5998441161008a578063eebf65f311610064578063eebf65f314610536578063f2fde38b1461055f578063f7c618c114610588578063f887ea40146105b35761018c565b8063dd599844146104cb578063e3161ddd146104f6578063e5711e8b1461050d5761018c565b8063afb62e56146103e3578063b6b55f251461040e578063c80916d414610437578063cd2a6e2f14610462578063d597f8511461048b578063db2e21bc146104b45761018c565b806348cd4cb11161013e57806376ab81361161011857806376ab81361461033957806384ed8c56146103645780638b1c0d1b1461038d5780638da5cb5b146103b85761018c565b806348cd4cb1146102cc5780635eeb6710146102f7578063715018a6146103225761018c565b80631526fe271461019157806317caf6f1146101d25780631959a002146101fd5780632e1a7d4d1461023b57806331d7a2621461026457806346f0cfba146102a15761018c565b3661018c57005b600080fd5b34801561019d57600080fd5b506101b860048036038101906101b391906130ac565b6105de565b6040516101c9959493929190613566565b60405180910390f35b3480156101de57600080fd5b506101e7610644565b6040516101f491906136d6565b60405180910390f35b34801561020957600080fd5b50610224600480360381019061021f9190612fb7565b61064a565b60405161023292919061374b565b60405180910390f35b34801561024757600080fd5b50610262600480360381019061025d91906130ac565b61066e565b005b34801561027057600080fd5b5061028b60048036038101906102869190612fb7565b6109cc565b60405161029891906136d6565b60405180910390f35b3480156102ad57600080fd5b506102b6610b8d565b6040516102c391906136d6565b60405180910390f35b3480156102d857600080fd5b506102e1610b93565b6040516102ee91906136d6565b60405180910390f35b34801561030357600080fd5b5061030c610b99565b60405161031991906136d6565b60405180910390f35b34801561032e57600080fd5b50610337610b9f565b005b34801561034557600080fd5b5061034e610c27565b60405161035b91906134d0565b60405180910390f35b34801561037057600080fd5b5061038b600480360381019061038691906130ac565b610c4d565b005b34801561039957600080fd5b506103a2610e8e565b6040516103af91906136d6565b60405180910390f35b3480156103c457600080fd5b506103cd610e94565b6040516103da91906134d0565b60405180910390f35b3480156103ef57600080fd5b506103f8610ebd565b60405161040591906136d6565b60405180910390f35b34801561041a57600080fd5b50610435600480360381019061043091906130ac565b610ec3565b005b34801561044357600080fd5b5061044c6113b7565b60405161045991906134d0565b60405180910390f35b34801561046e57600080fd5b506104896004803603810190610484919061302f565b6113dd565b005b34801561049757600080fd5b506104b260048036038101906104ad9190612fb7565b61161e565b005b3480156104c057600080fd5b506104c96116de565b005b3480156104d757600080fd5b506104e06118a1565b6040516104ed91906136d6565b60405180910390f35b34801561050257600080fd5b5061050b6118a7565b005b34801561051957600080fd5b50610534600480360381019061052f9190612fe0565b611a2a565b005b34801561054257600080fd5b5061055d600480360381019061055891906130fe565b611b3b565b005b34801561056b57600080fd5b5061058660048036038101906105819190612fb7565b611c37565b005b34801561059457600080fd5b5061059d611d2f565b6040516105aa919061354b565b60405180910390f35b3480156105bf57600080fd5b506105c8611d55565b6040516105d591906135b9565b60405180910390f35b600881815481106105ee57600080fd5b90600052602060002090600502016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154908060020154908060030154908060040154905085565b600a5481565b60096020528060005260406000206000915090508060000154908060010154905082565b600260015414156106b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ab906136b6565b60405180910390fd5b6002600181905550600060086000815481106106f9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906005020190506000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508281600001541015610793576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078a90613676565b60405180910390fd5b61079b6118a7565b60006107e882600101546107da670de0b6b3a76400006107cc87600301548760000154611d7b90919063ffffffff16565b611d9190919063ffffffff16565b611da790919063ffffffff16565b9050600081111561089d5761084e3382600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611dbd565b3373ffffffffffffffffffffffffffffffffffffffff167fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba8260405161089491906136d6565b60405180910390a25b6000841115610934576108bd848360000154611da790919063ffffffff16565b82600001819055506108dc848460040154611da790919063ffffffff16565b836004018190555061093333858560000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166129599092919063ffffffff16565b5b610969670de0b6b3a764000061095b85600301548560000154611d7b90919063ffffffff16565b611d9190919063ffffffff16565b82600101819055503373ffffffffffffffffffffffffffffffffffffffff167f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364856040516109b791906136d6565b60405180910390a25050506001808190555050565b6000806008600081548110610a0a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906005020190506000600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600082600301549050600083600401549050836002015443118015610a83575060008114155b15610b3b576000600c541115610b3a576000610aa38560020154436129df565b90506000610ae6600a54610ad88860010154610aca60045487611d7b90919063ffffffff16565b611d7b90919063ffffffff16565b611d9190919063ffffffff16565b9050610af481600c546129fc565b9050610b35610b2684610b18670de0b6b3a764000085611d7b90919063ffffffff16565b611d9190919063ffffffff16565b85612a1590919063ffffffff16565b935050505b5b610b828360010154610b74670de0b6b3a7640000610b66868860000154611d7b90919063ffffffff16565b611d9190919063ffffffff16565b611da790919063ffffffff16565b945050505050919050565b60055481565b600b5481565b60045481565b610ba7612a2b565b73ffffffffffffffffffffffffffffffffffffffff16610bc5610e94565b73ffffffffffffffffffffffffffffffffffffffff1614610c1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1290613636565b60405180910390fd5b610c256000612a33565b565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026001541415610c93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8a906136b6565b60405180910390fd5b6002600181905550610ca36118a7565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610d0091906134d0565b60206040518083038186803b158015610d1857600080fd5b505afa158015610d2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5091906130d5565b9050610da1333084600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612af7909392919063ffffffff16565b610e5e81600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610e0091906134d0565b60206040518083038186803b158015610e1857600080fd5b505afa158015610e2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5091906130d5565b611da790919063ffffffff16565b9150610e7582600c54612a1590919063ffffffff16565b600c81905550610e83612b80565b506001808190555050565b60075481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600c5481565b60026001541415610f09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f00906136b6565b60405180910390fd5b6002600181905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f6b57600080fd5b60006008600081548110610fa8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906005020190506000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506110036118a7565b60008160000154111561111457600061105d826001015461104f670de0b6b3a764000061104187600301548760000154611d7b90919063ffffffff16565b611d9190919063ffffffff16565b611da790919063ffffffff16565b90506000811115611112576110c33382600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611dbd565b3373ffffffffffffffffffffffffffffffffffffffff167fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba8260405161110991906136d6565b60405180910390a25b505b60008311156113205760008260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161117c91906134d0565b60206040518083038186803b15801561119457600080fd5b505afa1580156111a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111cc91906130d5565b905061121f3330868660000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612af7909392919063ffffffff16565b6112de818460000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161128091906134d0565b60206040518083038186803b15801561129857600080fd5b505afa1580156112ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d091906130d5565b611da790919063ffffffff16565b93506112f7848360000154612a1590919063ffffffff16565b8260000181905550611316848460040154612a1590919063ffffffff16565b8360040181905550505b611355670de0b6b3a764000061134784600301548460000154611d7b90919063ffffffff16565b611d9190919063ffffffff16565b81600101819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c846040516113a391906136d6565b60405180910390a250506001808190555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6113e5612a2b565b73ffffffffffffffffffffffffffffffffffffffff16611403610e94565b73ffffffffffffffffffffffffffffffffffffffff1614611459576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145090613636565b60405180910390fd5b60006008600081548110611496577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000209060050201905060005b83518110156115cd576114ba612e67565b6115158583815181106114f6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001518260000151612a1590919063ffffffff16565b816000018181525050806009600087858151811061155c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000155602082015181600101559050505080806115c590613a6b565b9150506114a9565b506115e5828260040154612a1590919063ffffffff16565b81600401819055507f3dbbd449246806f46be1d3e64bf2a194e63acfb35113c6d51eeaead57e23d14a60405160405180910390a1505050565b611626612a2b565b73ffffffffffffffffffffffffffffffffffffffff16611644610e94565b73ffffffffffffffffffffffffffffffffffffffff161461169a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161169190613636565b60405180910390fd5b80600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60026001541415611724576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161171b906136b6565b60405180910390fd5b600260018190555060006008600081548110611769577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b906000526020600020906005020190506000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060008160000154905060008260000181905550600082600101819055506117f0818460040154611da790919063ffffffff16565b836004018190555061184733828560000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166129599092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd96958260405161188d91906136d6565b60405180910390a250505060018081905550565b60065481565b600060086000815481106118e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600502019050806002015443116119055750611a28565b6000816004015490506000811480611921575060008260010154145b15611936574382600201819055505050611a28565b6000600c541415611951574382600201819055505050611a28565b60006119618360020154436129df565b905060006119a4600a54611996866001015461198860045487611d7b90919063ffffffff16565b611d7b90919063ffffffff16565b611d9190919063ffffffff16565b90506119b281600c546129fc565b90506119c981600c54611da790919063ffffffff16565b600c81905550611a126119ff846119f1670de0b6b3a764000085611d7b90919063ffffffff16565b611d9190919063ffffffff16565b8560030154612a1590919063ffffffff16565b8460030181905550438460020181905550505050505b565b611a32612a2b565b73ffffffffffffffffffffffffffffffffffffffff16611a50610e94565b73ffffffffffffffffffffffffffffffffffffffff1614611aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9d90613636565b60405180910390fd5b611ad182828573ffffffffffffffffffffffffffffffffffffffff166129599092919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f0de377c3f3362540c047602ad996510f81ec5d84f9ad151c7b6ebecce8ea6b7b83604051611b2e91906136d6565b60405180910390a3505050565b611b43612a2b565b73ffffffffffffffffffffffffffffffffffffffff16611b61610e94565b73ffffffffffffffffffffffffffffffffffffffff1614611bb7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bae90613636565b60405180910390fd5b611bbf6118a7565b826005819055508160068190555080600781905550611bdc612b80565b3373ffffffffffffffffffffffffffffffffffffffff167fa2ccc6b6183e466f6e7b59cc83e6a4a0fd8a4adab25b95ac0fcb805b963ea0f3848484600454604051611c2a9493929190613774565b60405180910390a2505050565b611c3f612a2b565b73ffffffffffffffffffffffffffffffffffffffff16611c5d610e94565b73ffffffffffffffffffffffffffffffffffffffff1614611cb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611caa90613636565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611d23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d1a906135f6565b60405180910390fd5b611d2c81612a33565b50565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008183611d899190613908565b905092915050565b60008183611d9f91906138d7565b905092915050565b60008183611db59190613962565b905092915050565b60006008600081548110611dfa577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600502016040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820154815260200160028201548152602001600382015481526020016004820154815250509050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415612240576000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611f6891906134d0565b60206040518083038186803b158015611f8057600080fd5b505afa158015611f94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fb891906130d5565b90506000611fc682866129fc565b9050831561208357600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87836040518363ffffffff1660e01b815260040161202b929190613522565b602060405180830381600087803b15801561204557600080fd5b505af1158015612059573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061207d9190613083565b50612239565b6060600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16816000815181106120e2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083600001518160018151811061215b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c11d795836000848b603c426121e59190613881565b6040518663ffffffff1660e01b81526004016122059594939291906136f1565b600060405180830381600087803b15801561221f57600080fd5b505af1158015612233573d6000803e3d6000fd5b50505050505b5050612953565b806000015173ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156124da5760008160800151600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016122fc91906134d0565b60206040518083038186803b15801561231457600080fd5b505afa158015612328573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061234c91906130d5565b11612358576000612413565b8160800151600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016123b891906134d0565b60206040518083038186803b1580156123d057600080fd5b505afa1580156123e4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240891906130d5565b6124129190613962565b5b9050600061242182866129fc565b9050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87836040518363ffffffff1660e01b8152600401612480929190613522565b602060405180830381600087803b15801561249a57600080fd5b505af11580156124ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124d29190613083565b505050612952565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161253791906134d0565b60206040518083038186803b15801561254f57600080fd5b505afa158015612563573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061258791906130d5565b9050600061259582866129fc565b9050831561289e57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87836040518363ffffffff1660e01b81526004016125fa929190613522565b602060405180830381600087803b15801561261457600080fd5b505af1158015612628573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061264c9190613083565b506060600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16816000815181106126ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110612743577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508360000151816002815181106127bc577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c11d795836000848b603c426128469190613881565b6040518663ffffffff1660e01b81526004016128669594939291906136f1565b600060405180830381600087803b15801561288057600080fd5b505af1158015612894573d6000803e3d6000fd5b505050505061294f565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb87836040518363ffffffff1660e01b81526004016128fb929190613522565b602060405180830381600087803b15801561291557600080fd5b505af1158015612929573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061294d9190613083565b505b50505b5b50505050565b6129da8363a9059cbb60e01b8484604051602401612978929190613522565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612be0565b505050565b60006129f48383611da790919063ffffffff16565b905092915050565b6000818310612a0b5781612a0d565b825b905092915050565b60008183612a239190613881565b905092915050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612b7a846323b872dd60e01b858585604051602401612b18939291906134eb565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612be0565b50505050565b6000600c541115612bd557612ba2600554600c54611d9190919063ffffffff16565b600481905550612bb66007546004546129fc565b600481905550612bca600654600454612ca7565b600481905550612bde565b60006004819055505b565b6000612c42826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612cc19092919063ffffffff16565b9050600081511115612ca25780806020019051810190612c629190613083565b612ca1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c9890613696565b60405180910390fd5b5b505050565b600081831015612cb75781612cb9565b825b905092915050565b6060612cd08484600085612cd9565b90509392505050565b606082471015612d1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d1590613616565b60405180910390fd5b612d2785612ded565b612d66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d5d90613656565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612d8f91906134b9565b60006040518083038185875af1925050503d8060008114612dcc576040519150601f19603f3d011682016040523d82523d6000602084013e612dd1565b606091505b5091509150612de1828286612e00565b92505050949350505050565b600080823b905060008111915050919050565b60608315612e1057829050612e60565b600083511115612e235782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e5791906135d4565b60405180910390fd5b9392505050565b604051806040016040528060008152602001600081525090565b6000612e94612e8f846137ea565b6137b9565b90508083825260208201905082856040860282011115612eb357600080fd5b60005b85811015612ee35781612ec98882612f41565b845260208401935060408301925050600181019050612eb6565b5050509392505050565b600081359050612efc81613b52565b92915050565b600082601f830112612f1357600080fd5b8135612f23848260208601612e81565b91505092915050565b600081519050612f3b81613b69565b92915050565b600060408284031215612f5357600080fd5b612f5d60406137b9565b90506000612f6d84828501612eed565b6000830152506020612f8184828501612f8d565b60208301525092915050565b600081359050612f9c81613b80565b92915050565b600081519050612fb181613b80565b92915050565b600060208284031215612fc957600080fd5b6000612fd784828501612eed565b91505092915050565b600080600060608486031215612ff557600080fd5b600061300386828701612eed565b935050602061301486828701612eed565b925050604061302586828701612f8d565b9150509250925092565b6000806040838503121561304257600080fd5b600083013567ffffffffffffffff81111561305c57600080fd5b61306885828601612f02565b925050602061307985828601612f8d565b9150509250929050565b60006020828403121561309557600080fd5b60006130a384828501612f2c565b91505092915050565b6000602082840312156130be57600080fd5b60006130cc84828501612f8d565b91505092915050565b6000602082840312156130e757600080fd5b60006130f584828501612fa2565b91505092915050565b60008060006060848603121561311357600080fd5b600061312186828701612f8d565b935050602061313286828701612f8d565b925050604061314386828701612f8d565b9150509250925092565b60006131598383613165565b60208301905092915050565b61316e81613996565b82525050565b61317d81613996565b82525050565b600061318e82613826565b6131988185613854565b93506131a383613816565b8060005b838110156131d45781516131bb888261314d565b97506131c683613847565b9250506001810190506131a7565b5085935050505092915050565b60006131ec82613831565b6131f68185613865565b9350613206818560208601613a38565b80840191505092915050565b61321b816139de565b82525050565b61322a81613a02565b82525050565b61323981613a26565b82525050565b600061324a8261383c565b6132548185613870565b9350613264818560208601613a38565b61326d81613b41565b840191505092915050565b6000613285602683613870565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006132eb602683613870565b91507f416464726573733a20696e73756666696369656e742062616c616e636520666f60008301527f722063616c6c00000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613351602083613870565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b6000613391601d83613870565b91507f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006000830152602082019050919050565b60006133d1601283613870565b91507f77697468647261773a206e6f7420676f6f6400000000000000000000000000006000830152602082019050919050565b6000613411602a83613870565b91507f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008301527f6f742073756363656564000000000000000000000000000000000000000000006020830152604082019050919050565b6000613477601f83613870565b91507f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006000830152602082019050919050565b6134b3816139d4565b82525050565b60006134c582846131e1565b915081905092915050565b60006020820190506134e56000830184613174565b92915050565b60006060820190506135006000830186613174565b61350d6020830185613174565b61351a60408301846134aa565b949350505050565b60006040820190506135376000830185613174565b61354460208301846134aa565b9392505050565b60006020820190506135606000830184613212565b92915050565b600060a08201905061357b6000830188613212565b61358860208301876134aa565b61359560408301866134aa565b6135a260608301856134aa565b6135af60808301846134aa565b9695505050505050565b60006020820190506135ce6000830184613221565b92915050565b600060208201905081810360008301526135ee818461323f565b905092915050565b6000602082019050818103600083015261360f81613278565b9050919050565b6000602082019050818103600083015261362f816132de565b9050919050565b6000602082019050818103600083015261364f81613344565b9050919050565b6000602082019050818103600083015261366f81613384565b9050919050565b6000602082019050818103600083015261368f816133c4565b9050919050565b600060208201905081810360008301526136af81613404565b9050919050565b600060208201905081810360008301526136cf8161346a565b9050919050565b60006020820190506136eb60008301846134aa565b92915050565b600060a08201905061370660008301886134aa565b6137136020830187613230565b81810360408301526137258186613183565b90506137346060830185613174565b61374160808301846134aa565b9695505050505050565b600060408201905061376060008301856134aa565b61376d60208301846134aa565b9392505050565b600060808201905061378960008301876134aa565b61379660208301866134aa565b6137a360408301856134aa565b6137b060608301846134aa565b95945050505050565b6000604051905081810181811067ffffffffffffffff821117156137e0576137df613b12565b5b8060405250919050565b600067ffffffffffffffff82111561380557613804613b12565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061388c826139d4565b9150613897836139d4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156138cc576138cb613ab4565b5b828201905092915050565b60006138e2826139d4565b91506138ed836139d4565b9250826138fd576138fc613ae3565b5b828204905092915050565b6000613913826139d4565b915061391e836139d4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561395757613956613ab4565b5b828202905092915050565b600061396d826139d4565b9150613978836139d4565b92508282101561398b5761398a613ab4565b5b828203905092915050565b60006139a1826139b4565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006139e9826139f0565b9050919050565b60006139fb826139b4565b9050919050565b6000613a0d82613a14565b9050919050565b6000613a1f826139b4565b9050919050565b6000613a31826139d4565b9050919050565b60005b83811015613a56578082015181840152602081019050613a3b565b83811115613a65576000848401525b50505050565b6000613a76826139d4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613aa957613aa8613ab4565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b613b5b81613996565b8114613b6657600080fd5b50565b613b72816139a8565b8114613b7d57600080fd5b50565b613b89816139d4565b8114613b9457600080fd5b5056fea2646970667358221220c0c77f6d04358b02fbedab86e7ac3afc68bebad1f2e1d3369e5bc6f3f6cd8f2d64736f6c63430008000033000000000000000000000000e1747a23c44f445062078e3c528c9f4c28c50a51000000000000000000000000e1747a23c44f445062078e3c528c9f4c28c50a510000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d0000000000000000000000000000000000000000000000000000000000278d00

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

000000000000000000000000e1747a23c44f445062078e3c528c9f4c28c50a51000000000000000000000000e1747a23c44f445062078e3c528c9f4c28c50a510000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d0000000000000000000000000000000000000000000000000000000000278d00

-----Decoded View---------------
Arg [0] : _stakeToken (address): 0xe1747a23C44f445062078e3C528c9F4c28C50a51
Arg [1] : _rewardToken (address): 0xe1747a23C44f445062078e3C528c9F4c28C50a51
Arg [2] : _router (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
Arg [3] : _denominationEmitAmount (uint256): 2592000

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000e1747a23c44f445062078e3c528c9f4c28c50a51
Arg [1] : 000000000000000000000000e1747a23c44f445062078e3c528c9f4c28c50a51
Arg [2] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [3] : 0000000000000000000000000000000000000000000000000000000000278d00


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

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.