ETH Price: $2,660.77 (+1.32%)
Gas: 1.29 Gwei

Contract

0xd40cADE3f71C20Ba6FE940E431c890dC100E97d6
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw168521532023-03-18 4:05:23524 days ago1679112323IN
0xd40cADE3...C100E97d6
0 ETH0.0011752117
Withdraw168521462023-03-18 4:03:59524 days ago1679112239IN
0xd40cADE3...C100E97d6
0 ETH0.0011752117
Get Reward168521442023-03-18 4:03:35524 days ago1679112215IN
0xd40cADE3...C100E97d6
0 ETH0.0007646417
Get Reward168521362023-03-18 4:01:59524 days ago1679112119IN
0xd40cADE3...C100E97d6
0 ETH0.0014484817
Stake168450582023-03-17 4:07:59525 days ago1679026079IN
0xd40cADE3...C100E97d6
0 ETH0.0014184419
Get Reward168321852023-03-15 8:42:47527 days ago1678869767IN
0xd40cADE3...C100E97d6
0 ETH0.001266120
Withdraw168320602023-03-15 8:16:59527 days ago1678868219IN
0xd40cADE3...C100E97d6
0 ETH0.001836620
Get Reward148978072022-06-03 15:12:15811 days ago1654269135IN
0xd40cADE3...C100E97d6
0 ETH0.0081796896
Get Reward141502942022-02-06 4:27:53929 days ago1644121673IN
0xd40cADE3...C100E97d6
0 ETH0.0045158653
Get Reward137826522021-12-11 8:03:31986 days ago1639209811IN
0xd40cADE3...C100E97d6
0 ETH0.0031019449
Withdraw137753972021-12-10 5:06:27987 days ago1639112787IN
0xd40cADE3...C100E97d6
0 ETH0.0060615766
Withdraw137650232021-12-08 13:19:17988 days ago1638969557IN
0xd40cADE3...C100E97d6
0 ETH0.0055105260
Withdraw137527762021-12-06 14:16:51990 days ago1638800211IN
0xd40cADE3...C100E97d6
0 ETH0.0091081599.18493921
Withdraw137526672021-12-06 13:50:40990 days ago1638798640IN
0xd40cADE3...C100E97d6
0 ETH0.0064289470
Withdraw137526522021-12-06 13:48:03990 days ago1638798483IN
0xd40cADE3...C100E97d6
0 ETH0.0055105260
Withdraw137526522021-12-06 13:48:03990 days ago1638798483IN
0xd40cADE3...C100E97d6
0 ETH0.005509860
Withdraw137526522021-12-06 13:48:03990 days ago1638798483IN
0xd40cADE3...C100E97d6
0 ETH0.0059697365
Withdraw137526202021-12-06 13:42:46990 days ago1638798166IN
0xd40cADE3...C100E97d6
0 ETH0.0089086797
Withdraw137526172021-12-06 13:42:11990 days ago1638798131IN
0xd40cADE3...C100E97d6
0 ETH0.0083576291
Withdraw137263892021-12-02 8:45:36995 days ago1638434736IN
0xd40cADE3...C100E97d6
0 ETH0.006796374
Withdraw137263462021-12-02 8:36:40995 days ago1638434200IN
0xd40cADE3...C100E97d6
0 ETH0.0058079284
Withdraw137253222021-12-02 4:39:37995 days ago1638419977IN
0xd40cADE3...C100E97d6
0 ETH0.0082657890
Withdraw135299772021-11-01 7:48:261026 days ago1635752906IN
0xd40cADE3...C100E97d6
0 ETH0.00762246102
Get Reward134340922021-10-17 7:27:071041 days ago1634455627IN
0xd40cADE3...C100E97d6
0 ETH0.0040130257
Get Reward134021352021-10-12 6:44:481046 days ago1634021088IN
0xd40cADE3...C100E97d6
0 ETH0.0061251487
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x9cd43309...C8bE1E01E
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Rewards

