ETH Price: $2,428.11 (+0.41%)

Contract

0x51d924bF2FF813a68BD5f86Cdcc98918f2AE5868
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw And Cla...188138042023-12-18 15:36:47293 days ago1702913807IN
0x51d924bF...8f2AE5868
0 ETH0.01559453100.63524057
Withdraw And Cla...188135152023-12-18 14:38:11293 days ago1702910291IN
0x51d924bF...8f2AE5868
0 ETH0.0319625872.80588926
Withdraw And Cla...163485492023-01-06 15:10:47639 days ago1673017847IN
0x51d924bF...8f2AE5868
0 ETH0.0118579825.34325098
Withdraw And Cla...145755352022-04-13 6:15:47907 days ago1649830547IN
0x51d924bF...8f2AE5868
0 ETH0.009407224
Withdraw And Cla...143481612022-03-08 19:58:23943 days ago1646769503IN
0x51d924bF...8f2AE5868
0 ETH0.0182483739
Withdraw And Cla...142760692022-02-25 15:26:22954 days ago1645802782IN
0x51d924bF...8f2AE5868
0 ETH0.0191708641
Withdraw And Cla...134697202021-10-22 21:02:151080 days ago1634936535IN
0x51d924bF...8f2AE5868
0 ETH0.0403554294
Withdraw And Cla...134462562021-10-19 5:09:421083 days ago1634620182IN
0x51d924bF...8f2AE5868
0 ETH0.0085359455
Claim_all Tokens134462242021-10-19 5:02:331083 days ago1634619753IN
0x51d924bF...8f2AE5868
0 ETH0.0057641257
Claim_all Tokens134462082021-10-19 5:00:371083 days ago1634619637IN
0x51d924bF...8f2AE5868
0 ETH0.0242004661
Withdraw And Cla...134338322021-10-17 6:28:121085 days ago1634452092IN
0x51d924bF...8f2AE5868
0 ETH0.0218753253
Withdraw And Cla...133461982021-10-03 12:24:551099 days ago1633263895IN
0x51d924bF...8f2AE5868
0 ETH0.0129597934.98175418
Withdraw133346702021-10-01 16:52:311101 days ago1633107151IN
0x51d924bF...8f2AE5868
0 ETH0.0146827280
Withdraw And Cla...132536212021-09-19 3:01:351113 days ago1632020495IN
0x51d924bF...8f2AE5868
0 ETH0.023579150
Withdraw132223722021-09-14 7:03:071118 days ago1631602987IN
0x51d924bF...8f2AE5868
0 ETH0.0079798742
Deposit131631422021-09-05 2:54:351127 days ago1630810475IN
0x51d924bF...8f2AE5868
0 ETH0.017394993
Withdraw And Cla...131554532021-09-03 22:25:301129 days ago1630707930IN
0x51d924bF...8f2AE5868
0 ETH0.05050998135
Withdraw130781492021-08-22 23:35:281140 days ago1629675328IN
0x51d924bF...8f2AE5868
0 ETH0.0045588133
Withdraw And Cla...130736942021-08-22 7:08:381141 days ago1629616118IN
0x51d924bF...8f2AE5868
0 ETH0.0080783118
Claim_all Tokens130716872021-08-21 23:42:531141 days ago1629589373IN
0x51d924bF...8f2AE5868
0 ETH0.0074335522
Claim_all Tokens130716812021-08-21 23:41:421141 days ago1629589302IN
0x51d924bF...8f2AE5868
0 ETH0.007064822.82311798
Claim_all Tokens130716732021-08-21 23:40:251141 days ago1629589225IN
0x51d924bF...8f2AE5868
0 ETH0.0070576431.65769558
Withdraw And Cla...130689422021-08-21 13:39:011142 days ago1629553141IN
0x51d924bF...8f2AE5868
0 ETH0.0111440327
Claim_all Tokens130615992021-08-20 10:27:391143 days ago1629455259IN
0x51d924bF...8f2AE5868
0 ETH0.0078138621
Withdraw And Cla...130601112021-08-20 4:53:291143 days ago1629435209IN
0x51d924bF...8f2AE5868
0 ETH0.0065183542
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
124577732021-05-18 10:15:391237 days ago1621332939  Contract Creation0 ETH
Loading...
Loading

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

