GLMR Price: $0.267824 (-1.66%)
Gas: 252 GWei

Contract

0x0B7ad27AE2CBBC7A895dac054a5FfE818147fecd

Overview

GLMR Balance

Moonbeam Chain LogoMoonbeam Chain LogoMoonbeam Chain Logo0 GLMR

GLMR Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Stake27732902023-01-20 22:11:36484 days ago1674252696IN
1Beam: Multi Fee Distribution
0 GLMR0.05790421190
Get Reward27639932023-01-19 14:41:42486 days ago1674139302IN
1Beam: Multi Fee Distribution
0 GLMR0.01642868101.5
Withdraw Expired...26924292023-01-09 12:35:42496 days ago1673267742IN
1Beam: Multi Fee Distribution
0 GLMR0.00779986101.5
Get Reward26924262023-01-09 12:35:06496 days ago1673267706IN
1Beam: Multi Fee Distribution
0 GLMR0.01984071101.5
Stake26682262023-01-06 2:50:12499 days ago1672973412IN
1Beam: Multi Fee Distribution
0 GLMR0.02535825101.5
Withdraw Expired...26682092023-01-06 2:46:42499 days ago1672973202IN
1Beam: Multi Fee Distribution
0 GLMR0.00625849101.5
Get Reward26682062023-01-06 2:46:06499 days ago1672973166IN
1Beam: Multi Fee Distribution
0 GLMR0.01435636101.5
Stake26199802022-12-30 7:28:42506 days ago1672385322IN
1Beam: Multi Fee Distribution
0 GLMR0.02447591101.5
Withdraw Expired...25562162022-12-21 7:15:48515 days ago1671606948IN
1Beam: Multi Fee Distribution
0 GLMR0.0087093101.5
Get Reward25516522022-12-20 15:49:06516 days ago1671551346IN
1Beam: Multi Fee Distribution
0 GLMR0.01443756101.5
Withdraw Expired...25516492022-12-20 15:48:31516 days ago1671551311IN
1Beam: Multi Fee Distribution
0 GLMR0.01254864101.5
Stake25193752022-12-16 2:44:36520 days ago1671158676IN
1Beam: Multi Fee Distribution
0 GLMR0.01793038101.5
Withdraw25193672022-12-16 2:42:42520 days ago1671158562IN
1Beam: Multi Fee Distribution
0 GLMR0.01653069101.5
Withdraw Expired...24727602022-12-09 11:58:12527 days ago1670587092IN
1Beam: Multi Fee Distribution
0 GLMR0.00764701101.5
Get Reward24421212022-12-05 4:07:30531 days ago1670213250IN
1Beam: Multi Fee Distribution
0 GLMR0.01384043101.5
Withdraw24421192022-12-05 4:07:06531 days ago1670213226IN
1Beam: Multi Fee Distribution
0 GLMR0.02001072101.5
Get Reward24052162022-11-29 23:02:30536 days ago1669762950IN
1Beam: Multi Fee Distribution
0 GLMR0.01733366101.5
Stake24052102022-11-29 23:01:18536 days ago1669762878IN
1Beam: Multi Fee Distribution
0 GLMR0.02487348101.5
Withdraw24052052022-11-29 23:00:18536 days ago1669762818IN
1Beam: Multi Fee Distribution
0 GLMR0.01430906101.5
Withdraw Expired...24052022022-11-29 22:59:42536 days ago1669762782IN
1Beam: Multi Fee Distribution
0 GLMR0.00764701101.5
Stake24051972022-11-29 22:58:42536 days ago1669762722IN
1Beam: Multi Fee Distribution
0 GLMR0.01906839101.5
Withdraw23822662022-11-26 17:31:18540 days ago1669483878IN
1Beam: Multi Fee Distribution
0 GLMR0.01733863101.5
Withdraw Expired...23595812022-11-23 12:49:48543 days ago1669207788IN
1Beam: Multi Fee Distribution
0 GLMR0.00625849101.5
Withdraw Expired...23585562022-11-23 9:22:18543 days ago1669195338IN
1Beam: Multi Fee Distribution
0 GLMR0.0079107105
Withdraw Expired...23426372022-11-21 3:38:06545 days ago1669001886IN
1Beam: Multi Fee Distribution
0 GLMR0.00951856101.5
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MultiFeeDistribution

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 10 : MultiFeeDistribution.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.4;


import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "../interfaces/IMintableToken.sol";

