ETH Price: $2,899.03 (-1.05%)
Gas: 37 Gwei

Contract

0x8F362e16A74c2EB564bfbF24DC73bd5CE37D9063
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Notify Reward Am...164706922023-01-23 16:26:47394 days 2 hrs ago1674491207IN
0x8F362e...E37D9063
0 ETH0.0062746323.67616493
0x60a06040163625912023-01-08 14:13:11409 days 4 hrs ago1673187191IN
 Create: BaseV2Bribes
0 ETH0.043064917.73019364

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BaseV2Bribes

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 15 : BaseV2Bribes.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import {IGaugeVoter} from "../interfaces/IGaugeVoter.sol";
import {IRegistry} from "../interfaces/IRegistry.sol";
import {INFTLocker} from "../interfaces/INFTLocker.sol";
import {IBribeV2} from "../interfaces/IBribeV2.sol";

// Bribes pay out rewards for a given pool based on the votes that were received from the user (goes hand in hand with BaseV1Gauges.vote())
contract BaseV2Bribes is ReentrancyGuard, IBribeV2 {
    IRegistry public immutable override registry;

    uint256 public constant DURATION = 7 days; // rewards are released over 7 days
    uint256 public constant PRECISION = 10**18;

    // default snx staking contract implementation
    mapping(address => uint256) public rewardRate;
    mapping(address => uint256) public periodFinish;
    mapping(address => uint256) public lastUpdateTime;
    mapping(address => uint256) public rewardPerTokenStored;

    mapping(address => mapping(address => uint256)) public lastEarn;
    mapping(address => mapping(address => uint256))
        public userRewardPerTokenStored;

    address[] public rewards;
    mapping(address => bool) public isReward;

    uint256 public totalSupply;
    mapping(address => uint256) public balanceOf;

    /// @notice A checkpoint for marking balance
    struct Checkpoint {
        uint256 timestamp;
        uint256 balanceOf;
    }

    /// @notice A checkpoint for marking reward rate
    struct RewardPerTokenCheckpoint {
        uint256 timestamp;
        uint256 rewardPerToken;
    }

    /// @notice A checkpoint for marking supply
    struct SupplyCheckpoint {
        uint256 timestamp;
        uint256 supply;
    }

    /// @notice A record of balance checkpoints for each account, by index
    mapping(address => mapping(uint256 => Checkpoint)) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping(address => uint256) public numCheckpoints;

    /// @notice A record of balance checkpoints for each token, by index
    mapping(uint256 => SupplyCheckpoint) public supplyCheckpoints;

    /// @notice The number of checkpoints
    uint256 public supplyNumCheckpoints;

    /// @notice A record of balance checkpoints for each token, by index
    mapping(address => mapping(uint256 => RewardPerTokenCheckpoint))
        public rewardPerTokenCheckpoints;

    /// @notice The number of checkpoints for each token
    mapping(address => uint256) public rewardPerTokenNumCheckpoints;

    constructor(address _registry) {
        registry = IRegistry(_registry);
    }

    /**
     * @notice Determine the prior balance for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param who The token of the NFT to check
     * @param timestamp The timestamp to get the balance at
     * @return The balance the account had as of the given block
     */
    function getPriorBalanceIndex(address who, uint256 timestamp)
        public
        view
        returns (uint256)
    {
        uint256 nCheckpoints = numCheckpoints[who];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[who][nCheckpoints - 1].timestamp <= timestamp) {
            return (nCheckpoints - 1);
        }

        // Next check implicit zero balance
        if (checkpoints[who][0].timestamp > timestamp) {
            return 0;
        }

        uint256 lower = 0;
        uint256 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint256 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[who][center];
            if (cp.timestamp == timestamp) {
                return center;
            } else if (cp.timestamp < timestamp) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return lower;
    }

    function getPriorSupplyIndex(uint256 timestamp)
        public
        view
        returns (uint256)
    {
        uint256 nCheckpoints = supplyNumCheckpoints;
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (supplyCheckpoints[nCheckpoints - 1].timestamp <= timestamp) {
            return (nCheckpoints - 1);
        }

        // Next check implicit zero balance
        if (supplyCheckpoints[0].timestamp > timestamp) {
            return 0;
        }

        uint256 lower = 0;
        uint256 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint256 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            SupplyCheckpoint memory cp = supplyCheckpoints[center];
            if (cp.timestamp == timestamp) {
                return center;
            } else if (cp.timestamp < timestamp) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return lower;
    }

    function getPriorRewardPerToken(address token, uint256 timestamp)
        public
        view
        returns (uint256, uint256)
    {
        uint256 nCheckpoints = rewardPerTokenNumCheckpoints[token];
        if (nCheckpoints == 0) {
            return (0, 0);
        }

        // First check most recent balance
        if (
            rewardPerTokenCheckpoints[token][nCheckpoints - 1].timestamp <=
            timestamp
        ) {
            return (
                rewardPerTokenCheckpoints[token][nCheckpoints - 1]
                    .rewardPerToken,
                rewardPerTokenCheckpoints[token][nCheckpoints - 1].timestamp
            );
        }

        // Next check implicit zero balance
        if (rewardPerTokenCheckpoints[token][0].timestamp > timestamp) {
            return (0, 0);
        }

        uint256 lower = 0;
        uint256 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint256 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            RewardPerTokenCheckpoint memory cp = rewardPerTokenCheckpoints[
                token
            ][center];
            if (cp.timestamp == timestamp) {
                return (cp.rewardPerToken, cp.timestamp);
            } else if (cp.timestamp < timestamp) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return (
            rewardPerTokenCheckpoints[token][lower].rewardPerToken,
            rewardPerTokenCheckpoints[token][lower].timestamp
        );
    }

    function _writeCheckpoint(address who, uint256 balance) internal {
        uint256 _timestamp = block.timestamp;
        uint256 _nCheckPoints = numCheckpoints[who];

        if (
            _nCheckPoints > 0 &&
            checkpoints[who][_nCheckPoints - 1].timestamp == _timestamp
        ) {
            checkpoints[who][_nCheckPoints - 1].balanceOf = balance;
        } else {
            checkpoints[who][_nCheckPoints] = Checkpoint(_timestamp, balance);
            numCheckpoints[who] = _nCheckPoints + 1;
        }
    }

    function _writeRewardPerTokenCheckpoint(
        address token,
        uint256 reward,
        uint256 timestamp
    ) internal {
        uint256 _nCheckPoints = rewardPerTokenNumCheckpoints[token];

        if (
            _nCheckPoints > 0 &&
            rewardPerTokenCheckpoints[token][_nCheckPoints - 1].timestamp ==
            timestamp
        ) {
            rewardPerTokenCheckpoints[token][_nCheckPoints - 1]
                .rewardPerToken = reward;
        } else {
            rewardPerTokenCheckpoints[token][
                _nCheckPoints
            ] = RewardPerTokenCheckpoint(timestamp, reward);
            rewardPerTokenNumCheckpoints[token] = _nCheckPoints + 1;
        }
    }

    function _writeSupplyCheckpoint() internal {
        uint256 _nCheckPoints = supplyNumCheckpoints;
        uint256 _timestamp = block.timestamp;

        if (
            _nCheckPoints > 0 &&
            supplyCheckpoints[_nCheckPoints - 1].timestamp == _timestamp
        ) {
            supplyCheckpoints[_nCheckPoints - 1].supply = totalSupply;
        } else {
            supplyCheckpoints[_nCheckPoints] = SupplyCheckpoint(
                _timestamp,
                totalSupply
            );
            supplyNumCheckpoints = _nCheckPoints + 1;
        }
    }

    function rewardsListLength() external view returns (uint256) {
        return rewards.length;
    }

    // returns the last time the reward was modified or periodFinish if the reward has ended
    function lastTimeRewardApplicable(address token)
        public
        view
        returns (uint256)
    {
        return Math.min(block.timestamp, periodFinish[token]);
    }

    // allows a user to claim rewards for a given token
    function getReward(address[] memory tokens) external nonReentrant {
        for (uint256 i = 0; i < tokens.length; i++) {
            (
                rewardPerTokenStored[tokens[i]],
                lastUpdateTime[tokens[i]]
            ) = _updateRewardPerToken(tokens[i]);

            uint256 _reward = earned(tokens[i], msg.sender);
            lastEarn[tokens[i]][msg.sender] = block.timestamp;
            userRewardPerTokenStored[tokens[i]][
                msg.sender
            ] = rewardPerTokenStored[tokens[i]];
            if (_reward > 0) _safeTransfer(tokens[i], msg.sender, _reward);

            emit ClaimRewards(msg.sender, tokens[i], _reward);
        }
    }

    // used by BaseV1Voter to allow batched reward claims
    function getRewardForOwner(address _owner, address[] memory tokens)
        external
        override
        nonReentrant
    {
        require(msg.sender == registry.gaugeVoter(), "not voter");
        for (uint256 i = 0; i < tokens.length; i++) {
            (
                rewardPerTokenStored[tokens[i]],
                lastUpdateTime[tokens[i]]
            ) = _updateRewardPerToken(tokens[i]);

            uint256 _reward = earned(tokens[i], _owner);
            lastEarn[tokens[i]][_owner] = block.timestamp;
            userRewardPerTokenStored[tokens[i]][_owner] = rewardPerTokenStored[
                tokens[i]
            ];
            if (_reward > 0) _safeTransfer(tokens[i], _owner, _reward);

            emit ClaimRewards(_owner, tokens[i], _reward);
        }
    }

    function rewardPerToken(address token) public view returns (uint256) {
        if (totalSupply == 0) {
            return rewardPerTokenStored[token];
        }
        return
            rewardPerTokenStored[token] +
            (((lastTimeRewardApplicable(token) -
                Math.min(lastUpdateTime[token], periodFinish[token])) *
                rewardRate[token] *
                PRECISION) / totalSupply);
    }

    function batchRewardPerToken(address token, uint256 maxRuns) external {
        (
            rewardPerTokenStored[token],
            lastUpdateTime[token]
        ) = _batchRewardPerToken(token, maxRuns);
    }

    function _batchRewardPerToken(address token, uint256 maxRuns)
        internal
        returns (uint256, uint256)
    {
        uint256 _startTimestamp = lastUpdateTime[token];
        uint256 reward = rewardPerTokenStored[token];

        if (supplyNumCheckpoints == 0) {
            return (reward, _startTimestamp);
        }

        if (rewardRate[token] == 0) {
            return (reward, block.timestamp);
        }

        uint256 _startIndex = getPriorSupplyIndex(_startTimestamp);
        uint256 _endIndex = Math.min(supplyNumCheckpoints - 1, maxRuns);

        for (uint256 i = _startIndex; i < _endIndex; i++) {
            SupplyCheckpoint memory sp0 = supplyCheckpoints[i];
            if (sp0.supply > 0) {
                SupplyCheckpoint memory sp1 = supplyCheckpoints[i + 1];
                (uint256 _reward, uint256 endTime) = _calcRewardPerToken(
                    token,
                    sp1.timestamp,
                    sp0.timestamp,
                    sp0.supply,
                    _startTimestamp
                );
                reward += _reward;
                _writeRewardPerTokenCheckpoint(token, reward, endTime);
                _startTimestamp = endTime;
            }
        }

        return (reward, _startTimestamp);
    }

    function _calcRewardPerToken(
        address token,
        uint256 timestamp1,
        uint256 timestamp0,
        uint256 supply,
        uint256 startTimestamp
    ) internal view returns (uint256, uint256) {
        uint256 endTime = Math.max(timestamp1, startTimestamp);
        return (
            (((Math.min(endTime, periodFinish[token]) -
                Math.min(
                    Math.max(timestamp0, startTimestamp),
                    periodFinish[token]
                )) *
                rewardRate[token] *
                PRECISION) / supply),
            endTime
        );
    }

    function _updateRewardPerToken(address token)
        internal
        returns (uint256, uint256)
    {
        uint256 _startTimestamp = lastUpdateTime[token];
        uint256 reward = rewardPerTokenStored[token];

        if (supplyNumCheckpoints == 0) {
            return (reward, _startTimestamp);
        }

        if (rewardRate[token] == 0) {
            return (reward, block.timestamp);
        }

        uint256 _startIndex = getPriorSupplyIndex(_startTimestamp);
        uint256 _endIndex = supplyNumCheckpoints - 1;

        if (_endIndex - _startIndex > 1) {
            for (uint256 i = _startIndex; i < _endIndex - 1; i++) {
                SupplyCheckpoint memory sp0 = supplyCheckpoints[i];
                if (sp0.supply > 0) {
                    SupplyCheckpoint memory sp1 = supplyCheckpoints[i + 1];
                    (uint256 _reward, uint256 _endTime) = _calcRewardPerToken(
                        token,
                        sp1.timestamp,
                        sp0.timestamp,
                        sp0.supply,
                        _startTimestamp
                    );
                    reward += _reward;
                    _writeRewardPerTokenCheckpoint(token, reward, _endTime);
                    _startTimestamp = _endTime;
                }
            }
        }

        SupplyCheckpoint memory sp = supplyCheckpoints[_endIndex];
        if (sp.supply > 0) {
            (uint256 _reward, ) = _calcRewardPerToken(
                token,
                lastTimeRewardApplicable(token),
                Math.max(sp.timestamp, _startTimestamp),
                sp.supply,
                _startTimestamp
            );
            reward += _reward;
            _writeRewardPerTokenCheckpoint(token, reward, block.timestamp);
            _startTimestamp = block.timestamp;
        }

        return (reward, _startTimestamp);
    }

    function earned(address token, address who) public view returns (uint256) {
        uint256 _startTimestamp = Math.max(
            lastEarn[token][who],
            rewardPerTokenCheckpoints[token][0].timestamp
        );
        if (numCheckpoints[who] == 0) {
            return 0;
        }

        uint256 _startIndex = getPriorBalanceIndex(who, _startTimestamp);
        uint256 _endIndex = numCheckpoints[who] - 1;

        uint256 reward = 0;

        if (_endIndex - _startIndex > 1) {
            for (uint256 i = _startIndex; i < _endIndex - 1; i++) {
                Checkpoint memory cp0 = checkpoints[who][i];
                Checkpoint memory cp1 = checkpoints[who][i + 1];
                (uint256 _rewardPerTokenStored0, ) = getPriorRewardPerToken(
                    token,
                    cp0.timestamp
                );
                (uint256 _rewardPerTokenStored1, ) = getPriorRewardPerToken(
                    token,
                    cp1.timestamp
                );
                reward +=
                    (cp0.balanceOf *
                        (_rewardPerTokenStored1 - _rewardPerTokenStored0)) /
                    PRECISION;
            }
        }

        Checkpoint memory cp = checkpoints[who][_endIndex];
        (uint256 _rewardPerTokenStored, ) = getPriorRewardPerToken(
            token,
            cp.timestamp
        );
        reward +=
            (cp.balanceOf *
                (rewardPerToken(token) -
                    Math.max(
                        _rewardPerTokenStored,
                        userRewardPerTokenStored[token][who]
                    ))) /
            PRECISION;

        return reward;
    }

    // This is an external function, but internal notation is used since it can only be called "internally" from BaseV1Gauges
    function _deposit(uint256 amount, address who) external override {
        registry.ensureNotPaused();

        require(msg.sender == registry.gaugeVoter(), "not voter");
        totalSupply += amount;
        balanceOf[who] += amount;

        _writeCheckpoint(who, balanceOf[who]);
        _writeSupplyCheckpoint();

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

    function _withdraw(uint256 amount, address who) external override {
        registry.ensureNotPaused();

        require(msg.sender == registry.gaugeVoter(), "not voter");
        totalSupply -= amount;
        balanceOf[who] -= amount;

        _writeCheckpoint(who, balanceOf[who]);
        _writeSupplyCheckpoint();

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

    function left(address token) external view override returns (uint256) {
        if (block.timestamp >= periodFinish[token]) return 0;
        uint256 _remaining = periodFinish[token] - block.timestamp;
        return _remaining * rewardRate[token];
    }

    // used to notify a gauge/bribe of a given reward, this can create griefing attacks by extending rewards
    function notifyRewardAmount(address token, uint256 amount)
        external
        override
        nonReentrant
    {
        require(amount > 0, "amount = 0");
        if (rewardRate[token] == 0)
            _writeRewardPerTokenCheckpoint(token, 0, block.timestamp);
        (
            rewardPerTokenStored[token],
            lastUpdateTime[token]
        ) = _updateRewardPerToken(token);

        if (block.timestamp >= periodFinish[token]) {
            _safeTransferFrom(token, msg.sender, address(this), amount);
            rewardRate[token] = amount / DURATION;
        } else {
            uint256 _remaining = periodFinish[token] - block.timestamp;
            uint256 _left = _remaining * rewardRate[token];
            require(amount > _left, "amount < left");
            _safeTransferFrom(token, msg.sender, address(this), amount);
            rewardRate[token] = (amount + _left) / DURATION;
        }
        require(rewardRate[token] > 0, "rewardRate = 0");
        uint256 balance = IERC20(token).balanceOf(address(this));
        require(
            rewardRate[token] <= balance / DURATION,
            "Provided reward too high"
        );
        periodFinish[token] = block.timestamp + DURATION;
        if (!isReward[token]) {
            isReward[token] = true;
            rewards.push(token);
        }

        emit NotifyReward(msg.sender, token, amount);
    }

    function _safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        require(token.code.length > 0, "invalid token code");
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.transfer.selector, to, value)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "transfer failed"
        );
    }

    function _safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        require(token.code.length > 0, "invalid token code");
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(
                IERC20.transferFrom.selector,
                from,
                to,
                value
            )
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "transferFrom failed"
        );
    }
}

