S Price: $0.51307 (+4.34%)

Token

LockBoxTest (TestReceipt)

Overview

Max Total Supply

143.805380744948195748 TestReceipt

Holders

4

Total Transfers

-

Market

Price

$0.00 @ 0.000000 S

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
LockBoxTest

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 1000 runs

Other Settings:
shanghai EvmVersion
File 1 of 17 : LockBoxTest.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

import {IGauge} from "./interfaces/IGauge.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";
import {IERC20} from "./ERC20/IERC20.sol";
import {ERC20} from "./ERC20/ERC20NonTransferable.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import {AccessControlEnumerable} from "@openzeppelin/contracts/access/extensions/AccessControlEnumerable.sol";

contract LockBoxTest is ERC20, ReentrancyGuard, AccessControlEnumerable {

    error ZeroAmount();
    error InvalidTokenOrAddress();
    error Paused();
    error NotPaused();
    error UnderTimeLock();
    error InvalidLockDuration();
    error NoLock();
    error NoVest();
    error NotAllowed();
    error Expired();

    struct Reward {
        uint rewardRate;
        uint periodFinish;
        uint lastUpdateTime;
        uint rewardPerTokenStored;
    }

    struct UserInfo {
        bool isLocked;
        bool isVested;
        uint lockedFor;
        uint vestedFor;
        uint lockedAmount;
        uint vestedAmount;
    }

    bytes32 internal constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");

    address public immutable stakingToken;
    address public immutable gauge;
    address public immutable beets;
    address public immutable multisig;
    address public immutable treasury;
    address public rewardVester;

    uint internal constant MINLOCK = 4 * 7 * 86400;
    uint internal constant MAXLOCK = 26 * 7 * 86400;
    uint internal constant MAXVEST = 6 * 7 * 86400;

    uint internal constant DURATION = 7 days;
    uint internal constant PRECISION = 10 ** 18;
    uint internal constant PENALTYDIV = 1000;

    // 60% penalty, 40% to lockers, 10% to treasury
    uint internal constant EARLYPENALTY = 600; 
    // Used to calculate lockerRetained based on pre-calculated penalty amount. 40% of Total amount = 83.33% of the 60% penalty amount
    // As it does not return a whole number, we have allowed it to be marginally over the 40% by rounding up to 83.4%
    uint internal constant LOCKRETAINED = 834;

    uint internal unsyncedBeets;
    uint public lastBeetsHarvest;

    bool public paused;
    bool public sonicMigration;

    address[] internal rewards;

    mapping(address token => Reward) internal _rewardData;
    mapping(address token => bool) public isReward;
    mapping(address user => mapping(address token => uint rewardPerToken)) public userRewardPerTokenStored;
    mapping(address user => mapping(address token => uint reward)) public storedRewardsPerUser;
    mapping(address user => UserInfo) public userInfo;

    event LockCreated(address indexed from, uint amount, uint lockEnd);

    event LockAmountIncreased(address indexed from, uint amount);

    event LockExtended(address indexed user, uint amount);

    event LockTransfered(address indexed from, address indexed to, uint amount);

    event UnlockedEarly(address indexed user, uint received, uint retained);

    event LockWithdrawn(address indexed user, uint amount);

    event LockBroken(address indexed user, uint lockAmount);

    event VestCreated(address indexed user, uint amount, uint vestEnd);

    event AddedToVest(address indexed user, uint amount);
    
    event EarlyUnvest(address indexed user, uint amountReceived, uint amountRetained);

    event VestWithdrawn(address indexed user, uint amount);

    event VestBroken(address indexed user, uint vestAmount);

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

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

    event EmergencyWithdraw(uint amount);

    event RewardVesterSet(address indexed newVester);

    event WasPaused(uint amount);

    event UnPaused(uint amount);

    event ShutDown(bool state);

    constructor(
        address[3] memory _operators,
        address _admin,
        address _treasury,
        address _stakingtoken,
        address _gauge,
        address _rewardVester,
        address _beets,
        string memory _name,
        string memory _symbol
    ) ERC20(_name, _symbol) ReentrancyGuard() {
        _grantRole(DEFAULT_ADMIN_ROLE, _admin);
        _grantRole(OPERATOR_ROLE, _admin);
        _grantRole(OPERATOR_ROLE, _operators[0]);
        _grantRole(OPERATOR_ROLE, _operators[1]);
        _grantRole(OPERATOR_ROLE, _operators[2]);

        multisig = _admin;
        treasury = _treasury;
        stakingToken = _stakingtoken;  
        gauge = _gauge;
        rewardVester = _rewardVester;
        beets = _beets;

        rewards.push(_beets);
        isReward[_beets] = true;
      
        IERC20(stakingToken).approve(_gauge, type(uint).max);
    }

    modifier updateReward(address account) {
        _updateReward(account);
        _;
    }

    /// @dev compiled with via-ir, caching is less efficient
    function _updateReward(address account) internal {
        for (uint i; i < rewards.length; i++) {
            _rewardData[rewards[i]].rewardPerTokenStored = rewardPerToken(
                rewards[i]
            );
            _rewardData[rewards[i]].lastUpdateTime = lastTimeRewardApplicable(
                rewards[i]
            );
            if (account != address(0)) {
                storedRewardsPerUser[account][rewards[i]] = earned(
                    rewards[i],
                    account
                );
                userRewardPerTokenStored[account][rewards[i]] = _rewardData[
                    rewards[i]
                ].rewardPerTokenStored;
            }
        }
    }

    // Returns current reward list
    function rewardsList() external view returns (address[] memory _rewards) {
        _rewards = rewards;
    }

    function rewardsListLength() external view returns (uint _length) {
        _length = rewards.length;
    }

    /// @notice returns the last time the reward was modified or periodFinish if the reward has ended
    function lastTimeRewardApplicable(address token) public view returns (uint) {
        return Math.min(_getTimestamp(), _rewardData[token].periodFinish);
    }

    // Returns struct with all stored info regarding a reward token. 
    function rewardData(address token) external view returns (Reward memory data) {
        data = _rewardData[token];
    }

    // Returns depositor's accrued rewards
    function earned(address token,address account) public view returns (uint _reward) {
        uint userRewardRate = _getUserRewardRate();
        _reward =
        (((balanceOf(account) *
            (rewardPerToken(token) -
                userRewardPerTokenStored[account][token])) / PRECISION) * 
                userRewardRate) / 100 +
                storedRewardsPerUser[account][token];
    }

    /// @notice claims all pending locked and non locked rewards for depositor
    function getReward() public nonReentrant updateReward(msg.sender) {
        address user = msg.sender;
        UserInfo storage account = userInfo[user];

        for (uint i; i < rewards.length; i++) {
            uint reward = storedRewardsPerUser[user][rewards[i]];
            if (reward > 0) {
                storedRewardsPerUser[user][rewards[i]] = 0;
                if(rewards[i] == address(this)){
                    if(!account.isLocked && !account.isVested){_unlockReward(reward);
                    } else {
                        
                        // If reward is locked LP receipt, sort if amt is assinged to vest or lock.
                        if (!account.isLocked && account.isVested) {  // Only Vested
                            account.vestedAmount += reward;
                            } else if (account.isLocked && !account.isVested) { // Only locked
                                account.lockedAmount += reward;
                                } else if (account.isLocked && account.isVested) {
                                    if (account.lockedFor >= account.vestedFor) {
                                        account.lockedAmount += reward;
                                        } else {
                                            account.vestedAmount += reward;
                                        }
                                }
                                _mint(user, reward);
                    }
                } else {
                _safeTransfer(rewards[i], user, reward);
                }
                emit ClaimRewards(user, rewards[i], reward);
            } 
        }
    }

    // Returns rewardToken amount 
    function rewardPerToken(address token) public view returns (uint) {
        if (totalSupply() == 0) {
            return _rewardData[token].rewardPerTokenStored;
        }
        return
            _rewardData[token].rewardPerTokenStored +
            ((lastTimeRewardApplicable(token) -
                _rewardData[token].lastUpdateTime) *
                _rewardData[token].rewardRate *
                PRECISION) /
            totalSupply();
    }

    function _getUserRewardRate() internal view returns (uint) {
        address user = msg.sender;
        UserInfo memory account = userInfo[user];

        uint baseRate = 70;
        uint additionalRate;
        uint timeLeft;

        if(account.vestedAmount < account.lockedAmount){
            timeLeft = lockLeft(user);
        } else {timeLeft = vestLeft(user);}
        
        if (timeLeft > 5 * MINLOCK) {
            additionalRate = 30; // 5 to 6 months: 100%
            } else if (timeLeft > 4 * MINLOCK) {
                additionalRate = 24; // 4 to 5 months: 94%
                } else if (timeLeft > 3 * MINLOCK) {
                    additionalRate = 18; // 3 to 4 months: 88%
                    } else if (timeLeft > 2 * MINLOCK) {
                        additionalRate = 12; // 2 to 3 months: 82%
                        } else if (timeLeft > MINLOCK) {
                            additionalRate = 6; // 1 to 2 months: 76%
                        }        
        return baseRate + additionalRate;
    }

    /// @notice User created Lock. 1-6M duration range.
    function createLock(uint amount, uint duration) external nonReentrant updateReward(msg.sender){
        if(paused){revert Paused();}
        if(amount == 0) {revert ZeroAmount();}

        address user = msg.sender;
        UserInfo storage account = userInfo[user];

        if(account.isLocked){revert UnderTimeLock();} // Check if already locked.

        uint timestamp = _getTimestamp();
        uint unlockTime = timestamp + duration;

        if(unlockTime <= timestamp + MINLOCK){unlockTime = timestamp + MINLOCK;}
        if(unlockTime >= timestamp + MAXLOCK){unlockTime = timestamp + MAXLOCK;}

        account.isLocked = true;
        account.lockedFor = unlockTime;

        _safeTransferFrom(stakingToken, user, address(this), amount);
        IGauge(gauge).deposit(amount);
        _mint(user, amount);

        account.lockedAmount += amount;

        emit LockCreated(user, amount, unlockTime);
    }

    // Adds an amount to an active lock.
    function increaseLockAmount(uint amount) external nonReentrant updateReward(msg.sender) {
        if(paused){revert Paused();}
        if(amount == 0) {revert ZeroAmount();}

        address user = msg.sender;
        UserInfo storage account = userInfo[user];

        if(!account.isLocked){revert NoLock();}
        if(_getTimestamp() >= account.lockedFor){revert Expired();}

        _safeTransferFrom(stakingToken, user, address(this), amount);
        IGauge(gauge).deposit(amount);
        _mint(user, amount);

        account.lockedAmount += amount;

        emit LockAmountIncreased(user, amount);
    }

    // Extends duration of an ongoing lock
    function extendLock(uint duration) external nonReentrant {
        if(paused){revert Paused();}
        address user = msg.sender;
        UserInfo storage account = userInfo[user];
        if(!account.isLocked){revert NoLock();}

        uint timestamp = _getTimestamp();
        uint unlockTime = timestamp + duration;

        if(unlockTime <= account.lockedFor){revert InvalidLockDuration();} // Can only increase lock duration
        if(unlockTime < timestamp + MINLOCK){revert InvalidLockDuration();} // Below 1M min
        if(unlockTime >= timestamp + MAXLOCK){unlockTime = timestamp + MAXLOCK;} // 26 weeks max lock

        account.lockedFor = unlockTime;

        emit LockExtended(user, unlockTime);
    }

    function withdrawLock() public nonReentrant updateReward(msg.sender){
        address user = msg.sender;
        UserInfo storage account = userInfo[user];

        if(!account.isLocked){revert NoLock();}
        if(_getTimestamp() < account.lockedFor){revert UnderTimeLock();}

        account.isLocked = false;
        uint userLockBal = account.lockedAmount;
        account.lockedFor = 0;
        account.lockedAmount = 0;

        _burn(user, userLockBal);

        uint gaugeBal = _gaugeBalance();

        if(gaugeBal >= userLockBal){
            IGauge(gauge).withdraw(userLockBal);
        }

        _safeTransfer(stakingToken, user, userLockBal);   

        emit LockWithdrawn(user, userLockBal);
    }

    // Allows locker to exit full or partial position with a 40% penalty.
    function earlyUnlock(uint amount) external nonReentrant updateReward(msg.sender) updateReward(treasury){
        address user = msg.sender;
        UserInfo storage account = userInfo[user];

        if(!account.isLocked){revert NoLock();}
        if(_getTimestamp() >= account.lockedFor){revert Expired();}
        if(amount == 0) {revert ZeroAmount();}
        if(amount > account.lockedAmount){amount = account.lockedAmount;}

        account.lockedAmount -= amount;

        if(account.lockedAmount == 0){account.isLocked = false; account.lockedFor = 0;}

        UserInfo storage protocol = userInfo[treasury];

        uint earlyPenalty = amount * EARLYPENALTY / PENALTYDIV;
        uint userReceived = amount - earlyPenalty;
        uint lockerRetained = earlyPenalty * LOCKRETAINED / PENALTYDIV;
        uint treasuryRetained = earlyPenalty - lockerRetained;

        _burn(user, amount);
        _mint(treasury, treasuryRetained);

        if(!protocol.isLocked){
            protocol.isLocked = true;
            protocol.lockedFor = block.timestamp + MAXLOCK;
            protocol.lockedAmount += treasuryRetained;

        } else {
            protocol.lockedAmount += treasuryRetained;
        }

        _distroEarlyPenalty(lockerRetained);

        uint gaugeBal = _gaugeBalance();

        if(gaugeBal >= userReceived){
            IGauge(gauge).withdraw(userReceived);
        }

        _safeTransfer(stakingToken, user, userReceived);

        emit UnlockedEarly(user, userReceived, lockerRetained + treasuryRetained);
    }

    // Partial or complete transfer of a lock to new or existing lock. If receiver is locked, lockedFor must >= msg.sender's
    // If receiver isn't locked, creates one with the same lockedFor as msg.sender
    function transferLock(address receiver, uint amount) external nonReentrant updateReward(msg.sender) updateReward(receiver){
        address user = msg.sender;
        if(receiver == user){revert InvalidTokenOrAddress();}
        UserInfo storage senderAccount = userInfo[user];

        if(!senderAccount.isLocked){revert NoLock();}
        if(_getTimestamp() >= senderAccount.lockedFor){revert Expired();}
        if(amount == 0){revert NotAllowed();}
        if(amount > senderAccount.lockedAmount){amount = senderAccount.lockedAmount;}

        UserInfo storage receiverAccount = userInfo[receiver];
        if(receiverAccount.isLocked){
            if(receiverAccount.lockedFor < senderAccount.lockedFor){revert NotAllowed();} // Can't transfer to shorter lock.
        } 

        if(!receiverAccount.isLocked){
            receiverAccount.isLocked = true;
            receiverAccount.lockedFor = senderAccount.lockedFor;
            emit LockCreated(receiver, amount, receiverAccount.lockedFor);
        }

        senderAccount.lockedAmount -= amount;

        if(senderAccount.lockedAmount == 0){
            senderAccount.isLocked = false;
            senderAccount.lockedFor = 0;
        }

        _burn(user, amount);
        _mint(receiver, amount);
        receiverAccount.lockedAmount += amount;

        emit LockTransfered(user, receiver, amount);
    }

    // Creates vestLock when calling earlyClaim in RewardVester contract.
    function createVest(address user, uint amount) external nonReentrant updateReward(user){
        if(msg.sender != rewardVester){revert NotAllowed();}
        uint timestamp = _getTimestamp();
        UserInfo storage account = userInfo[user];

        if(account.isVested){
            if(timestamp >= account.vestedFor){revert Expired();}
        }

        if(!account.isVested){
            uint unlockTime = timestamp + MAXVEST;
            account.isVested = true;
            account.vestedFor = unlockTime;
            emit VestCreated(user, amount, unlockTime);
        } else {
            emit AddedToVest(user, amount);
        }

        _safeTransferFrom(stakingToken, rewardVester, address(this), amount);
        account.vestedAmount += amount;

        IGauge(gauge).deposit(amount);
        _mint(user, amount);

    }

    function withdrawVest() public nonReentrant updateReward(msg.sender) {
        address user = msg.sender;
        UserInfo storage account = userInfo[user];

        if(!account.isVested){revert NoVest();}
        if(_getTimestamp() < account.vestedFor){revert UnderTimeLock();}

        uint amount = account.vestedAmount;

        account.vestedAmount = 0;
        account.vestedFor = 0;
        account.isVested = false;
        _burn(user, amount);

        uint gaugeBal = _gaugeBalance();

        if(gaugeBal >= amount){
            IGauge(gauge).withdraw(amount);
        }

        _safeTransfer(stakingToken, user, amount);   

        emit VestWithdrawn(user, amount);
    }

    function earlyUnvest(uint amount) external nonReentrant updateReward(msg.sender) updateReward(treasury){
        address user = msg.sender;
        UserInfo storage account = userInfo[user];

        if(!account.isVested){revert NoVest();}
        if(_getTimestamp() >= account.vestedFor){revert Expired();}
        if(amount == 0) {revert ZeroAmount();}
        if(amount > account.vestedAmount){amount = account.vestedAmount;}

        account.vestedAmount -= amount;
        if(account.vestedAmount == 0){account.isVested = false;}

        uint earlyPenalty = amount * EARLYPENALTY / PENALTYDIV;
        uint userReceived = amount - earlyPenalty;
        uint lockerRetained = earlyPenalty * LOCKRETAINED / PENALTYDIV;
        uint treasuryRetained = earlyPenalty - lockerRetained;

        UserInfo storage protocol = userInfo[treasury];
        _burn(user, amount);
        _mint(treasury, treasuryRetained);

        if(!protocol.isLocked){
            protocol.isLocked = true;
            protocol.lockedFor = block.timestamp + MAXLOCK;
            protocol.lockedAmount += treasuryRetained;

        } else {
            protocol.lockedAmount += treasuryRetained;
        }

        _distroEarlyPenalty(lockerRetained);

        uint gaugeBal = _gaugeBalance();

        if(gaugeBal >= userReceived){
            IGauge(gauge).withdraw(userReceived);
        }

        _safeTransfer(stakingToken, user, userReceived);

        emit UnlockedEarly(user, userReceived, lockerRetained + treasuryRetained);
    }

    /// @notice Transfers vested amount into a new or existing non expired but longer lock
    function vestToLock(uint amount, uint duration) external nonReentrant{
        address user = msg.sender;
        UserInfo storage account = userInfo[user];

        if(!account.isVested){revert NoVest();}
        if(amount == 0) {revert ZeroAmount();}
        if(amount > account.vestedAmount){amount = account.vestedAmount;}

        uint timestamp = _getTimestamp();
        if(timestamp >= account.vestedFor){revert Expired();}

        account.vestedAmount -= amount;

        if(!account.isLocked){
            uint unlockTime = timestamp + duration;
            if(unlockTime <= account.vestedFor){revert InvalidLockDuration();} // Lock shorter than vest
            if(unlockTime <= timestamp + MINLOCK){unlockTime = timestamp + MINLOCK;}
            if(unlockTime >= timestamp + MAXLOCK){unlockTime = timestamp + MAXLOCK;}
            
            account.isLocked = true;
            account.lockedFor = unlockTime;
            account.lockedAmount += amount;
            emit LockCreated(user, amount, unlockTime);
        } else {
            if(account.vestedFor >= account.lockedFor){revert InvalidLockDuration();} // Lock shorter than vest
            if(timestamp >= account.lockedFor){revert Expired();}
            account.lockedAmount += amount;
            emit LockAmountIncreased(user, amount);
        }

        if(account.vestedAmount == 0){account.isVested = false; account.vestedFor = 0;}
    }

    // Our protocol is slated to migrate from Fantom Opera to sonic. This function enables lockers to jailBreak if 
    // fMoney Staker is paused in order to bridge their fBUX and lock on Sonic.
    function breakerOfLocks() external {
        address user = msg.sender;
        UserInfo storage account = userInfo[user];

        if(!paused){revert NotPaused();}
        if(!sonicMigration){revert NotAllowed();}
        
        if(account.isLocked){
            account.lockedFor = 0;
            emit LockBroken(user, account.lockedAmount);
            withdrawLock();
        }

        if(account.isVested){
            account.vestedFor = 0; 
            emit VestBroken(user, account.vestedAmount);
            withdrawVest();
        }
    }

    // Returns, in seconds, how much time is left on a lock.
    function lockLeft(address user) public view returns(uint){
        UserInfo memory account = userInfo[user];
        uint timestamp = _getTimestamp();
        uint lockEnd = account.lockedFor;

        if(lockEnd == 0){return 0;}
        if(timestamp >= lockEnd){return 0;}

        return lockEnd - timestamp;
    }

    // Returns, in seconds, how much time is left on a vest.
    function vestLeft(address user) public view returns(uint){
        UserInfo memory account = userInfo[user];
        uint timestamp = _getTimestamp();
        uint vestEnd = account.vestedFor;

        if(vestEnd == 0){return 0;}
        if(timestamp >= vestEnd){return 0;}

        return vestEnd - timestamp;
    }

    // Returns reward duration
    function left(address token) public view returns (uint) {
        uint timestamp = _getTimestamp();
        if (timestamp >= _rewardData[token].periodFinish) return 0;
        uint _remaining = _rewardData[token].periodFinish - timestamp;
        return _remaining * _rewardData[token].rewardRate;
    }

    /// @notice Tops up reward pool for a token
    function notifyRewardAmount(address token, uint amount) external updateReward(address(0)) onlyRole(DEFAULT_ADMIN_ROLE) {
        if (amount == 0) {revert ZeroAmount();}

        if (!isReward[token]) {
            rewards.push(token);
            isReward[token] = true;
        }

        uint timestamp = _getTimestamp();
        address thisContract = address(this);
        uint periodFinish = _rewardData[token].periodFinish;
        _rewardData[token].rewardPerTokenStored = rewardPerToken(token);

        // Check actual amount transferred for compatibility with fee on transfer tokens.
        uint balanceBefore = _balanceOf(token, thisContract);
        _safeTransferFrom(token, msg.sender, thisContract, amount);
        uint balanceAfter = _balanceOf(token, thisContract);
        amount = balanceAfter - balanceBefore;

        if (timestamp >= periodFinish) {
            _rewardData[token].rewardRate = amount / DURATION;
        } else {
            uint remaining = periodFinish - timestamp;
            uint _left = remaining * _rewardData[token].rewardRate;
            _rewardData[token].rewardRate = (amount + _left) / DURATION;
        }

        _rewardData[token].lastUpdateTime = timestamp;
        _rewardData[token].periodFinish = timestamp + DURATION;

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

    // Harvests beets rewards & adds amount to reward pool
    function harvestBeets() external nonReentrant updateReward(address(0)) {
        uint timestamp = _getTimestamp();
        address thisContract = address(this);
        if(timestamp < lastBeetsHarvest + 5 days){revert UnderTimeLock();}
        lastBeetsHarvest = timestamp;

        uint beetsBalance = _balanceOf(beets, thisContract);
        IGauge(gauge).claim_rewards();
        uint beetsBalanceAfter = _balanceOf(beets, thisContract);

        uint _unsyncedBeets = beetsBalanceAfter - beetsBalance;
        _unsyncedBeets += unsyncedBeets;
        if(_unsyncedBeets == 0){revert ZeroAmount();}
        unsyncedBeets = 0;
        
        _rewardData[beets].rewardPerTokenStored = rewardPerToken(beets);

        if (timestamp >= _rewardData[beets].periodFinish) {
            _rewardData[beets].rewardRate = _unsyncedBeets / DURATION;
        } else {
            uint remaining = _rewardData[beets].periodFinish - timestamp;
            uint _left = remaining * _rewardData[beets].rewardRate;
            _rewardData[beets].rewardRate = (_unsyncedBeets + _left) / DURATION;
        }

        _rewardData[beets].lastUpdateTime = timestamp;
        _rewardData[beets].periodFinish = timestamp + DURATION;
                
        emit NotifyReward(msg.sender, beets, _unsyncedBeets);
    }

    /// @notice Distributes penalty from early unlocks as locked rewards to Lockers.
    function _distroEarlyPenalty(uint amount) internal updateReward(address(0)) {
        address lockReceipt = address(this);

        if (!isReward[lockReceipt]) {
            rewards.push(lockReceipt);
            isReward[lockReceipt] = true;
        }

        uint timestamp = _getTimestamp();
        _rewardData[lockReceipt].rewardPerTokenStored = rewardPerToken(lockReceipt);

        if (timestamp >= _rewardData[lockReceipt].periodFinish) {
            _rewardData[lockReceipt].rewardRate = amount / DURATION;
        } else {
            uint remaining = _rewardData[lockReceipt].periodFinish - timestamp;
            uint _left = remaining * _rewardData[lockReceipt].rewardRate;
            _rewardData[lockReceipt].rewardRate = (amount + _left) / DURATION;
        }

        _rewardData[lockReceipt].lastUpdateTime = timestamp;
        _rewardData[lockReceipt].periodFinish = timestamp + DURATION;

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

    //If user has exited lock or vest, getReward calls this func to unlock pending locked Reward and send to user.
    function _unlockReward(uint amount) internal{
        uint gaugeBal = _gaugeBalance();
        
        if(gaugeBal >= amount){
            IGauge(gauge).withdraw(amount);
        }
        _safeTransfer(stakingToken, msg.sender, amount);
    }

    /// @notice Emergency withdraw from chef to staking contract & pause deposits.
    function emergencyWithdrawFromGauge() external onlyRole(OPERATOR_ROLE){
        if(paused){revert Paused();}

        uint gaugeBal = IGauge(gauge).balanceOf(address(this));
        IGauge(gauge).withdraw(gaugeBal);

        paused = true;
        uint stakingBal = _balanceOf(stakingToken, address(this));
        
        emit EmergencyWithdraw(stakingBal);
    }

    // Unpauses deposits and stakes LP in chef if there's balance in the contract
    function unpause() external onlyRole(OPERATOR_ROLE){
        if(!paused){revert NotPaused();}
        paused = false;

        uint stakingBal = _balanceOf(stakingToken, address(this));
        if(stakingBal != 0){IGauge(gauge).deposit(stakingBal);}
        emit UnPaused(stakingBal);
    }

    // Recovers token mistakenly sent to the contract if not a protected token.
    function recoverTokens(address token, address to, uint amount) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if(token == stakingToken || isReward[token] || token == gauge){revert InvalidTokenOrAddress();}
        _safeTransfer(token, to, amount);
    }

    //To cover a migration/shutdown, rewards can be sent to multisig.
    function recoverRewards(address token, uint amount) external onlyRole(OPERATOR_ROLE){
        if(!paused){revert NotPaused();}
        if(token == stakingToken){revert InvalidTokenOrAddress();}
        _safeTransfer(token, multisig, amount);
    }

    // To cover a pool migration/contract shutdown, this 
    // admin gated function enables users to dissolve locks if the staker has been emergency withdrawn and is paused.
    function setShutdown(bool state) external onlyRole(DEFAULT_ADMIN_ROLE){
        if(!paused){revert NotPaused();}
        sonicMigration = state;
        emit ShutDown(state);
    }

    // In the event of a rewardVester change.
    function setRewardVester(address vester) external onlyRole(DEFAULT_ADMIN_ROLE){
        if(vester == address(0)){revert InvalidTokenOrAddress();}
        rewardVester = vester;
        emit RewardVesterSet(vester);
    }

    // Approval refresh for contract longevity
    function renewApprovals() external onlyRole(OPERATOR_ROLE){
        IERC20(stakingToken).approve(gauge, 0);
        IERC20(stakingToken).approve(gauge, type(uint).max);
    }

    // Returns contract's stakingToken amount deposited in chef & rewardDebt
    function _gaugeBalance() internal view returns(uint lpAmount){
        return IGauge(gauge).balanceOf(address(this));
    }

    function _getTimestamp() internal view returns (uint){
        return block.timestamp;
    }

    // Internal update function, adds or removes reward shares for a depositor.
    function _update(address from, address to, uint value) internal override {
        // if burn or mint
        if (from == address(0) || to == address(0)) {
            super._update(from, to, value);
        } else {
            _updateReward(from);
            _updateReward(to);
            super._update(from, to, value);
        }
    }

    // ERC20 handling
    function _safeTransfer(address token, address to, uint value) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeCall(IERC20.transfer, (to, value))
        );
        require(success && (data.length == 0 || abi.decode(data, (bool))));
    }

    function _safeTransferFrom(address token, address from, address to, uint value) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeCall(IERC20.transferFrom, (from, to, value))
        );
        require(success && (data.length == 0 || abi.decode(data, (bool))));
    }

    function _balanceOf(address token, address account) internal view returns (uint) {
        (bool success, bytes memory data) = token.staticcall(
            abi.encodeCall(IERC20.balanceOf, (account))
        );
        require(success && data.length >= 32);
        return abi.decode(data, (uint));
    }

    // TESTING CHEAT CODES:

    function testChangeLockTime(uint timestamp) public {
        UserInfo storage account = userInfo[msg.sender];
        account.lockedFor = timestamp;
    }

    function testChangeVestTime(uint timestamp) public {
        UserInfo storage account = userInfo[msg.sender];
        account.vestedFor = timestamp;
    }

    // Fake being RewardVester and creating a lender reward vest.
    function testCreateVest(uint amount) external nonReentrant updateReward(msg.sender){
        uint timestamp = _getTimestamp();
        UserInfo storage account = userInfo[msg.sender];

        if(account.isVested){
            if(timestamp >= account.vestedFor){revert Expired();}
        }

        if(!account.isVested){
            uint unlockTime = timestamp + MAXVEST;
            account.isVested = true;
            account.vestedFor = unlockTime;
            emit VestCreated(msg.sender, amount, unlockTime);
        } else {
            emit AddedToVest(msg.sender, amount);
        }

        _safeTransferFrom(stakingToken, msg.sender, address(this), amount);
        account.vestedAmount += amount;

        IGauge(gauge).deposit(amount);
        _mint(msg.sender, amount);

    }


    
}

