ETH Price: $1,975.21 (+0.33%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw All245110502026-02-22 7:55:2316 mins ago1771746923IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000006020.04316159
Deposit245107742026-02-22 6:59:471 hr ago1771743587IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000011170.08749532
Deposit245107102026-02-22 6:46:591 hr ago1771742819IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000004120.03227522
Deposit245106962026-02-22 6:44:111 hr ago1771742651IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000003930.031319
Deposit245106872026-02-22 6:42:231 hr ago1771742543IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000004650.03212138
Withdraw All245106612026-02-22 6:37:111 hr ago1771742231IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000004220.03212416
Withdraw All245106472026-02-22 6:34:231 hr ago1771742063IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000004090.03586578
Deposit245106202026-02-22 6:28:591 hr ago1771741739IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000226292.03187545
Deposit245106102026-02-22 6:26:591 hr ago1771741619IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000288772.03364
Withdraw All245105462026-02-22 6:14:111 hr ago1771740851IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.0000060.04064614
Withdraw All245105032026-02-22 6:05:352 hrs ago1771740335IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000005310.04337671
Deposit245104152026-02-22 5:47:592 hrs ago1771739279IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000004670.04196969
Deposit245104092026-02-22 5:46:472 hrs ago1771739207IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000003750.03139922
Deposit245102552026-02-22 5:15:592 hrs ago1771737359IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000003680.03019056
Deposit245102152026-02-22 5:07:593 hrs ago1771736879IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000015810.13229751
Withdraw All245101762026-02-22 5:00:113 hrs ago1771736411IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.00000790.06617492
Deposit245100282026-02-22 4:30:353 hrs ago1771734635IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000007920.06202653
Deposit245099772026-02-22 4:20:233 hrs ago1771734023IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000149291.03114167
Deposit245099362026-02-22 4:12:114 hrs ago1771733531IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.0000040.03133335
Deposit245099162026-02-22 4:08:114 hrs ago1771733291IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000003110.02947476
Withdraw All245099162026-02-22 4:08:114 hrs ago1771733291IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000004260.03054976
Deposit245098602026-02-22 3:56:594 hrs ago1771732619IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.0000040.03135768
Deposit245094652026-02-22 2:37:235 hrs ago1771727843IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.00000380.03179569
Deposit245094562026-02-22 2:35:355 hrs ago1771727735IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000003730.03124684
Deposit245093702026-02-22 2:18:235 hrs ago1771726703IN
0xa2Cf2BEB...F9cc1b685
0 ETH0.000009660.09141819
VIEW ADVANCED FILTER
Age:30D
Reset Filter

Showing the last 1 internal transaction (View Advanced Filter)

Advanced mode:
Parent Transaction Hash Method Block
From
To
0x61012060244818482026-02-18 6:12:474 days ago1771395167  Contract Creation0 ETH
VIEW ADVANCED FILTER
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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

Contract Name:
GaugeV2

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: MIT OR GPL-3.0-or-later
pragma solidity 0.8.13;

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

import './interfaces/IPair.sol';
import './interfaces/IBribe.sol';
import "./libraries/Math.sol";
import {BlackTimeLibrary} from "./libraries/BlackTimeLibrary.sol";
import './interfaces/IGauge.sol';

contract GaugeV2 is ReentrancyGuard, Ownable, IGauge {

    using SafeERC20 for IERC20;

    bool public immutable isForPair;
    bool public emergency;


    IERC20 public immutable rewardToken;
    IERC20 public immutable TOKEN;

    address public VE;
    address public DISTRIBUTION;
    address public immutable internal_bribe;
    address public immutable external_bribe;

    uint256 public DURATION;
    uint256 internal _periodFinish;
    uint256 public rewardRate;
    uint256 public lastUpdateTime;
    uint256 public rewardPerTokenStored;

    mapping(address => uint256) public userRewardPerTokenPaid;
    mapping(address => uint256) public rewards;

    uint256 internal _totalSupply;
    mapping(address => uint256) internal _balances;

    event RewardAdded(uint256 reward);
    event Deposit(address indexed user, uint256 amount);
    event Withdraw(address indexed user, uint256 amount);
    event Harvest(address indexed user, uint256 reward);

    event ClaimFees(address indexed from, uint256 claimed0, uint256 claimed1);
    event EmergencyActivated(address indexed gauge, uint256 timestamp);
    event EmergencyDeactivated(address indexed gauge, uint256 timestamp);

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

    modifier onlyDistribution() {
        require(msg.sender == DISTRIBUTION, "NA");
        _;
    }

    modifier isNotEmergency() {
        require(emergency == false, "EMER");
        _;
    }

    constructor(address _rewardToken,address _ve,address _token,address _distribution, address _internal_bribe, address _external_bribe, bool _isForPair) {
        rewardToken = IERC20(_rewardToken);     // main reward
        VE = _ve;                               // vested
        TOKEN = IERC20(_token);                 // underlying (LP)
        DISTRIBUTION = _distribution;           // distro address (GaugeManager)
        DURATION = BlackTimeLibrary.WEEK;                   

        internal_bribe = _internal_bribe;       // lp fees goes here
        external_bribe = _external_bribe;       // bribe fees goes here

        isForPair = _isForPair;                 // pair boolean, if false no claim_fees

        emergency = false;                      // emergency flag

    }


    /* -----------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
                                    ONLY OWNER
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    ----------------------------------------------------------------------------- */

    ///@notice set distribution address (should be GaugeManager)
    function setDistribution(address _distribution) external onlyOwner {
        require(_distribution != address(0), "ZA");
        require(_distribution != DISTRIBUTION, "SAME_ADDR");
        DISTRIBUTION = _distribution;
    }


    function activateEmergencyMode() external onlyOwner {
        require(emergency == false, "EMER");
        emergency = true;
        emit EmergencyActivated(address(this), block.timestamp);
    }

    function stopEmergencyMode() external onlyOwner {

        require(emergency == true,"EMER");

        emergency = false;
        emit EmergencyDeactivated(address(this), block.timestamp);
    }


    /* -----------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
                                    VIEW FUNCTIONS
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    ----------------------------------------------------------------------------- */

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

    ///@notice balance of a user
    function balanceOf(address account) external view returns (uint256) {
        return _balanceOf(account);
    }

    function _balanceOf(address account) internal view returns (uint256) {
        uint256 balance = _balances[account];
        return balance;
    }

    ///@notice last time reward
    function lastTimeRewardApplicable() public view returns (uint256) {
        return Math.min(block.timestamp, _periodFinish);
    }

    ///@notice  reward for a sinle token
    function rewardPerToken() public view returns (uint256) {
        if (_totalSupply == 0) {
            return rewardPerTokenStored;
        } else {
            return rewardPerTokenStored + (lastTimeRewardApplicable() - lastUpdateTime) * rewardRate * 1e18 / _totalSupply; 
        }
    }

    ///@notice see earned rewards for user
    function earned(address account) public view returns (uint256) {
        return rewards[account] + _balanceOf(account) * (rewardPerToken() - userRewardPerTokenPaid[account]) / 1e18;  
    }

    ///@notice get total reward for the duration
    function rewardForDuration() external view returns (uint256) {
        return rewardRate * DURATION;
    }

    function periodFinish() external view returns (uint256) {
        return _periodFinish;
    }



    /* -----------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
                                    USER INTERACTION
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    ----------------------------------------------------------------------------- */

    ///@notice deposit all TOKEN of msg.sender
    function depositAll() external {
        _deposit(TOKEN.balanceOf(msg.sender), msg.sender);
    }

    ///@notice deposit amount TOKEN
    function deposit(uint256 amount) external {
        _deposit(amount, msg.sender);
    }

    ///@notice deposit internal
    function _deposit(uint256 amount, address account) internal nonReentrant isNotEmergency updateReward(account) {
        require(amount > 0, "ZV");

        _balances[account] = _balances[account] + amount;
        _totalSupply = _totalSupply + amount;

        TOKEN.safeTransferFrom(account, address(this), amount);

        emit Deposit(account, amount);
    }

    ///@notice withdraw all token
    function withdrawAll() external {
        _withdraw(_balanceOf(msg.sender));
    }

    ///@notice withdraw a certain amount of TOKEN
    function withdraw(uint256 amount) external {
        _withdraw(amount);
    }

    ///@notice withdraw internal
    function _withdraw(uint256 amount) internal nonReentrant isNotEmergency updateReward(msg.sender) {
        require(amount > 0, "ZV");
        require(_balanceOf(msg.sender) > 0, "ZV");

        _totalSupply = _totalSupply - amount;
        _deductBalance(amount);

        TOKEN.safeTransfer(msg.sender, amount);

        emit Withdraw(msg.sender, amount);
    }

    function emergencyWithdraw() external nonReentrant {
        require(emergency, "EMER");
        uint256 _amount = _balanceOf(msg.sender);
        require(_amount > 0, "ZV");
        _totalSupply = _totalSupply - _amount;

        _balances[msg.sender] = 0;

        TOKEN.safeTransfer(msg.sender, _amount);
        emit Withdraw(msg.sender, _amount);
    }

    function emergencyWithdrawAmount(uint256 _amount) external nonReentrant {

        require(emergency, "EMER");
        _totalSupply = _totalSupply - _amount;

        _deductBalance(_amount);

        TOKEN.safeTransfer(msg.sender, _amount);
        emit Withdraw(msg.sender, _amount);
    }

    function _deductBalance(uint256 _amount) internal {
        uint256 gaugeDeduction =  _amount;
        _balances[msg.sender] = _balances[msg.sender] - gaugeDeduction;
    }

    ///@notice withdraw all TOKEN and harvest rewardToken
    function withdrawAllAndHarvest() external {
        _withdraw(_balanceOf(msg.sender));
        getReward();
    }

 
    ///@notice User harvest function called from distribution (GaugeManager allows harvest on multiple gauges)
    function getReward(address _user) public nonReentrant onlyDistribution updateReward(_user) {
        uint256 reward = rewards[_user];
        if (reward > 0) {
            rewards[_user] = 0;
            rewardToken.safeTransfer(_user, reward);
            emit Harvest(_user, reward);
        }
    }

    ///@notice User harvest function
    function getReward() public nonReentrant updateReward(msg.sender) {
        uint256 reward = rewards[msg.sender];
        if (reward > 0) {
            rewards[msg.sender] = 0;
            rewardToken.safeTransfer(msg.sender, reward);
            emit Harvest(msg.sender, reward);
        }
    }








    /* -----------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
                                    DISTRIBUTION
    --------------------------------------------------------------------------------
    --------------------------------------------------------------------------------
    ----------------------------------------------------------------------------- */

    /// @dev Receive rewards from distribution

    function notifyRewardAmount(address token, uint256 reward) external nonReentrant isNotEmergency onlyDistribution updateReward(address(0)) {
        require(token == address(rewardToken), "IA");
        rewardToken.safeTransferFrom(DISTRIBUTION, address(this), reward);

        uint256 duration = BlackTimeLibrary.epochNext(block.timestamp) - block.timestamp;
        if (block.timestamp >= _periodFinish) {
            rewardRate = reward / duration;
        } else {
            uint256 leftover = duration * rewardRate;
            rewardRate = (reward + leftover) / duration;
        }

        // Ensure the provided reward amount is not more than the balance in the contract.
        // This keeps the reward rate in the right range, preventing overflows due to
        // very high values of rewardRate in the earned and rewardsPerToken functions;
        // Reward + leftover must be less than 2^256 / 10^18 to avoid overflow.
        uint256 balance = rewardToken.balanceOf(address(this));
        require(rewardRate <= balance / duration, "REWARD_HIGH");

        lastUpdateTime = block.timestamp;
        _periodFinish = BlackTimeLibrary.epochNext(block.timestamp);
        emit RewardAdded(reward);
    }


    function claimFees() external nonReentrant returns (uint256 claimed0, uint256 claimed1) {
        return _claimFees();
    }

     function _claimFees() internal returns (uint256 claimed0, uint256 claimed1) {
        if (!isForPair) {
            return (0, 0);
        }
        address _token = address(TOKEN);
        (claimed0, claimed1) = IPair(_token).claimFees();
        if (claimed0 > 0 || claimed1 > 0) {

            uint256 _fees0 = claimed0;
            uint256 _fees1 = claimed1;

            (address _token0, address _token1) = IPair(_token).tokens();

            if (_fees0  > 0) {
                IERC20(_token0).safeApprove(internal_bribe, 0);
                IERC20(_token0).safeApprove(internal_bribe, _fees0);
                IBribe(internal_bribe).notifyRewardAmount(_token0, _fees0);
            } 
            if (_fees1  > 0) {
                IERC20(_token1).safeApprove(internal_bribe, 0);
                IERC20(_token1).safeApprove(internal_bribe, _fees1);
                IBribe(internal_bribe).notifyRewardAmount(_token1, _fees1);
            } 
            emit ClaimFees(msg.sender, claimed0, claimed1);
        }
    }

}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

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

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

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// SPDX-License-Identifier: MIT OR GPL-3.0-or-later
pragma solidity 0.8.13;

interface IBribe {
    function deposit(uint amount, uint tokenId) external;
    function withdraw(uint amount, uint tokenId) external;
    function getRewardForAddress(address _owner, address[] memory tokens) external;
    function notifyRewardAmount(address token, uint amount) external;
    function left(address token) external view returns (uint);
    function getReward(uint tokenId, address[] memory tokens) external;
    function bribeTokens(uint256 i) external view returns(address); 
    function rewardsListLength() external view returns (uint256);
    function tokenRewardsPerEpoch(address _token, uint256 epochStart) external view returns(uint256);
}

// SPDX-License-Identifier: MIT OR GPL-3.0-or-later
pragma solidity 0.8.13;

interface IGauge {
    function notifyRewardAmount(address token, uint amount) external;
    function getReward(address account) external;
    function claimFees() external returns (uint claimed0, uint claimed1);
    function rewardRate() external view returns (uint);
    function balanceOf(address _account) external view returns (uint);
    function isForPair() external view returns (bool);
    function totalSupply() external view returns (uint);
    function earned(address account) external view returns (uint);
    function emergency() external returns (bool);
    function setDistribution(address _distro) external;
    function activateEmergencyMode() external;
    function stopEmergencyMode() external;
    function periodFinish() external view returns (uint256);
    function rewardForDuration() external view returns (uint256);
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

interface IPair {
    function metadata() external view returns (uint dec0, uint dec1, uint r0, uint r1, bool st, address t0, address t1);
    function claimFees() external returns (uint, uint);
    function tokens() external view returns (address, address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function transferFrom(address src, address dst, uint amount) external returns (bool);
    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function burn(address to) external returns (uint amount0, uint amount1);
    function mint(address to) external returns (uint liquidity);
    function getReserves() external view returns (uint _reserve0, uint _reserve1, uint _blockTimestampLast);
    function getAmountOut(uint, address) external view returns (uint);

    function name() external view returns(string memory);
    function symbol() external view returns(string memory);
    function totalSupply() external view returns (uint);
    function decimals() external view returns (uint8);

    function claimable0(address _user) external view returns (uint);
    function claimable1(address _user) external view returns (uint);

    function isStable() external view returns(bool);
    function allowance(address owner, address spender) external view returns (uint);
}

// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.13;

library BlackTimeLibrary {

    uint256 internal constant WEEK = 7 * 86400;
    uint internal constant NO_VOTING_WINDOW = 3600;
    uint256 internal constant MAX_LOCK_DURATION = 86400 * 365 * 4;

    /// @dev Returns start of epoch based on current timestamp
    function epochStart(uint256 timestamp) internal pure returns (uint256) {
        unchecked {
            return timestamp - (timestamp % WEEK);
        }
    }

    /// @dev Returns start of next epoch / end of current epoch
    function epochNext(uint256 timestamp) internal pure returns (uint256) {
        unchecked {
            return timestamp - (timestamp % WEEK) + WEEK;
        }
    }

    /// @dev Returns start of voting window
    function epochVoteStart(uint256 timestamp) internal pure returns (uint256) {
        unchecked {
            return timestamp - (timestamp % WEEK) + NO_VOTING_WINDOW;
        }
    }

    /// @dev Returns end of voting window / beginning of unrestricted voting window
    function epochVoteEnd(uint256 timestamp) internal pure returns (uint256) {
        unchecked {
            return timestamp - (timestamp % WEEK) + WEEK - NO_VOTING_WINDOW;
        }
    }

    /// @dev Returns the status if it is the last hour of the epoch
    function isLastHour(uint256 timestamp) internal pure returns (bool) {
        // return block.timestamp % 7 days >= 6 days + 23 hours;
        return timestamp >= BlackTimeLibrary.epochVoteEnd(timestamp) 
        && timestamp < BlackTimeLibrary.epochNext(timestamp);
    }

    /// @dev Returns duration in multiples of epoch
    function epochMultiples(uint256 duration) internal pure returns (uint256) {
        unchecked {
            return (duration / WEEK) * WEEK;
        }
    }

    function isLastEpoch(uint256 timestamp, uint256 endTime) internal pure returns (bool) {
        unchecked {
            return  endTime - WEEK <= timestamp && timestamp < endTime;
        }
    }

}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

library Math {
    function max(uint a, uint b) internal pure returns (uint) {
        return a >= b ? a : b;
    }
    function min(uint a, uint b) internal pure returns (uint) {
        return a < b ? a : b;
    }
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
    function cbrt(uint256 n) internal pure returns (uint256) { unchecked {
        uint256 x = 0;
        for (uint256 y = 1 << 255; y > 0; y >>= 3) {
            x <<= 1;
            uint256 z = 3 * x * (x + 1) + 1;
            if (n / y >= z) {
                n -= y * z;
                x += 1;
            }
        }
        return x;
    }}
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_ve","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_distribution","type":"address"},{"internalType":"address","name":"_internal_bribe","type":"address"},{"internalType":"address","name":"_external_bribe","type":"address"},{"internalType":"bool","name":"_isForPair","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"claimed0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"claimed1","type":"uint256"}],"name":"ClaimFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"EmergencyActivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"EmergencyDeactivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"Harvest","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":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"DISTRIBUTION","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"activateEmergencyMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimFees","outputs":[{"internalType":"uint256","name":"claimed0","type":"uint256"},{"internalType":"uint256","name":"claimed1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergency","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyWithdrawAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"external_bribe","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"internal_bribe","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isForPair","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","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":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardForDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_distribution","type":"address"}],"name":"setDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopEmergencyMode","outputs":[],"stateMutability":"nonpayable","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":"","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":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAllAndHarvest","outputs":[],"stateMutability":"nonpayable","type":"function"}]

0x6101206040523480156200001257600080fd5b506040516200213d3803806200213d83398101604081905262000035916200011b565b60016000556200004533620000ac565b6001600160a01b0396871660a052600280549688166001600160a01b031997881617905593861660c05260038054938716939095169290921790935562093a8060045591831660e05291166101005215156080526001805460ff60a01b19169055620001b8565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200011657600080fd5b919050565b600080600080600080600060e0888a0312156200013757600080fd5b6200014288620000fe565b96506200015260208901620000fe565b95506200016260408901620000fe565b94506200017260608901620000fe565b93506200018260808901620000fe565b92506200019260a08901620000fe565b915060c08801518015158114620001a857600080fd5b8091505092959891949750929550565b60805160a05160c05160e05161010051611ec26200027b6000396000610261015260008181610319015281816116b3015281816116e801528181611733015281816117a5015281816117da015261182501526000818161037701528181610d1f01528181610f0901528181610f9101528181611181015281816114b3015261158f0152600081816104f30152818161063b0152818161093a015281816109af01528181610a4f0152610c500152600081816104b1015261155f0152611ec26000f3fe608060405234801561001057600080fd5b50600436106102315760003560e01c80638da5cb5b11610130578063cd3daf9d116100b8578063df136d651161007c578063df136d65146104a3578063e5748213146104ac578063ebe2b12b146104d3578063f2fde38b146104db578063f7c618c1146104ee57600080fd5b8063cd3daf9d14610466578063d00960101461046e578063d294f09314610476578063db2e21bc14610493578063de5f62681461049b57600080fd5b8063c00007b0116100ff578063c00007b014610400578063c6c8f6b614610413578063c863657d14610426578063c8f33c9114610439578063caa6fea41461044257600080fd5b80638da5cb5b146103c1578063b1534ecd146103d2578063b66503cf146103da578063b6b55f25146103ed57600080fd5b806370a08231116101be5780637f699015116101825780637f6990151461035757806380faa57d1461036a57806382bfefc814610372578063853828b6146103995780638b876347146103a157600080fd5b806370a08231146102f9578063715018a61461030c578063770f8571146103145780637b0a47ee1461033b5780637c91e4eb1461034457600080fd5b80631be05289116102055780631be05289146102c35780632e1a7d4d146102cc5780633d18b912146102e15780636946a235146102e95780636e9852f2146102f157600080fd5b80628cc2621461023657806303fbf83a1461025c5780630700037d1461029b57806318160ddd146102bb575b600080fd5b610249610244366004611c56565b610515565b6040519081526020015b60405180910390f35b6102837f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610253565b6102496102a9366004611c56565b600a6020526000908152604090205481565b600b54610249565b61024960045481565b6102df6102da366004611c73565b6105a0565b005b6102df6105ac565b6102496106ae565b6102df6106c5565b610249610307366004611c56565b6106e6565b6102df610704565b6102837f000000000000000000000000000000000000000000000000000000000000000081565b61024960065481565b600354610283906001600160a01b031681565b6102df610365366004611c56565b610716565b6102496107ca565b6102837f000000000000000000000000000000000000000000000000000000000000000081565b6102df6107d8565b6102496103af366004611c56565b60096020526000908152604090205481565b6001546001600160a01b0316610283565b6102df6107f1565b6102df6103e8366004611c8c565b61086b565b6102df6103fb366004611c73565b610b65565b6102df61040e366004611c56565b610b6f565b6102df610421366004611c73565b610cc7565b600254610283906001600160a01b031681565b61024960075481565b60015461045690600160a01b900460ff1681565b6040519015158152602001610253565b610249610d85565b6102df610de6565b61047e610e5f565b60408051928352602083019190915201610253565b6102df610e84565b6102df610f78565b61024960085481565b6104567f000000000000000000000000000000000000000000000000000000000000000081565b600554610249565b6102df6104e9366004611c56565b61100a565b6102837f000000000000000000000000000000000000000000000000000000000000000081565b6001600160a01b038116600090815260096020526040812054670de0b6b3a764000090610540610d85565b61054a9190611cce565b6001600160a01b0384166000908152600c602052604090205461056d9190611ce5565b6105779190611d04565b6001600160a01b0383166000908152600a602052604090205461059a9190611d26565b92915050565b6105a981611080565b50565b6105b46111e8565b336105bd610d85565b6008556105c86107ca565b6007556001600160a01b0381161561060f576105e381610515565b6001600160a01b0382166000908152600a60209081526040808320939093556008546009909152919020555b336000908152600a602052604090205480156106a057336000818152600a602052604081205561066a907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169083611241565b60405181815233907fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba9060200160405180910390a25b50506106ac6001600055565b565b60006004546006546106c09190611ce5565b905090565b336000908152600c60205260409020546106de90611080565b6106ac6105ac565b6001600160a01b0381166000908152600c602052604081205461059a565b61070c6112a9565b6106ac6000611303565b61071e6112a9565b6001600160a01b03811661075e5760405162461bcd60e51b81526020600482015260026024820152615a4160f01b60448201526064015b60405180910390fd5b6003546001600160a01b03908116908216036107a85760405162461bcd60e51b815260206004820152600960248201526829a0a6a2afa0a2222960b91b6044820152606401610755565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60006106c042600554611355565b336000908152600c60205260409020546106ac90611080565b6107f96112a9565b60018054600160a01b900460ff161515146108265760405162461bcd60e51b815260040161075590611d3e565b6001805460ff60a01b1916905560405142815230907fa30763a9bc0d8e121a6e721624965cae68010ece74128b4ae5b01b8dc22c00f8906020015b60405180910390a2565b6108736111e8565b600154600160a01b900460ff161561089d5760405162461bcd60e51b815260040161075590611d3e565b6003546001600160a01b031633146108dc5760405162461bcd60e51b81526020600482015260026024820152614e4160f01b6044820152606401610755565b60006108e6610d85565b6008556108f16107ca565b6007556001600160a01b038116156109385761090c81610515565b6001600160a01b0382166000908152600a60209081526040808320939093556008546009909152919020555b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03161461099e5760405162461bcd60e51b8152602060048201526002602482015261494160f01b6044820152606401610755565b6003546109d9906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169116308561136d565b60006109ee4262093a80808206820301611cce565b90506005544210610a0b57610a038184611d04565b600655610a37565b600060065482610a1b9190611ce5565b905081610a288286611d26565b610a329190611d04565b600655505b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610a9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac29190611d5c565b9050610ace8282611d04565b6006541115610b0d5760405162461bcd60e51b815260206004820152600b60248201526a0a48aae82a488be90928e960ab1b6044820152606401610755565b42600781905562093a80808206909103016005556040518481527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a1505050610b616001600055565b5050565b6105a981336113ab565b610b776111e8565b6003546001600160a01b03163314610bb65760405162461bcd60e51b81526020600482015260026024820152614e4160f01b6044820152606401610755565b80610bbf610d85565b600855610bca6107ca565b6007556001600160a01b03811615610c1157610be581610515565b6001600160a01b0382166000908152600a60209081526040808320939093556008546009909152919020555b6001600160a01b0382166000908152600a60205260409020548015610cbb576001600160a01b038084166000908152600a6020526040812055610c77907f0000000000000000000000000000000000000000000000000000000000000000168483611241565b826001600160a01b03167fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba82604051610cb291815260200190565b60405180910390a25b50506105a96001600055565b610ccf6111e8565b600154600160a01b900460ff16610cf85760405162461bcd60e51b815260040161075590611d3e565b80600b54610d069190611cce565b600b55610d1281611529565b610d466001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383611241565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a26105a96001600055565b6000600b54600003610d98575060085490565b600b54600654600754610da96107ca565b610db39190611cce565b610dbd9190611ce5565b610dcf90670de0b6b3a7640000611ce5565b610dd99190611d04565b6008546106c09190611d26565b610dee6112a9565b600154600160a01b900460ff1615610e185760405162461bcd60e51b815260040161075590611d3e565b6001805460ff60a01b1916600160a01b17905560405130907f774b57c3410c76d04ea4d51b0c15a9bac99b0e70f28fd88b53d702b5427fd318906108619042815260200190565b600080610e6a6111e8565b610e7261155a565b91509150610e806001600055565b9091565b610e8c6111e8565b600154600160a01b900460ff16610eb55760405162461bcd60e51b815260040161075590611d3e565b336000908152600c602052604090205480610ee25760405162461bcd60e51b815260040161075590611d75565b80600b54610ef09190611cce565b600b55336000818152600c6020526040812055610f38907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169083611241565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2506106ac6001600055565b6040516370a0823160e01b81523360048201526106ac907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610fe0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110049190611d5c565b336113ab565b6110126112a9565b6001600160a01b0381166110775760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610755565b6105a981611303565b6110886111e8565b600154600160a01b900460ff16156110b25760405162461bcd60e51b815260040161075590611d3e565b336110bb610d85565b6008556110c66107ca565b6007556001600160a01b0381161561110d576110e181610515565b6001600160a01b0382166000908152600a60209081526040808320939093556008546009909152919020555b6000821161112d5760405162461bcd60e51b815260040161075590611d75565b336000908152600c60205260408120541161115a5760405162461bcd60e51b815260040161075590611d75565b81600b546111689190611cce565b600b5561117482611529565b6111a86001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163384611241565b60405182815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2506105a96001600055565b60026000540361123a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610755565b6002600055565b6040516001600160a01b0383166024820152604481018290526112a490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526118c7565b505050565b6001546001600160a01b031633146106ac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610755565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008183106113645781611366565b825b9392505050565b6040516001600160a01b03808516602483015283166044820152606481018290526113a59085906323b872dd60e01b9060840161126d565b50505050565b6113b36111e8565b600154600160a01b900460ff16156113dd5760405162461bcd60e51b815260040161075590611d3e565b806113e6610d85565b6008556113f16107ca565b6007556001600160a01b038116156114385761140c81610515565b6001600160a01b0382166000908152600a60209081526040808320939093556008546009909152919020555b600083116114585760405162461bcd60e51b815260040161075590611d75565b6001600160a01b0382166000908152600c602052604090205461147c908490611d26565b6001600160a01b0383166000908152600c6020526040902055600b546114a3908490611d26565b600b556114db6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001683308661136d565b816001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c8460405161151691815260200190565b60405180910390a250610b616001600055565b336000908152600c60205260409020548190611546908290611cce565b336000908152600c60205260409020555050565b6000807f000000000000000000000000000000000000000000000000000000000000000061158b5750600091829150565b60007f00000000000000000000000000000000000000000000000000000000000000009050806001600160a01b031663d294f0936040518163ffffffff1660e01b815260040160408051808303816000875af11580156115ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116139190611d91565b9093509150821515806116265750600082115b156118c25760008390506000839050600080846001600160a01b0316639d63848a6040518163ffffffff1660e01b81526004016040805180830381865afa158015611675573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116999190611db5565b90925090508315611790576116d96001600160a01b0383167f0000000000000000000000000000000000000000000000000000000000000000600061199c565b61170d6001600160a01b0383167f00000000000000000000000000000000000000000000000000000000000000008661199c565b60405163b66503cf60e01b81526001600160a01b038381166004830152602482018690527f0000000000000000000000000000000000000000000000000000000000000000169063b66503cf90604401600060405180830381600087803b15801561177757600080fd5b505af115801561178b573d6000803e3d6000fd5b505050505b8215611882576117cb6001600160a01b0382167f0000000000000000000000000000000000000000000000000000000000000000600061199c565b6117ff6001600160a01b0382167f00000000000000000000000000000000000000000000000000000000000000008561199c565b60405163b66503cf60e01b81526001600160a01b038281166004830152602482018590527f0000000000000000000000000000000000000000000000000000000000000000169063b66503cf90604401600060405180830381600087803b15801561186957600080fd5b505af115801561187d573d6000803e3d6000fd5b505050505b604080518881526020810188905233917fbc567d6cbad26368064baa0ab5a757be46aae4d70f707f9203d9d9b6c8ccbfa3910160405180910390a2505050505b509091565b600061191c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ab19092919063ffffffff16565b905080516000148061193d57508080602001905181019061193d9190611def565b6112a45760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610755565b801580611a165750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156119f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a149190611d5c565b155b611a815760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610755565b6040516001600160a01b0383166024820152604481018290526112a490849063095ea7b360e01b9060640161126d565b6060611ac08484600085611ac8565b949350505050565b606082471015611b295760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610755565b600080866001600160a01b03168587604051611b459190611e3d565b60006040518083038185875af1925050503d8060008114611b82576040519150601f19603f3d011682016040523d82523d6000602084013e611b87565b606091505b5091509150611b9887838387611ba3565b979650505050505050565b60608315611c12578251600003611c0b576001600160a01b0385163b611c0b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610755565b5081611ac0565b611ac08383815115611c275781518083602001fd5b8060405162461bcd60e51b81526004016107559190611e59565b6001600160a01b03811681146105a957600080fd5b600060208284031215611c6857600080fd5b813561136681611c41565b600060208284031215611c8557600080fd5b5035919050565b60008060408385031215611c9f57600080fd5b8235611caa81611c41565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b600082821015611ce057611ce0611cb8565b500390565b6000816000190483118215151615611cff57611cff611cb8565b500290565b600082611d2157634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611d3957611d39611cb8565b500190565b60208082526004908201526322a6a2a960e11b604082015260600190565b600060208284031215611d6e57600080fd5b5051919050565b6020808252600290820152612d2b60f11b604082015260600190565b60008060408385031215611da457600080fd5b505080516020909101519092909150565b60008060408385031215611dc857600080fd5b8251611dd381611c41565b6020840151909250611de481611c41565b809150509250929050565b600060208284031215611e0157600080fd5b8151801515811461136657600080fd5b60005b83811015611e2c578181015183820152602001611e14565b838111156113a55750506000910152565b60008251611e4f818460208701611e11565b9190910192915050565b6020815260008251806020840152611e78816040850160208701611e11565b601f01601f1916919091016040019291505056fea264697066735822122075666eb8b19de7b81d349d855f831cf736fc8d5aa219cab1e3c2868b6e0f71c964736f6c634300080d003300000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c780000000000000000000000004c3e7640b3e3a39a2e5d030a0c1412d80fee1d440000000000000000000000004f20c37766759c3956f030d2e8749d493ef86e9400000000000000000000000019a410046afc4203aece5fbfc7a6ac1a4f517ae20000000000000000000000003ef0bb6d5940d00790ad863d7926cca537a7e88a000000000000000000000000f1344882d905c18e60ab943cb1916becd4c244c90000000000000000000000000000000000000000000000000000000000000001

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102315760003560e01c80638da5cb5b11610130578063cd3daf9d116100b8578063df136d651161007c578063df136d65146104a3578063e5748213146104ac578063ebe2b12b146104d3578063f2fde38b146104db578063f7c618c1146104ee57600080fd5b8063cd3daf9d14610466578063d00960101461046e578063d294f09314610476578063db2e21bc14610493578063de5f62681461049b57600080fd5b8063c00007b0116100ff578063c00007b014610400578063c6c8f6b614610413578063c863657d14610426578063c8f33c9114610439578063caa6fea41461044257600080fd5b80638da5cb5b146103c1578063b1534ecd146103d2578063b66503cf146103da578063b6b55f25146103ed57600080fd5b806370a08231116101be5780637f699015116101825780637f6990151461035757806380faa57d1461036a57806382bfefc814610372578063853828b6146103995780638b876347146103a157600080fd5b806370a08231146102f9578063715018a61461030c578063770f8571146103145780637b0a47ee1461033b5780637c91e4eb1461034457600080fd5b80631be05289116102055780631be05289146102c35780632e1a7d4d146102cc5780633d18b912146102e15780636946a235146102e95780636e9852f2146102f157600080fd5b80628cc2621461023657806303fbf83a1461025c5780630700037d1461029b57806318160ddd146102bb575b600080fd5b610249610244366004611c56565b610515565b6040519081526020015b60405180910390f35b6102837f000000000000000000000000f1344882d905c18e60ab943cb1916becd4c244c981565b6040516001600160a01b039091168152602001610253565b6102496102a9366004611c56565b600a6020526000908152604090205481565b600b54610249565b61024960045481565b6102df6102da366004611c73565b6105a0565b005b6102df6105ac565b6102496106ae565b6102df6106c5565b610249610307366004611c56565b6106e6565b6102df610704565b6102837f0000000000000000000000003ef0bb6d5940d00790ad863d7926cca537a7e88a81565b61024960065481565b600354610283906001600160a01b031681565b6102df610365366004611c56565b610716565b6102496107ca565b6102837f0000000000000000000000004f20c37766759c3956f030d2e8749d493ef86e9481565b6102df6107d8565b6102496103af366004611c56565b60096020526000908152604090205481565b6001546001600160a01b0316610283565b6102df6107f1565b6102df6103e8366004611c8c565b61086b565b6102df6103fb366004611c73565b610b65565b6102df61040e366004611c56565b610b6f565b6102df610421366004611c73565b610cc7565b600254610283906001600160a01b031681565b61024960075481565b60015461045690600160a01b900460ff1681565b6040519015158152602001610253565b610249610d85565b6102df610de6565b61047e610e5f565b60408051928352602083019190915201610253565b6102df610e84565b6102df610f78565b61024960085481565b6104567f000000000000000000000000000000000000000000000000000000000000000181565b600554610249565b6102df6104e9366004611c56565b61100a565b6102837f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c7881565b6001600160a01b038116600090815260096020526040812054670de0b6b3a764000090610540610d85565b61054a9190611cce565b6001600160a01b0384166000908152600c602052604090205461056d9190611ce5565b6105779190611d04565b6001600160a01b0383166000908152600a602052604090205461059a9190611d26565b92915050565b6105a981611080565b50565b6105b46111e8565b336105bd610d85565b6008556105c86107ca565b6007556001600160a01b0381161561060f576105e381610515565b6001600160a01b0382166000908152600a60209081526040808320939093556008546009909152919020555b336000908152600a602052604090205480156106a057336000818152600a602052604081205561066a907f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c786001600160a01b03169083611241565b60405181815233907fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba9060200160405180910390a25b50506106ac6001600055565b565b60006004546006546106c09190611ce5565b905090565b336000908152600c60205260409020546106de90611080565b6106ac6105ac565b6001600160a01b0381166000908152600c602052604081205461059a565b61070c6112a9565b6106ac6000611303565b61071e6112a9565b6001600160a01b03811661075e5760405162461bcd60e51b81526020600482015260026024820152615a4160f01b60448201526064015b60405180910390fd5b6003546001600160a01b03908116908216036107a85760405162461bcd60e51b815260206004820152600960248201526829a0a6a2afa0a2222960b91b6044820152606401610755565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60006106c042600554611355565b336000908152600c60205260409020546106ac90611080565b6107f96112a9565b60018054600160a01b900460ff161515146108265760405162461bcd60e51b815260040161075590611d3e565b6001805460ff60a01b1916905560405142815230907fa30763a9bc0d8e121a6e721624965cae68010ece74128b4ae5b01b8dc22c00f8906020015b60405180910390a2565b6108736111e8565b600154600160a01b900460ff161561089d5760405162461bcd60e51b815260040161075590611d3e565b6003546001600160a01b031633146108dc5760405162461bcd60e51b81526020600482015260026024820152614e4160f01b6044820152606401610755565b60006108e6610d85565b6008556108f16107ca565b6007556001600160a01b038116156109385761090c81610515565b6001600160a01b0382166000908152600a60209081526040808320939093556008546009909152919020555b7f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c786001600160a01b0316836001600160a01b03161461099e5760405162461bcd60e51b8152602060048201526002602482015261494160f01b6044820152606401610755565b6003546109d9906001600160a01b037f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c7881169116308561136d565b60006109ee4262093a80808206820301611cce565b90506005544210610a0b57610a038184611d04565b600655610a37565b600060065482610a1b9190611ce5565b905081610a288286611d26565b610a329190611d04565b600655505b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c786001600160a01b0316906370a0823190602401602060405180830381865afa158015610a9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac29190611d5c565b9050610ace8282611d04565b6006541115610b0d5760405162461bcd60e51b815260206004820152600b60248201526a0a48aae82a488be90928e960ab1b6044820152606401610755565b42600781905562093a80808206909103016005556040518481527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a1505050610b616001600055565b5050565b6105a981336113ab565b610b776111e8565b6003546001600160a01b03163314610bb65760405162461bcd60e51b81526020600482015260026024820152614e4160f01b6044820152606401610755565b80610bbf610d85565b600855610bca6107ca565b6007556001600160a01b03811615610c1157610be581610515565b6001600160a01b0382166000908152600a60209081526040808320939093556008546009909152919020555b6001600160a01b0382166000908152600a60205260409020548015610cbb576001600160a01b038084166000908152600a6020526040812055610c77907f00000000000000000000000000da8466b296e382e5da2bf20962d0cb87200c78168483611241565b826001600160a01b03167fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba82604051610cb291815260200190565b60405180910390a25b50506105a96001600055565b610ccf6111e8565b600154600160a01b900460ff16610cf85760405162461bcd60e51b815260040161075590611d3e565b80600b54610d069190611cce565b600b55610d1281611529565b610d466001600160a01b037f0000000000000000000000004f20c37766759c3956f030d2e8749d493ef86e94163383611241565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a26105a96001600055565b6000600b54600003610d98575060085490565b600b54600654600754610da96107ca565b610db39190611cce565b610dbd9190611ce5565b610dcf90670de0b6b3a7640000611ce5565b610dd99190611d04565b6008546106c09190611d26565b610dee6112a9565b600154600160a01b900460ff1615610e185760405162461bcd60e51b815260040161075590611d3e565b6001805460ff60a01b1916600160a01b17905560405130907f774b57c3410c76d04ea4d51b0c15a9bac99b0e70f28fd88b53d702b5427fd318906108619042815260200190565b600080610e6a6111e8565b610e7261155a565b91509150610e806001600055565b9091565b610e8c6111e8565b600154600160a01b900460ff16610eb55760405162461bcd60e51b815260040161075590611d3e565b336000908152600c602052604090205480610ee25760405162461bcd60e51b815260040161075590611d75565b80600b54610ef09190611cce565b600b55336000818152600c6020526040812055610f38907f0000000000000000000000004f20c37766759c3956f030d2e8749d493ef86e946001600160a01b03169083611241565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2506106ac6001600055565b6040516370a0823160e01b81523360048201526106ac907f0000000000000000000000004f20c37766759c3956f030d2e8749d493ef86e946001600160a01b0316906370a0823190602401602060405180830381865afa158015610fe0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110049190611d5c565b336113ab565b6110126112a9565b6001600160a01b0381166110775760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610755565b6105a981611303565b6110886111e8565b600154600160a01b900460ff16156110b25760405162461bcd60e51b815260040161075590611d3e565b336110bb610d85565b6008556110c66107ca565b6007556001600160a01b0381161561110d576110e181610515565b6001600160a01b0382166000908152600a60209081526040808320939093556008546009909152919020555b6000821161112d5760405162461bcd60e51b815260040161075590611d75565b336000908152600c60205260408120541161115a5760405162461bcd60e51b815260040161075590611d75565b81600b546111689190611cce565b600b5561117482611529565b6111a86001600160a01b037f0000000000000000000000004f20c37766759c3956f030d2e8749d493ef86e94163384611241565b60405182815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2506105a96001600055565b60026000540361123a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610755565b6002600055565b6040516001600160a01b0383166024820152604481018290526112a490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526118c7565b505050565b6001546001600160a01b031633146106ac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610755565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008183106113645781611366565b825b9392505050565b6040516001600160a01b03808516602483015283166044820152606481018290526113a59085906323b872dd60e01b9060840161126d565b50505050565b6113b36111e8565b600154600160a01b900460ff16156113dd5760405162461bcd60e51b815260040161075590611d3e565b806113e6610d85565b6008556113f16107ca565b6007556001600160a01b038116156114385761140c81610515565b6001600160a01b0382166000908152600a60209081526040808320939093556008546009909152919020555b600083116114585760405162461bcd60e51b815260040161075590611d75565b6001600160a01b0382166000908152600c602052604090205461147c908490611d26565b6001600160a01b0383166000908152600c6020526040902055600b546114a3908490611d26565b600b556114db6001600160a01b037f0000000000000000000000004f20c37766759c3956f030d2e8749d493ef86e941683308661136d565b816001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c8460405161151691815260200190565b60405180910390a250610b616001600055565b336000908152600c60205260409020548190611546908290611cce565b336000908152600c60205260409020555050565b6000807f000000000000000000000000000000000000000000000000000000000000000161158b5750600091829150565b60007f0000000000000000000000004f20c37766759c3956f030d2e8749d493ef86e949050806001600160a01b031663d294f0936040518163ffffffff1660e01b815260040160408051808303816000875af11580156115ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116139190611d91565b9093509150821515806116265750600082115b156118c25760008390506000839050600080846001600160a01b0316639d63848a6040518163ffffffff1660e01b81526004016040805180830381865afa158015611675573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116999190611db5565b90925090508315611790576116d96001600160a01b0383167f0000000000000000000000003ef0bb6d5940d00790ad863d7926cca537a7e88a600061199c565b61170d6001600160a01b0383167f0000000000000000000000003ef0bb6d5940d00790ad863d7926cca537a7e88a8661199c565b60405163b66503cf60e01b81526001600160a01b038381166004830152602482018690527f0000000000000000000000003ef0bb6d5940d00790ad863d7926cca537a7e88a169063b66503cf90604401600060405180830381600087803b15801561177757600080fd5b505af115801561178b573d6000803e3d6000fd5b505050505b8215611882576117cb6001600160a01b0382167f0000000000000000000000003ef0bb6d5940d00790ad863d7926cca537a7e88a600061199c565b6117ff6001600160a01b0382167f0000000000000000000000003ef0bb6d5940d00790ad863d7926cca537a7e88a8561199c565b60405163b66503cf60e01b81526001600160a01b038281166004830152602482018590527f0000000000000000000000003ef0bb6d5940d00790ad863d7926cca537a7e88a169063b66503cf90604401600060405180830381600087803b15801561186957600080fd5b505af115801561187d573d6000803e3d6000fd5b505050505b604080518881526020810188905233917fbc567d6cbad26368064baa0ab5a757be46aae4d70f707f9203d9d9b6c8ccbfa3910160405180910390a2505050505b509091565b600061191c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ab19092919063ffffffff16565b905080516000148061193d57508080602001905181019061193d9190611def565b6112a45760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610755565b801580611a165750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156119f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a149190611d5c565b155b611a815760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610755565b6040516001600160a01b0383166024820152604481018290526112a490849063095ea7b360e01b9060640161126d565b6060611ac08484600085611ac8565b949350505050565b606082471015611b295760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610755565b600080866001600160a01b03168587604051611b459190611e3d565b60006040518083038185875af1925050503d8060008114611b82576040519150601f19603f3d011682016040523d82523d6000602084013e611b87565b606091505b5091509150611b9887838387611ba3565b979650505050505050565b60608315611c12578251600003611c0b576001600160a01b0385163b611c0b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610755565b5081611ac0565b611ac08383815115611c275781518083602001fd5b8060405162461bcd60e51b81526004016107559190611e59565b6001600160a01b03811681146105a957600080fd5b600060208284031215611c6857600080fd5b813561136681611c41565b600060208284031215611c8557600080fd5b5035919050565b60008060408385031215611c9f57600080fd5b8235611caa81611c41565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b600082821015611ce057611ce0611cb8565b500390565b6000816000190483118215151615611cff57611cff611cb8565b500290565b600082611d2157634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611d3957611d39611cb8565b500190565b60208082526004908201526322a6a2a960e11b604082015260600190565b600060208284031215611d6e57600080fd5b5051919050565b6020808252600290820152612d2b60f11b604082015260600190565b60008060408385031215611da457600080fd5b505080516020909101519092909150565b60008060408385031215611dc857600080fd5b8251611dd381611c41565b6020840151909250611de481611c41565b809150509250929050565b600060208284031215611e0157600080fd5b8151801515811461136657600080fd5b60005b83811015611e2c578181015183820152602001611e14565b838111156113a55750506000910152565b60008251611e4f818460208701611e11565b9190910192915050565b6020815260008251806020840152611e78816040850160208701611e11565b601f01601f1916919091016040019291505056fea264697066735822122075666eb8b19de7b81d349d855f831cf736fc8d5aa219cab1e3c2868b6e0f71c964736f6c634300080d0033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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