File 2 of 15 : IGaugeVoter.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {IRegistry} from "./IRegistry.sol";

interface IGaugeVoter {
    function attachTokenToGauge(uint256 _tokenId, address account) external;

    function detachTokenFromGauge(uint256 _tokenId, address account) external;

    function emitDeposit(
        uint256 _tokenId,
        address account,
        uint256 amount
    ) external;

    function emitWithdraw(
        uint256 _tokenId,
        address account,
        uint256 amount
    ) external;

    function distribute(address _gauge) external;

    function registry() external view returns (IRegistry);

    function notifyRewardAmount(uint256 amount) external;

    event GaugeCreated(
        address indexed gauge,
        address creator,
        address indexed bribe,
        address indexed pool
    );
    event Voted(address indexed voter, uint256 tokenId, int256 weight);
    event Abstained(uint256 tokenId, int256 weight);
    event Deposit(
        address indexed lp,
        address indexed gauge,
        uint256 tokenId,
        uint256 amount
    );
    event Withdraw(
        address indexed lp,
        address indexed gauge,
        uint256 tokenId,
        uint256 amount
    );
    event NotifyReward(
        address indexed sender,
        address indexed reward,
        uint256 amount
    );
    event DistributeReward(
        address indexed sender,
        address indexed gauge,
        uint256 amount
    );
    event Attach(address indexed owner, address indexed gauge, uint256 tokenId);
    event Detach(address indexed owner, address indexed gauge, uint256 tokenId);
    event Whitelisted(
        address indexed whitelister,
        address indexed token,
        bool value
    );
}