File 2 of 17 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address account => bool) hasRole;
        bytes32 adminRole;
    }

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual returns (bool) {
        return _roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
        return _roles[role].adminRole;
    }

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

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

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

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        if (!hasRole(role, account)) {
            _roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

File 3 of 17 : AccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/AccessControlEnumerable.sol)

pragma solidity ^0.8.20;

import {IAccessControlEnumerable} from "./IAccessControlEnumerable.sol";
import {AccessControl} from "../AccessControl.sol";
import {EnumerableSet} from "../../utils/structs/EnumerableSet.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 role => EnumerableSet.AddressSet) private _roleMembers;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view virtual returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view virtual returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {AccessControl-_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override returns (bool) {
        bool granted = super._grantRole(role, account);
        if (granted) {
            _roleMembers[role].add(account);
        }
        return granted;
    }

    /**
     * @dev Overload {AccessControl-_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) {
        bool revoked = super._revokeRole(role, account);
        if (revoked) {
            _roleMembers[role].remove(account);
        }
        return revoked;
    }
}

File 4 of 17 : IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/IAccessControlEnumerable.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

File 5 of 17 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

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

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

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

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

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

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

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

File 6 of 17 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

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

File 7 of 17 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 8 of 17 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

File 9 of 17 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    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.
     */
    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.
     */
    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.
     */
    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.
     */
    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 largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

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

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

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

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

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

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

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

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

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

            uint256 twos = denominator & (0 - denominator);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

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

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

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

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

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

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

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

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

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

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

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

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