// 1BEAM Staking contract for http://1beam.io/
// 1BEAM staked within this contact entitles stakers to a portion of the admin fees generated by 1BEAM' AMM contracts
// Based on EPS' MultiFeeDistribution
contract MultiFeeDistribution is ReentrancyGuard, Ownable {

    using SafeMath for uint256;
    using SafeERC20 for IERC20;
    using SafeERC20 for IMintableToken;

    /* ========== STATE VARIABLES ========== */

    struct Reward {
        uint256 periodFinish;
        uint256 rewardRate;
        uint256 lastUpdateTime;
        uint256 rewardPerTokenStored;
    }
    struct Balances {
        uint256 total;
        uint256 unlocked;
        uint256 locked;
        uint256 earned;
    }
    struct LockedBalance {
        uint256 amount;
        uint256 unlockTime;
    }
    struct RewardData {
        address token;
        uint256 amount;
    }

    IMintableToken public stakingToken;
    address[] public rewardTokens;
    mapping(address => Reward) public rewardData;

    // Duration that rewards are streamed over
    uint256 public constant rewardsDuration = 86400 * 7; // 1 week

    // Duration of lock/earned penalty period
    uint256 public constant lockDuration = rewardsDuration * 13; // 13 weeks

    // Addresses approved to call mint
    mapping(address => bool) public minters;
    // reward token -> distributor -> is approved to add rewards
    mapping(address=> mapping(address => bool)) public rewardDistributors;

    // user -> reward token -> amount
    mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid;
    mapping(address => mapping(address => uint256)) public rewards;

    uint256 public totalSupply;
    uint256 public lockedSupply;

    // Private mappings for balance data
    mapping(address => Balances) balances;
    mapping(address => LockedBalance[]) userLocks;
    mapping(address => LockedBalance[]) userEarnings;

    /* ========== CONSTRUCTOR ========== */

    constructor(
        address _stakingToken,
        address[] memory _minters
    ) Ownable() {
        stakingToken = IMintableToken(_stakingToken);
        for (uint i; i < _minters.length; i++) {
            minters[_minters[i]] = true;
        }
        // First reward MUST be the staking token or things will break
        // related to the 50% penalty and distribution to locked balances
        rewardTokens.push(_stakingToken);
        rewardData[_stakingToken].lastUpdateTime = block.timestamp;
    }

    /* ========== ADMIN CONFIGURATION ========== */

    // Add a new reward token to be distributed to stakers
    function addReward(
        address _rewardsToken,
        address _distributor
    )
        public
        onlyOwner
    {
        require(rewardData[_rewardsToken].lastUpdateTime == 0);
        rewardTokens.push(_rewardsToken);
        rewardData[_rewardsToken].lastUpdateTime = block.timestamp;
        rewardData[_rewardsToken].periodFinish = block.timestamp;
        rewardDistributors[_rewardsToken][_distributor] = true;
    }

    // Modify approval for an address to call notifyRewardAmount
    function approveRewardDistributor(
        address _rewardsToken,
        address _distributor,
        bool _approved
    ) external onlyOwner {
        require(rewardData[_rewardsToken].lastUpdateTime > 0);
        rewardDistributors[_rewardsToken][_distributor] = _approved;
    }

    /* ========== VIEWS ========== */

    function _rewardPerToken(address _rewardsToken, uint256 _supply) internal view returns (uint256) {
        if (_supply == 0) {
            return rewardData[_rewardsToken].rewardPerTokenStored;
        }
        return
            rewardData[_rewardsToken].rewardPerTokenStored.add(
                lastTimeRewardApplicable(_rewardsToken).sub(
                    rewardData[_rewardsToken].lastUpdateTime).mul(
                        rewardData[_rewardsToken].rewardRate).mul(1e18).div(_supply)
            );
    }

    function _earned(
        address _user,
        address _rewardsToken,
        uint256 _balance,
        uint256 supply
    ) internal view returns (uint256) {
        return _balance.mul(
            _rewardPerToken(_rewardsToken, supply).sub(userRewardPerTokenPaid[_user][_rewardsToken])
        ).div(1e18).add(rewards[_user][_rewardsToken]);
    }

    function lastTimeRewardApplicable(address _rewardsToken) public view returns (uint256) {
        return Math.min(block.timestamp, rewardData[_rewardsToken].periodFinish);
    }

    function rewardPerToken(address _rewardsToken) external view returns (uint256) {
        uint256 supply = _rewardsToken == address(stakingToken) ? lockedSupply : totalSupply;
        return _rewardPerToken(_rewardsToken, supply);

    }

    function getRewardForDuration(address _rewardsToken) external view returns (uint256) {
        return rewardData[_rewardsToken].rewardRate.mul(rewardsDuration);
    }

    // Address and claimable amount of all reward tokens for the given account
    function claimableRewards(address account) external view returns (RewardData[] memory _rewards) {
        _rewards = new RewardData[](rewardTokens.length);
        for (uint256 i = 0; i < _rewards.length; i++) {
            // If i == 0 this is the stakingReward, distribution is based on locked balances
            uint256 balance = i == 0 ? balances[account].locked : balances[account].total;
            uint256 supply = i == 0 ? lockedSupply : totalSupply;
            _rewards[i].token = rewardTokens[i];
            _rewards[i].amount = _earned(account, _rewards[i].token, balance, supply);
        }
        return _rewards;
    }

    // Total balance of an account, including unlocked, locked and earned tokens
    function totalBalance(address user) view external returns (uint256 amount) {
        return balances[user].total;
    }

    // Total withdrawable balance for an account to which no penalty is applied
    function unlockedBalance(address user) view external returns (uint256 amount) {
        amount = balances[user].unlocked;
        LockedBalance[] storage earnings = userEarnings[msg.sender];
        for (uint i = 0; i < earnings.length; i++) {
            if (earnings[i].unlockTime > block.timestamp) {
                break;
            }
            amount = amount.add(earnings[i].amount);
        }
        return amount;
    }

    // Information on the "earned" balances of a user
    // Earned balances may be withdrawn immediately for a 50% penalty
    function earnedBalances(
        address user
    ) view external returns (
        uint256 total,
        LockedBalance[] memory earningsData
    ) {
        LockedBalance[] storage earnings = userEarnings[user];
        uint256 idx;
        for (uint i = 0; i < earnings.length; i++) {
            if (earnings[i].unlockTime > block.timestamp) {
                if (idx == 0) {
                    earningsData = new LockedBalance[](earnings.length - i);
                }
                earningsData[idx] = earnings[i];
                idx++;
                total = total.add(earnings[i].amount);
            }
        }
        return (total, earningsData);
    }

    // Information on a user's locked balances
    function lockedBalances(
        address user
    ) view external returns (
        uint256 total,
        uint256 unlockable,
        uint256 locked,
        LockedBalance[] memory lockData
    ) {
        LockedBalance[] storage locks = userLocks[user];
        uint256 idx;
        for (uint i = 0; i < locks.length; i++) {
            if (locks[i].unlockTime > block.timestamp) {
                if (idx == 0) {
                    lockData = new LockedBalance[](locks.length - i);
                }
                lockData[idx] = locks[i];
                idx++;
                locked = locked.add(locks[i].amount);
            } else {
                unlockable = unlockable.add(locks[i].amount);
            }
        }
        return (balances[user].locked, unlockable, locked, lockData);
    }

    // Final balance received and penalty balance paid by user upon calling exit
    function withdrawableBalance(
        address user
    ) view public returns (
        uint256 amount,
        uint256 penaltyAmount
    ) {
        Balances storage bal = balances[user];
        if (bal.earned > 0) {
            uint256 amountWithoutPenalty;
            uint256 length = userEarnings[user].length;
            for (uint i = 0; i < length; i++) {
                uint256 earnedAmount = userEarnings[user][i].amount;
                if (earnedAmount == 0) continue;
                if (userEarnings[user][i].unlockTime > block.timestamp) {
                    break;
                }
                amountWithoutPenalty = amountWithoutPenalty.add(earnedAmount);
            }

            penaltyAmount = bal.earned.sub(amountWithoutPenalty).div(2);
        }
        amount = bal.unlocked.add(bal.earned).sub(penaltyAmount);
        return (amount, penaltyAmount);
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    // Stake tokens to receive rewards
    // Locked tokens cannot be withdrawn for lockDuration and are eligible to receive stakingReward rewards
    function stake(uint256 amount, bool lock) external nonReentrant updateReward(msg.sender) {
        require(amount > 0, "Cannot stake 0");
        totalSupply = totalSupply.add(amount);
        Balances storage bal = balances[msg.sender];
        bal.total = bal.total.add(amount);
        if (lock) {
            lockedSupply = lockedSupply.add(amount);
            bal.locked = bal.locked.add(amount);
            uint256 unlockTime = block.timestamp.div(rewardsDuration).mul(rewardsDuration).add(lockDuration);
            uint256 idx = userLocks[msg.sender].length;
            if (idx == 0 || userLocks[msg.sender][idx-1].unlockTime < unlockTime) {
                userLocks[msg.sender].push(LockedBalance({amount: amount, unlockTime: unlockTime}));
            } else {
                userLocks[msg.sender][idx-1].amount = userLocks[msg.sender][idx-1].amount.add(amount);
            }
        } else {
            bal.unlocked = bal.unlocked.add(amount);
        }
        stakingToken.safeTransferFrom(msg.sender, address(this), amount);
        emit Staked(msg.sender, amount);
    }

    // Mint new tokens
    // Minted tokens receive rewards normally but incur a 50% penalty when
    // withdrawn before lockDuration has passed.
    function mint(address user, uint256 amount) external updateReward(user) {
        require(minters[msg.sender]);
        totalSupply = totalSupply.add(amount);
        Balances storage bal = balances[user];
        bal.total = bal.total.add(amount);
        bal.earned = bal.earned.add(amount);
        uint256 unlockTime = block.timestamp.div(rewardsDuration).mul(rewardsDuration).add(lockDuration);
        LockedBalance[] storage earnings = userEarnings[user];
        uint256 idx = earnings.length;

        if (idx == 0 || earnings[idx-1].unlockTime < unlockTime) {
            earnings.push(LockedBalance({amount: amount, unlockTime: unlockTime}));
        } else {
            earnings[idx-1].amount = earnings[idx-1].amount.add(amount);
        }
        stakingToken.mint(address(this), amount);
        emit Staked(user, amount);
    }

    // Withdraw staked tokens
    // First withdraws unlocked tokens, then earned tokens. Withdrawing earned tokens
    // incurs a 50% penalty which is distributed based on locked balances.
    function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) {
        require(amount > 0, "Cannot withdraw 0");
        Balances storage bal = balances[msg.sender];
        uint256 penaltyAmount;

        if (amount <= bal.unlocked) {
            bal.unlocked = bal.unlocked.sub(amount);
        } else {
            uint256 remaining = amount.sub(bal.unlocked);
            require(bal.earned >= remaining, "Insufficient unlocked balance");
            bal.unlocked = 0;
            bal.earned = bal.earned.sub(remaining);
            for (uint i = 0; ; i++) {
                uint256 earnedAmount = userEarnings[msg.sender][i].amount;
                if (earnedAmount == 0) continue;
                if (penaltyAmount == 0 && userEarnings[msg.sender][i].unlockTime > block.timestamp) {
                    penaltyAmount = remaining;
                    require(bal.earned >= remaining, "Insufficient balance after penalty");
                    bal.earned = bal.earned.sub(remaining);
                    if (bal.earned == 0) {
                        delete userEarnings[msg.sender];
                        break;
                    }
                    remaining = remaining.mul(2);
                }
                if (remaining <= earnedAmount) {
                    userEarnings[msg.sender][i].amount = earnedAmount.sub(remaining);
                    break;
                } else {
                    delete userEarnings[msg.sender][i];
                    remaining = remaining.sub(earnedAmount);
                }
            }
        }

        uint256 adjustedAmount = amount.add(penaltyAmount);
        bal.total = bal.total.sub(adjustedAmount);
        totalSupply = totalSupply.sub(adjustedAmount);
        stakingToken.safeTransfer(msg.sender, amount);
        if (penaltyAmount > 0) {
            _notifyReward(address(stakingToken), penaltyAmount);
        }
        emit Withdrawn(msg.sender, amount);
    }

    // Claim all pending staking rewards
    function getReward() public nonReentrant updateReward(msg.sender) {
        for (uint i; i < rewardTokens.length; i++) {
            address _rewardsToken = rewardTokens[i];
            uint256 reward = rewards[msg.sender][_rewardsToken];
            if (reward > 0) {
                rewards[msg.sender][_rewardsToken] = 0;
                IERC20(_rewardsToken).safeTransfer(msg.sender, reward);
                emit RewardPaid(msg.sender, _rewardsToken, reward);
            }
        }
    }

    // Withdraw full unlocked balance and claim pending rewards
    function exit() external updateReward(msg.sender) {
        (uint256 amount, uint256 penaltyAmount) = withdrawableBalance(msg.sender);
        delete userEarnings[msg.sender];
        Balances storage bal = balances[msg.sender];
        bal.total = bal.total.sub(bal.unlocked).sub(bal.earned);
        bal.unlocked = 0;
        bal.earned = 0;

        totalSupply = totalSupply.sub(amount.add(penaltyAmount));
        stakingToken.safeTransfer(msg.sender, amount);
        if (penaltyAmount > 0) {
            _notifyReward(address(stakingToken), penaltyAmount);
        }
        getReward();
    }

    // Withdraw all currently locked tokens where the unlock time has passed
    function withdrawExpiredLocks() external {
        LockedBalance[] storage locks = userLocks[msg.sender];
        Balances storage bal = balances[msg.sender];
        uint256 amount;
        uint256 length = locks.length;
        if (locks[length-1].unlockTime <= block.timestamp) {
            amount = bal.locked;
            delete userLocks[msg.sender];
        } else {
            for (uint i = 0; i < length; i++) {
                if (locks[i].unlockTime > block.timestamp) break;
                amount = amount.add(locks[i].amount);
                delete locks[i];
            }
        }
        bal.locked = bal.locked.sub(amount);
        bal.total = bal.total.sub(amount);
        totalSupply = totalSupply.sub(amount);
        lockedSupply = lockedSupply.sub(amount);
        stakingToken.safeTransfer(msg.sender, amount);
    }

    /* ========== RESTRICTED FUNCTIONS ========== */

    function _notifyReward(address _rewardsToken, uint256 reward) internal {
        if (block.timestamp >= rewardData[_rewardsToken].periodFinish) {
            rewardData[_rewardsToken].rewardRate = reward.div(rewardsDuration);
        } else {
            uint256 remaining = rewardData[_rewardsToken].periodFinish.sub(block.timestamp);
            uint256 leftover = remaining.mul(rewardData[_rewardsToken].rewardRate);
            rewardData[_rewardsToken].rewardRate = reward.add(leftover).div(rewardsDuration);
        }

        rewardData[_rewardsToken].lastUpdateTime = block.timestamp;
        rewardData[_rewardsToken].periodFinish = block.timestamp.add(rewardsDuration);

    }

    function notifyRewardAmount(address _rewardsToken, uint256 reward) external updateReward(address(0)) {
        require(rewardDistributors[_rewardsToken][msg.sender]);
        require(reward > 0, "No reward");
        // handle the transfer of reward tokens via `transferFrom` to reduce the number
        // of transactions required and ensure correctness of the reward amount
        IERC20(_rewardsToken).safeTransferFrom(msg.sender, address(this), reward);
        _notifyReward(_rewardsToken, reward);
        emit RewardAdded(reward);
    }

    // Added to support recovering LP Rewards from other systems such as BAL to be distributed to holders
    function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner {
        require(tokenAddress != address(stakingToken), "Cannot withdraw staking token");
        require(rewardData[tokenAddress].lastUpdateTime == 0, "Cannot withdraw reward token");
        IERC20(tokenAddress).safeTransfer(owner(), tokenAmount);
        emit Recovered(tokenAddress, tokenAmount);
    }

    /* ========== MODIFIERS ========== */

    modifier updateReward(address account) {
        address token = address(stakingToken);
        uint256 balance;
        uint256 supply = lockedSupply;
        rewardData[token].rewardPerTokenStored = _rewardPerToken(token, supply);
        rewardData[token].lastUpdateTime = lastTimeRewardApplicable(token);
        if (account != address(0)) {
            // Special case, use the locked balances and supply for stakingReward rewards
            rewards[account][token] = _earned(account, token, balances[account].locked, supply);
            userRewardPerTokenPaid[account][token] = rewardData[token].rewardPerTokenStored;
            balance = balances[account].total;
        }

        supply = totalSupply;
        for (uint i = 1; i < rewardTokens.length; i++) {
            token = rewardTokens[i];
            rewardData[token].rewardPerTokenStored = _rewardPerToken(token, supply);
            rewardData[token].lastUpdateTime = lastTimeRewardApplicable(token);
            if (account != address(0)) {
                rewards[account][token] = _earned(account, token, balance, supply);
                userRewardPerTokenPaid[account][token] = rewardData[token].rewardPerTokenStored;
            }
        }
        _;
    }

    /* ========== EVENTS ========== */

    event RewardAdded(uint256 reward);
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event RewardPaid(address indexed user, address indexed rewardsToken, uint256 reward);
    event RewardsDurationUpdated(address token, uint256 newDuration);
    event Recovered(address token, uint256 amount);
    event MinterChanged(address indexed minter, bool added);
}