Compiler Version
v0.7.5+commit.eb77ed08

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-11-29
*/

//"SPDX-License-Identifier: MIT"
// File: @openzeppelin/contracts/math/Math.sol
pragma solidity ^0.7.5;

/**
 * @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: @openzeppelin/contracts/math/SafeMath.sol
/**
 * @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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        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) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        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) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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.
     *
     * _Available since v2.4.0._
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts/GSN/Context.sol
/*
 * @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.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying an instance of this contract, which should be used via inheritance.
    constructor() {
        //require(false, "Context contract: Do not deploy");
    }

    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

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

// File: @openzeppelin/contracts/ownership/Ownable.sol
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable 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() {
        _owner = _msgSender();
        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 _msgSender() == _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: @openzeppelin/contracts/token/ERC20/IERC20.sol
/**
 * @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.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

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

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

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

// File: @openzeppelin/contracts/utils/Address.sol
/**
 * @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.
     *
     * 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.
     */
    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.

        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account)
        internal
        pure
        returns (address payable)
    {
        return address(uint160(account));
    }


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

// File: @openzeppelin/contracts/token/ERC20/SafeERC20.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,
            "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 {
        //console.log("callOptionalReturn");
        // 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);
        //console.log("success:", success, ", returndata length:", returndata.length);
        //console.logBytes(returndata);
        //console.log(abi.decode(returndata, (bool)));
        //console.logBytes32(returndata);

        //", abi.decode:", abi.decode(returndata, (bool))

        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: contracts/IRewardDistributionRecipient.sol
abstract contract IRewardDistributionRecipient is Ownable {
    address public rewardDistribution;//added "public"

    function notifyRewardAmount(uint256 reward) external virtual;

    modifier onlyRewardDistribution() {
        require(
            _msgSender() == rewardDistribution,
            "Caller is not reward distribution"
        );
        _;
    }
    //added func
    function isOnlyRewardDistribution() external view returns (bool) {
        return _msgSender() == rewardDistribution;
    }
    function setRewardDistribution(address _rewardDistribution)
        external
        onlyOwner
    {
        //console.log("sc setRewardDistribution... ");
        rewardDistribution = _rewardDistribution;
    }
}

// File: contracts/CurveRewards.sol
contract LPTokenWrapper {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    IERC20 public lpToken;
    uint256 private _totalSupply;
    mapping(address => uint256) private _balances;

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

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

    function stake(uint256 amount) public virtual {
      //console.log("LPTokenWrapper stake() with amount:", amount);
        _totalSupply = _totalSupply.add(amount);
        _balances[msg.sender] = _balances[msg.sender].add(amount);
        lpToken.safeTransferFrom(msg.sender, address(this), amount);
    }

    function withdraw(uint256 amount) public virtual {
        _totalSupply = _totalSupply.sub(amount);
        _balances[msg.sender] = _balances[msg.sender].sub(amount);
        lpToken.safeTransfer(msg.sender, amount);
    }

    function setLpToken(address _lpToken) internal {
        lpToken = IERC20(_lpToken);
    }
}

