Contract 0x9F7968de728aC7A6769141F63dCA03FD8b03A76F

 

Contract Overview

Balance:
142.956609376272538526 ETH

ETH Value:
$252,994.60 (@ $1,769.73/ETH)

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x3080e949f0c41eea04bcf85f3e2524581d3cbffd22169319ba25666d6151b5bdExit128648422022-05-24 14:31:473 days 20 hrs ago0xec3d3b8c12ff13854d11a5d105f678fa4b2f80d9 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000092214141 ETH
0x33baf65d0f02c771218e713a221438b2bab7e0f2671bcc7e0e26de28ac821152Exit120182142022-05-14 2:58:5114 days 8 hrs ago0x9bc0fedaf9a14f486eb3d2ca5f237ad8bb6caaa0 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000302625312 ETH
0x455eb242223ac8f529d036ddbf50189f907cf1f1c996548c81cd527b1c2473f8Exit115306112022-05-08 19:02:1919 days 16 hrs ago0x4c728e555e647214d834e4eba37844424c0b7efd IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000140519293 ETH
0x230ea441cbae17ae620188e443687959771e0e50724436e3621fad6f995766f6Exit112715582022-05-05 18:55:3722 days 16 hrs ago0x9e4d89a094420737df08b7a7c188bb859e23761d IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000283832234 ETH
0x92880c95a6e3717d69f499dba1b62e850dd147a72e312096ac3632f466dea6d0Exit109957852022-05-02 0:37:0626 days 10 hrs ago0x3c30765cae26cc563411e08f3084387bdd557e74 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000460581541 ETH
0x7035ff0958a1a7890dbae30810161602bd8c3082ba5c758d276823b98d47bc3dExit109765202022-05-01 15:47:0726 days 19 hrs ago0x9010950cdd1b9cce3a6023c43710c03b79cc59c0 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000730653515 ETH
0x4c8162a8120178fdcd3613e806347c6ec255857c36b5b888762ccc6b28a85aa6Exit108845192022-04-30 7:30:4228 days 3 hrs ago0x6eff525514b279762ae902aefd7c3c0b03b94d15 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.00023000836 ETH
0xf3b6968220d3141b9ae2abbc2c62a40665e6d40342fbac7fe05ad1b1fdf62155Exit108104072022-04-29 9:33:1429 days 1 hr ago0xba7b40a3898a8ada2a341864c4ad65993af64a48 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000226033055 ETH
0x1445d9ebd1cd705678ecdb15968eb83d9d10380770cbd027c7a296b7df011ee2Exit107954782022-04-29 6:10:4629 days 5 hrs ago0xbbbd68fb5965b5a82c9af7299f3a15a40bd4264d IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000230360502 ETH
0xc4b5bce283eb819efc00a66e6e9ba1e7c83273cfe74794b0731b82637772808cExit107694032022-04-28 20:43:1729 days 14 hrs ago0xc7b423e6784a3781dd8a26ab75c0c2f227eeb470 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000204974854 ETH
0xea1aa8acdb66618b17a0834d25a425259406150516819ed5f799cb390d330025Exit107692702022-04-28 20:41:4329 days 14 hrs ago0x5ef16fabb529bd75d58df0317dd533803a269269 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000204951999 ETH
0x51468f1972c8ee8d5fbcbe2f272da3e0aa764b7fb9d562f2ca19f76327f324acExit107684292022-04-28 20:29:5229 days 14 hrs ago0x9ac52b634ed0916eb25c8d9aefa40266d1269d44 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000205624522 ETH
0x417671a5f44d4380b07297ee6f25d74d9c301637bbf460acd491002bdbe33410Exit107261122022-04-28 9:06:5130 days 2 hrs ago0xdc3f0433b5f175a4b9e13cf5ba5b1599f38f775c IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000222690863 ETH
0x8bb1ad22112c4c1be79b1877a5e687bab95f6a9ed6edf75f499d5f26fbdc7f3dExit106914622022-04-27 21:57:2530 days 13 hrs ago0x94b0058cc348e52be0e13a55fdc1467b552588ea IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000214336531 ETH
0x1697af9495cb486de9cb0cfff8c12f8519cf2d06f6fd564cf8feab3fe5e6a7daExit106882372022-04-27 20:29:1530 days 14 hrs ago0xabe6211aad9bacfccf362d8bb1b518740b6c7960 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000244193325 ETH
0xf47c27bede805bf195fe53bd5f8e3412173982da6ebe8d8ec6c10c9a88736889Exit106726582022-04-27 15:31:4830 days 19 hrs ago0x14bceb66eec79f40fae41a4ef00afeec60e0e33f IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000215195955 ETH
0x5ee7c86d9905e0692cf5bbd8ad50c8847046f971ac2f035225c19c75c25af1b4Exit106703492022-04-27 15:01:3030 days 20 hrs ago0x91cd1434a718d98a725b43bd54a209049e764de1 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000215128462 ETH
0xb2670ea0f09ae6cee4dc386a1ade86efc048db5a49d765973566b03dee69732aExit106271652022-04-27 4:58:3831 days 6 hrs ago0xcac3bfe014ee049d2eeec30c7a396a29b1fe1349 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000207297607 ETH
0x893410ec29b84e4f07008c0613078491b0ac4d2a4c5b4db22a01fd59b5847f44Exit106200992022-04-27 2:46:2831 days 8 hrs ago0x6708a331959e59457daf4753e7ac1ec2073d4a37 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000229335404 ETH
0xfc601e299b1b83de8d35ee7adac575ad438e6bb08486d4655aa59f056abb6d77Exit105847482022-04-26 14:40:3831 days 20 hrs ago0x9c538863bed3334a9f455e3edfac68886c123af2 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000184071816 ETH
0xac191903c60860dd938ba21a0656ccfeb5192a2296f7027c96f8f5d4ca44f161Exit105286962022-04-25 15:13:1532 days 19 hrs ago0x15a8aabebb5363273ad73652a320386a81cd4388 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.00018306789 ETH
0x02cfe42b267da957acc4f85c51bafd0f44be79df02cd24f8482545773e9c8d8cExit104769392022-04-24 19:52:4333 days 15 hrs ago0xa1d90c49585fb6cb1e4d51867fc7301b11df0b7c IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000178278609 ETH
0xb02cb3bf7aa7b5c8fad3e9abb5a32f774fbb7ac129594be119d35451854309aaExit104223302022-04-23 21:30:0534 days 13 hrs ago0xd92293daca6bbed57f8cb6d498b48ea93e035e99 IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000203579814 ETH
0x00c84e15db1efc000f84371b8eb271a6a65b7ca8a83fbc66f989ac6c6507c1c5Exit101772282022-04-20 11:12:0038 days 1 min ago0x2b59fd03d176afc335fa6d4fbcdf5cf48a6844fb IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000193924991 ETH
0x9341ecd4512b592c8601b015394a78f985487ce8a3274f3c716d4d01fd2ea2a1Exit100648522022-04-19 2:00:3339 days 9 hrs ago0xf21db7e158e991a3706aff4b0591a76c7a09f9cf IN  0x9f7968de728ac7a6769141f63dca03fd8b03a76f0 ETH0.000153750919 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x3080e949f0c41eea04bcf85f3e2524581d3cbffd22169319ba25666d6151b5bd128648422022-05-24 14:31:473 days 20 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0xec3d3b8c12ff13854d11a5d105f678fa4b2f80d90 ETH
0x3080e949f0c41eea04bcf85f3e2524581d3cbffd22169319ba25666d6151b5bd128648422022-05-24 14:31:473 days 20 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f ArbiNYAN: Rewards0 ETH
0x33baf65d0f02c771218e713a221438b2bab7e0f2671bcc7e0e26de28ac821152120182142022-05-14 2:58:5114 days 8 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0x9bc0fedaf9a14f486eb3d2ca5f237ad8bb6caaa00.3 ETH
0x33baf65d0f02c771218e713a221438b2bab7e0f2671bcc7e0e26de28ac821152120182142022-05-14 2:58:5114 days 8 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f ArbiNYAN: ArbiNYAN Token0 ETH
0x455eb242223ac8f529d036ddbf50189f907cf1f1c996548c81cd527b1c2473f8115306112022-05-08 19:02:1919 days 16 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0x4c728e555e647214d834e4eba37844424c0b7efd0.996999929647786054 ETH
0x455eb242223ac8f529d036ddbf50189f907cf1f1c996548c81cd527b1c2473f8115306112022-05-08 19:02:1919 days 16 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f ArbiNYAN: ArbiNYAN Token0 ETH
0x230ea441cbae17ae620188e443687959771e0e50724436e3621fad6f995766f6112715582022-05-05 18:55:3722 days 16 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0x9e4d89a094420737df08b7a7c188bb859e23761d0 ETH
0x92880c95a6e3717d69f499dba1b62e850dd147a72e312096ac3632f466dea6d0109957852022-05-02 0:37:0626 days 10 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0x3c30765cae26cc563411e08f3084387bdd557e740 ETH
0x7035ff0958a1a7890dbae30810161602bd8c3082ba5c758d276823b98d47bc3d109765202022-05-01 15:47:0726 days 19 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0x9010950cdd1b9cce3a6023c43710c03b79cc59c00.016999917468330254 ETH
0x7035ff0958a1a7890dbae30810161602bd8c3082ba5c758d276823b98d47bc3d109765202022-05-01 15:47:0726 days 19 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f ArbiNYAN: ArbiNYAN Token0 ETH
0x4c8162a8120178fdcd3613e806347c6ec255857c36b5b888762ccc6b28a85aa6108845192022-04-30 7:30:4228 days 3 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0x6eff525514b279762ae902aefd7c3c0b03b94d150.016999891475584048 ETH
0x4c8162a8120178fdcd3613e806347c6ec255857c36b5b888762ccc6b28a85aa6108845192022-04-30 7:30:4228 days 3 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f ArbiNYAN: ArbiNYAN Token0 ETH
0xf3b6968220d3141b9ae2abbc2c62a40665e6d40342fbac7fe05ad1b1fdf62155108104072022-04-29 9:33:1429 days 1 hr ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0xba7b40a3898a8ada2a341864c4ad65993af64a480 ETH
0x1445d9ebd1cd705678ecdb15968eb83d9d10380770cbd027c7a296b7df011ee2107954782022-04-29 6:10:4629 days 5 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0xbbbd68fb5965b5a82c9af7299f3a15a40bd4264d0 ETH
0xc4b5bce283eb819efc00a66e6e9ba1e7c83273cfe74794b0731b82637772808c107694032022-04-28 20:43:1729 days 14 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0xc7b423e6784a3781dd8a26ab75c0c2f227eeb4700 ETH
0xea1aa8acdb66618b17a0834d25a425259406150516819ed5f799cb390d330025107692702022-04-28 20:41:4329 days 14 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0x5ef16fabb529bd75d58df0317dd533803a2692690 ETH
0x51468f1972c8ee8d5fbcbe2f272da3e0aa764b7fb9d562f2ca19f76327f324ac107684292022-04-28 20:29:5229 days 14 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0x9ac52b634ed0916eb25c8d9aefa40266d1269d440 ETH
0x417671a5f44d4380b07297ee6f25d74d9c301637bbf460acd491002bdbe33410107261122022-04-28 9:06:5130 days 2 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0xdc3f0433b5f175a4b9e13cf5ba5b1599f38f775c0.08 ETH
0x417671a5f44d4380b07297ee6f25d74d9c301637bbf460acd491002bdbe33410107261122022-04-28 9:06:5130 days 2 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f ArbiNYAN: ArbiNYAN Token0 ETH
0x8bb1ad22112c4c1be79b1877a5e687bab95f6a9ed6edf75f499d5f26fbdc7f3d106914622022-04-27 21:57:2530 days 13 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0x94b0058cc348e52be0e13a55fdc1467b552588ea0 ETH
0x1697af9495cb486de9cb0cfff8c12f8519cf2d06f6fd564cf8feab3fe5e6a7da106882372022-04-27 20:29:1530 days 14 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0xabe6211aad9bacfccf362d8bb1b518740b6c79600.001 ETH
0x1697af9495cb486de9cb0cfff8c12f8519cf2d06f6fd564cf8feab3fe5e6a7da106882372022-04-27 20:29:1530 days 14 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f ArbiNYAN: ArbiNYAN Token0 ETH
0xf47c27bede805bf195fe53bd5f8e3412173982da6ebe8d8ec6c10c9a88736889106726582022-04-27 15:31:4830 days 19 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0x14bceb66eec79f40fae41a4ef00afeec60e0e33f0.036999917468330254 ETH
0xf47c27bede805bf195fe53bd5f8e3412173982da6ebe8d8ec6c10c9a88736889106726582022-04-27 15:31:4830 days 19 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f ArbiNYAN: ArbiNYAN Token0 ETH
0x5ee7c86d9905e0692cf5bbd8ad50c8847046f971ac2f035225c19c75c25af1b4106703492022-04-27 15:01:3030 days 20 hrs ago 0x9f7968de728ac7a6769141f63dca03fd8b03a76f0x91cd1434a718d98a725b43bd54a209049e764de10.016999917468330254 ETH
[ Download CSV Export 
Loading

Minimal Proxy Contract for 0x62ff5be795262999fc1ebac29277575031d2da2c

Contract Name:
NyanRewards

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 400 runs

Other Settings:
default evmVersion, MIT license
Decompile ByteCode
/**
 *Submitted for verification at Arbiscan on 2021-09-08
*/

//SPDX-License-Identifier: MIT

// File: @openzeppelin/contracts/ownership/Ownable.sol

pragma solidity ^0.8.7;

/**
 * @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.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
 
contract Ownable {
    address public owner;

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

    constructor() {
        owner = msg.sender;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(msg.sender == owner, "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 onlyOwner {
        emit OwnershipTransferred(owner, address(0));
        owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }
}

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

contract StakedTokenWrapper {
    uint256 public totalSupply;

    mapping(address => uint256) private _balances;
    IERC20 public stakedToken;
    
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);

    function balanceOf(address account) public view returns (uint256) {
        return _balances[account];
    }

    string constant _transferErrorMessage = "staked token transfer failed";
    
    function stakeFor(address forWhom, uint128 amount) public payable virtual {
        IERC20 st = stakedToken;
        if(st == IERC20(address(0))) { //eth
            unchecked {
                totalSupply += msg.value;
                _balances[forWhom] += msg.value;
            }
        }
        else {
            require(msg.value == 0, "non-zero eth");
            require(amount > 0, "Cannot stake 0");
            require(st.transferFrom(msg.sender, address(this), amount), _transferErrorMessage);
            unchecked { 
                totalSupply += amount;
                _balances[forWhom] += amount;
            }
        }
        emit Staked(forWhom, amount);
    }

    function withdraw(uint128 amount) public virtual {
        require(amount <= _balances[msg.sender], "withdraw: balance is lower");
        unchecked {
            _balances[msg.sender] -= amount;
            totalSupply = totalSupply-amount;
        }
        IERC20 st = stakedToken;
        if(st == IERC20(address(0))) { //eth
            (bool success, ) = msg.sender.call{value: amount}("");
            require(success, "eth transfer failure");
        }
        else {
            require(stakedToken.transfer(msg.sender, amount), _transferErrorMessage);
        }
        emit Withdrawn(msg.sender, amount);
    }
}

contract NyanRewards is StakedTokenWrapper, Ownable {
    IERC20 public rewardToken;
    uint256 public rewardRate;
    uint64 public periodFinish;
    uint64 public lastUpdateTime;
    uint128 public rewardPerTokenStored;
    struct UserRewards {
        uint128 userRewardPerTokenPaid;
        uint128 rewards;
    }
    mapping(address => UserRewards) public userRewards;

    event RewardAdded(uint256 reward);
    event RewardPaid(address indexed user, uint256 reward);

    constructor(IERC20 _rewardToken, IERC20 _stakedToken) {
        rewardToken = _rewardToken;
        stakedToken = _stakedToken;
    }

    modifier updateReward(address account) {
        uint128 _rewardPerTokenStored = rewardPerToken();
        lastUpdateTime = lastTimeRewardApplicable();
        rewardPerTokenStored = _rewardPerTokenStored;
        userRewards[account].rewards = earned(account);
        userRewards[account].userRewardPerTokenPaid = _rewardPerTokenStored;
        _;
    }

    function lastTimeRewardApplicable() public view returns (uint64) {
        uint64 blockTimestamp = uint64(block.timestamp);
        return blockTimestamp < periodFinish ? blockTimestamp : periodFinish;
    }

    function rewardPerToken() public view returns (uint128) {
        uint256 totalStakedSupply = totalSupply;
        if (totalStakedSupply == 0) {
            return rewardPerTokenStored;
        }
        unchecked {
            uint256 rewardDuration = lastTimeRewardApplicable()-lastUpdateTime;
            return uint128(rewardPerTokenStored + rewardDuration*rewardRate*1e18/totalStakedSupply);
        }
    }

    function earned(address account) public view returns (uint128) {
        unchecked { 
            return uint128(balanceOf(account)*(rewardPerToken()-userRewards[account].userRewardPerTokenPaid)/1e18 + userRewards[account].rewards);
        }
    }

    function stake(uint128 amount) external payable {
        stakeFor(msg.sender, amount);
    }

    function stakeFor(address forWhom, uint128 amount) public payable override updateReward(forWhom) {
        super.stakeFor(forWhom, amount);
    }

    function withdraw(uint128 amount) public override updateReward(msg.sender) {
        super.withdraw(amount);
    }

    function exit() external {
        getReward();
        withdraw(uint128(balanceOf(msg.sender)));
    }

    function getReward() public updateReward(msg.sender) {
        uint256 reward = earned(msg.sender);
        if (reward > 0) {
            userRewards[msg.sender].rewards = 0;
            require(rewardToken.transfer(msg.sender, reward), "reward transfer failed");
            emit RewardPaid(msg.sender, reward);
        }
    }

    function setRewardParams(uint128 reward, uint64 duration) external onlyOwner {
        unchecked {
            require(reward > 0);
            rewardPerTokenStored = rewardPerToken();
            uint64 blockTimestamp = uint64(block.timestamp);
            uint256 maxRewardSupply = rewardToken.balanceOf(address(this));
            if(rewardToken == stakedToken)
                maxRewardSupply -= totalSupply;
            uint256 leftover = 0;
            if (blockTimestamp >= periodFinish) {
                rewardRate = reward/duration;
            } else {
                uint256 remaining = periodFinish-blockTimestamp;
                leftover = remaining*rewardRate;
                rewardRate = (reward+leftover)/duration;
            }
            require(reward+leftover <= maxRewardSupply, "not enough tokens");
            lastUpdateTime = blockTimestamp;
            periodFinish = blockTimestamp+duration;
            emit RewardAdded(reward);
        }
    }

    function withdrawReward() external onlyOwner {
        uint256 rewardSupply = rewardToken.balanceOf(address(this));
        //ensure funds staked by users can't be transferred out
        if(rewardToken == stakedToken)
                rewardSupply -= totalSupply;
        require(rewardToken.transfer(msg.sender, rewardSupply));
        rewardRate = 0;
        periodFinish = uint64(block.timestamp);
    }
}

/*
   ____            __   __        __   _
  / __/__ __ ___  / /_ / /  ___  / /_ (_)__ __
 _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
     /___/

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

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_rewardToken","type":"address"},{"internalType":"contract IERC20","name":"_stakedToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"reward","type":"uint128"},{"internalType":"uint64","name":"duration","type":"uint64"}],"name":"setRewardParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"amount","type":"uint128"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"forWhom","type":"address"},{"internalType":"uint128","name":"amount","type":"uint128"}],"name":"stakeFor","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"stakedToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","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":"address","name":"","type":"address"}],"name":"userRewards","outputs":[{"internalType":"uint128","name":"userRewardPerTokenPaid","type":"uint128"},{"internalType":"uint128","name":"rewards","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"amount","type":"uint128"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawReward","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
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.