S Price: $0.465868 (-0.64%)

Contract

0xcfB9fDCd480Bc731833257eb982718cAb5aD2cE6

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Emergency Withdr...150596532025-03-21 17:13:3628 days ago1742577216IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0040244755.01
Claim Legacy Rew...85338602025-02-18 22:20:5758 days ago1739917257IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.00271677105
Emergency Withdr...85336542025-02-18 22:19:2958 days ago1739917169IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0072681105
Claim Legacy Rew...85330722025-02-18 22:15:3758 days ago1739916937IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.00271677105
Withdraw81668362025-02-16 19:40:3161 days ago1739734831IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0050947655
Deposit81552542025-02-16 17:44:5361 days ago1739727893IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.006899750
Emergency Withdr...81200962025-02-16 12:10:1861 days ago1739707818IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.002866655
Emergency Withdr...81003962025-02-16 8:34:5861 days ago1739694898IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.002668655
Emergency Withdr...80860512025-02-16 5:49:0461 days ago1739684944IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.002756655
Emergency Withdr...80860122025-02-16 5:48:4161 days ago1739684921IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0027514355
Emergency Withdr...80854932025-02-16 5:43:0661 days ago1739684586IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.002756655
Emergency Withdr...80854592025-02-16 5:42:4461 days ago1739684564IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0027572655
Emergency Withdr...80705112025-02-16 2:10:1561 days ago1739671815IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0030367755.01
Emergency Withdr...80667442025-02-16 1:23:5361 days ago1739669033IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0030367755.01
Withdraw80571182025-02-15 23:36:2061 days ago1739662580IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0052751855.01
Withdraw80570832025-02-15 23:35:5561 days ago1739662555IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0058025655.01
Deposit80559282025-02-15 23:22:4361 days ago1739661763IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0065720955.01
Deposit80555982025-02-15 23:19:0761 days ago1739661547IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0079837155.01
Emergency Withdr...80517402025-02-15 22:40:0361 days ago1739659203IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.002756655
Withdraw80490712025-02-15 22:13:3661 days ago1739657616IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0058591155.01
Emergency Withdr...80458762025-02-15 21:39:4961 days ago1739655589IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.002756655
Withdraw80302912025-02-15 18:51:2162 days ago1739645481IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0048714155.01
Withdraw80298332025-02-15 18:46:4362 days ago1739645203IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0048714155.01
Withdraw80295182025-02-15 18:43:0162 days ago1739644981IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0048721255.01
Withdraw80294012025-02-15 18:41:3662 days ago1739644896IN
0xcfB9fDCd...Ab5aD2cE6
0 S0.0048721255.01
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
GSnakeRewardPool

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 10 : GSnakeRewardPool.sol
// SPDX-License-Identifier: BUSL-1.1

// GSnakeRewardPool --> visit https://snake.finance/ for full experience
// Made by Kell

pragma solidity ^0.8.0;

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

import "../shadow/interfaces/IGauge.sol";
import "../shadow/interfaces/IVoter.sol";

contract GSnakeRewardPool is ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // governance
    address public operator;

    // Info of each user.
    struct UserInfo {
        uint256 amount; // How many LP tokens the user has provided.
        uint256 rewardDebt; // Reward debt. See explanation below.
    }

    struct GaugeInfo {
        bool isGauge;   // If this is a gauge
        IGauge gauge;  // The gauge
        address[] rewardTokens; // tokens that are used in the gauge
    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 token; // Address of LP token contract.
        uint256 depFee; // deposit fee that is applied to created pool.
        uint256 allocPoint; // How many allocation points assigned to this pool. GSNAKEs to distribute per block.
        uint256 lastRewardTime; // Last time that GSNAKEs distribution occurs.
        uint256 accGsnakePerShare; // Accumulated GSNAKEs per share, times 1e18. See below.
        bool isStarted; // if lastRewardTime has passed
        GaugeInfo gaugeInfo; // Gauge info (does this pool have a gauge and where is it)
        uint256 poolGsnakePerSec; // rewards per second for pool (acts as allocPoint)
    }

    IERC20 public gsnake;
    IVoter public voter;
    address public xSHADOW = 0x5050bc082FF4A74Fb6B0B04385dEfdDB114b2424;
    address public bribesSafe;

    // Info of each pool.
    PoolInfo[] public poolInfo;

    // Info of each user that stakes LP tokens.
    mapping(uint256 => mapping(address => UserInfo)) public userInfo;

    // Total allocation points. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;

    // The time when GSNAKE mining starts.
    uint256 public poolStartTime;

    // The time when GSNAKE mining ends.
    uint256 public poolEndTime;
    uint256 public sharePerSecond = 0 ether;
    uint256 public runningTime = 730 days;

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event RewardPaid(address indexed user, uint256 amount);

    constructor(
        address _gsnake,
        address _bribesSafe,
        uint256 _poolStartTime,
        address _voter
    ) {
        require(block.timestamp < _poolStartTime, "pool cant be started in the past");
        if (_gsnake != address(0)) gsnake = IERC20(_gsnake);
        if(_bribesSafe != address(0)) bribesSafe = _bribesSafe;

        poolStartTime = _poolStartTime;
        poolEndTime = _poolStartTime + runningTime;
        operator = msg.sender;
        voter = IVoter(_voter);
        bribesSafe = _bribesSafe;

        // create all the pools
        add(0.000570776255707763 ether, 0, IERC20(0x287c6882dE298665977787e268f3dba052A6e251), false, 0); // Snake-S
        add(0.000380517503805175 ether, 0, IERC20(0xb901D7316447C84f4417b8a8268E2822095051E6), false, 0); // GSnake-S
    }

    modifier onlyOperator() {
        require(operator == msg.sender, "GSnakeRewardPool: caller is not the operator");
        _;
    }

    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    function checkPoolDuplicate(IERC20 _token) internal view {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            require(poolInfo[pid].token != _token, "GSnakeRewardPool: existing pool?");
        }
    }

    // bulk add pools
    function addBulk(uint256[] calldata _allocPoints, uint256[] calldata _depFees, IERC20[] calldata _tokens, bool _withUpdate, uint256 _lastRewardTime) external onlyOperator {
        require(_allocPoints.length == _depFees.length && _allocPoints.length == _tokens.length, "GSnakeRewardPool: invalid length");
        for (uint256 i = 0; i < _allocPoints.length; i++) {
            add(_allocPoints[i], _depFees[i], _tokens[i], _withUpdate, _lastRewardTime);
        }
    }

    // Add new lp to the pool. Can only be called by operator.
    function add(
        uint256 _allocPoint,
        uint256 _depFee,
        IERC20 _token,
        bool _withUpdate,
        uint256 _lastRewardTime
    ) public onlyOperator {
        checkPoolDuplicate(_token);
        if (_withUpdate) {
            massUpdatePools();
        }
        if (block.timestamp < poolStartTime) {
            // chef is sleeping
            if (_lastRewardTime == 0) {
                _lastRewardTime = poolStartTime;
            } else {
                if (_lastRewardTime < poolStartTime) {
                    _lastRewardTime = poolStartTime;
                }
            }
        } else {
            // chef is cooking
            if (_lastRewardTime == 0 || _lastRewardTime < block.timestamp) {
                _lastRewardTime = block.timestamp;
            }
        }
        bool _isStarted = (_lastRewardTime <= poolStartTime) || (_lastRewardTime <= block.timestamp);
        address[] memory rewardTokensGauge = new address[](1);
        rewardTokensGauge[0] = xSHADOW;
        poolInfo.push(PoolInfo({
            token: _token,
            depFee: _depFee,
            allocPoint: _allocPoint,
            poolGsnakePerSec: _allocPoint,
            lastRewardTime: _lastRewardTime,
            accGsnakePerShare: 0,
            isStarted: _isStarted,
            gaugeInfo: GaugeInfo(false, IGauge(address(0)), rewardTokensGauge)
        }));
        enableGauge(poolInfo.length - 1);
        
        
        if (_isStarted) {
            totalAllocPoint = totalAllocPoint.add(_allocPoint);
            sharePerSecond = sharePerSecond.add(_allocPoint);
        }
    }

    // Update the given pool's GSNAKE allocation point. Can only be called by the operator.
    function set(uint256 _pid, uint256 _allocPoint, uint256 _depFee) public onlyOperator {
        massUpdatePools();

        PoolInfo storage pool = poolInfo[_pid];
        require(_depFee < 200);  // deposit fee cant be more than 2%;
        pool.depFee = _depFee;

        if (pool.isStarted) {
            totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add(_allocPoint);
            sharePerSecond = sharePerSecond.sub(pool.poolGsnakePerSec).add(_allocPoint);
        }
        pool.allocPoint = _allocPoint;
        pool.poolGsnakePerSec = _allocPoint;
    }

    function bulkSet(uint256[] calldata _pids, uint256[] calldata _allocPoints, uint256[] calldata _depFees) external onlyOperator {
        require(_pids.length == _allocPoints.length && _pids.length == _depFees.length, "GSnakeRewardPool: invalid length");
        for (uint256 i = 0; i < _pids.length; i++) {
            set(_pids[i], _allocPoints[i], _depFees[i]);
        }
    }

    // Return accumulate rewards over the given _from to _to block.
    function getGeneratedReward(uint256 _fromTime, uint256 _toTime) public view returns (uint256) {
        if (_fromTime >= _toTime) return 0;
        if (_toTime >= poolEndTime) {
            if (_fromTime >= poolEndTime) return 0;
            if (_fromTime <= poolStartTime) return poolEndTime.sub(poolStartTime).mul(sharePerSecond);
            return poolEndTime.sub(_fromTime).mul(sharePerSecond);
        } else {
            if (_toTime <= poolStartTime) return 0;
            if (_fromTime <= poolStartTime) return _toTime.sub(poolStartTime).mul(sharePerSecond);
            return _toTime.sub(_fromTime).mul(sharePerSecond);
        }
    }

    // View function to see pending GSNAKEs on frontend.
    function pendingShare(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accGsnakePerShare = pool.accGsnakePerShare;
        uint256 tokenSupply = pool.gaugeInfo.isGauge ? pool.gaugeInfo.gauge.balanceOf(address(this)) : pool.token.balanceOf(address(this));
        if (block.timestamp > pool.lastRewardTime && tokenSupply != 0) {
            uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp);
            uint256 _gsnakeReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint);
            accGsnakePerShare = accGsnakePerShare.add(_gsnakeReward.mul(1e18).div(tokenSupply));
        }
        return user.amount.mul(accGsnakePerShare).div(1e18).sub(user.rewardDebt);
    }

    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
            updatePoolWithGaugeDeposit(pid);
        }
    }

    // massUpdatePoolsInRange
    function massUpdatePoolsInRange(uint256 _fromPid, uint256 _toPid) public {
        require(_fromPid <= _toPid, "GSnakeRewardPool: invalid range");
        for (uint256 pid = _fromPid; pid <= _toPid; ++pid) {
            updatePool(pid);
            updatePoolWithGaugeDeposit(pid);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) private {
        updatePoolWithGaugeDeposit(_pid);
        PoolInfo storage pool = poolInfo[_pid];
        if (block.timestamp <= pool.lastRewardTime) {
            return;
        }
        uint256 tokenSupply = pool.gaugeInfo.isGauge ? pool.gaugeInfo.gauge.balanceOf(address(this)) : pool.token.balanceOf(address(this));
        if (tokenSupply == 0) {
            pool.lastRewardTime = block.timestamp;
            return;
        }
        if (!pool.isStarted) {
            pool.isStarted = true;
            totalAllocPoint = totalAllocPoint.add(pool.allocPoint);
            sharePerSecond = sharePerSecond.add(pool.poolGsnakePerSec);
        }
        if (totalAllocPoint > 0) {
            uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp);
            uint256 _gsnakeReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint);
            pool.accGsnakePerShare = pool.accGsnakePerShare.add(_gsnakeReward.mul(1e18).div(tokenSupply));
        }
        pool.lastRewardTime = block.timestamp;
        claimLegacyRewards(_pid);
    }
    
    // Deposit LP tokens to earn rewards
    function updatePoolWithGaugeDeposit(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        address gauge = address(pool.gaugeInfo.gauge);
        uint256 balance = pool.token.balanceOf(address(this));
        // Do nothing if this pool doesn't have a gauge
        if (pool.gaugeInfo.isGauge) {
            // Do nothing if the LP token in the MC is empty
            if (balance > 0) {
                // Approve to the gauge
                if (pool.token.allowance(address(this), gauge) < balance ){
                    pool.token.approve(gauge, type(uint256).max);
                }
                // Deposit the LP in the gauge
                pool.gaugeInfo.gauge.depositFor(address(this), balance);
            }
        }
    }

    // Claim rewards to treasury
    function claimLegacyRewards(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (pool.gaugeInfo.isGauge) {
            if (pool.gaugeInfo.rewardTokens.length > 0) {     

                uint256[] memory beforeBalances = new uint256[](pool.gaugeInfo.rewardTokens.length);

                // Store balances before claim
                for (uint256 i = 0; i < pool.gaugeInfo.rewardTokens.length; i++) {
                    beforeBalances[i] = IERC20(pool.gaugeInfo.rewardTokens[i]).balanceOf(address(this));
                }

                address[] memory gaugesToCheck = new address[](1);
                gaugesToCheck[0] = address(pool.gaugeInfo.gauge);
                
                address[][] memory gaugeRewardTokens = new address[][](1);
                gaugeRewardTokens[0] = pool.gaugeInfo.rewardTokens;
                
                voter.claimRewards(gaugesToCheck, gaugeRewardTokens);

                for (uint256 i = 0; i < pool.gaugeInfo.rewardTokens.length; i++) {
                    IERC20 rewardToken = IERC20(pool.gaugeInfo.rewardTokens[i]);
                    uint256 afterBalance = rewardToken.balanceOf(address(this));
                    uint256 rewardAmount = afterBalance - beforeBalances[i];

                    if (rewardAmount > 0) {
                        rewardToken.safeTransfer(bribesSafe, rewardAmount);
                    }
                }
            }
        }
    }

    // Add a gauge to a pool
    function enableGauge(uint256 _pid) public onlyOperator {
        address gauge = voter.gaugeForPool(address(poolInfo[_pid].token));
        if (gauge != address(0)) {
            address[] memory rewardTokensGauge = new address[](1);
            rewardTokensGauge[0] = xSHADOW;
            poolInfo[_pid].gaugeInfo = GaugeInfo(true, IGauge(gauge), rewardTokensGauge);
        }
    }

    function setGaugeRewardTokens(uint256 _pid, address[] calldata _rewardTokens) public onlyOperator {
        PoolInfo storage pool = poolInfo[_pid];
        require(pool.gaugeInfo.isGauge, "SnakeGenesisRewardPool: not a gauge pool");
        pool.gaugeInfo.rewardTokens = _rewardTokens;
    }
    
    function setBribesSafe(address _bribesSafe) public onlyOperator {
        bribesSafe = _bribesSafe;
    }

    // Withdraw LP from the gauge
    function withdrawFromGauge(uint256 _pid, uint256 _amount) internal {
        PoolInfo storage pool = poolInfo[_pid];
        // Do nothing if this pool doesn't have a gauge
        if (pool.gaugeInfo.isGauge) {
            // Withdraw from the gauge
            pool.gaugeInfo.gauge.withdraw(_amount);
        }
    }

    // Deposit LP tokens.
    function deposit(uint256 _pid, uint256 _amount) public nonReentrant {
        address _sender = msg.sender;
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 _pending = user.amount.mul(pool.accGsnakePerShare).div(1e18).sub(user.rewardDebt);
            if (_pending > 0) {
                safeGsnakeTransfer(_sender, _pending);
                emit RewardPaid(_sender, _pending);
            }
        }
        if (_amount > 0 ) {
            pool.token.safeTransferFrom(_sender, address(this), _amount);
            uint256 depositDebt = _amount.mul(pool.depFee).div(10000);
            user.amount = user.amount.add(_amount.sub(depositDebt));
            pool.token.safeTransfer(bribesSafe, depositDebt);
        }
        updatePoolWithGaugeDeposit(_pid);
        user.rewardDebt = user.amount.mul(pool.accGsnakePerShare).div(1e18);
        emit Deposit(_sender, _pid, _amount);
    }

    // Withdraw LP tokens.
    function withdraw(uint256 _pid, uint256 _amount) public nonReentrant {
        address _sender = msg.sender;
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool(_pid);
        updatePoolWithGaugeDeposit(_pid);
        uint256 _pending = user.amount.mul(pool.accGsnakePerShare).div(1e18).sub(user.rewardDebt);
        if (_pending > 0) {
            safeGsnakeTransfer(_sender, _pending);
            emit RewardPaid(_sender, _pending);
        }
        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            withdrawFromGauge(_pid, _amount);
            pool.token.safeTransfer(_sender, _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accGsnakePerShare).div(1e18);
        emit Withdraw(_sender, _pid, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 _amount = user.amount;
        withdrawFromGauge(_pid, _amount);
        user.amount = 0;
        user.rewardDebt = 0;
        pool.token.safeTransfer(msg.sender, _amount);
        emit EmergencyWithdraw(msg.sender, _pid, _amount);
    }

    // Safe gsnake transfer function, just in case if rounding error causes pool to not have enough GSNAKEs.
    function safeGsnakeTransfer(address _to, uint256 _amount) internal {
        uint256 _gsnakeBal = gsnake.balanceOf(address(this));
        if (_gsnakeBal > 0) {
            if (_amount > _gsnakeBal) {
                gsnake.safeTransfer(_to, _gsnakeBal);
            } else {
                gsnake.safeTransfer(_to, _amount);
            }
        }
    }

    function setOperator(address _operator) external onlyOperator {
        operator = _operator;
    }

    function governanceRecoverUnsupported(IERC20 _token, uint256 amount, address to) external onlyOperator {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            PoolInfo storage pool = poolInfo[pid];
            require(_token != pool.token, "ShareRewardPool: Token cannot be pool token");
        }
        _token.safeTransfer(to, amount);
    }
}

