ETH Price: $3,155.47 (+1.14%)
Gas: 2 Gwei

Contract

0x259F50D39818d535816AFE1D244De0c561963D41
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Notify Reward Am...114248742020-12-10 11:15:391311 days ago1607598939IN
0x259F50D3...561963D41
0 ETH0.0032567473
Exit113820052020-12-03 21:07:081317 days ago1607029628IN
0x259F50D3...561963D41
0 ETH0.0042877739
Notify Reward Am...113765282020-12-03 1:05:421318 days ago1606957542IN
0x259F50D3...561963D41
0 ETH0.0017503233
Notify Reward Am...113298662020-11-25 21:06:261325 days ago1606338386IN
0x259F50D3...561963D41
0 ETH0.0021746441
Exit112916202020-11-19 23:59:301331 days ago1605830370IN
0x259F50D3...561963D41
0 ETH0.0027997520.4
Notify Reward Am...112842222020-11-18 20:52:091332 days ago1605732729IN
0x259F50D3...561963D41
0 ETH0.0016442431
Stake112495322020-11-13 13:10:181338 days ago1605273018IN
0x259F50D3...561963D41
0 ETH0.0056680459.83935135
Notify Reward Am...112385612020-11-11 20:46:081339 days ago1605127568IN
0x259F50D3...561963D41
0 ETH0.001144820
Notify Reward Am...111922832020-11-04 18:21:071346 days ago1604514067IN
0x259F50D3...561963D41
0 ETH0.0032628255
Exit111877392020-11-04 1:35:021347 days ago1604453702IN
0x259F50D3...561963D41
0 ETH0.0031565823
Claim Reward111690922020-11-01 4:42:001350 days ago1604205720IN
0x259F50D3...561963D41
0 ETH0.0014977315.10528979
Notify Reward Am...111472102020-10-28 19:59:071353 days ago1603915147IN
0x259F50D3...561963D41
0 ETH0.0026102544
Claim Reward111402292020-10-27 18:28:431354 days ago1603823323IN
0x259F50D3...561963D41
0 ETH0.0019929720.1
Claim Reward111141252020-10-23 18:11:311358 days ago1603476691IN
0x259F50D3...561963D41
0 ETH0.0021795625.9
Notify Reward Am...111017332020-10-21 20:45:371360 days ago1603313137IN
0x259F50D3...561963D41
0 ETH0.0019094436
Claim Reward110630472020-10-15 22:08:361366 days ago1602799716IN
0x259F50D3...561963D41
0 ETH0.0019355123
Notify Reward Am...110558672020-10-14 19:58:051367 days ago1602705485IN
0x259F50D3...561963D41
0 ETH0.0028111253
Notify Reward Am...110091712020-10-07 14:39:541374 days ago1602081594IN
0x259F50D3...561963D41
0 ETH0.0041901679
Claim Reward109970072020-10-05 17:10:101376 days ago1601917810IN
0x259F50D3...561963D41
0 ETH0.0041234949
Claim Reward109785592020-10-02 19:48:221379 days ago1601668102IN
0x259F50D3...561963D41
0 ETH0.0039661240.00000112
Stake109672392020-10-01 1:27:071381 days ago1601515627IN
0x259F50D3...561963D41
0 ETH0.0094909976.09780688
Stake109644632020-09-30 15:06:291381 days ago1601478389IN
0x259F50D3...561963D41
0 ETH0.01355168125.46
Notify Reward Am...109640102020-09-30 13:22:271381 days ago1601472147IN
0x259F50D3...561963D41
0 ETH0.0091936798
Set Reward Distr...109470962020-09-27 21:43:431384 days ago1601243023IN
0x259F50D3...561963D41
0 ETH0.002175350
0x60806040109470502020-09-27 21:32:071384 days ago1601242327IN
 Contract Creation
0 ETH0.1055071949

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 0xa2E05641...Da6aE8b55
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Distribution

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Multiple files format)

File 1 of 9: Distribution.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "./Math.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
import "./SafeERC20.sol";
import "./IRewardDistributionRecipient.sol";

