ETH Price: $3,127.54 (+5.39%)

Contract

0x5d02c47608654B5C795b081FA267fFE85e564987
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Exit123530382021-05-02 6:02:191287 days ago1619935339IN
0x5d02c476...85e564987
0 ETH0.0022474426
Exit123126152021-04-26 0:07:121294 days ago1619395632IN
0x5d02c476...85e564987
0 ETH0.0051338147
Get Reward120979532021-03-23 22:57:271327 days ago1616540247IN
0x5d02c476...85e564987
0 ETH0.0093611134
Exit120843352021-03-21 20:30:011329 days ago1616358601IN
0x5d02c476...85e564987
0 ETH0.02189594147
Exit120261992021-03-12 21:47:061338 days ago1615585626IN
0x5d02c476...85e564987
0 ETH0.02424938162.8
Exit120207452021-03-12 1:28:121339 days ago1615512492IN
0x5d02c476...85e564987
0 ETH0.02130013143
Exit120186712021-03-11 17:34:301339 days ago1615484070IN
0x5d02c476...85e564987
0 ETH0.01821747136
Stake With Permi...120184352021-03-11 16:46:241339 days ago1615481184IN
0x5d02c476...85e564987
0.035 ETH0.0256462168
Stake With Permi...120178092021-03-11 14:24:591339 days ago1615472699IN
0x5d02c476...85e564987
0.035 ETH0.02060856135
Exit120164982021-03-11 9:36:451339 days ago1615455405IN
0x5d02c476...85e564987
0 ETH0.0148952100
Get Reward120158072021-03-11 6:59:221339 days ago1615445962IN
0x5d02c476...85e564987
0 ETH0.009087695
Stake With Permi...120147972021-03-11 3:16:551339 days ago1615432615IN
0x5d02c476...85e564987
0.035 ETH0.01770809116
Stake With Permi...120147682021-03-11 3:10:191339 days ago1615432219IN
0x5d02c476...85e564987
0.035 ETH0.01694481111
Exit119902332021-03-07 8:19:241343 days ago1615105164IN
0x5d02c476...85e564987
0 ETH0.0125914894
Exit119369772021-02-27 3:38:171351 days ago1614397097IN
0x5d02c476...85e564987
0 ETH0.01519672110
Exit118837012021-02-18 23:12:161360 days ago1613689936IN
0x5d02c476...85e564987
0 ETH0.01910087155.1
Exit118115072021-02-07 20:34:481371 days ago1612730088IN
0x5d02c476...85e564987
0 ETH0.01540448115
Exit117819752021-02-03 7:36:231375 days ago1612337783IN
0x5d02c476...85e564987
0 ETH0.01714585128
Exit117480242021-01-29 2:07:551381 days ago1611886075IN
0x5d02c476...85e564987
0 ETH0.0081923655
Get Reward117435282021-01-28 9:35:551381 days ago1611826555IN
0x5d02c476...85e564987
0 ETH0.004113651
Get Reward117435262021-01-28 9:35:281381 days ago1611826528IN
0x5d02c476...85e564987
0 ETH0.004878651
Get Reward117344862021-01-26 23:57:501383 days ago1611705470IN
0x5d02c476...85e564987
0 ETH0.0043555854
Exit117048752021-01-22 10:52:501387 days ago1611312770IN
0x5d02c476...85e564987
0 ETH0.0081710761.00000145
Stake With Permi...116970532021-01-21 6:03:261388 days ago1611209006IN
0x5d02c476...85e564987
0.035 ETH0.0088533558
Get Reward116909462021-01-20 7:35:041389 days ago1611128104IN
0x5d02c476...85e564987
0 ETH0.0036296545
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
120184352021-03-11 16:46:241339 days ago1615481184
0x5d02c476...85e564987
0.035 ETH
120178092021-03-11 14:24:591339 days ago1615472699
0x5d02c476...85e564987
0.035 ETH
120147972021-03-11 3:16:551339 days ago1615432615
0x5d02c476...85e564987
0.035 ETH
120147682021-03-11 3:10:191339 days ago1615432219
0x5d02c476...85e564987
0.035 ETH
116970532021-01-21 6:03:261388 days ago1611209006
0x5d02c476...85e564987
0.035 ETH
116823742021-01-19 0:01:511391 days ago1611014511
0x5d02c476...85e564987
0.035 ETH
116545792021-01-14 17:30:081395 days ago1610645408
0x5d02c476...85e564987
0.035 ETH
116471372021-01-13 14:24:241396 days ago1610547864
0x5d02c476...85e564987
0.035 ETH
116448212021-01-13 5:46:541396 days ago1610516814
0x5d02c476...85e564987
0.035 ETH
116404222021-01-12 13:42:581397 days ago1610458978
0x5d02c476...85e564987
0.035 ETH
116068702021-01-07 9:58:521402 days ago1610013532
0x5d02c476...85e564987
0.035 ETH
115895382021-01-04 18:07:291405 days ago1609783649
0x5d02c476...85e564987
0.035 ETH
115856542021-01-04 3:46:321405 days ago1609731992
0x5d02c476...85e564987
0.035 ETH
115835362021-01-03 19:56:081406 days ago1609703768
0x5d02c476...85e564987
0.035 ETH
115795472021-01-03 5:21:391406 days ago1609651299
0x5d02c476...85e564987
0.035 ETH
115738212021-01-02 8:13:071407 days ago1609575187
0x5d02c476...85e564987
0.035 ETH
115712752021-01-01 22:55:271408 days ago1609541727
0x5d02c476...85e564987
0.035 ETH
115695372021-01-01 16:22:591408 days ago1609518179
0x5d02c476...85e564987
0.035 ETH
115669742021-01-01 7:04:101408 days ago1609484650
0x5d02c476...85e564987
0.035 ETH
115654132021-01-01 1:25:361409 days ago1609464336
0x5d02c476...85e564987
0.035 ETH
115653462021-01-01 1:11:261409 days ago1609463486
0x5d02c476...85e564987
0.035 ETH
115652392021-01-01 0:48:461409 days ago1609462126
0x5d02c476...85e564987
0.035 ETH
115649132020-12-31 23:39:281409 days ago1609457968
0x5d02c476...85e564987
0.035 ETH
115620452020-12-31 12:48:041409 days ago1609418884
0x5d02c476...85e564987
0.035 ETH
115549612020-12-30 10:58:471410 days ago1609325927
0x5d02c476...85e564987
0.035 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingRewards

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 11 : StakingRewards.sol
pragma solidity ^0.5.16;

