ETH Price: $3,109.38 (-0.98%)

Contract

0xc54B9F82C1c54E9D4d274d633c7523f2299c42A0
 
Transaction Hash
Method
Block
From
To
Exit211894922024-11-15 0:24:113 days ago1731630251IN
0xc54B9F82...2299c42A0
0 ETH0.0021183923.84108136
Get Reward211894632024-11-15 0:18:233 days ago1731629903IN
0xc54B9F82...2299c42A0
0 ETH0.0017621624.25788689
Exit206217992024-08-27 18:45:3582 days ago1724784335IN
0xc54B9F82...2299c42A0
0 ETH0.000185182.08415835
Get Reward206217942024-08-27 18:44:3582 days ago1724784275IN
0xc54B9F82...2299c42A0
0 ETH0.000151252.08213346
Exit203953502024-07-27 3:58:47114 days ago1722052727IN
0xc54B9F82...2299c42A0
0 ETH0.000211781.85474842
Exit202914902024-07-12 16:02:35128 days ago1720800155IN
0xc54B9F82...2299c42A0
0 ETH0.000494815.5687375
Get Reward202914762024-07-12 15:59:47128 days ago1720799987IN
0xc54B9F82...2299c42A0
0 ETH0.00039685.46237715
Exit200268902024-06-05 16:42:11165 days ago1717605731IN
0xc54B9F82...2299c42A0
0 ETH0.001833720.6370124
Get Reward200268852024-06-05 16:41:11165 days ago1717605671IN
0xc54B9F82...2299c42A0
0 ETH0.0014752520.30829039
Exit195796682024-04-04 3:17:47228 days ago1712200667IN
0xc54B9F82...2299c42A0
0 ETH0.0026607920.54174431
Exit194306382024-03-14 3:39:59249 days ago1710387599IN
0xc54B9F82...2299c42A0
0 ETH0.0060018652.56262697
Exit193724852024-03-06 0:15:11257 days ago1709684111IN
0xc54B9F82...2299c42A0
0 ETH0.0104212880.45400902
Exit193518812024-03-03 3:13:11260 days ago1709435591IN
0xc54B9F82...2299c42A0
0 ETH0.0035246139.66699921
Get Reward193518742024-03-03 3:11:47260 days ago1709435507IN
0xc54B9F82...2299c42A0
0 ETH0.0034621640.10710473
Exit193135582024-02-26 18:35:35265 days ago1708972535IN
0xc54B9F82...2299c42A0
0 ETH0.0063858855.92576075
Exit192209522024-02-13 18:47:11278 days ago1707850031IN
0xc54B9F82...2299c42A0
0 ETH0.0037622132.94845205
Exit192170522024-02-13 5:37:11279 days ago1707802631IN
0xc54B9F82...2299c42A0
0 ETH0.0020553318
Exit191997402024-02-10 19:20:11281 days ago1707592811IN
0xc54B9F82...2299c42A0
0 ETH0.0041853736.65433518
Exit191990272024-02-10 16:56:47281 days ago1707584207IN
0xc54B9F82...2299c42A0
0 ETH0.0037471532.81654357
Exit190353452024-01-18 17:50:23304 days ago1705600223IN
0xc54B9F82...2299c42A0
0 ETH0.0065012156.93579727
Exit190026892024-01-14 4:17:59309 days ago1705205879IN
0xc54B9F82...2299c42A0
0 ETH0.0023671618.27485507
Exit188644232023-12-25 18:08:47328 days ago1703527727IN
0xc54B9F82...2299c42A0
0 ETH0.0025723222.52771178
Exit187580882023-12-10 20:07:11343 days ago1702238831IN
0xc54B9F82...2299c42A0
0 ETH0.0035934640.4419539
Get Reward187580752023-12-10 20:04:35343 days ago1702238675IN
0xc54B9F82...2299c42A0
0 ETH0.0031378337.71306318
Exit187501322023-12-09 17:23:47344 days ago1702142627IN
0xc54B9F82...2299c42A0
0 ETH0.0051028244.68913212
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
132189562021-09-13 18:22:551161 days ago1631557375  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingRewards

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-09-13
*/

/**
 *Submitted for verification at Etherscan.io on 2021-09-13
*/

/**
 *Submitted for verification at Etherscan.io on 2021-06-24
*/

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.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, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        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");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        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, reverting 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) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}




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

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

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

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

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

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

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

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



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;

    function withdraw(uint256 amount) external;

    function getReward() external;

    function exit() external;
}










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

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

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

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

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

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        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 virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}








