frxETH Price: $1,791.14 (+2.44%)

Contract

0x858847c21B075e45727fcB0B544BD843CD750361

Overview

frxETH Balance | FXTL Balance

0 frxETH | 1,391,810 FXTL

frxETH Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

> 10 Token Transfers found.

Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RewardDistribution

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
london EvmVersion
File 1 of 7 : RewardDistribution.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;
/**
 *Submitted for verification at Etherscan.io on 2020-07-17
 */

/*
   ____            __   __        __   _
  / __/__ __ ___  / /_ / /  ___  / /_ (_)__ __
 _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ /
/___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\
     /___/

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

import "../interfaces/MathUtil.sol";
import "../interfaces/IVoterProxy.sol";
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';


/*
 a managed reward contract which can manually set weights for any account address
*/
contract RewardDistribution {
    using SafeERC20 for IERC20;

    
    uint256 public constant duration = 7 days;

    IERC20 public immutable rewardToken;
    address public immutable owner;

    uint256 public pid;
    uint256 public periodFinish;
    uint256 public rewardRate;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;
    uint256 public queuedRewards;
    uint256 public currentRewards;
    uint256 public historicalRewards;
    
    uint256 private _totalSupply;
    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public rewards;
    mapping(address => uint256) private _balances;

    event SetPendingOwner(address indexed _address);
    event OwnerChanged(address indexed _address);
    event RewardAdded(uint256 reward);
    event WeightSet(address indexed user, uint256 oldWeight, uint256 newWeight);
    event RewardPaid(address indexed user, uint256 reward);
    event AddDistributor(address indexed _distro, bool _valid);

    constructor(address _rewardToken, address _owner){
        rewardToken = IERC20(_rewardToken);
        owner = _owner;

        _setWeight(_owner, 1e18);
    }

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

    //balance of an account
    function balanceOf(address _account) public view returns (uint256) {
        return _balances[_account];
    }

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

    //checkpoint a given user
    function user_checkpoint(address _account) public updateReward(_account){

    }

    //claim time to period finish
    function lastTimeRewardApplicable() public view returns (uint256) {
        return MathUtil.min(block.timestamp, periodFinish);
    }

    //rewards per weight
    function rewardPerToken() public view returns (uint256) {
        if (totalSupply() == 0) {
            return rewardPerTokenStored;
        }
        return rewardPerTokenStored + ((lastTimeRewardApplicable() - lastUpdateTime) * rewardRate * 1e18 / totalSupply());
    }

    //earned rewards for given account
    function earned(address _account) public view returns (uint256) {
        return rewards[_account] + (balanceOf(_account) * (rewardPerToken() - userRewardPerTokenPaid[_account]) / 1e18);
    }


    //increase reward weight for a given pool
    //used by reward manager
    function setWeight(address _account, uint256 _amount) external returns(bool){
        require(msg.sender == owner, "!authorized");
        return _setWeight(_account, _amount);
    }

    //increase reward weight for a list of pools
    //used by reward manager
    function setWeights(address[] calldata _account, uint256[] calldata _amount) external{
        require(msg.sender == owner, "!authorized");

        for(uint256 i = 0; i < _account.length; i++){
            _setWeight(_account[i], _amount[i]);
        }
    }

    //internal set weight
    function _setWeight(address _account, uint256 _amount)
        internal
        updateReward(_account)
        returns(bool)
    {
        emit WeightSet(_account, _balances[_account], _amount);

        uint256 tsupply = _totalSupply;
        tsupply -= _balances[_account]; //remove current from temp supply
        _balances[_account] = _amount; //set new account balance
        tsupply += _amount; //add new to temp supply
        _totalSupply = tsupply; //set supply

        return true;
    }

    //get reward
    function getReward(address _claimTo) public updateReward(msg.sender) returns(bool){
        uint256 reward = earned(msg.sender);
        if (reward > 0) {
            rewards[msg.sender] = 0;
            rewardToken.safeTransfer(_claimTo, reward);
            emit RewardPaid(msg.sender, reward);
        }
        return true;
    }

    //outside address add to rewards
    function donate(uint256 _amount) external returns(bool){
        IERC20(rewardToken).safeTransferFrom(msg.sender, address(this), _amount);
        queuedRewards += _amount;
        return true;
    }

    //distributor can add more rewards and start new reward cycle
    function queueNewRewards(uint256 _rewards) external returns(bool){
        require(msg.sender == IVoterProxy(owner).operator(), "!distro");

        //pull
        if(_rewards > 0){
            IERC20(rewardToken).safeTransferFrom(msg.sender, address(this), _rewards);
        }

        //notify pulled + queued
        notifyRewardAmount(_rewards + queuedRewards);
        //reset queued
        queuedRewards = 0;
        return true;
    }


    //internal: start new reward cycle
    function notifyRewardAmount(uint256 reward)
        internal
        updateReward(address(0))
    {
        historicalRewards += reward;
        if (block.timestamp >= periodFinish) {
            rewardRate = reward / duration;
        } else {
            uint256 remaining = periodFinish - block.timestamp;
            uint256 leftover = remaining * rewardRate;
            reward += leftover;
            rewardRate = reward / duration;
        }
        currentRewards = reward;
        lastUpdateTime = block.timestamp;
        periodFinish = block.timestamp + duration;
        emit RewardAdded(reward);
    }
}