contract LPTokenWrapper {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    IERC20 public poolToken;

    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 {
        _totalSupply = _totalSupply.add(amount);
        _balances[msg.sender] = _balances[msg.sender].add(amount);
        poolToken.safeTransferFrom(msg.sender, address(this), amount);
    }

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

contract Distribution is LPTokenWrapper, IRewardDistributionRecipient {
    IERC20 public rewardToken;
    uint256 public constant DURATION = 7 days;

    uint256 public periodFinish;
    uint256 public rewardRate;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;
    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public rewards;

    event RewardAdded(uint256 reward);
    event Claimed(address indexed user, uint256 reward);
    event Staked(address indexed user, uint256 amount);
    event Unstaked(address indexed user, uint256 amount);

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

    constructor(IERC20 _rewardToken, IERC20 _poolToken) public {
        rewardToken = _rewardToken;
        poolToken = _poolToken;
    }

    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 override updateReward(msg.sender) {
        require(amount > 0, "Cannot stake 0");
        super.stake(amount);
        emit Staked(msg.sender, amount);
    }

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

    function claimReward() public updateReward(msg.sender) {
        uint256 reward = earned(msg.sender);
        if (reward > 0) {
            rewards[msg.sender] = 0;
            rewardToken.safeTransfer(msg.sender, reward);
            emit Claimed(msg.sender, reward);
        }
    }

    function exit() external {
        unstake(balanceOf(msg.sender));
        claimReward();
    }

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

        uint256 balance = rewardToken.balanceOf(address(this));
        require(
            rewardRate <= balance.div(DURATION),
            "Provided reward too high"
        );

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

    function distributeAdditionalRewards(
        IERC20 token,
        address[] calldata users,
        uint256[] calldata rewardAmounts
    ) external onlyRewardDistribution {
        require(
            users.length == rewardAmounts.length,
            "Users and rewardAmounts are different lengths"
        );
        require(
            token != rewardToken && token != poolToken,
            "Cannot distribute this token"
        );
        for (uint256 i = 0; i < users.length; i++) {
            token.safeTransfer(users[i], rewardAmounts[i]);
        }
    }
}

File 2 of 9: Address.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

/**
 * @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 in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

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

    /**
     * @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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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);
            }
        }
    }
}

File 3 of 9: Context.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

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

File 4 of 9: IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

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

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

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

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

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

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

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

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

File 5 of 9: IRewardDistributionRecipient.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "./Ownable.sol";


abstract contract IRewardDistributionRecipient is Ownable {
    address public rewardDistribution;

    function notifyRewardAmount(uint256 reward) external virtual;

    modifier onlyRewardDistribution() {
        require(_msgSender() == rewardDistribution, "Caller is not reward distribution");
        _;
    }

    function setRewardDistribution(address _rewardDistribution)
        external
        onlyOwner
    {
        rewardDistribution = _rewardDistribution;
    }
}

File 6 of 9: Math.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

/**
 * @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 7 of 9: Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "./Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
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 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;
    }
}

File 8 of 9: SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

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

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

File 9 of 9: SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

/**
 * @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.
     */
    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.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        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.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_rewardToken","type":"address"},{"internalType":"contract IERC20","name":"_poolToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"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":"Unstaked","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":[],"name":"claimReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"uint256[]","name":"rewardAmounts","type":"uint256[]"}],"name":"distributeAdditionalRewards","outputs":[],"stateMutability":"nonpayable","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":"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":"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":"poolToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"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":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"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":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101725760003560e01c80638b876347116100de578063cd3daf9d11610097578063ebe2b12b11610071578063ebe2b12b14610531578063f2fde38b1461054f578063f7c618c114610593578063fa7b25db146105c757610172565b8063cd3daf9d146104eb578063df136d6514610509578063e9fad8ee1461052757610172565b80638b876347146103d55780638da5cb5b1461042d578063a694fc3a14610461578063b88a802f1461048f578063c8f33c9114610499578063cbdf382c146104b757610172565b80632e17de78116101305780632e17de78146102db5780633c6b16ab1461030957806370a0823114610337578063715018a61461038f5780637b0a47ee1461039957806380faa57d146103b757610172565b80628cc262146101775780630700037d146101cf5780630d68b76114610227578063101114cf1461026b57806318160ddd1461029f5780631be05289146102bd575b600080fd5b6101b96004803603602081101561018d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106b5565b6040518082815260200191505060405180910390f35b610211600480360360208110156101e557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061079c565b6040518082815260200191505060405180910390f35b6102696004803603602081101561023d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b4565b005b6102736108c2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102a76108e8565b6040518082815260200191505060405180910390f35b6102c56108f2565b6040518082815260200191505060405180910390f35b610307600480360360208110156102f157600080fd5b81019080803590602001909291905050506108f9565b005b6103356004803603602081101561031f57600080fd5b8101908080359060200190929190505050610aae565b005b6103796004803603602081101561034d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e81565b6040518082815260200191505060405180910390f35b610397610eca565b005b6103a1611055565b6040518082815260200191505060405180910390f35b6103bf61105b565b6040518082815260200191505060405180910390f35b610417600480360360208110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061106e565b6040518082815260200191505060405180910390f35b610435611086565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61048d6004803603602081101561047757600080fd5b81019080803590602001909291905050506110b0565b005b610497611265565b005b6104a1611444565b6040518082815260200191505060405180910390f35b6104bf61144a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104f361146e565b6040518082815260200191505060405180910390f35b610511611506565b6040518082815260200191505060405180910390f35b61052f61150c565b005b610539611527565b6040518082815260200191505060405180910390f35b6105916004803603602081101561056557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061152d565b005b61059b61173d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106b3600480360360608110156105dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561061a57600080fd5b82018360208201111561062c57600080fd5b8035906020019184602083028401116401000000008311171561064e57600080fd5b90919293919293908035906020019064010000000081111561066f57600080fd5b82018360208201111561068157600080fd5b803590602001918460208302840111640100000000831117156106a357600080fd5b9091929391929390505050611763565b005b6000610795600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610787670de0b6b3a7640000610779610762600a60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461075461146e565b611a1290919063ffffffff16565b61076b88610e81565b611a5c90919063ffffffff16565b611ae290919063ffffffff16565b611b2c90919063ffffffff16565b9050919050565b600b6020528060005260406000206000915090505481565b6107bc611bb4565b73ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461087e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600154905090565b62093a8081565b3361090261146e565b60098190555061091061105b565b600881905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146109dd57610953816106b5565b600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600954600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60008211610a53576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f43616e6e6f74207769746864726177203000000000000000000000000000000081525060200191505060405180910390fd5b610a5c82611bbc565b3373ffffffffffffffffffffffffffffffffffffffff167f0f5bb82176feb1b5e747e28471aa92156a04d9f3ab9f45f28e2d704232b93f75836040518082815260200191505060405180910390a25050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610aef611bb4565b73ffffffffffffffffffffffffffffffffffffffff1614610b5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806124516021913960400191505060405180910390fd5b6000610b6561146e565b600981905550610b7361105b565b600881905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610c4057610bb6816106b5565b600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600954600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6006544210610c6a57610c5f62093a8083611ae290919063ffffffff16565b600781905550610ccd565b6000610c8142600654611a1290919063ffffffff16565b90506000610c9a60075483611a5c90919063ffffffff16565b9050610cc462093a80610cb68387611b2c90919063ffffffff16565b611ae290919063ffffffff16565b60078190555050505b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610d5857600080fd5b505afa158015610d6c573d6000803e3d6000fd5b505050506040513d6020811015610d8257600080fd5b81019080805190602001909291905050509050610dab62093a8082611ae290919063ffffffff16565b6007541115610e22576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f50726f76696465642072657761726420746f6f2068696768000000000000000081525060200191505060405180910390fd5b42600881905550610e3f62093a8042611b2c90919063ffffffff16565b6006819055507fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d836040518082815260200191505060405180910390a1505050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610ed2611bb4565b73ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f94576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60075481565b600061106942600654611cba565b905090565b600a6020528060005260406000206000915090505481565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b336110b961146e565b6009819055506110c761105b565b600881905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111945761110a816106b5565b600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600954600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000821161120a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f43616e6e6f74207374616b65203000000000000000000000000000000000000081525060200191505060405180910390fd5b61121382611cd3565b3373ffffffffffffffffffffffffffffffffffffffff167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d836040518082815260200191505060405180910390a25050565b3361126e61146e565b60098190555061127c61105b565b600881905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611349576112bf816106b5565b600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600954600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611354336106b5565b90506000811115611440576000600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506113f13382600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611dd39092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a826040518082815260200191505060405180910390a25b5050565b60085481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806114796108e8565b1415611489576009549050611503565b6115006114ef6114976108e8565b6114e1670de0b6b3a76400006114d36007546114c56008546114b761105b565b611a1290919063ffffffff16565b611a5c90919063ffffffff16565b611a5c90919063ffffffff16565b611ae290919063ffffffff16565b600954611b2c90919063ffffffff16565b90505b90565b60095481565b61151d61151833610e81565b6108f9565b611525611265565b565b60065481565b611535611bb4565b73ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146115f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561167d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806123dd6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117a4611bb4565b73ffffffffffffffffffffffffffffffffffffffff1614611810576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806124516021913960400191505060405180910390fd5b81819050848490501461186e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180612403602d913960400191505060405180910390fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614158015611918575060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b61198a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f43616e6e6f742064697374726962757465207468697320746f6b656e0000000081525060200191505060405180910390fd5b60005b84849050811015611a0a576119fd8585838181106119a757fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168484848181106119d057fe5b905060200201358873ffffffffffffffffffffffffffffffffffffffff16611dd39092919063ffffffff16565b808060010191505061198d565b505050505050565b6000611a5483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611e75565b905092915050565b600080831415611a6f5760009050611adc565b6000828402905082848281611a8057fe5b0414611ad7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806124306021913960400191505060405180910390fd5b809150505b92915050565b6000611b2483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611f35565b905092915050565b600080828401905083811015611baa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b611bd181600154611a1290919063ffffffff16565b600181905550611c2981600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a1290919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611cb7338260008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611dd39092919063ffffffff16565b50565b6000818310611cc95781611ccb565b825b905092915050565b611ce881600154611b2c90919063ffffffff16565b600181905550611d4081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b2c90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611dd033308360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611ffb909392919063ffffffff16565b50565b611e708363a9059cbb60e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506120bc565b505050565b6000838311158290611f22576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611ee7578082015181840152602081019050611ecc565b50505050905090810190601f168015611f145780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008083118290611fe1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611fa6578082015181840152602081019050611f8b565b50505050905090810190601f168015611fd35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611fed57fe5b049050809150509392505050565b6120b6846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506120bc565b50505050565b606061211e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166121ab9092919063ffffffff16565b90506000815111156121a65780806020019051602081101561213f57600080fd5b81019080805190602001909291905050506121a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612472602a913960400191505060405180910390fd5b5b505050565b60606121ba84846000856121c3565b90509392505050565b60606121ce856123c9565b612240576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081525060200191505060405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310612290578051825260208201915060208101905060208303925061226d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146122f2576040519150601f19603f3d011682016040523d82523d6000602084013e6122f7565b606091505b5091509150811561230c5780925050506123c1565b60008151111561231f5780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561238657808201518184015260208101905061236b565b50505050905090810190601f1680156123b35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b949350505050565b600080823b90506000811191505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373557365727320616e6420726577617264416d6f756e74732061726520646966666572656e74206c656e67746873536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212204e2065b8c6ea997200708316a4ff93b450ee43bcfc8b52005912c2edd7bfa11164736f6c634300060c0033

Deployed Bytecode Sourcemap

1093:4134:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2728:259;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1451:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;403:156:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;148:33;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;411:89:2;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1200:41;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3277:205;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3879:772;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;506:108;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1684:145:6;;;:::i;:::-;;1281:25:2;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2179:129;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1388:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1061:77:6;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3075:196:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;3488:284;;;:::i;:::-;;1312:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;295:23;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;2314:408;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1347:35;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3778:95;;;:::i;:::-;;1248:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1978:240:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1169:25:2;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;4657:568;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2728:259;2782:7;2820:160;2963:7;:16;2971:7;2963:16;;;;;;;;;;;;;;;;2820:121;2936:4;2820:94;2860:53;2881:22;:31;2904:7;2881:31;;;;;;;;;;;;;;;;2860:16;:14;:16::i;:::-;:20;;:53;;;;:::i;:::-;2820:18;2830:7;2820:9;:18::i;:::-;:39;;:94;;;;:::i;:::-;:115;;:121;;;;:::i;:::-;:142;;:160;;;;:::i;:::-;2801:179;;2728:259;;;:::o;1451:42::-;;;;;;;;;;;;;;;;;:::o;403:156:4:-;1275:12:6;:10;:12::i;:::-;1265:22;;:6;;;;;;;;;;;:22;;;1257:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;533:19:4::1;512:18;;:40;;;;;;;;;;;;;;;;;;403:156:::0;:::o;148:33::-;;;;;;;;;;;;;:::o;411:89:2:-;455:7;481:12;;474:19;;411:89;:::o;1200:41::-;1235:6;1200:41;:::o;3277:205::-;3339:10;1783:16;:14;:16::i;:::-;1760:20;:39;;;;1826:26;:24;:26::i;:::-;1809:14;:43;;;;1885:1;1866:21;;:7;:21;;;1862:154;;1922:15;1929:7;1922:6;:15::i;:::-;1903:7;:16;1911:7;1903:16;;;;;;;;;;;;;;;:34;;;;1985:20;;1951:22;:31;1974:7;1951:31;;;;;;;;;;;;;;;:54;;;;1862:154;3378:1:::1;3369:6;:10;3361:40;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;3411:21;3425:6;3411:13;:21::i;:::-;3456:10;3447:28;;;3468:6;3447:28;;;;;;;;;;;;;;;;;;3277:205:::0;;:::o;3879:772::-;323:18:4;;;;;;;;;;;307:34;;:12;:10;:12::i;:::-;:34;;;299:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4017:1:2::1;1783:16;:14;:16::i;:::-;1760:20;:39;;;;1826:26;:24;:26::i;:::-;1809:14;:43;;;;1885:1;1866:21;;:7;:21;;;1862:154;;1922:15;1929:7;1922:6;:15::i;:::-;1903:7;:16;1911:7;1903:16;;;;;;;;;;;;;;;:34;;;;1985:20;;1951:22;:31;1974:7;1951:31;;;;;;;;;;;;;;;:54;;;;1862:154;4058:12:::2;;4039:15;:31;4035:298;;4099:20;1235:6;4099;:10;;:20;;;;:::i;:::-;4086:10;:33;;;;4035:298;;;4150:17;4170:33;4187:15;4170:12;;:16;;:33;;;;:::i;:::-;4150:53;;4217:16;4236:25;4250:10;;4236:9;:13;;:25;;;;:::i;:::-;4217:44;;4288:34;1235:6;4288:20;4299:8;4288:6;:10;;:20;;;;:::i;:::-;:24;;:34;;;;:::i;:::-;4275:10;:47;;;;4035:298;;;4343:15;4361:11;;;;;;;;;;;:21;;;4391:4;4361:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;4343:54;;4442:21;1235:6;4442:7;:11;;:21;;;;:::i;:::-;4428:10;;:35;;4407:106;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;4541:15;4524:14;:32;;;;4581:29;1235:6;4581:15;:19;;:29;;;;:::i;:::-;4566:12;:44;;;;4625:19;4637:6;4625:19;;;;;;;;;;;;;;;;;;2025:1;389::4::1;3879:772:2::0;:::o;506:108::-;563:7;589:9;:18;599:7;589:18;;;;;;;;;;;;;;;;582:25;;506:108;;;:::o;1684:145:6:-;1275:12;:10;:12::i;:::-;1265:22;;:6;;;;;;;;;;;:22;;;1257:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1790:1:::1;1753:40;;1774:6;;;;;;;;;;;1753:40;;;;;;;;;;;;1820:1;1803:6;;:19;;;;;;;;;;;;;;;;;;1684:145::o:0;1281:25:2:-;;;;:::o;2179:129::-;2236:7;2262:39;2271:15;2288:12;;2262:8;:39::i;:::-;2255:46;;2179:129;:::o;1388:57::-;;;;;;;;;;;;;;;;;:::o;1061:77:6:-;1099:7;1125:6;;;;;;;;;;;1118:13;;1061:77;:::o;3075:196:2:-;3135:10;1783:16;:14;:16::i;:::-;1760:20;:39;;;;1826:26;:24;:26::i;:::-;1809:14;:43;;;;1885:1;1866:21;;:7;:21;;;1862:154;;1922:15;1929:7;1922:6;:15::i;:::-;1903:7;:16;1911:7;1903:16;;;;;;;;;;;;;;;:34;;;;1985:20;;1951:22;:31;1974:7;1951:31;;;;;;;;;;;;;;;:54;;;;1862:154;3174:1:::1;3165:6;:10;3157:37;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;3204:19;3216:6;3204:11;:19::i;:::-;3245:10;3238:26;;;3257:6;3238:26;;;;;;;;;;;;;;;;;;3075:196:::0;;:::o;3488:284::-;3531:10;1783:16;:14;:16::i;:::-;1760:20;:39;;;;1826:26;:24;:26::i;:::-;1809:14;:43;;;;1885:1;1866:21;;:7;:21;;;1862:154;;1922:15;1929:7;1922:6;:15::i;:::-;1903:7;:16;1911:7;1903:16;;;;;;;;;;;;;;;:34;;;;1985:20;;1951:22;:31;1974:7;1951:31;;;;;;;;;;;;;;;:54;;;;1862:154;3553:14:::1;3570:18;3577:10;3570:6;:18::i;:::-;3553:35;;3611:1;3602:6;:10;3598:168;;;3650:1;3628:7;:19;3636:10;3628:19;;;;;;;;;;;;;;;:23;;;;3665:44;3690:10;3702:6;3665:11;;;;;;;;;;;:24;;;;:44;;;;;:::i;:::-;3736:10;3728:27;;;3748:6;3728:27;;;;;;;;;;;;;;;;;;3598:168;2025:1;3488:284:::0;:::o;1312:29::-;;;;:::o;295:23::-;;;;;;;;;;;;:::o;2314:408::-;2361:7;2401:1;2384:13;:11;:13::i;:::-;:18;2380:76;;;2425:20;;2418:27;;;;2380:76;2484:231;2526:175;2687:13;:11;:13::i;:::-;2526:135;2656:4;2526:104;2619:10;;2526:67;2578:14;;2526:26;:24;:26::i;:::-;:51;;:67;;;;:::i;:::-;:92;;:104;;;;:::i;:::-;:129;;:135;;;;:::i;:::-;:160;;:175;;;;:::i;:::-;2484:20;;:24;;:231;;;;:::i;:::-;2465:250;;2314:408;;:::o;1347:35::-;;;;:::o;3778:95::-;3813:30;3821:21;3831:10;3821:9;:21::i;:::-;3813:7;:30::i;:::-;3853:13;:11;:13::i;:::-;3778:95::o;1248:27::-;;;;:::o;1978:240:6:-;1275:12;:10;:12::i;:::-;1265:22;;:6;;;;;;;;;;;:22;;;1257:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2086:1:::1;2066:22;;:8;:22;;;;2058:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2175:8;2146:38;;2167:6;;;;;;;;;;;2146:38;;;;;;;;;;;;2203:8;2194:6;;:17;;;;;;;;;;;;;;;;;;1978:240:::0;:::o;1169:25:2:-;;;;;;;;;;;;;:::o;4657:568::-;323:18:4;;;;;;;;;;;307:34;;:12;:10;:12::i;:::-;:34;;;299:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4877:13:2::1;;:20;;4861:5;;:12;;:36;4840:128;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5008:11;;;;;;;;;;;4999:20;;:5;:20;;;;:42;;;;;5032:9;::::0;::::1;;;;;;;;5023:18;;:5;:18;;;;4999:42;4978:117;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;5110:9;5105:114;5129:5;;:12;;5125:1;:16;5105:114;;;5162:46;5181:5;;5187:1;5181:8;;;;;;;;;;;;;;;5191:13;;5205:1;5191:16;;;;;;;;;;;;;5162:5;:18;;;;:46;;;;;:::i;:::-;5143:3;;;;;;;5105:114;;;;4657:568:::0;;;;;:::o;1321:134:8:-;1379:7;1405:43;1409:1;1412;1405:43;;;;;;;;;;;;;;;;;:3;:43::i;:::-;1398:50;;1321:134;;;;:::o;2180:459::-;2238:7;2484:1;2479;:6;2475:45;;;2508:1;2501:8;;;;2475:45;2530:9;2546:1;2542;:5;2530:17;;2574:1;2569;2565;:5;;;;;;:10;2557:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2631:1;2624:8;;;2180:459;;;;;:::o;3101:130::-;3159:7;3185:39;3189:1;3192;3185:39;;;;;;;;;;;;;;;;;:3;:39::i;:::-;3178:46;;3101:130;;;;:::o;874:176::-;932:7;951:9;967:1;963;:5;951:17;;991:1;986;:6;;978:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1042:1;1035:8;;;874:176;;;;:::o;590:104:1:-;643:15;677:10;670:17;;590:104;:::o;866:223:2:-;939:24;956:6;939:12;;:16;;:24;;;;:::i;:::-;924:12;:39;;;;997:33;1023:6;997:9;:21;1007:10;997:21;;;;;;;;;;;;;;;;:25;;:33;;;;:::i;:::-;973:9;:21;983:10;973:21;;;;;;;;;;;;;;;:57;;;;1040:42;1063:10;1075:6;1040:9;;;;;;;;;;:22;;;;:42;;;;;:::i;:::-;866:223;:::o;391:104:5:-;449:7;479:1;475;:5;:13;;487:1;475:13;;;483:1;475:13;468:20;;391:104;;;;:::o;620:240:2:-;691:24;708:6;691:12;;:16;;:24;;;;:::i;:::-;676:12;:39;;;;749:33;775:6;749:9;:21;759:10;749:21;;;;;;;;;;;;;;;;:25;;:33;;;;:::i;:::-;725:9;:21;735:10;725:21;;;;;;;;;;;;;;;:57;;;;792:61;819:10;839:4;846:6;792:9;;;;;;;;;;:26;;;;:61;;;;;;:::i;:::-;620:240;:::o;677:175:7:-;759:86;779:5;809:23;;;834:2;838:5;786:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;759:19;:86::i;:::-;677:175;;;:::o;1746:187:8:-;1832:7;1864:1;1859;:6;;1867:12;1851:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1890:9;1906:1;1902;:5;1890:17;;1925:1;1918:8;;;1746:187;;;;;:::o;3713:272::-;3799:7;3830:1;3826;:5;3833:12;3818:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3856:9;3872:1;3868;:5;;;;;;3856:17;;3977:1;3970:8;;;3713:272;;;;;:::o;858:203:7:-;958:96;978:5;1008:27;;;1037:4;1043:2;1047:5;985:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;958:19;:96::i;:::-;858:203;;;;:::o;2940:751::-;3359:23;3385:69;3413:4;3385:69;;;;;;;;;;;;;;;;;3393:5;3385:27;;;;:69;;;;;:::i;:::-;3359:95;;3488:1;3468:10;:17;:21;3464:221;;;3608:10;3597:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3589:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3464:221;2940:751;;;:::o;3575:194:0:-;3678:12;3709:53;3732:6;3740:4;3746:1;3749:12;3709:22;:53::i;:::-;3702:60;;3575:194;;;;;:::o;4922:958::-;5052:12;5084:18;5095:6;5084:10;:18::i;:::-;5076:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5207:12;5221:23;5248:6;:11;;5268:8;5279:4;5248:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5206:78;;;;5298:7;5294:580;;;5328:10;5321:17;;;;;;5294:580;5459:1;5439:10;:17;:21;5435:429;;;5697:10;5691:17;5757:15;5744:10;5740:2;5736:19;5729:44;5646:145;5836:12;5829:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4922:958;;;;;;;:::o;718:413::-;778:4;981:12;1090:7;1078:20;1070:28;;1123:1;1116:4;:8;1109:15;;;718:413;;;:::o

Swarm Source

ipfs://4e2065b8c6ea997200708316a4ff93b450ee43bcfc8b52005912c2edd7bfa111

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.