/**
 * @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);
    }
}












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

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

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}


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

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

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

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





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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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


// Inheritance



abstract contract RewardsDistributionRecipient {
    address public rewardsDistribution;

    function notifyRewardAmount(uint256 reward) external virtual;

    modifier onlyRewardsDistribution() {
        require(msg.sender == rewardsDistribution, "Caller is not RewardsDistribution contract");
        _;
    }
}

contract StakingRewards is 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 = 135 days;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;

    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
    ) {
        rewardsToken = IERC20(_rewardsToken);
        stakingToken = IERC20(_stakingToken);
        rewardsDistribution = _rewardsDistribution;
    }

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

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

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

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

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

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

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

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

    function stakeWithPermit(uint256 amount, uint deadline, uint8 v, bytes32 r, bytes32 s) external nonReentrant updateReward(msg.sender) {
        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);

        stakingToken.safeTransferFrom(msg.sender, address(this), amount);
        emit Staked(msg.sender, amount);
    }

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

    function withdraw(uint256 amount) public override 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);
    }

    function getReward() public override 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 override {
        withdraw(_balances[msg.sender]);
        getReward();
    }

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

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

        // 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");

        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp.add(rewardsDuration);
        emit RewardAdded(reward);
    }

    /* ========== MODIFIERS ========== */

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

    /* ========== EVENTS ========== */

    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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rewardsDistribution","type":"address"},{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_stakingToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"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":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","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":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000600455600060055562b1fa8060065534801561002157600080fd5b506040516122ab3803806122ab8339818101604052606081101561004457600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050506001808190555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050612167806101446000396000f3fe608060405234801561001057600080fd5b50600436106101415760003560e01c80637b0a47ee116100b8578063cd3daf9d1161007c578063cd3daf9d14610456578063d1af0c7d14610474578063df136d65146104a8578063e9fad8ee146104c6578063ebe2b12b146104d0578063ecd9ba82146104ee57610141565b80637b0a47ee1461037657806380faa57d146103945780638b876347146103b2578063a694fc3a1461040a578063c8f33c911461043857610141565b8063386a95251161010a578063386a9525146102605780633c6b16ab1461027e5780633d18b912146102ac5780633fc6df6e146102b657806370a08231146102ea57806372f702f31461034257610141565b80628cc262146101465780630700037d1461019e57806318160ddd146101f65780631c1f78eb146102145780632e1a7d4d14610232575b600080fd5b6101886004803603602081101561015c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610547565b6040518082815260200191505060405180910390f35b6101e0600480360360208110156101b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610665565b6040518082815260200191505060405180910390f35b6101fe61067d565b6040518082815260200191505060405180910390f35b61021c610687565b6040518082815260200191505060405180910390f35b61025e6004803603602081101561024857600080fd5b81019080803590602001909291905050506106a5565b005b6102686109d6565b6040518082815260200191505060405180910390f35b6102aa6004803603602081101561029457600080fd5b81019080803590602001909291905050506109dc565b005b6102b4610da2565b005b6102be611040565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61032c6004803603602081101561030057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611064565b6040518082815260200191505060405180910390f35b61034a6110ad565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61037e6110d3565b6040518082815260200191505060405180910390f35b61039c6110d9565b6040518082815260200191505060405180910390f35b6103f4600480360360208110156103c857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110ec565b6040518082815260200191505060405180910390f35b6104366004803603602081101561042057600080fd5b8101908080359060200190929190505050611104565b005b610440611437565b6040518082815260200191505060405180910390f35b61045e61143d565b6040518082815260200191505060405180910390f35b61047c6114cb565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104b06114f1565b6040518082815260200191505060405180910390f35b6104ce6114f7565b005b6104d8611549565b6040518082815260200191505060405180910390f35b610545600480360360a081101561050457600080fd5b810190808035906020019092919080359060200190929190803560ff169060200190929190803590602001909291908035906020019092919050505061154f565b005b600061065e600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610650670de0b6b3a76400006106426105f4600960008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546105e661143d565b61197290919063ffffffff16565b600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119f590919063ffffffff16565b611a7b90919063ffffffff16565b611b0490919063ffffffff16565b9050919050565b600a6020528060005260406000206000915090505481565b6000600b54905090565b60006106a06006546005546119f590919063ffffffff16565b905090565b6002600154141561071e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60026001819055503361072f61143d565b60088190555061073d6110d9565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461080a5761078081610547565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60008211610880576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f43616e6e6f74207769746864726177203000000000000000000000000000000081525060200191505060405180910390fd5b61089582600b5461197290919063ffffffff16565b600b819055506108ed82600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461197290919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061097d3383600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611b8c9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5836040518082815260200191505060405180910390a2506001808190555050565b60065481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806120de602a913960400191505060405180910390fd5b6000610a8a61143d565b600881905550610a986110d9565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b6557610adb81610547565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6004544210610b8e57610b8360065483611a7b90919063ffffffff16565b600581905550610bf0565b6000610ba54260045461197290919063ffffffff16565b90506000610bbe600554836119f590919063ffffffff16565b9050610be7600654610bd98387611b0490919063ffffffff16565b611a7b90919063ffffffff16565b60058190555050505b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610c7b57600080fd5b505afa158015610c8f573d6000803e3d6000fd5b505050506040513d6020811015610ca557600080fd5b81019080805190602001909291905050509050610ccd60065482611a7b90919063ffffffff16565b6005541115610d44576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f50726f76696465642072657761726420746f6f2068696768000000000000000081525060200191505060405180910390fd5b42600781905550610d6060065442611b0490919063ffffffff16565b6004819055507fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d836040518082815260200191505060405180910390a1505050565b60026001541415610e1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b600260018190555033610e2c61143d565b600881905550610e3a6110d9565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610f0757610e7d81610547565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811115611035576000600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610fe63382600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611b8c9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486826040518082815260200191505060405180910390a25b505060018081905550565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60006110e742600454611c2e565b905090565b60096020528060005260406000206000915090505481565b6002600154141561117d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60026001819055503361118e61143d565b60088190555061119c6110d9565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611269576111df81610547565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600082116112df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f43616e6e6f74207374616b65203000000000000000000000000000000000000081525060200191505060405180910390fd5b6112f482600b54611b0490919063ffffffff16565b600b8190555061134c82600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b0490919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113de333084600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611c47909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d836040518082815260200191505060405180910390a2506001808190555050565b60075481565b600080600b5414156114535760085490506114c8565b6114c56114b4600b546114a6670de0b6b3a764000061149860055461148a60075461147c6110d9565b61197290919063ffffffff16565b6119f590919063ffffffff16565b6119f590919063ffffffff16565b611a7b90919063ffffffff16565b600854611b0490919063ffffffff16565b90505b90565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b61153f600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106a5565b611547610da2565b565b60045481565b600260015414156115c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6002600181905550336115d961143d565b6008819055506115e76110d9565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146116b45761162a81610547565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000861161172a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f43616e6e6f74207374616b65203000000000000000000000000000000000000081525060200191505060405180910390fd5b61173f86600b54611b0490919063ffffffff16565b600b8190555061179786600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b0490919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d505accf333089898989896040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018460ff168152602001838152602001828152602001975050505050505050600060405180830381600087803b1580156118ae57600080fd5b505af11580156118c2573d6000803e3d6000fd5b50505050611915333088600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611c47909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d876040518082815260200191505060405180910390a250600180819055505050505050565b6000828211156119ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b818303905092915050565b600080831415611a085760009050611a75565b6000828402905082848281611a1957fe5b0414611a70576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806120bd6021913960400191505060405180910390fd5b809150505b92915050565b6000808211611af2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525060200191505060405180910390fd5b818381611afb57fe5b04905092915050565b600080828401905083811015611b82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b611c298363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611d08565b505050565b6000818310611c3d5781611c3f565b825b905092915050565b611d02846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611d08565b50505050565b6000611d6a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611df79092919063ffffffff16565b9050600081511115611df257808060200190516020811015611d8b57600080fd5b8101908080519060200190929190505050611df1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612108602a913960400191505060405180910390fd5b5b505050565b6060611e068484600085611e0f565b90509392505050565b606082471015611e6a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806120976026913960400191505060405180910390fd5b611e7385611fb7565b611ee5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081525060200191505060405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310611f345780518252602082019150602081019050602083039250611f11565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611f96576040519150601f19603f3d011682016040523d82523d6000602084013e611f9b565b606091505b5091509150611fab828286611fca565b92505050949350505050565b600080823b905060008111915050919050565b60608315611fda5782905061208f565b600083511115611fed5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612054578082015181840152602081019050612039565b50505050905090810190601f1680156120815780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b939250505056fe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220ad49327ee03bf49eac81c6c537ac4202ec1278c519c3eb11b0a87b1c955883da64736f6c63430007060033000000000000000000000000d0ec21e01589062f4c40d42c4a05544f4e59bb74000000000000000000000000c770eefad204b5180df6a14ee197d99d808ee52d000000000000000000000000470e8de2ebaef52014a47cb5e6af86884947f08c

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101415760003560e01c80637b0a47ee116100b8578063cd3daf9d1161007c578063cd3daf9d14610456578063d1af0c7d14610474578063df136d65146104a8578063e9fad8ee146104c6578063ebe2b12b146104d0578063ecd9ba82146104ee57610141565b80637b0a47ee1461037657806380faa57d146103945780638b876347146103b2578063a694fc3a1461040a578063c8f33c911461043857610141565b8063386a95251161010a578063386a9525146102605780633c6b16ab1461027e5780633d18b912146102ac5780633fc6df6e146102b657806370a08231146102ea57806372f702f31461034257610141565b80628cc262146101465780630700037d1461019e57806318160ddd146101f65780631c1f78eb146102145780632e1a7d4d14610232575b600080fd5b6101886004803603602081101561015c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610547565b6040518082815260200191505060405180910390f35b6101e0600480360360208110156101b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610665565b6040518082815260200191505060405180910390f35b6101fe61067d565b6040518082815260200191505060405180910390f35b61021c610687565b6040518082815260200191505060405180910390f35b61025e6004803603602081101561024857600080fd5b81019080803590602001909291905050506106a5565b005b6102686109d6565b6040518082815260200191505060405180910390f35b6102aa6004803603602081101561029457600080fd5b81019080803590602001909291905050506109dc565b005b6102b4610da2565b005b6102be611040565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61032c6004803603602081101561030057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611064565b6040518082815260200191505060405180910390f35b61034a6110ad565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61037e6110d3565b6040518082815260200191505060405180910390f35b61039c6110d9565b6040518082815260200191505060405180910390f35b6103f4600480360360208110156103c857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110ec565b6040518082815260200191505060405180910390f35b6104366004803603602081101561042057600080fd5b8101908080359060200190929190505050611104565b005b610440611437565b6040518082815260200191505060405180910390f35b61045e61143d565b6040518082815260200191505060405180910390f35b61047c6114cb565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104b06114f1565b6040518082815260200191505060405180910390f35b6104ce6114f7565b005b6104d8611549565b6040518082815260200191505060405180910390f35b610545600480360360a081101561050457600080fd5b810190808035906020019092919080359060200190929190803560ff169060200190929190803590602001909291908035906020019092919050505061154f565b005b600061065e600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610650670de0b6b3a76400006106426105f4600960008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546105e661143d565b61197290919063ffffffff16565b600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119f590919063ffffffff16565b611a7b90919063ffffffff16565b611b0490919063ffffffff16565b9050919050565b600a6020528060005260406000206000915090505481565b6000600b54905090565b60006106a06006546005546119f590919063ffffffff16565b905090565b6002600154141561071e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60026001819055503361072f61143d565b60088190555061073d6110d9565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461080a5761078081610547565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60008211610880576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f43616e6e6f74207769746864726177203000000000000000000000000000000081525060200191505060405180910390fd5b61089582600b5461197290919063ffffffff16565b600b819055506108ed82600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461197290919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061097d3383600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611b8c9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5836040518082815260200191505060405180910390a2506001808190555050565b60065481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806120de602a913960400191505060405180910390fd5b6000610a8a61143d565b600881905550610a986110d9565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b6557610adb81610547565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6004544210610b8e57610b8360065483611a7b90919063ffffffff16565b600581905550610bf0565b6000610ba54260045461197290919063ffffffff16565b90506000610bbe600554836119f590919063ffffffff16565b9050610be7600654610bd98387611b0490919063ffffffff16565b611a7b90919063ffffffff16565b60058190555050505b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610c7b57600080fd5b505afa158015610c8f573d6000803e3d6000fd5b505050506040513d6020811015610ca557600080fd5b81019080805190602001909291905050509050610ccd60065482611a7b90919063ffffffff16565b6005541115610d44576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f50726f76696465642072657761726420746f6f2068696768000000000000000081525060200191505060405180910390fd5b42600781905550610d6060065442611b0490919063ffffffff16565b6004819055507fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d836040518082815260200191505060405180910390a1505050565b60026001541415610e1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b600260018190555033610e2c61143d565b600881905550610e3a6110d9565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610f0757610e7d81610547565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811115611035576000600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610fe63382600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611b8c9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486826040518082815260200191505060405180910390a25b505060018081905550565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60055481565b60006110e742600454611c2e565b905090565b60096020528060005260406000206000915090505481565b6002600154141561117d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b60026001819055503361118e61143d565b60088190555061119c6110d9565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611269576111df81610547565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600082116112df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f43616e6e6f74207374616b65203000000000000000000000000000000000000081525060200191505060405180910390fd5b6112f482600b54611b0490919063ffffffff16565b600b8190555061134c82600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b0490919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113de333084600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611c47909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d836040518082815260200191505060405180910390a2506001808190555050565b60075481565b600080600b5414156114535760085490506114c8565b6114c56114b4600b546114a6670de0b6b3a764000061149860055461148a60075461147c6110d9565b61197290919063ffffffff16565b6119f590919063ffffffff16565b6119f590919063ffffffff16565b611a7b90919063ffffffff16565b600854611b0490919063ffffffff16565b90505b90565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b61153f600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546106a5565b611547610da2565b565b60045481565b600260015414156115c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0081525060200191505060405180910390fd5b6002600181905550336115d961143d565b6008819055506115e76110d9565b600781905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146116b45761162a81610547565b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600854600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000861161172a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f43616e6e6f74207374616b65203000000000000000000000000000000000000081525060200191505060405180910390fd5b61173f86600b54611b0490919063ffffffff16565b600b8190555061179786600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b0490919063ffffffff16565b600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d505accf333089898989896040518863ffffffff1660e01b8152600401808873ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018460ff168152602001838152602001828152602001975050505050505050600060405180830381600087803b1580156118ae57600080fd5b505af11580156118c2573d6000803e3d6000fd5b50505050611915333088600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611c47909392919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d876040518082815260200191505060405180910390a250600180819055505050505050565b6000828211156119ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b818303905092915050565b600080831415611a085760009050611a75565b6000828402905082848281611a1957fe5b0414611a70576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806120bd6021913960400191505060405180910390fd5b809150505b92915050565b6000808211611af2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525060200191505060405180910390fd5b818381611afb57fe5b04905092915050565b600080828401905083811015611b82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b611c298363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611d08565b505050565b6000818310611c3d5781611c3f565b825b905092915050565b611d02846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611d08565b50505050565b6000611d6a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611df79092919063ffffffff16565b9050600081511115611df257808060200190516020811015611d8b57600080fd5b8101908080519060200190929190505050611df1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612108602a913960400191505060405180910390fd5b5b505050565b6060611e068484600085611e0f565b90509392505050565b606082471015611e6a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806120976026913960400191505060405180910390fd5b611e7385611fb7565b611ee5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081525060200191505060405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310611f345780518252602082019150602081019050602083039250611f11565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611f96576040519150601f19603f3d011682016040523d82523d6000602084013e611f9b565b606091505b5091509150611fab828286611fca565b92505050949350505050565b600080823b905060008111915050919050565b60608315611fda5782905061208f565b600083511115611fed5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612054578082015181840152602081019050612039565b50505050905090810190601f1680156120815780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b939250505056fe416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742052657761726473446973747269627574696f6e20636f6e74726163745361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220ad49327ee03bf49eac81c6c537ac4202ec1278c519c3eb11b0a87b1c955883da64736f6c63430007060033

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