File 2 of 7 : MathUtil.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library MathUtil {
    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }
}

File 3 of 7 : IVoterProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

interface IVoterProxy{
    function operator() external view returns(address);
}

File 4 of 7 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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");

        (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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 5 of 7 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/IERC20Permit.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 Address for address;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    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'
        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));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

File 6 of 7 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 7 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "london",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_distro","type":"address"},{"indexed":false,"internalType":"bool","name":"_valid","type":"bool"}],"name":"AddDistributor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_address","type":"address"}],"name":"SetPendingOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldWeight","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newWeight","type":"uint256"}],"name":"WeightSet","type":"event"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"donate","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_claimTo","type":"address"}],"name":"getReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"historicalRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":"pid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewards","type":"uint256"}],"name":"queueNewRewards","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"queuedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setWeight","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_account","type":"address[]"},{"internalType":"uint256[]","name":"_amount","type":"uint256[]"}],"name":"setWeights","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"user_checkpoint","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040523480156200001157600080fd5b506040516200147f3803806200147f8339810160408190526200003491620002d8565b6001600160a01b03808316608052811660a0526200005b81670de0b6b3a764000062000064565b505050620003a0565b600082620000716200017a565b6004556200007e620001f1565b6003556001600160a01b03811615620000c8576200009c816200020c565b6001600160a01b0382166000908152600a60209081526040808320939093556004546009909152919020555b6001600160a01b0384166000818152600b60209081526040918290205482519081529081018690527f21db95bb0bf542176e30aad5bade51e70343131b1b652a99da0e4a1189506399910160405180910390a26008546001600160a01b0385166000908152600b602052604090205462000143908262000326565b6001600160a01b0386166000908152600b6020526040902085905590506200016c848262000340565b600855506001949350505050565b60006200018660085490565b62000192575060045490565b600854600254600354620001a5620001f1565b620001b1919062000326565b620001bd91906200035b565b620001d190670de0b6b3a76400006200035b565b620001dd91906200037d565b600454620001ec919062000340565b905090565b6000620001ec42600154620002a160201b620008661760201c565b6001600160a01b038116600090815260096020526040812054670de0b6b3a764000090620002396200017a565b62000245919062000326565b6001600160a01b0384166000908152600b60205260409020546200026a91906200035b565b6200027691906200037d565b6001600160a01b0383166000908152600a60205260409020546200029b919062000340565b92915050565b6000818310620002b25781620002b4565b825b9392505050565b80516001600160a01b0381168114620002d357600080fd5b919050565b60008060408385031215620002ec57600080fd5b620002f783620002bb565b91506200030760208401620002bb565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b6000828210156200033b576200033b62000310565b500390565b6000821982111562000356576200035662000310565b500190565b600081600019048311821515161562000378576200037862000310565b500290565b6000826200039b57634e487b7160e01b600052601260045260246000fd5b500490565b60805160a05161108f620003f060003960008181610270015281816103d7015281816104ab01526105f001526000818161031d015281816105880152818161073d015261081f015261108f6000f3fe608060405234801561001057600080fd5b50600436106101575760003560e01c80638b876347116100c3578063cd3daf9d1161007c578063cd3daf9d146102e2578063df136d65146102ea578063ebe2b12b146102f3578063f1068454146102fc578063f14faf6f14610305578063f7c618c11461031857600080fd5b80638b8763471461024b5780638da5cb5b1461026b578063901a7d53146102aa57806391c7a6fc146102b3578063c00007b0146102c6578063c8f33c91146102d957600080fd5b80634b820093116101155780634b820093146101e0578063590a41f5146101f557806363d38c3b1461020857806370a08231146102115780637b0a47ee1461023a57806380faa57d1461024357600080fd5b80628cc2621461015c57806305ba0cf1146101825780630700037d146101a55780630fb5a6b4146101c557806318160ddd146101cf578063262d3d6d146101d7575b600080fd5b61016f61016a366004610dce565b61033f565b6040519081526020015b60405180910390f35b610195610190366004610deb565b6103ca565b6040519015158152602001610179565b61016f6101b3366004610dce565b600a6020526000908152604090205481565b61016f62093a8081565b60085461016f565b61016f60075481565b6101f36101ee366004610dce565b610448565b005b610195610203366004610e17565b6104a7565b61016f60055481565b61016f61021f366004610dce565b6001600160a01b03166000908152600b602052604090205490565b61016f60025481565b61016f6105d2565b61016f610259366004610dce565b60096020526000908152604090205481565b6102927f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610179565b61016f60065481565b6101f36102c1366004610e7c565b6105e5565b6101956102d4366004610dce565b6106b8565b61016f60035481565b61016f6107ac565b61016f60045481565b61016f60015481565b61016f60005481565b610195610313366004610e17565b610810565b6102927f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b038116600090815260096020526040812054670de0b6b3a76400009061036a6107ac565b6103749190610efe565b6001600160a01b0384166000908152600b60205260409020546103979190610f15565b6103a19190610f34565b6001600160a01b0383166000908152600a60205260409020546103c49190610f56565b92915050565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146104375760405162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b60448201526064015b60405180910390fd5b610441838361087c565b9392505050565b806104516107ac565b60045561045c6105d2565b6003556001600160a01b038116156104a3576104778161033f565b6001600160a01b0382166000908152600a60209081526040808320939093556004546009909152919020555b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663570ca7356040518163ffffffff1660e01b8152600401602060405180830381865afa158015610507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052b9190610f6e565b6001600160a01b0316336001600160a01b0316146105755760405162461bcd60e51b81526020600482015260076024820152662164697374726f60c81b604482015260640161042e565b81156105b0576105b06001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085610987565b6105c6600554836105c19190610f56565b6109f8565b50506000600555600190565b60006105e042600154610866565b905090565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461064b5760405162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015260640161042e565b60005b838110156106b15761069e85858381811061066b5761066b610f8b565b90506020020160208101906106809190610dce565b84848481811061069257610692610f8b565b9050602002013561087c565b50806106a981610fa1565b91505061064e565b5050505050565b6000336106c36107ac565b6004556106ce6105d2565b6003556001600160a01b03811615610715576106e98161033f565b6001600160a01b0382166000908152600a60209081526040808320939093556004546009909152919020555b60006107203361033f565b905080156107a257336000908152600a602052604081205561076c7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168583610b1f565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a25b5060019392505050565b60006107b760085490565b6107c2575060045490565b6008546002546003546107d36105d2565b6107dd9190610efe565b6107e79190610f15565b6107f990670de0b6b3a7640000610f15565b6108039190610f34565b6004546105e09190610f56565b60006108476001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333085610987565b81600560008282546108599190610f56565b9091555060019392505050565b60008183106108755781610441565b5090919050565b6000826108876107ac565b6004556108926105d2565b6003556001600160a01b038116156108d9576108ad8161033f565b6001600160a01b0382166000908152600a60209081526040808320939093556004546009909152919020555b6001600160a01b0384166000818152600b60209081526040918290205482519081529081018690527f21db95bb0bf542176e30aad5bade51e70343131b1b652a99da0e4a1189506399910160405180910390a26008546001600160a01b0385166000908152600b60205260409020546109529082610efe565b6001600160a01b0386166000908152600b6020526040902085905590506109798482610f56565b600855506001949350505050565b6040516001600160a01b03808516602483015283166044820152606481018290526109f29085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610b54565b50505050565b6000610a026107ac565b600455610a0d6105d2565b6003556001600160a01b03811615610a5457610a288161033f565b6001600160a01b0382166000908152600a60209081526040808320939093556004546009909152919020555b8160076000828254610a669190610f56565b90915550506001544210610a8957610a8162093a8083610f34565b600255610acc565b600042600154610a999190610efe565b9050600060025482610aab9190610f15565b9050610ab78185610f56565b9350610ac662093a8085610f34565b60025550505b6006829055426003819055610ae59062093a8090610f56565b6001556040518281527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a15050565b6040516001600160a01b038316602482015260448101829052610b4f90849063a9059cbb60e01b906064016109bb565b505050565b6000610ba9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c299092919063ffffffff16565b9050805160001480610bca575080806020019051810190610bca9190610fbc565b610b4f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161042e565b6060610c388484600085610c40565b949350505050565b606082471015610ca15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161042e565b600080866001600160a01b03168587604051610cbd919061100a565b60006040518083038185875af1925050503d8060008114610cfa576040519150601f19603f3d011682016040523d82523d6000602084013e610cff565b606091505b5091509150610d1087838387610d1b565b979650505050505050565b60608315610d87578251610d80576001600160a01b0385163b610d805760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161042e565b5081610c38565b610c388383815115610d9c5781518083602001fd5b8060405162461bcd60e51b815260040161042e9190611026565b6001600160a01b0381168114610dcb57600080fd5b50565b600060208284031215610de057600080fd5b813561044181610db6565b60008060408385031215610dfe57600080fd5b8235610e0981610db6565b946020939093013593505050565b600060208284031215610e2957600080fd5b5035919050565b60008083601f840112610e4257600080fd5b50813567ffffffffffffffff811115610e5a57600080fd5b6020830191508360208260051b8501011115610e7557600080fd5b9250929050565b60008060008060408587031215610e9257600080fd5b843567ffffffffffffffff80821115610eaa57600080fd5b610eb688838901610e30565b90965094506020870135915080821115610ecf57600080fd5b50610edc87828801610e30565b95989497509550505050565b634e487b7160e01b600052601160045260246000fd5b600082821015610f1057610f10610ee8565b500390565b6000816000190483118215151615610f2f57610f2f610ee8565b500290565b600082610f5157634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115610f6957610f69610ee8565b500190565b600060208284031215610f8057600080fd5b815161044181610db6565b634e487b7160e01b600052603260045260246000fd5b6000600019821415610fb557610fb5610ee8565b5060010190565b600060208284031215610fce57600080fd5b8151801515811461044157600080fd5b60005b83811015610ff9578181015183820152602001610fe1565b838111156109f25750506000910152565b6000825161101c818460208701610fde565b9190910192915050565b6020815260008251806020840152611045816040850160208701610fde565b601f01601f1916919091016040019291505056fea2646970667358221220a40e30076756f928f9c6857ab96b4e3fcaaecccd43bb3332c9fb682558aa175c64736f6c634300080a0033000000000000000000000000fc0000000000000000000000000000000000000200000000000000000000000059cfcd384746ec3035299d90782be065e466800b

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101575760003560e01c80638b876347116100c3578063cd3daf9d1161007c578063cd3daf9d146102e2578063df136d65146102ea578063ebe2b12b146102f3578063f1068454146102fc578063f14faf6f14610305578063f7c618c11461031857600080fd5b80638b8763471461024b5780638da5cb5b1461026b578063901a7d53146102aa57806391c7a6fc146102b3578063c00007b0146102c6578063c8f33c91146102d957600080fd5b80634b820093116101155780634b820093146101e0578063590a41f5146101f557806363d38c3b1461020857806370a08231146102115780637b0a47ee1461023a57806380faa57d1461024357600080fd5b80628cc2621461015c57806305ba0cf1146101825780630700037d146101a55780630fb5a6b4146101c557806318160ddd146101cf578063262d3d6d146101d7575b600080fd5b61016f61016a366004610dce565b61033f565b6040519081526020015b60405180910390f35b610195610190366004610deb565b6103ca565b6040519015158152602001610179565b61016f6101b3366004610dce565b600a6020526000908152604090205481565b61016f62093a8081565b60085461016f565b61016f60075481565b6101f36101ee366004610dce565b610448565b005b610195610203366004610e17565b6104a7565b61016f60055481565b61016f61021f366004610dce565b6001600160a01b03166000908152600b602052604090205490565b61016f60025481565b61016f6105d2565b61016f610259366004610dce565b60096020526000908152604090205481565b6102927f00000000000000000000000059cfcd384746ec3035299d90782be065e466800b81565b6040516001600160a01b039091168152602001610179565b61016f60065481565b6101f36102c1366004610e7c565b6105e5565b6101956102d4366004610dce565b6106b8565b61016f60035481565b61016f6107ac565b61016f60045481565b61016f60015481565b61016f60005481565b610195610313366004610e17565b610810565b6102927f000000000000000000000000fc0000000000000000000000000000000000000281565b6001600160a01b038116600090815260096020526040812054670de0b6b3a76400009061036a6107ac565b6103749190610efe565b6001600160a01b0384166000908152600b60205260409020546103979190610f15565b6103a19190610f34565b6001600160a01b0383166000908152600a60205260409020546103c49190610f56565b92915050565b6000336001600160a01b037f00000000000000000000000059cfcd384746ec3035299d90782be065e466800b16146104375760405162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b60448201526064015b60405180910390fd5b610441838361087c565b9392505050565b806104516107ac565b60045561045c6105d2565b6003556001600160a01b038116156104a3576104778161033f565b6001600160a01b0382166000908152600a60209081526040808320939093556004546009909152919020555b5050565b60007f00000000000000000000000059cfcd384746ec3035299d90782be065e466800b6001600160a01b031663570ca7356040518163ffffffff1660e01b8152600401602060405180830381865afa158015610507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052b9190610f6e565b6001600160a01b0316336001600160a01b0316146105755760405162461bcd60e51b81526020600482015260076024820152662164697374726f60c81b604482015260640161042e565b81156105b0576105b06001600160a01b037f000000000000000000000000fc0000000000000000000000000000000000000216333085610987565b6105c6600554836105c19190610f56565b6109f8565b50506000600555600190565b60006105e042600154610866565b905090565b336001600160a01b037f00000000000000000000000059cfcd384746ec3035299d90782be065e466800b161461064b5760405162461bcd60e51b815260206004820152600b60248201526a08585d5d1a1bdc9a5e995960aa1b604482015260640161042e565b60005b838110156106b15761069e85858381811061066b5761066b610f8b565b90506020020160208101906106809190610dce565b84848481811061069257610692610f8b565b9050602002013561087c565b50806106a981610fa1565b91505061064e565b5050505050565b6000336106c36107ac565b6004556106ce6105d2565b6003556001600160a01b03811615610715576106e98161033f565b6001600160a01b0382166000908152600a60209081526040808320939093556004546009909152919020555b60006107203361033f565b905080156107a257336000908152600a602052604081205561076c7f000000000000000000000000fc000000000000000000000000000000000000026001600160a01b03168583610b1f565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200160405180910390a25b5060019392505050565b60006107b760085490565b6107c2575060045490565b6008546002546003546107d36105d2565b6107dd9190610efe565b6107e79190610f15565b6107f990670de0b6b3a7640000610f15565b6108039190610f34565b6004546105e09190610f56565b60006108476001600160a01b037f000000000000000000000000fc0000000000000000000000000000000000000216333085610987565b81600560008282546108599190610f56565b9091555060019392505050565b60008183106108755781610441565b5090919050565b6000826108876107ac565b6004556108926105d2565b6003556001600160a01b038116156108d9576108ad8161033f565b6001600160a01b0382166000908152600a60209081526040808320939093556004546009909152919020555b6001600160a01b0384166000818152600b60209081526040918290205482519081529081018690527f21db95bb0bf542176e30aad5bade51e70343131b1b652a99da0e4a1189506399910160405180910390a26008546001600160a01b0385166000908152600b60205260409020546109529082610efe565b6001600160a01b0386166000908152600b6020526040902085905590506109798482610f56565b600855506001949350505050565b6040516001600160a01b03808516602483015283166044820152606481018290526109f29085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610b54565b50505050565b6000610a026107ac565b600455610a0d6105d2565b6003556001600160a01b03811615610a5457610a288161033f565b6001600160a01b0382166000908152600a60209081526040808320939093556004546009909152919020555b8160076000828254610a669190610f56565b90915550506001544210610a8957610a8162093a8083610f34565b600255610acc565b600042600154610a999190610efe565b9050600060025482610aab9190610f15565b9050610ab78185610f56565b9350610ac662093a8085610f34565b60025550505b6006829055426003819055610ae59062093a8090610f56565b6001556040518281527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a15050565b6040516001600160a01b038316602482015260448101829052610b4f90849063a9059cbb60e01b906064016109bb565b505050565b6000610ba9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c299092919063ffffffff16565b9050805160001480610bca575080806020019051810190610bca9190610fbc565b610b4f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161042e565b6060610c388484600085610c40565b949350505050565b606082471015610ca15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161042e565b600080866001600160a01b03168587604051610cbd919061100a565b60006040518083038185875af1925050503d8060008114610cfa576040519150601f19603f3d011682016040523d82523d6000602084013e610cff565b606091505b5091509150610d1087838387610d1b565b979650505050505050565b60608315610d87578251610d80576001600160a01b0385163b610d805760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161042e565b5081610c38565b610c388383815115610d9c5781518083602001fd5b8060405162461bcd60e51b815260040161042e9190611026565b6001600160a01b0381168114610dcb57600080fd5b50565b600060208284031215610de057600080fd5b813561044181610db6565b60008060408385031215610dfe57600080fd5b8235610e0981610db6565b946020939093013593505050565b600060208284031215610e2957600080fd5b5035919050565b60008083601f840112610e4257600080fd5b50813567ffffffffffffffff811115610e5a57600080fd5b6020830191508360208260051b8501011115610e7557600080fd5b9250929050565b60008060008060408587031215610e9257600080fd5b843567ffffffffffffffff80821115610eaa57600080fd5b610eb688838901610e30565b90965094506020870135915080821115610ecf57600080fd5b50610edc87828801610e30565b95989497509550505050565b634e487b7160e01b600052601160045260246000fd5b600082821015610f1057610f10610ee8565b500390565b6000816000190483118215151615610f2f57610f2f610ee8565b500290565b600082610f5157634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115610f6957610f69610ee8565b500190565b600060208284031215610f8057600080fd5b815161044181610db6565b634e487b7160e01b600052603260045260246000fd5b6000600019821415610fb557610fb5610ee8565b5060010190565b600060208284031215610fce57600080fd5b8151801515811461044157600080fd5b60005b83811015610ff9578181015183820152602001610fe1565b838111156109f25750506000910152565b6000825161101c818460208701610fde565b9190910192915050565b6020815260008251806020840152611045816040850160208701610fde565b601f01601f1916919091016040019291505056fea2646970667358221220a40e30076756f928f9c6857ab96b4e3fcaaecccd43bb3332c9fb682558aa175c64736f6c634300080a0033

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

000000000000000000000000fc0000000000000000000000000000000000000200000000000000000000000059cfcd384746ec3035299d90782be065e466800b

-----Decoded View---------------
Arg [0] : _rewardToken (address): 0xFc00000000000000000000000000000000000002
Arg [1] : _owner (address): 0x59CFCD384746ec3035299D90782Be065e466800B

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000fc00000000000000000000000000000000000002
Arg [1] : 00000000000000000000000059cfcd384746ec3035299d90782be065e466800b


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

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.