File 2 of 10 : ReentrancyGuard.sol
// 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;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 10 : IBasisAsset.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IBasisAsset {
    function mint(address recipient, uint256 amount) external returns (bool);

    function burn(uint256 amount) external;

    function burnFrom(address from, uint256 amount) external;

    function isOperator() external returns (bool);

    function operator() external view returns (address);

    function transferOperator(address newOperator_) external;
}

File 9 of 10 : IGauge.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.26;

interface IGauge {
    error ZERO_AMOUNT();

    error CANT_NOTIFY_STAKE();

    error REWARD_TOO_HIGH();

    error NOT_GREATER_THAN_REMAINING(uint256 amount, uint256 remaining);

    error TOKEN_ERROR(address token);

    error NOT_WHITELISTED();

    error NOT_AUTHORIZED();

    event Deposit(address indexed from, uint256 amount);

    event Withdraw(address indexed from, uint256 amount);

    event NotifyReward(
        address indexed from,
        address indexed reward,
        uint256 amount
    );

    event ClaimRewards(
        address indexed from,
        address indexed reward,
        uint256 amount
    );

    event RewardWhitelisted(address indexed reward, bool whitelisted);

    /// @notice Get the amount of stakingToken deposited by an account
    function balanceOf(address) external view returns (uint256);

    /// @notice returns an array with all the addresses of the rewards
    /// @return _rewards array of addresses for rewards
    function rewardsList() external view returns (address[] memory _rewards);

    /// @notice number of different rewards the gauge has facilitated that are 'active'
    /// @return _length the number of individual rewards
    function rewardsListLength() external view returns (uint256 _length);

    /// @notice returns the last time the reward was modified or periodFinish if the reward has ended
    /// @param token address of the token
    /// @return ltra last time reward applicable
    function lastTimeRewardApplicable(
        address token
    ) external view returns (uint256 ltra);

    /// @notice displays the data struct of rewards for a token
    /// @param token the address of the token
    /// @return data rewards struct
    function rewardData(
        address token
    ) external view returns (Reward memory data);

    /// @notice calculates the amount of tokens earned for an address
    /// @param token address of the token to check
    /// @param account address to check
    /// @return _reward amount of token claimable
    function earned(
        address token,
        address account
    ) external view returns (uint256 _reward);
    /// @notice claims rewards (shadow + any external LP Incentives)
    /// @param account the address to claim for
    /// @param tokens an array of the tokens to claim
    function getReward(address account, address[] calldata tokens) external;

    /// @notice claims all rewards and instant exits xshadow into shadow
    function getRewardAndExit(
        address account,
        address[] calldata tokens
    ) external;

    /// @notice calculates the token amounts earned per lp token
    /// @param token address of the token to check
    /// @return rpt reward per token
    function rewardPerToken(address token) external view returns (uint256 rpt);

    /// @notice deposit all LP tokens from msg.sender's wallet to the gauge
    function depositAll() external;
    /// @param recipient the address of who to deposit on behalf of
    /// @param amount the amount of LP tokens to withdraw
    function depositFor(address recipient, uint256 amount) external;

    /// @notice deposit LP tokens to the gauge
    /// @param amount the amount of LP tokens to withdraw
    function deposit(uint256 amount) external;

    /// @notice withdraws all fungible LP tokens from legacy gauges
    function withdrawAll() external;

    /// @notice withdraws fungible LP tokens from legacy gauges
    /// @param amount the amount of LP tokens to withdraw
    function withdraw(uint256 amount) external;