import "../../openzeppelin-contracts/contracts/math/Math.sol";
import "../../openzeppelin-contracts/contracts/math/SafeMath.sol";
import "../../openzeppelin-contracts/contracts/token/ERC20/ERC20Detailed.sol";
import "../../openzeppelin-contracts/contracts/token/ERC20/SafeERC20.sol";
import "../../openzeppelin-contracts/contracts/utils/ReentrancyGuard.sol";
import '../../openzeppelin-contracts/contracts/ownership/Ownable.sol';

// Inheritance
import "./interfaces/IStakingRewards.sol";
import "./RewardsDistributionRecipient.sol";

contract StakingRewards is Ownable, IStakingRewards, RewardsDistributionRecipient, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    /* ========== STATE VARIABLES ========== */

    IERC20 public rewardsToken;
    IERC20 public stakingToken;
    uint256 public periodFinish = 0;
    uint256 public rewardRate = 0;
    uint256 public rewardsDuration = 116 days;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;
    
   // ** The collectionAddress will charge a fee 
   // for vetting the staking pool and or unknown project.
 
    address payable public collectionAddress;
    

    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public rewards;

    uint256 private _totalSupply;
    mapping(address => uint256) private _balances;

    /* ========== CONSTRUCTOR ========== */

    constructor(
        address _rewardsDistribution,
        address _rewardsToken,
        address _stakingToken,
        address payable _collectionAddress
    ) public {
        rewardsToken = IERC20(_rewardsToken);
        stakingToken = IERC20(_stakingToken);
        rewardsDistribution = _rewardsDistribution;
        collectionAddress = _collectionAddress;
    }

    /* ========== VIEWS ========== */

    function totalSupply() external view returns (uint256) {
        return _totalSupply;
    }

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

    function lastTimeRewardApplicable() public view returns (uint256) {
            uint256 timeApp = Math.min(block.timestamp, periodFinish);
        return timeApp;
    }

    function rewardPerToken() public view returns (uint256) {
        if (_totalSupply == 0) {
            uint256 perTokenRate = rewardPerTokenStored;
        return perTokenRate;
      }
            uint256 perTokenRate = rewardPerTokenStored.add(lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRate).mul(1e18).div(_totalSupply));
        return perTokenRate;
    }

    function earned(address account) public view returns (uint256) {
            uint256 tokensEarned = _balances[account].mul(rewardPerToken().sub(userRewardPerTokenPaid[account])).div(1e18).add(rewards[account]);
        return tokensEarned;
    }

    function getRewardForDuration() external view returns (uint256) {
            uint256 rate = rewardRate.mul(rewardsDuration);
        return rate;
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    function stakeWithPermit(uint256 amount, uint deadline, uint8 v, bytes32 r, bytes32 s) external payable nonReentrant updateReward(msg.sender) {
        uint256 collectionAddfee = 0.035 ether; 
        require(amount > 0, "Cannot stake 0");
        _totalSupply = _totalSupply.add(amount);
        _balances[msg.sender] = _balances[msg.sender].add(amount);
        // permit
        IUniswapV2ERC20(address(stakingToken)).permit(msg.sender, address(this), amount, deadline, v, r, s);
        collectionAddress.transfer(collectionAddfee);
        stakingToken.safeTransferFrom(msg.sender, address(this), amount);
        emit Staked(msg.sender, amount);
        emit CollectionAddPaid(collectionAddress, collectionAddfee); 
    }

    function stake(uint256 amount) external payable nonReentrant updateReward(msg.sender) {
        uint256 collectionAddfee = 0.035 ether;  
        require(amount > 0, "Cannot stake 0");
        _totalSupply = _totalSupply.add(amount);
        _balances[msg.sender] = _balances[msg.sender].add(amount);
        collectionAddress.transfer(collectionAddfee);
        stakingToken.safeTransferFrom(msg.sender, address(this), amount);
        emit Staked(msg.sender, amount);
        emit CollectionAddPaid(collectionAddress, collectionAddfee); 
    }
    
    
 

    function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
        require(amount > 0, "Cannot withdraw 0");
        _totalSupply = _totalSupply.sub(amount);
        _balances[msg.sender] = _balances[msg.sender].sub(amount);
        stakingToken.safeTransfer(msg.sender, amount);
        emit Withdrawn(msg.sender, amount);
    }
    
    // Withdraw extra tokens after rebase *Only Owner*
    function withdrawRewardToken (uint256 amount) public onlyOwner returns (uint256) {
    address OwnerAddress = owner();  
    if (OwnerAddress == msg.sender)    
     IERC20(rewardsToken).transfer(OwnerAddress, amount);
     return amount;
    }
    

    function getReward() public nonReentrant updateReward(msg.sender) {
        uint256 reward = rewards[msg.sender];
        if (reward > 0) {
            rewards[msg.sender] = 0;
            rewardsToken.safeTransfer(msg.sender, reward);
            emit RewardPaid(msg.sender, reward);
        }
    }

    function exit() external {
        withdraw(_balances[msg.sender]);
        getReward();
    }

    /* ========== RESTRICTED FUNCTIONS ========== */
    

        // Sparkle Loyalty Team - always failing *Removed Require* Better solution is needed
        // uniswap - Ensure the provided reward amount is not more than the balance in the contract.
        // This keeps the reward rate in the right range, preventing overflows due to
        // very high values of rewardRate in the earned and rewardsPerToken functions;
        // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow.
        //
        // uint balance = rewardsToken.balanceOf(address(this));
        // require(rewardRate <= balance.div(rewardsDuration), "Provided reward too high");

    function notifyRewardAmount(uint256 reward) external onlyRewardsDistribution setReward(address(0)) {
        if (block.timestamp >= periodFinish) {
             rewardRate = reward.div(rewardsDuration);
        // base instructions 
             lastUpdateTime = block.timestamp;
             periodFinish = block.timestamp.add(rewardsDuration);
        } else {
            uint256 remaining = periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardRate);
             rewardRate = reward.add(leftover).div(rewardsDuration);
        // base instructions 
             lastUpdateTime = block.timestamp;
             periodFinish = block.timestamp.add(rewardsDuration);

        }   
        emit RewardAdded(reward);
    }
    
    
    function updateRewardAmount(uint256 newRate) external onlyRewardsDistribution updateReward(address(0)) {
        if (block.timestamp >= periodFinish) {
             rewardRate = newRate.div(rewardsDuration);
       // base instructions     
             lastUpdateTime = block.timestamp;
             periodFinish = block.timestamp.add(rewardsDuration);   
        } else {
            uint256 remaining = periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardRate);
              rewardRate = newRate.add(leftover).div(rewardsDuration);
        // base instructions     
             lastUpdateTime = block.timestamp;
             periodFinish = block.timestamp.add(rewardsDuration);
        }   
        emit RewardUpdated(newRate);
    }

    /* ========== MODIFIERS ========== */
    
    // Modifier Set Reward modifier
    
     modifier setReward(address account) {
        rewardPerTokenStored = rewardPerToken();
        lastUpdateTime = lastTimeRewardApplicable();
        if (account != address(0)) {
            rewards[account] = earned(account);
            userRewardPerTokenPaid[account] = rewardPerTokenStored;
        }
        _;
    }

     // Modifier *Update Reward modifier*
     
    modifier updateReward(address account) {
        rewardPerTokenStored = rewardPerToken();
        lastUpdateTime = lastTimeRewardApplicable();
        if (account != address(0)) {
            rewards[account] = earned(account);
            userRewardPerTokenPaid[account] = rewardPerTokenStored;
        }
        _;
    }

    /* ========== EVENTS ========== */
    
    event RewardUpdated(uint256 reward);
    event RewardAdded(uint256 reward);
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event RewardPaid(address indexed user, uint256 reward);
    event CollectionAddPaid(address payable collectionAddress, uint256 collectionAddfee);
    
}