contract Rewards is LPTokenWrapper, IRewardDistributionRecipient {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    IERC20 public erc20Token;//rewardToken
    uint256 public constant DURATION = 7 days;
    uint256 public periodFinish = 0;
    uint256 public rewardRate = 0;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;
    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public rewards;
    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);

    function getData2() public view returns (uint256, uint256, uint256, uint256, uint256) {
        return (lastUpdateTime, rewardPerTokenStored, periodFinish, rewardRate, block.timestamp);
    }
    //function getRewardToken() public view returns (address) {
    //    return (erc20Token);
    //}


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

    constructor(address _lpToken, address _rewardToken) {
        //console.log("sc deploying rewards ctrt");
        super.setLpToken(_lpToken);
        erc20Token = IERC20(_rewardToken);
    }

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

    function rewardPerToken() public view 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 returns (uint256) {
        return
            balanceOf(account)
                .mul(rewardPerToken().sub(userRewardPerTokenPaid[account]))
                .div(1e18)
                .add(rewards[account]);
    }

    // stake visibility is public as overriding LPTokenWrapper's stake() function
    function stake(uint256 amount) public updateReward(msg.sender) override {
        require(amount > 0, "Cannot stake 0");
        super.stake(amount);
        emit Staked(msg.sender, amount);
    }

    function withdraw(uint256 amount) public updateReward(msg.sender) override {
        require(amount > 0, "Cannot withdraw 0");
        super.withdraw(amount);
        emit Withdrawn(msg.sender, amount);
    }

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

    // user: stake, claim:getReward, unstake:withdraw
    function getReward() public updateReward(msg.sender) {
        uint256 reward = earned(msg.sender);
        if (reward > 0) {
            //console.log("sc reward > 0");
            rewards[msg.sender] = 0;
            erc20Token.safeTransfer(msg.sender, reward);
            emit RewardPaid(msg.sender, reward);
        }
    }

    function getData1() public view returns (uint256, uint256, uint256, uint256) {
        return (block.timestamp, periodFinish, rewardRate, DURATION);
    }

    // admin: reset periodFinish, lastUpdateTime, rewardRate
    function notifyRewardAmount(uint256 reward)
        external override
        onlyRewardDistribution
        updateReward(address(0))
    {
        if (block.timestamp >= periodFinish) {
            rewardRate = reward.div(DURATION);
        } else {
            uint256 remaining = periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardRate);
            rewardRate = reward.add(leftover).div(DURATION);
        }
        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp.add(DURATION);
        emit RewardAdded(reward);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_lpToken","type":"address"},{"internalType":"address","name":"_rewardToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"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":"erc20Token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getData1","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getData2","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isOnlyRewardDistribution","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"lpToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"internalType":"address","name":"_rewardDistribution","type":"address"}],"name":"setRewardDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"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"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101c35760003560e01c806380faa57d116100f9578063a898fd7011610097578063df136d6511610071578063df136d65146103f2578063e9fad8ee146103fa578063ebe2b12b14610402578063f2fde38b1461040a576101c3565b8063a898fd70146103af578063c8f33c91146103e2578063cd3daf9d146103ea576101c3565b80638da5cb5b116100d35780638da5cb5b146103545780638f32d59b1461035c5780639944cc7114610364578063a694fc3a14610392576101c3565b806380faa57d1461031e5780638a13eea7146103265780638b8763471461032e576101c3565b80633c6b16ab116101665780635fcbd285116101405780635fcbd285146102e057806370a08231146102e8578063715018a61461030e5780637b0a47ee14610316576101c3565b80633c6b16ab1461029f5780633cbc5d28146102bc5780633d18b912146102d8576101c3565b8063101114cf116101a2578063101114cf1461024e57806318160ddd146102725780631be052891461027a5780632e1a7d4d14610282576101c3565b80628cc262146101c85780630700037d146102005780630d68b76114610226575b600080fd5b6101ee600480360360208110156101de57600080fd5b50356001600160a01b0316610430565b60408051918252519081900360200190f35b6101ee6004803603602081101561021657600080fd5b50356001600160a01b031661049e565b61024c6004803603602081101561023c57600080fd5b50356001600160a01b03166104b0565b005b61025661052b565b604080516001600160a01b039092168252519081900360200190f35b6101ee61053a565b6101ee610541565b61024c6004803603602081101561029857600080fd5b5035610548565b61024c600480360360208110156102b557600080fd5b503561062f565b6102c4610791565b604080519115158252519081900360200190f35b61024c6107b7565b610256610889565b6101ee600480360360208110156102fe57600080fd5b50356001600160a01b0316610898565b61024c6108b3565b6101ee610956565b6101ee61095c565b61025661096f565b6101ee6004803603602081101561034457600080fd5b50356001600160a01b031661097e565b610256610990565b6102c461099f565b61036c6109b6565b604080519485526020850193909352838301919091526060830152519081900360800190f35b61024c600480360360208110156103a857600080fd5b50356109c5565b6103b7610aa9565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b6101ee610abd565b6101ee610ac3565b6101ee610b11565b61024c610b17565b6101ee610b32565b61024c6004803603602081101561042057600080fd5b50356001600160a01b0316610b38565b6001600160a01b0381166000908152600b6020908152604080832054600a909252822054610498919061049290670de0b6b3a76400009061048c9061047d90610477610ac3565b90610bbf565b61048688610898565b90610c08565b90610c61565b90610ca3565b92915050565b600b6020526000908152604090205481565b6104b861099f565b610509576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b6001545b90565b62093a8081565b33610551610ac3565b60095561055c61095c565b6008556001600160a01b038116156105a35761057781610430565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b600082116105ec576040805162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b604482015290519081900360640190fd5b6105f582610cfd565b60408051838152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a25050565b6004546001600160a01b0316610643610d52565b6001600160a01b0316146106885760405162461bcd60e51b815260040180806020018281038252602181526020018061121c6021913960400191505060405180910390fd5b6000610692610ac3565b60095561069d61095c565b6008556001600160a01b038116156106e4576106b881610430565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b6006544210610702576106fa8262093a80610c61565b600755610744565b6006546000906107129042610bbf565b9050600061072b60075483610c0890919063ffffffff16565b905061073e62093a8061048c8684610ca3565b60075550505b4260088190556107579062093a80610ca3565b6006556040805183815290517fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9181900360200190a15050565b6004546000906001600160a01b03166107a8610d52565b6001600160a01b031614905090565b336107c0610ac3565b6009556107cb61095c565b6008556001600160a01b03811615610812576107e681610430565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b600061081d33610430565b9050801561088557336000818152600b602052604081205560055461084e916001600160a01b039091169083610d56565b60408051828152905133917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b5050565b6000546001600160a01b031681565b6001600160a01b031660009081526002602052604090205490565b6108bb61099f565b61090c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6003546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380546001600160a01b0319169055565b60075481565b600061096a42600654610dad565b905090565b6005546001600160a01b031681565b600a6020526000908152604090205481565b6003546001600160a01b031690565b6003546000906001600160a01b03166107a8610d52565b600654600754429262093a8090565b336109ce610ac3565b6009556109d961095c565b6008556001600160a01b03811615610a20576109f481610430565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b60008211610a66576040805162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b604482015290519081900360640190fd5b610a6f82610dc3565b60408051838152905133917f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d919081900360200190a25050565b600854600954600654600754429091929394565b60085481565b6000610acd61053a565b610ada575060095461053e565b61096a610b08610ae861053a565b61048c670de0b6b3a764000061048660075461048660085461047761095c565b60095490610ca3565b60095481565b610b28610b2333610898565b610548565b610b306107b7565b565b60065481565b610b4061099f565b610b91576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610b9a81610e19565b50565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000610c0183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610eba565b9392505050565b600082610c1757506000610498565b82820282848281610c2457fe5b0414610c015760405162461bcd60e51b81526004018080602001828103825260218152602001806111fb6021913960400191505060405180910390fd5b6000610c0183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610f51565b600082820183811015610c01576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600154610d0a9082610bbf565b60015533600090815260026020526040902054610d279082610bbf565b336000818152600260205260408120929092559054610b9a916001600160a01b039091169083610d56565b3390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610da8908490610fb6565b505050565b6000818310610dbc5781610c01565b5090919050565b600154610dd09082610ca3565b60015533600090815260026020526040902054610ded9082610ca3565b336000818152600260205260408120929092559054610b9a916001600160a01b03909116903084611174565b6001600160a01b038116610e5e5760405162461bcd60e51b81526004018080602001828103825260268152602001806111d56026913960400191505060405180910390fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b60008184841115610f495760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f0e578181015183820152602001610ef6565b50505050905090810190601f168015610f3b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610fa05760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610f0e578181015183820152602001610ef6565b506000838581610fac57fe5b0495945050505050565b610fc8826001600160a01b03166111ce565b611019576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106110575780518252601f199092019160209182019101611038565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146110b9576040519150601f19603f3d011682016040523d82523d6000602084013e6110be565b606091505b509150915081611115576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b80511561116e5780806020019051602081101561113157600080fd5b505161116e5760405162461bcd60e51b815260040180806020018281038252602a81526020018061123d602a913960400191505060405180910390fd5b50505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261116e908590610fb6565b3b15159056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122019af2d94c661661990de7fe543d3e0802b8c7c7a6bef0fa02f8d03448e4e79b064736f6c63430007050033