File 3 of 15 : INFTLocker.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {IERC721} from "@openzeppelin/contracts/interfaces/IERC721.sol";
import {IERC721Receiver} from "@openzeppelin/contracts/interfaces/IERC721Receiver.sol";
import {IRegistry} from "./IRegistry.sol";

interface INFTLocker is IERC721 {
    function registry() external view returns (IRegistry);

    function balanceOfNFT(uint256) external view returns (uint256);

    function isStaked(uint256) external view returns (bool);

    function epoch() external view returns (uint256);

    function userPointEpoch(uint256) external view returns (uint256);

    function userPointHistory(uint256, uint256)
        external
        view
        returns (Point memory);

    function pointHistory(uint256) external view returns (Point memory);

    function totalSupplyWithoutDecay() external view returns (uint256);

    function isApprovedOrOwner(address, uint256) external view returns (bool);

    function totalSupply() external view returns (uint256);

    function totalSupplyAt(uint256 _block) external view returns (uint256);

    function merge(uint256 _from, uint256 _to) external;

    function blockNumber() external view returns (uint256);

    function checkpoint() external;

    function depositFor(uint256 _tokenId, uint256 _value) external;

    function createLockFor(
        uint256 _value,
        uint256 _lockDuration,
        address _to,
        bool _stakeNFT
    ) external returns (uint256);

    function migrateTokenFor(
        uint256 _value,
        uint256 _lockDuration,
        address _to
    ) external returns (uint256);

    function createLock(
        uint256 _value,
        uint256 _lockDuration,
        bool _stakeNFT
    ) external returns (uint256);

    enum DepositType {
        DEPOSIT_FOR_TYPE,
        CREATE_LOCK_TYPE,
        INCREASE_LOCK_AMOUNT,
        INCREASE_UNLOCK_TIME,
        MERGE_TYPE
    }

    struct Point {
        int128 bias;
        int128 slope; // # -dweight / dt
        uint256 ts;
        uint256 blk; // block
    }

    /* We cannot really do block numbers per se b/c slope is per time, not per block
     * and per block could be fairly bad b/c Ethereum changes blocktimes.
     * What we can do is to extrapolate ***At functions */

    struct LockedBalance {
        int128 amount;
        uint256 end;
        uint256 start;
    }

    event Deposit(
        address indexed provider,
        uint256 tokenId,
        uint256 value,
        uint256 indexed locktime,
        DepositType deposit_type,
        uint256 ts
    );

    event Withdraw(
        address indexed provider,
        uint256 tokenId,
        uint256 value,
        uint256 ts
    );

    event Supply(uint256 prevSupply, uint256 supply);
}

File 4 of 15 : IBribeV2.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {IRegistry} from "./IRegistry.sol";

interface IBribeV2 {
    function registry() external view returns (IRegistry);

    function notifyRewardAmount(address token, uint256 amount) external;

    function left(address token) external view returns (uint256);

    function _deposit(uint256 amount, address tokenId) external;

    function _withdraw(uint256 amount, address tokenId) external;

    function getRewardForOwner(address tokenId, address[] memory tokens)
        external;

    event Deposit(address indexed from, address tokenId, uint256 amount);
    event Withdraw(address indexed from, address tokenId, uint256 amount);
    event NotifyReward(
        address indexed from,
        address indexed reward,
        uint256 amount
    );
    event ClaimRewards(
        address indexed from,
        address indexed reward,
        uint256 amount
    );
}

File 5 of 15 : IRegistry.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol";

interface IRegistry is IAccessControl {
    event MahaChanged(address indexed whom, address _old, address _new);
    event VoterChanged(address indexed whom, address _old, address _new);
    event LockerChanged(address indexed whom, address _old, address _new);
    event GovernorChanged(address indexed whom, address _old, address _new);
    event StakerChanged(address indexed whom, address _old, address _new);
    event EmissionControllerChanged(
        address indexed whom,
        address _old,
        address _new
    );

    function maha() external view returns (address);

    function gaugeVoter() external view returns (address);

    function locker() external view returns (address);

    function staker() external view returns (address);

    function emissionController() external view returns (address);

    function governor() external view returns (address);

    function getAllAddresses()
        external
        view
        returns (
            address,
            address,
            address,
            address,
            address
        );

    function ensureNotPaused() external;

    function setMAHA(address _new) external;

    function setEmissionController(address _new) external;

    function setStaker(address _new) external;

    function setVoter(address _new) external;

    function setLocker(address _new) external;

    function setGovernor(address _new) external;
}

File 6 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

File 7 of 15 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^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() {
        _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 making 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 8 of 15 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. It the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`.
        // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`.
        // This gives `2**k < a <= 2**(k+1)` → `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`.
        // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a
        // good first aproximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1;
        uint256 x = a;
        if (x >> 128 > 0) {
            x >>= 128;
            result <<= 64;
        }
        if (x >> 64 > 0) {
            x >>= 64;
            result <<= 32;
        }
        if (x >> 32 > 0) {
            x >>= 32;
            result <<= 16;
        }
        if (x >> 16 > 0) {
            x >>= 16;
            result <<= 8;
        }
        if (x >> 8 > 0) {
            x >>= 8;
            result <<= 4;
        }
        if (x >> 4 > 0) {
            x >>= 4;
            result <<= 2;
        }
        if (x >> 2 > 0) {
            result <<= 1;
        }

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        uint256 result = sqrt(a);
        if (rounding == Rounding.Up && result * result < a) {
            result += 1;
        }
        return result;
    }
}