File 10 of 17 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @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;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    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
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // 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 11 of 17 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.20;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```solidity
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position is the index of the value in the `values` array plus 1.
        // Position 0 is used to mean a value is not in the set.
        mapping(bytes32 value => uint256) _positions;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._positions[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We cache the value's position to prevent multiple reads from the same storage slot
        uint256 position = set._positions[value];

        if (position != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 valueIndex = position - 1;
            uint256 lastIndex = set._values.length - 1;

            if (valueIndex != lastIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the lastValue to the index where the value to delete is
                set._values[valueIndex] = lastValue;
                // Update the tracked position of the lastValue (that was just moved)
                set._positions[lastValue] = position;
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the tracked position for the deleted slot
            delete set._positions[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._positions[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 12 of 17 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity 0.8.20;

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

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

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

File 13 of 17 : draft-IERC6093.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity 0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

File 14 of 17 : ERC20NonTransferable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)

pragma solidity 0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./IERC20Metadata.sol";
import {Context} from "./Context.sol";
import {IERC20Errors} from "./draft-IERC6093.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 */
abstract contract ERC20 is IERC20, IERC20Metadata, IERC20Errors {

    error TransferDenied();

    mapping(address account => uint256) private _balances;

    mapping(address account => mapping(address spender => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `value`.
     */
    function transfer(address to, uint256 value) public virtual returns (bool) {
        revert TransferDenied();
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = msg.sender;
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        revert TransferDenied();
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     * ```
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}

File 15 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity 0.8.20;

/**
 * @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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

File 16 of 17 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity 0.8.20;

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

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 17 of 17 : IGauge.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

interface IGauge {

    function deposit(uint amount) external;

    function withdraw(uint amount) external;

    function claim_rewards() external;

    function balanceOf(address user) external view returns (uint);

}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address[3]","name":"_operators","type":"address[3]"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_stakingtoken","type":"address"},{"internalType":"address","name":"_gauge","type":"address"},{"internalType":"address","name":"_rewardVester","type":"address"},{"internalType":"address","name":"_beets","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[],"name":"Expired","type":"error"},{"inputs":[],"name":"InvalidLockDuration","type":"error"},{"inputs":[],"name":"InvalidTokenOrAddress","type":"error"},{"inputs":[],"name":"NoLock","type":"error"},{"inputs":[],"name":"NoVest","type":"error"},{"inputs":[],"name":"NotAllowed","type":"error"},{"inputs":[],"name":"NotPaused","type":"error"},{"inputs":[],"name":"Paused","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"TransferDenied","type":"error"},{"inputs":[],"name":"UnderTimeLock","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AddedToVest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"reward","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountReceived","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountRetained","type":"uint256"}],"name":"EarlyUnvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LockAmountIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"lockAmount","type":"uint256"}],"name":"LockBroken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockEnd","type":"uint256"}],"name":"LockCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LockExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LockTransfered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LockWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"reward","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NotifyReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newVester","type":"address"}],"name":"RewardVesterSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"ShutDown","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UnPaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"received","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"retained","type":"uint256"}],"name":"UnlockedEarly","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"vestAmount","type":"uint256"}],"name":"VestBroken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"vestEnd","type":"uint256"}],"name":"VestCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"VestWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WasPaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beets","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"breakerOfLocks","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"createLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"createVest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"earlyUnlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"earlyUnvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"_reward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdrawFromGauge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"extendLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"gauge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvestBeets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"increaseLockAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"isReward","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastBeetsHarvest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"left","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"lockLeft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multisig","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renewApprovals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"rewardData","outputs":[{"components":[{"internalType":"uint256","name":"rewardRate","type":"uint256"},{"internalType":"uint256","name":"periodFinish","type":"uint256"},{"internalType":"uint256","name":"lastUpdateTime","type":"uint256"},{"internalType":"uint256","name":"rewardPerTokenStored","type":"uint256"}],"internalType":"struct LockBoxTest.Reward","name":"data","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardVester","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsList","outputs":[{"internalType":"address[]","name":"_rewards","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsListLength","outputs":[{"internalType":"uint256","name":"_length","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vester","type":"address"}],"name":"setRewardVester","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"setShutdown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sonicMigration","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"storedRewardsPerUser","outputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"testChangeLockTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"testChangeVestTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"testCreateVest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"userInfo","outputs":[{"internalType":"bool","name":"isLocked","type":"bool"},{"internalType":"bool","name":"isVested","type":"bool"},{"internalType":"uint256","name":"lockedFor","type":"uint256"},{"internalType":"uint256","name":"vestedFor","type":"uint256"},{"internalType":"uint256","name":"lockedAmount","type":"uint256"},{"internalType":"uint256","name":"vestedAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"userRewardPerTokenStored","outputs":[{"internalType":"uint256","name":"rewardPerToken","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"vestLeft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"vestToLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawVest","outputs":[],"stateMutability":"nonpayable","type":"function"}]

61012060405234801562000011575f80fd5b506040516200546538038062005465833981016040819052620000349162000445565b8181600362000044838262000600565b50600462000053828262000600565b5050600160055550620000675f89620001ee565b50620000825f805160206200544583398151915289620001ee565b50620000a45f80516020620054458339815191528a5f5b6020020151620001ee565b50620000c15f80516020620054458339815191528a600162000099565b50620000de5f80516020620054458339815191528a600262000099565b506001600160a01b0388811660e05287811661010052868116608081905286821660a0819052600880546001600160a01b03199081168986161790915592861660c0819052600c805460018181019092557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c701805490951682179094555f908152600e602052604090819020805460ff1916909417909355915163095ea7b360e01b815260048101929092525f1960248301529063095ea7b3906044016020604051808303815f875af1158015620001b8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620001de9190620006c8565b50505050505050505050620006e9565b5f80620001fc848462000229565b9050801562000220575f8481526007602052604090206200021e9084620002d8565b505b90505b92915050565b5f8281526006602090815260408083206001600160a01b038516845290915281205460ff16620002d0575f8381526006602090815260408083206001600160a01b03861684529091529020805460ff19166001179055620002873390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600162000223565b505f62000223565b5f62000220836001600160a01b0384165f818152600183016020526040812054620002d057508154600181810184555f84815260208082209093018490558454848252828601909352604090209190915562000223565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b03811182821017156200036857620003686200032f565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200039957620003996200032f565b604052919050565b80516001600160a01b0381168114620003b8575f80fd5b919050565b5f82601f830112620003cd575f80fd5b81516001600160401b03811115620003e957620003e96200032f565b6020620003ff601f8301601f191682016200036e565b828152858284870101111562000413575f80fd5b5f5b838110156200043257858101830151828201840152820162000415565b505f928101909101919091529392505050565b5f805f805f805f805f6101608a8c0312156200045f575f80fd5b8a601f8b01126200046e575f80fd5b6200047862000343565b8060608c018d8111156200048a575f80fd5b8c5b81811015620004af57620004a081620003a1565b8452602093840193016200048c565b50819b50620004be81620003a1565b9a50505050620004d160808b01620003a1565b9650620004e160a08b01620003a1565b9550620004f160c08b01620003a1565b94506200050160e08b01620003a1565b9350620005126101008b01620003a1565b6101208b01519093506001600160401b038082111562000530575f80fd5b6200053e8d838e01620003bd565b93506101408c015191508082111562000555575f80fd5b50620005648c828d01620003bd565b9150509295985092959850929598565b600181811c908216806200058957607f821691505b602082108103620005a857634e487b7160e01b5f52602260045260245ffd5b50919050565b601f821115620005fb575f81815260208120601f850160051c81016020861015620005d65750805b601f850160051c820191505b81811015620005f757828155600101620005e2565b5050505b505050565b81516001600160401b038111156200061c576200061c6200032f565b62000634816200062d845462000574565b84620005ae565b602080601f8311600181146200066a575f8415620006525750858301515b5f19600386901b1c1916600185901b178555620005f7565b5f85815260208120601f198616915b828110156200069a5788860151825594840194600190910190840162000679565b5085821015620006b857878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f60208284031215620006d9575f80fd5b8151801515811462000220575f80fd5b60805160a05160c05160e05161010051614bc76200087e5f395f8181610755015281816112ed015281816113d90152818161146701528181613186015281816132c2015261330101525f818161063e0152610d4301525f818161080601528181610f3801528181610fd3015281816110400152818161106e015281816110c40152818161110101528181611147015281816111a7015281816111e2015261122c01525f81816108be01528181610b7e01528181610f610152818161151d015281816116970152818161174701528181611849015281816118d301528181611cfe01528181611e82015281816122460152818161238c01528181612c0d015281816130ac015281816133b70152818161375301528181614140015261420901525f81816107b701528181610b2901528181610ced01528181611582015281816116c5015281816117760152818161194601528181611cbb01528181611e45015281816122ab0152818161232f01528181612bd0015281816131110152818161341c015281816136f5015261426e0152614bc75ff3fe608060405234801561000f575f80fd5b50600436106103bf575f3560e01c80635f3e849f116101f5578063a217fddf11610114578063d547741f116100a9578063eb6979fc11610079578063eb6979fc14610995578063f1229777146109a8578063f321e894146109bb578063f8f21e5d146109ce575f80fd5b8063d547741f1461093a578063d85512671461094d578063dd62ed3e14610955578063e68863961461098d575f80fd5b8063b52c05fe116100e4578063b52c05fe146108ee578063b66503cf14610901578063c1819eb614610914578063ca15c87314610927575f80fd5b8063a217fddf1461089f578063a38e2105146108a6578063a6f19c84146108b9578063a9059cbb146108e0575f80fd5b80638003b6141161018a5780639010d07c1161015a5780639010d07c1461083957806391d148541461084c57806395d89b411461088457806399bcc0521461088c575f80fd5b80638003b614146107ec5780638519359d146108015780638957d63d146108285780638eae26a714610830575f80fd5b8063638634ee116101c5578063638634ee1461077757806370a082311461078a57806372f702f3146107b25780637f3f292f146107d9575f80fd5b80635f3e849f146107085780635f6771631461071b5780636058120e1461073d57806361d027b314610750575f80fd5b806336568abe116102e1578063403f44471161027657806348e5d9f81161024657806348e5d9f81461068b5780634d5ce038146106d15780635c388ca6146106f35780635c975abb146106fb575f80fd5b8063403f44471461061357806344ee3a1c146106265780634783c35b146106395780634885c9df14610678575f80fd5b80633ca068b6116102b15780633ca068b6146105d15780633ce0b0a2146105fb5780633d18b912146106035780633f4ba83a1461060b575f80fd5b806336568abe1461057a578063369252591461058d5780633accd091146105b75780633c44ea84146105c9575f80fd5b80631959a0021161035757806324a8b10c1161032757806324a8b10c1461053d5780632f2ff15d14610545578063313ce5671461055857806336085c5114610567575f80fd5b80631959a00214610482578063211dc32d146104f557806323b872dd14610508578063248a9ca31461051b575f80fd5b80630f7a82bf116103925780630f7a82bf1461042857806311e22f221461044a578063142972a71461045d57806318160ddd14610470575f80fd5b806301ffc9a7146103c357806302fca92e146103eb57806306fdde0314610400578063095ea7b314610415575b5f80fd5b6103d66103d136600461484f565b6109e1565b60405190151581526020015b60405180910390f35b6103fe6103f9366004614876565b610a24565b005b610408610bf7565b6040516103e291906148af565b6103d66104233660046148fc565b610c87565b6103fe610436366004614876565b335f90815260116020526040902060010155565b6103fe6104583660046148fc565b610c9e565b6103fe61046b366004614924565b610d6d565b6002545b6040519081526020016103e2565b6104c6610490366004614924565b60116020525f90815260409020805460018201546002830154600384015460049094015460ff8085169561010090950416939086565b6040805196151587529415156020870152938501929092526060840152608083015260a082015260c0016103e2565b61047461050336600461493d565b610df5565b6103d661051636600461496e565b610eb4565b610474610529366004614876565b5f9081526006602052604090206001015490565b6103fe610ee7565b6103fe6105533660046149a7565b6112af565b604051601281526020016103e2565b6103fe610575366004614876565b6112d9565b6103fe6105883660046149a7565b61160a565b61047461059b36600461493d565b601060209081525f928352604080842090915290825290205481565b600b546103d690610100900460ff1681565b6103fe611656565b6104746105df36600461493d565b600f60209081525f928352604080842090915290825290205481565b6103fe6117e4565b6103fe6119ab565b6103fe611c5e565b6103fe610621366004614876565b611d96565b6103fe610634366004614876565b611f4e565b6106607f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016103e2565b610474610686366004614924565b61207f565b61069e610699366004614924565b612120565b6040516103e291908151815260208083015190820152604080830151908201526060918201519181019190915260800190565b6103d66106df366004614924565b600e6020525f908152604090205460ff1681565b6103fe612194565b600b546103d69060ff1681565b6103fe61071636600461496e565b612323565b6103fe610729366004614876565b335f90815260116020526040902060020155565b6103fe61074b3660046149c8565b6123e9565b6106607f000000000000000000000000000000000000000000000000000000000000000081565b610474610785366004614924565b61265a565b610474610798366004614924565b6001600160a01b03165f9081526020819052604090205490565b6106607f000000000000000000000000000000000000000000000000000000000000000081565b600854610660906001600160a01b031681565b6107f461267f565b6040516103e291906149e8565b6106607f000000000000000000000000000000000000000000000000000000000000000081565b6103fe6126de565b610474600a5481565b6106606108473660046149c8565b6127f2565b6103d661085a3660046149a7565b5f9182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610408612810565b61047461089a366004614924565b61281f565b6104745f81565b6103fe6108b43660046148fc565b612895565b6106607f000000000000000000000000000000000000000000000000000000000000000081565b6103d66105163660046148fc565b6103fe6108fc3660046149c8565b612ade565b6103fe61090f3660046148fc565b612ce1565b6103fe610922366004614a41565b612f42565b610474610935366004614876565b612fb8565b6103fe6109483660046149a7565b612fce565b6103fe612ff2565b61047461096336600461493d565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b600c54610474565b6103fe6109a3366004614876565b613172565b6104746109b6366004614924565b613478565b6104746109c9366004614924565b613529565b6103fe6109dc3660046148fc565b6135a1565b5f6001600160e01b031982167f5a05180f000000000000000000000000000000000000000000000000000000001480610a1e5750610a1e826137bc565b92915050565b610a2c613822565b33610a3681613865565b335f9081526011602052604090208054429190610100900460ff1615610a7a5780600201548210610a7a57604051630407b05b60e31b815260040160405180910390fd5b8054610100900460ff16610aee575f610a9662375f0084614a70565b825461ff00191661010017835560028301819055604080518781526020810183905291925033917f941051f5740326e2299731cca609f60c53e8302c775962e529bb902465620ddc910160405180910390a250610b24565b60405184815233907fb8433e84e1a72e3681dd915e7c43117b4065b48971321cfce4ef3aaa13a665089060200160405180910390a25b610b507f0000000000000000000000000000000000000000000000000000000000000000333087613a7f565b83816004015f828254610b639190614a70565b909155505060405163b6b55f2560e01b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b6b55f25906024015f604051808303815f87803b158015610bc7575f80fd5b505af1158015610bd9573d5f803e3d5ffd5b50505050610be73385613b71565b505050610bf46001600555565b50565b606060038054610c0690614a83565b80601f0160208091040260200160405190810160405280929190818152602001828054610c3290614a83565b8015610c7d5780601f10610c5457610100808354040283529160200191610c7d565b820191905f5260205f20905b815481529060010190602001808311610c6057829003601f168201915b5050505050905090565b5f33610c94818585613bc3565b5060019392505050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929610cc881613bd0565b600b5460ff16610ceb57604051636cd6020160e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b031603610d3d57604051632317b1f960e11b815260040160405180910390fd5b610d68837f000000000000000000000000000000000000000000000000000000000000000084613bda565b505050565b5f610d7781613bd0565b6001600160a01b038216610d9e57604051632317b1f960e11b815260040160405180910390fd5b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040517f92d0852e15f12bc074cd3be0c09a9265716169c8e9dfa63784ca6f4a74a633e1905f90a25050565b5f80610dff613cc3565b6001600160a01b038085165f818152601060209081526040808320948a1680845294825280832054938352600f82528083209483529390529190912054919250906064908390670de0b6b3a764000090610e5889613478565b610e629190614abb565b6001600160a01b0388165f90815260208190526040902054610e849190614ace565b610e8e9190614ae5565b610e989190614ace565b610ea29190614ae5565b610eac9190614a70565b949350505050565b5f6040517f80571c0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610eef613822565b5f610ef981613865565b600a5442903090610f0d9062069780614a70565b821015610f2d5760405163cba1549360e01b815260040160405180910390fd5b600a8290555f610f5d7f000000000000000000000000000000000000000000000000000000000000000083613dee565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e6f1daf26040518163ffffffff1660e01b81526004015f604051808303815f87803b158015610fb7575f80fd5b505af1158015610fc9573d5f803e3d5ffd5b505050505f610ff87f000000000000000000000000000000000000000000000000000000000000000084613dee565b90505f6110058383614abb565b9050600954816110159190614a70565b9050805f0361103757604051631f2a200560e01b815260040160405180910390fd5b5f6009556110647f0000000000000000000000000000000000000000000000000000000000000000613478565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165f908152600d6020526040902060038101919091556001015485106110f7576110ba62093a8082614ae5565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165f908152600d60205260409020556111d8565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165f908152600d602052604081206001015461113d908790614abb565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165f908152600d6020526040812054919250906111839083614ace565b905062093a806111938285614a70565b61119d9190614ae5565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165f908152600d602052604090205550505b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165f908152600d6020526040902060020185905561122262093a8086614a70565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165f818152600d60205260409081902060010192909255905133907ff70d5c697de7ea828df48e5c4573cb2194c659f1901f70110c52b066dcf50826906112959085815260200190565b60405180910390a35050505050506112ad6001600555565b565b5f828152600660205260409020600101546112c981613bd0565b6112d38383613eb0565b50505050565b6112e1613822565b336112eb81613865565b7f000000000000000000000000000000000000000000000000000000000000000061131581613865565b335f818152601160205260409020805460ff166113455760405163ba112c9360e01b815260040160405180910390fd5b6001810154421061136957604051630407b05b60e31b815260040160405180910390fd5b845f0361138957604051631f2a200560e01b815260040160405180910390fd5b806003015485111561139d57806003015494505b84816003015f8282546113b09190614abb565b909155505060038101545f036113cf57805460ff191681555f60018201555b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165f908152601160205260408120906103e861141661025889614ace565b6114209190614ae5565b90505f61142d8289614abb565b90505f6103e861143f61034285614ace565b6114499190614ae5565b90505f6114568285614abb565b9050611462878b613ee3565b61148c7f000000000000000000000000000000000000000000000000000000000000000082613b71565b845460ff166114d357845460ff191660011785556114ad62eff10042614a70565b856001018190555080856003015f8282546114c89190614a70565b909155506114ec9050565b80856003015f8282546114e69190614a70565b90915550505b6114f582613f30565b5f6114fe614129565b905083811061157d57604051632e1a7d4d60e01b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024015f604051808303815f87803b158015611566575f80fd5b505af1158015611578573d5f803e3d5ffd5b505050505b6115a87f00000000000000000000000000000000000000000000000000000000000000008986613bda565b6001600160a01b0388167fd0c4ec39c284dcd3dde61d2b12cfd30c61cea001d0b25ab78eb79aca7e09510b856115de8587614a70565b6040805192835260208301919091520160405180910390a250505050505050505050610bf46001600555565b6001600160a01b038116331461164c576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d6882826141b6565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92961168081613bd0565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301525f60248301527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906044016020604051808303815f875af115801561170b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061172f9190614b04565b5060405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301525f1960248301527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906044016020604051808303815f875af11580156117bc573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117e09190614b04565b5050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92961180e81613bd0565b600b5460ff1615611832576040516313d0ff5960e31b815260040160405180910390fd5b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611896573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118ba9190614b1f565b604051632e1a7d4d60e01b8152600481018290529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024015f604051808303815f87803b15801561191c575f80fd5b505af115801561192e573d5f803e3d5ffd5b5050600b805460ff19166001179055505f905061196b7f000000000000000000000000000000000000000000000000000000000000000030613dee565b90507f99d7f8b71cfb9126984f7a5eed3a40e64a8959e9b0e442221546fb04ec6a489c8160405161199e91815260200190565b60405180910390a1505050565b6119b3613822565b336119bd81613865565b335f818152601160205260408120905b600c54811015611c50576001600160a01b0383165f908152601060205260408120600c805483919085908110611a0557611a05614b36565b5f9182526020808320909101546001600160a01b0316835282019290925260400190205490508015611c3d576001600160a01b0384165f908152601060205260408120600c805483919086908110611a5f57611a5f614b36565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600c805430919084908110611a9a57611a9a614b36565b5f918252602090912001546001600160a01b031603611bab57825460ff16158015611acc57508254610100900460ff16155b15611adf57611ada816141e1565b611bdc565b825460ff16158015611af757508254610100900460ff165b15611b1a5780836004015f828254611b0f9190614a70565b90915550611ba19050565b825460ff168015611b3257508254610100900460ff16155b15611b4a5780836003015f828254611b0f9190614a70565b825460ff168015611b6157508254610100900460ff165b15611ba1578260020154836001015410611b885780836003015f828254611b0f9190614a70565b80836004015f828254611b9b9190614a70565b90915550505b611ada8482613b71565b611bdc600c8381548110611bc157611bc1614b36565b5f918252602090912001546001600160a01b03168583613bda565b600c8281548110611bef57611bef614b36565b5f91825260209182902001546040518381526001600160a01b0391821692918716917f9aa05b3d70a9e3e2f004f039648839560576334fb45c81f91b6db03ad9e2efc9910160405180910390a35b5080611c4881614b4a565b9150506119cd565b505050506112ad6001600555565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929611c8881613bd0565b600b5460ff16611cab57604051636cd6020160e01b815260040160405180910390fd5b600b805460ff191690555f611ce07f000000000000000000000000000000000000000000000000000000000000000030613dee565b90508015611d5e5760405163b6b55f2560e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b6b55f25906024015f604051808303815f87803b158015611d47575f80fd5b505af1158015611d59573d5f803e3d5ffd5b505050505b6040518181527fb96cc4c95dd57612feeeaed56e65b2fd6ba67b101d0592527f05756fafcab4b4906020015b60405180910390a15050565b611d9e613822565b33611da881613865565b600b5460ff1615611dcc576040516313d0ff5960e31b815260040160405180910390fd5b815f03611dec57604051631f2a200560e01b815260040160405180910390fd5b335f818152601160205260409020805460ff16611e1c5760405163ba112c9360e01b815260040160405180910390fd5b60018101544210611e4057604051630407b05b60e31b815260040160405180910390fd5b611e6c7f0000000000000000000000000000000000000000000000000000000000000000833087613a7f565b60405163b6b55f2560e01b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b6b55f25906024015f604051808303815f87803b158015611ecb575f80fd5b505af1158015611edd573d5f803e3d5ffd5b50505050611eeb8285613b71565b83816003015f828254611efe9190614a70565b90915550506040518481526001600160a01b038316907fea61c3b66d1b521d412995113fb2d02e1f83da97103751ff25a4e0689f3e937e9060200160405180910390a2505050610bf46001600555565b611f56613822565b600b5460ff1615611f7a576040516313d0ff5960e31b815260040160405180910390fd5b335f818152601160205260409020805460ff16611faa5760405163ba112c9360e01b815260040160405180910390fd5b425f611fb68583614a70565b905082600101548111611fdc57604051630f962f3d60e31b815260040160405180910390fd5b611fe96224ea0083614a70565b81101561200957604051630f962f3d60e31b815260040160405180910390fd5b61201662eff10083614a70565b811061202c5761202962eff10083614a70565b90505b600183018190556040518181526001600160a01b038516907fe5d4b5c97a45cd2c590e17dd6dc2c0b1935d6c56701144a267f57b1a9f6779f49060200160405180910390a250505050610bf46001600555565b6001600160a01b0381165f908152601160209081526040808320815160c081018352815460ff80821615158352610100909104161515938101939093526001810154918301919091526002810154606083018190526003820154608084015260049091015460a083015242908084036120fc57505f949350505050565b80821061210d57505f949350505050565b6121178282614abb565b95945050505050565b61214760405180608001604052805f81526020015f81526020015f81526020015f81525090565b506001600160a01b03165f908152600d6020908152604091829020825160808101845281548152600182015492810192909252600281015492820192909252600390910154606082015290565b61219c613822565b336121a681613865565b335f818152601160205260409020805460ff166121d65760405163ba112c9360e01b815260040160405180910390fd5b60018101544210156121fb5760405163cba1549360e01b815260040160405180910390fd5b805460ff191681556003810180545f6001840181905590915561221e8382613ee3565b5f612227614129565b90508181106122a657604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024015f604051808303815f87803b15801561228f575f80fd5b505af11580156122a1573d5f803e3d5ffd5b505050505b6122d17f00000000000000000000000000000000000000000000000000000000000000008584613bda565b836001600160a01b03167fb34e14e48464e0328f36e8e73e48bc8f543c7c1eca2f3443f4b4590fcfeb1c398360405161230c91815260200190565b60405180910390a250505050506112ad6001600555565b5f61232d81613bd0565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316148061238457506001600160a01b0384165f908152600e602052604090205460ff165b806123c057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b0316145b156123de57604051632317b1f960e11b815260040160405180910390fd5b6112d3848484613bda565b6123f1613822565b335f8181526011602052604090208054610100900460ff166124265760405163f325c79960e01b815260040160405180910390fd5b835f0361244657604051631f2a200560e01b815260040160405180910390fd5b806004015484111561245a57806004015493505b60028101544290811061248057604051630407b05b60e31b815260040160405180910390fd5b84826004015f8282546124939190614abb565b9091555050815460ff1661258f575f6124ac8583614a70565b9050826002015481116124d257604051630f962f3d60e31b815260040160405180910390fd5b6124df6224ea0083614a70565b81116124f5576124f26224ea0083614a70565b90505b61250262eff10083614a70565b81106125185761251562eff10083614a70565b90505b825460ff19166001908117845583018190556003830180548791905f90612540908490614a70565b909155505060408051878152602081018390526001600160a01b038616917f167357c41e38a45e1950f61b1f5accf902c878d83f1685f7f72fb666203ce047910160405180910390a250612632565b81600101548260020154106125b757604051630f962f3d60e31b815260040160405180910390fd5b816001015481106125db57604051630407b05b60e31b815260040160405180910390fd5b84826003015f8282546125ee9190614a70565b90915550506040518581526001600160a01b038416907fea61c3b66d1b521d412995113fb2d02e1f83da97103751ff25a4e0689f3e937e9060200160405180910390a25b81600401545f0361264d57815461ff00191682555f60028301555b5050506117e06001600555565b5f610a1e426001600160a01b0384165f908152600d6020526040902060010154614294565b6060600c805480602002602001604051908101604052809291908181526020018280548015610c7d57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116126b7575050505050905090565b335f818152601160205260409020600b5460ff1661270f57604051636cd6020160e01b815260040160405180910390fd5b600b54610100900460ff1661273757604051631eb49d6d60e11b815260040160405180910390fd5b805460ff1615612792575f600182015560038101546040519081526001600160a01b038316907fb3a7e01844a6519be50efb73ea6455ec51d74e362c2323a1d336bc5bb6ea0dca9060200160405180910390a2612792612194565b8054610100900460ff16156117e0575f600282015560048101546040519081526001600160a01b038316907f4394b091f9fe1428e51031c7c52eae2b29e37180b6d1fafc46954ce892e730119060200160405180910390a26117e0612ff2565b5f82815260076020526040812061280990836142a9565b9392505050565b606060048054610c0690614a83565b6001600160a01b0381165f908152600d60205260408120600101544290811061284a57505f92915050565b6001600160a01b0383165f908152600d6020526040812060010154612870908390614abb565b6001600160a01b0385165f908152600d6020526040902054909150610eac9082614ace565b61289d613822565b336128a781613865565b826128b181613865565b336001600160a01b0385168190036128dc57604051632317b1f960e11b815260040160405180910390fd5b6001600160a01b0381165f908152601160205260409020805460ff166129155760405163ba112c9360e01b815260040160405180910390fd5b6001810154421061293957604051630407b05b60e31b815260040160405180910390fd5b845f0361295957604051631eb49d6d60e11b815260040160405180910390fd5b806003015485111561296d57806003015494505b6001600160a01b0386165f908152601160205260409020805460ff16156129b7578160010154816001015410156129b757604051631eb49d6d60e11b815260040160405180910390fd5b805460ff16612a2257805460ff191660019081178255828101549082018190556040516001600160a01b038916917f167357c41e38a45e1950f61b1f5accf902c878d83f1685f7f72fb666203ce04791612a19918a8252602082015260400190565b60405180910390a25b85826003015f828254612a359190614abb565b909155505060038201545f03612a5457815460ff191682555f60018301555b612a5e8387613ee3565b612a688787613b71565b85816003015f828254612a7b9190614a70565b92505081905550866001600160a01b0316836001600160a01b03167f210fe3b7301440ad2fb7fc1f612b0c5926f6ee31413f07582747ba8c3a37332b88604051612ac791815260200190565b60405180910390a350505050506117e06001600555565b612ae6613822565b33612af081613865565b600b5460ff1615612b14576040516313d0ff5960e31b815260040160405180910390fd5b825f03612b3457604051631f2a200560e01b815260040160405180910390fd5b335f818152601160205260409020805460ff1615612b655760405163cba1549360e01b815260040160405180910390fd5b425f612b718683614a70565b9050612b806224ea0083614a70565b8111612b9657612b936224ea0083614a70565b90505b612ba362eff10083614a70565b8110612bb957612bb662eff10083614a70565b90505b825460ff1916600190811784558301819055612bf77f000000000000000000000000000000000000000000000000000000000000000085308a613a7f565b60405163b6b55f2560e01b8152600481018890527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b6b55f25906024015f604051808303815f87803b158015612c56575f80fd5b505af1158015612c68573d5f803e3d5ffd5b50505050612c768488613b71565b86836003015f828254612c899190614a70565b909155505060408051888152602081018390526001600160a01b038616917f167357c41e38a45e1950f61b1f5accf902c878d83f1685f7f72fb666203ce047910160405180910390a250505050506117e06001600555565b5f612ceb81613865565b5f612cf581613bd0565b825f03612d1557604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b0384165f908152600e602052604090205460ff16612da457600c805460018082019092557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c701805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387169081179091555f908152600e60205260409020805460ff191690911790555b6001600160a01b0384165f908152600d602052604090206001015442903090612dcc87613478565b6001600160a01b0388165f908152600d6020526040812060030191909155612df48884613dee565b9050612e028833858a613a7f565b5f612e0d8985613dee565b9050612e198282614abb565b9750828510612e4c57612e2f62093a8089614ae5565b6001600160a01b038a165f908152600d6020526040902055612eb2565b5f612e578685614abb565b6001600160a01b038b165f908152600d602052604081205491925090612e7d9083614ace565b905062093a80612e8d828c614a70565b612e979190614ae5565b6001600160a01b038c165f908152600d602052604090205550505b6001600160a01b0389165f908152600d60205260409020600201859055612edc62093a8086614a70565b6001600160a01b038a165f818152600d60205260409081902060010192909255905133907ff70d5c697de7ea828df48e5c4573cb2194c659f1901f70110c52b066dcf5082690612f2f908c815260200190565b60405180910390a3505050505050505050565b5f612f4c81613bd0565b600b5460ff16612f6f57604051636cd6020160e01b815260040160405180910390fd5b600b80548315156101000261ff00199091161790556040517f02fad22840218f133846b0f05b4ae9e8601d5164b1f1b0f55b6347d56a68ec2890611d8a90841515815260200190565b5f818152600760205260408120610a1e906142b4565b5f82815260066020526040902060010154612fe881613bd0565b6112d383836141b6565b612ffa613822565b3361300481613865565b335f8181526011602052604090208054610100900460ff166130395760405163f325c79960e01b815260040160405180910390fd5b600281015442101561305e5760405163cba1549360e01b815260040160405180910390fd5b6004810180545f918290556002830191909155815461ff00191682556130848382613ee3565b5f61308d614129565b905081811061310c57604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024015f604051808303815f87803b1580156130f5575f80fd5b505af1158015613107573d5f803e3d5ffd5b505050505b6131377f00000000000000000000000000000000000000000000000000000000000000008584613bda565b836001600160a01b03167fe0e1773eaedce8d3cc03f7a3a1f50d8307c2be64ecd82c50248dd0bb52bf228c8360405161230c91815260200190565b61317a613822565b3361318481613865565b7f00000000000000000000000000000000000000000000000000000000000000006131ae81613865565b335f8181526011602052604090208054610100900460ff166131e35760405163f325c79960e01b815260040160405180910390fd5b6002810154421061320757604051630407b05b60e31b815260040160405180910390fd5b845f0361322757604051631f2a200560e01b815260040160405180910390fd5b806004015485111561323b57806004015494505b84816004015f82825461324e9190614abb565b909155505060048101545f0361326857805461ff00191681555b5f6103e861327861025888614ace565b6132829190614ae5565b90505f61328f8288614abb565b90505f6103e86132a161034285614ace565b6132ab9190614ae5565b90505f6132b88285614abb565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165f9081526011602052604090209091506132fc878b613ee3565b6133267f000000000000000000000000000000000000000000000000000000000000000083613b71565b805460ff1661336d57805460ff1916600117815561334762eff10042614a70565b816001018190555081816003015f8282546133629190614a70565b909155506133869050565b81816003015f8282546133809190614a70565b90915550505b61338f83613f30565b5f613398614129565b905084811061341757604051632e1a7d4d60e01b8152600481018690527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024015f604051808303815f87803b158015613400575f80fd5b505af1158015613412573d5f803e3d5ffd5b505050505b6134427f00000000000000000000000000000000000000000000000000000000000000008987613bda565b6001600160a01b0388167fd0c4ec39c284dcd3dde61d2b12cfd30c61cea001d0b25ab78eb79aca7e09510b866115de8688614a70565b5f61348260025490565b5f036134a657506001600160a01b03165f908152600d602052604090206003015490565b6002546001600160a01b0383165f908152600d602052604090208054600290910154670de0b6b3a764000091906134dc8661265a565b6134e69190614abb565b6134f09190614ace565b6134fa9190614ace565b6135049190614ae5565b6001600160a01b0383165f908152600d6020526040902060030154610a1e9190614a70565b6001600160a01b0381165f908152601160209081526040808320815160c081018352815460ff8082161515835261010090910416151593810193909352600181015491830182905260028101546060840152600381015460808401526004015460a083015242908084036120fc57505f949350505050565b6135a9613822565b816135b381613865565b6008546001600160a01b031633146135de57604051631eb49d6d60e11b815260040160405180910390fd5b6001600160a01b0383165f9081526011602052604090208054429190610100900460ff161561362b578060020154821061362b57604051630407b05b60e31b815260040160405180910390fd5b8054610100900460ff166136a8575f61364762375f0084614a70565b825461ff0019166101001783556002830181905560408051878152602081018390529192506001600160a01b038816917f941051f5740326e2299731cca609f60c53e8302c775962e529bb902465620ddc910160405180910390a2506136ec565b846001600160a01b03167fb8433e84e1a72e3681dd915e7c43117b4065b48971321cfce4ef3aaa13a66508856040516136e391815260200190565b60405180910390a25b600854613725907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b03163087613a7f565b83816004015f8282546137389190614a70565b909155505060405163b6b55f2560e01b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063b6b55f25906024015f604051808303815f87803b15801561379c575f80fd5b505af11580156137ae573d5f803e3d5ffd5b5050505061264d8585613b71565b5f6001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610a1e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610a1e565b60026005540361385e576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600555565b5f5b600c548110156117e0576138a0600c828154811061388757613887614b36565b5f918252602090912001546001600160a01b0316613478565b600d5f600c84815481106138b6576138b6614b36565b5f9182526020808320909101546001600160a01b03168352820192909252604001902060030155600c805461390f9190839081106138f6576138f6614b36565b5f918252602090912001546001600160a01b031661265a565b600d5f600c848154811061392557613925614b36565b5f9182526020808320909101546001600160a01b039081168452908301939093526040909101902060020191909155821615613a6d5761398b600c828154811061397157613971614b36565b5f918252602090912001546001600160a01b031683610df5565b6001600160a01b0383165f908152601060205260408120600c8054919291859081106139b9576139b9614b36565b5f9182526020808320909101546001600160a01b03168352820192909252604001812091909155600c8054600d929190849081106139f9576139f9614b36565b5f9182526020808320909101546001600160a01b0390811684528382019490945260409283018220600301549386168252600f9052908120600c805491929185908110613a4857613a48614b36565b5f9182526020808320909101546001600160a01b031683528201929092526040019020555b80613a7781614b4a565b915050613867565b6040516001600160a01b0384811660248301528381166044830152606482018390525f91829187169060840160408051601f198184030181529181526020820180516001600160e01b03167f23b872dd0000000000000000000000000000000000000000000000000000000017905251613af99190614b62565b5f604051808303815f865af19150503d805f8114613b32576040519150601f19603f3d011682016040523d82523d5f602084013e613b37565b606091505b5091509150818015613b61575080511580613b61575080806020019051810190613b619190614b04565b613b69575f80fd5b505050505050565b6001600160a01b038216613bb8576040517fec442f050000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b6117e05f83836142bd565b610d688383836001614307565b610bf481336143fd565b6040516001600160a01b038381166024830152604482018390525f91829186169060640160408051601f198184030181529181526020820180516001600160e01b03167fa9059cbb0000000000000000000000000000000000000000000000000000000017905251613c4c9190614b62565b5f604051808303815f865af19150503d805f8114613c85576040519150601f19603f3d011682016040523d82523d5f602084013e613c8a565b606091505b5091509150818015613cb4575080511580613cb4575080806020019051810190613cb49190614b04565b613cbc575f80fd5b5050505050565b335f818152601160209081526040808320815160c081018352815460ff80821615158352610100909104161515938101939093526001810154918301919091526002810154606083015260038101546080830181905260049091015460a08301819052929392604691859182911115613d4657613d3f85613529565b9050613d52565b613d4f8561207f565b90505b613d606224ea006005614ace565b811115613d7057601e9150613dda565b613d7e6224ea006004614ace565b811115613d8e5760189150613dda565b613d9c6224ea006003614ace565b811115613dac5760129150613dda565b613dba6224ea006002614ace565b811115613dca57600c9150613dda565b6224ea00811115613dda57600691505b613de48284614a70565b9550505050505090565b6040516001600160a01b0382811660248301525f91829182919086169060440160408051601f198184030181529181526020820180516001600160e01b03166370a0823160e01b17905251613e439190614b62565b5f60405180830381855afa9150503d805f8114613e7b576040519150601f19603f3d011682016040523d82523d5f602084013e613e80565b606091505b5091509150818015613e9457506020815110155b613e9c575f80fd5b808060200190518101906121179190614b1f565b5f80613ebc848461446a565b90508015612809575f848152600760205260409020613edb9084614515565b509392505050565b6001600160a01b038216613f25576040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081525f6004820152602401613baf565b6117e0825f836142bd565b5f613f3a81613865565b305f818152600e602052604090205460ff16613fc057600c805460018082019092557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c701805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091555f908152600e60205260409020805460ff191690911790555b42613fca82613478565b6001600160a01b0383165f908152600d60205260409020600381019190915560010154811061401d5761400062093a8085614ae5565b6001600160a01b0383165f908152600d602052604090205561409e565b6001600160a01b0382165f908152600d6020526040812060010154614043908390614abb565b6001600160a01b0384165f908152600d6020526040812054919250906140699083614ace565b905062093a806140798288614a70565b6140839190614ae5565b6001600160a01b0385165f908152600d602052604090205550505b6001600160a01b0382165f908152600d602052604090206002018190556140c862093a8082614a70565b6001600160a01b0383165f818152600d60205260409081902060010192909255905133907ff70d5c697de7ea828df48e5c4573cb2194c659f1901f70110c52b066dcf508269061411b9088815260200190565b60405180910390a350505050565b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561418d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906141b19190614b1f565b905090565b5f806141c28484614529565b90508015612809575f848152600760205260409020613edb90846145ae565b5f6141ea614129565b905081811061426957604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024015f604051808303815f87803b158015614252575f80fd5b505af1158015614264573d5f803e3d5ffd5b505050505b6117e07f00000000000000000000000000000000000000000000000000000000000000003384613bda565b5f8183106142a25781612809565b5090919050565b5f61280983836145c2565b5f610a1e825490565b6001600160a01b03831615806142da57506001600160a01b038216155b156142ea57610d688383836145e8565b6142f383613865565b6142fc82613865565b610d688383836145e8565b6001600160a01b038416614349576040517fe602df050000000000000000000000000000000000000000000000000000000081525f6004820152602401613baf565b6001600160a01b03831661438b576040517f94280d620000000000000000000000000000000000000000000000000000000081525f6004820152602401613baf565b6001600160a01b038085165f90815260016020908152604080832093871683529290522082905580156112d357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161411b91815260200190565b5f8281526006602090815260408083206001600160a01b038516845290915290205460ff166117e0576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b038216600482015260248101839052604401613baf565b5f8281526006602090815260408083206001600160a01b038516845290915281205460ff1661450e575f8381526006602090815260408083206001600160a01b03861684529091529020805460ff191660011790556144c63390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610a1e565b505f610a1e565b5f612809836001600160a01b038416614727565b5f8281526006602090815260408083206001600160a01b038516845290915281205460ff161561450e575f8381526006602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610a1e565b5f612809836001600160a01b03841661476c565b5f825f0182815481106145d7576145d7614b36565b905f5260205f200154905092915050565b6001600160a01b038316614612578060025f8282546146079190614a70565b9091555061469b9050565b6001600160a01b0383165f908152602081905260409020548181101561467d576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024810182905260448101839052606401613baf565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166146b7576002805482900390556146d5565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161471a91815260200190565b60405180910390a3505050565b5f81815260018301602052604081205461450e57508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610a1e565b5f8181526001830160205260408120548015614846575f61478e600183614abb565b85549091505f906147a190600190614abb565b9050808214614800575f865f0182815481106147bf576147bf614b36565b905f5260205f200154905080875f0184815481106147df576147df614b36565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061481157614811614b7d565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610a1e565b5f915050610a1e565b5f6020828403121561485f575f80fd5b81356001600160e01b031981168114612809575f80fd5b5f60208284031215614886575f80fd5b5035919050565b5f5b838110156148a757818101518382015260200161488f565b50505f910152565b602081525f82518060208401526148cd81604085016020870161488d565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146148f7575f80fd5b919050565b5f806040838503121561490d575f80fd5b614916836148e1565b946020939093013593505050565b5f60208284031215614934575f80fd5b612809826148e1565b5f806040838503121561494e575f80fd5b614957836148e1565b9150614965602084016148e1565b90509250929050565b5f805f60608486031215614980575f80fd5b614989846148e1565b9250614997602085016148e1565b9150604084013590509250925092565b5f80604083850312156149b8575f80fd5b82359150614965602084016148e1565b5f80604083850312156149d9575f80fd5b50508035926020909101359150565b602080825282518282018190525f9190848201906040850190845b81811015614a285783516001600160a01b031683529284019291840191600101614a03565b50909695505050505050565b8015158114610bf4575f80fd5b5f60208284031215614a51575f80fd5b813561280981614a34565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610a1e57610a1e614a5c565b600181811c90821680614a9757607f821691505b602082108103614ab557634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610a1e57610a1e614a5c565b8082028115828204841417610a1e57610a1e614a5c565b5f82614aff57634e487b7160e01b5f52601260045260245ffd5b500490565b5f60208284031215614b14575f80fd5b815161280981614a34565b5f60208284031215614b2f575f80fd5b5051919050565b634e487b7160e01b5f52603260045260245ffd5b5f60018201614b5b57614b5b614a5c565b5060010190565b5f8251614b7381846020870161488d565b9190910192915050565b634e487b7160e01b5f52603160045260245ffdfea26469706673582212202fa46f5263dc6086c6d9b5c90b68a1273920b667071f834fb805427d7c8c1b9a64736f6c6343000814003397667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9290000000000000000000000003c173f1baf9f97bf244796c0179952a6a2e9c2480000000000000000000000000190933669d250406efcf18b351b954ea88d5bfd000000000000000000000000e63af583149eece38c75746db699bc6d6983aca900000000000000000000000065be240291384570997cb62516eb27c543f82ee100000000000000000000000065be240291384570997cb62516eb27c543f82ee10000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f000000000000000000000000b336053a84b48a148a22b1108582f325f77c6c760000000000000000000000002d0e0814e62d80056181f5cd932274405966e4f0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000b4c6f636b426f7854657374000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b5465737452656365697074000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561000f575f80fd5b50600436106103bf575f3560e01c80635f3e849f116101f5578063a217fddf11610114578063d547741f116100a9578063eb6979fc11610079578063eb6979fc14610995578063f1229777146109a8578063f321e894146109bb578063f8f21e5d146109ce575f80fd5b8063d547741f1461093a578063d85512671461094d578063dd62ed3e14610955578063e68863961461098d575f80fd5b8063b52c05fe116100e4578063b52c05fe146108ee578063b66503cf14610901578063c1819eb614610914578063ca15c87314610927575f80fd5b8063a217fddf1461089f578063a38e2105146108a6578063a6f19c84146108b9578063a9059cbb146108e0575f80fd5b80638003b6141161018a5780639010d07c1161015a5780639010d07c1461083957806391d148541461084c57806395d89b411461088457806399bcc0521461088c575f80fd5b80638003b614146107ec5780638519359d146108015780638957d63d146108285780638eae26a714610830575f80fd5b8063638634ee116101c5578063638634ee1461077757806370a082311461078a57806372f702f3146107b25780637f3f292f146107d9575f80fd5b80635f3e849f146107085780635f6771631461071b5780636058120e1461073d57806361d027b314610750575f80fd5b806336568abe116102e1578063403f44471161027657806348e5d9f81161024657806348e5d9f81461068b5780634d5ce038146106d15780635c388ca6146106f35780635c975abb146106fb575f80fd5b8063403f44471461061357806344ee3a1c146106265780634783c35b146106395780634885c9df14610678575f80fd5b80633ca068b6116102b15780633ca068b6146105d15780633ce0b0a2146105fb5780633d18b912146106035780633f4ba83a1461060b575f80fd5b806336568abe1461057a578063369252591461058d5780633accd091146105b75780633c44ea84146105c9575f80fd5b80631959a0021161035757806324a8b10c1161032757806324a8b10c1461053d5780632f2ff15d14610545578063313ce5671461055857806336085c5114610567575f80fd5b80631959a00214610482578063211dc32d146104f557806323b872dd14610508578063248a9ca31461051b575f80fd5b80630f7a82bf116103925780630f7a82bf1461042857806311e22f221461044a578063142972a71461045d57806318160ddd14610470575f80fd5b806301ffc9a7146103c357806302fca92e146103eb57806306fdde0314610400578063095ea7b314610415575b5f80fd5b6103d66103d136600461484f565b6109e1565b60405190151581526020015b60405180910390f35b6103fe6103f9366004614876565b610a24565b005b610408610bf7565b6040516103e291906148af565b6103d66104233660046148fc565b610c87565b6103fe610436366004614876565b335f90815260116020526040902060010155565b6103fe6104583660046148fc565b610c9e565b6103fe61046b366004614924565b610d6d565b6002545b6040519081526020016103e2565b6104c6610490366004614924565b60116020525f90815260409020805460018201546002830154600384015460049094015460ff8085169561010090950416939086565b6040805196151587529415156020870152938501929092526060840152608083015260a082015260c0016103e2565b61047461050336600461493d565b610df5565b6103d661051636600461496e565b610eb4565b610474610529366004614876565b5f9081526006602052604090206001015490565b6103fe610ee7565b6103fe6105533660046149a7565b6112af565b604051601281526020016103e2565b6103fe610575366004614876565b6112d9565b6103fe6105883660046149a7565b61160a565b61047461059b36600461493d565b601060209081525f928352604080842090915290825290205481565b600b546103d690610100900460ff1681565b6103fe611656565b6104746105df36600461493d565b600f60209081525f928352604080842090915290825290205481565b6103fe6117e4565b6103fe6119ab565b6103fe611c5e565b6103fe610621366004614876565b611d96565b6103fe610634366004614876565b611f4e565b6106607f00000000000000000000000065be240291384570997cb62516eb27c543f82ee181565b6040516001600160a01b0390911681526020016103e2565b610474610686366004614924565b61207f565b61069e610699366004614924565b612120565b6040516103e291908151815260208083015190820152604080830151908201526060918201519181019190915260800190565b6103d66106df366004614924565b600e6020525f908152604090205460ff1681565b6103fe612194565b600b546103d69060ff1681565b6103fe61071636600461496e565b612323565b6103fe610729366004614876565b335f90815260116020526040902060020155565b6103fe61074b3660046149c8565b6123e9565b6106607f00000000000000000000000065be240291384570997cb62516eb27c543f82ee181565b610474610785366004614924565b61265a565b610474610798366004614924565b6001600160a01b03165f9081526020819052604090205490565b6106607f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d0905781565b600854610660906001600160a01b031681565b6107f461267f565b6040516103e291906149e8565b6106607f0000000000000000000000002d0e0814e62d80056181f5cd932274405966e4f081565b6103fe6126de565b610474600a5481565b6106606108473660046149c8565b6127f2565b6103d661085a3660046149a7565b5f9182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610408612810565b61047461089a366004614924565b61281f565b6104745f81565b6103fe6108b43660046148fc565b612895565b6106607f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f81565b6103d66105163660046148fc565b6103fe6108fc3660046149c8565b612ade565b6103fe61090f3660046148fc565b612ce1565b6103fe610922366004614a41565b612f42565b610474610935366004614876565b612fb8565b6103fe6109483660046149a7565b612fce565b6103fe612ff2565b61047461096336600461493d565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b600c54610474565b6103fe6109a3366004614876565b613172565b6104746109b6366004614924565b613478565b6104746109c9366004614924565b613529565b6103fe6109dc3660046148fc565b6135a1565b5f6001600160e01b031982167f5a05180f000000000000000000000000000000000000000000000000000000001480610a1e5750610a1e826137bc565b92915050565b610a2c613822565b33610a3681613865565b335f9081526011602052604090208054429190610100900460ff1615610a7a5780600201548210610a7a57604051630407b05b60e31b815260040160405180910390fd5b8054610100900460ff16610aee575f610a9662375f0084614a70565b825461ff00191661010017835560028301819055604080518781526020810183905291925033917f941051f5740326e2299731cca609f60c53e8302c775962e529bb902465620ddc910160405180910390a250610b24565b60405184815233907fb8433e84e1a72e3681dd915e7c43117b4065b48971321cfce4ef3aaa13a665089060200160405180910390a25b610b507f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057333087613a7f565b83816004015f828254610b639190614a70565b909155505060405163b6b55f2560e01b8152600481018590527f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b03169063b6b55f25906024015f604051808303815f87803b158015610bc7575f80fd5b505af1158015610bd9573d5f803e3d5ffd5b50505050610be73385613b71565b505050610bf46001600555565b50565b606060038054610c0690614a83565b80601f0160208091040260200160405190810160405280929190818152602001828054610c3290614a83565b8015610c7d5780601f10610c5457610100808354040283529160200191610c7d565b820191905f5260205f20905b815481529060010190602001808311610c6057829003601f168201915b5050505050905090565b5f33610c94818585613bc3565b5060019392505050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929610cc881613bd0565b600b5460ff16610ceb57604051636cd6020160e01b815260040160405180910390fd5b7f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d090576001600160a01b0316836001600160a01b031603610d3d57604051632317b1f960e11b815260040160405180910390fd5b610d68837f00000000000000000000000065be240291384570997cb62516eb27c543f82ee184613bda565b505050565b5f610d7781613bd0565b6001600160a01b038216610d9e57604051632317b1f960e11b815260040160405180910390fd5b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040517f92d0852e15f12bc074cd3be0c09a9265716169c8e9dfa63784ca6f4a74a633e1905f90a25050565b5f80610dff613cc3565b6001600160a01b038085165f818152601060209081526040808320948a1680845294825280832054938352600f82528083209483529390529190912054919250906064908390670de0b6b3a764000090610e5889613478565b610e629190614abb565b6001600160a01b0388165f90815260208190526040902054610e849190614ace565b610e8e9190614ae5565b610e989190614ace565b610ea29190614ae5565b610eac9190614a70565b949350505050565b5f6040517f80571c0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610eef613822565b5f610ef981613865565b600a5442903090610f0d9062069780614a70565b821015610f2d5760405163cba1549360e01b815260040160405180910390fd5b600a8290555f610f5d7f0000000000000000000000002d0e0814e62d80056181f5cd932274405966e4f083613dee565b90507f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b031663e6f1daf26040518163ffffffff1660e01b81526004015f604051808303815f87803b158015610fb7575f80fd5b505af1158015610fc9573d5f803e3d5ffd5b505050505f610ff87f0000000000000000000000002d0e0814e62d80056181f5cd932274405966e4f084613dee565b90505f6110058383614abb565b9050600954816110159190614a70565b9050805f0361103757604051631f2a200560e01b815260040160405180910390fd5b5f6009556110647f0000000000000000000000002d0e0814e62d80056181f5cd932274405966e4f0613478565b6001600160a01b037f0000000000000000000000002d0e0814e62d80056181f5cd932274405966e4f0165f908152600d6020526040902060038101919091556001015485106110f7576110ba62093a8082614ae5565b6001600160a01b037f0000000000000000000000002d0e0814e62d80056181f5cd932274405966e4f0165f908152600d60205260409020556111d8565b6001600160a01b037f0000000000000000000000002d0e0814e62d80056181f5cd932274405966e4f0165f908152600d602052604081206001015461113d908790614abb565b6001600160a01b037f0000000000000000000000002d0e0814e62d80056181f5cd932274405966e4f0165f908152600d6020526040812054919250906111839083614ace565b905062093a806111938285614a70565b61119d9190614ae5565b6001600160a01b037f0000000000000000000000002d0e0814e62d80056181f5cd932274405966e4f0165f908152600d602052604090205550505b6001600160a01b037f0000000000000000000000002d0e0814e62d80056181f5cd932274405966e4f0165f908152600d6020526040902060020185905561122262093a8086614a70565b6001600160a01b037f0000000000000000000000002d0e0814e62d80056181f5cd932274405966e4f0165f818152600d60205260409081902060010192909255905133907ff70d5c697de7ea828df48e5c4573cb2194c659f1901f70110c52b066dcf50826906112959085815260200190565b60405180910390a35050505050506112ad6001600555565b565b5f828152600660205260409020600101546112c981613bd0565b6112d38383613eb0565b50505050565b6112e1613822565b336112eb81613865565b7f00000000000000000000000065be240291384570997cb62516eb27c543f82ee161131581613865565b335f818152601160205260409020805460ff166113455760405163ba112c9360e01b815260040160405180910390fd5b6001810154421061136957604051630407b05b60e31b815260040160405180910390fd5b845f0361138957604051631f2a200560e01b815260040160405180910390fd5b806003015485111561139d57806003015494505b84816003015f8282546113b09190614abb565b909155505060038101545f036113cf57805460ff191681555f60018201555b6001600160a01b037f00000000000000000000000065be240291384570997cb62516eb27c543f82ee1165f908152601160205260408120906103e861141661025889614ace565b6114209190614ae5565b90505f61142d8289614abb565b90505f6103e861143f61034285614ace565b6114499190614ae5565b90505f6114568285614abb565b9050611462878b613ee3565b61148c7f00000000000000000000000065be240291384570997cb62516eb27c543f82ee182613b71565b845460ff166114d357845460ff191660011785556114ad62eff10042614a70565b856001018190555080856003015f8282546114c89190614a70565b909155506114ec9050565b80856003015f8282546114e69190614a70565b90915550505b6114f582613f30565b5f6114fe614129565b905083811061157d57604051632e1a7d4d60e01b8152600481018590527f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b031690632e1a7d4d906024015f604051808303815f87803b158015611566575f80fd5b505af1158015611578573d5f803e3d5ffd5b505050505b6115a87f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d090578986613bda565b6001600160a01b0388167fd0c4ec39c284dcd3dde61d2b12cfd30c61cea001d0b25ab78eb79aca7e09510b856115de8587614a70565b6040805192835260208301919091520160405180910390a250505050505050505050610bf46001600555565b6001600160a01b038116331461164c576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d6882826141b6565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92961168081613bd0565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f811660048301525f60248301527f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057169063095ea7b3906044016020604051808303815f875af115801561170b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061172f9190614b04565b5060405163095ea7b360e01b81526001600160a01b037f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f811660048301525f1960248301527f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057169063095ea7b3906044016020604051808303815f875af11580156117bc573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117e09190614b04565b5050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92961180e81613bd0565b600b5460ff1615611832576040516313d0ff5960e31b815260040160405180910390fd5b6040516370a0823160e01b81523060048201525f907f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b0316906370a0823190602401602060405180830381865afa158015611896573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118ba9190614b1f565b604051632e1a7d4d60e01b8152600481018290529091507f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b031690632e1a7d4d906024015f604051808303815f87803b15801561191c575f80fd5b505af115801561192e573d5f803e3d5ffd5b5050600b805460ff19166001179055505f905061196b7f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d0905730613dee565b90507f99d7f8b71cfb9126984f7a5eed3a40e64a8959e9b0e442221546fb04ec6a489c8160405161199e91815260200190565b60405180910390a1505050565b6119b3613822565b336119bd81613865565b335f818152601160205260408120905b600c54811015611c50576001600160a01b0383165f908152601060205260408120600c805483919085908110611a0557611a05614b36565b5f9182526020808320909101546001600160a01b0316835282019290925260400190205490508015611c3d576001600160a01b0384165f908152601060205260408120600c805483919086908110611a5f57611a5f614b36565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600c805430919084908110611a9a57611a9a614b36565b5f918252602090912001546001600160a01b031603611bab57825460ff16158015611acc57508254610100900460ff16155b15611adf57611ada816141e1565b611bdc565b825460ff16158015611af757508254610100900460ff165b15611b1a5780836004015f828254611b0f9190614a70565b90915550611ba19050565b825460ff168015611b3257508254610100900460ff16155b15611b4a5780836003015f828254611b0f9190614a70565b825460ff168015611b6157508254610100900460ff165b15611ba1578260020154836001015410611b885780836003015f828254611b0f9190614a70565b80836004015f828254611b9b9190614a70565b90915550505b611ada8482613b71565b611bdc600c8381548110611bc157611bc1614b36565b5f918252602090912001546001600160a01b03168583613bda565b600c8281548110611bef57611bef614b36565b5f91825260209182902001546040518381526001600160a01b0391821692918716917f9aa05b3d70a9e3e2f004f039648839560576334fb45c81f91b6db03ad9e2efc9910160405180910390a35b5080611c4881614b4a565b9150506119cd565b505050506112ad6001600555565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929611c8881613bd0565b600b5460ff16611cab57604051636cd6020160e01b815260040160405180910390fd5b600b805460ff191690555f611ce07f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d0905730613dee565b90508015611d5e5760405163b6b55f2560e01b8152600481018290527f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b03169063b6b55f25906024015f604051808303815f87803b158015611d47575f80fd5b505af1158015611d59573d5f803e3d5ffd5b505050505b6040518181527fb96cc4c95dd57612feeeaed56e65b2fd6ba67b101d0592527f05756fafcab4b4906020015b60405180910390a15050565b611d9e613822565b33611da881613865565b600b5460ff1615611dcc576040516313d0ff5960e31b815260040160405180910390fd5b815f03611dec57604051631f2a200560e01b815260040160405180910390fd5b335f818152601160205260409020805460ff16611e1c5760405163ba112c9360e01b815260040160405180910390fd5b60018101544210611e4057604051630407b05b60e31b815260040160405180910390fd5b611e6c7f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057833087613a7f565b60405163b6b55f2560e01b8152600481018590527f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b03169063b6b55f25906024015f604051808303815f87803b158015611ecb575f80fd5b505af1158015611edd573d5f803e3d5ffd5b50505050611eeb8285613b71565b83816003015f828254611efe9190614a70565b90915550506040518481526001600160a01b038316907fea61c3b66d1b521d412995113fb2d02e1f83da97103751ff25a4e0689f3e937e9060200160405180910390a2505050610bf46001600555565b611f56613822565b600b5460ff1615611f7a576040516313d0ff5960e31b815260040160405180910390fd5b335f818152601160205260409020805460ff16611faa5760405163ba112c9360e01b815260040160405180910390fd5b425f611fb68583614a70565b905082600101548111611fdc57604051630f962f3d60e31b815260040160405180910390fd5b611fe96224ea0083614a70565b81101561200957604051630f962f3d60e31b815260040160405180910390fd5b61201662eff10083614a70565b811061202c5761202962eff10083614a70565b90505b600183018190556040518181526001600160a01b038516907fe5d4b5c97a45cd2c590e17dd6dc2c0b1935d6c56701144a267f57b1a9f6779f49060200160405180910390a250505050610bf46001600555565b6001600160a01b0381165f908152601160209081526040808320815160c081018352815460ff80821615158352610100909104161515938101939093526001810154918301919091526002810154606083018190526003820154608084015260049091015460a083015242908084036120fc57505f949350505050565b80821061210d57505f949350505050565b6121178282614abb565b95945050505050565b61214760405180608001604052805f81526020015f81526020015f81526020015f81525090565b506001600160a01b03165f908152600d6020908152604091829020825160808101845281548152600182015492810192909252600281015492820192909252600390910154606082015290565b61219c613822565b336121a681613865565b335f818152601160205260409020805460ff166121d65760405163ba112c9360e01b815260040160405180910390fd5b60018101544210156121fb5760405163cba1549360e01b815260040160405180910390fd5b805460ff191681556003810180545f6001840181905590915561221e8382613ee3565b5f612227614129565b90508181106122a657604051632e1a7d4d60e01b8152600481018390527f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b031690632e1a7d4d906024015f604051808303815f87803b15801561228f575f80fd5b505af11580156122a1573d5f803e3d5ffd5b505050505b6122d17f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d090578584613bda565b836001600160a01b03167fb34e14e48464e0328f36e8e73e48bc8f543c7c1eca2f3443f4b4590fcfeb1c398360405161230c91815260200190565b60405180910390a250505050506112ad6001600555565b5f61232d81613bd0565b7f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d090576001600160a01b0316846001600160a01b0316148061238457506001600160a01b0384165f908152600e602052604090205460ff165b806123c057507f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b0316846001600160a01b0316145b156123de57604051632317b1f960e11b815260040160405180910390fd5b6112d3848484613bda565b6123f1613822565b335f8181526011602052604090208054610100900460ff166124265760405163f325c79960e01b815260040160405180910390fd5b835f0361244657604051631f2a200560e01b815260040160405180910390fd5b806004015484111561245a57806004015493505b60028101544290811061248057604051630407b05b60e31b815260040160405180910390fd5b84826004015f8282546124939190614abb565b9091555050815460ff1661258f575f6124ac8583614a70565b9050826002015481116124d257604051630f962f3d60e31b815260040160405180910390fd5b6124df6224ea0083614a70565b81116124f5576124f26224ea0083614a70565b90505b61250262eff10083614a70565b81106125185761251562eff10083614a70565b90505b825460ff19166001908117845583018190556003830180548791905f90612540908490614a70565b909155505060408051878152602081018390526001600160a01b038616917f167357c41e38a45e1950f61b1f5accf902c878d83f1685f7f72fb666203ce047910160405180910390a250612632565b81600101548260020154106125b757604051630f962f3d60e31b815260040160405180910390fd5b816001015481106125db57604051630407b05b60e31b815260040160405180910390fd5b84826003015f8282546125ee9190614a70565b90915550506040518581526001600160a01b038416907fea61c3b66d1b521d412995113fb2d02e1f83da97103751ff25a4e0689f3e937e9060200160405180910390a25b81600401545f0361264d57815461ff00191682555f60028301555b5050506117e06001600555565b5f610a1e426001600160a01b0384165f908152600d6020526040902060010154614294565b6060600c805480602002602001604051908101604052809291908181526020018280548015610c7d57602002820191905f5260205f20905b81546001600160a01b031681526001909101906020018083116126b7575050505050905090565b335f818152601160205260409020600b5460ff1661270f57604051636cd6020160e01b815260040160405180910390fd5b600b54610100900460ff1661273757604051631eb49d6d60e11b815260040160405180910390fd5b805460ff1615612792575f600182015560038101546040519081526001600160a01b038316907fb3a7e01844a6519be50efb73ea6455ec51d74e362c2323a1d336bc5bb6ea0dca9060200160405180910390a2612792612194565b8054610100900460ff16156117e0575f600282015560048101546040519081526001600160a01b038316907f4394b091f9fe1428e51031c7c52eae2b29e37180b6d1fafc46954ce892e730119060200160405180910390a26117e0612ff2565b5f82815260076020526040812061280990836142a9565b9392505050565b606060048054610c0690614a83565b6001600160a01b0381165f908152600d60205260408120600101544290811061284a57505f92915050565b6001600160a01b0383165f908152600d6020526040812060010154612870908390614abb565b6001600160a01b0385165f908152600d6020526040902054909150610eac9082614ace565b61289d613822565b336128a781613865565b826128b181613865565b336001600160a01b0385168190036128dc57604051632317b1f960e11b815260040160405180910390fd5b6001600160a01b0381165f908152601160205260409020805460ff166129155760405163ba112c9360e01b815260040160405180910390fd5b6001810154421061293957604051630407b05b60e31b815260040160405180910390fd5b845f0361295957604051631eb49d6d60e11b815260040160405180910390fd5b806003015485111561296d57806003015494505b6001600160a01b0386165f908152601160205260409020805460ff16156129b7578160010154816001015410156129b757604051631eb49d6d60e11b815260040160405180910390fd5b805460ff16612a2257805460ff191660019081178255828101549082018190556040516001600160a01b038916917f167357c41e38a45e1950f61b1f5accf902c878d83f1685f7f72fb666203ce04791612a19918a8252602082015260400190565b60405180910390a25b85826003015f828254612a359190614abb565b909155505060038201545f03612a5457815460ff191682555f60018301555b612a5e8387613ee3565b612a688787613b71565b85816003015f828254612a7b9190614a70565b92505081905550866001600160a01b0316836001600160a01b03167f210fe3b7301440ad2fb7fc1f612b0c5926f6ee31413f07582747ba8c3a37332b88604051612ac791815260200190565b60405180910390a350505050506117e06001600555565b612ae6613822565b33612af081613865565b600b5460ff1615612b14576040516313d0ff5960e31b815260040160405180910390fd5b825f03612b3457604051631f2a200560e01b815260040160405180910390fd5b335f818152601160205260409020805460ff1615612b655760405163cba1549360e01b815260040160405180910390fd5b425f612b718683614a70565b9050612b806224ea0083614a70565b8111612b9657612b936224ea0083614a70565b90505b612ba362eff10083614a70565b8110612bb957612bb662eff10083614a70565b90505b825460ff1916600190811784558301819055612bf77f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d0905785308a613a7f565b60405163b6b55f2560e01b8152600481018890527f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b03169063b6b55f25906024015f604051808303815f87803b158015612c56575f80fd5b505af1158015612c68573d5f803e3d5ffd5b50505050612c768488613b71565b86836003015f828254612c899190614a70565b909155505060408051888152602081018390526001600160a01b038616917f167357c41e38a45e1950f61b1f5accf902c878d83f1685f7f72fb666203ce047910160405180910390a250505050506117e06001600555565b5f612ceb81613865565b5f612cf581613bd0565b825f03612d1557604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b0384165f908152600e602052604090205460ff16612da457600c805460018082019092557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c701805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387169081179091555f908152600e60205260409020805460ff191690911790555b6001600160a01b0384165f908152600d602052604090206001015442903090612dcc87613478565b6001600160a01b0388165f908152600d6020526040812060030191909155612df48884613dee565b9050612e028833858a613a7f565b5f612e0d8985613dee565b9050612e198282614abb565b9750828510612e4c57612e2f62093a8089614ae5565b6001600160a01b038a165f908152600d6020526040902055612eb2565b5f612e578685614abb565b6001600160a01b038b165f908152600d602052604081205491925090612e7d9083614ace565b905062093a80612e8d828c614a70565b612e979190614ae5565b6001600160a01b038c165f908152600d602052604090205550505b6001600160a01b0389165f908152600d60205260409020600201859055612edc62093a8086614a70565b6001600160a01b038a165f818152600d60205260409081902060010192909255905133907ff70d5c697de7ea828df48e5c4573cb2194c659f1901f70110c52b066dcf5082690612f2f908c815260200190565b60405180910390a3505050505050505050565b5f612f4c81613bd0565b600b5460ff16612f6f57604051636cd6020160e01b815260040160405180910390fd5b600b80548315156101000261ff00199091161790556040517f02fad22840218f133846b0f05b4ae9e8601d5164b1f1b0f55b6347d56a68ec2890611d8a90841515815260200190565b5f818152600760205260408120610a1e906142b4565b5f82815260066020526040902060010154612fe881613bd0565b6112d383836141b6565b612ffa613822565b3361300481613865565b335f8181526011602052604090208054610100900460ff166130395760405163f325c79960e01b815260040160405180910390fd5b600281015442101561305e5760405163cba1549360e01b815260040160405180910390fd5b6004810180545f918290556002830191909155815461ff00191682556130848382613ee3565b5f61308d614129565b905081811061310c57604051632e1a7d4d60e01b8152600481018390527f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b031690632e1a7d4d906024015f604051808303815f87803b1580156130f5575f80fd5b505af1158015613107573d5f803e3d5ffd5b505050505b6131377f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d090578584613bda565b836001600160a01b03167fe0e1773eaedce8d3cc03f7a3a1f50d8307c2be64ecd82c50248dd0bb52bf228c8360405161230c91815260200190565b61317a613822565b3361318481613865565b7f00000000000000000000000065be240291384570997cb62516eb27c543f82ee16131ae81613865565b335f8181526011602052604090208054610100900460ff166131e35760405163f325c79960e01b815260040160405180910390fd5b6002810154421061320757604051630407b05b60e31b815260040160405180910390fd5b845f0361322757604051631f2a200560e01b815260040160405180910390fd5b806004015485111561323b57806004015494505b84816004015f82825461324e9190614abb565b909155505060048101545f0361326857805461ff00191681555b5f6103e861327861025888614ace565b6132829190614ae5565b90505f61328f8288614abb565b90505f6103e86132a161034285614ace565b6132ab9190614ae5565b90505f6132b88285614abb565b6001600160a01b037f00000000000000000000000065be240291384570997cb62516eb27c543f82ee1165f9081526011602052604090209091506132fc878b613ee3565b6133267f00000000000000000000000065be240291384570997cb62516eb27c543f82ee183613b71565b805460ff1661336d57805460ff1916600117815561334762eff10042614a70565b816001018190555081816003015f8282546133629190614a70565b909155506133869050565b81816003015f8282546133809190614a70565b90915550505b61338f83613f30565b5f613398614129565b905084811061341757604051632e1a7d4d60e01b8152600481018690527f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b031690632e1a7d4d906024015f604051808303815f87803b158015613400575f80fd5b505af1158015613412573d5f803e3d5ffd5b505050505b6134427f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d090578987613bda565b6001600160a01b0388167fd0c4ec39c284dcd3dde61d2b12cfd30c61cea001d0b25ab78eb79aca7e09510b866115de8688614a70565b5f61348260025490565b5f036134a657506001600160a01b03165f908152600d602052604090206003015490565b6002546001600160a01b0383165f908152600d602052604090208054600290910154670de0b6b3a764000091906134dc8661265a565b6134e69190614abb565b6134f09190614ace565b6134fa9190614ace565b6135049190614ae5565b6001600160a01b0383165f908152600d6020526040902060030154610a1e9190614a70565b6001600160a01b0381165f908152601160209081526040808320815160c081018352815460ff8082161515835261010090910416151593810193909352600181015491830182905260028101546060840152600381015460808401526004015460a083015242908084036120fc57505f949350505050565b6135a9613822565b816135b381613865565b6008546001600160a01b031633146135de57604051631eb49d6d60e11b815260040160405180910390fd5b6001600160a01b0383165f9081526011602052604090208054429190610100900460ff161561362b578060020154821061362b57604051630407b05b60e31b815260040160405180910390fd5b8054610100900460ff166136a8575f61364762375f0084614a70565b825461ff0019166101001783556002830181905560408051878152602081018390529192506001600160a01b038816917f941051f5740326e2299731cca609f60c53e8302c775962e529bb902465620ddc910160405180910390a2506136ec565b846001600160a01b03167fb8433e84e1a72e3681dd915e7c43117b4065b48971321cfce4ef3aaa13a66508856040516136e391815260200190565b60405180910390a25b600854613725907f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057906001600160a01b03163087613a7f565b83816004015f8282546137389190614a70565b909155505060405163b6b55f2560e01b8152600481018590527f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b03169063b6b55f25906024015f604051808303815f87803b15801561379c575f80fd5b505af11580156137ae573d5f803e3d5ffd5b5050505061264d8585613b71565b5f6001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610a1e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610a1e565b60026005540361385e576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600555565b5f5b600c548110156117e0576138a0600c828154811061388757613887614b36565b5f918252602090912001546001600160a01b0316613478565b600d5f600c84815481106138b6576138b6614b36565b5f9182526020808320909101546001600160a01b03168352820192909252604001902060030155600c805461390f9190839081106138f6576138f6614b36565b5f918252602090912001546001600160a01b031661265a565b600d5f600c848154811061392557613925614b36565b5f9182526020808320909101546001600160a01b039081168452908301939093526040909101902060020191909155821615613a6d5761398b600c828154811061397157613971614b36565b5f918252602090912001546001600160a01b031683610df5565b6001600160a01b0383165f908152601060205260408120600c8054919291859081106139b9576139b9614b36565b5f9182526020808320909101546001600160a01b03168352820192909252604001812091909155600c8054600d929190849081106139f9576139f9614b36565b5f9182526020808320909101546001600160a01b0390811684528382019490945260409283018220600301549386168252600f9052908120600c805491929185908110613a4857613a48614b36565b5f9182526020808320909101546001600160a01b031683528201929092526040019020555b80613a7781614b4a565b915050613867565b6040516001600160a01b0384811660248301528381166044830152606482018390525f91829187169060840160408051601f198184030181529181526020820180516001600160e01b03167f23b872dd0000000000000000000000000000000000000000000000000000000017905251613af99190614b62565b5f604051808303815f865af19150503d805f8114613b32576040519150601f19603f3d011682016040523d82523d5f602084013e613b37565b606091505b5091509150818015613b61575080511580613b61575080806020019051810190613b619190614b04565b613b69575f80fd5b505050505050565b6001600160a01b038216613bb8576040517fec442f050000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b6117e05f83836142bd565b610d688383836001614307565b610bf481336143fd565b6040516001600160a01b038381166024830152604482018390525f91829186169060640160408051601f198184030181529181526020820180516001600160e01b03167fa9059cbb0000000000000000000000000000000000000000000000000000000017905251613c4c9190614b62565b5f604051808303815f865af19150503d805f8114613c85576040519150601f19603f3d011682016040523d82523d5f602084013e613c8a565b606091505b5091509150818015613cb4575080511580613cb4575080806020019051810190613cb49190614b04565b613cbc575f80fd5b5050505050565b335f818152601160209081526040808320815160c081018352815460ff80821615158352610100909104161515938101939093526001810154918301919091526002810154606083015260038101546080830181905260049091015460a08301819052929392604691859182911115613d4657613d3f85613529565b9050613d52565b613d4f8561207f565b90505b613d606224ea006005614ace565b811115613d7057601e9150613dda565b613d7e6224ea006004614ace565b811115613d8e5760189150613dda565b613d9c6224ea006003614ace565b811115613dac5760129150613dda565b613dba6224ea006002614ace565b811115613dca57600c9150613dda565b6224ea00811115613dda57600691505b613de48284614a70565b9550505050505090565b6040516001600160a01b0382811660248301525f91829182919086169060440160408051601f198184030181529181526020820180516001600160e01b03166370a0823160e01b17905251613e439190614b62565b5f60405180830381855afa9150503d805f8114613e7b576040519150601f19603f3d011682016040523d82523d5f602084013e613e80565b606091505b5091509150818015613e9457506020815110155b613e9c575f80fd5b808060200190518101906121179190614b1f565b5f80613ebc848461446a565b90508015612809575f848152600760205260409020613edb9084614515565b509392505050565b6001600160a01b038216613f25576040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081525f6004820152602401613baf565b6117e0825f836142bd565b5f613f3a81613865565b305f818152600e602052604090205460ff16613fc057600c805460018082019092557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c701805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091555f908152600e60205260409020805460ff191690911790555b42613fca82613478565b6001600160a01b0383165f908152600d60205260409020600381019190915560010154811061401d5761400062093a8085614ae5565b6001600160a01b0383165f908152600d602052604090205561409e565b6001600160a01b0382165f908152600d6020526040812060010154614043908390614abb565b6001600160a01b0384165f908152600d6020526040812054919250906140699083614ace565b905062093a806140798288614a70565b6140839190614ae5565b6001600160a01b0385165f908152600d602052604090205550505b6001600160a01b0382165f908152600d602052604090206002018190556140c862093a8082614a70565b6001600160a01b0383165f818152600d60205260409081902060010192909255905133907ff70d5c697de7ea828df48e5c4573cb2194c659f1901f70110c52b066dcf508269061411b9088815260200190565b60405180910390a350505050565b6040516370a0823160e01b81523060048201525f907f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b0316906370a0823190602401602060405180830381865afa15801561418d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906141b19190614b1f565b905090565b5f806141c28484614529565b90508015612809575f848152600760205260409020613edb90846145ae565b5f6141ea614129565b905081811061426957604051632e1a7d4d60e01b8152600481018390527f000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f6001600160a01b031690632e1a7d4d906024015f604051808303815f87803b158015614252575f80fd5b505af1158015614264573d5f803e3d5ffd5b505050505b6117e07f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d090573384613bda565b5f8183106142a25781612809565b5090919050565b5f61280983836145c2565b5f610a1e825490565b6001600160a01b03831615806142da57506001600160a01b038216155b156142ea57610d688383836145e8565b6142f383613865565b6142fc82613865565b610d688383836145e8565b6001600160a01b038416614349576040517fe602df050000000000000000000000000000000000000000000000000000000081525f6004820152602401613baf565b6001600160a01b03831661438b576040517f94280d620000000000000000000000000000000000000000000000000000000081525f6004820152602401613baf565b6001600160a01b038085165f90815260016020908152604080832093871683529290522082905580156112d357826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161411b91815260200190565b5f8281526006602090815260408083206001600160a01b038516845290915290205460ff166117e0576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b038216600482015260248101839052604401613baf565b5f8281526006602090815260408083206001600160a01b038516845290915281205460ff1661450e575f8381526006602090815260408083206001600160a01b03861684529091529020805460ff191660011790556144c63390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610a1e565b505f610a1e565b5f612809836001600160a01b038416614727565b5f8281526006602090815260408083206001600160a01b038516845290915281205460ff161561450e575f8381526006602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a4506001610a1e565b5f612809836001600160a01b03841661476c565b5f825f0182815481106145d7576145d7614b36565b905f5260205f200154905092915050565b6001600160a01b038316614612578060025f8282546146079190614a70565b9091555061469b9050565b6001600160a01b0383165f908152602081905260409020548181101561467d576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024810182905260448101839052606401613baf565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166146b7576002805482900390556146d5565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161471a91815260200190565b60405180910390a3505050565b5f81815260018301602052604081205461450e57508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610a1e565b5f8181526001830160205260408120548015614846575f61478e600183614abb565b85549091505f906147a190600190614abb565b9050808214614800575f865f0182815481106147bf576147bf614b36565b905f5260205f200154905080875f0184815481106147df576147df614b36565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061481157614811614b7d565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610a1e565b5f915050610a1e565b5f6020828403121561485f575f80fd5b81356001600160e01b031981168114612809575f80fd5b5f60208284031215614886575f80fd5b5035919050565b5f5b838110156148a757818101518382015260200161488f565b50505f910152565b602081525f82518060208401526148cd81604085016020870161488d565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146148f7575f80fd5b919050565b5f806040838503121561490d575f80fd5b614916836148e1565b946020939093013593505050565b5f60208284031215614934575f80fd5b612809826148e1565b5f806040838503121561494e575f80fd5b614957836148e1565b9150614965602084016148e1565b90509250929050565b5f805f60608486031215614980575f80fd5b614989846148e1565b9250614997602085016148e1565b9150604084013590509250925092565b5f80604083850312156149b8575f80fd5b82359150614965602084016148e1565b5f80604083850312156149d9575f80fd5b50508035926020909101359150565b602080825282518282018190525f9190848201906040850190845b81811015614a285783516001600160a01b031683529284019291840191600101614a03565b50909695505050505050565b8015158114610bf4575f80fd5b5f60208284031215614a51575f80fd5b813561280981614a34565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610a1e57610a1e614a5c565b600181811c90821680614a9757607f821691505b602082108103614ab557634e487b7160e01b5f52602260045260245ffd5b50919050565b81810381811115610a1e57610a1e614a5c565b8082028115828204841417610a1e57610a1e614a5c565b5f82614aff57634e487b7160e01b5f52601260045260245ffd5b500490565b5f60208284031215614b14575f80fd5b815161280981614a34565b5f60208284031215614b2f575f80fd5b5051919050565b634e487b7160e01b5f52603260045260245ffd5b5f60018201614b5b57614b5b614a5c565b5060010190565b5f8251614b7381846020870161488d565b9190910192915050565b634e487b7160e01b5f52603160045260245ffdfea26469706673582212202fa46f5263dc6086c6d9b5c90b68a1273920b667071f834fb805427d7c8c1b9a64736f6c63430008140033

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

0000000000000000000000003c173f1baf9f97bf244796c0179952a6a2e9c2480000000000000000000000000190933669d250406efcf18b351b954ea88d5bfd000000000000000000000000e63af583149eece38c75746db699bc6d6983aca900000000000000000000000065be240291384570997cb62516eb27c543f82ee100000000000000000000000065be240291384570997cb62516eb27c543f82ee10000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f000000000000000000000000b336053a84b48a148a22b1108582f325f77c6c760000000000000000000000002d0e0814e62d80056181f5cd932274405966e4f0000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000b4c6f636b426f7854657374000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b5465737452656365697074000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _operators (address[3]): 0x3C173F1BAF9F97bf244796c0179952a6a2e9C248,0x0190933669d250406efcf18b351b954Ea88D5bfD,0xe63Af583149eeCe38C75746dB699BC6D6983acA9
Arg [1] : _admin (address): 0x65Be240291384570997cb62516eB27C543f82eE1
Arg [2] : _treasury (address): 0x65Be240291384570997cb62516eB27C543f82eE1
Arg [3] : _stakingtoken (address): 0x3ec8254006658E11f9aB5EAf92d64f8528D09057
Arg [4] : _gauge (address): 0x748e5c88b586172692500f3415678C87842f8d3f
Arg [5] : _rewardVester (address): 0xb336053A84B48a148A22b1108582f325f77c6C76
Arg [6] : _beets (address): 0x2D0E0814E62D80056181F5cd932274405966e4f0
Arg [7] : _name (string): LockBoxTest
Arg [8] : _symbol (string): TestReceipt

-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 0000000000000000000000003c173f1baf9f97bf244796c0179952a6a2e9c248
Arg [1] : 0000000000000000000000000190933669d250406efcf18b351b954ea88d5bfd
Arg [2] : 000000000000000000000000e63af583149eece38c75746db699bc6d6983aca9
Arg [3] : 00000000000000000000000065be240291384570997cb62516eb27c543f82ee1
Arg [4] : 00000000000000000000000065be240291384570997cb62516eb27c543f82ee1
Arg [5] : 0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057
Arg [6] : 000000000000000000000000748e5c88b586172692500f3415678c87842f8d3f
Arg [7] : 000000000000000000000000b336053a84b48a148a22b1108582f325f77c6c76
Arg [8] : 0000000000000000000000002d0e0814e62d80056181f5cd932274405966e4f0
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [10] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [11] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [12] : 4c6f636b426f7854657374000000000000000000000000000000000000000000
Arg [13] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [14] : 5465737452656365697074000000000000000000000000000000000000000000


[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.