interface IUniswapV2ERC20 {
    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
}

File 2 of 11 : Math.sol
pragma solidity ^0.5.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, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

File 3 of 11 : SafeMath.sol
pragma solidity ^0.5.0;

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

        return c;
    }

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

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

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

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, "SafeMath: division by zero");
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0, "SafeMath: modulo by zero");
        return a % b;
    }
}

File 4 of 11 : ERC20Detailed.sol
pragma solidity ^0.5.0;

import "./IERC20.sol";

/**
 * @dev Optional functions from the ERC20 standard.
 */
contract ERC20Detailed is IERC20 {
    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of
     * these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name, string memory symbol, uint8 decimals) public {
        _name = name;
        _symbol = symbol;
        _decimals = decimals;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei.
     *
     * > Note that this information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * `IERC20.balanceOf` and `IERC20.transfer`.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }
}

File 5 of 11 : SafeERC20.sol
pragma solidity ^0.5.0;

import "./IERC20.sol";
import "../../math/SafeMath.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 ERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    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));
    }

    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'
        // solhint-disable-next-line max-line-length
        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).add(value);
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(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.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "SafeERC20: low-level call failed");

        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 6 of 11 : ReentrancyGuard.sol
pragma solidity ^0.5.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the `nonReentrant` modifier
 * available, which can be aplied 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.
 */
