ETH Price: $3,918.76 (+5.24%)

Contract

0xe6700443149490a784415B682A4772Cc42714b53

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Gov29900822023-07-24 9:06:54500 days ago1690189614IN
0xe6700443...c42714b53
0 ETH0.000040551.49
Set Admin29900812023-07-24 9:06:54500 days ago1690189614IN
0xe6700443...c42714b53
0 ETH0.000044171.52
Set Tokens Per I...28497092023-07-21 8:53:01503 days ago1689929581IN
0xe6700443...c42714b53
0 ETH0.000080881.12
Update Last Dist...28497002023-07-21 8:52:49503 days ago1689929569IN
0xe6700443...c42714b53
0 ETH0.000034881.12
Set Tokens Per I...28496802023-07-21 8:52:38503 days ago1689929558IN
0xe6700443...c42714b53
0 ETH0.000084411.17
Update Last Dist...28496612023-07-21 8:52:09503 days ago1689929529IN
0xe6700443...c42714b53
0 ETH0.0000381.22
Set Tokens Per I...28496302023-07-21 8:51:23503 days ago1689929483IN
0xe6700443...c42714b53
0 ETH0.000103351.28
Update Last Dist...28496272023-07-21 8:51:12503 days ago1689929472IN
0xe6700443...c42714b53
0 ETH0.000039871.28
Set Tokens Per I...28202802023-07-20 14:10:02503 days ago1689862202IN
0xe6700443...c42714b53
0 ETH0.000130651.81
Update Last Dist...28202772023-07-20 14:09:50503 days ago1689862190IN
0xe6700443...c42714b53
0 ETH0.000056381.81
Update Last Dist...28197982023-07-20 13:55:59503 days ago1689861359IN
0xe6700443...c42714b53
0 ETH0.000064651.34
Update Last Dist...28197952023-07-20 13:55:48503 days ago1689861348IN
0xe6700443...c42714b53
0 ETH0.000064651.34
Add Reward Token28197942023-07-20 13:55:48503 days ago1689861348IN
0xe6700443...c42714b53
0 ETH0.000136771.34
Add Reward Token28197912023-07-20 13:55:48503 days ago1689861348IN
0xe6700443...c42714b53
0 ETH0.000035691.37
Add Reward Token28197632023-07-20 13:55:20503 days ago1689861320IN
0xe6700443...c42714b53
0 ETH0.000130651.28
Update Last Dist...27693092023-07-19 11:11:18504 days ago1689765078IN
0xe6700443...c42714b53
0 ETH0.000037390.775
Add Reward Token27693042023-07-19 11:11:18504 days ago1689765078IN
0xe6700443...c42714b53
0 ETH0.000111060.815

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FeeQlpDistributor

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion
File 1 of 9 : TokenDistributors.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

import "./RewardDistributor.sol";


contract StakedQlpDistributor is RewardDistributor {
    constructor(address _rewardTracker) public RewardDistributor(_rewardTracker) {}
}
contract FeeQlpDistributor is RewardDistributor {
    constructor(address _rewardTracker) public RewardDistributor(_rewardTracker) {}
}

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

pragma solidity 0.6.12;

contract Governable {
    address public gov;

    constructor() public {
        gov = msg.sender;
    }

    modifier onlyGov() {
        require(msg.sender == gov, "Governable: forbidden");
        _;
    }

    function setGov(address _gov) external onlyGov {
        gov = _gov;
    }
}

File 3 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;
    }
}

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 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.6.12;

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

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for 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 6 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 on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 7 of 9 : IRewardDistributor.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.6.12;

interface IRewardDistributor {
    function getAllRewardTokens() external view returns (address[] memory);
    function tokensPerInterval(address _rewardToken) external view returns (uint256);
    function pendingRewards(address _rewardToken) external view returns (uint256);
    function distribute(address _rewardToken) external returns (uint256);
    function addRewardToken(address _token) external;
    function removeRewardToken(address _token) external;
    function allRewardTokensLength() external view returns (uint256);
    function allRewardTokens(uint256) external view returns (address);
    function rewardTokens(address _token) external view returns (bool);
    function allTokens(address _token) external view returns (bool);
    function rewardTokenCount() external view returns (uint256);
}

File 8 of 9 : IRewardTracker.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.6.12;