Contract Name:
PoolMulti

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 9999 runs

Other Settings:
default evmVersion
File 1 of 9 : PoolMulti.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "./GovernedMulti.sol";

contract PoolMulti is GovernedMulti, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    uint256 constant multiplierScale = 10 ** 18;

    mapping(address => uint256) public rewardsNotTransferred;
    mapping(address => uint256) public balancesBefore;
    mapping(address => uint256) public currentMultipliers;

    mapping(address => uint256) public balances;
    mapping(address => mapping(address => uint256)) public userMultipliers;
    mapping(address => mapping(address => uint256)) public owed;

    uint256 public poolSize;

    event ClaimRewardToken(address indexed user, address token, uint256 amount);
    event Deposit(address indexed user, uint256 amount, uint256 balanceAfter);
    event Withdraw(address indexed user, uint256 amount, uint256 balanceAfter);

    constructor(address _owner, address _poolToken) {
        require(_poolToken != address(0), "pool token must not be 0x0");

        transferOwnership(_owner);

        poolToken = IERC20(_poolToken);
    }

    function deposit(uint256 amount) public {
        require(amount > 0, "amount must be greater than 0");

        require(
            poolToken.allowance(msg.sender, address(this)) >= amount,
            "allowance must be greater than 0"
        );

        // it is important to calculate the amount owed to the user before doing any changes
        // to the user's balance or the pool's size
        _calculateOwed(msg.sender);

        uint256 newBalance = balances[msg.sender].add(amount);
        balances[msg.sender] = newBalance;
        poolSize = poolSize.add(amount);

        poolToken.safeTransferFrom(msg.sender, address(this), amount);

        emit Deposit(msg.sender, amount, newBalance);
    }

    function withdraw(uint256 amount) public {
        require(amount > 0, "amount must be greater than 0");

        uint256 currentBalance = balances[msg.sender];
        require(currentBalance >= amount, "insufficient balance");

        // it is important to calculate the amount owed to the user before doing any changes
        // to the user's balance or the pool's size
        _calculateOwed(msg.sender);

        uint256 newBalance = currentBalance.sub(amount);
        balances[msg.sender] = newBalance;
        poolSize = poolSize.sub(amount);

        poolToken.safeTransfer(msg.sender, amount);

        emit Withdraw(msg.sender, amount, newBalance);
    }

    function claim_allTokens() public nonReentrant returns (uint256[] memory amounts){
        amounts = new uint256[](rewardTokens.length);
        _calculateOwed(msg.sender);

        for (uint256 i = 0; i < rewardTokens.length; i++) {
            uint256 amount = _claim(address(rewardTokens[i]));
            amounts[i] = amount;
        }
    }

    // claim calculates the currently owed reward and transfers the funds to the user
    function claim(address token) public nonReentrant returns (uint256){
        _calculateOwed(msg.sender);

        return _claim(token);
    }

    function withdrawAndClaim(uint256 amount) public {
        withdraw(amount);
        claim_allTokens();
    }

    function pullRewardFromSource_allTokens() public {
        for (uint256 i = 0; i < rewardTokens.length; i++) {
            pullRewardFromSource(address(rewardTokens[i]));
        }
    }

    // pullRewardFromSource transfers any amount due from the source to this contract so it can be distributed
    function pullRewardFromSource(address token) public override {
        softPullReward(token);

        uint256 amountToTransfer = rewardsNotTransferred[token];

        // if there's nothing to transfer, stop the execution
        if (amountToTransfer == 0) {
            return;
        }

        rewardsNotTransferred[token] = 0;

        IERC20(token).safeTransferFrom(rewardSources[token], address(this), amountToTransfer);
    }

    // rewardLeft returns the amount that was not yet distributed
    // even though it is not a view, this function is only intended for external use
    function rewardLeft(address token) external returns (uint256) {
        softPullReward(token);

        return IERC20(token).allowance(rewardSources[token], address(this)).sub(rewardsNotTransferred[token]);
    }

    function softPullReward_allTokens() internal {
        for (uint256 i = 0; i < rewardTokens.length; i++) {
            softPullReward(address(rewardTokens[i]));
        }
    }

    // softPullReward calculates the reward accumulated since the last time it was called but does not actually
    // execute the transfers. Instead, it adds the amount to rewardNotTransferred variable
    function softPullReward(address token) internal {
        uint256 lastPullTs = lastSoftPullTs[token];

        // no need to execute multiple times in the same block
        if (lastPullTs == block.timestamp) {
            return;
        }

        uint256 rate = rewardRatesPerSecond[token];
        address source = rewardSources[token];

        // don't execute if the setup was not completed
        if (rate == 0 || source == address(0)) {
            return;
        }

        // if there's no allowance left on the source contract, don't try to pull anything else
        uint256 allowance = IERC20(token).allowance(source, address(this));
        uint256 rewardNotTransferred = rewardsNotTransferred[token];
        if (allowance == 0 || allowance <= rewardNotTransferred) {
            lastSoftPullTs[token] = block.timestamp;
            return;
        }

        uint256 timeSinceLastPull = block.timestamp.sub(lastPullTs);
        uint256 amountToPull = timeSinceLastPull.mul(rate);

        // only pull the minimum between allowance left and the amount that should be pulled for the period
        uint256 allowanceLeft = allowance.sub(rewardNotTransferred);
        if (amountToPull > allowanceLeft) {
            amountToPull = allowanceLeft;
        }

        rewardsNotTransferred[token] = rewardNotTransferred.add(amountToPull);
        lastSoftPullTs[token] = block.timestamp;
    }

    function ackFunds_allTokens() internal {
        for (uint256 i = 0; i < rewardTokens.length; i++) {
            ackFunds(address(rewardTokens[i]));
        }
    }

    // ackFunds checks the difference between the last known balance of `token` and the current one
    // if it goes up, the multiplier is re-calculated
    // if it goes down, it only updates the known balance
    function ackFunds(address token) internal {
        uint256 balanceNow = IERC20(token).balanceOf(address(this)).add(rewardsNotTransferred[token]);
        uint256 balanceBeforeLocal = balancesBefore[token];

        if (balanceNow <= balanceBeforeLocal || balanceNow == 0) {
            balancesBefore[token] = balanceNow;
            return;
        }

        // if there's no bond staked, it doesn't make sense to ackFunds because there's nobody to distribute them to
        // and the calculation would fail anyways due to division by 0
        uint256 poolSizeLocal = poolSize;
        if (poolSizeLocal == 0) {
            return;
        }

        uint256 diff = balanceNow.sub(balanceBeforeLocal);
        uint256 multiplier = currentMultipliers[token].add(diff.mul(multiplierScale).div(poolSizeLocal));

        balancesBefore[token] = balanceNow;
        currentMultipliers[token] = multiplier;
    }

    // _calculateOwed calculates and updates the total amount that is owed to an user and updates the user's multiplier
    // to the current value
    // it automatically attempts to pull the token from the source and acknowledge the funds
    function _calculateOwed(address user) internal {
        softPullReward_allTokens();
        ackFunds_allTokens();

        for (uint256 i = 0; i < rewardTokens.length; i++) {
            address token = address(rewardTokens[i]);
            uint256 reward = _userPendingReward(user, token);

            owed[user][token] = owed[user][token].add(reward);
            userMultipliers[user][token] = currentMultipliers[token];
        }
    }

    // _userPendingReward calculates the reward that should be based on the current multiplier / anything that's not included in the `owed[user]` value
    // it does not represent the entire reward that's due to the user unless added on top of `owed[user]`
    function _userPendingReward(address user, address token) internal view returns (uint256) {
        uint256 multiplier = currentMultipliers[token].sub(userMultipliers[user][token]);

        return balances[user].mul(multiplier).div(multiplierScale);
    }

    function _claim(address token) internal returns (uint256) {
        uint256 amount = owed[msg.sender][token];
        if (amount == 0) {
            return 0;
        }

        // check if there's enough balance to distribute the amount owed to the user
        // otherwise, pull the rewardNotTransferred from source
        if (IERC20(token).balanceOf(address(this)) < amount) {
            pullRewardFromSource(token);
        }

        owed[msg.sender][token] = 0;

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

        // acknowledge the amount that was transferred to the user
        balancesBefore[token] = balancesBefore[token].sub(amount);

        emit ClaimRewardToken(msg.sender, token, amount);

        return amount;
    }
}

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

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

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

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

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

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

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

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

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

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

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

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