000000000000000000000000d0ec21e01589062f4c40d42c4a05544f4e59bb74000000000000000000000000c770eefad204b5180df6a14ee197d99d808ee52d000000000000000000000000470e8de2ebaef52014a47cb5e6af86884947f08c

-----Decoded View---------------
Arg [0] : _rewardsDistribution (address): 0xD0ec21e01589062F4c40d42c4A05544f4E59Bb74
Arg [1] : _rewardsToken (address): 0xc770EEfAd204B5180dF6a14Ee197D99d808ee52d
Arg [2] : _stakingToken (address): 0x470e8de2eBaef52014A47Cb5E6aF86884947F08c

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000d0ec21e01589062f4c40d42c4a05544f4e59bb74
Arg [1] : 000000000000000000000000c770eefad204b5180df6a14ee197d99d808ee52d
Arg [2] : 000000000000000000000000470e8de2ebaef52014a47cb5e6af86884947f08c


Deployed Bytecode Sourcemap

29451:5762:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31246:207;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;29999:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;30512:102;;;:::i;:::-;;;;;;;;;;;;;;;;;;;31461:130;;;:::i;:::-;;;;;;;;;;;;;;;;;;;32605:366;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;29807:41;;;:::i;:::-;;;;;;;;;;;;;;;;;;;33473:1092;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;32979:316;;;:::i;:::-;;29178:34;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;30622:121;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;29700:26;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;29771:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;30751:140;;;:::i;:::-;;;;;;;;;;;;;;;;;;;29935:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;32219:378;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;29855:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;30899:339;;;:::i;:::-;;;;;;;;;;;;;;;;;;;29667:26;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;29891:35;;;:::i;:::-;;;;;;;;;;;;;;;;;;;33303:106;;;:::i;:::-;;29733:31;;;:::i;:::-;;;;;;;;;;;;;;;;;;;31653:558;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;31246:207;31309:7;31336:109;31428:7;:16;31436:7;31428:16;;;;;;;;;;;;;;;;31336:87;31418:4;31336:77;31359:53;31380:22;:31;31403:7;31380:31;;;;;;;;;;;;;;;;31359:16;:14;:16::i;:::-;:20;;:53;;;;:::i;:::-;31336:9;:18;31346:7;31336:18;;;;;;;;;;;;;;;;:22;;:77;;;;:::i;:::-;:81;;:87;;;;:::i;:::-;:91;;:109;;;;:::i;:::-;31329:116;;31246:207;;;:::o;29999:42::-;;;;;;;;;;;;;;;;;:::o;30512:102::-;30567:7;30594:12;;30587:19;;30512:102;:::o;31461:130::-;31525:7;31552:31;31567:15;;31552:10;;:14;;:31;;;;:::i;:::-;31545:38;;31461:130;:::o;32605:366::-;28145:1;28751:7;;:19;;28743:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28145:1;28884:7;:18;;;;32681:10:::1;34691:16;:14;:16::i;:::-;34668:20;:39;;;;34735:26;:24;:26::i;:::-;34718:14;:43;;;;34795:1;34776:21;;:7;:21;;;34772:157;;34833:15;34840:7;34833:6;:15::i;:::-;34814:7;:16;34822:7;34814:16;;;;;;;;;;;;;;;:34;;;;34897:20;;34863:22;:31;34886:7;34863:31;;;;;;;;;;;;;;;:54;;;;34772:157;32721:1:::2;32712:6;:10;32704:40;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;32770:24;32787:6;32770:12;;:16;;:24;;;;:::i;:::-;32755:12;:39;;;;32829:33;32855:6;32829:9;:21;32839:10;32829:21;;;;;;;;;;;;;;;;:25;;:33;;;;:::i;:::-;32805:9;:21;32815:10;32805:21;;;;;;;;;;;;;;;:57;;;;32873:45;32899:10;32911:6;32873:12;;;;;;;;;;;:25;;;;:45;;;;;:::i;:::-;32944:10;32934:29;;;32956:6;32934:29;;;;;;;;;;;;;;;;;;28915:1:::1;28101::::0;29063:7;:22;;;;32605:366;:::o;29807:41::-;;;;:::o;33473:1092::-;29358:19;;;;;;;;;;29344:33;;:10;:33;;;29336:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33580:1:::1;34691:16;:14;:16::i;:::-;34668:20;:39;;;;34735:26;:24;:26::i;:::-;34718:14;:43;;;;34795:1;34776:21;;:7;:21;;;34772:157;;34833:15;34840:7;34833:6;:15::i;:::-;34814:7;:16;34822:7;34814:16;;;;;;;;;;;;;;;:34;;;;34897:20;;34863:22;:31;34886:7;34863:31;;;;;;;;;;;;;;;:54;;;;34772:157;33618:12:::2;;33599:15;:31;33595:318;;33660:27;33671:15;;33660:6;:10;;:27;;;;:::i;:::-;33647:10;:40;;;;33595:318;;;33720:17;33740:33;33757:15;33740:12;;:16;;:33;;;;:::i;:::-;33720:53;;33788:16;33807:25;33821:10;;33807:9;:13;;:25;;;;:::i;:::-;33788:44;;33860:41;33885:15;;33860:20;33871:8;33860:6;:10;;:20;;;;:::i;:::-;:24;;:41;;;;:::i;:::-;33847:10;:54;;;;33595:318;;;34273:12;34288;;;;;;;;;;;:22;;;34319:4;34288:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;34273:52;;34358:28;34370:15;;34358:7;:11;;:28;;;;:::i;:::-;34344:10;;:42;;34336:79;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;34445:15;34428:14;:32;;;;34486:36;34506:15;;34486;:19;;:36;;;;:::i;:::-;34471:12;:51;;;;34538:19;34550:6;34538:19;;;;;;;;;;;;;;;;;;34939:1;29435::::1;33473:1092:::0;:::o;32979:316::-;28145:1;28751:7;;:19;;28743:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28145:1;28884:7;:18;;;;33042:10:::1;34691:16;:14;:16::i;:::-;34668:20;:39;;;;34735:26;:24;:26::i;:::-;34718:14;:43;;;;34795:1;34776:21;;:7;:21;;;34772:157;;34833:15;34840:7;34833:6;:15::i;:::-;34814:7;:16;34822:7;34814:16;;;;;;;;;;;;;;;:34;;;;34897:20;;34863:22;:31;34886:7;34863:31;;;;;;;;;;;;;;;:54;;;;34772:157;33065:14:::2;33082:7;:19;33090:10;33082:19;;;;;;;;;;;;;;;;33065:36;;33125:1;33116:6;:10;33112:176;;;33165:1;33143:7;:19;33151:10;33143:19;;;;;;;;;;;;;;;:23;;;;33181:45;33207:10;33219:6;33181:12;;;;;;;;;;;:25;;;;:45;;;;;:::i;:::-;33257:10;33246:30;;;33269:6;33246:30;;;;;;;;;;;;;;;;;;33112:176;34939:1;28915::::1;28101::::0;29063:7;:22;;;;32979:316::o;29178:34::-;;;;;;;;;;;;:::o;30622:121::-;30690:7;30717:9;:18;30727:7;30717:18;;;;;;;;;;;;;;;;30710:25;;30622:121;;;:::o;29700:26::-;;;;;;;;;;;;;:::o;29771:29::-;;;;:::o;30751:140::-;30817:7;30844:39;30853:15;30870:12;;30844:8;:39::i;:::-;30837:46;;30751:140;:::o;29935:57::-;;;;;;;;;;;;;;;;;:::o;32219:378::-;28145:1;28751:7;;:19;;28743:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28145:1;28884:7;:18;;;;32294:10:::1;34691:16;:14;:16::i;:::-;34668:20;:39;;;;34735:26;:24;:26::i;:::-;34718:14;:43;;;;34795:1;34776:21;;:7;:21;;;34772:157;;34833:15;34840:7;34833:6;:15::i;:::-;34814:7;:16;34822:7;34814:16;;;;;;;;;;;;;;;:34;;;;34897:20;;34863:22;:31;34886:7;34863:31;;;;;;;;;;;;;;;:54;;;;34772:157;32334:1:::2;32325:6;:10;32317:37;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;32380:24;32397:6;32380:12;;:16;;:24;;;;:::i;:::-;32365:12;:39;;;;32439:33;32465:6;32439:9;:21;32449:10;32439:21;;;;;;;;;;;;;;;;:25;;:33;;;;:::i;:::-;32415:9;:21;32425:10;32415:21;;;;;;;;;;;;;;;:57;;;;32483:64;32513:10;32533:4;32540:6;32483:12;;;;;;;;;;;:29;;;;:64;;;;;;:::i;:::-;32570:10;32563:26;;;32582:6;32563:26;;;;;;;;;;;;;;;;;;28915:1:::1;28101::::0;29063:7;:22;;;;32219:378;:::o;29855:29::-;;;;:::o;30899:339::-;30955:7;30995:1;30979:12;;:17;30975:77;;;31020:20;;31013:27;;;;30975:77;31082:148;31125:90;31202:12;;31125:72;31192:4;31125:62;31176:10;;31125:46;31156:14;;31125:26;:24;:26::i;:::-;:30;;:46;;;;:::i;:::-;:50;;:62;;;;:::i;:::-;:66;;:72;;;;:::i;:::-;:76;;:90;;;;:::i;:::-;31082:20;;:24;;:148;;;;:::i;:::-;31062:168;;30899:339;;:::o;29667:26::-;;;;;;;;;;;;;:::o;29891:35::-;;;;:::o;33303:106::-;33348:31;33357:9;:21;33367:10;33357:21;;;;;;;;;;;;;;;;33348:8;:31::i;:::-;33390:11;:9;:11::i;:::-;33303:106::o;29733:31::-;;;;:::o;31653:558::-;28145:1;28751:7;;:19;;28743:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28145:1;28884:7;:18;;;;31775:10:::1;34691:16;:14;:16::i;:::-;34668:20;:39;;;;34735:26;:24;:26::i;:::-;34718:14;:43;;;;34795:1;34776:21;;:7;:21;;;34772:157;;34833:15;34840:7;34833:6;:15::i;:::-;34814:7;:16;34822:7;34814:16;;;;;;;;;;;;;;;:34;;;;34897:20;;34863:22;:31;34886:7;34863:31;;;;;;;;;;;;;;;:54;;;;34772:157;31815:1:::2;31806:6;:10;31798:37;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;31861:24;31878:6;31861:12;;:16;;:24;;;;:::i;:::-;31846:12;:39;;;;31920:33;31946:6;31920:9;:21;31930:10;31920:21;;;;;;;;;;;;;;;;:25;;:33;;;;:::i;:::-;31896:9;:21;31906:10;31896:21;;;;;;;;;;;;;;;:57;;;;32009:12;;;;;;;;;;;31985:45;;;32031:10;32051:4;32058:6;32066:8;32076:1;32079;32082;31985:99;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;32097:64;32127:10;32147:4;32154:6;32097:12;;;;;;;;;;;:29;;;;:64;;;;;;:::i;:::-;32184:10;32177:26;;;32196:6;32177:26;;;;;;;;;;;;;;;;;;28915:1:::1;28101::::0;29063:7;:22;;;;31653:558;;;;;:::o;3378:158::-;3436:7;3469:1;3464;:6;;3456:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3527:1;3523;:5;3516:12;;3378:158;;;;:::o;3795:220::-;3853:7;3882:1;3877;:6;3873:20;;;3892:1;3885:8;;;;3873:20;3904:9;3920:1;3916;:5;3904:17;;3949:1;3944;3940;:5;;;;;;:10;3932:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4006:1;3999:8;;;3795:220;;;;;:::o;4493:153::-;4551:7;4583:1;4579;:5;4571:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4637:1;4633;:5;;;;;;4626:12;;4493:153;;;;:::o;2916:179::-;2974:7;2994:9;3010:1;3006;:5;2994:17;;3035:1;3030;:6;;3022:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3086:1;3079:8;;;2916:179;;;;:::o;23413:177::-;23496:86;23516:5;23546:23;;;23571:2;23575:5;23523:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23496:19;:86::i;:::-;23413:177;;;:::o;14465:106::-;14523:7;14554:1;14550;:5;:13;;14562:1;14550:13;;;14558:1;14550:13;14543:20;;14465:106;;;;:::o;23598:205::-;23699:96;23719:5;23749:27;;;23778:4;23784:2;23788:5;23726:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23699:19;:96::i;:::-;23598:205;;;;:::o;25718:761::-;26142:23;26168:69;26196:4;26168:69;;;;;;;;;;;;;;;;;26176:5;26168:27;;;;:69;;;;;:::i;:::-;26142:95;;26272:1;26252:10;:17;:21;26248:224;;;26394:10;26383:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26375:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26248:224;25718:761;;;:::o;18511:195::-;18614:12;18646:52;18668:6;18676:4;18682:1;18685:12;18646:21;:52::i;:::-;18639:59;;18511:195;;;;;:::o;19563:530::-;19690:12;19748:5;19723:21;:30;;19715:81;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19815:18;19826:6;19815:10;:18::i;:::-;19807:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19941:12;19955:23;19982:6;:11;;20002:5;20010:4;19982:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19940:75;;;;20033:52;20051:7;20060:10;20072:12;20033:17;:52::i;:::-;20026:59;;;;19563:530;;;;;;:::o;15593:422::-;15653:4;15861:12;15972:7;15960:20;15952:28;;16006:1;15999:4;:8;15992:15;;;15593:422;;;:::o;22103:742::-;22218:12;22247:7;22243:595;;;22278:10;22271:17;;;;22243:595;22412:1;22392:10;:17;:21;22388:439;;;22655:10;22649:17;22716:15;22703:10;22699:2;22695:19;22688:44;22603:148;22798:12;22791:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22103:742;;;;;;:::o

Swarm Source

ipfs://ad49327ee03bf49eac81c6c537ac4202ec1278c519c3eb11b0a87b1c955883da

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.