Deployed Bytecode Sourcemap

22786:4249:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24921:265;;;;;;;;;;;;;;;;-1:-1:-1;24921:265:0;-1:-1:-1;;;;;24921:265:0;;:::i;:::-;;;;;;;;;;;;;;;;23232:42;;;;;;;;;;;;;;;;-1:-1:-1;23232:42:0;-1:-1:-1;;;;;23232:42:0;;:::i;21442:217::-;;;;;;;;;;;;;;;;-1:-1:-1;21442:217:0;-1:-1:-1;;;;;21442:217:0;;:::i;:::-;;20978:33;;;:::i;:::-;;;;-1:-1:-1;;;;;20978:33:0;;;;;;;;;;;;;;21917:91;;;:::i;22968:41::-;;;:::i;25485:212::-;;;;;;;;;;;;;;;;-1:-1:-1;25485:212:0;;:::i;26435:597::-;;;;;;;;;;;;;;;;-1:-1:-1;26435:597:0;;:::i;21311:125::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;25865:336;;;:::i;21800:21::-;;;:::i;22016:110::-;;;;;;;;;;;;;;;;-1:-1:-1;22016:110:0;-1:-1:-1;;;;;22016:110:0;;:::i;9396:140::-;;;:::i;23054:29::-;;;:::i;24354:131::-;;;:::i;22924:24::-;;;:::i;23168:57::-;;;;;;;;;;;;;;;;-1:-1:-1;23168:57:0;-1:-1:-1;;;;;23168:57:0;;:::i;8585:79::-;;;:::i;8951:94::-;;;:::i;26209:156::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25277:200;;;;;;;;;;;;;;;;-1:-1:-1;25277:200:0;;:::i;23505:193::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23090:29;;;:::i;24493:420::-;;;:::i;23126:35::-;;;:::i;25705:97::-;;;:::i;23016:31::-;;;:::i;9691:109::-;;;;;;;;;;;;;;;;-1:-1:-1;9691:109:0;-1:-1:-1;;;;;9691:109:0;;:::i;24921:265::-;-1:-1:-1;;;;;25161:16:0;;24975:7;25161:16;;;:7;:16;;;;;;;;;25077:22;:31;;;;;;25015:163;;25161:16;25015:123;;25133:4;;25015:95;;25056:53;;:16;:14;:16::i;:::-;:20;;:53::i;:::-;25015:18;25025:7;25015:9;:18::i;:::-;:40;;:95::i;:::-;:117;;:123::i;:::-;:145;;:163::i;:::-;24995:183;24921:265;-1:-1:-1;;24921:265:0:o;23232:42::-;;;;;;;;;;;;;:::o;21442:217::-;8797:9;:7;:9::i;:::-;8789:54;;;;;-1:-1:-1;;;8789:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21611:18:::1;:40:::0;;-1:-1:-1;;;;;;21611:40:0::1;-1:-1:-1::0;;;;;21611:40:0;;;::::1;::::0;;;::::1;::::0;;21442:217::o;20978:33::-;;;-1:-1:-1;;;;;20978:33:0;;:::o;21917:91::-;21988:12;;21917:91;;:::o;22968:41::-;23003:6;22968:41;:::o;25485:212::-;25539:10;23887:16;:14;:16::i;:::-;23864:20;:39;23931:26;:24;:26::i;:::-;23914:14;:43;-1:-1:-1;;;;;23972:21:0;;;23968:157;;24029:15;24036:7;24029:6;:15::i;:::-;-1:-1:-1;;;;;24010:16:0;;;;;;:7;:16;;;;;;;;:34;;;;24093:20;;24059:22;:31;;;;;;:54;23968:157;25588:1:::1;25579:6;:10;25571:40;;;::::0;;-1:-1:-1;;;25571:40:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;25571:40:0;;;;;;;;;;;;;::::1;;25622:22;25637:6;25622:14;:22::i;:::-;25660:29;::::0;;;;;;;25670:10:::1;::::0;25660:29:::1;::::0;;;;;::::1;::::0;;::::1;25485:212:::0;;:::o;26435:597::-;21188:18;;-1:-1:-1;;;;;21188:18:0;21172:12;:10;:12::i;:::-;-1:-1:-1;;;;;21172:34:0;;21150:117;;;;-1:-1:-1;;;21150:117:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26568:1:::1;23887:16;:14;:16::i;:::-;23864:20;:39:::0;23931:26:::1;:24;:26::i;:::-;23914:14;:43:::0;-1:-1:-1;;;;;23972:21:0;::::1;::::0;23968:157:::1;;24029:15;24036:7;24029:6;:15::i;:::-;-1:-1:-1::0;;;;;24010:16:0;::::1;;::::0;;;:7:::1;:16;::::0;;;;;;;:34;;;;24093:20:::1;::::0;24059:22:::1;:31:::0;;;;;;:54;23968:157:::1;26611:12:::2;;26592:15;:31;26588:304;;26653:20;:6:::0;23003::::2;26653:10;:20::i;:::-;26640:10;:33:::0;26588:304:::2;;;26726:12;::::0;26706:17:::2;::::0;26726:33:::2;::::0;26743:15:::2;26726:16;:33::i;:::-;26706:53;;26774:16;26793:25;26807:10;;26793:9;:13;;:25;;;;:::i;:::-;26774:44:::0;-1:-1:-1;26846:34:0::2;23003:6;26846:20;:6:::0;26774:44;26846:10:::2;:20::i;:34::-;26833:10;:47:::0;-1:-1:-1;;26588:304:0::2;26919:15;26902:14;:32:::0;;;26960:29:::2;::::0;23003:6:::2;26960:19;:29::i;:::-;26945:12;:44:::0;27005:19:::2;::::0;;;;;;;::::2;::::0;;;;::::2;::::0;;::::2;21278:1:::1;26435:597:::0;:::o;21311:125::-;21410:18;;21370:4;;-1:-1:-1;;;;;21410:18:0;21394:12;:10;:12::i;:::-;-1:-1:-1;;;;;21394:34:0;;21387:41;;21311:125;:::o;25865:336::-;25906:10;23887:16;:14;:16::i;:::-;23864:20;:39;23931:26;:24;:26::i;:::-;23914:14;:43;-1:-1:-1;;;;;23972:21:0;;;23968:157;;24029:15;24036:7;24029:6;:15::i;:::-;-1:-1:-1;;;;;24010:16:0;;;;;;:7;:16;;;;;;;;:34;;;;24093:20;;24059:22;:31;;;;;;:54;23968:157;25929:14:::1;25946:18;25953:10;25946:6;:18::i;:::-;25929:35:::0;-1:-1:-1;25979:10:0;;25975:219:::1;;26059:10;26073:1;26051:19:::0;;;:7:::1;:19;::::0;;;;:23;26089:10:::1;::::0;:43:::1;::::0;-1:-1:-1;;;;;26089:10:0;;::::1;::::0;26125:6;26089:23:::1;:43::i;:::-;26152:30;::::0;;;;;;;26163:10:::1;::::0;26152:30:::1;::::0;;;;;::::1;::::0;;::::1;25975:219;24135:1;25865:336:::0;:::o;21800:21::-;;;-1:-1:-1;;;;;21800:21:0;;:::o;22016:110::-;-1:-1:-1;;;;;22100:18:0;22073:7;22100:18;;;:9;:18;;;;;;;22016:110::o;9396:140::-;8797:9;:7;:9::i;:::-;8789:54;;;;;-1:-1:-1;;;8789:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9479:6:::1;::::0;9458:40:::1;::::0;9495:1:::1;::::0;-1:-1:-1;;;;;9479:6:0::1;::::0;9458:40:::1;::::0;9495:1;;9458:40:::1;9509:6;:19:::0;;-1:-1:-1;;;;;;9509:19:0::1;::::0;;9396:140::o;23054:29::-;;;;:::o;24354:131::-;24411:7;24438:39;24447:15;24464:12;;24438:8;:39::i;:::-;24431:46;;24354:131;:::o;22924:24::-;;;-1:-1:-1;;;;;22924:24:0;;:::o;23168:57::-;;;;;;;;;;;;;:::o;8585:79::-;8650:6;;-1:-1:-1;;;;;8650:6:0;8585:79;:::o;8951:94::-;9031:6;;8991:4;;-1:-1:-1;;;;;9031:6:0;9015:12;:10;:12::i;26209:156::-;26322:12;;26336:10;;26305:15;;23003:6;;26209:156::o;25277:200::-;25328:10;23887:16;:14;:16::i;:::-;23864:20;:39;23931:26;:24;:26::i;:::-;23914:14;:43;-1:-1:-1;;;;;23972:21:0;;;23968:157;;24029:15;24036:7;24029:6;:15::i;:::-;-1:-1:-1;;;;;24010:16:0;;;;;;:7;:16;;;;;;;;:34;;;;24093:20;;24059:22;:31;;;;;;:54;23968:157;25377:1:::1;25368:6;:10;25360:37;;;::::0;;-1:-1:-1;;;25360:37:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;25360:37:0;;;;;;;;;;;;;::::1;;25408:19;25420:6;25408:11;:19::i;:::-;25443:26;::::0;;;;;;;25450:10:::1;::::0;25443:26:::1;::::0;;;;;::::1;::::0;;::::1;25277:200:::0;;:::o;23505:193::-;23610:14;;23626:20;;23648:12;;23662:10;;23674:15;23505:193;;;;;:::o;23090:29::-;;;;:::o;24493:420::-;24540:7;24564:13;:11;:13::i;:::-;24560:78;;-1:-1:-1;24606:20:0;;24599:27;;24560:78;24668:237;24711:179;24876:13;:11;:13::i;:::-;24711:138;24844:4;24711:106;24806:10;;24711:68;24764:14;;24711:26;:24;:26::i;:179::-;24668:20;;;:24;:237::i;23126:35::-;;;;:::o;25705:97::-;25741:31;25750:21;25760:10;25750:9;:21::i;:::-;25741:8;:31::i;:::-;25783:11;:9;:11::i;:::-;25705:97::o;23016:31::-;;;;:::o;9691:109::-;8797:9;:7;:9::i;:::-;8789:54;;;;;-1:-1:-1;;;8789:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9764:28:::1;9783:8;9764:18;:28::i;:::-;9691:109:::0;:::o;22687:92::-;22745:7;:26;;-1:-1:-1;;;;;;22745:26:0;-1:-1:-1;;;;;22745:26:0;;;;;;;;;;22687:92::o;2225:136::-;2283:7;2310:43;2314:1;2317;2310:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;2303:50;2225:136;-1:-1:-1;;;2225:136:0:o;3175:471::-;3233:7;3478:6;3474:47;;-1:-1:-1;3508:1:0;3501:8;;3474:47;3545:5;;;3549:1;3545;:5;:1;3569:5;;;;;:10;3561:56;;;;-1:-1:-1;;;3561:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4114:132;4172:7;4199:39;4203:1;4206;4199:39;;;;;;;;;;;;;;;;;:3;:39::i;1769:181::-;1827:7;1859:5;;;1883:6;;;;1875:46;;;;;-1:-1:-1;;;1875:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;22453:226;22528:12;;:24;;22545:6;22528:16;:24::i;:::-;22513:12;:39;22597:10;22587:21;;;;:9;:21;;;;;;:33;;22613:6;22587:25;:33::i;:::-;22573:10;22563:21;;;;:9;:21;;;;;:57;;;;22631:7;;:40;;-1:-1:-1;;;;;22631:7:0;;;;22664:6;22631:20;:40::i;7348:98::-;7428:10;7348:98;:::o;16732:247::-;16902:58;;;-1:-1:-1;;;;;16902:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;16902:58:0;-1:-1:-1;;;16902:58:0;;;16849:122;;16882:5;;16849:18;:122::i;:::-;16732:247;;;:::o;456:106::-;514:7;545:1;541;:5;:13;;553:1;541:13;;;-1:-1:-1;549:1:0;;456:106;-1:-1:-1;456:106:0:o;22134:311::-;22275:12;;:24;;22292:6;22275:16;:24::i;:::-;22260:12;:39;22344:10;22334:21;;;;:9;:21;;;;;;:33;;22360:6;22334:25;:33::i;:::-;22320:10;22310:21;;;;:9;:21;;;;;:57;;;;22378:7;;:59;;-1:-1:-1;;;;;22378:7:0;;;;22423:4;22430:6;22378:24;:59::i;9906:266::-;-1:-1:-1;;;;;9994:22:0;;9972:110;;;;-1:-1:-1;;;9972:110:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10119:6;;10098:38;;-1:-1:-1;;;;;10098:38:0;;;;10119:6;;10098:38;;10119:6;;10098:38;10147:6;:17;;-1:-1:-1;;;;;;10147:17:0;-1:-1:-1;;;;;10147:17:0;;;;;;;;;;9906:266::o;2698:226::-;2818:7;2854:12;2846:6;;;;2838:29;;;;-1:-1:-1;;;2838:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2890:5:0;;;2698:226::o;4776:379::-;4896:7;4998:12;4991:5;4983:28;;;;-1:-1:-1;;;4983:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5022:9;5038:1;5034;:5;;;;;;;4776:379;-1:-1:-1;;;;;4776:379:0:o;19342:1511::-;19992:27;20000:5;-1:-1:-1;;;;;19992:25:0;;:27::i;:::-;19984:71;;;;;-1:-1:-1;;;19984:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;20129:12;20143:23;20178:5;-1:-1:-1;;;;;20170:19:0;20190:4;20170:25;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;20170:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20128:67;;;;20505:7;20497:52;;;;;-1:-1:-1;;;20497:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20564:17;;:21;20560:286;;20737:10;20726:30;;;;;;;;;;;;;;;-1:-1:-1;20726:30:0;20700:134;;;;-1:-1:-1;;;20700:134:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19342:1511;;;;:::o;16987:284::-;17184:68;;;-1:-1:-1;;;;;17184:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;17184:68:0;-1:-1:-1;;;17184:68:0;;;17131:132;;17164:5;;17131:18;:132::i;13742:667::-;14354:20;14393:8;;;13742:667::o

Swarm Source

ipfs://19af2d94c661661990de7fe543d3e0802b8c7c7a6bef0fa02f8d03448e4e79b0

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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