File 9 of 15 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 10 of 15 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol)

pragma solidity ^0.8.0;

import "../token/ERC721/IERC721.sol";

File 11 of 15 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Receiver.sol)

pragma solidity ^0.8.0;

import "../token/ERC721/IERC721Receiver.sol";

File 12 of 15 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 13 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 14 of 15 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 15 of 15 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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
{
  "optimizer": {
    "enabled": true,
    "runs": 100
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_registry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"reward","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"tokenId","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"reward","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NotifyReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"tokenId","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"who","type":"address"}],"name":"_deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"who","type":"address"}],"name":"_withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"maxRuns","type":"uint256"}],"name":"batchRewardPerToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"checkpoints","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"balanceOf","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"who","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"getPriorBalanceIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"getPriorRewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"getPriorSupplyIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"getRewardForOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"lastEarn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"left","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registry","outputs":[{"internalType":"contract IRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardPerTokenCheckpoints","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"rewardPerToken","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardPerTokenNumCheckpoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsListLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"supplyCheckpoints","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"supplyNumCheckpoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60a06040523480156200001157600080fd5b5060405162002b5338038062002b5383398101604081905262000034916200004f565b600160005560601b6001600160601b0319166080526200007f565b60006020828403121562000061578081fd5b81516001600160a01b038116811462000078578182fd5b9392505050565b60805160601c612a92620000c1600039600081816103c901528181610959015281816109cc01528181610b4d01528181610bc0015261166d0152612a926000f3fe608060405234801561001057600080fd5b50600436106101bb5760003560e01c806376f4be36116100fa578063b66503cf1161009d578063b66503cf146104a3578063da09d19d146104b6578063e6886396146104d6578063e8111a12146104de578063e943da8a146104e7578063f1229777146104fa578063f301af421461050d578063f7412baf14610520578063fd3140981461054757600080fd5b806376f4be36146103b15780637b103999146103c45780637fd7d0621461040357806399bcc052146104165780639ce43f9014610429578063a495e5b514610449578063aa47965214610474578063aaf5eb681461049457600080fd5b80632ce9aead116101625780632ce9aead146102ba5780633ca068b6146102da578063463cd970146103055780634d5ce038146103185780635a45d0521461034b578063638634ee1461035e5780636fcfff451461037157806370a082311461039157600080fd5b806301316ddf146101c05780630cdfebfa1461020c578063115c6f391461023e57806318160ddd1461025f5780631be0528914610268578063211dc32d14610272578063221ca18c14610285578063293311ab146102a5575b600080fd5b6101f26101ce3660046127dd565b600f6020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152015b60405180910390f35b6101f261021a3660046127dd565b600b6020908152600092835260408084209091529082529020805460019091015482565b61025161024c3660046127dd565b61055a565b604051908152602001610203565b61025160095481565b61025162093a8081565b610251610280366004612757565b6106c7565b61025161029336600461271f565b60016020526000908152604090205481565b6102b86102b3366004612893565b610957565b005b6102516102c836600461271f565b60036020526000908152604090205481565b6102516102e8366004612757565b600660209081526000928352604080842090915290825290205481565b6102b8610313366004612893565b610b4b565b61033b61032636600461271f565b60086020526000908152604090205460ff1681565b6040519015158152602001610203565b6102b86103593660046127dd565b610d2a565b61025161036c36600461271f565b610d62565b61025161037f36600461271f565b600c6020526000908152604090205481565b61025161039f36600461271f565b600a6020526000908152604090205481565b6102516103bf366004612863565b610d86565b6103eb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610203565b6102b8610411366004612808565b610eb8565b61025161042436600461271f565b6111d7565b61025161043736600461271f565b60046020526000908152604090205481565b610251610457366004612757565b600560209081526000928352604080842090915290825290205481565b61025161048236600461271f565b60106020526000908152604090205481565b610251670de0b6b3a764000081565b6102b86104b13660046127dd565b611248565b6102516104c436600461271f565b60026020526000908152604090205481565b600754610251565b610251600e5481565b6102b86104f536600461278f565b611640565b61025161050836600461271f565b611a1b565b6103eb61051b366004612863565b611adb565b6101f261052e366004612863565b600d602052600090815260409020805460019091015482565b6101f26105553660046127dd565b611b05565b6001600160a01b0382166000908152600c6020526040812054806105825760009150506106c1565b6001600160a01b0384166000908152600b6020526040812084916105a76001856129e6565b815260200190815260200160002060000154116105d1576105c96001826129e6565b9150506106c1565b6001600160a01b0384166000908152600b602090815260408083208380529091529020548310156106065760009150506106c1565b6000806106146001846129e6565b90505b818111156106bc576000600261062d84846129e6565b61063791906129a7565b61064190836129e6565b6001600160a01b0388166000908152600b60209081526040808320848452825291829020825180840190935280548084526001909101549183019190915291925090871415610696575093506106c192505050565b80518711156106a7578193506106b5565b6106b26001836129e6565b92505b5050610617565b509150505b92915050565b6001600160a01b038083166000818152600560209081526040808320948616835293815283822054928252600f8152838220828052905291822054829161070d91611d24565b6001600160a01b0384166000908152600c60205260409020549091506107375760009150506106c1565b6000610743848361055a565b6001600160a01b0385166000908152600c60205260408120549192509061076c906001906129e6565b90506000600161077c84846129e6565b111561088b57825b61078f6001846129e6565b811015610889576001600160a01b0387166000818152600b6020818152604080842086855280835281852082518084019093528054835260019081015483850152958552929091529282906107e590869061298f565b815260200190815260200160002060405180604001604052908160008201548152602001600182015481525050905060006108248b8460000151611b05565b50905060006108378c8460000151611b05565b509050670de0b6b3a764000061084d83836129e6565b856020015161085c91906129c7565b61086691906129a7565b610870908761298f565b9550505050508080610881906129fd565b915050610784565b505b6001600160a01b0386166000908152600b602090815260408083208584528252808320815180830190925280548083526001909101549282019290925291906108d5908a90611b05565b506001600160a01b03808b166000908152600660209081526040808320938d1683529290522054909150670de0b6b3a764000090610914908390611d24565b61091d8b611a1b565b61092791906129e6565b836020015161093691906129c7565b61094091906129a7565b61094a908461298f565b9998505050505050505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f9fa21236040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156109b257600080fd5b505af11580156109c6573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166381ca29a16040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2357600080fd5b505afa158015610a37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5b919061273b565b6001600160a01b0316336001600160a01b031614610a945760405162461bcd60e51b8152600401610a8b90612909565b60405180910390fd5b8160096000828254610aa691906129e6565b90915550506001600160a01b0381166000908152600a602052604081208054849290610ad39084906129e6565b90915550506001600160a01b0381166000908152600a6020526040902054610afc908290611d3b565b610b04611e46565b336001600160a01b03167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb8284604051610b3f9291906128f0565b60405180910390a25050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f9fa21236040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610ba657600080fd5b505af1158015610bba573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166381ca29a16040518163ffffffff1660e01b815260040160206040518083038186803b158015610c1757600080fd5b505afa158015610c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4f919061273b565b6001600160a01b0316336001600160a01b031614610c7f5760405162461bcd60e51b8152600401610a8b90612909565b8160096000828254610c91919061298f565b90915550506001600160a01b0381166000908152600a602052604081208054849290610cbe90849061298f565b90915550506001600160a01b0381166000908152600a6020526040902054610ce7908290611d3b565b610cef611e46565b336001600160a01b03167f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f628284604051610b3f9291906128f0565b610d348282611eea565b6001600160a01b03909316600090815260046020908152604080832060039092529091209390935590915550565b6001600160a01b0381166000908152600260205260408120546106c1904290612049565b600e5460009080610d9a5750600092915050565b82600d6000610daa6001856129e6565b81526020019081526020016000206000015411610dd357610dcc6001826129e6565b9392505050565b60008052600d6020527f81955a0a11e65eac625c29e8882660bae4e165a75d72780094acae8ece9a29ee54831015610e0e5750600092915050565b600080610e1c6001846129e6565b90505b81811115610eb05760006002610e3584846129e6565b610e3f91906129a7565b610e4990836129e6565b6000818152600d6020908152604091829020825180840190935280548084526001909101549183019190915291925090871415610e8a575095945050505050565b8051871115610e9b57819350610ea9565b610ea66001836129e6565b92505b5050610e1f565b509392505050565b60026000541415610edb5760405162461bcd60e51b8152600401610a8b90612958565b600260009081555b81518110156111ce57610f1c828281518110610f0f57634e487b7160e01b600052603260045260246000fd5b6020026020010151612058565b60046000858581518110610f4057634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600060036000878781518110610f8e57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060008491905055839190505550506000610ff7838381518110610fe957634e487b7160e01b600052603260045260246000fd5b6020026020010151336106c7565b9050426005600085858151811061101e57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000336001600160a01b03166001600160a01b03168152602001908152602001600020819055506004600084848151811061109157634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054600660008585815181106110de57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252818101929092526040908101600090812033825290925290205580156111475761114783838151811061113857634e487b7160e01b600052603260045260246000fd5b6020026020010151338361223b565b82828151811061116757634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316336001600160a01b03167f9aa05b3d70a9e3e2f004f039648839560576334fb45c81f91b6db03ad9e2efc9836040516111b391815260200190565b60405180910390a350806111c6816129fd565b915050610ee3565b50506001600055565b6001600160a01b03811660009081526002602052604081205442106111fe57506000919050565b6001600160a01b0382166000908152600260205260408120546112229042906129e6565b6001600160a01b038416600090815260016020526040902054909150610dcc90826129c7565b6002600054141561126b5760405162461bcd60e51b8152600401610a8b90612958565b6002600055806112aa5760405162461bcd60e51b815260206004820152600a6024820152690616d6f756e74203d20360b41b6044820152606401610a8b565b6001600160a01b0382166000908152600160205260409020546112d3576112d38260004261237c565b6112dc82612058565b6001600160a01b038416600090815260046020908152604080832060038352818420949094559390925560029091522054421061134a5761131f8233308461246b565b61132c62093a80826129a7565b6001600160a01b038316600090815260016020526040902055611416565b6001600160a01b03821660009081526002602052604081205461136e9042906129e6565b6001600160a01b0384166000908152600160205260408120549192509061139590836129c7565b90508083116113d65760405162461bcd60e51b815260206004820152600d60248201526c185b5bdd5b9d080f081b19599d609a1b6044820152606401610a8b565b6113e28433308661246b565b62093a806113f0828561298f565b6113fa91906129a7565b6001600160a01b03851660009081526001602052604090205550505b6001600160a01b03821660009081526001602052604090205461146c5760405162461bcd60e51b815260206004820152600e60248201526d072657761726452617465203d20360941b6044820152606401610a8b565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b1580156114ae57600080fd5b505afa1580156114c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e6919061287b565b90506114f562093a80826129a7565b6001600160a01b03841660009081526001602052604090205411156115575760405162461bcd60e51b81526020600482015260186024820152770a0e4deecd2c8cac840e4caeec2e4c840e8dede40d0d2ced60431b6044820152606401610a8b565b61156462093a804261298f565b6001600160a01b03841660009081526002602090815260408083209390935560089052205460ff166115f6576001600160a01b0383166000818152600860205260408120805460ff191660019081179091556007805491820181559091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b03191690911790555b6040518281526001600160a01b0384169033907ff70d5c697de7ea828df48e5c4573cb2194c659f1901f70110c52b066dcf508269060200160405180910390a35050600160005550565b600260005414156116635760405162461bcd60e51b8152600401610a8b90612958565b60026000819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166381ca29a16040518163ffffffff1660e01b815260040160206040518083038186803b1580156116c457600080fd5b505afa1580156116d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116fc919061273b565b6001600160a01b0316336001600160a01b03161461172c5760405162461bcd60e51b8152600401610a8b90612909565b60005b8151811015611a115761175b828281518110610f0f57634e487b7160e01b600052603260045260246000fd5b6004600085858151811061177f57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000600360008787815181106117cd57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000849190505583919050555050600061183683838151811061182857634e487b7160e01b600052603260045260246000fd5b6020026020010151856106c7565b9050426005600085858151811061185d57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000866001600160a01b03166001600160a01b0316815260200190815260200160002081905550600460008484815181106118d057634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020546006600085858151811061191d57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03908116835282820193909352604091820160009081209389168152929052902055801561198a5761198a83838151811061197b57634e487b7160e01b600052603260045260246000fd5b6020026020010151858361223b565b8282815181106119aa57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316846001600160a01b03167f9aa05b3d70a9e3e2f004f039648839560576334fb45c81f91b6db03ad9e2efc9836040516119f691815260200190565b60405180910390a35080611a09816129fd565b91505061172f565b5050600160005550565b600060095460001415611a4457506001600160a01b031660009081526004602052604090205490565b6009546001600160a01b03831660009081526001602090815260408083205460038352818420546002909352922054670de0b6b3a76400009291611a8791612049565b611a9086610d62565b611a9a91906129e6565b611aa491906129c7565b611aae91906129c7565b611ab891906129a7565b6001600160a01b0383166000908152600460205260409020546106c1919061298f565b60078181548110611aeb57600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b038216600090815260106020526040812054819080611b32576000809250925050611d1d565b6001600160a01b0385166000908152600f602052604081208591611b576001856129e6565b81526020019081526020016000206000015411611bf4576001600160a01b0385166000908152600f6020526040812090611b926001846129e6565b815260200190815260200160002060010154600f6000876001600160a01b03166001600160a01b031681526020019081526020016000206000600184611bd891906129e6565b8152602001908152602001600020600001549250925050611d1d565b6001600160a01b0385166000908152600f60209081526040808320838052909152902054841015611c2c576000809250925050611d1d565b600080611c3a6001846129e6565b90505b81811115611cec5760006002611c5384846129e6565b611c5d91906129a7565b611c6790836129e6565b6001600160a01b0389166000908152600f60209081526040808320848452825291829020825180840190935280548084526001909101549183019190915291925090881415611cc657602081015190519096509450611d1d9350505050565b8051881115611cd757819350611ce5565b611ce26001836129e6565b92505b5050611c3d565b506001600160a01b0386166000908152600f6020908152604080832093835292905220600181015490549093509150505b9250929050565b600081831015611d345781610dcc565b5090919050565b6001600160a01b0382166000908152600c602052604090205442908015801590611d9957506001600160a01b0384166000908152600b602052604081208391611d856001856129e6565b815260200190815260200160002060000154145b15611ddc576001600160a01b0384166000908152600b602052604081208491611dc36001856129e6565b8152602081019190915260400160002060010155611e40565b60408051808201825283815260208082018681526001600160a01b0388166000908152600b8352848120868252909252929020905181559051600191820155611e2690829061298f565b6001600160a01b0385166000908152600c60205260409020555b50505050565b600e54428115801590611e78575080600d6000611e646001866129e6565b815260200190815260200160002060000154145b15611ea757600954600d6000611e8f6001866129e6565b81526020810191909152604001600020600101555050565b60408051808201825282815260095460208083019182526000868152600d90915292909220905181559051600191820155611ee390839061298f565b600e555050565b6001600160a01b0382166000908152600360209081526040808320546004909252822054600e5483929190611f225792509050611d1d565b6001600160a01b038616600090815260016020526040902054611f4b579250429150611d1d9050565b6000611f5683610d86565b90506000611f726001600e54611f6c91906129e6565b88612049565b9050815b8181101561203a576000818152600d60209081526040918290208251808401909352805483526001015490820181905215612027576000600d81611fbb85600161298f565b81526020019081526020016000206040518060400160405290816000820154815260200160018201548152505090506000806120068d8460000151866000015187602001518d6125af565b9092509050612015828961298f565b97506120228d898361237c565b975050505b5080612032816129fd565b915050611f76565b50919792965091945050505050565b6000818310611d345781610dcc565b6001600160a01b0381166000908152600360209081526040808320546004909252822054600e54839291906120905794909350915050565b6001600160a01b0385166000908152600160205260409020546120b7579442945092505050565b60006120c283610d86565b905060006001600e546120d591906129e6565b905060016120e383836129e6565b11156121bb57815b6120f66001836129e6565b8110156121b9576000818152600d602090815260409182902082518084019093528054835260010154908201819052156121a6576000600d8161213a85600161298f565b81526020019081526020016000206040518060400160405290816000820154815260200160018201548152505090506000806121858c8460000151866000015187602001518d6125af565b9092509050612194828961298f565b97506121a18c898361237c565b975050505b50806121b1816129fd565b9150506120eb565b505b6000818152600d6020908152604091829020825180840190935280548352600101549082018190521561222d57600061220e896121f78b610d62565b8451612203908a611d24565b85602001518a6125af565b50905061221b818661298f565b945061222889864261237c565b429550505b509196929550919350505050565b6000836001600160a01b03163b116122655760405162461bcd60e51b8152600401610a8b9061292c565b600080846001600160a01b031663a9059cbb60e01b858560405160240161228d9291906128f0565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516122cb91906128b7565b6000604051808303816000865af19150503d8060008114612308576040519150601f19603f3d011682016040523d82523d6000602084013e61230d565b606091505b50915091508180156123375750805115806123375750808060200190518101906123379190612843565b6123755760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b6044820152606401610a8b565b5050505050565b6001600160a01b03831660009081526010602052604090205480158015906123d857506001600160a01b0384166000908152600f6020526040812083916123c46001856129e6565b815260200190815260200160002060000154145b15612402576001600160a01b0384166000908152600f602052604081208491611dc36001856129e6565b60408051808201825283815260208082018681526001600160a01b0388166000908152600f835284812086825290925292902090518155905160019182015561244c90829061298f565b6001600160a01b03851660009081526010602052604090205550505050565b6000846001600160a01b03163b116124955760405162461bcd60e51b8152600401610a8b9061292c565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916124f991906128b7565b6000604051808303816000865af19150503d8060008114612536576040519150601f19603f3d011682016040523d82523d6000602084013e61253b565b606091505b50915091508180156125655750805115806125655750808060200190518101906125659190612843565b6125a75760405162461bcd60e51b81526020600482015260136024820152721d1c985b9cd9995c919c9bdb4819985a5b1959606a1b6044820152606401610a8b565b505050505050565b60008060006125be8785611d24565b6001600160a01b0389166000908152600160205260409020549091508590670de0b6b3a7640000906126116125f38a89611d24565b6001600160a01b038d16600090815260026020526040902054612049565b6001600160a01b038c16600090815260026020526040902054612635908690612049565b61263f91906129e6565b61264991906129c7565b61265391906129c7565b61265d91906129a7565b9890975095505050505050565b803561267581612a44565b919050565b600082601f83011261268a578081fd5b8135602067ffffffffffffffff808311156126a7576126a7612a2e565b8260051b604051601f19603f830116810181811084821117156126cc576126cc612a2e565b604052848152838101925086840182880185018910156126ea578687fd5b8692505b85831015612713576126ff8161266a565b8452928401926001929092019184016126ee565b50979650505050505050565b600060208284031215612730578081fd5b8135610dcc81612a44565b60006020828403121561274c578081fd5b8151610dcc81612a44565b60008060408385031215612769578081fd5b823561277481612a44565b9150602083013561278481612a44565b809150509250929050565b600080604083850312156127a1578182fd5b82356127ac81612a44565b9150602083013567ffffffffffffffff8111156127c7578182fd5b6127d38582860161267a565b9150509250929050565b600080604083850312156127ef578182fd5b82356127fa81612a44565b946020939093013593505050565b600060208284031215612819578081fd5b813567ffffffffffffffff81111561282f578182fd5b61283b8482850161267a565b949350505050565b600060208284031215612854578081fd5b81518015158114610dcc578182fd5b600060208284031215612874578081fd5b5035919050565b60006020828403121561288c578081fd5b5051919050565b600080604083850312156128a5578182fd5b82359150602083013561278481612a44565b60008251815b818110156128d757602081860181015185830152016128bd565b818111156128e55782828501525b509190910192915050565b6001600160a01b03929092168252602082015260400190565b6020808252600990820152683737ba103b37ba32b960b91b604082015260600190565b602080825260129082015271696e76616c696420746f6b656e20636f646560701b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600082198211156129a2576129a2612a18565b500190565b6000826129c257634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156129e1576129e1612a18565b500290565b6000828210156129f8576129f8612a18565b500390565b6000600019821415612a1157612a11612a18565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114612a5957600080fd5b5056fea26469706673582212207d22301ea35e36ebb4dabfaf0071b585c532867c2ab545fdec36171f0925794264736f6c634300080400330000000000000000000000002684861ba9dada685a11c4e9e5aed8630f08afe0

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101bb5760003560e01c806376f4be36116100fa578063b66503cf1161009d578063b66503cf146104a3578063da09d19d146104b6578063e6886396146104d6578063e8111a12146104de578063e943da8a146104e7578063f1229777146104fa578063f301af421461050d578063f7412baf14610520578063fd3140981461054757600080fd5b806376f4be36146103b15780637b103999146103c45780637fd7d0621461040357806399bcc052146104165780639ce43f9014610429578063a495e5b514610449578063aa47965214610474578063aaf5eb681461049457600080fd5b80632ce9aead116101625780632ce9aead146102ba5780633ca068b6146102da578063463cd970146103055780634d5ce038146103185780635a45d0521461034b578063638634ee1461035e5780636fcfff451461037157806370a082311461039157600080fd5b806301316ddf146101c05780630cdfebfa1461020c578063115c6f391461023e57806318160ddd1461025f5780631be0528914610268578063211dc32d14610272578063221ca18c14610285578063293311ab146102a5575b600080fd5b6101f26101ce3660046127dd565b600f6020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152015b60405180910390f35b6101f261021a3660046127dd565b600b6020908152600092835260408084209091529082529020805460019091015482565b61025161024c3660046127dd565b61055a565b604051908152602001610203565b61025160095481565b61025162093a8081565b610251610280366004612757565b6106c7565b61025161029336600461271f565b60016020526000908152604090205481565b6102b86102b3366004612893565b610957565b005b6102516102c836600461271f565b60036020526000908152604090205481565b6102516102e8366004612757565b600660209081526000928352604080842090915290825290205481565b6102b8610313366004612893565b610b4b565b61033b61032636600461271f565b60086020526000908152604090205460ff1681565b6040519015158152602001610203565b6102b86103593660046127dd565b610d2a565b61025161036c36600461271f565b610d62565b61025161037f36600461271f565b600c6020526000908152604090205481565b61025161039f36600461271f565b600a6020526000908152604090205481565b6102516103bf366004612863565b610d86565b6103eb7f0000000000000000000000002684861ba9dada685a11c4e9e5aed8630f08afe081565b6040516001600160a01b039091168152602001610203565b6102b8610411366004612808565b610eb8565b61025161042436600461271f565b6111d7565b61025161043736600461271f565b60046020526000908152604090205481565b610251610457366004612757565b600560209081526000928352604080842090915290825290205481565b61025161048236600461271f565b60106020526000908152604090205481565b610251670de0b6b3a764000081565b6102b86104b13660046127dd565b611248565b6102516104c436600461271f565b60026020526000908152604090205481565b600754610251565b610251600e5481565b6102b86104f536600461278f565b611640565b61025161050836600461271f565b611a1b565b6103eb61051b366004612863565b611adb565b6101f261052e366004612863565b600d602052600090815260409020805460019091015482565b6101f26105553660046127dd565b611b05565b6001600160a01b0382166000908152600c6020526040812054806105825760009150506106c1565b6001600160a01b0384166000908152600b6020526040812084916105a76001856129e6565b815260200190815260200160002060000154116105d1576105c96001826129e6565b9150506106c1565b6001600160a01b0384166000908152600b602090815260408083208380529091529020548310156106065760009150506106c1565b6000806106146001846129e6565b90505b818111156106bc576000600261062d84846129e6565b61063791906129a7565b61064190836129e6565b6001600160a01b0388166000908152600b60209081526040808320848452825291829020825180840190935280548084526001909101549183019190915291925090871415610696575093506106c192505050565b80518711156106a7578193506106b5565b6106b26001836129e6565b92505b5050610617565b509150505b92915050565b6001600160a01b038083166000818152600560209081526040808320948616835293815283822054928252600f8152838220828052905291822054829161070d91611d24565b6001600160a01b0384166000908152600c60205260409020549091506107375760009150506106c1565b6000610743848361055a565b6001600160a01b0385166000908152600c60205260408120549192509061076c906001906129e6565b90506000600161077c84846129e6565b111561088b57825b61078f6001846129e6565b811015610889576001600160a01b0387166000818152600b6020818152604080842086855280835281852082518084019093528054835260019081015483850152958552929091529282906107e590869061298f565b815260200190815260200160002060405180604001604052908160008201548152602001600182015481525050905060006108248b8460000151611b05565b50905060006108378c8460000151611b05565b509050670de0b6b3a764000061084d83836129e6565b856020015161085c91906129c7565b61086691906129a7565b610870908761298f565b9550505050508080610881906129fd565b915050610784565b505b6001600160a01b0386166000908152600b602090815260408083208584528252808320815180830190925280548083526001909101549282019290925291906108d5908a90611b05565b506001600160a01b03808b166000908152600660209081526040808320938d1683529290522054909150670de0b6b3a764000090610914908390611d24565b61091d8b611a1b565b61092791906129e6565b836020015161093691906129c7565b61094091906129a7565b61094a908461298f565b9998505050505050505050565b7f0000000000000000000000002684861ba9dada685a11c4e9e5aed8630f08afe06001600160a01b031663f9fa21236040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156109b257600080fd5b505af11580156109c6573d6000803e3d6000fd5b505050507f0000000000000000000000002684861ba9dada685a11c4e9e5aed8630f08afe06001600160a01b03166381ca29a16040518163ffffffff1660e01b815260040160206040518083038186803b158015610a2357600080fd5b505afa158015610a37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a5b919061273b565b6001600160a01b0316336001600160a01b031614610a945760405162461bcd60e51b8152600401610a8b90612909565b60405180910390fd5b8160096000828254610aa691906129e6565b90915550506001600160a01b0381166000908152600a602052604081208054849290610ad39084906129e6565b90915550506001600160a01b0381166000908152600a6020526040902054610afc908290611d3b565b610b04611e46565b336001600160a01b03167f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb8284604051610b3f9291906128f0565b60405180910390a25050565b7f0000000000000000000000002684861ba9dada685a11c4e9e5aed8630f08afe06001600160a01b031663f9fa21236040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610ba657600080fd5b505af1158015610bba573d6000803e3d6000fd5b505050507f0000000000000000000000002684861ba9dada685a11c4e9e5aed8630f08afe06001600160a01b03166381ca29a16040518163ffffffff1660e01b815260040160206040518083038186803b158015610c1757600080fd5b505afa158015610c2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4f919061273b565b6001600160a01b0316336001600160a01b031614610c7f5760405162461bcd60e51b8152600401610a8b90612909565b8160096000828254610c91919061298f565b90915550506001600160a01b0381166000908152600a602052604081208054849290610cbe90849061298f565b90915550506001600160a01b0381166000908152600a6020526040902054610ce7908290611d3b565b610cef611e46565b336001600160a01b03167f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f628284604051610b3f9291906128f0565b610d348282611eea565b6001600160a01b03909316600090815260046020908152604080832060039092529091209390935590915550565b6001600160a01b0381166000908152600260205260408120546106c1904290612049565b600e5460009080610d9a5750600092915050565b82600d6000610daa6001856129e6565b81526020019081526020016000206000015411610dd357610dcc6001826129e6565b9392505050565b60008052600d6020527f81955a0a11e65eac625c29e8882660bae4e165a75d72780094acae8ece9a29ee54831015610e0e5750600092915050565b600080610e1c6001846129e6565b90505b81811115610eb05760006002610e3584846129e6565b610e3f91906129a7565b610e4990836129e6565b6000818152600d6020908152604091829020825180840190935280548084526001909101549183019190915291925090871415610e8a575095945050505050565b8051871115610e9b57819350610ea9565b610ea66001836129e6565b92505b5050610e1f565b509392505050565b60026000541415610edb5760405162461bcd60e51b8152600401610a8b90612958565b600260009081555b81518110156111ce57610f1c828281518110610f0f57634e487b7160e01b600052603260045260246000fd5b6020026020010151612058565b60046000858581518110610f4057634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600060036000878781518110610f8e57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060008491905055839190505550506000610ff7838381518110610fe957634e487b7160e01b600052603260045260246000fd5b6020026020010151336106c7565b9050426005600085858151811061101e57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000336001600160a01b03166001600160a01b03168152602001908152602001600020819055506004600084848151811061109157634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054600660008585815181106110de57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252818101929092526040908101600090812033825290925290205580156111475761114783838151811061113857634e487b7160e01b600052603260045260246000fd5b6020026020010151338361223b565b82828151811061116757634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316336001600160a01b03167f9aa05b3d70a9e3e2f004f039648839560576334fb45c81f91b6db03ad9e2efc9836040516111b391815260200190565b60405180910390a350806111c6816129fd565b915050610ee3565b50506001600055565b6001600160a01b03811660009081526002602052604081205442106111fe57506000919050565b6001600160a01b0382166000908152600260205260408120546112229042906129e6565b6001600160a01b038416600090815260016020526040902054909150610dcc90826129c7565b6002600054141561126b5760405162461bcd60e51b8152600401610a8b90612958565b6002600055806112aa5760405162461bcd60e51b815260206004820152600a6024820152690616d6f756e74203d20360b41b6044820152606401610a8b565b6001600160a01b0382166000908152600160205260409020546112d3576112d38260004261237c565b6112dc82612058565b6001600160a01b038416600090815260046020908152604080832060038352818420949094559390925560029091522054421061134a5761131f8233308461246b565b61132c62093a80826129a7565b6001600160a01b038316600090815260016020526040902055611416565b6001600160a01b03821660009081526002602052604081205461136e9042906129e6565b6001600160a01b0384166000908152600160205260408120549192509061139590836129c7565b90508083116113d65760405162461bcd60e51b815260206004820152600d60248201526c185b5bdd5b9d080f081b19599d609a1b6044820152606401610a8b565b6113e28433308661246b565b62093a806113f0828561298f565b6113fa91906129a7565b6001600160a01b03851660009081526001602052604090205550505b6001600160a01b03821660009081526001602052604090205461146c5760405162461bcd60e51b815260206004820152600e60248201526d072657761726452617465203d20360941b6044820152606401610a8b565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a082319060240160206040518083038186803b1580156114ae57600080fd5b505afa1580156114c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e6919061287b565b90506114f562093a80826129a7565b6001600160a01b03841660009081526001602052604090205411156115575760405162461bcd60e51b81526020600482015260186024820152770a0e4deecd2c8cac840e4caeec2e4c840e8dede40d0d2ced60431b6044820152606401610a8b565b61156462093a804261298f565b6001600160a01b03841660009081526002602090815260408083209390935560089052205460ff166115f6576001600160a01b0383166000818152600860205260408120805460ff191660019081179091556007805491820181559091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b03191690911790555b6040518281526001600160a01b0384169033907ff70d5c697de7ea828df48e5c4573cb2194c659f1901f70110c52b066dcf508269060200160405180910390a35050600160005550565b600260005414156116635760405162461bcd60e51b8152600401610a8b90612958565b60026000819055507f0000000000000000000000002684861ba9dada685a11c4e9e5aed8630f08afe06001600160a01b03166381ca29a16040518163ffffffff1660e01b815260040160206040518083038186803b1580156116c457600080fd5b505afa1580156116d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116fc919061273b565b6001600160a01b0316336001600160a01b03161461172c5760405162461bcd60e51b8152600401610a8b90612909565b60005b8151811015611a115761175b828281518110610f0f57634e487b7160e01b600052603260045260246000fd5b6004600085858151811061177f57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000600360008787815181106117cd57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000849190505583919050555050600061183683838151811061182857634e487b7160e01b600052603260045260246000fd5b6020026020010151856106c7565b9050426005600085858151811061185d57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000866001600160a01b03166001600160a01b0316815260200190815260200160002081905550600460008484815181106118d057634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020546006600085858151811061191d57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03908116835282820193909352604091820160009081209389168152929052902055801561198a5761198a83838151811061197b57634e487b7160e01b600052603260045260246000fd5b6020026020010151858361223b565b8282815181106119aa57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316846001600160a01b03167f9aa05b3d70a9e3e2f004f039648839560576334fb45c81f91b6db03ad9e2efc9836040516119f691815260200190565b60405180910390a35080611a09816129fd565b91505061172f565b5050600160005550565b600060095460001415611a4457506001600160a01b031660009081526004602052604090205490565b6009546001600160a01b03831660009081526001602090815260408083205460038352818420546002909352922054670de0b6b3a76400009291611a8791612049565b611a9086610d62565b611a9a91906129e6565b611aa491906129c7565b611aae91906129c7565b611ab891906129a7565b6001600160a01b0383166000908152600460205260409020546106c1919061298f565b60078181548110611aeb57600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b038216600090815260106020526040812054819080611b32576000809250925050611d1d565b6001600160a01b0385166000908152600f602052604081208591611b576001856129e6565b81526020019081526020016000206000015411611bf4576001600160a01b0385166000908152600f6020526040812090611b926001846129e6565b815260200190815260200160002060010154600f6000876001600160a01b03166001600160a01b031681526020019081526020016000206000600184611bd891906129e6565b8152602001908152602001600020600001549250925050611d1d565b6001600160a01b0385166000908152600f60209081526040808320838052909152902054841015611c2c576000809250925050611d1d565b600080611c3a6001846129e6565b90505b81811115611cec5760006002611c5384846129e6565b611c5d91906129a7565b611c6790836129e6565b6001600160a01b0389166000908152600f60209081526040808320848452825291829020825180840190935280548084526001909101549183019190915291925090881415611cc657602081015190519096509450611d1d9350505050565b8051881115611cd757819350611ce5565b611ce26001836129e6565b92505b5050611c3d565b506001600160a01b0386166000908152600f6020908152604080832093835292905220600181015490549093509150505b9250929050565b600081831015611d345781610dcc565b5090919050565b6001600160a01b0382166000908152600c602052604090205442908015801590611d9957506001600160a01b0384166000908152600b602052604081208391611d856001856129e6565b815260200190815260200160002060000154145b15611ddc576001600160a01b0384166000908152600b602052604081208491611dc36001856129e6565b8152602081019190915260400160002060010155611e40565b60408051808201825283815260208082018681526001600160a01b0388166000908152600b8352848120868252909252929020905181559051600191820155611e2690829061298f565b6001600160a01b0385166000908152600c60205260409020555b50505050565b600e54428115801590611e78575080600d6000611e646001866129e6565b815260200190815260200160002060000154145b15611ea757600954600d6000611e8f6001866129e6565b81526020810191909152604001600020600101555050565b60408051808201825282815260095460208083019182526000868152600d90915292909220905181559051600191820155611ee390839061298f565b600e555050565b6001600160a01b0382166000908152600360209081526040808320546004909252822054600e5483929190611f225792509050611d1d565b6001600160a01b038616600090815260016020526040902054611f4b579250429150611d1d9050565b6000611f5683610d86565b90506000611f726001600e54611f6c91906129e6565b88612049565b9050815b8181101561203a576000818152600d60209081526040918290208251808401909352805483526001015490820181905215612027576000600d81611fbb85600161298f565b81526020019081526020016000206040518060400160405290816000820154815260200160018201548152505090506000806120068d8460000151866000015187602001518d6125af565b9092509050612015828961298f565b97506120228d898361237c565b975050505b5080612032816129fd565b915050611f76565b50919792965091945050505050565b6000818310611d345781610dcc565b6001600160a01b0381166000908152600360209081526040808320546004909252822054600e54839291906120905794909350915050565b6001600160a01b0385166000908152600160205260409020546120b7579442945092505050565b60006120c283610d86565b905060006001600e546120d591906129e6565b905060016120e383836129e6565b11156121bb57815b6120f66001836129e6565b8110156121b9576000818152600d602090815260409182902082518084019093528054835260010154908201819052156121a6576000600d8161213a85600161298f565b81526020019081526020016000206040518060400160405290816000820154815260200160018201548152505090506000806121858c8460000151866000015187602001518d6125af565b9092509050612194828961298f565b97506121a18c898361237c565b975050505b50806121b1816129fd565b9150506120eb565b505b6000818152600d6020908152604091829020825180840190935280548352600101549082018190521561222d57600061220e896121f78b610d62565b8451612203908a611d24565b85602001518a6125af565b50905061221b818661298f565b945061222889864261237c565b429550505b509196929550919350505050565b6000836001600160a01b03163b116122655760405162461bcd60e51b8152600401610a8b9061292c565b600080846001600160a01b031663a9059cbb60e01b858560405160240161228d9291906128f0565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516122cb91906128b7565b6000604051808303816000865af19150503d8060008114612308576040519150601f19603f3d011682016040523d82523d6000602084013e61230d565b606091505b50915091508180156123375750805115806123375750808060200190518101906123379190612843565b6123755760405162461bcd60e51b815260206004820152600f60248201526e1d1c985b9cd9995c8819985a5b1959608a1b6044820152606401610a8b565b5050505050565b6001600160a01b03831660009081526010602052604090205480158015906123d857506001600160a01b0384166000908152600f6020526040812083916123c46001856129e6565b815260200190815260200160002060000154145b15612402576001600160a01b0384166000908152600f602052604081208491611dc36001856129e6565b60408051808201825283815260208082018681526001600160a01b0388166000908152600f835284812086825290925292902090518155905160019182015561244c90829061298f565b6001600160a01b03851660009081526010602052604090205550505050565b6000846001600160a01b03163b116124955760405162461bcd60e51b8152600401610a8b9061292c565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916124f991906128b7565b6000604051808303816000865af19150503d8060008114612536576040519150601f19603f3d011682016040523d82523d6000602084013e61253b565b606091505b50915091508180156125655750805115806125655750808060200190518101906125659190612843565b6125a75760405162461bcd60e51b81526020600482015260136024820152721d1c985b9cd9995c919c9bdb4819985a5b1959606a1b6044820152606401610a8b565b505050505050565b60008060006125be8785611d24565b6001600160a01b0389166000908152600160205260409020549091508590670de0b6b3a7640000906126116125f38a89611d24565b6001600160a01b038d16600090815260026020526040902054612049565b6001600160a01b038c16600090815260026020526040902054612635908690612049565b61263f91906129e6565b61264991906129c7565b61265391906129c7565b61265d91906129a7565b9890975095505050505050565b803561267581612a44565b919050565b600082601f83011261268a578081fd5b8135602067ffffffffffffffff808311156126a7576126a7612a2e565b8260051b604051601f19603f830116810181811084821117156126cc576126cc612a2e565b604052848152838101925086840182880185018910156126ea578687fd5b8692505b85831015612713576126ff8161266a565b8452928401926001929092019184016126ee565b50979650505050505050565b600060208284031215612730578081fd5b8135610dcc81612a44565b60006020828403121561274c578081fd5b8151610dcc81612a44565b60008060408385031215612769578081fd5b823561277481612a44565b9150602083013561278481612a44565b809150509250929050565b600080604083850312156127a1578182fd5b82356127ac81612a44565b9150602083013567ffffffffffffffff8111156127c7578182fd5b6127d38582860161267a565b9150509250929050565b600080604083850312156127ef578182fd5b82356127fa81612a44565b946020939093013593505050565b600060208284031215612819578081fd5b813567ffffffffffffffff81111561282f578182fd5b61283b8482850161267a565b949350505050565b600060208284031215612854578081fd5b81518015158114610dcc578182fd5b600060208284031215612874578081fd5b5035919050565b60006020828403121561288c578081fd5b5051919050565b600080604083850312156128a5578182fd5b82359150602083013561278481612a44565b60008251815b818110156128d757602081860181015185830152016128bd565b818111156128e55782828501525b509190910192915050565b6001600160a01b03929092168252602082015260400190565b6020808252600990820152683737ba103b37ba32b960b91b604082015260600190565b602080825260129082015271696e76616c696420746f6b656e20636f646560701b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600082198211156129a2576129a2612a18565b500190565b6000826129c257634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156129e1576129e1612a18565b500290565b6000828210156129f8576129f8612a18565b500390565b6000600019821415612a1157612a11612a18565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114612a5957600080fd5b5056fea26469706673582212207d22301ea35e36ebb4dabfaf0071b585c532867c2ab545fdec36171f0925794264736f6c63430008040033

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

0000000000000000000000002684861ba9dada685a11c4e9e5aed8630f08afe0

-----Decoded View---------------
Arg [0] : _registry (address): 0x2684861Ba9dadA685a11C4e9E5aED8630f08afe0

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002684861ba9dada685a11c4e9e5aed8630f08afe0


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

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

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