    /// @notice calculates how many tokens are left to be distributed
    /// @dev reduces per second
    /// @param token the address of the token
    function left(address token) external view returns (uint256);
    /// @notice add a reward to the whitelist
    /// @param _reward address of the reward
    function whitelistReward(address _reward) external;

    /// @notice remove rewards from the whitelist
    /// @param _reward address of the reward
    function removeRewardWhitelist(address _reward) external;

    /**
     * @notice amount must be greater than left() for the token, this is to prevent griefing attacks
     * @notice notifying rewards is completely permissionless
     * @notice if nobody registers for a newly added reward for the period it will remain in the contract indefinitely
     */
    function notifyRewardAmount(address token, uint256 amount) external;

    struct Reward {
        /// @dev tokens per second
        uint256 rewardRate;
        /// @dev 7 days after start
        uint256 periodFinish;
        uint256 lastUpdateTime;
        uint256 rewardPerTokenStored;
    }

    /// @notice checks if a reward is whitelisted
    /// @param reward the address of the reward
    /// @return true if the reward is whitelisted, false otherwise
    function isWhitelisted(address reward) external view returns (bool);
}

File 10 of 10 : IVoter.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.26;
pragma abicoder v2;

interface IVoter {
    error ACTIVE_GAUGE(address gauge);

    error GAUGE_INACTIVE(address gauge);

    error ALREADY_WHITELISTED(address token);

    error NOT_AUTHORIZED(address caller);

    error NOT_WHITELISTED();

    error NOT_POOL();

    error NOT_INIT();

    error LENGTH_MISMATCH();

    error NO_GAUGE();

    error ALREADY_DISTRIBUTED(address gauge, uint256 period);

    error ZERO_VOTE(address pool);

    error RATIO_TOO_HIGH(uint256 _xRatio);

    error VOTE_UNSUCCESSFUL();

    event GaugeCreated(
        address indexed gauge,
        address creator,
        address feeDistributor,
        address indexed pool
    );

    event GaugeKilled(address indexed gauge);

    event GaugeRevived(address indexed gauge);

    event Voted(address indexed owner, uint256 weight, address indexed pool);

    event Abstained(address indexed owner, uint256 weight);

    event Deposit(
        address indexed lp,
        address indexed gauge,
        address indexed owner,
        uint256 amount
    );

    event Withdraw(
        address indexed lp,
        address indexed gauge,
        address indexed owner,
        uint256 amount
    );

    event NotifyReward(
        address indexed sender,
        address indexed reward,
        uint256 amount
    );

    event DistributeReward(
        address indexed sender,
        address indexed gauge,
        uint256 amount
    );

    event EmissionsRatio(
        address indexed caller,
        uint256 oldRatio,
        uint256 newRatio
    );

    event NewGovernor(address indexed sender, address indexed governor);

    event Whitelisted(address indexed whitelister, address indexed token);

    event WhitelistRevoked(
        address indexed forbidder,
        address indexed token,
        bool status
    );

    event MainTickSpacingChanged(
        address indexed token0,
        address indexed token1,
        int24 indexed newMainTickSpacing
    );

    event Poke(address indexed user);

    function initialize(
        address _shadow,
        address _legacyFactory,
        address _gauges,
        address _feeDistributorFactory,
        address _minter,
        address _msig,
        address _xShadow,
        address _clFactory,
        address _clGaugeFactory,
        address _nfpManager,
        address _feeRecipientFactory,
        address _voteModule,
        address _launcherPlugin
    ) external;

    /// @notice denominator basis
    function BASIS() external view returns (uint256);

    /// @notice ratio of xShadow emissions globally
    function xRatio() external view returns (uint256);

    /// @notice xShadow contract address
    function xShadow() external view returns (address);

    /// @notice legacy factory address (uni-v2/stableswap)
    function legacyFactory() external view returns (address);

    /// @notice concentrated liquidity factory
    function clFactory() external view returns (address);

    /// @notice gauge factory for CL
    function clGaugeFactory() external view returns (address);

    /// @notice legacy fee recipient factory
    function feeRecipientFactory() external view returns (address);

    /// @notice peripheral NFPManager contract
    function nfpManager() external view returns (address);

    /// @notice returns the address of the current governor
    /// @return _governor address of the governor
    function governor() external view returns (address _governor);

    /// @notice the address of the vote module
    /// @return _voteModule the vote module contract address
    function voteModule() external view returns (address _voteModule);

    /// @notice address of the central access Hub
    function accessHub() external view returns (address);

    /// @notice the address of the shadow launcher plugin to enable third party launchers
    /// @return _launcherPlugin the address of the plugin
    function launcherPlugin() external view returns (address _launcherPlugin);

    /// @notice distributes emissions from the minter to the voter
    /// @param amount the amount of tokens to notify
    function notifyRewardAmount(uint256 amount) external;

    /// @notice distributes the emissions for a specific gauge
    /// @param _gauge the gauge address
    function distribute(address _gauge) external;

    /// @notice returns the address of the gauge factory
    /// @param _gaugeFactory gauge factory address
    function gaugeFactory() external view returns (address _gaugeFactory);

    /// @notice returns the address of the feeDistributor factory
    /// @return _feeDistributorFactory feeDist factory address
    function feeDistributorFactory()
        external
        view
        returns (address _feeDistributorFactory);

    /// @notice returns the address of the minter contract
    /// @return _minter address of the minter
    function minter() external view returns (address _minter);

    /// @notice check if the gauge is active for governance use
    /// @param _gauge address of the gauge
    /// @return _trueOrFalse if the gauge is alive
    function isAlive(address _gauge) external view returns (bool _trueOrFalse);

    /// @notice allows the token to be paired with other whitelisted assets to participate in governance
    /// @param _token the address of the token
    function whitelist(address _token) external;

    /// @notice effectively disqualifies a token from governance
    /// @param _token the address of the token
    function revokeWhitelist(address _token) external;

    /// @notice returns if the address is a gauge
    /// @param gauge address of the gauge
    /// @return _trueOrFalse boolean if the address is a gauge
    function isGauge(address gauge) external view returns (bool _trueOrFalse);

    /// @notice disable a gauge from governance
    /// @param _gauge address of the gauge
    function killGauge(address _gauge) external;

    /// @notice re-activate a dead gauge
    /// @param _gauge address of the gauge
    function reviveGauge(address _gauge) external;

    /// @notice re-cast a tokenID's votes
    /// @param owner address of the owner
    function poke(address owner) external;

    /// @notice sets the main tickspacing of a token pairing
    /// @param tokenA address of tokenA
    /// @param tokenB address of tokenB
    /// @param tickSpacing the main tickspacing to set to
    function setMainTickSpacing(
        address tokenA,
        address tokenB,
        int24 tickSpacing
    ) external;

    /// @notice returns if the address is a fee distributor
    /// @param _feeDistributor address of the feeDist
    /// @return _trueOrFalse if the address is a fee distributor
    function isFeeDistributor(
        address _feeDistributor
    ) external view returns (bool _trueOrFalse);

    /// @notice returns the address of the emission's token
    /// @return _shadow emissions token contract address
    function shadow() external view returns (address _shadow);

    /// @notice returns the address of the pool's gauge, if any
    /// @param _pool pool address
    /// @return _gauge gauge address
    function gaugeForPool(address _pool) external view returns (address _gauge);

    /// @notice returns the address of the pool's feeDistributor, if any
    /// @param _gauge address of the gauge
    /// @return _feeDistributor address of the pool's feedist
    function feeDistributorForGauge(
        address _gauge
    ) external view returns (address _feeDistributor);

    /// @notice returns the new toPool that was redirected fromPool
    /// @param fromPool address of the original pool
    /// @return toPool the address of the redirected pool
    function poolRedirect(
        address fromPool
    ) external view returns (address toPool);

    /// @notice returns the gauge address of a CL pool
    /// @param tokenA address of token A in the pair
    /// @param tokenB address of token B in the pair
    /// @param tickSpacing tickspacing of the pool
    /// @return gauge address of the gauge
    function gaugeForClPool(
        address tokenA,
        address tokenB,
        int24 tickSpacing
    ) external view returns (address gauge);

    /// @notice returns the array of all tickspacings for the tokenA/tokenB combination
    /// @param tokenA address of token A in the pair
    /// @param tokenB address of token B in the pair
    /// @return _ts array of all the tickspacings
    function tickSpacingsForPair(
        address tokenA,
        address tokenB
    ) external view returns (int24[] memory _ts);

    /// @notice returns the main tickspacing used in the gauge/governance process
    /// @param tokenA address of token A in the pair
    /// @param tokenB address of token B in the pair
    /// @return _ts the main tickspacing
    function mainTickSpacingForPair(
        address tokenA,
        address tokenB
    ) external view returns (int24 _ts);

    /// @notice returns the block.timestamp divided by 1 week in seconds
    /// @return period the period used for gauges
    function getPeriod() external view returns (uint256 period);

    /// @notice cast a vote to direct emissions to gauges and earn incentives
    /// @param owner address of the owner
    /// @param _pools the list of pools to vote on
    /// @param _weights an arbitrary weight per pool which will be normalized to 100% regardless of numerical inputs
    function vote(
        address owner,
        address[] calldata _pools,
        uint256[] calldata _weights
    ) external;

    /// @notice reset the vote of an address
    /// @param owner address of the owner
    function reset(address owner) external;

    /// @notice set the governor address
    /// @param _governor the new governor address
    function setGovernor(address _governor) external;

    /// @notice recover stuck emissions
    /// @param _gauge the gauge address
    /// @param _period the period
    function stuckEmissionsRecovery(address _gauge, uint256 _period) external;

    /// @notice whitelists extra rewards for a gauge
    /// @param _gauge the gauge to whitelist rewards to
    /// @param _reward the reward to whitelist
    function whitelistGaugeRewards(address _gauge, address _reward) external;

    /// @notice removes a reward from the gauge whitelist
    /// @param _gauge the gauge to remove the whitelist from
    /// @param _reward the reward to remove from the whitelist
    function removeGaugeRewardWhitelist(
        address _gauge,
        address _reward
    ) external;

    /// @notice creates a legacy gauge for the pool
    /// @param _pool pool's address
    /// @return _gauge address of the new gauge
    function createGauge(address _pool) external returns (address _gauge);

    /// @notice create a concentrated liquidity gauge
    /// @param tokenA the address of tokenA
    /// @param tokenB the address of tokenB
    /// @param tickSpacing the tickspacing of the pool
    /// @return _clGauge address of the new gauge
    function createCLGauge(
        address tokenA,
        address tokenB,
        int24 tickSpacing
    ) external returns (address _clGauge);