pragma solidity >=0.6.0 <0.8.0;

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

pragma solidity >=0.6.0 <0.8.0;

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 5 of 9 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

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

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

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 6 of 9 : GovernedMulti.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.7.6;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract GovernedMulti is Ownable {
    IERC20[] public rewardTokens;
    IERC20 public poolToken;

    uint256 public numRewardTokens;
    mapping(address => address) public rewardSources;
    mapping(address => uint256) public rewardRatesPerSecond;

    mapping(address => uint256) public lastSoftPullTs;

    function approveNewRewardToken(address token) public {
        require(msg.sender == owner(), "only owner can call");
        require(!isApprovedToken(token), "token already approved");
        require(token != address(poolToken), "reward token and pool token must be different");

        rewardTokens.push(IERC20(token));
        numRewardTokens++;
    }

    function setRewardSource(address token, address src) public {
        require(msg.sender == owner(), "only owner can call");
        require(src != address(0), "source cannot be 0x0");
        require(isApprovedToken(token), "token not approved");

        rewardSources[token] = src;
    }

    function setRewardRatePerSecond(address token, uint256 rate) public {
        require(msg.sender == owner(), "only owner can call");
        require(isApprovedToken(token), "token not approved");

        // pull everything due until now to not be affected by the change in rate
        pullRewardFromSource(token);

        rewardRatesPerSecond[token] = rate;

        // it's the first time the rate is set which is equivalent to starting the rewards
        if (lastSoftPullTs[token] == 0) {
            lastSoftPullTs[token] = block.timestamp;
        }
    }

    function isApprovedToken(address token) public view returns (bool) {
        // the number of reward tokens should not be very big and the approve operation should not be very frequent
        for (uint256 i = 0; i < rewardTokens.length; i++) {
            if (address(rewardTokens[i]) == token) {
                return true;
            }
        }

        return false;
    }

    function pullRewardFromSource(address token) public virtual;
}

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