File 1 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_msgSender());
    }

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

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

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

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

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 1 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

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 make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 1 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 1 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 1 of 10 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 1 of 10 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

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

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        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 / b + (a % b == 0 ? 0 : 1);
    }
}

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

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

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

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

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

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

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

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

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

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

File 1 of 10 : IMintableToken.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.4;

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

interface IMintableToken is IERC20 {
    function mint(address _receiver, uint256 _amount) external returns (bool);
    function setMinter(address _minter) external returns (bool);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_stakingToken","type":"address"},{"internalType":"address[]","name":"_minters","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"bool","name":"added","type":"bool"}],"name":"MinterChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"rewardsToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"newDuration","type":"uint256"}],"name":"RewardsDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_distributor","type":"address"}],"name":"addReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"address","name":"_distributor","type":"address"},{"internalType":"bool","name":"_approved","type":"bool"}],"name":"approveRewardDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"claimableRewards","outputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct MultiFeeDistribution.RewardData[]","name":"_rewards","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"earnedBalances","outputs":[{"internalType":"uint256","name":"total","type":"uint256"},{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"unlockTime","type":"uint256"}],"internalType":"struct MultiFeeDistribution.LockedBalance[]","name":"earningsData","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"}],"name":"getRewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"}],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"lockedBalances","outputs":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"unlockable","type":"uint256"},{"internalType":"uint256","name":"locked","type":"uint256"},{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"unlockTime","type":"uint256"}],"internalType":"struct MultiFeeDistribution.LockedBalance[]","name":"lockData","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minters","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"},{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardData","outputs":[{"internalType":"uint256","name":"periodFinish","type":"uint256"},{"internalType":"uint256","name":"rewardRate","type":"uint256"},{"internalType":"uint256","name":"lastUpdateTime","type":"uint256"},{"internalType":"uint256","name":"rewardPerTokenStored","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"rewardDistributors","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardsToken","type":"address"}],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"lock","type":"bool"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IMintableToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"unlockedBalance","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawExpiredLocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"withdrawableBalance","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"penaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b506040516200374e3803806200374e8339810160408190526200003491620001b0565b6001600055620000443362000141565b600280546001600160a01b0319166001600160a01b03841617905560005b8151811015620000da576001600560008484815181106200009357634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580620000d1816200029b565b91505062000062565b505060038054600181019091557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b039092166001600160a01b031990921682179055600090815260046020526040902042600290910155620002d9565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b0381168114620001ab57600080fd5b919050565b60008060408385031215620001c3578182fd5b620001ce8362000193565b602084810151919350906001600160401b0380821115620001ed578384fd5b818601915086601f83011262000201578384fd5b815181811115620002165762000216620002c3565b8060051b604051601f19603f830116810181811085821117156200023e576200023e620002c3565b604052828152858101935084860182860187018b10156200025d578788fd5b8795505b838610156200028a57620002758162000193565b85526001959095019493860193860162000261565b508096505050505050509250929050565b6000600019821415620002bc57634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b61346580620002e96000396000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c8063715018a61161011a578063bcd11014116100ad578063e70b9e271161007c578063e70b9e27146104d1578063e9fad8ee146104fc578063f122977714610504578063f2fde38b14610517578063f46eccc41461052a57600080fd5b8063bcd1101414610474578063ca5c7b9114610487578063dc01f60d14610490578063df379876146104b057600080fd5b80638da5cb5b116100e95780638da5cb5b14610435578063a01c77bc14610446578063abe50f191461044e578063b66503cf1461046157600080fd5b8063715018a6146103dc57806372f702f3146103e45780637bb7bed11461040f5780638980f11f1461042257600080fd5b806340b47e1a11610192578063638634ee11610161578063638634ee146103625780636724c910146103755780636eacd398146103885780637035ab98146103b157600080fd5b806340b47e1a146102d457806340c10f19146102e757806348e5d9f8146102fa5780635e0fac2e1461034f57600080fd5b80632e1a7d4d116101ce5780632e1a7d4d1461026f578063386a95251461028457806339fc97131461028e5780633d18b912146102cc57600080fd5b806302b6293814610200578063045544431461022d5780630483a7f61461024357806318160ddd14610266575b600080fd5b61021361020e366004613098565b61054d565b604080519283526020830191909152015b60405180910390f35b6102356106be565b604051908152602001610224565b610256610251366004613098565b6106cf565b6040516102249493929190613327565b61023560095481565b61028261027d36600461316f565b6108f4565b005b61023562093a8081565b6102bc61029c3660046130b2565b600660209081526000928352604080842090915290825290205460ff1681565b6040519015158152602001610224565b610282610ed9565b6102826102e23660046130b2565b6111f8565b6102826102f536600461312a565b6112cf565b61032f610308366004613098565b60046020526000908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610224565b61023561035d366004613098565b61175c565b610235610370366004613098565b611825565b6102826103833660046130e4565b61184f565b610235610396366004613098565b6001600160a01b03166000908152600b602052604090205490565b6102356103bf3660046130b2565b600760209081526000928352604080842090915290825290205481565b6102826118d8565b6002546103f7906001600160a01b031681565b6040516001600160a01b039091168152602001610224565b6103f761041d36600461316f565b61190e565b61028261043036600461312a565b611938565b6001546001600160a01b03166103f7565b610282611a95565b61028261045c366004613187565b611c33565b61028261046f36600461312a565b61209b565b610235610482366004613098565b61235c565b610235600a5481565b6104a361049e366004613098565b612385565b6040516102249190613217565b6104c36104be366004613098565b612565565b60405161022492919061330e565b6102356104df3660046130b2565b600860209081526000928352604080842090915290825290205481565b61028261270c565b610235610512366004613098565b6129c9565b610282610525366004613098565b612a02565b6102bc610538366004613098565b60056020526000908152604090205460ff1681565b6001600160a01b0381166000908152600b60205260408120600381015482919015610691576001600160a01b0384166000908152600d6020526040812054815b81811015610669576001600160a01b0387166000908152600d602052604081208054839081106105cd57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160000154905080600014156105f05750610657565b6001600160a01b0388166000908152600d6020526040902080544291908490811061062b57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016001015411156106495750610669565b6106538482612a9d565b9350505b80610661816133f0565b91505061058d565b5061068c6002610686848660030154612aa990919063ffffffff16565b90612ab5565b935050505b6106b6826106b083600301548460010154612a9d90919063ffffffff16565b90612aa9565b925050915091565b6106cc62093a80600d61338e565b81565b6001600160a01b0381166000908152600c602052604081208190819060609082805b82548110156108cc574283828154811061071b57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010154111561087c57816107b45782546107459082906133ad565b67ffffffffffffffff81111561076b57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156107b057816020015b60408051808201909152600080825260208201528152602001906001900390816107895790505b5093505b8281815481106107d457634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016040518060400160405290816000820154815260200160018201548152505084838151811061082157634e487b7160e01b600052603260045260246000fd5b60200260200101819052508180610837906133f0565b92505061087583828154811061085d57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600290910201548690612a9d565b94506108ba565b6108b783828154811061089f57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600290910201548790612a9d565b95505b806108c4816133f0565b9150506106f1565b5050506001600160a01b0385166000908152600b602052604090206002015493509193509193565b600260005414156109205760405162461bcd60e51b8152600401610917906132d7565b60405180910390fd5b600260008181559054600a5433926001600160a01b0390921691906109458382612ac1565b6001600160a01b03841660009081526004602052604090206003015561096a83611825565b6001600160a01b03808516600090815260046020526040902060020191909155841615610a16576001600160a01b0384166000908152600b60205260409020600201546109bb908590859084612b56565b6001600160a01b0380861660008181526008602090815260408083209489168084529482528083209590955560048152848220600301548383526007825285832094835293815284822093909355908152600b909152205491505b5060095460015b600354811015610b205760038181548110610a4857634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03169350610a698483612ac1565b6001600160a01b038516600090815260046020526040902060030155610a8e84611825565b6001600160a01b03808616600090815260046020526040902060020191909155851615610b0e57610ac185858585612b56565b6001600160a01b038087166000818152600860209081526040808320948a168084529482528083209590955560048152848220600301549282526007815284822093825292909252919020555b80610b18816133f0565b915050610a1d565b5060008511610b655760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b6044820152606401610917565b336000908152600b6020526040812060018101549091908711610b9b576001820154610b919088612aa9565b6001830155610e35565b6000610bb4836001015489612aa990919063ffffffff16565b90508083600301541015610c0a5760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e7420756e6c6f636b65642062616c616e63650000006044820152606401610917565b600060018401556003830154610c209082612aa9565b600384015560005b336000908152600d60205260408120805483908110610c5757634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016000015490508060001415610c7a5750610e20565b83158015610cc95750336000908152600d60205260409020805442919084908110610cb557634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010154115b15610d76578293508285600301541015610d305760405162461bcd60e51b815260206004820152602260248201527f496e73756666696369656e742062616c616e63652061667465722070656e616c604482015261747960f01b6064820152608401610917565b6003850154610d3f9084612aa9565b60038601819055610d6857336000908152600d60205260408120610d6291613041565b50610e32565b610d73836002612bc8565b92505b808311610dcd57610d878184612aa9565b336000908152600d60205260409020805484908110610db657634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102015550610e32565b336000908152600d60205260409020805483908110610dfc57634e487b7160e01b600052603260045260246000fd5b60009182526020822060029091020181815560010155610e1c8382612aa9565b9250505b80610e2a816133f0565b915050610c28565b50505b6000610e418883612a9d565b8354909150610e509082612aa9565b8355600954610e5f9082612aa9565b600955600254610e79906001600160a01b0316338a612bd4565b8115610e9557600254610e95906001600160a01b031683612c3c565b60405188815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a250506001600055505050505050565b60026000541415610efc5760405162461bcd60e51b8152600401610917906132d7565b600260008181559054600a5433926001600160a01b039092169190610f218382612ac1565b6001600160a01b038416600090815260046020526040902060030155610f4683611825565b6001600160a01b03808516600090815260046020526040902060020191909155841615610ff2576001600160a01b0384166000908152600b6020526040902060020154610f97908590859084612b56565b6001600160a01b0380861660008181526008602090815260408083209489168084529482528083209590955560048152848220600301548383526007825285832094835293815284822093909355908152600b909152205491505b5060095460015b6003548110156110fc576003818154811061102457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031693506110458483612ac1565b6001600160a01b03851660009081526004602052604090206003015561106a84611825565b6001600160a01b038086166000908152600460205260409020600201919091558516156110ea5761109d85858585612b56565b6001600160a01b038087166000818152600860209081526040808320948a168084529482528083209590955560048152848220600301549282526007815284822093825292909252919020555b806110f4816133f0565b915050610ff9565b5060005b6003548110156111ec5760006003828154811061112d57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101543383526008825260408084206001600160a01b039092168085529190925291205490915080156111d7573360008181526008602090815260408083206001600160a01b03871680855292528220919091556111969183612bd4565b6040518181526001600160a01b0383169033907f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e9060200160405180910390a35b505080806111e4906133f0565b915050611100565b50506001600055505050565b6001546001600160a01b031633146112225760405162461bcd60e51b8152600401610917906132a2565b6001600160a01b0382166000908152600460205260409020600201541561124857600080fd5b6003805460018082019092557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b0319166001600160a01b039485169081179091556000908152600460209081526040808320426002820181905590556006825280832094909516825292909252919020805460ff19169091179055565b600254600a5483916001600160a01b0316906000906112ee8382612ac1565b6001600160a01b03841660009081526004602052604090206003015561131383611825565b6001600160a01b038085166000908152600460205260409020600201919091558416156113bf576001600160a01b0384166000908152600b6020526040902060020154611364908590859084612b56565b6001600160a01b0380861660008181526008602090815260408083209489168084529482528083209590955560048152848220600301548383526007825285832094835293815284822093909355908152600b909152205491505b5060095460015b6003548110156114c957600381815481106113f157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031693506114128483612ac1565b6001600160a01b03851660009081526004602052604090206003015561143784611825565b6001600160a01b038086166000908152600460205260409020600201919091558516156114b75761146a85858585612b56565b6001600160a01b038087166000818152600860209081526040808320948a168084529482528083209590955560048152848220600301549282526007815284822093825292909252919020555b806114c1816133f0565b9150506113c6565b503360009081526005602052604090205460ff166114e657600080fd5b6009546114f39086612a9d565b6009556001600160a01b0386166000908152600b60205260409020805461151a9087612a9d565b8155600381015461152b9087612a9d565b6003820155600061156061154362093a80600d61338e565b61155a62093a806115544282612ab5565b90612bc8565b90612a9d565b6001600160a01b0389166000908152600d602052604090208054919250908015806115c5575082826115936001846133ad565b815481106115b157634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010154105b15611607576040805180820190915289815260208082018581528454600181810187556000878152939093209351600290910290930192835551910155611688565b61164c89836116176001856133ad565b8154811061163557634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102015490612a9d565b826116586001846133ad565b8154811061167657634e487b7160e01b600052603260045260246000fd5b60009182526020909120600290910201555b6002546040516340c10f1960e01b8152306004820152602481018b90526001600160a01b03909116906340c10f1990604401602060405180830381600087803b1580156116d457600080fd5b505af11580156116e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061170c9190613153565b50896001600160a01b03167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d8a60405161174891815260200190565b60405180910390a250505050505050505050565b6001600160a01b0381166000908152600b6020908152604080832060010154338452600d909252822090915b815481101561181e57428282815481106117b257634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016001015411156117cf5761181e565b61180a8282815481106117f257634e487b7160e01b600052603260045260246000fd5b60009182526020909120600290910201548490612a9d565b925080611816816133f0565b915050611788565b5050919050565b6001600160a01b038116600090815260046020526040812054611849904290612d57565b92915050565b6001546001600160a01b031633146118795760405162461bcd60e51b8152600401610917906132a2565b6001600160a01b03831660009081526004602052604090206002015461189e57600080fd5b6001600160a01b03928316600090815260066020908152604080832094909516825292909252919020805460ff1916911515919091179055565b6001546001600160a01b031633146119025760405162461bcd60e51b8152600401610917906132a2565b61190c6000612d6d565b565b6003818154811061191e57600080fd5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b031633146119625760405162461bcd60e51b8152600401610917906132a2565b6002546001600160a01b03838116911614156119c05760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f74207769746864726177207374616b696e6720746f6b656e0000006044820152606401610917565b6001600160a01b03821660009081526004602052604090206002015415611a295760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742077697468647261772072657761726420746f6b656e000000006044820152606401610917565b611a4f611a3e6001546001600160a01b031690565b6001600160a01b0384169083612bd4565b604080516001600160a01b0384168152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28910160405180910390a15050565b336000908152600c60209081526040808320600b90925282208154919290914284611ac16001846133ad565b81548110611adf57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016001015411611b1c576002830154336000908152600c60205260408120919350611b179190613041565b611bd4565b60005b81811015611bd25742858281548110611b4857634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201600101541115611b6557611bd2565b611b888582815481106117f257634e487b7160e01b600052603260045260246000fd5b9250848181548110611baa57634e487b7160e01b600052603260045260246000fd5b6000918252602082206002909102018181556001015580611bca816133f0565b915050611b1f565b505b6002830154611be39083612aa9565b60028401558254611bf49083612aa9565b8355600954611c039083612aa9565b600955600a54611c139083612aa9565b600a55600254611c2d906001600160a01b03163384612bd4565b50505050565b60026000541415611c565760405162461bcd60e51b8152600401610917906132d7565b600260008181559054600a5433926001600160a01b039092169190611c7b8382612ac1565b6001600160a01b038416600090815260046020526040902060030155611ca083611825565b6001600160a01b03808516600090815260046020526040902060020191909155841615611d4c576001600160a01b0384166000908152600b6020526040902060020154611cf1908590859084612b56565b6001600160a01b0380861660008181526008602090815260408083209489168084529482528083209590955560048152848220600301548383526007825285832094835293815284822093909355908152600b909152205491505b5060095460015b600354811015611e565760038181548110611d7e57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03169350611d9f8483612ac1565b6001600160a01b038516600090815260046020526040902060030155611dc484611825565b6001600160a01b03808616600090815260046020526040902060020191909155851615611e4457611df785858585612b56565b6001600160a01b038087166000818152600860209081526040808320948a168084529482528083209590955560048152848220600301549282526007815284822093825292909252919020555b80611e4e816133f0565b915050611d53565b5060008611611e985760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b6044820152606401610917565b600954611ea59087612a9d565b600955336000908152600b602052604090208054611ec39088612a9d565b8155851561202b57600a54611ed89088612a9d565b600a556002810154611eea9088612a9d565b60028201556000611f0261154362093a80600d61338e565b336000908152600c6020526040902054909150801580611f6b5750336000908152600c602052604090208290611f396001846133ad565b81548110611f5757634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010154105b15611fba57336000908152600c6020908152604080832081518083019092528c825281830186815281546001818101845592865293909420915160029093029091019182559151910155612024565b336000908152600c60205260409020611fda908a906116176001856133ad565b336000908152600c60205260409020611ff46001846133ad565b8154811061201257634e487b7160e01b600052603260045260246000fd5b60009182526020909120600290910201555b5050612040565b600181015461203a9088612a9d565b60018201555b600254612058906001600160a01b031633308a612dbf565b60405187815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d9060200160405180910390a2505060016000555050505050565b600254600a546000916001600160a01b03169082906120ba8382612ac1565b6001600160a01b0384166000908152600460205260409020600301556120df83611825565b6001600160a01b0380851660009081526004602052604090206002019190915584161561218b576001600160a01b0384166000908152600b6020526040902060020154612130908590859084612b56565b6001600160a01b0380861660008181526008602090815260408083209489168084529482528083209590955560048152848220600301548383526007825285832094835293815284822093909355908152600b909152205491505b5060095460015b60035481101561229557600381815481106121bd57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031693506121de8483612ac1565b6001600160a01b03851660009081526004602052604090206003015561220384611825565b6001600160a01b038086166000908152600460205260409020600201919091558516156122835761223685858585612b56565b6001600160a01b038087166000818152600860209081526040808320948a168084529482528083209590955560048152848220600301549282526007815284822093825292909252919020555b8061228d816133f0565b915050612192565b506001600160a01b038616600090815260066020908152604080832033845290915290205460ff166122c657600080fd5b600085116123025760405162461bcd60e51b8152602060048201526009602482015268139bc81c995dd85c9960ba1b6044820152606401610917565b6123176001600160a01b038716333088612dbf565b6123218686612c3c565b6040518581527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a1505050505050565b6001600160a01b0381166000908152600460205260408120600101546118499062093a80612bc8565b60035460609067ffffffffffffffff8111156123b157634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156123f657816020015b60408051808201909152600080825260208201528152602001906001900390816123cf5790505b50905060005b815181101561255f576000811561242b576001600160a01b0384166000908152600b6020526040902054612448565b6001600160a01b0384166000908152600b60205260409020600201545b90506000821561245a5760095461245e565b600a545b90506003838154811061248157634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b03168484815181106124bf57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001906001600160a01b031690816001600160a01b03168152505061251a8585858151811061250757634e487b7160e01b600052603260045260246000fd5b6020026020010151600001518484612b56565b84848151811061253a57634e487b7160e01b600052603260045260246000fd5b6020026020010151602001818152505050508080612557906133f0565b9150506123fc565b50919050565b6001600160a01b0381166000908152600d6020526040812060609082805b825481101561270457428382815481106125ad57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016001015411156126f257816126465782546125d79082906133ad565b67ffffffffffffffff8111156125fd57634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561264257816020015b604080518082019091526000808252602082015281526020019060019003908161261b5790505b5093505b82818154811061266657634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201604051806040016040529081600082015481526020016001820154815250508483815181106126b357634e487b7160e01b600052603260045260246000fd5b602002602001018190525081806126c9906133f0565b9250506126ef83828154811061085d57634e487b7160e01b600052603260045260246000fd5b94505b806126fc816133f0565b915050612583565b505050915091565b600254600a5433916001600160a01b03169060009061272b8382612ac1565b6001600160a01b03841660009081526004602052604090206003015561275083611825565b6001600160a01b038085166000908152600460205260409020600201919091558416156127fc576001600160a01b0384166000908152600b60205260409020600201546127a1908590859084612b56565b6001600160a01b0380861660008181526008602090815260408083209489168084529482528083209590955560048152848220600301548383526007825285832094835293815284822093909355908152600b909152205491505b5060095460015b600354811015612906576003818154811061282e57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316935061284f8483612ac1565b6001600160a01b03851660009081526004602052604090206003015561287484611825565b6001600160a01b038086166000908152600460205260409020600201919091558516156128f4576128a785858585612b56565b6001600160a01b038087166000818152600860209081526040808320948a168084529482528083209590955560048152848220600301549282526007815284822093825292909252919020555b806128fe816133f0565b915050612803565b506000806129133361054d565b336000908152600d602052604081209294509092506129329190613041565b336000908152600b6020526040902060038101546001820154825461295c92916106b09190612aa9565b815560006001820181905560038201556129826129798484612a9d565b60095490612aa9565b60095560025461299c906001600160a01b03163385612bd4565b81156129b8576002546129b8906001600160a01b031683612c3c565b6129c0610ed9565b50505050505050565b60025460009081906001600160a01b038481169116146129eb576009546129ef565b600a545b90506129fb8382612ac1565b9392505050565b6001546001600160a01b03163314612a2c5760405162461bcd60e51b8152600401610917906132a2565b6001600160a01b038116612a915760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610917565b612a9a81612d6d565b50565b60006129fb8284613356565b60006129fb82846133ad565b60006129fb828461336e565b600081612aea57506001600160a01b038216600090815260046020526040902060030154611849565b6001600160a01b038316600090815260046020526040902060018101546002909101546129fb91612b3491859161068691670de0b6b3a7640000916115549182906106b08c611825565b6001600160a01b03851660009081526004602052604090206003015490612a9d565b6001600160a01b038085166000818152600860209081526040808320948816808452948252808320549383526007825280832094835293905291822054612bbf919061155a90670de0b6b3a76400009061068690612bb8906106b08b8a612ac1565b8890612bc8565b95945050505050565b60006129fb828461338e565b6040516001600160a01b038316602482015260448101829052612c3790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612df7565b505050565b6001600160a01b0382166000908152600460205260409020544210612c8957612c688162093a80612ab5565b6001600160a01b038316600090815260046020526040902060010155612d09565b6001600160a01b038216600090815260046020526040812054612cac9042612aa9565b6001600160a01b03841660009081526004602052604081206001015491925090612cd7908390612bc8565b9050612cea62093a806106868584612a9d565b6001600160a01b03851660009081526004602052604090206001015550505b6001600160a01b0382166000908152600460205260409020426002909101819055612d379062093a80612a9d565b6001600160a01b0390921660009081526004602052604090209190915550565b6000818310612d6657816129fb565b5090919050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052611c2d9085906323b872dd60e01b90608401612c00565b6000612e4c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612ec99092919063ffffffff16565b805190915015612c375780806020019051810190612e6a9190613153565b612c375760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610917565b6060612ed88484600085612ee0565b949350505050565b606082471015612f415760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610917565b843b612f8f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610917565b600080866001600160a01b03168587604051612fab91906131fb565b60006040518083038185875af1925050503d8060008114612fe8576040519150601f19603f3d011682016040523d82523d6000602084013e612fed565b606091505b5091509150612ffd828286613008565b979650505050505050565b606083156130175750816129fb565b8251156130275782518084602001fd5b8160405162461bcd60e51b8152600401610917919061326f565b5080546000825560020290600052602060002090810190612a9a91905b80821115613078576000808255600182015560020161305e565b5090565b80356001600160a01b038116811461309357600080fd5b919050565b6000602082840312156130a9578081fd5b6129fb8261307c565b600080604083850312156130c4578081fd5b6130cd8361307c565b91506130db6020840161307c565b90509250929050565b6000806000606084860312156130f8578081fd5b6131018461307c565b925061310f6020850161307c565b9150604084013561311f81613421565b809150509250925092565b6000806040838503121561313c578182fd5b6131458361307c565b946020939093013593505050565b600060208284031215613164578081fd5b81516129fb81613421565b600060208284031215613180578081fd5b5035919050565b60008060408385031215613199578182fd5b8235915060208301356131ab81613421565b809150509250929050565b6000815180845260208085019450808401835b838110156131f05781518051885283015183880152604090960195908201906001016131c9565b509495945050505050565b6000825161320d8184602087016133c4565b9190910192915050565b602080825282518282018190526000919060409081850190868401855b8281101561326257815180516001600160a01b03168552860151868501529284019290850190600101613234565b5091979650505050505050565b602081526000825180602084015261328e8160408501602087016133c4565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b828152604060208201526000612ed860408301846131b6565b84815283602082015282604082015260806060820152600061334c60808301846131b6565b9695505050505050565b600082198211156133695761336961340b565b500190565b60008261338957634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156133a8576133a861340b565b500290565b6000828210156133bf576133bf61340b565b500390565b60005b838110156133df5781810151838201526020016133c7565b83811115611c2d5750506000910152565b60006000198214156134045761340461340b565b5060010190565b634e487b7160e01b600052601160045260246000fd5b8015158114612a9a57600080fdfea2646970667358221220db87564e76e5aa1cce462e78a7466a1bc7b29674fc5d5e94fa507997527a241c64736f6c6343000804003300000000000000000000000019d2f0cf1fc41de2b8fd4a98065ab9284e05cf2900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000265f223011521a6cb222b1f828b04889a6bf50b30000000000000000000000006d356f08e49331042d9b19a7289059465e6021f8

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c8063715018a61161011a578063bcd11014116100ad578063e70b9e271161007c578063e70b9e27146104d1578063e9fad8ee146104fc578063f122977714610504578063f2fde38b14610517578063f46eccc41461052a57600080fd5b8063bcd1101414610474578063ca5c7b9114610487578063dc01f60d14610490578063df379876146104b057600080fd5b80638da5cb5b116100e95780638da5cb5b14610435578063a01c77bc14610446578063abe50f191461044e578063b66503cf1461046157600080fd5b8063715018a6146103dc57806372f702f3146103e45780637bb7bed11461040f5780638980f11f1461042257600080fd5b806340b47e1a11610192578063638634ee11610161578063638634ee146103625780636724c910146103755780636eacd398146103885780637035ab98146103b157600080fd5b806340b47e1a146102d457806340c10f19146102e757806348e5d9f8146102fa5780635e0fac2e1461034f57600080fd5b80632e1a7d4d116101ce5780632e1a7d4d1461026f578063386a95251461028457806339fc97131461028e5780633d18b912146102cc57600080fd5b806302b6293814610200578063045544431461022d5780630483a7f61461024357806318160ddd14610266575b600080fd5b61021361020e366004613098565b61054d565b604080519283526020830191909152015b60405180910390f35b6102356106be565b604051908152602001610224565b610256610251366004613098565b6106cf565b6040516102249493929190613327565b61023560095481565b61028261027d36600461316f565b6108f4565b005b61023562093a8081565b6102bc61029c3660046130b2565b600660209081526000928352604080842090915290825290205460ff1681565b6040519015158152602001610224565b610282610ed9565b6102826102e23660046130b2565b6111f8565b6102826102f536600461312a565b6112cf565b61032f610308366004613098565b60046020526000908152604090208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610224565b61023561035d366004613098565b61175c565b610235610370366004613098565b611825565b6102826103833660046130e4565b61184f565b610235610396366004613098565b6001600160a01b03166000908152600b602052604090205490565b6102356103bf3660046130b2565b600760209081526000928352604080842090915290825290205481565b6102826118d8565b6002546103f7906001600160a01b031681565b6040516001600160a01b039091168152602001610224565b6103f761041d36600461316f565b61190e565b61028261043036600461312a565b611938565b6001546001600160a01b03166103f7565b610282611a95565b61028261045c366004613187565b611c33565b61028261046f36600461312a565b61209b565b610235610482366004613098565b61235c565b610235600a5481565b6104a361049e366004613098565b612385565b6040516102249190613217565b6104c36104be366004613098565b612565565b60405161022492919061330e565b6102356104df3660046130b2565b600860209081526000928352604080842090915290825290205481565b61028261270c565b610235610512366004613098565b6129c9565b610282610525366004613098565b612a02565b6102bc610538366004613098565b60056020526000908152604090205460ff1681565b6001600160a01b0381166000908152600b60205260408120600381015482919015610691576001600160a01b0384166000908152600d6020526040812054815b81811015610669576001600160a01b0387166000908152600d602052604081208054839081106105cd57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160000154905080600014156105f05750610657565b6001600160a01b0388166000908152600d6020526040902080544291908490811061062b57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016001015411156106495750610669565b6106538482612a9d565b9350505b80610661816133f0565b91505061058d565b5061068c6002610686848660030154612aa990919063ffffffff16565b90612ab5565b935050505b6106b6826106b083600301548460010154612a9d90919063ffffffff16565b90612aa9565b925050915091565b6106cc62093a80600d61338e565b81565b6001600160a01b0381166000908152600c602052604081208190819060609082805b82548110156108cc574283828154811061071b57634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010154111561087c57816107b45782546107459082906133ad565b67ffffffffffffffff81111561076b57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156107b057816020015b60408051808201909152600080825260208201528152602001906001900390816107895790505b5093505b8281815481106107d457634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016040518060400160405290816000820154815260200160018201548152505084838151811061082157634e487b7160e01b600052603260045260246000fd5b60200260200101819052508180610837906133f0565b92505061087583828154811061085d57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600290910201548690612a9d565b94506108ba565b6108b783828154811061089f57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600290910201548790612a9d565b95505b806108c4816133f0565b9150506106f1565b5050506001600160a01b0385166000908152600b602052604090206002015493509193509193565b600260005414156109205760405162461bcd60e51b8152600401610917906132d7565b60405180910390fd5b600260008181559054600a5433926001600160a01b0390921691906109458382612ac1565b6001600160a01b03841660009081526004602052604090206003015561096a83611825565b6001600160a01b03808516600090815260046020526040902060020191909155841615610a16576001600160a01b0384166000908152600b60205260409020600201546109bb908590859084612b56565b6001600160a01b0380861660008181526008602090815260408083209489168084529482528083209590955560048152848220600301548383526007825285832094835293815284822093909355908152600b909152205491505b5060095460015b600354811015610b205760038181548110610a4857634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03169350610a698483612ac1565b6001600160a01b038516600090815260046020526040902060030155610a8e84611825565b6001600160a01b03808616600090815260046020526040902060020191909155851615610b0e57610ac185858585612b56565b6001600160a01b038087166000818152600860209081526040808320948a168084529482528083209590955560048152848220600301549282526007815284822093825292909252919020555b80610b18816133f0565b915050610a1d565b5060008511610b655760405162461bcd60e51b8152602060048201526011602482015270043616e6e6f74207769746864726177203607c1b6044820152606401610917565b336000908152600b6020526040812060018101549091908711610b9b576001820154610b919088612aa9565b6001830155610e35565b6000610bb4836001015489612aa990919063ffffffff16565b90508083600301541015610c0a5760405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e7420756e6c6f636b65642062616c616e63650000006044820152606401610917565b600060018401556003830154610c209082612aa9565b600384015560005b336000908152600d60205260408120805483908110610c5757634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016000015490508060001415610c7a5750610e20565b83158015610cc95750336000908152600d60205260409020805442919084908110610cb557634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010154115b15610d76578293508285600301541015610d305760405162461bcd60e51b815260206004820152602260248201527f496e73756666696369656e742062616c616e63652061667465722070656e616c604482015261747960f01b6064820152608401610917565b6003850154610d3f9084612aa9565b60038601819055610d6857336000908152600d60205260408120610d6291613041565b50610e32565b610d73836002612bc8565b92505b808311610dcd57610d878184612aa9565b336000908152600d60205260409020805484908110610db657634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102015550610e32565b336000908152600d60205260409020805483908110610dfc57634e487b7160e01b600052603260045260246000fd5b60009182526020822060029091020181815560010155610e1c8382612aa9565b9250505b80610e2a816133f0565b915050610c28565b50505b6000610e418883612a9d565b8354909150610e509082612aa9565b8355600954610e5f9082612aa9565b600955600254610e79906001600160a01b0316338a612bd4565b8115610e9557600254610e95906001600160a01b031683612c3c565b60405188815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a250506001600055505050505050565b60026000541415610efc5760405162461bcd60e51b8152600401610917906132d7565b600260008181559054600a5433926001600160a01b039092169190610f218382612ac1565b6001600160a01b038416600090815260046020526040902060030155610f4683611825565b6001600160a01b03808516600090815260046020526040902060020191909155841615610ff2576001600160a01b0384166000908152600b6020526040902060020154610f97908590859084612b56565b6001600160a01b0380861660008181526008602090815260408083209489168084529482528083209590955560048152848220600301548383526007825285832094835293815284822093909355908152600b909152205491505b5060095460015b6003548110156110fc576003818154811061102457634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031693506110458483612ac1565b6001600160a01b03851660009081526004602052604090206003015561106a84611825565b6001600160a01b038086166000908152600460205260409020600201919091558516156110ea5761109d85858585612b56565b6001600160a01b038087166000818152600860209081526040808320948a168084529482528083209590955560048152848220600301549282526007815284822093825292909252919020555b806110f4816133f0565b915050610ff9565b5060005b6003548110156111ec5760006003828154811061112d57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101543383526008825260408084206001600160a01b039092168085529190925291205490915080156111d7573360008181526008602090815260408083206001600160a01b03871680855292528220919091556111969183612bd4565b6040518181526001600160a01b0383169033907f540798df468d7b23d11f156fdb954cb19ad414d150722a7b6d55ba369dea792e9060200160405180910390a35b505080806111e4906133f0565b915050611100565b50506001600055505050565b6001546001600160a01b031633146112225760405162461bcd60e51b8152600401610917906132a2565b6001600160a01b0382166000908152600460205260409020600201541561124857600080fd5b6003805460018082019092557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0180546001600160a01b0319166001600160a01b039485169081179091556000908152600460209081526040808320426002820181905590556006825280832094909516825292909252919020805460ff19169091179055565b600254600a5483916001600160a01b0316906000906112ee8382612ac1565b6001600160a01b03841660009081526004602052604090206003015561131383611825565b6001600160a01b038085166000908152600460205260409020600201919091558416156113bf576001600160a01b0384166000908152600b6020526040902060020154611364908590859084612b56565b6001600160a01b0380861660008181526008602090815260408083209489168084529482528083209590955560048152848220600301548383526007825285832094835293815284822093909355908152600b909152205491505b5060095460015b6003548110156114c957600381815481106113f157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031693506114128483612ac1565b6001600160a01b03851660009081526004602052604090206003015561143784611825565b6001600160a01b038086166000908152600460205260409020600201919091558516156114b75761146a85858585612b56565b6001600160a01b038087166000818152600860209081526040808320948a168084529482528083209590955560048152848220600301549282526007815284822093825292909252919020555b806114c1816133f0565b9150506113c6565b503360009081526005602052604090205460ff166114e657600080fd5b6009546114f39086612a9d565b6009556001600160a01b0386166000908152600b60205260409020805461151a9087612a9d565b8155600381015461152b9087612a9d565b6003820155600061156061154362093a80600d61338e565b61155a62093a806115544282612ab5565b90612bc8565b90612a9d565b6001600160a01b0389166000908152600d602052604090208054919250908015806115c5575082826115936001846133ad565b815481106115b157634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010154105b15611607576040805180820190915289815260208082018581528454600181810187556000878152939093209351600290910290930192835551910155611688565b61164c89836116176001856133ad565b8154811061163557634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102015490612a9d565b826116586001846133ad565b8154811061167657634e487b7160e01b600052603260045260246000fd5b60009182526020909120600290910201555b6002546040516340c10f1960e01b8152306004820152602481018b90526001600160a01b03909116906340c10f1990604401602060405180830381600087803b1580156116d457600080fd5b505af11580156116e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061170c9190613153565b50896001600160a01b03167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d8a60405161174891815260200190565b60405180910390a250505050505050505050565b6001600160a01b0381166000908152600b6020908152604080832060010154338452600d909252822090915b815481101561181e57428282815481106117b257634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016001015411156117cf5761181e565b61180a8282815481106117f257634e487b7160e01b600052603260045260246000fd5b60009182526020909120600290910201548490612a9d565b925080611816816133f0565b915050611788565b5050919050565b6001600160a01b038116600090815260046020526040812054611849904290612d57565b92915050565b6001546001600160a01b031633146118795760405162461bcd60e51b8152600401610917906132a2565b6001600160a01b03831660009081526004602052604090206002015461189e57600080fd5b6001600160a01b03928316600090815260066020908152604080832094909516825292909252919020805460ff1916911515919091179055565b6001546001600160a01b031633146119025760405162461bcd60e51b8152600401610917906132a2565b61190c6000612d6d565b565b6003818154811061191e57600080fd5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b031633146119625760405162461bcd60e51b8152600401610917906132a2565b6002546001600160a01b03838116911614156119c05760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f74207769746864726177207374616b696e6720746f6b656e0000006044820152606401610917565b6001600160a01b03821660009081526004602052604090206002015415611a295760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742077697468647261772072657761726420746f6b656e000000006044820152606401610917565b611a4f611a3e6001546001600160a01b031690565b6001600160a01b0384169083612bd4565b604080516001600160a01b0384168152602081018390527f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28910160405180910390a15050565b336000908152600c60209081526040808320600b90925282208154919290914284611ac16001846133ad565b81548110611adf57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016001015411611b1c576002830154336000908152600c60205260408120919350611b179190613041565b611bd4565b60005b81811015611bd25742858281548110611b4857634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201600101541115611b6557611bd2565b611b888582815481106117f257634e487b7160e01b600052603260045260246000fd5b9250848181548110611baa57634e487b7160e01b600052603260045260246000fd5b6000918252602082206002909102018181556001015580611bca816133f0565b915050611b1f565b505b6002830154611be39083612aa9565b60028401558254611bf49083612aa9565b8355600954611c039083612aa9565b600955600a54611c139083612aa9565b600a55600254611c2d906001600160a01b03163384612bd4565b50505050565b60026000541415611c565760405162461bcd60e51b8152600401610917906132d7565b600260008181559054600a5433926001600160a01b039092169190611c7b8382612ac1565b6001600160a01b038416600090815260046020526040902060030155611ca083611825565b6001600160a01b03808516600090815260046020526040902060020191909155841615611d4c576001600160a01b0384166000908152600b6020526040902060020154611cf1908590859084612b56565b6001600160a01b0380861660008181526008602090815260408083209489168084529482528083209590955560048152848220600301548383526007825285832094835293815284822093909355908152600b909152205491505b5060095460015b600354811015611e565760038181548110611d7e57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b03169350611d9f8483612ac1565b6001600160a01b038516600090815260046020526040902060030155611dc484611825565b6001600160a01b03808616600090815260046020526040902060020191909155851615611e4457611df785858585612b56565b6001600160a01b038087166000818152600860209081526040808320948a168084529482528083209590955560048152848220600301549282526007815284822093825292909252919020555b80611e4e816133f0565b915050611d53565b5060008611611e985760405162461bcd60e51b815260206004820152600e60248201526d043616e6e6f74207374616b6520360941b6044820152606401610917565b600954611ea59087612a9d565b600955336000908152600b602052604090208054611ec39088612a9d565b8155851561202b57600a54611ed89088612a9d565b600a556002810154611eea9088612a9d565b60028201556000611f0261154362093a80600d61338e565b336000908152600c6020526040902054909150801580611f6b5750336000908152600c602052604090208290611f396001846133ad565b81548110611f5757634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010154105b15611fba57336000908152600c6020908152604080832081518083019092528c825281830186815281546001818101845592865293909420915160029093029091019182559151910155612024565b336000908152600c60205260409020611fda908a906116176001856133ad565b336000908152600c60205260409020611ff46001846133ad565b8154811061201257634e487b7160e01b600052603260045260246000fd5b60009182526020909120600290910201555b5050612040565b600181015461203a9088612a9d565b60018201555b600254612058906001600160a01b031633308a612dbf565b60405187815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d9060200160405180910390a2505060016000555050505050565b600254600a546000916001600160a01b03169082906120ba8382612ac1565b6001600160a01b0384166000908152600460205260409020600301556120df83611825565b6001600160a01b0380851660009081526004602052604090206002019190915584161561218b576001600160a01b0384166000908152600b6020526040902060020154612130908590859084612b56565b6001600160a01b0380861660008181526008602090815260408083209489168084529482528083209590955560048152848220600301548383526007825285832094835293815284822093909355908152600b909152205491505b5060095460015b60035481101561229557600381815481106121bd57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031693506121de8483612ac1565b6001600160a01b03851660009081526004602052604090206003015561220384611825565b6001600160a01b038086166000908152600460205260409020600201919091558516156122835761223685858585612b56565b6001600160a01b038087166000818152600860209081526040808320948a168084529482528083209590955560048152848220600301549282526007815284822093825292909252919020555b8061228d816133f0565b915050612192565b506001600160a01b038616600090815260066020908152604080832033845290915290205460ff166122c657600080fd5b600085116123025760405162461bcd60e51b8152602060048201526009602482015268139bc81c995dd85c9960ba1b6044820152606401610917565b6123176001600160a01b038716333088612dbf565b6123218686612c3c565b6040518581527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a1505050505050565b6001600160a01b0381166000908152600460205260408120600101546118499062093a80612bc8565b60035460609067ffffffffffffffff8111156123b157634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156123f657816020015b60408051808201909152600080825260208201528152602001906001900390816123cf5790505b50905060005b815181101561255f576000811561242b576001600160a01b0384166000908152600b6020526040902054612448565b6001600160a01b0384166000908152600b60205260409020600201545b90506000821561245a5760095461245e565b600a545b90506003838154811061248157634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b03168484815181106124bf57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001906001600160a01b031690816001600160a01b03168152505061251a8585858151811061250757634e487b7160e01b600052603260045260246000fd5b6020026020010151600001518484612b56565b84848151811061253a57634e487b7160e01b600052603260045260246000fd5b6020026020010151602001818152505050508080612557906133f0565b9150506123fc565b50919050565b6001600160a01b0381166000908152600d6020526040812060609082805b825481101561270457428382815481106125ad57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016001015411156126f257816126465782546125d79082906133ad565b67ffffffffffffffff8111156125fd57634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561264257816020015b604080518082019091526000808252602082015281526020019060019003908161261b5790505b5093505b82818154811061266657634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201604051806040016040529081600082015481526020016001820154815250508483815181106126b357634e487b7160e01b600052603260045260246000fd5b602002602001018190525081806126c9906133f0565b9250506126ef83828154811061085d57634e487b7160e01b600052603260045260246000fd5b94505b806126fc816133f0565b915050612583565b505050915091565b600254600a5433916001600160a01b03169060009061272b8382612ac1565b6001600160a01b03841660009081526004602052604090206003015561275083611825565b6001600160a01b038085166000908152600460205260409020600201919091558416156127fc576001600160a01b0384166000908152600b60205260409020600201546127a1908590859084612b56565b6001600160a01b0380861660008181526008602090815260408083209489168084529482528083209590955560048152848220600301548383526007825285832094835293815284822093909355908152600b909152205491505b5060095460015b600354811015612906576003818154811061282e57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316935061284f8483612ac1565b6001600160a01b03851660009081526004602052604090206003015561287484611825565b6001600160a01b038086166000908152600460205260409020600201919091558516156128f4576128a785858585612b56565b6001600160a01b038087166000818152600860209081526040808320948a168084529482528083209590955560048152848220600301549282526007815284822093825292909252919020555b806128fe816133f0565b915050612803565b506000806129133361054d565b336000908152600d602052604081209294509092506129329190613041565b336000908152600b6020526040902060038101546001820154825461295c92916106b09190612aa9565b815560006001820181905560038201556129826129798484612a9d565b60095490612aa9565b60095560025461299c906001600160a01b03163385612bd4565b81156129b8576002546129b8906001600160a01b031683612c3c565b6129c0610ed9565b50505050505050565b60025460009081906001600160a01b038481169116146129eb576009546129ef565b600a545b90506129fb8382612ac1565b9392505050565b6001546001600160a01b03163314612a2c5760405162461bcd60e51b8152600401610917906132a2565b6001600160a01b038116612a915760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610917565b612a9a81612d6d565b50565b60006129fb8284613356565b60006129fb82846133ad565b60006129fb828461336e565b600081612aea57506001600160a01b038216600090815260046020526040902060030154611849565b6001600160a01b038316600090815260046020526040902060018101546002909101546129fb91612b3491859161068691670de0b6b3a7640000916115549182906106b08c611825565b6001600160a01b03851660009081526004602052604090206003015490612a9d565b6001600160a01b038085166000818152600860209081526040808320948816808452948252808320549383526007825280832094835293905291822054612bbf919061155a90670de0b6b3a76400009061068690612bb8906106b08b8a612ac1565b8890612bc8565b95945050505050565b60006129fb828461338e565b6040516001600160a01b038316602482015260448101829052612c3790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612df7565b505050565b6001600160a01b0382166000908152600460205260409020544210612c8957612c688162093a80612ab5565b6001600160a01b038316600090815260046020526040902060010155612d09565b6001600160a01b038216600090815260046020526040812054612cac9042612aa9565b6001600160a01b03841660009081526004602052604081206001015491925090612cd7908390612bc8565b9050612cea62093a806106868584612a9d565b6001600160a01b03851660009081526004602052604090206001015550505b6001600160a01b0382166000908152600460205260409020426002909101819055612d379062093a80612a9d565b6001600160a01b0390921660009081526004602052604090209190915550565b6000818310612d6657816129fb565b5090919050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052611c2d9085906323b872dd60e01b90608401612c00565b6000612e4c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612ec99092919063ffffffff16565b805190915015612c375780806020019051810190612e6a9190613153565b612c375760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610917565b6060612ed88484600085612ee0565b949350505050565b606082471015612f415760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610917565b843b612f8f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610917565b600080866001600160a01b03168587604051612fab91906131fb565b60006040518083038185875af1925050503d8060008114612fe8576040519150601f19603f3d011682016040523d82523d6000602084013e612fed565b606091505b5091509150612ffd828286613008565b979650505050505050565b606083156130175750816129fb565b8251156130275782518084602001fd5b8160405162461bcd60e51b8152600401610917919061326f565b5080546000825560020290600052602060002090810190612a9a91905b80821115613078576000808255600182015560020161305e565b5090565b80356001600160a01b038116811461309357600080fd5b919050565b6000602082840312156130a9578081fd5b6129fb8261307c565b600080604083850312156130c4578081fd5b6130cd8361307c565b91506130db6020840161307c565b90509250929050565b6000806000606084860312156130f8578081fd5b6131018461307c565b925061310f6020850161307c565b9150604084013561311f81613421565b809150509250925092565b6000806040838503121561313c578182fd5b6131458361307c565b946020939093013593505050565b600060208284031215613164578081fd5b81516129fb81613421565b600060208284031215613180578081fd5b5035919050565b60008060408385031215613199578182fd5b8235915060208301356131ab81613421565b809150509250929050565b6000815180845260208085019450808401835b838110156131f05781518051885283015183880152604090960195908201906001016131c9565b509495945050505050565b6000825161320d8184602087016133c4565b9190910192915050565b602080825282518282018190526000919060409081850190868401855b8281101561326257815180516001600160a01b03168552860151868501529284019290850190600101613234565b5091979650505050505050565b602081526000825180602084015261328e8160408501602087016133c4565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b828152604060208201526000612ed860408301846131b6565b84815283602082015282604082015260806060820152600061334c60808301846131b6565b9695505050505050565b600082198211156133695761336961340b565b500190565b60008261338957634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156133a8576133a861340b565b500290565b6000828210156133bf576133bf61340b565b500390565b60005b838110156133df5781810151838201526020016133c7565b83811115611c2d5750506000910152565b60006000198214156134045761340461340b565b5060010190565b634e487b7160e01b600052601160045260246000fd5b8015158114612a9a57600080fdfea2646970667358221220db87564e76e5aa1cce462e78a7466a1bc7b29674fc5d5e94fa507997527a241c64736f6c63430008040033

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

00000000000000000000000019d2f0cf1fc41de2b8fd4a98065ab9284e05cf2900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000265f223011521a6cb222b1f828b04889a6bf50b30000000000000000000000006d356f08e49331042d9b19a7289059465e6021f8

-----Decoded View---------------
Arg [0] : _stakingToken (address): 0x19d2f0CF1FC41DE2b8fd4A98065AB9284E05Cf29
Arg [1] : _minters (address[]): 0x265F223011521a6Cb222B1F828b04889a6bf50b3,0x6d356f08e49331042D9B19a7289059465e6021F8

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000019d2f0cf1fc41de2b8fd4a98065ab9284e05cf29
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [3] : 000000000000000000000000265f223011521a6cb222b1f828b04889a6bf50b3
Arg [4] : 0000000000000000000000006d356f08e49331042d9b19a7289059465e6021f8


Block Transaction Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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