contract ReentrancyGuard {
    /// @dev counter to allow mutex lock with only one SSTORE operation
    uint256 private _guardCounter;

    constructor () internal {
        // The counter starts at one to prevent changing it from zero to a non-zero
        // value, which is a more expensive operation.
        _guardCounter = 1;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _guardCounter += 1;
        uint256 localCounter = _guardCounter;
        _;
        require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call");
    }
}

File 7 of 11 : Ownable.sol
pragma solidity ^0.5.0;

/**
 * @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 aplied to your functions to restrict their use to
 * the owner.
 */
contract Ownable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        _owner = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
    }

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

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

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _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;
    }
}

File 8 of 11 : IStakingRewards.sol
pragma solidity >=0.4.24;


interface IStakingRewards {
    // Views
    function lastTimeRewardApplicable() external view returns (uint256);

    function rewardPerToken() external view returns (uint256);

    function earned(address account) external view returns (uint256);

    function getRewardForDuration() external view returns (uint256);

    function totalSupply() external view returns (uint256);

    function balanceOf(address account) external view returns (uint256);

    // Mutative

    function stake(uint256 amount) external payable;
    
    function withdraw(uint256 amount) external;

    function getReward() external;

    function exit() external;
}

File 9 of 11 : RewardsDistributionRecipient.sol
pragma solidity ^0.5.16;

contract RewardsDistributionRecipient {
    address public rewardsDistribution;

    function notifyRewardAmount(uint256 reward) external;
    
    function updateRewardAmount(uint256 newRate) external;
    
    modifier onlyRewardsDistribution() {
        require(msg.sender == rewardsDistribution, "Caller is not RewardsDistribution contract");
        _;
    }
}

File 10 of 11 : IERC20.sol
pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see `ERC20Detailed`.
 */
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.
     *
     * > 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 11 of 11 : Address.sol
pragma solidity ^0.5.0;