    /// @notice claim concentrated liquidity gauge rewards for specific NFP token ids
    /// @param _gauges array of gauges
    /// @param _tokens two dimensional array for the tokens to claim
    /// @param _nfpTokenIds two dimensional array for the NFPs
    function claimClGaugeRewards(
        address[] calldata _gauges,
        address[][] calldata _tokens,
        uint256[][] calldata _nfpTokenIds
    ) external;

    /// @notice claim arbitrary rewards from specific feeDists
    /// @param owner address of the owner
    /// @param _feeDistributors address of the feeDists
    /// @param _tokens two dimensional array for the tokens to claim
    function claimIncentives(
        address owner,
        address[] calldata _feeDistributors,
        address[][] calldata _tokens
    ) external;

    /// @notice claim arbitrary rewards from specific gauges
    /// @param _gauges address of the gauges
    /// @param _tokens two dimensional array for the tokens to claim
    function claimRewards(
        address[] calldata _gauges,
        address[][] calldata _tokens
    ) external;

    /// @notice claim arbitrary rewards from specific legacy gauges, and exit to shadow
    /// @param _gauges address of the gauges
    /// @param _tokens two dimensional array for the tokens to claim
    function claimLegacyRewardsAndExit(
        address[] calldata _gauges,
        address[][] calldata _tokens
    ) external;

    /// @notice distribute emissions to a gauge for a specific period
    /// @param _gauge address of the gauge
    /// @param _period value of the period
    function distributeForPeriod(address _gauge, uint256 _period) external;

    /// @notice attempt distribution of emissions to all gauges
    function distributeAll() external;

    /// @notice distribute emissions to gauges by index
    /// @param startIndex start of the loop
    /// @param endIndex end of the loop
    function batchDistributeByIndex(
        uint256 startIndex,
        uint256 endIndex
    ) external;

    /// @notice returns the votes cast for a tokenID
    /// @param owner address of the owner
    /// @return votes an array of votes casted
    /// @return weights an array of the weights casted per pool
    function getVotes(
        address owner,
        uint256 period
    ) external view returns (address[] memory votes, uint256[] memory weights);

    /// @notice returns an array of all the gauges
    /// @return _gauges the array of gauges
    function getAllGauges() external view returns (address[] memory _gauges);

    /// @notice returns an array of all the feeDists
    /// @return _feeDistributors the array of feeDists
    function getAllFeeDistributors()
        external
        view
        returns (address[] memory _feeDistributors);

    /// @notice sets the xShadowRatio default
    function setGlobalRatio(uint256 _xRatio) external;

    /// @notice whether the token is whitelisted in governance
    function isWhitelisted(address _token) external view returns (bool _tf);