pragma solidity >=0.6.2 <0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity >=0.6.0 <0.8.0;

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

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

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

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

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

pragma solidity >=0.6.0 <0.8.0;

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

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

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 9999
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_poolToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimRewardToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"balanceAfter","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"balanceAfter","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"approveNewRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balancesBefore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"claim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim_allTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"currentMultipliers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"isApprovedToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastSoftPullTs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numRewardTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"owed","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":"poolSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"pullRewardFromSource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pullRewardFromSource_allTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"rewardLeft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardRatesPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardSources","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardTokens","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardsNotTransferred","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"rate","type":"uint256"}],"name":"setRewardRatePerSecond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"src","type":"address"}],"name":"setRewardSource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userMultipliers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawAndClaim","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80637bb7bed1116100f9578063cbdf382c11610097578063e14f9f3d11610071578063e14f9f3d14610381578063ef7d8f7014610394578063f2fde38b146103a9578063ff052241146103bc576101c4565b8063cbdf382c14610353578063cee5aa661461035b578063da1ce4391461036e576101c4565b8063b6b55f25116100d3578063b6b55f2514610312578063bcb7506e14610325578063c852b1d914610338578063c9cccf2a1461034b576101c4565b80637bb7bed1146102d75780638da5cb5b146102f7578063a6570db7146102ff576101c4565b8063448a104711610166578063538a267911610140578063538a2679146102965780636bd2f8b8146102a9578063715018a6146102bc578063780e7203146102c4576101c4565b8063448a1047146102735780634a7e5cbb146102865780634ec18db91461028e576101c4565b80632d5ad3d5116101a25780632d5ad3d5146102185780632e1a7d4d146102385780633552b3611461024d57806340cf516a14610260576101c4565b80631e83409a146101c957806327e235e3146101f257806328079e4a14610205575b600080fd5b6101dc6101d7366004611b3d565b6103cf565b6040516101e99190611e54565b60405180910390f35b6101dc610200366004611b3d565b61044b565b6101dc610213366004611b57565b61045d565b61022b610226366004611b3d565b61047a565b6040516101e99190611c6d565b61024b610246366004611bb2565b6104d7565b005b6101dc61025b366004611b57565b6105c9565b61024b61026e366004611b89565b6105e6565b61024b610281366004611bb2565b610696565b6101dc6106a7565b6101dc6106ad565b6101dc6102a4366004611b3d565b6106b3565b6101dc6102b7366004611b3d565b6106c5565b61024b6106d7565b61024b6102d2366004611b3d565b6107ad565b6102ea6102e5366004611bb2565b610810565b6040516101e99190611be2565b6102ea61083a565b61024b61030d366004611b3d565b610849565b61024b610320366004611bb2565b610947565b6101dc610333366004611b3d565b610ac7565b6101dc610346366004611b3d565b610ad9565b61024b610aeb565b6102ea610b2a565b6101dc610369366004611b3d565b610b39565b6101dc61037c366004611b3d565b610c0a565b6102ea61038f366004611b3d565b610c1c565b61039c610c37565b6040516101e99190611c29565b61024b6103b7366004611b3d565b610d4a565b61024b6103ca366004611b57565b610e76565b600060026007541415610429576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260075561043733610f3f565b61044082611014565b600160075592915050565b600b6020526000908152604090205481565b600d60209081526000928352604080842090915290825290205481565b6000805b6001548110156104cc57826001600160a01b03166001828154811061049f57fe5b6000918252602090912001546001600160a01b031614156104c45760019150506104d2565b60010161047e565b50600090505b919050565b600081116105005760405162461bcd60e51b81526004016104f790611d1b565b60405180910390fd5b336000908152600b6020526040902054818110156105305760405162461bcd60e51b81526004016104f790611e1d565b61053933610f3f565b6000610545828461119f565b336000908152600b60205260409020819055600e54909150610567908461119f565b600e55600254610581906001600160a01b031633856111fc565b336001600160a01b03167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56884836040516105bc929190611e5d565b60405180910390a2505050565b600c60209081526000928352604080842090915290825290205481565b6105ee61083a565b6001600160a01b0316336001600160a01b03161461061e5760405162461bcd60e51b81526004016104f790611c78565b6106278261047a565b6106435760405162461bcd60e51b81526004016104f790611daf565b61064c826107ad565b6001600160a01b03821660009081526005602090815260408083208490556006909152902054610692576001600160a01b03821660009081526006602052604090204290555b5050565b61069f816104d7565b610692610c37565b60035481565b600e5481565b600a6020526000908152604090205481565b60096020526000908152604090205481565b6106df611281565b6001600160a01b03166106f061083a565b6001600160a01b03161461074b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6107b681611285565b6001600160a01b038116600090815260086020526040902054806107da575061080d565b6001600160a01b038083166000818152600860209081526040808320839055600490915290205461069292163084611455565b50565b6001818154811061082057600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b031690565b61085161083a565b6001600160a01b0316336001600160a01b0316146108815760405162461bcd60e51b81526004016104f790611c78565b61088a8161047a565b156108a75760405162461bcd60e51b81526004016104f790611caf565b6002546001600160a01b03828116911614156108d55760405162461bcd60e51b81526004016104f790611d52565b60018054808201825560008290527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039390931692909217909155600380549091019055565b600081116109675760405162461bcd60e51b81526004016104f790611d1b565b6002546040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815282916001600160a01b03169063dd62ed3e906109b29033903090600401611bf6565b60206040518083038186803b1580156109ca57600080fd5b505afa1580156109de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a029190611bca565b1015610a205760405162461bcd60e51b81526004016104f790611ce6565b610a2933610f3f565b336000908152600b6020526040812054610a4390836114e3565b336000908152600b60205260409020819055600e54909150610a6590836114e3565b600e55600254610a80906001600160a01b0316333085611455565b336001600160a01b03167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a158383604051610abb929190611e5d565b60405180910390a25050565b60066020526000908152604090205481565b60056020526000908152604090205481565b60005b60015481101561080d57610b2260018281548110610b0857fe5b6000918252602090912001546001600160a01b03166107ad565b600101610aee565b6002546001600160a01b031681565b6000610b4482611285565b6001600160a01b03808316600081815260086020908152604080832054600492839052928190205490517fdd62ed3e000000000000000000000000000000000000000000000000000000008152610c049593949363dd62ed3e93610bae9390911691309101611bf6565b60206040518083038186803b158015610bc657600080fd5b505afa158015610bda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfe9190611bca565b9061119f565b92915050565b60086020526000908152604090205481565b6004602052600090815260409020546001600160a01b031681565b606060026007541415610c91576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260075560015467ffffffffffffffff81118015610caf57600080fd5b50604051908082528060200260200182016040528015610cd9578160200160208202803683370190505b509050610ce533610f3f565b60005b600154811015610d41576000610d1e60018381548110610d0457fe5b6000918252602090912001546001600160a01b0316611014565b905080838381518110610d2d57fe5b602090810291909101015250600101610ce8565b50600160075590565b610d52611281565b6001600160a01b0316610d6361083a565b6001600160a01b031614610dbe576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610e035760405162461bcd60e51b8152600401808060200182810382526026815260200180611e6c6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b610e7e61083a565b6001600160a01b0316336001600160a01b031614610eae5760405162461bcd60e51b81526004016104f790611c78565b6001600160a01b038116610ed45760405162461bcd60e51b81526004016104f790611de6565b610edd8261047a565b610ef95760405162461bcd60e51b81526004016104f790611daf565b6001600160a01b03918216600090815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909216179055565b610f47611544565b610f4f611583565b60005b60015481101561069257600060018281548110610f6b57fe5b60009182526020822001546001600160a01b03169150610f8b84836115c2565b6001600160a01b038086166000908152600d6020908152604080832093871683529290522054909150610fbe90826114e3565b6001600160a01b038086166000818152600d602090815260408083209790941680835296815283822094909455600a845282812054918152600c8452828120958152949092529092209190915550600101610f52565b336000908152600d602090815260408083206001600160a01b0385168452909152812054806110475760009150506104d2565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815281906001600160a01b038516906370a082319061108e903090600401611be2565b60206040518083038186803b1580156110a657600080fd5b505afa1580156110ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110de9190611bca565b10156110ed576110ed836107ad565b336000818152600d602090815260408083206001600160a01b038816808552925282209190915561111e91836111fc565b6001600160a01b038316600090815260096020526040902054611141908261119f565b6001600160a01b03841660009081526009602052604090819020919091555133907f743b556132a1c9131e7809abdb374e271d2850eede57cadcf97547ccd63695a2906111919086908590611c10565b60405180910390a292915050565b6000828211156111f6576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261127c908490611642565b505050565b3390565b6001600160a01b038116600090815260066020526040902054428114156112ac575061080d565b6001600160a01b038083166000908152600560209081526040808320546004909252909120549091168115806112e957506001600160a01b038116155b156112f65750505061080d565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0386169063dd62ed3e906113409085903090600401611bf6565b60206040518083038186803b15801561135857600080fd5b505afa15801561136c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113909190611bca565b6001600160a01b0386166000908152600860205260409020549091508115806113b95750808211155b156113e357505050506001600160a01b03821660009081526006602052604090204290555061080d565b60006113ef428761119f565b905060006113fd82876116f3565b9050600061140b858561119f565b905080821115611419578091505b61142384836114e3565b6001600160a01b038a166000908152600860209081526040808320939093556006905220429055505050505050505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526114dd908590611642565b50505050565b60008282018381101561153d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60005b60015481101561080d5761157b6001828154811061156157fe5b6000918252602090912001546001600160a01b0316611285565b600101611547565b60005b60015481101561080d576115ba600182815481106115a057fe5b6000918252602090912001546001600160a01b031661174c565b600101611586565b6001600160a01b038083166000908152600c60209081526040808320938516835292815282822054600a90915291812054909182916116009161119f565b6001600160a01b0385166000908152600b602052604090205490915061163a90670de0b6b3a76400009061163490846116f3565b906118d2565b949350505050565b6000611697826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119399092919063ffffffff16565b80519091501561127c578080602001905160208110156116b657600080fd5b505161127c5760405162461bcd60e51b815260040180806020018281038252602a815260200180611eb3602a913960400191505060405180910390fd5b60008261170257506000610c04565b8282028284828161170f57fe5b041461153d5760405162461bcd60e51b8152600401808060200182810382526021815260200180611e926021913960400191505060405180910390fd5b6001600160a01b0381166000818152600860205260408082205490517f70a0823100000000000000000000000000000000000000000000000000000000815291926117fb926370a08231906117a5903090600401611be2565b60206040518083038186803b1580156117bd57600080fd5b505afa1580156117d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f59190611bca565b906114e3565b6001600160a01b0383166000908152600960205260409020549091508082111580611824575081155b1561184857506001600160a01b03821660009081526009602052604090205561080d565b600e54806118585750505061080d565b6000611864848461119f565b905060006118a06118818461163485670de0b6b3a76400006116f3565b6001600160a01b0388166000908152600a6020526040902054906114e3565b6001600160a01b038716600090815260096020908152604080832098909855600a905295909520949094555050505050565b6000808211611928576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161193157fe5b049392505050565b606061163a84846000858561194d85611a7c565b61199e576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106119fa57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016119bd565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611a5c576040519150601f19603f3d011682016040523d82523d6000602084013e611a61565b606091505b5091509150611a71828286611a82565b979650505050505050565b3b151590565b60608315611a9157508161153d565b825115611aa15782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611aeb578181015183820152602001611ad3565b50505050905090810190601f168015611b185780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b80356001600160a01b03811681146104d257600080fd5b600060208284031215611b4e578081fd5b61153d82611b26565b60008060408385031215611b69578081fd5b611b7283611b26565b9150611b8060208401611b26565b90509250929050565b60008060408385031215611b9b578182fd5b611ba483611b26565b946020939093013593505050565b600060208284031215611bc3578081fd5b5035919050565b600060208284031215611bdb578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b81811015611c6157835183529284019291840191600101611c45565b50909695505050505050565b901515815260200190565b60208082526013908201527f6f6e6c79206f776e65722063616e2063616c6c00000000000000000000000000604082015260600190565b60208082526016908201527f746f6b656e20616c726561647920617070726f76656400000000000000000000604082015260600190565b6020808252818101527f616c6c6f77616e6365206d7573742062652067726561746572207468616e2030604082015260600190565b6020808252601d908201527f616d6f756e74206d7573742062652067726561746572207468616e2030000000604082015260600190565b6020808252602d908201527f72657761726420746f6b656e20616e6420706f6f6c20746f6b656e206d75737460408201527f20626520646966666572656e7400000000000000000000000000000000000000606082015260800190565b60208082526012908201527f746f6b656e206e6f7420617070726f7665640000000000000000000000000000604082015260600190565b60208082526014908201527f736f757263652063616e6e6f7420626520307830000000000000000000000000604082015260600190565b60208082526014908201527f696e73756666696369656e742062616c616e6365000000000000000000000000604082015260600190565b90815260200190565b91825260208201526040019056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212209b388cc83d4f535a358f6324559e13e006f7b5b73f0bf0cfdbc48059c47bc7f864736f6c63430007060033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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