interface IRewardTracker {
    function depositBalances(address _account, address _depositToken) external view returns (uint256);
    function stakedAmounts(address _account) external view returns (uint256);
    function updateRewards(address _rewardToken) external;
    function stake(address _depositToken, uint256 _amount) external;
    function stakeForAccount(address _fundingAccount, address _account, address _depositToken, uint256 _amount) external;
    function unstake(address _depositToken, uint256 _amount) external;
    function unstakeForAccount(address _account, address _depositToken, uint256 _amount, address _receiver) external;
    function tokensPerInterval(address _rewardToken) external view returns (uint256);
    function claim(address _rewardToken, address _receiver) external returns (uint256);
    function claimForAccount(address _account, address _rewardToken, address _receiver) external returns (uint256);
    function claimAll(address _receiver) external returns (address[] memory,uint256[] memory);
    function claimAllForAccount(address _account, address _receiver) external returns (address[] memory,uint256[] memory);
    function claimable(address _account, address _rewardToken) external view returns (uint256);
    function claimableAll(address _account) external view  returns (address[] memory,uint256[] memory);
    function averageStakedAmounts(address _account) external view returns (uint256);
    function cumulativeRewards(address _account, address _rewardToken) external view returns (uint256);
    function hasCumulativeRewards(address _account) external view returns (bool);
    function getAllRewardTokens() external view returns (address[] memory);
    function rewardTokens(address _rewardToken) external view returns (bool);
    function allTokens(address _rewardToken) external view returns (bool);
}

File 9 of 9 : RewardDistributor.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity 0.6.12;

import "../libraries/math/SafeMath.sol";
import "../libraries/token/IERC20.sol";
import "../libraries/token/SafeERC20.sol";

import "./interfaces/IRewardDistributor.sol";
import "./interfaces/IRewardTracker.sol";
import "../access/Governable.sol";

contract RewardDistributor is IRewardDistributor, Governable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    uint256 public constant MAX_ALL_REWARD_TOKENS = 10;

    address[] public override allRewardTokens;
    mapping (address => bool) public override allTokens;    

    mapping (address => bool) public override rewardTokens;

    uint256 public override rewardTokenCount;


    mapping (address => uint256) public override tokensPerInterval;

    mapping (address => uint256) public lastDistributionTime;

    address public rewardTracker;

    address public admin;

    event Distribute(address rewardToken, uint256 amount);
    event TokensPerIntervalChange(address rewardToken, uint256 amount);
    event AddRewardToken(address rewardToken);
    event RemoveRewardToken(address rewardToken);

    modifier onlyAdmin() {
        require(msg.sender == admin, "RewardDistributor: forbidden");
        _;
    }

    constructor( address _rewardTracker) public {
        rewardTracker = _rewardTracker;
        admin = msg.sender;
    }

    function setAdmin(address _admin) external onlyGov {
        admin = _admin;
    }

    function allRewardTokensLength() external override view returns (uint256) {
        return allRewardTokens.length;
    }

    function getAllRewardTokens() external override view returns (address[] memory) {
        address[] memory tokens = new address[](rewardTokenCount);
        uint256 index;
        uint256 length = allRewardTokens.length;
        for (uint256 i = 0; i < length; i++) {
            address token = allRewardTokens[i];
            if(!rewardTokens[token]){
                continue;
            }
            tokens[index] = token;
            index++;
        }

        return tokens;
    }

    function addRewardToken(
        address _token
    ) external override onlyAdmin{
        if (!rewardTokens[_token]) {
            if (!allTokens[_token]) {
                require(allRewardTokens.length < MAX_ALL_REWARD_TOKENS,"RewardDistributor: too many rewardTokens");
                allRewardTokens.push(_token);
                allTokens[_token] = true;
            }
            rewardTokens[_token] = true;
            rewardTokenCount++;
            emit AddRewardToken(_token);
        }
    }

    function removeRewardToken(
        address _token
    ) external override onlyAdmin{
        if(rewardTokens[_token]){
            require(tokensPerInterval[_token] == 0,"RewardDistributor: tokensPerInterval must be zero");
            delete rewardTokens[_token];
            rewardTokenCount--;
            emit RemoveRewardToken(_token);
        }
    }

    // to help users who accidentally send their tokens to this contract
    function withdrawToken(
        address _token,
        address _account,
        uint256 _amount
    ) external onlyGov {
        IERC20(_token).safeTransfer(_account, _amount);
    }

    function updateAllLastDistributionTime() external onlyAdmin {
        uint256 length = allRewardTokens.length;
        for (uint256 i = 0; i < length; i++) {
            address token = allRewardTokens[i];
            if(!rewardTokens[token]){
                continue;
            }
            _updateLastDistributionTime(token);
        }
    }

    function updateLastDistributionTime(address _rewardToken) external onlyAdmin {
        require(rewardTokens[_rewardToken], "RewardDistributor: invalid _rewardToken");
        _updateLastDistributionTime(_rewardToken);
    }

    function _updateLastDistributionTime(address _rewardToken) private {
        lastDistributionTime[_rewardToken] = block.timestamp;
    }

    function setTokensPerInterval(address _rewardToken, uint256 _amount) external onlyAdmin {
        require(rewardTokens[_rewardToken], "RewardDistributor: invalid _rewardToken");
        require(lastDistributionTime[_rewardToken] != 0, "RewardDistributor: invalid lastDistributionTime");
        IRewardTracker(rewardTracker).updateRewards(_rewardToken);
        tokensPerInterval[_rewardToken] = _amount;
        emit TokensPerIntervalChange(_rewardToken, _amount);
    }

    function pendingRewards(address _rewardToken) public view override returns (uint256) {
        require(allTokens[_rewardToken], "RewardDistributor: invalid _rewardToken");
        if (block.timestamp == lastDistributionTime[_rewardToken]) {
            return 0;
        }

        uint256 timeDiff = block.timestamp.sub(lastDistributionTime[_rewardToken]);
        return tokensPerInterval[_rewardToken].mul(timeDiff);
    }

    function distribute(address _rewardToken) external override returns (uint256) {
        require(msg.sender == rewardTracker, "RewardDistributor: invalid msg.sender");
        uint256 amount = pendingRewards(_rewardToken);
        if (amount == 0) {
            return 0;
        }

        lastDistributionTime[_rewardToken] = block.timestamp;

        uint256 balance = IERC20(_rewardToken).balanceOf(address(this));
        if (amount > balance) {
            amount = balance;
        }

        IERC20(_rewardToken).safeTransfer(msg.sender, amount);

        emit Distribute(_rewardToken, amount);
        return amount;
    }
}