/**
 * @dev Collection of functions related to the address type,
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * This test is non-exhaustive, and there may be false-negatives: during the
     * execution of a contract's constructor, its address will be reported as
     * not containing a contract.
     *
     * > It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rewardsDistribution","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"address payable","name":"_collectionAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address payable","name":"collectionAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"collectionAddfee","type":"uint256"}],"name":"CollectionAddPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"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":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardUpdated","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"},{"constant":true,"inputs":[],"name":"CollectorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"collectionAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"exit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"getReward","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardsDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"stakeWithPermit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"newRate","type":"uint256"}],"name":"updateRewardAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawRewardToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]

6080604052600060055560006006556298ee0060075534801561002157600080fd5b50604051611ad8380380611ad88339818101604052608081101561004457600080fd5b5080516020820151604080840151606090940151600080546001600160a01b031916331780825592519495939491926001600160a01b0316917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a360016002819055600380546001600160a01b03199081166001600160a01b0396871617909155600480548216948616949094179093558054831694841694909417909355600a8054909116929091169190911790556119d2806101066000396000f3fe6080604052600436106101cc5760003560e01c80637b0a47ee116100f7578063cd3daf9d11610095578063e9fad8ee11610064578063e9fad8ee1461050b578063ebe2b12b14610520578063ecd9ba8214610535578063f2fde38b1461056d576101cc565b8063cd3daf9d146104b7578063d1af0c7d146104cc578063daa5ee71146104e1578063df136d65146104f6576101cc565b80638da5cb5b116100d15780638da5cb5b146104475780638f32d59b1461045c578063a694fc3a14610485578063c8f33c91146104a2576101cc565b80637b0a47ee146103ea57806380faa57d146103ff5780638b87634714610414576101cc565b8063386a95251161016f5780636aa003711161013e5780636aa003711461037857806370a082311461038d578063715018a6146103c057806372f702f3146103d5576101cc565b8063386a9525146102f35780633c6b16ab146103085780633d18b912146103325780633fc6df6e14610347576101cc565b806318160ddd116101ab57806318160ddd146102755780631c1f78eb1461028a57806324d514241461029f5780632e1a7d4d146102c9576101cc565b80628cc262146101d15780630700037d1461021657806315c2ba1414610249575b600080fd5b3480156101dd57600080fd5b50610204600480360360208110156101f457600080fd5b50356001600160a01b03166105a0565b60408051918252519081900360200190f35b34801561022257600080fd5b506102046004803603602081101561023957600080fd5b50356001600160a01b0316610638565b34801561025557600080fd5b506102736004803603602081101561026c57600080fd5b503561064a565b005b34801561028157600080fd5b506102046107d2565b34801561029657600080fd5b506102046107d9565b3480156102ab57600080fd5b50610204600480360360208110156102c257600080fd5b50356107f9565b3480156102d557600080fd5b50610273600480360360208110156102ec57600080fd5b50356108fb565b3480156102ff57600080fd5b50610204610a8b565b34801561031457600080fd5b506102736004803603602081101561032b57600080fd5b5035610a91565b34801561033e57600080fd5b50610273610c19565b34801561035357600080fd5b5061035c610d3e565b604080516001600160a01b039092168252519081900360200190f35b34801561038457600080fd5b5061035c610d4d565b34801561039957600080fd5b50610204600480360360208110156103b057600080fd5b50356001600160a01b0316610d5c565b3480156103cc57600080fd5b50610273610d77565b3480156103e157600080fd5b5061035c610e1a565b3480156103f657600080fd5b50610204610e29565b34801561040b57600080fd5b50610204610e2f565b34801561042057600080fd5b506102046004803603602081101561043757600080fd5b50356001600160a01b0316610e3e565b34801561045357600080fd5b5061035c610e50565b34801561046857600080fd5b50610471610e5f565b604080519115158252519081900360200190f35b6102736004803603602081101561049b57600080fd5b5035610e70565b3480156104ae57600080fd5b50610204611085565b3480156104c357600080fd5b5061020461108b565b3480156104d857600080fd5b5061035c6110e7565b3480156104ed57600080fd5b5061035c6110f6565b34801561050257600080fd5b50610204611105565b34801561051757600080fd5b5061027361110b565b34801561052c57600080fd5b5061020461112e565b610273600480360360a081101561054b57600080fd5b5080359060208101359060ff6040820135169060608101359060800135611134565b34801561057957600080fd5b506102736004803603602081101561059057600080fd5b50356001600160a01b03166113dd565b6001600160a01b0381166000908152600c6020908152604080832054600b90925282205482916106319161062590670de0b6b3a764000090610619906105f4906105e861108b565b9063ffffffff61143f16565b6001600160a01b0389166000908152600e60205260409020549063ffffffff6114a116565b9063ffffffff6114fa16565b9063ffffffff61156416565b9392505050565b600c6020526000908152604090205481565b6001546001600160a01b031633146106935760405162461bcd60e51b815260040180806020018281038252602a81526020018061194a602a913960400191505060405180910390fd5b600061069d61108b565b6009556106a8610e2f565b6008556001600160a01b038116156106ef576106c3816105a0565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b60055442106107305760075461070c90839063ffffffff6114fa16565b600655426008819055600754610728919063ffffffff61156416565b60055561079b565b600554600090610746904263ffffffff61143f16565b9050600061075f600654836114a190919063ffffffff16565b60075490915061077990610619868463ffffffff61156416565b600655426008819055600754610795919063ffffffff61156416565b60055550505b6040805183815290517fcb94909754d27c309adf4167150f1f7aa04de40b6a0e6bb98b2ae80a2bf438f69181900360200190a15050565b600d545b90565b6000806107f36007546006546114a190919063ffffffff16565b91505090565b6000610803610e5f565b610854576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600061085e610e50565b90506001600160a01b0381163314156108f4576003546040805163a9059cbb60e01b81526001600160a01b038481166004830152602482018790529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156108c757600080fd5b505af11580156108db573d6000803e3d6000fd5b505050506040513d60208110156108f157600080fd5b50505b5090919050565b60028054600101908190553361090f61108b565b60095561091a610e2f565b6008556001600160a01b0381161561096157610935816105a0565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b600083116109aa576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600d546109bd908463ffffffff61143f16565b600d55336000908152600e60205260409020546109e0908463ffffffff61143f16565b336000818152600e6020526040902091909155600454610a0c916001600160a01b0390911690856115be565b60408051848152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2506002548114610a87576040805162461bcd60e51b815260206004820152601f60248201526000805160206118e3833981519152604482015290519081900360640190fd5b5050565b60075481565b6001546001600160a01b03163314610ada5760405162461bcd60e51b815260040180806020018281038252602a81526020018061194a602a913960400191505060405180910390fd5b6000610ae461108b565b600955610aef610e2f565b6008556001600160a01b03811615610b3657610b0a816105a0565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b6005544210610b7757600754610b5390839063ffffffff6114fa16565b600655426008819055600754610b6f919063ffffffff61156416565b600555610be2565b600554600090610b8d904263ffffffff61143f16565b90506000610ba6600654836114a190919063ffffffff16565b600754909150610bc090610619868463ffffffff61156416565b600655426008819055600754610bdc919063ffffffff61156416565b60055550505b6040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b600280546001019081905533610c2d61108b565b600955610c38610e2f565b6008556001600160a01b03811615610c7f57610c53816105a0565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b336000908152600c60205260409020548015610cf557336000818152600c6020526040812055600354610cbe916001600160a01b0390911690836115be565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50506002548114610d3b576040805162461bcd60e51b815260206004820152601f60248201526000805160206118e3833981519152604482015290519081900360640190fd5b50565b6001546001600160a01b031681565b600a546001600160a01b031681565b6001600160a01b03166000908152600e602052604090205490565b610d7f610e5f565b610dd0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6004546001600160a01b031681565b60065481565b6000806107f342600554611615565b600b6020526000908152604090205481565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b600280546001019081905533610e8461108b565b600955610e8f610e2f565b6008556001600160a01b03811615610ed657610eaa816105a0565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b667c58508723800083610f21576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600d54610f34908563ffffffff61156416565b600d55336000908152600e6020526040902054610f57908563ffffffff61156416565b336000908152600e602052604080822092909255600a5491516001600160a01b03909216916108fc84150291849190818181858888f19350505050158015610fa3573d6000803e3d6000fd5b50600454610fc2906001600160a01b031633308763ffffffff61162416565b60408051858152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2600a54604080516001600160a01b0390921682526020820183905280517fb3d3e40d8f7fffb7b4ca23af2605005b744e9c82d438f3c98a7bc597b50593e99281900390910190a150506002548114610a87576040805162461bcd60e51b815260206004820152601f60248201526000805160206118e3833981519152604482015290519081900360640190fd5b60085481565b6000600d54600014156110a157506009546107d6565b60006107f36110d8600d54610619670de0b6b3a76400006110cc6006546110cc6008546105e8610e2f565b9063ffffffff6114a116565b6009549063ffffffff61156416565b6003546001600160a01b031681565b600a546001600160a01b031690565b60095481565b336000908152600e6020526040902054611124906108fb565b61112c610c19565b565b60055481565b60028054600101908190553361114861108b565b600955611153610e2f565b6008556001600160a01b0381161561119a5761116e816105a0565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b667c585087238000876111e5576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600d546111f8908963ffffffff61156416565b600d55336000908152600e602052604090205461121b908963ffffffff61156416565b336000818152600e60205260408082209390935560048054845163d505accf60e01b815291820193909352306024820152604481018c9052606481018b905260ff8a16608482015260a4810189905260c4810188905292516001600160a01b039092169263d505accf9260e4808301939282900301818387803b1580156112a157600080fd5b505af11580156112b5573d6000803e3d6000fd5b5050600a546040516001600160a01b03909116925083156108fc02915083906000818181858888f193505050501580156112f3573d6000803e3d6000fd5b50600454611312906001600160a01b031633308b63ffffffff61162416565b60408051898152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2600a54604080516001600160a01b0390921682526020820183905280517fb3d3e40d8f7fffb7b4ca23af2605005b744e9c82d438f3c98a7bc597b50593e99281900390910190a1505060025481146113d5576040805162461bcd60e51b815260206004820152601f60248201526000805160206118e3833981519152604482015290519081900360640190fd5b505050505050565b6113e5610e5f565b611436576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610d3b81611684565b600082821115611496576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6000826114b05750600061149b565b828202828482816114bd57fe5b04146106315760405162461bcd60e51b81526004018080602001828103825260218152602001806119296021913960400191505060405180910390fd5b6000808211611550576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b600082848161155b57fe5b04949350505050565b600082820183811015610631576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611610908490611724565b505050565b60008183106108f45781610631565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261167e908590611724565b50505050565b6001600160a01b0381166116c95760405162461bcd60e51b81526004018080602001828103825260268152602001806119036026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b611736826001600160a01b03166118dc565b611787576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106117c55780518252601f1990920191602091820191016117a6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611827576040519150601f19603f3d011682016040523d82523d6000602084013e61182c565b606091505b509150915081611883576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b80511561167e5780806020019051602081101561189f57600080fd5b505161167e5760405162461bcd60e51b815260040180806020018281038252602a815260200180611974602a913960400191505060405180910390fd5b3b15159056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820be24c55cd51eae283d83e930bf2ac23a3ee7132b575386957d356fa89d4b7eee64736f6c6343000511003200000000000000000000000027ff1bcf67c28aad5023302465861aeaba1c310e000000000000000000000000a3a7cba479df86c7f866280b90ebc3b25f2371f00000000000000000000000007dcbcbcb4ce9d3d1aca2835a14358992ffef28d2000000000000000000000000bea52413e26c38b51cbcb0d3661a25f2097f8574

Deployed Bytecode

0x6080604052600436106101cc5760003560e01c80637b0a47ee116100f7578063cd3daf9d11610095578063e9fad8ee11610064578063e9fad8ee1461050b578063ebe2b12b14610520578063ecd9ba8214610535578063f2fde38b1461056d576101cc565b8063cd3daf9d146104b7578063d1af0c7d146104cc578063daa5ee71146104e1578063df136d65146104f6576101cc565b80638da5cb5b116100d15780638da5cb5b146104475780638f32d59b1461045c578063a694fc3a14610485578063c8f33c91146104a2576101cc565b80637b0a47ee146103ea57806380faa57d146103ff5780638b87634714610414576101cc565b8063386a95251161016f5780636aa003711161013e5780636aa003711461037857806370a082311461038d578063715018a6146103c057806372f702f3146103d5576101cc565b8063386a9525146102f35780633c6b16ab146103085780633d18b912146103325780633fc6df6e14610347576101cc565b806318160ddd116101ab57806318160ddd146102755780631c1f78eb1461028a57806324d514241461029f5780632e1a7d4d146102c9576101cc565b80628cc262146101d15780630700037d1461021657806315c2ba1414610249575b600080fd5b3480156101dd57600080fd5b50610204600480360360208110156101f457600080fd5b50356001600160a01b03166105a0565b60408051918252519081900360200190f35b34801561022257600080fd5b506102046004803603602081101561023957600080fd5b50356001600160a01b0316610638565b34801561025557600080fd5b506102736004803603602081101561026c57600080fd5b503561064a565b005b34801561028157600080fd5b506102046107d2565b34801561029657600080fd5b506102046107d9565b3480156102ab57600080fd5b50610204600480360360208110156102c257600080fd5b50356107f9565b3480156102d557600080fd5b50610273600480360360208110156102ec57600080fd5b50356108fb565b3480156102ff57600080fd5b50610204610a8b565b34801561031457600080fd5b506102736004803603602081101561032b57600080fd5b5035610a91565b34801561033e57600080fd5b50610273610c19565b34801561035357600080fd5b5061035c610d3e565b604080516001600160a01b039092168252519081900360200190f35b34801561038457600080fd5b5061035c610d4d565b34801561039957600080fd5b50610204600480360360208110156103b057600080fd5b50356001600160a01b0316610d5c565b3480156103cc57600080fd5b50610273610d77565b3480156103e157600080fd5b5061035c610e1a565b3480156103f657600080fd5b50610204610e29565b34801561040b57600080fd5b50610204610e2f565b34801561042057600080fd5b506102046004803603602081101561043757600080fd5b50356001600160a01b0316610e3e565b34801561045357600080fd5b5061035c610e50565b34801561046857600080fd5b50610471610e5f565b604080519115158252519081900360200190f35b6102736004803603602081101561049b57600080fd5b5035610e70565b3480156104ae57600080fd5b50610204611085565b3480156104c357600080fd5b5061020461108b565b3480156104d857600080fd5b5061035c6110e7565b3480156104ed57600080fd5b5061035c6110f6565b34801561050257600080fd5b50610204611105565b34801561051757600080fd5b5061027361110b565b34801561052c57600080fd5b5061020461112e565b610273600480360360a081101561054b57600080fd5b5080359060208101359060ff6040820135169060608101359060800135611134565b34801561057957600080fd5b506102736004803603602081101561059057600080fd5b50356001600160a01b03166113dd565b6001600160a01b0381166000908152600c6020908152604080832054600b90925282205482916106319161062590670de0b6b3a764000090610619906105f4906105e861108b565b9063ffffffff61143f16565b6001600160a01b0389166000908152600e60205260409020549063ffffffff6114a116565b9063ffffffff6114fa16565b9063ffffffff61156416565b9392505050565b600c6020526000908152604090205481565b6001546001600160a01b031633146106935760405162461bcd60e51b815260040180806020018281038252602a81526020018061194a602a913960400191505060405180910390fd5b600061069d61108b565b6009556106a8610e2f565b6008556001600160a01b038116156106ef576106c3816105a0565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b60055442106107305760075461070c90839063ffffffff6114fa16565b600655426008819055600754610728919063ffffffff61156416565b60055561079b565b600554600090610746904263ffffffff61143f16565b9050600061075f600654836114a190919063ffffffff16565b60075490915061077990610619868463ffffffff61156416565b600655426008819055600754610795919063ffffffff61156416565b60055550505b6040805183815290517fcb94909754d27c309adf4167150f1f7aa04de40b6a0e6bb98b2ae80a2bf438f69181900360200190a15050565b600d545b90565b6000806107f36007546006546114a190919063ffffffff16565b91505090565b6000610803610e5f565b610854576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600061085e610e50565b90506001600160a01b0381163314156108f4576003546040805163a9059cbb60e01b81526001600160a01b038481166004830152602482018790529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156108c757600080fd5b505af11580156108db573d6000803e3d6000fd5b505050506040513d60208110156108f157600080fd5b50505b5090919050565b60028054600101908190553361090f61108b565b60095561091a610e2f565b6008556001600160a01b0381161561096157610935816105a0565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b600083116109aa576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b600d546109bd908463ffffffff61143f16565b600d55336000908152600e60205260409020546109e0908463ffffffff61143f16565b336000818152600e6020526040902091909155600454610a0c916001600160a01b0390911690856115be565b60408051848152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a2506002548114610a87576040805162461bcd60e51b815260206004820152601f60248201526000805160206118e3833981519152604482015290519081900360640190fd5b5050565b60075481565b6001546001600160a01b03163314610ada5760405162461bcd60e51b815260040180806020018281038252602a81526020018061194a602a913960400191505060405180910390fd5b6000610ae461108b565b600955610aef610e2f565b6008556001600160a01b03811615610b3657610b0a816105a0565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b6005544210610b7757600754610b5390839063ffffffff6114fa16565b600655426008819055600754610b6f919063ffffffff61156416565b600555610be2565b600554600090610b8d904263ffffffff61143f16565b90506000610ba6600654836114a190919063ffffffff16565b600754909150610bc090610619868463ffffffff61156416565b600655426008819055600754610bdc919063ffffffff61156416565b60055550505b6040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b600280546001019081905533610c2d61108b565b600955610c38610e2f565b6008556001600160a01b03811615610c7f57610c53816105a0565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b336000908152600c60205260409020548015610cf557336000818152600c6020526040812055600354610cbe916001600160a01b0390911690836115be565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b50506002548114610d3b576040805162461bcd60e51b815260206004820152601f60248201526000805160206118e3833981519152604482015290519081900360640190fd5b50565b6001546001600160a01b031681565b600a546001600160a01b031681565b6001600160a01b03166000908152600e602052604090205490565b610d7f610e5f565b610dd0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6004546001600160a01b031681565b60065481565b6000806107f342600554611615565b600b6020526000908152604090205481565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b600280546001019081905533610e8461108b565b600955610e8f610e2f565b6008556001600160a01b03811615610ed657610eaa816105a0565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b667c58508723800083610f21576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600d54610f34908563ffffffff61156416565b600d55336000908152600e6020526040902054610f57908563ffffffff61156416565b336000908152600e602052604080822092909255600a5491516001600160a01b03909216916108fc84150291849190818181858888f19350505050158015610fa3573d6000803e3d6000fd5b50600454610fc2906001600160a01b031633308763ffffffff61162416565b60408051858152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2600a54604080516001600160a01b0390921682526020820183905280517fb3d3e40d8f7fffb7b4ca23af2605005b744e9c82d438f3c98a7bc597b50593e99281900390910190a150506002548114610a87576040805162461bcd60e51b815260206004820152601f60248201526000805160206118e3833981519152604482015290519081900360640190fd5b60085481565b6000600d54600014156110a157506009546107d6565b60006107f36110d8600d54610619670de0b6b3a76400006110cc6006546110cc6008546105e8610e2f565b9063ffffffff6114a116565b6009549063ffffffff61156416565b6003546001600160a01b031681565b600a546001600160a01b031690565b60095481565b336000908152600e6020526040902054611124906108fb565b61112c610c19565b565b60055481565b60028054600101908190553361114861108b565b600955611153610e2f565b6008556001600160a01b0381161561119a5761116e816105a0565b6001600160a01b0382166000908152600c6020908152604080832093909355600954600b909152919020555b667c585087238000876111e5576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b600d546111f8908963ffffffff61156416565b600d55336000908152600e602052604090205461121b908963ffffffff61156416565b336000818152600e60205260408082209390935560048054845163d505accf60e01b815291820193909352306024820152604481018c9052606481018b905260ff8a16608482015260a4810189905260c4810188905292516001600160a01b039092169263d505accf9260e4808301939282900301818387803b1580156112a157600080fd5b505af11580156112b5573d6000803e3d6000fd5b5050600a546040516001600160a01b03909116925083156108fc02915083906000818181858888f193505050501580156112f3573d6000803e3d6000fd5b50600454611312906001600160a01b031633308b63ffffffff61162416565b60408051898152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a2600a54604080516001600160a01b0390921682526020820183905280517fb3d3e40d8f7fffb7b4ca23af2605005b744e9c82d438f3c98a7bc597b50593e99281900390910190a1505060025481146113d5576040805162461bcd60e51b815260206004820152601f60248201526000805160206118e3833981519152604482015290519081900360640190fd5b505050505050565b6113e5610e5f565b611436576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610d3b81611684565b600082821115611496576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6000826114b05750600061149b565b828202828482816114bd57fe5b04146106315760405162461bcd60e51b81526004018080602001828103825260218152602001806119296021913960400191505060405180910390fd5b6000808211611550576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b600082848161155b57fe5b04949350505050565b600082820183811015610631576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611610908490611724565b505050565b60008183106108f45781610631565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261167e908590611724565b50505050565b6001600160a01b0381166116c95760405162461bcd60e51b81526004018080602001828103825260268152602001806119036026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b611736826001600160a01b03166118dc565b611787576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106117c55780518252601f1990920191602091820191016117a6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611827576040519150601f19603f3d011682016040523d82523d6000602084013e61182c565b606091505b509150915081611883576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b80511561167e5780806020019051602081101561189f57600080fd5b505161167e5760405162461bcd60e51b815260040180806020018281038252602a815260200180611974602a913960400191505060405180910390fd5b3b15159056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820be24c55cd51eae283d83e930bf2ac23a3ee7132b575386957d356fa89d4b7eee64736f6c63430005110032

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

00000000000000000000000027ff1bcf67c28aad5023302465861aeaba1c310e000000000000000000000000a3a7cba479df86c7f866280b90ebc3b25f2371f00000000000000000000000007dcbcbcb4ce9d3d1aca2835a14358992ffef28d2000000000000000000000000bea52413e26c38b51cbcb0d3661a25f2097f8574

-----Decoded View---------------
Arg [0] : _rewardsDistribution (address): 0x27ff1bCF67c28aad5023302465861aeABA1C310e
Arg [1] : _rewardsToken (address): 0xA3a7CBA479dF86C7F866280b90Ebc3B25f2371F0
Arg [2] : _stakingToken (address): 0x7DCbCbcB4cE9d3d1acA2835a14358992FfeF28D2
Arg [3] : _collectionAddress (address): 0xbea52413E26C38B51cBcb0D3661a25f2097F8574

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000027ff1bcf67c28aad5023302465861aeaba1c310e
Arg [1] : 000000000000000000000000a3a7cba479df86c7f866280b90ebc3b25f2371f0
Arg [2] : 0000000000000000000000007dcbcbcb4ce9d3d1aca2835a14358992ffef28d2
Arg [3] : 000000000000000000000000bea52413e26c38b51cbcb0d3661a25f2097f8574


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.