    /// @notice function for removing malicious or stuffed tokens
    function removeFeeDistributorReward(
        address _feeDist,
        address _token
    ) external;
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_gsnake","type":"address"},{"internalType":"address","name":"_bribesSafe","type":"address"},{"internalType":"uint256","name":"_poolStartTime","type":"uint256"},{"internalType":"address","name":"_voter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_depFee","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_lastRewardTime","type":"uint256"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_allocPoints","type":"uint256[]"},{"internalType":"uint256[]","name":"_depFees","type":"uint256[]"},{"internalType":"contract IERC20[]","name":"_tokens","type":"address[]"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_lastRewardTime","type":"uint256"}],"name":"addBulk","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bribesSafe","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_pids","type":"uint256[]"},{"internalType":"uint256[]","name":"_allocPoints","type":"uint256[]"},{"internalType":"uint256[]","name":"_depFees","type":"uint256[]"}],"name":"bulkSet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"claimLegacyRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"enableGauge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromTime","type":"uint256"},{"internalType":"uint256","name":"_toTime","type":"uint256"}],"name":"getGeneratedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"governanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gsnake","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromPid","type":"uint256"},{"internalType":"uint256","name":"_toPid","type":"uint256"}],"name":"massUpdatePoolsInRange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"depFee","type":"uint256"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accGsnakePerShare","type":"uint256"},{"internalType":"bool","name":"isStarted","type":"bool"},{"components":[{"internalType":"bool","name":"isGauge","type":"bool"},{"internalType":"contract IGauge","name":"gauge","type":"address"},{"internalType":"address[]","name":"rewardTokens","type":"address[]"}],"internalType":"struct GSnakeRewardPool.GaugeInfo","name":"gaugeInfo","type":"tuple"},{"internalType":"uint256","name":"poolGsnakePerSec","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"runningTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_depFee","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bribesSafe","type":"address"}],"name":"setBribesSafe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address[]","name":"_rewardTokens","type":"address[]"}],"name":"setGaugeRewardTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sharePerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePoolWithGaugeDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"voter","outputs":[{"internalType":"contract IVoter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"xSHADOW","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6080604052600480546001600160a01b031916735050bc082ff4a74fb6b0b04385defddb114b242417905560006008819055600b556303c26700600c5534801561004857600080fd5b5060405161426e38038061426e833981016040819052610067916113b1565b60016000554282116100c05760405162461bcd60e51b815260206004820181905260248201527f706f6f6c2063616e74206265207374617274656420696e20746865207061737460448201526064015b60405180910390fd5b6001600160a01b038416156100eb57600280546001600160a01b0319166001600160a01b0386161790555b6001600160a01b0383161561011657600580546001600160a01b0319166001600160a01b0385161790555b6009829055600c546101289083611415565b600a5560018054336001600160a01b0319918216179091556003805482166001600160a01b03848116919091179091556005805490921690851617905561018e6602071e33f7ba73600073287c6882de298665977787e268f3dba052a6e25181806101c0565b6101b766015a1422a526f7600073b901d7316447c84f4417b8a8268e2822095051e681806101c0565b5050505061164d565b6001546001600160a01b0316331461021d5760405162461bcd60e51b815260206004820152602c602482015260008051602061424e83398151915260448201526b3a34329037b832b930ba37b960a11b60648201526084016100b7565b610226836104c7565b811561023457610234610566565b600954421015610263578060000361024f5750600954610277565b60095481101561025e57506009545b610277565b80158061026f57504281105b156102775750425b60006009548211158061028a5750428211155b6040805160018082528183019092529192506000919060208083019080368337505060045482519293506001600160a01b0316918391506000906102d0576102d061143e565b60200260200101906001600160a01b031690816001600160a01b0316815250506006604051806101000160405280876001600160a01b03168152602001888152602001898152602001858152602001600081526020018415158152602001604051806060016040528060001515815260200160006001600160a01b0316815260200185815250815260200189815250908060018154018082558091505060019003906000526020600020906009020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548160ff02191690831515021790555060c08201518160060160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a8154816001600160a01b0302191690836001600160a01b03160217905550604082015181600101908051906020019061046f92919061131b565b50505060e091909101516008909101556006546104979061049290600190611454565b610592565b81156104be576008546104aa90886107b1565b600855600b546104ba90886107b1565b600b555b50505050505050565b60065460005b8181101561056157826001600160a01b0316600682815481106104f2576104f261143e565b60009182526020909120600990910201546001600160a01b0316036105595760405162461bcd60e51b815260206004820181905260248201527f47536e616b65526577617264506f6f6c3a206578697374696e6720706f6f6c3f60448201526064016100b7565b6001016104cd565b505050565b60065460005b8181101561058e5761057d816107c6565b610586816109cf565b60010161056c565b5050565b6001546001600160a01b031633146105ef5760405162461bcd60e51b815260206004820152602c602482015260008051602061424e83398151915260448201526b3a34329037b832b930ba37b960a11b60648201526084016100b7565b600354600680546000926001600160a01b031691632045be9091859081106106195761061961143e565b600091825260209091206009909102015460405160e083901b6001600160e01b03191681526001600160a01b039091166004820152602401602060405180830381865afa15801561066e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106929190611467565b90506001600160a01b0381161561058e5760408051600180825281830190925260009160208083019080368337505060045482519293506001600160a01b0316918391506000906106e5576106e561143e565b60200260200101906001600160a01b031690816001600160a01b0316815250506040518060600160405280600115158152602001836001600160a01b03168152602001828152506006848154811061073f5761073f61143e565b60009182526020918290208351600660099093029091019182018054858501516001600160a01b031661010002610100600160a81b0319931515939093166001600160a81b0319909116179190911781556040840151805191936107a9936007019291019061131b565b505050505050565b60006107bd8284611415565b90505b92915050565b6107cf816109cf565b6000600682815481106107e4576107e461143e565b9060005260206000209060090201905080600301544211610803575050565b600681015460009060ff166108825781546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610859573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061087d9190611482565b6108f4565b60068201546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa1580156108d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f49190611482565b90508060000361090957504260039091015550565b600582015460ff1661094d5760058201805460ff191660011790556002820154600854610935916107b1565b6008908155820154600b54610949916107b1565b600b555b600854156109c057600061096b836003015442610bea60201b60201c565b9050600061099260085461098c866002015485610c9960201b90919060201c565b90610ca5565b90506109b86109ad8461098c84670de0b6b3a7640000610c99565b6004860154906107b1565b600485015550505b42600383015561056183610cb1565b6000600682815481106109e4576109e461143e565b60009182526020822060099190910201600681015481546040516370a0823160e01b81523060048201529294506101009091046001600160a01b0390811693929116906370a0823190602401602060405180830381865afa158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190611482565b600684015490915060ff1615610be4578015610be4578254604051636eb1769f60e11b81523060048201526001600160a01b0384811660248301528392169063dd62ed3e90604401602060405180830381865afa158015610ad6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afa9190611482565b1015610b7957825460405163095ea7b360e01b81526001600160a01b03848116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af1158015610b53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b77919061149b565b505b60068301546040516317a790f160e11b8152306004820152602481018390526101009091046001600160a01b031690632f4f21e290604401600060405180830381600087803b158015610bcb57600080fd5b505af1158015610bdf573d6000803e3d6000fd5b505050505b50505050565b6000818310610bfb575060006107c0565b600a548210610c5857600a548310610c15575060006107c0565b6009548311610c4357600b54600954600a54610c3c9291610c36919061105b565b90610c99565b90506107c0565b600b54600a54610c3c9190610c36908661105b565b6009548211610c69575060006107c0565b6009548311610c8857600b54600954610c3c9190610c3690859061105b565b600b54610c3c90610c36848661105b565b60006107bd82846114c4565b60006107bd82846114db565b600060068281548110610cc657610cc661143e565b60009182526020909120600990910201600681015490915060ff161561058e5760078101541561058e5760078101546000906001600160401b03811115610d0f57610d0f611428565b604051908082528060200260200182016040528015610d38578160200160208202803683370190505b50905060005b6007830154811015610dfa5760078301805482908110610d6057610d6061143e565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610db1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd59190611482565b828281518110610de757610de761143e565b6020908102919091010152600101610d3e565b5060408051600180825281830190925260009160208083019080368337019050506006840154815191925061010090046001600160a01b0316908290600090610e4557610e4561143e565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020015b6060815260200190600190039081610e7557505060078501805460408051602080840282018101909252828152939450830182828015610ede57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ec0575b505050505081600081518110610ef657610ef661143e565b60209081029190910101526003546040516320b1cb6f60e01b81526001600160a01b03909116906320b1cb6f90610f3390859085906004016114fd565b600060405180830381600087803b158015610f4d57600080fd5b505af1158015610f61573d6000803e3d6000fd5b5050505060005b60078501548110156107a9576000856006016001018281548110610f8e57610f8e61143e565b60009182526020822001546040516370a0823160e01b81523060048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa158015610fe1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110059190611482565b9050600086848151811061101b5761101b61143e565b60200260200101518261102e9190611454565b9050801561105057600554611050906001600160a01b03858116911683611067565b505050600101610f68565b60006107bd8284611454565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663a9059cbb60e01b179091526105619185916110bd16565b6040805180820190915260208082527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649082015260009061110a906001600160a01b03851690849061118a565b905080516000148061112b57508080602001905181019061112b919061149b565b6105615760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016100b7565b606061119984846000856111a1565b949350505050565b6060824710156112025760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016100b7565b600080866001600160a01b0316858760405161121e91906115fe565b60006040518083038185875af1925050503d806000811461125b576040519150601f19603f3d011682016040523d82523d6000602084013e611260565b606091505b5090925090506112728783838761127d565b979650505050505050565b606083156112ec5782516000036112e5576001600160a01b0385163b6112e55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016100b7565b5081611199565b61119983838151156113015781518083602001fd5b8060405162461bcd60e51b81526004016100b7919061161a565b828054828255906000526020600020908101928215611370579160200282015b8281111561137057825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061133b565b5061137c929150611380565b5090565b5b8082111561137c5760008155600101611381565b80516001600160a01b03811681146113ac57600080fd5b919050565b600080600080608085870312156113c757600080fd5b6113d085611395565b93506113de60208601611395565b604086015190935091506113f460608601611395565b905092959194509250565b634e487b7160e01b600052601160045260246000fd5b808201808211156107c0576107c06113ff565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b818103818111156107c0576107c06113ff565b60006020828403121561147957600080fd5b6107bd82611395565b60006020828403121561149457600080fd5b5051919050565b6000602082840312156114ad57600080fd5b815180151581146114bd57600080fd5b9392505050565b80820281158282048414176107c0576107c06113ff565b6000826114f857634e487b7160e01b600052601260045260246000fd5b500490565b6040808252835190820181905260009060208501906060840190835b818110156115405783516001600160a01b0316835260209384019390920191600101611519565b50508381036020850152809150845180825260208201925060208160051b8301016020870160005b838110156115cc57848303601f190186528151805180855260209182019185019060005b818110156115b35783516001600160a01b031683526020938401939092019160010161158c565b5050602097880197909450929092019150600101611568565b509098975050505050505050565b60005b838110156115f55781810151838201526020016115dd565b50506000910152565b600082516116108184602087016115da565b9190910192915050565b60208152600082518060208401526116398160408501602087016115da565b601f01601f19169190910160400192915050565b612bf28061165c6000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c806362d303681161010f578063b3ab15fb116100a2578063cf4b55cb11610071578063cf4b55cb14610414578063de89c76c14610427578063e2bbb1581461043a578063fddc298c1461044d57600080fd5b8063b3ab15fb146103c8578063b947a88d146103db578063cec39bd1146103ee578063ced8a5d71461040157600080fd5b806390c5ed6a116100de57806390c5ed6a1461035257806393f1a40b14610365578063943f013d146103ac578063b2c75f8c146103b557600080fd5b806362d303681461031b578063630b5ba11461032e5780636e271dd5146103365780636ef3c44c1461033f57600080fd5b8063441a3e701161018757806354575af41161015657806354575af4146102e3578063570ca735146102f65780635752933a146103095780635f96dc111461031257600080fd5b8063441a3e701461029757806346c96aac146102aa5780634e2768ca146102bd5780635312ea8e146102d057600080fd5b806317caf6f1116101c357806317caf6f114610253578063231f0c6a1461025c5780632df95ed71461026f57806343b0e8df1461028457600080fd5b8063081e3eda146101ea57806311284b42146102015780631526fe271461022c575b600080fd5b6006545b6040519081526020015b60405180910390f35b600454610214906001600160a01b031681565b6040516001600160a01b0390911681526020016101f8565b61023f61023a366004612511565b610460565b6040516101f898979695949392919061256f565b6101ee60085481565b6101ee61026a3660046125f2565b61058d565b61028261027d366004612511565b610652565b005b610282610292366004612614565b61086d565b6102826102a53660046125f2565b610941565b600354610214906001600160a01b031681565b6102826102cb366004612511565b610b28565b6102826102de366004612511565b610d14565b6102826102f1366004612655565b610dcc565b600154610214906001600160a01b031681565b6101ee600b5481565b6101ee60095481565b6102826103293660046126f1565b610ebb565b610282610fc0565b6101ee600a5481565b61028261034d3660046127b4565b610fe8565b610282610360366004612800565b6110b4565b610397610373366004612852565b60076020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016101f8565b6101ee600c5481565b6102826103c3366004612511565b611383565b6102826103d6366004612882565b61172e565b6102826103e93660046125f2565b61177a565b600254610214906001600160a01b031681565b61028261040f366004612882565b6117fa565b6101ee610422366004612852565b611846565b600554610214906001600160a01b031681565b6102826104483660046125f2565b611a2b565b61028261045b36600461289f565b611c03565b6006818154811061047057600080fd5b90600052602060002090600902016000915090508060000160009054906101000a90046001600160a01b0316908060010154908060020154908060030154908060040154908060050160009054906101000a900460ff1690806006016040518060600160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820180548060200260200160405190810160405280929190818152602001828054801561057a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161055c575b5050509190925250505060089091015488565b600081831061059e5750600061064c565b600a54821061060657600a5483106105b85750600061064c565b60095483116105eb576105e4600b546105de600954600a54611ced90919063ffffffff16565b90611d00565b905061064c565b6105e4600b546105de85600a54611ced90919063ffffffff16565b60095482116106175750600061064c565b600954831161063b576105e4600b546105de60095485611ced90919063ffffffff16565b600b546105e4906105de8486611ced565b92915050565b60006006828154811061066757610667612945565b60009182526020822060099190910201600681015481546040516370a0823160e01b81523060048201529294506101009091046001600160a01b0390811693929116906370a0823190602401602060405180830381865afa1580156106d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f4919061295b565b600684015490915060ff1615610867578015610867578254604051636eb1769f60e11b81523060048201526001600160a01b0384811660248301528392169063dd62ed3e90604401602060405180830381865afa158015610759573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077d919061295b565b10156107fc57825460405163095ea7b360e01b81526001600160a01b03848116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af11580156107d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fa9190612974565b505b60068301546040516317a790f160e11b8152306004820152602481018390526101009091046001600160a01b031690632f4f21e290604401600060405180830381600087803b15801561084e57600080fd5b505af1158015610862573d6000803e3d6000fd5b505050505b50505050565b6001546001600160a01b031633146108a05760405162461bcd60e51b815260040161089790612991565b60405180910390fd5b6108a8610fc0565b6000600684815481106108bd576108bd612945565b9060005260206000209060090201905060c882106108da57600080fd5b60018101829055600581015460ff161561092f576109118361090b8360020154600854611ced90919063ffffffff16565b90611d0c565b6008908155810154600b5461092b91859161090b91611ced565b600b555b60028101839055600801919091555050565b610949611d18565b600033905060006006848154811061096357610963612945565b600091825260208083208784526007825260408085206001600160a01b038816865290925292208054600990920290920192508411156109da5760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b6044820152606401610897565b6109e385611d71565b6109ec85610652565b6000610a298260010154610a23670de0b6b3a7640000610a1d87600401548760000154611d0090919063ffffffff16565b90611f6e565b90611ced565b90508015610a7f57610a3b8482611f7a565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048682604051610a7691815260200190565b60405180910390a25b8415610ab3578154610a919086611ced565b8255610a9d8686612025565b8254610ab3906001600160a01b031685876120ba565b60048301548254610ad191670de0b6b3a764000091610a1d91611d00565b600183015560405185815286906001600160a01b038616907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a350505050610b246001600055565b5050565b6001546001600160a01b03163314610b525760405162461bcd60e51b815260040161089790612991565b600354600680546000926001600160a01b031691632045be909185908110610b7c57610b7c612945565b600091825260209091206009909102015460405160e083901b6001600160e01b03191681526001600160a01b039091166004820152602401602060405180830381865afa158015610bd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf591906129dd565b90506001600160a01b03811615610b245760408051600180825281830190925260009160208083019080368337505060045482519293506001600160a01b031691839150600090610c4857610c48612945565b60200260200101906001600160a01b031690816001600160a01b0316815250506040518060600160405280600115158152602001836001600160a01b031681526020018281525060068481548110610ca257610ca2612945565b60009182526020918290208351600660099093029091019182018054858501516001600160a01b031661010002610100600160a81b0319931515939093166001600160a81b031990911617919091178155604084015180519193610d0c9360070192910190612444565b505050505050565b610d1c611d18565b600060068281548110610d3157610d31612945565b600091825260208083208584526007825260408085203386529092529220805460099092029092019250610d658482612025565b600080835560018301558254610d85906001600160a01b031633836120ba565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a3505050610dc96001600055565b50565b6001546001600160a01b03163314610df65760405162461bcd60e51b815260040161089790612991565b60065460005b81811015610ea657600060068281548110610e1957610e19612945565b6000918252602090912060099091020180549091506001600160a01b0390811690871603610e9d5760405162461bcd60e51b815260206004820152602b60248201527f5368617265526577617264506f6f6c3a20546f6b656e2063616e6e6f7420626560448201526a103837b7b6103a37b5b2b760a91b6064820152608401610897565b50600101610dfc565b506108676001600160a01b03851683856120ba565b6001546001600160a01b03163314610ee55760405162461bcd60e51b815260040161089790612991565b8685148015610ef357508683145b610f3f5760405162461bcd60e51b815260206004820181905260248201527f47536e616b65526577617264506f6f6c3a20696e76616c6964206c656e6774686044820152606401610897565b60005b87811015610fb557610fad898983818110610f5f57610f5f612945565b90506020020135888884818110610f7857610f78612945565b90506020020135878785818110610f9157610f91612945565b9050602002016020810190610fa69190612882565b86866110b4565b600101610f42565b505050505050505050565b60065460005b81811015610b2457610fd781611d71565b610fe081610652565b600101610fc6565b6001546001600160a01b031633146110125760405162461bcd60e51b815260040161089790612991565b60006006848154811061102757611027612945565b60009182526020909120600990910201600681015490915060ff1661109f5760405162461bcd60e51b815260206004820152602860248201527f536e616b6547656e65736973526577617264506f6f6c3a206e6f7420612067616044820152671d59d9481c1bdbdb60c21b6064820152608401610897565b6110ad6007820184846124a9565b5050505050565b6001546001600160a01b031633146110de5760405162461bcd60e51b815260040161089790612991565b6110e78361211d565b81156110f5576110f5610fc0565b60095442101561112457806000036111105750600954611138565b60095481101561111f57506009545b611138565b80158061113057504281105b156111385750425b60006009548211158061114b5750428211155b6040805160018082528183019092529192506000919060208083019080368337505060045482519293506001600160a01b03169183915060009061119157611191612945565b60200260200101906001600160a01b031690816001600160a01b0316815250506006604051806101000160405280876001600160a01b03168152602001888152602001898152602001858152602001600081526020018415158152602001604051806060016040528060001515815260200160006001600160a01b0316815260200185815250815260200189815250908060018154018082558091505060019003906000526020600020906009020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548160ff02191690831515021790555060c08201518160060160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a8154816001600160a01b0302191690836001600160a01b031602179055506040820151816001019080519060200190611330929190612444565b50505060e09190910151600890910155600654611353906102cb90600190612a26565b811561137a576008546113669088611d0c565b600855600b546113769088611d0c565b600b555b50505050505050565b60006006828154811061139857611398612945565b60009182526020909120600990910201600681015490915060ff1615610b2457600781015415610b2457600781015460009067ffffffffffffffff8111156113e2576113e26129fa565b60405190808252806020026020018201604052801561140b578160200160208202803683370190505b50905060005b60078301548110156114cd576007830180548290811061143357611433612945565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611484573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a8919061295b565b8282815181106114ba576114ba612945565b6020908102919091010152600101611411565b5060408051600180825281830190925260009160208083019080368337019050506006840154815191925061010090046001600160a01b031690829060009061151857611518612945565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020015b6060815260200190600190039081611548575050600785018054604080516020808402820181019092528281529394508301828280156115b157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611593575b5050505050816000815181106115c9576115c9612945565b60209081029190910101526003546040516320b1cb6f60e01b81526001600160a01b03909116906320b1cb6f906116069085908590600401612a39565b600060405180830381600087803b15801561162057600080fd5b505af1158015611634573d6000803e3d6000fd5b5050505060005b6007850154811015610d0c57600085600601600101828154811061166157611661612945565b60009182526020822001546040516370a0823160e01b81523060048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa1580156116b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d8919061295b565b905060008684815181106116ee576116ee612945565b6020026020010151826117019190612a26565b9050801561172357600554611723906001600160a01b038581169116836120ba565b50505060010161163b565b6001546001600160a01b031633146117585760405162461bcd60e51b815260040161089790612991565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b808211156117ca5760405162461bcd60e51b815260206004820152601f60248201527f47536e616b65526577617264506f6f6c3a20696e76616c69642072616e6765006044820152606401610897565b815b8181116117f5576117dc81611d71565b6117e581610652565b6117ee81612ae4565b90506117cc565b505050565b6001546001600160a01b031633146118245760405162461bcd60e51b815260040161089790612991565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000806006848154811061185c5761185c612945565b600091825260208083208784526007825260408085206001600160a01b0389168652909252908320600992909202016004810154600682015491945091929060ff166119125783546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156118e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190d919061295b565b611984565b60068401546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015611960573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611984919061295b565b905083600301544211801561199857508015155b156119f55760006119ad85600301544261058d565b905060006119ce600854610a1d886002015485611d0090919063ffffffff16565b90506119f06119e984610a1d84670de0b6b3a7640000611d00565b8590611d0c565b935050505b611a208360010154610a23670de0b6b3a7640000610a1d868860000154611d0090919063ffffffff16565b979650505050505050565b611a33611d18565b6000339050600060068481548110611a4d57611a4d612945565b600091825260208083208784526007825260408085206001600160a01b0388168652909252922060099091029091019150611a8785611d71565b805415611b17576000611abf8260010154610a23670de0b6b3a7640000610a1d87600401548760000154611d0090919063ffffffff16565b90508015611b1557611ad18482611f7a565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048682604051611b0c91815260200190565b60405180910390a25b505b8315611b8a578154611b34906001600160a01b03168430876121b7565b6000611b53612710610a1d856001015488611d0090919063ffffffff16565b9050611b6a611b628683611ced565b835490611d0c565b82556005548354611b88916001600160a01b039182169116836120ba565b505b611b9385610652565b60048201548154611bb191670de0b6b3a764000091610a1d91611d00565b600182015560405184815285906001600160a01b038516907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a3505050610b246001600055565b6001546001600160a01b03163314611c2d5760405162461bcd60e51b815260040161089790612991565b8483148015611c3b57508481145b611c875760405162461bcd60e51b815260206004820181905260248201527f47536e616b65526577617264506f6f6c3a20696e76616c6964206c656e6774686044820152606401610897565b60005b8581101561137a57611ce5878783818110611ca757611ca7612945565b90506020020135868684818110611cc057611cc0612945565b90506020020135858585818110611cd957611cd9612945565b9050602002013561086d565b600101611c8a565b6000611cf98284612a26565b9392505050565b6000611cf98284612afd565b6000611cf98284612b14565b600260005403611d6a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610897565b6002600055565b611d7a81610652565b600060068281548110611d8f57611d8f612945565b9060005260206000209060090201905080600301544211611dae575050565b600681015460009060ff16611e2d5781546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611e04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e28919061295b565b611e9f565b60068201546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015611e7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e9f919061295b565b905080600003611eb457504260039091015550565b600582015460ff16611ef85760058201805460ff191660011790556002820154600854611ee091611d0c565b6008908155820154600b54611ef491611d0c565b600b555b60085415611f5f576000611f1083600301544261058d565b90506000611f31600854610a1d866002015485611d0090919063ffffffff16565b9050611f57611f4c84610a1d84670de0b6b3a7640000611d00565b600486015490611d0c565b600485015550505b4260038301556117f583611383565b6000611cf98284612b27565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611fc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe7919061295b565b905080156117f5578082111561200e576002546117f5906001600160a01b031684836120ba565b6002546117f5906001600160a01b031684846120ba565b60006006838154811061203a5761203a612945565b60009182526020909120600990910201600681015490915060ff16156117f5576006810154604051632e1a7d4d60e01b8152600481018490526101009091046001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156120a657600080fd5b505af115801561137a573d6000803e3d6000fd5b6040516001600160a01b0383166024820152604481018290526117f590849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526121ef565b60065460005b818110156117f557826001600160a01b03166006828154811061214857612148612945565b60009182526020909120600990910201546001600160a01b0316036121af5760405162461bcd60e51b815260206004820181905260248201527f47536e616b65526577617264506f6f6c3a206578697374696e6720706f6f6c3f6044820152606401610897565b600101612123565b6040516001600160a01b03808516602483015283166044820152606481018290526108679085906323b872dd60e01b906084016120e6565b6000612244826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166122c49092919063ffffffff16565b90508051600014806122655750808060200190518101906122659190612974565b6117f55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610897565b60606122d384846000856122db565b949350505050565b60608247101561233c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610897565b600080866001600160a01b031685876040516123589190612b6d565b60006040518083038185875af1925050503d8060008114612395576040519150601f19603f3d011682016040523d82523d6000602084013e61239a565b606091505b5091509150611a20878383876060831561241557825160000361240e576001600160a01b0385163b61240e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610897565b50816122d3565b6122d3838381511561242a5781518083602001fd5b8060405162461bcd60e51b81526004016108979190612b89565b828054828255906000526020600020908101928215612499579160200282015b8281111561249957825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612464565b506124a59291506124fc565b5090565b828054828255906000526020600020908101928215612499579160200282015b828111156124995781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906124c9565b5b808211156124a557600081556001016124fd565b60006020828403121561252357600080fd5b5035919050565b600081518084526020840193506020830160005b828110156125655781516001600160a01b031686526020958601959091019060010161253e565b5093949350505050565b60018060a01b038916815287602082015286604082015285606082015284608082015283151560a082015261010060c08201528251151561010082015260018060a01b036020840151166101208201526000604084015160606101408401526125dc61016084018261252a565b9150508260e08301529998505050505050505050565b6000806040838503121561260557600080fd5b50508035926020909101359150565b60008060006060848603121561262957600080fd5b505081359360208301359350604090920135919050565b6001600160a01b0381168114610dc957600080fd5b60008060006060848603121561266a57600080fd5b833561267581612640565b925060208401359150604084013561268c81612640565b809150509250925092565b60008083601f8401126126a957600080fd5b50813567ffffffffffffffff8111156126c157600080fd5b6020830191508360208260051b85010111156126dc57600080fd5b9250929050565b8015158114610dc957600080fd5b60008060008060008060008060a0898b03121561270d57600080fd5b883567ffffffffffffffff81111561272457600080fd5b6127308b828c01612697565b909950975050602089013567ffffffffffffffff81111561275057600080fd5b61275c8b828c01612697565b909750955050604089013567ffffffffffffffff81111561277c57600080fd5b6127888b828c01612697565b909550935050606089013561279c816126e3565b979a9699509497939692959194509192608001359150565b6000806000604084860312156127c957600080fd5b83359250602084013567ffffffffffffffff8111156127e757600080fd5b6127f386828701612697565b9497909650939450505050565b600080600080600060a0868803121561281857600080fd5b8535945060208601359350604086013561283181612640565b92506060860135612841816126e3565b949793965091946080013592915050565b6000806040838503121561286557600080fd5b82359150602083013561287781612640565b809150509250929050565b60006020828403121561289457600080fd5b8135611cf981612640565b600080600080600080606087890312156128b857600080fd5b863567ffffffffffffffff8111156128cf57600080fd5b6128db89828a01612697565b909750955050602087013567ffffffffffffffff8111156128fb57600080fd5b61290789828a01612697565b909550935050604087013567ffffffffffffffff81111561292757600080fd5b61293389828a01612697565b979a9699509497509295939492505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561296d57600080fd5b5051919050565b60006020828403121561298657600080fd5b8151611cf9816126e3565b6020808252602c908201527f47536e616b65526577617264506f6f6c3a2063616c6c6572206973206e6f742060408201526b3a34329037b832b930ba37b960a11b606082015260800190565b6000602082840312156129ef57600080fd5b8151611cf981612640565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561064c5761064c612a10565b6040808252835190820181905260009060208501906060840190835b81811015612a7c5783516001600160a01b0316835260209384019390920191600101612a55565b50508381036020850152809150845180825260208201925060208160051b8301016020870160005b83811015612ad657601f19858403018652612ac083835161252a565b6020968701969093509190910190600101612aa4565b509098975050505050505050565b600060018201612af657612af6612a10565b5060010190565b808202811582820484141761064c5761064c612a10565b8082018082111561064c5761064c612a10565b600082612b4457634e487b7160e01b600052601260045260246000fd5b500490565b60005b83811015612b64578181015183820152602001612b4c565b50506000910152565b60008251612b7f818460208701612b49565b9190910192915050565b6020815260008251806020840152612ba8816040850160208701612b49565b601f01601f1916919091016040019291505056fea2646970667358221220cf1f6b87869337724feaaa35fbe04561bc82ae60e967137b1458fb9c3d415c5364736f6c634300081a003347536e616b65526577617264506f6f6c3a2063616c6c6572206973206e6f7420000000000000000000000000674a430f531847a6f8976a900f8ace765f896a1b000000000000000000000000a906b773bf4e1f5c668eedeed06aa8917057ea7d0000000000000000000000000000000000000000000000000000000067b0d6200000000000000000000000003af1dd7a2755201f8e2d6dcda1a61d9f54838f4f

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101e55760003560e01c806362d303681161010f578063b3ab15fb116100a2578063cf4b55cb11610071578063cf4b55cb14610414578063de89c76c14610427578063e2bbb1581461043a578063fddc298c1461044d57600080fd5b8063b3ab15fb146103c8578063b947a88d146103db578063cec39bd1146103ee578063ced8a5d71461040157600080fd5b806390c5ed6a116100de57806390c5ed6a1461035257806393f1a40b14610365578063943f013d146103ac578063b2c75f8c146103b557600080fd5b806362d303681461031b578063630b5ba11461032e5780636e271dd5146103365780636ef3c44c1461033f57600080fd5b8063441a3e701161018757806354575af41161015657806354575af4146102e3578063570ca735146102f65780635752933a146103095780635f96dc111461031257600080fd5b8063441a3e701461029757806346c96aac146102aa5780634e2768ca146102bd5780635312ea8e146102d057600080fd5b806317caf6f1116101c357806317caf6f114610253578063231f0c6a1461025c5780632df95ed71461026f57806343b0e8df1461028457600080fd5b8063081e3eda146101ea57806311284b42146102015780631526fe271461022c575b600080fd5b6006545b6040519081526020015b60405180910390f35b600454610214906001600160a01b031681565b6040516001600160a01b0390911681526020016101f8565b61023f61023a366004612511565b610460565b6040516101f898979695949392919061256f565b6101ee60085481565b6101ee61026a3660046125f2565b61058d565b61028261027d366004612511565b610652565b005b610282610292366004612614565b61086d565b6102826102a53660046125f2565b610941565b600354610214906001600160a01b031681565b6102826102cb366004612511565b610b28565b6102826102de366004612511565b610d14565b6102826102f1366004612655565b610dcc565b600154610214906001600160a01b031681565b6101ee600b5481565b6101ee60095481565b6102826103293660046126f1565b610ebb565b610282610fc0565b6101ee600a5481565b61028261034d3660046127b4565b610fe8565b610282610360366004612800565b6110b4565b610397610373366004612852565b60076020908152600092835260408084209091529082529020805460019091015482565b604080519283526020830191909152016101f8565b6101ee600c5481565b6102826103c3366004612511565b611383565b6102826103d6366004612882565b61172e565b6102826103e93660046125f2565b61177a565b600254610214906001600160a01b031681565b61028261040f366004612882565b6117fa565b6101ee610422366004612852565b611846565b600554610214906001600160a01b031681565b6102826104483660046125f2565b611a2b565b61028261045b36600461289f565b611c03565b6006818154811061047057600080fd5b90600052602060002090600902016000915090508060000160009054906101000a90046001600160a01b0316908060010154908060020154908060030154908060040154908060050160009054906101000a900460ff1690806006016040518060600160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820180548060200260200160405190810160405280929190818152602001828054801561057a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161055c575b5050509190925250505060089091015488565b600081831061059e5750600061064c565b600a54821061060657600a5483106105b85750600061064c565b60095483116105eb576105e4600b546105de600954600a54611ced90919063ffffffff16565b90611d00565b905061064c565b6105e4600b546105de85600a54611ced90919063ffffffff16565b60095482116106175750600061064c565b600954831161063b576105e4600b546105de60095485611ced90919063ffffffff16565b600b546105e4906105de8486611ced565b92915050565b60006006828154811061066757610667612945565b60009182526020822060099190910201600681015481546040516370a0823160e01b81523060048201529294506101009091046001600160a01b0390811693929116906370a0823190602401602060405180830381865afa1580156106d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f4919061295b565b600684015490915060ff1615610867578015610867578254604051636eb1769f60e11b81523060048201526001600160a01b0384811660248301528392169063dd62ed3e90604401602060405180830381865afa158015610759573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077d919061295b565b10156107fc57825460405163095ea7b360e01b81526001600160a01b03848116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af11580156107d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107fa9190612974565b505b60068301546040516317a790f160e11b8152306004820152602481018390526101009091046001600160a01b031690632f4f21e290604401600060405180830381600087803b15801561084e57600080fd5b505af1158015610862573d6000803e3d6000fd5b505050505b50505050565b6001546001600160a01b031633146108a05760405162461bcd60e51b815260040161089790612991565b60405180910390fd5b6108a8610fc0565b6000600684815481106108bd576108bd612945565b9060005260206000209060090201905060c882106108da57600080fd5b60018101829055600581015460ff161561092f576109118361090b8360020154600854611ced90919063ffffffff16565b90611d0c565b6008908155810154600b5461092b91859161090b91611ced565b600b555b60028101839055600801919091555050565b610949611d18565b600033905060006006848154811061096357610963612945565b600091825260208083208784526007825260408085206001600160a01b038816865290925292208054600990920290920192508411156109da5760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b6044820152606401610897565b6109e385611d71565b6109ec85610652565b6000610a298260010154610a23670de0b6b3a7640000610a1d87600401548760000154611d0090919063ffffffff16565b90611f6e565b90611ced565b90508015610a7f57610a3b8482611f7a565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048682604051610a7691815260200190565b60405180910390a25b8415610ab3578154610a919086611ced565b8255610a9d8686612025565b8254610ab3906001600160a01b031685876120ba565b60048301548254610ad191670de0b6b3a764000091610a1d91611d00565b600183015560405185815286906001600160a01b038616907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a350505050610b246001600055565b5050565b6001546001600160a01b03163314610b525760405162461bcd60e51b815260040161089790612991565b600354600680546000926001600160a01b031691632045be909185908110610b7c57610b7c612945565b600091825260209091206009909102015460405160e083901b6001600160e01b03191681526001600160a01b039091166004820152602401602060405180830381865afa158015610bd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf591906129dd565b90506001600160a01b03811615610b245760408051600180825281830190925260009160208083019080368337505060045482519293506001600160a01b031691839150600090610c4857610c48612945565b60200260200101906001600160a01b031690816001600160a01b0316815250506040518060600160405280600115158152602001836001600160a01b031681526020018281525060068481548110610ca257610ca2612945565b60009182526020918290208351600660099093029091019182018054858501516001600160a01b031661010002610100600160a81b0319931515939093166001600160a81b031990911617919091178155604084015180519193610d0c9360070192910190612444565b505050505050565b610d1c611d18565b600060068281548110610d3157610d31612945565b600091825260208083208584526007825260408085203386529092529220805460099092029092019250610d658482612025565b600080835560018301558254610d85906001600160a01b031633836120ba565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a3505050610dc96001600055565b50565b6001546001600160a01b03163314610df65760405162461bcd60e51b815260040161089790612991565b60065460005b81811015610ea657600060068281548110610e1957610e19612945565b6000918252602090912060099091020180549091506001600160a01b0390811690871603610e9d5760405162461bcd60e51b815260206004820152602b60248201527f5368617265526577617264506f6f6c3a20546f6b656e2063616e6e6f7420626560448201526a103837b7b6103a37b5b2b760a91b6064820152608401610897565b50600101610dfc565b506108676001600160a01b03851683856120ba565b6001546001600160a01b03163314610ee55760405162461bcd60e51b815260040161089790612991565b8685148015610ef357508683145b610f3f5760405162461bcd60e51b815260206004820181905260248201527f47536e616b65526577617264506f6f6c3a20696e76616c6964206c656e6774686044820152606401610897565b60005b87811015610fb557610fad898983818110610f5f57610f5f612945565b90506020020135888884818110610f7857610f78612945565b90506020020135878785818110610f9157610f91612945565b9050602002016020810190610fa69190612882565b86866110b4565b600101610f42565b505050505050505050565b60065460005b81811015610b2457610fd781611d71565b610fe081610652565b600101610fc6565b6001546001600160a01b031633146110125760405162461bcd60e51b815260040161089790612991565b60006006848154811061102757611027612945565b60009182526020909120600990910201600681015490915060ff1661109f5760405162461bcd60e51b815260206004820152602860248201527f536e616b6547656e65736973526577617264506f6f6c3a206e6f7420612067616044820152671d59d9481c1bdbdb60c21b6064820152608401610897565b6110ad6007820184846124a9565b5050505050565b6001546001600160a01b031633146110de5760405162461bcd60e51b815260040161089790612991565b6110e78361211d565b81156110f5576110f5610fc0565b60095442101561112457806000036111105750600954611138565b60095481101561111f57506009545b611138565b80158061113057504281105b156111385750425b60006009548211158061114b5750428211155b6040805160018082528183019092529192506000919060208083019080368337505060045482519293506001600160a01b03169183915060009061119157611191612945565b60200260200101906001600160a01b031690816001600160a01b0316815250506006604051806101000160405280876001600160a01b03168152602001888152602001898152602001858152602001600081526020018415158152602001604051806060016040528060001515815260200160006001600160a01b0316815260200185815250815260200189815250908060018154018082558091505060019003906000526020600020906009020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548160ff02191690831515021790555060c08201518160060160008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a8154816001600160a01b0302191690836001600160a01b031602179055506040820151816001019080519060200190611330929190612444565b50505060e09190910151600890910155600654611353906102cb90600190612a26565b811561137a576008546113669088611d0c565b600855600b546113769088611d0c565b600b555b50505050505050565b60006006828154811061139857611398612945565b60009182526020909120600990910201600681015490915060ff1615610b2457600781015415610b2457600781015460009067ffffffffffffffff8111156113e2576113e26129fa565b60405190808252806020026020018201604052801561140b578160200160208202803683370190505b50905060005b60078301548110156114cd576007830180548290811061143357611433612945565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611484573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a8919061295b565b8282815181106114ba576114ba612945565b6020908102919091010152600101611411565b5060408051600180825281830190925260009160208083019080368337019050506006840154815191925061010090046001600160a01b031690829060009061151857611518612945565b6001600160a01b039290921660209283029190910190910152604080516001808252818301909252600091816020015b6060815260200190600190039081611548575050600785018054604080516020808402820181019092528281529394508301828280156115b157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611593575b5050505050816000815181106115c9576115c9612945565b60209081029190910101526003546040516320b1cb6f60e01b81526001600160a01b03909116906320b1cb6f906116069085908590600401612a39565b600060405180830381600087803b15801561162057600080fd5b505af1158015611634573d6000803e3d6000fd5b5050505060005b6007850154811015610d0c57600085600601600101828154811061166157611661612945565b60009182526020822001546040516370a0823160e01b81523060048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa1580156116b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d8919061295b565b905060008684815181106116ee576116ee612945565b6020026020010151826117019190612a26565b9050801561172357600554611723906001600160a01b038581169116836120ba565b50505060010161163b565b6001546001600160a01b031633146117585760405162461bcd60e51b815260040161089790612991565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b808211156117ca5760405162461bcd60e51b815260206004820152601f60248201527f47536e616b65526577617264506f6f6c3a20696e76616c69642072616e6765006044820152606401610897565b815b8181116117f5576117dc81611d71565b6117e581610652565b6117ee81612ae4565b90506117cc565b505050565b6001546001600160a01b031633146118245760405162461bcd60e51b815260040161089790612991565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000806006848154811061185c5761185c612945565b600091825260208083208784526007825260408085206001600160a01b0389168652909252908320600992909202016004810154600682015491945091929060ff166119125783546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156118e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190d919061295b565b611984565b60068401546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015611960573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611984919061295b565b905083600301544211801561199857508015155b156119f55760006119ad85600301544261058d565b905060006119ce600854610a1d886002015485611d0090919063ffffffff16565b90506119f06119e984610a1d84670de0b6b3a7640000611d00565b8590611d0c565b935050505b611a208360010154610a23670de0b6b3a7640000610a1d868860000154611d0090919063ffffffff16565b979650505050505050565b611a33611d18565b6000339050600060068481548110611a4d57611a4d612945565b600091825260208083208784526007825260408085206001600160a01b0388168652909252922060099091029091019150611a8785611d71565b805415611b17576000611abf8260010154610a23670de0b6b3a7640000610a1d87600401548760000154611d0090919063ffffffff16565b90508015611b1557611ad18482611f7a565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048682604051611b0c91815260200190565b60405180910390a25b505b8315611b8a578154611b34906001600160a01b03168430876121b7565b6000611b53612710610a1d856001015488611d0090919063ffffffff16565b9050611b6a611b628683611ced565b835490611d0c565b82556005548354611b88916001600160a01b039182169116836120ba565b505b611b9385610652565b60048201548154611bb191670de0b6b3a764000091610a1d91611d00565b600182015560405184815285906001600160a01b038516907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a3505050610b246001600055565b6001546001600160a01b03163314611c2d5760405162461bcd60e51b815260040161089790612991565b8483148015611c3b57508481145b611c875760405162461bcd60e51b815260206004820181905260248201527f47536e616b65526577617264506f6f6c3a20696e76616c6964206c656e6774686044820152606401610897565b60005b8581101561137a57611ce5878783818110611ca757611ca7612945565b90506020020135868684818110611cc057611cc0612945565b90506020020135858585818110611cd957611cd9612945565b9050602002013561086d565b600101611c8a565b6000611cf98284612a26565b9392505050565b6000611cf98284612afd565b6000611cf98284612b14565b600260005403611d6a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610897565b6002600055565b611d7a81610652565b600060068281548110611d8f57611d8f612945565b9060005260206000209060090201905080600301544211611dae575050565b600681015460009060ff16611e2d5781546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611e04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e28919061295b565b611e9f565b60068201546040516370a0823160e01b81523060048201526101009091046001600160a01b0316906370a0823190602401602060405180830381865afa158015611e7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e9f919061295b565b905080600003611eb457504260039091015550565b600582015460ff16611ef85760058201805460ff191660011790556002820154600854611ee091611d0c565b6008908155820154600b54611ef491611d0c565b600b555b60085415611f5f576000611f1083600301544261058d565b90506000611f31600854610a1d866002015485611d0090919063ffffffff16565b9050611f57611f4c84610a1d84670de0b6b3a7640000611d00565b600486015490611d0c565b600485015550505b4260038301556117f583611383565b6000611cf98284612b27565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611fc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe7919061295b565b905080156117f5578082111561200e576002546117f5906001600160a01b031684836120ba565b6002546117f5906001600160a01b031684846120ba565b60006006838154811061203a5761203a612945565b60009182526020909120600990910201600681015490915060ff16156117f5576006810154604051632e1a7d4d60e01b8152600481018490526101009091046001600160a01b031690632e1a7d4d90602401600060405180830381600087803b1580156120a657600080fd5b505af115801561137a573d6000803e3d6000fd5b6040516001600160a01b0383166024820152604481018290526117f590849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526121ef565b60065460005b818110156117f557826001600160a01b03166006828154811061214857612148612945565b60009182526020909120600990910201546001600160a01b0316036121af5760405162461bcd60e51b815260206004820181905260248201527f47536e616b65526577617264506f6f6c3a206578697374696e6720706f6f6c3f6044820152606401610897565b600101612123565b6040516001600160a01b03808516602483015283166044820152606481018290526108679085906323b872dd60e01b906084016120e6565b6000612244826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166122c49092919063ffffffff16565b90508051600014806122655750808060200190518101906122659190612974565b6117f55760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610897565b60606122d384846000856122db565b949350505050565b60608247101561233c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610897565b600080866001600160a01b031685876040516123589190612b6d565b60006040518083038185875af1925050503d8060008114612395576040519150601f19603f3d011682016040523d82523d6000602084013e61239a565b606091505b5091509150611a20878383876060831561241557825160000361240e576001600160a01b0385163b61240e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610897565b50816122d3565b6122d3838381511561242a5781518083602001fd5b8060405162461bcd60e51b81526004016108979190612b89565b828054828255906000526020600020908101928215612499579160200282015b8281111561249957825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612464565b506124a59291506124fc565b5090565b828054828255906000526020600020908101928215612499579160200282015b828111156124995781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906124c9565b5b808211156124a557600081556001016124fd565b60006020828403121561252357600080fd5b5035919050565b600081518084526020840193506020830160005b828110156125655781516001600160a01b031686526020958601959091019060010161253e565b5093949350505050565b60018060a01b038916815287602082015286604082015285606082015284608082015283151560a082015261010060c08201528251151561010082015260018060a01b036020840151166101208201526000604084015160606101408401526125dc61016084018261252a565b9150508260e08301529998505050505050505050565b6000806040838503121561260557600080fd5b50508035926020909101359150565b60008060006060848603121561262957600080fd5b505081359360208301359350604090920135919050565b6001600160a01b0381168114610dc957600080fd5b60008060006060848603121561266a57600080fd5b833561267581612640565b925060208401359150604084013561268c81612640565b809150509250925092565b60008083601f8401126126a957600080fd5b50813567ffffffffffffffff8111156126c157600080fd5b6020830191508360208260051b85010111156126dc57600080fd5b9250929050565b8015158114610dc957600080fd5b60008060008060008060008060a0898b03121561270d57600080fd5b883567ffffffffffffffff81111561272457600080fd5b6127308b828c01612697565b909950975050602089013567ffffffffffffffff81111561275057600080fd5b61275c8b828c01612697565b909750955050604089013567ffffffffffffffff81111561277c57600080fd5b6127888b828c01612697565b909550935050606089013561279c816126e3565b979a9699509497939692959194509192608001359150565b6000806000604084860312156127c957600080fd5b83359250602084013567ffffffffffffffff8111156127e757600080fd5b6127f386828701612697565b9497909650939450505050565b600080600080600060a0868803121561281857600080fd5b8535945060208601359350604086013561283181612640565b92506060860135612841816126e3565b949793965091946080013592915050565b6000806040838503121561286557600080fd5b82359150602083013561287781612640565b809150509250929050565b60006020828403121561289457600080fd5b8135611cf981612640565b600080600080600080606087890312156128b857600080fd5b863567ffffffffffffffff8111156128cf57600080fd5b6128db89828a01612697565b909750955050602087013567ffffffffffffffff8111156128fb57600080fd5b61290789828a01612697565b909550935050604087013567ffffffffffffffff81111561292757600080fd5b61293389828a01612697565b979a9699509497509295939492505050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561296d57600080fd5b5051919050565b60006020828403121561298657600080fd5b8151611cf9816126e3565b6020808252602c908201527f47536e616b65526577617264506f6f6c3a2063616c6c6572206973206e6f742060408201526b3a34329037b832b930ba37b960a11b606082015260800190565b6000602082840312156129ef57600080fd5b8151611cf981612640565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561064c5761064c612a10565b6040808252835190820181905260009060208501906060840190835b81811015612a7c5783516001600160a01b0316835260209384019390920191600101612a55565b50508381036020850152809150845180825260208201925060208160051b8301016020870160005b83811015612ad657601f19858403018652612ac083835161252a565b6020968701969093509190910190600101612aa4565b509098975050505050505050565b600060018201612af657612af6612a10565b5060010190565b808202811582820484141761064c5761064c612a10565b8082018082111561064c5761064c612a10565b600082612b4457634e487b7160e01b600052601260045260246000fd5b500490565b60005b83811015612b64578181015183820152602001612b4c565b50506000910152565b60008251612b7f818460208701612b49565b9190910192915050565b6020815260008251806020840152612ba8816040850160208701612b49565b601f01601f1916919091016040019291505056fea2646970667358221220cf1f6b87869337724feaaa35fbe04561bc82ae60e967137b1458fb9c3d415c5364736f6c634300081a0033

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

000000000000000000000000674a430f531847a6f8976a900f8ace765f896a1b000000000000000000000000a906b773bf4e1f5c668eedeed06aa8917057ea7d0000000000000000000000000000000000000000000000000000000067b0d6200000000000000000000000003af1dd7a2755201f8e2d6dcda1a61d9f54838f4f

-----Decoded View---------------
Arg [0] : _gsnake (address): 0x674a430f531847a6f8976A900f8ace765f896a1b
Arg [1] : _bribesSafe (address): 0xa906B773bf4E1F5C668EeDEed06aa8917057eA7D
Arg [2] : _poolStartTime (uint256): 1739642400
Arg [3] : _voter (address): 0x3aF1dD7A2755201F8e2D6dCDA1a61d9f54838f4f

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000674a430f531847a6f8976a900f8ace765f896a1b
Arg [1] : 000000000000000000000000a906b773bf4e1f5c668eedeed06aa8917057ea7d
Arg [2] : 0000000000000000000000000000000000000000000000000000000067b0d620
Arg [3] : 0000000000000000000000003af1dd7a2755201f8e2d6dcda1a61d9f54838f4f


Block Transaction Gas Used Reward
view all blocks ##produced##

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.