Settings
{
  "metadata": {
    "bytecodeHash": "none",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 1
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rewardTracker","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"}],"name":"AddRewardToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Distribute","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"}],"name":"RemoveRewardToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rewardToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensPerIntervalChange","type":"event"},{"inputs":[],"name":"MAX_ALL_REWARD_TOKENS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"addRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allRewardTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allRewardTokensLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"distribute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllRewardTokens","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gov","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastDistributionTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"removeRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardTracker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gov","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setTokensPerInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokensPerInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"updateAllLastDistributionTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"}],"name":"updateLastDistributionTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5060405161152c38038061152c8339818101604052602081101561003357600080fd5b5051600080546001600160a01b031990811633908117909255600780546001600160a01b0390941693821693909317909255600880549092161790556114ae8061007e6000396000f3fe608060405234801561001057600080fd5b50600436106101125760003560e01c806301e336671461011757806312d43a511461014f57806312edb24c1461017357806319f7ab45146101cb5780631c03e6cc146101f1578063270da24014610217578063286c6a941461024f57806331d7a262146102575780633d509c971461027d57806363453ae1146102a35780636bcb411a146102c9578063704b6c02146102d157806383b3dd24146102f7578063847ec40c1461032357806395ded45c146103495780639ee80c5c14610383578063abb06b95146103a0578063ba9e843e146103a8578063cfad57a2146103b0578063db65c26b146103d6578063f5ab16cc146103de578063f851a44014610404575b600080fd5b61014d6004803603606081101561012d57600080fd5b506001600160a01b0381358116916020810135909116906040013561040c565b005b61015761047c565b604080516001600160a01b039092168252519081900360200190f35b61017b61048b565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156101b757818101518382015260200161019f565b505050509050019250505060405180910390f35b61014d600480360360208110156101e157600080fd5b50356001600160a01b0316610566565b61014d6004803603602081101561020757600080fd5b50356001600160a01b0316610616565b61023d6004803603602081101561022d57600080fd5b50356001600160a01b03166107ac565b60408051918252519081900360200190f35b61023d6107be565b61023d6004803603602081101561026d57600080fd5b50356001600160a01b03166107c4565b61014d6004803603602081101561029357600080fd5b50356001600160a01b0316610896565b61023d600480360360208110156102b957600080fd5b50356001600160a01b03166109bb565b610157610b14565b61014d600480360360208110156102e757600080fd5b50356001600160a01b0316610b23565b61014d6004803603604081101561030d57600080fd5b506001600160a01b038135169060200135610b9c565b61023d6004803603602081101561033957600080fd5b50356001600160a01b0316610d52565b61036f6004803603602081101561035f57600080fd5b50356001600160a01b0316610d64565b604080519115158252519081900360200190f35b6101576004803603602081101561039957600080fd5b5035610d79565b61023d610da0565b61023d610da6565b61014d600480360360208110156103c657600080fd5b50356001600160a01b0316610dab565b61014d610e24565b61036f600480360360208110156103f457600080fd5b50356001600160a01b0316610eda565b610157610eef565b6000546001600160a01b03163314610463576040805162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b604482015290519081900360640190fd5b6104776001600160a01b0384168383610efe565b505050565b6000546001600160a01b031681565b6060806004546001600160401b03811180156104a657600080fd5b506040519080825280602002602001820160405280156104d0578160200160208202803683370190505b50600154909150600090815b8181101561055d576000600182815481106104f357fe5b60009182526020808320909101546001600160a01b0316808352600390915260409091205490915060ff166105285750610555565b8085858151811061053557fe5b6001600160a01b0390921660209283029190910190910152506001909201915b6001016104dc565b50919250505090565b6008546001600160a01b031633146105b3576040805162461bcd60e51b815260206004820152601c60248201526000805160206113a9833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526003602052604090205460ff1661060a5760405162461bcd60e51b81526004018080602001828103825260278152602001806114516027913960400191505060405180910390fd5b61061381610f50565b50565b6008546001600160a01b03163314610663576040805162461bcd60e51b815260206004820152601c60248201526000805160206113a9833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526003602052604090205460ff16610613576001600160a01b03811660009081526002602052604090205460ff1661074557600154600a116106e45760405162461bcd60e51b81526004018080602001828103825260288152602001806113fa6028913960400191505060405180910390fd5b6001805480820182557fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b0384169081179091556000908152600260205260409020805460ff191690911790555b6001600160a01b038116600081815260036020908152604091829020805460ff19166001908117909155600480549091019055815192835290517f851bbb4304bf0768ed98b97e429b5bd1dcc1f194b36cd1650f40293e951ae3939281900390910190a150565b60056020526000908152604090205481565b60015490565b6001600160a01b03811660009081526002602052604081205460ff1661081b5760405162461bcd60e51b81526004018080602001828103825260278152602001806114516027913960400191505060405180910390fd5b6001600160a01b03821660009081526006602052604090205442141561084357506000610891565b6001600160a01b038216600090815260066020526040812054610867904290610f6c565b6001600160a01b03841660009081526005602052604090205490915061088d9082610fb7565b9150505b919050565b6008546001600160a01b031633146108e3576040805162461bcd60e51b815260206004820152601c60248201526000805160206113a9833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526003602052604090205460ff1615610613576001600160a01b038116600090815260056020526040902054156109595760405162461bcd60e51b81526004018080602001828103825260318152602001806113c96031913960400191505060405180910390fd5b6001600160a01b038116600081815260036020908152604091829020805460ff1916905560048054600019019055815192835290517f36bd04094fa067bb9471a8fbdb0a6e8a43424a2566ad3a740c88973fa40a31189281900390910190a150565b6007546000906001600160a01b03163314610a075760405162461bcd60e51b815260040180806020018281038252602581526020018061133d6025913960400191505060405180910390fd5b6000610a12836107c4565b905080610a23576000915050610891565b6001600160a01b038316600081815260066020908152604080832042905580516370a0823160e01b815230600482015290519293926370a0823192602480840193919291829003018186803b158015610a7b57600080fd5b505afa158015610a8f573d6000803e3d6000fd5b505050506040513d6020811015610aa557600080fd5b5051905080821115610ab5578091505b610ac96001600160a01b0385163384610efe565b604080516001600160a01b03861681526020810184905281517fc1d32ad5cca423e7dda2123dbf8c482f8e77d00b631c06e903a47f2cec1334df929181900390910190a15092915050565b6007546001600160a01b031681565b6000546001600160a01b03163314610b7a576040805162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6008546001600160a01b03163314610be9576040805162461bcd60e51b815260206004820152601c60248201526000805160206113a9833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526003602052604090205460ff16610c405760405162461bcd60e51b81526004018080602001828103825260278152602001806114516027913960400191505060405180910390fd5b6001600160a01b038216600090815260066020526040902054610c945760405162461bcd60e51b815260040180806020018281038252602f815260200180611422602f913960400191505060405180910390fd5b60075460408051635fd6196560e01b81526001600160a01b03858116600483015291519190921691635fd6196591602480830192600092919082900301818387803b158015610ce257600080fd5b505af1158015610cf6573d6000803e3d6000fd5b5050506001600160a01b0383166000818152600560209081526040918290208590558151928352820184905280517f83a9322775b48550bbef762b82384c8ed0b747ff4c37188bd3bb72e3c7cca8239350918290030190a15050565b60066020526000908152604090205481565b60026020526000908152604090205460ff1681565b60018181548110610d8657fe5b6000918252602090912001546001600160a01b0316905081565b60045481565b600a81565b6000546001600160a01b03163314610e02576040805162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6008546001600160a01b03163314610e71576040805162461bcd60e51b815260206004820152601c60248201526000805160206113a9833981519152604482015290519081900360640190fd5b60015460005b81811015610ed657600060018281548110610e8e57fe5b60009182526020808320909101546001600160a01b0316808352600390915260409091205490915060ff16610ec35750610ece565b610ecc81610f50565b505b600101610e77565b5050565b60036020526000908152604090205460ff1681565b6008546001600160a01b031681565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610477908490611010565b6001600160a01b03166000908152600660205260409020429055565b6000610fae83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506110c1565b90505b92915050565b600082610fc657506000610fb1565b82820282848281610fd357fe5b0414610fae5760405162461bcd60e51b81526004018080602001828103825260218152602001806113886021913960400191505060405180910390fd5b6060611065826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661115d9092919063ffffffff16565b8051909150156104775780806020019051602081101561108457600080fd5b50516104775760405162461bcd60e51b815260040180806020018281038252602a815260200180611478602a913960400191505060405180910390fd5b600081848411156111505760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111155781810151838201526020016110fd565b50505050905090810190601f1680156111425780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50508183035b9392505050565b606061116c8484600085611174565b949350505050565b6060824710156111b55760405162461bcd60e51b81526004018080602001828103825260268152602001806113626026913960400191505060405180910390fd5b6111be856112d0565b61120f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061124e5780518252601f19909201916020918201910161122f565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146112b0576040519150601f19603f3d011682016040523d82523d6000602084013e6112b5565b606091505b50915091506112c58282866112d6565b979650505050505050565b3b151590565b606083156112e5575081611156565b8251156112f55782518084602001fd5b60405162461bcd60e51b81526020600482018181528451602484015284518593919283926044019190850190808383600083156111155781810151838201526020016110fd56fe5265776172644469737472696275746f723a20696e76616c6964206d73672e73656e646572416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775265776172644469737472696275746f723a20666f7262696464656e000000005265776172644469737472696275746f723a20746f6b656e73506572496e74657276616c206d757374206265207a65726f5265776172644469737472696275746f723a20746f6f206d616e7920726577617264546f6b656e735265776172644469737472696275746f723a20696e76616c6964206c617374446973747269627574696f6e54696d655265776172644469737472696275746f723a20696e76616c6964205f726577617264546f6b656e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a164736f6c634300060c000a000000000000000000000000d3ee28cb8ed02a5641dfa02624df399b01f1e131

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101125760003560e01c806301e336671461011757806312d43a511461014f57806312edb24c1461017357806319f7ab45146101cb5780631c03e6cc146101f1578063270da24014610217578063286c6a941461024f57806331d7a262146102575780633d509c971461027d57806363453ae1146102a35780636bcb411a146102c9578063704b6c02146102d157806383b3dd24146102f7578063847ec40c1461032357806395ded45c146103495780639ee80c5c14610383578063abb06b95146103a0578063ba9e843e146103a8578063cfad57a2146103b0578063db65c26b146103d6578063f5ab16cc146103de578063f851a44014610404575b600080fd5b61014d6004803603606081101561012d57600080fd5b506001600160a01b0381358116916020810135909116906040013561040c565b005b61015761047c565b604080516001600160a01b039092168252519081900360200190f35b61017b61048b565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156101b757818101518382015260200161019f565b505050509050019250505060405180910390f35b61014d600480360360208110156101e157600080fd5b50356001600160a01b0316610566565b61014d6004803603602081101561020757600080fd5b50356001600160a01b0316610616565b61023d6004803603602081101561022d57600080fd5b50356001600160a01b03166107ac565b60408051918252519081900360200190f35b61023d6107be565b61023d6004803603602081101561026d57600080fd5b50356001600160a01b03166107c4565b61014d6004803603602081101561029357600080fd5b50356001600160a01b0316610896565b61023d600480360360208110156102b957600080fd5b50356001600160a01b03166109bb565b610157610b14565b61014d600480360360208110156102e757600080fd5b50356001600160a01b0316610b23565b61014d6004803603604081101561030d57600080fd5b506001600160a01b038135169060200135610b9c565b61023d6004803603602081101561033957600080fd5b50356001600160a01b0316610d52565b61036f6004803603602081101561035f57600080fd5b50356001600160a01b0316610d64565b604080519115158252519081900360200190f35b6101576004803603602081101561039957600080fd5b5035610d79565b61023d610da0565b61023d610da6565b61014d600480360360208110156103c657600080fd5b50356001600160a01b0316610dab565b61014d610e24565b61036f600480360360208110156103f457600080fd5b50356001600160a01b0316610eda565b610157610eef565b6000546001600160a01b03163314610463576040805162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b604482015290519081900360640190fd5b6104776001600160a01b0384168383610efe565b505050565b6000546001600160a01b031681565b6060806004546001600160401b03811180156104a657600080fd5b506040519080825280602002602001820160405280156104d0578160200160208202803683370190505b50600154909150600090815b8181101561055d576000600182815481106104f357fe5b60009182526020808320909101546001600160a01b0316808352600390915260409091205490915060ff166105285750610555565b8085858151811061053557fe5b6001600160a01b0390921660209283029190910190910152506001909201915b6001016104dc565b50919250505090565b6008546001600160a01b031633146105b3576040805162461bcd60e51b815260206004820152601c60248201526000805160206113a9833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526003602052604090205460ff1661060a5760405162461bcd60e51b81526004018080602001828103825260278152602001806114516027913960400191505060405180910390fd5b61061381610f50565b50565b6008546001600160a01b03163314610663576040805162461bcd60e51b815260206004820152601c60248201526000805160206113a9833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526003602052604090205460ff16610613576001600160a01b03811660009081526002602052604090205460ff1661074557600154600a116106e45760405162461bcd60e51b81526004018080602001828103825260288152602001806113fa6028913960400191505060405180910390fd5b6001805480820182557fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b0384169081179091556000908152600260205260409020805460ff191690911790555b6001600160a01b038116600081815260036020908152604091829020805460ff19166001908117909155600480549091019055815192835290517f851bbb4304bf0768ed98b97e429b5bd1dcc1f194b36cd1650f40293e951ae3939281900390910190a150565b60056020526000908152604090205481565b60015490565b6001600160a01b03811660009081526002602052604081205460ff1661081b5760405162461bcd60e51b81526004018080602001828103825260278152602001806114516027913960400191505060405180910390fd5b6001600160a01b03821660009081526006602052604090205442141561084357506000610891565b6001600160a01b038216600090815260066020526040812054610867904290610f6c565b6001600160a01b03841660009081526005602052604090205490915061088d9082610fb7565b9150505b919050565b6008546001600160a01b031633146108e3576040805162461bcd60e51b815260206004820152601c60248201526000805160206113a9833981519152604482015290519081900360640190fd5b6001600160a01b03811660009081526003602052604090205460ff1615610613576001600160a01b038116600090815260056020526040902054156109595760405162461bcd60e51b81526004018080602001828103825260318152602001806113c96031913960400191505060405180910390fd5b6001600160a01b038116600081815260036020908152604091829020805460ff1916905560048054600019019055815192835290517f36bd04094fa067bb9471a8fbdb0a6e8a43424a2566ad3a740c88973fa40a31189281900390910190a150565b6007546000906001600160a01b03163314610a075760405162461bcd60e51b815260040180806020018281038252602581526020018061133d6025913960400191505060405180910390fd5b6000610a12836107c4565b905080610a23576000915050610891565b6001600160a01b038316600081815260066020908152604080832042905580516370a0823160e01b815230600482015290519293926370a0823192602480840193919291829003018186803b158015610a7b57600080fd5b505afa158015610a8f573d6000803e3d6000fd5b505050506040513d6020811015610aa557600080fd5b5051905080821115610ab5578091505b610ac96001600160a01b0385163384610efe565b604080516001600160a01b03861681526020810184905281517fc1d32ad5cca423e7dda2123dbf8c482f8e77d00b631c06e903a47f2cec1334df929181900390910190a15092915050565b6007546001600160a01b031681565b6000546001600160a01b03163314610b7a576040805162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6008546001600160a01b03163314610be9576040805162461bcd60e51b815260206004820152601c60248201526000805160206113a9833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526003602052604090205460ff16610c405760405162461bcd60e51b81526004018080602001828103825260278152602001806114516027913960400191505060405180910390fd5b6001600160a01b038216600090815260066020526040902054610c945760405162461bcd60e51b815260040180806020018281038252602f815260200180611422602f913960400191505060405180910390fd5b60075460408051635fd6196560e01b81526001600160a01b03858116600483015291519190921691635fd6196591602480830192600092919082900301818387803b158015610ce257600080fd5b505af1158015610cf6573d6000803e3d6000fd5b5050506001600160a01b0383166000818152600560209081526040918290208590558151928352820184905280517f83a9322775b48550bbef762b82384c8ed0b747ff4c37188bd3bb72e3c7cca8239350918290030190a15050565b60066020526000908152604090205481565b60026020526000908152604090205460ff1681565b60018181548110610d8657fe5b6000918252602090912001546001600160a01b0316905081565b60045481565b600a81565b6000546001600160a01b03163314610e02576040805162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6008546001600160a01b03163314610e71576040805162461bcd60e51b815260206004820152601c60248201526000805160206113a9833981519152604482015290519081900360640190fd5b60015460005b81811015610ed657600060018281548110610e8e57fe5b60009182526020808320909101546001600160a01b0316808352600390915260409091205490915060ff16610ec35750610ece565b610ecc81610f50565b505b600101610e77565b5050565b60036020526000908152604090205460ff1681565b6008546001600160a01b031681565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610477908490611010565b6001600160a01b03166000908152600660205260409020429055565b6000610fae83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506110c1565b90505b92915050565b600082610fc657506000610fb1565b82820282848281610fd357fe5b0414610fae5760405162461bcd60e51b81526004018080602001828103825260218152602001806113886021913960400191505060405180910390fd5b6060611065826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661115d9092919063ffffffff16565b8051909150156104775780806020019051602081101561108457600080fd5b50516104775760405162461bcd60e51b815260040180806020018281038252602a815260200180611478602a913960400191505060405180910390fd5b600081848411156111505760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111155781810151838201526020016110fd565b50505050905090810190601f1680156111425780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50508183035b9392505050565b606061116c8484600085611174565b949350505050565b6060824710156111b55760405162461bcd60e51b81526004018080602001828103825260268152602001806113626026913960400191505060405180910390fd5b6111be856112d0565b61120f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061124e5780518252601f19909201916020918201910161122f565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146112b0576040519150601f19603f3d011682016040523d82523d6000602084013e6112b5565b606091505b50915091506112c58282866112d6565b979650505050505050565b3b151590565b606083156112e5575081611156565b8251156112f55782518084602001fd5b60405162461bcd60e51b81526020600482018181528451602484015284518593919283926044019190850190808383600083156111155781810151838201526020016110fd56fe5265776172644469737472696275746f723a20696e76616c6964206d73672e73656e646572416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775265776172644469737472696275746f723a20666f7262696464656e000000005265776172644469737472696275746f723a20746f6b656e73506572496e74657276616c206d757374206265207a65726f5265776172644469737472696275746f723a20746f6f206d616e7920726577617264546f6b656e735265776172644469737472696275746f723a20696e76616c6964206c617374446973747269627574696f6e54696d655265776172644469737472696275746f723a20696e76616c6964205f726577617264546f6b656e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a164736f6c634300060c000a

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

000000000000000000000000d3ee28cb8ed02a5641dfa02624df399b01f1e131

-----Decoded View---------------
Arg [0] : _rewardTracker (address): 0xd3Ee28CB8ed02a5641DFA02624dF399b01f1e131

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000d3ee28cb8ed02a5641dfa02624df399b01f1e131


Block Transaction Gas Used Reward
view all blocks sequenced

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
[ 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.