Contract 0xF2afB340D1B50108Bd32212e867946B5B8044c23

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xedc745d835cead9aa36ac7b3db8ddbab0bb1ce9aee61854acbf1a3f39c09477e0x60806040699243192023-03-15 1:55:31352 days 6 hrs ago0x947b7742c403f20e5faccdac5e092c943e7d0277 IN  Create: ConvexRewardPool0 ETH0.001640780.1
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x19997478a90c6288c485f51b99bfee8353fcdeceb3131904034e6f4bc3dc84d9720856502023-03-21 10:14:36345 days 21 hrs ago 0x971e732b5c91a59aea8aa5b0c763e6d648362cf8 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0x19997478a90c6288c485f51b99bfee8353fcdeceb3131904034e6f4bc3dc84d9720856502023-03-21 10:14:36345 days 21 hrs ago 0x971e732b5c91a59aea8aa5b0c763e6d648362cf8 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0x19997478a90c6288c485f51b99bfee8353fcdeceb3131904034e6f4bc3dc84d9720856502023-03-21 10:14:36345 days 21 hrs ago 0x971e732b5c91a59aea8aa5b0c763e6d648362cf8 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xf70ebdfce9c3bbe2aadfb2e3f7441cfe6a329bb6b72d0cc654ff3f58167fcdd4720846132023-03-21 10:10:18345 days 21 hrs ago 0xa9249f8667cb120f065d9da1dcb37ad28e1e8ff0 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xf70ebdfce9c3bbe2aadfb2e3f7441cfe6a329bb6b72d0cc654ff3f58167fcdd4720846132023-03-21 10:10:18345 days 21 hrs ago 0xa9249f8667cb120f065d9da1dcb37ad28e1e8ff0 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xf70ebdfce9c3bbe2aadfb2e3f7441cfe6a329bb6b72d0cc654ff3f58167fcdd4720846132023-03-21 10:10:18345 days 21 hrs ago 0xa9249f8667cb120f065d9da1dcb37ad28e1e8ff0 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xf70ebdfce9c3bbe2aadfb2e3f7441cfe6a329bb6b72d0cc654ff3f58167fcdd4720846132023-03-21 10:10:18345 days 21 hrs ago 0xa9249f8667cb120f065d9da1dcb37ad28e1e8ff0 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xa1a804024e9cf14f6164653406a67baa5068ac5fdcdf536c0b450bbb4349650a720738322023-03-21 9:25:55345 days 22 hrs ago 0x971e732b5c91a59aea8aa5b0c763e6d648362cf8 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xa1a804024e9cf14f6164653406a67baa5068ac5fdcdf536c0b450bbb4349650a720738322023-03-21 9:25:55345 days 22 hrs ago 0x971e732b5c91a59aea8aa5b0c763e6d648362cf8 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xa1a804024e9cf14f6164653406a67baa5068ac5fdcdf536c0b450bbb4349650a720738322023-03-21 9:25:55345 days 22 hrs ago 0x971e732b5c91a59aea8aa5b0c763e6d648362cf8 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0x486fa2887843bb85c52b4df3008d39494e6757447f2499fe7dd37ef767fa972c720734122023-03-21 9:24:09345 days 22 hrs ago 0x971e732b5c91a59aea8aa5b0c763e6d648362cf8 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xed78f5e7a928a303df3da28079fcf7a765293bbe3f9546089829ba52cab5318c720724612023-03-21 9:20:19345 days 22 hrs ago 0xa9249f8667cb120f065d9da1dcb37ad28e1e8ff0 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0x1f8046945c8de27836ebd535425fb9e6e1dfb6a094121c89a171436bc40f878f720720642023-03-21 9:18:39345 days 22 hrs ago 0x971e732b5c91a59aea8aa5b0c763e6d648362cf8 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0x1f8046945c8de27836ebd535425fb9e6e1dfb6a094121c89a171436bc40f878f720720642023-03-21 9:18:39345 days 22 hrs ago 0x971e732b5c91a59aea8aa5b0c763e6d648362cf8 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0x1f8046945c8de27836ebd535425fb9e6e1dfb6a094121c89a171436bc40f878f720720642023-03-21 9:18:39345 days 22 hrs ago 0x971e732b5c91a59aea8aa5b0c763e6d648362cf8 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0x2ac273ea270be32b4e880fff379e0d51a1162af521086989c2be16448db36d09720720492023-03-21 9:18:35345 days 22 hrs ago 0x971e732b5c91a59aea8aa5b0c763e6d648362cf8 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xb0900486222357c9d19cd56dc40c7f60743b8c0aeee4c22cd116d03129e7d6b5720711882023-03-21 9:14:59345 days 22 hrs ago 0xa9249f8667cb120f065d9da1dcb37ad28e1e8ff0 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xa42b20248198319251575ee97a5e819a3b2fc44daab397cccc4c749e76936492720702402023-03-21 9:11:08345 days 22 hrs ago 0xa9249f8667cb120f065d9da1dcb37ad28e1e8ff0 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xa42b20248198319251575ee97a5e819a3b2fc44daab397cccc4c749e76936492720702402023-03-21 9:11:08345 days 22 hrs ago 0xa9249f8667cb120f065d9da1dcb37ad28e1e8ff0 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xa42b20248198319251575ee97a5e819a3b2fc44daab397cccc4c749e76936492720702402023-03-21 9:11:08345 days 22 hrs ago 0xa9249f8667cb120f065d9da1dcb37ad28e1e8ff0 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xa42b20248198319251575ee97a5e819a3b2fc44daab397cccc4c749e76936492720702402023-03-21 9:11:08345 days 22 hrs ago 0xa9249f8667cb120f065d9da1dcb37ad28e1e8ff0 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xa42b20248198319251575ee97a5e819a3b2fc44daab397cccc4c749e76936492720702402023-03-21 9:11:08345 days 22 hrs ago 0xa9249f8667cb120f065d9da1dcb37ad28e1e8ff0 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0xa42b20248198319251575ee97a5e819a3b2fc44daab397cccc4c749e76936492720702402023-03-21 9:11:08345 days 22 hrs ago 0xa9249f8667cb120f065d9da1dcb37ad28e1e8ff0 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0x812c62c64123a88cf02d17b8da0d42d9640febe0b7ccff6f3d9445dea4872639720699912023-03-21 9:10:06345 days 22 hrs ago 0xa9249f8667cb120f065d9da1dcb37ad28e1e8ff0 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
0x969af20aadb2305291a6089215e26f97c42a0f360a0362431001344db0856ac8720691222023-03-21 9:06:36345 days 22 hrs ago 0xa9249f8667cb120f065d9da1dcb37ad28e1e8ff0 0xf2afb340d1b50108bd32212e867946b5b8044c230 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ConvexRewardPool

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 12 : ConvexRewardPool.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

import "./interfaces/IGauge.sol";
import "./interfaces/IBooster.sol";
import "./interfaces/IRewardHook.sol";
import "./interfaces/IRewardManager.sol";

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


//claim and distribute gauge rewards without need of harvesters
//more gas cost but no delayed rewards
//
//Reward distro based on Curve.fi's gauge wrapper implementations at https://github.com/curvefi/curve-dao-contracts/tree/master/contracts/gauges/wrappers
contract ConvexRewardPool is ERC20, ReentrancyGuard{
    using SafeERC20 for IERC20;

    struct EarnedData {
        address token;
        uint256 amount;
    }

    struct RewardType {
        address reward_token;
        uint256 reward_integral;
        uint256 reward_remaining;
    }

    //pool and system info
    address public curveGauge;
    address public convexStaker;
    address public convexBooster;
    uint256 public convexPoolId;


    //rewards
    RewardType[] public rewards;
    mapping(address => mapping(address => uint256)) public reward_integral_for;// token -> account -> integral
    mapping(address => mapping(address => uint256)) public claimable_reward;//token -> account -> claimable
    mapping(address => uint256) public rewardMap;
    mapping(address => address) public rewardRedirect;
    address public rewardHook;
    address public crv;
    uint256 public constant maxRewards = 12;
    bool private isEWithdraw;

    //management
    string internal _tokenname;
    string internal _tokensymbol;

    //events
    event Staked(address indexed _user, uint256 _amount);
    event Withdrawn(address indexed _user, uint256 _amount);
    event EmergencyWithdrawn(address indexed _user, uint256 _amount);
    event RewardPaid(address indexed _user, address indexed _rewardToken, address indexed _receiver, uint256 _rewardAmount);
    event RewardAdded(address indexed _rewardToken);
    event RewardInvalidated(address _rewardToken);
    event RewardRedirected(address indexed _account, address _forward);

    constructor() ERC20(
            "TokenizedConvexPosition",
            "cvxToken"
        ){
    }

    function initialize(
        address _crv,
        address _curveGauge,
        address _convexStaker,
        address _convexBooster,
        address _lptoken,
        uint256 _poolId)
    external {
        require(bytes(_tokenname).length == 0, "already init");

        crv = _crv;
        curveGauge = _curveGauge;
        convexStaker = _convexStaker;
        convexBooster = _convexBooster;
        convexPoolId = _poolId;

        _tokenname = string(abi.encodePacked(ERC20(_lptoken).name()," Convex Deposit"));
        _tokensymbol = string(abi.encodePacked("cvx", ERC20(_lptoken).symbol()));

        //always add CRV in first slot
        _insertRewardToken(_crv);

        //add CVX in second slot
        address rmanager = IBooster(convexBooster).rewardManager();
        _insertRewardToken(IRewardManager(rmanager).cvx());

        //set default hook
        rewardHook = IRewardManager(rmanager).rewardHook();
    }

    function name() public view override returns (string memory) {
        return _tokenname;
    }

    function symbol() public view override returns (string memory) {
        return _tokensymbol;
    }

    function decimals() public pure override returns (uint8) {
        return 18;
    }

    //check curve gauge for any reward tokens
    function updateRewardList() internal {

        //max rewards 8, need to check if anything new has been added
        for (uint256 i = 0; i < 8; i++) {
            address rewardToken = IGauge(curveGauge).reward_tokens(i);
            if(rewardToken == address(0)) break;

            //add to reward list if new
            _insertRewardToken(rewardToken);
        }
    }

    //register an extra reward token to be handled
    // (any new incentive that is not directly on curve gauges)
    function addExtraReward(address _token) external nonReentrant{
        //reward manager can set extra rewards
        require(IBooster(convexBooster).rewardManager() == msg.sender, "!owner");
        
        //add to reward list
        _insertRewardToken(_token);
    }

    //insert a new reward, ignore if already registered or invalid
    function _insertRewardToken(address _token) internal{
        if(_token == address(this) || _token == address(0)){
            //dont allow reward tracking of the staking token or invalid address
            return;
        }

        //add to reward list if new
        if(rewardMap[_token] == 0){
            //check reward count for new additions
            require(rewards.length < maxRewards, "max rewards");

            //set token
            RewardType storage r = rewards.push();
            r.reward_token = _token;
            
            //set map index after push (mapped value is +1 of real index)
            rewardMap[_token] = rewards.length;

            //workaround: transfer 0 to self so that earned() reports correctly
            //with new tokens
            try IERC20(_token).transfer(address(this), 0){}catch{}

            emit RewardAdded(_token);
        }else{
            //get previous used index of given token
            //this ensures that reviving can only be done on the previous used slot
            uint256 index = rewardMap[_token];
            //index is rewardMap minus one
            RewardType storage reward = rewards[index-1];
            //check if it was invalidated
            if(reward.reward_token == address(0)){
                //revive
                reward.reward_token = _token;
            }
        }
    }

    //allow invalidating a reward if the token causes trouble in calcRewardIntegral
    function invalidateReward(address _token) public nonReentrant{
        require(IBooster(convexBooster).rewardManager() == msg.sender, "!owner");

        uint256 index = rewardMap[_token];
        if(index > 0){
            //index is registered rewards minus one
            RewardType storage reward = rewards[index-1];
            require(reward.reward_token == _token, "!mismatch");
            //set reward token address to 0, integral calc will now skip
            reward.reward_token = address(0);
            emit RewardInvalidated(_token);
        }
    }

    //set a reward hook that calls an outside contract to pull external rewards
    function setRewardHook(address _hook) external nonReentrant{
        //reward manager can set reward hook
        require(IBooster(convexBooster).rewardManager() == msg.sender, "!owner");
        rewardHook = _hook;
    }

    //update and claim rewards from all locations
    function updateRewardsAndClaim() internal{
        (,,,bool _shutdown,) = IBooster(convexBooster).poolInfo(convexPoolId);

        if(!_shutdown){
            //make sure reward list is up to date
            updateRewardList();

            //claim crv
            IBooster(convexBooster).claimCrv(convexPoolId, curveGauge);

            //claim rewards from gauge
            IGauge(curveGauge).claim_rewards(convexStaker);

            //hook for external reward pulls
            if(rewardHook != address(0)){
                try IRewardHook(rewardHook).onRewardClaim(){
                }catch{}
            }
        }
    }

    //get reward count
    function rewardLength() external view returns(uint256) {
        return rewards.length;
    }

    //calculate and record an account's earnings of the given reward.  if _claimTo is given it will also claim.
    function _calcRewardIntegral(uint256 _index, address _account, address _claimTo) internal{
        RewardType storage reward = rewards[_index];
        //skip invalidated rewards
         //if a reward token starts throwing an error, calcRewardIntegral needs a way to exit
         if(reward.reward_token == address(0)){
            return;
         }

        //get difference in balance and remaining rewards
        //getReward is unguarded so we use reward_remaining to keep track of how much was actually claimed since last checkpoint
        uint256 bal = IERC20(reward.reward_token).balanceOf(address(this));

        //if reward token is crv (always slot 0), need to calculate and send fees
        if(_index == 0){
            uint256 diff = bal - reward.reward_remaining;
            uint256 fees = IBooster(convexBooster).calculatePlatformFees(diff);
            if(fees > 0){
                //send to fee deposit to process later
                IERC20(crv).safeTransfer( IBooster(convexBooster).feeDeposit() , fees);
            }
            //remove what was sent as fees
            bal -= fees;
        }

        //update the global integral
        if (totalSupply() > 0 && (bal - reward.reward_remaining) > 0) {
            reward.reward_integral = reward.reward_integral + ((bal - reward.reward_remaining) * 1e20 / totalSupply());
        }

        //update user integrals
        uint userI = reward_integral_for[reward.reward_token][_account];
        if(_claimTo != address(0) || userI < reward.reward_integral){
            //_claimTo address non-zero means its a claim 
            if(_claimTo != address(0)){
                uint256 receiveable = claimable_reward[reward.reward_token][_account] + (balanceOf(_account) * (reward.reward_integral - userI) / 1e20);
                if(receiveable > 0){
                    claimable_reward[reward.reward_token][_account] = 0;
                    IERC20(reward.reward_token).safeTransfer(_claimTo, receiveable);
                    emit RewardPaid(_account, reward.reward_token, _claimTo, receiveable);
                    //remove what was claimed from balance
                    bal -= receiveable;
                }
            }else{
                claimable_reward[reward.reward_token][_account] = claimable_reward[reward.reward_token][_account] + ( balanceOf(_account) * (reward.reward_integral - userI) / 1e20);
            }
            reward_integral_for[reward.reward_token][_account] = reward.reward_integral;
        }


        //update remaining reward so that next claim can properly calculate the balance change
        if(bal != reward.reward_remaining){
            reward.reward_remaining = bal;
        }
    }

    //checkpoint without claiming
    function _checkpoint(address _account) internal {
        //checkpoint without claiming by passing address(0)
        _checkpoint(_account, address(0));
    }

    //checkpoint with claim
    function _checkpoint(address _account, address _claimTo) internal nonReentrant{
        //update rewards and claim
        updateRewardsAndClaim();

        //calc reward integrals
        uint256 rewardCount = rewards.length;
        for(uint256 i = 0; i < rewardCount; i++){
           _calcRewardIntegral(i,_account,_claimTo);
        }
    }

    //manually checkpoint a user account
    function user_checkpoint(address _account) external returns(bool) {
        _checkpoint(_account);
        return true;
    }

    //get earned token info
    //Note: The curve gauge function "claimable_tokens" is a write function and thus this is not by default a view
    //change ABI to view to use this off chain
    function earned(address _account) external returns(EarnedData[] memory claimable) {
        
        //because this is a state mutative function
        //we can simplify the earned() logic of all rewards (internal and external)
        //and allow this contract to be agnostic to outside reward contract design
        //by just claiming everything and updating state via _checkpoint()
        _checkpoint(_account);
        uint256 rewardCount = rewards.length;
        claimable = new EarnedData[](rewardCount);

        for (uint256 i = 0; i < rewardCount; i++) {
            RewardType storage reward = rewards[i];

            //skip invalidated rewards
            if(reward.reward_token == address(0)){
                continue;
            }
    
            claimable[i].amount = claimable_reward[reward.reward_token][_account];
            claimable[i].token = reward.reward_token;
        }
        return claimable;
    }

    //set any claimed rewards to automatically go to a different address
    //set address to zero to disable
    function setRewardRedirect(address _to) external nonReentrant{
        rewardRedirect[msg.sender] = _to;
        emit RewardRedirected(msg.sender, _to);
    }

    //claim reward for given account (unguarded)
    function getReward(address _account) external {
        //check if there is a redirect address
        if(rewardRedirect[_account] != address(0)){
            _checkpoint(_account, rewardRedirect[_account]);
        }else{
            //claim directly in checkpoint logic to save a bit of gas
            _checkpoint(_account, _account);
        }
    }

    //claim reward for given account and forward (guarded)
    function getReward(address _account, address _forwardTo) external {
        //in order to forward, must be called by the account itself
        require(msg.sender == _account, "!self");
        //use _forwardTo address instead of _account
        _checkpoint(_account,_forwardTo);
    }


    //deposit/stake on behalf of another account
    function stakeFor(address _for, uint256 _amount) external returns(bool){
        require(msg.sender == convexBooster, "!auth");
        require(_amount > 0, 'RewardPool : Cannot stake 0');

        //change state
        //assign to _for
        //Mint will checkpoint so safe to not call
        _mint(_for, _amount);

        emit Staked(_for, _amount);
        
        return true;
    }


    //withdraw balance and unwrap to the underlying lp token
    function withdraw(uint256 _amount, bool _claim) public returns(bool){

        //checkpoint first if claiming, or burn will call checkpoint anyway
        if(_claim){
            //checkpoint with claim flag
            _checkpoint(msg.sender, msg.sender);
        }

        //change state
        //burn will also call checkpoint
        _burn(msg.sender, _amount);

        //tell booster to withdraw underlying lp tokens directly to user
        IBooster(convexBooster).withdrawTo(convexPoolId,_amount,msg.sender);

        emit Withdrawn(msg.sender, _amount);

        return true;
    }

    //withdraw balance and unwrap to the underlying lp token
    //but avoid checkpointing.  will lose non-checkpointed rewards but can withdraw
    function emergencyWithdraw(uint256 _amount) public nonReentrant returns(bool){

        //toggle flag to skip checkpoints
        isEWithdraw = true;

        //burn without calling checkpoint (skipped in _beforeTokenTransfer)
        _burn(msg.sender, _amount);

        //retoggle flag to use checkpoints
        isEWithdraw = false;

        //tell booster to withdraw underlying lp tokens directly to user
        IBooster(convexBooster).withdrawTo(convexPoolId,_amount,msg.sender);

        emit EmergencyWithdrawn(msg.sender, _amount);
        return true;
    }

    //withdraw full balance
    function withdrawAll(bool claim) external{
        withdraw(balanceOf(msg.sender),claim);
    }

    function _beforeTokenTransfer(address _from, address _to, uint256) internal override {
        if(!isEWithdraw){
            if(_from != address(0)){
                _checkpoint(_from);
            }
            if(_to != address(0)){
                _checkpoint(_to);
            }
        }
    }
}

File 2 of 12 : IRewardManager.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

interface IRewardManager {
    function rewardHook() external view returns(address);
    function cvx() external view returns(address);
    function setPoolRewardToken(address _pool, address _token) external;
    function setPoolRewardContract(address _pool, address _hook, address _token) external;
}

File 3 of 12 : IRewardHook.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

interface IRewardHook {
    function onRewardClaim() external;
    function rewardManager() external view returns(address);
    function poolRewardLength(address _pool) external view returns(uint256);
    // function poolRewardList(address _pool) external view returns(address[] memory _rewardContractList);
    function poolRewardList(address _pool, uint256 _index) external view returns(address _rewardContract);
    function clearPoolRewardList(address _pool) external;
    function addPoolReward(address _pool, address _rewardContract) external;
}

File 4 of 12 : IGauge.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

interface IGauge {
    function deposit(uint256) external;
    function balanceOf(address) external view returns (uint256);
    function working_balances(address) external view returns (uint256);
    function totalSupply() external view returns (uint256);
    function working_supply() external view returns (uint256);
    function withdraw(uint256) external;
    function claim_rewards() external;
    function claim_rewards(address _account) external;
    function lp_token() external view returns(address);
    function set_rewards_receiver(address _receiver) external;
    function reward_count() external view returns(uint256);
    function reward_tokens(uint256 _rid) external view returns(address _rewardToken);
    function reward_data(address _reward) external view returns(address distributor, uint256 period_finish, uint256 rate, uint256 last_update, uint256 integral);
    function claimed_reward(address _account, address _token) external view returns(uint256);
    function claimable_reward(address _account, address _token) external view returns(uint256);
    function claimable_tokens(address _account) external returns(uint256);
    function inflation_rate(uint256 _week) external view returns(uint256);
    function period() external view returns(uint256);
    function period_timestamp(uint256 _period) external view returns(uint256);
    // function claimable_reward_write(address _account, address _token) external returns(uint256);
    function add_reward(address _reward, address _distributor) external;
    function set_reward_distributor(address _reward, address _distributor) external;
    function deposit_reward_token(address _reward, uint256 _amount) external;
    function manager() external view returns(address _manager);
}

File 5 of 12 : IBooster.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.10;

interface IBooster {
   function isShutdown() external view returns(bool);
   function withdrawTo(uint256,uint256,address) external;
   function claimCrv(uint256 _pid, address _gauge) external;
   function setGaugeRedirect(uint256 _pid) external returns(bool);
   function owner() external view returns(address);
   function rewardManager() external view returns(address);
   function feeDeposit() external view returns(address);
   function factoryCrv(address _factory) external view returns(address _crv);
   function calculatePlatformFees(uint256 _amount) external view returns(uint256);
   function addPool(address _lptoken, address _gauge, address _factory) external returns(bool);
   function shutdownPool(uint256 _pid) external returns(bool);
   function poolInfo(uint256) external view returns(address _lptoken, address _gauge, address _rewards,bool _shutdown, address _factory);
   function poolLength() external view returns (uint256);
   function activeMap(address) external view returns(bool);
   function fees() external view returns(uint256);
   function setPoolManager(address _poolM) external;
   function deposit(uint256 _pid, uint256 _amount) external returns(bool);
   function depositAll(uint256 _pid) external returns(bool);
}

File 6 of 12 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 7 of 12 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 9 of 12 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
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 10 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 11 of 12 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.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}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * 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.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * 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 override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override 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 value {ERC20} uses, unless this function is
     * 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 override returns (uint8) {
        return 18;
    }

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

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

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

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

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        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}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * 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.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` 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.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

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

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"EmergencyWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_rewardToken","type":"address"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_rewardToken","type":"address"}],"name":"RewardInvalidated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":true,"internalType":"address","name":"_rewardToken","type":"address"},{"indexed":true,"internalType":"address","name":"_receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"_rewardAmount","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_account","type":"address"},{"indexed":false,"internalType":"address","name":"_forward","type":"address"}],"name":"RewardRedirected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":true,"internalType":"address","name":"_user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"addExtraReward","outputs":[],"stateMutability":"nonpayable","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":"amount","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":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"claimable_reward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"convexBooster","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"convexPoolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"convexStaker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"crv","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"curveGauge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"earned","outputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ConvexRewardPool.EarnedData[]","name":"claimable","type":"tuple[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyWithdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"address","name":"_forwardTo","type":"address"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_crv","type":"address"},{"internalType":"address","name":"_curveGauge","type":"address"},{"internalType":"address","name":"_convexStaker","type":"address"},{"internalType":"address","name":"_convexBooster","type":"address"},{"internalType":"address","name":"_lptoken","type":"address"},{"internalType":"uint256","name":"_poolId","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"invalidateReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardHook","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewardRedirect","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"reward_integral_for","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewards","outputs":[{"internalType":"address","name":"reward_token","type":"address"},{"internalType":"uint256","name":"reward_integral","type":"uint256"},{"internalType":"uint256","name":"reward_remaining","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_hook","type":"address"}],"name":"setRewardHook","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"setRewardRedirect","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_for","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stakeFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"user_checkpoint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_claim","type":"bool"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"claim","type":"bool"}],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604080518082018252601781527f546f6b656e697a6564436f6e766578506f736974696f6e00000000000000000060208083019182528351808501909452600884526731bb3c2a37b5b2b760c11b90840152815191929162000077916003916200009b565b5080516200008d9060049060208401906200009b565b50506001600555506200017e565b828054620000a99062000141565b90600052602060002090601f016020900481019282620000cd576000855562000118565b82601f10620000e857805160ff191683800117855562000118565b8280016001018555821562000118579182015b8281111562000118578251825591602001919060010190620000fb565b50620001269291506200012a565b5090565b5b808211156200012657600081556001016200012b565b600181811c908216806200015657607f821691505b602082108114156200017857634e487b7160e01b600052602260045260246000fd5b50919050565b612c2e806200018e6000396000f3fe608060405234801561001057600080fd5b50600436106102265760003560e01c80636a4874a111610130578063a9059cbb116100b8578063e509b9d91161007c578063e509b9d914610508578063e529ee9514610531578063f05cc0581461053a578063f301af4214610565578063f8112eed1461059d57600080fd5b8063a9059cbb14610499578063b95c5746146104ac578063c00007b0146104b4578063d619658b146104c7578063dd62ed3e146104cf57600080fd5b80637c04d07c116100ff5780637c04d07c1461043857806383d443391461044b57806395b6ef0c1461046b57806395d89b411461047e578063a457c2d71461048657600080fd5b80636a4874a1146103d65780636b091695146103e957806370a08231146103fc57806375a410141461042557600080fd5b80632ee40908116101b35780633950935111610182578063395093511461037757806344214ecf1461038a5780634b8200931461039d5780635312ea8e146103b05780635e43c47b146103c357600080fd5b80632ee4090814610317578063313ce5671461032a57806333fd6f741461033957806338d074361461036457600080fd5b806318160ddd116101fa57806318160ddd146102a15780631c1c6fe5146102b357806323b872dd146102c6578063280718e2146102d95780632cdacb501461030457600080fd5b80628cc2621461022b57806306fdde0314610254578063095ea7b3146102695780630d5225de1461028c575b600080fd5b61023e610239366004612659565b6105b0565b60405161024b9190612676565b60405180910390f35b61025c610706565b60405161024b91906126fa565b61027c61027736600461272d565b610798565b604051901515815260200161024b565b61029f61029a366004612659565b6107ae565b005b6002545b60405190815260200161024b565b61029f6102c1366004612767565b610899565b61027c6102d4366004612784565b6108b7565b6006546102ec906001600160a01b031681565b6040516001600160a01b03909116815260200161024b565b6008546102ec906001600160a01b031681565b61027c61032536600461272d565b610963565b6040516012815260200161024b565b6102a56103473660046127c5565b600c60209081526000928352604080842090915290825290205481565b61027c6103723660046127fe565b610a4e565b61027c61038536600461272d565b610b0b565b600f546102ec906001600160a01b031681565b61027c6103ab366004612659565b610b47565b61027c6103be366004612823565b610b5a565b61029f6103d1366004612659565b610c5e565b6010546102ec906001600160a01b031681565b61029f6103f73660046127c5565b610d2a565b6102a561040a366004612659565b6001600160a01b031660009081526020819052604090205490565b61029f610433366004612659565b610d74565b6007546102ec906001600160a01b031681565b6102a5610459366004612659565b600d6020526000908152604090205481565b61029f61047936600461283c565b610e03565b61025c61113f565b61027c61049436600461272d565b61114e565b61027c6104a736600461272d565b6111e7565b600a546102a5565b61029f6104c2366004612659565b6111f4565b6102a5600c81565b6102a56104dd3660046127c5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102ec610516366004612659565b600e602052600090815260409020546001600160a01b031681565b6102a560095481565b6102a56105483660046127c5565b600b60209081526000928352604080842090915290825290205481565b610578610573366004612823565b611247565b604080516001600160a01b03909416845260208401929092529082015260600161024b565b61029f6105ab366004612659565b611284565b60606105bb8261142d565b600a548067ffffffffffffffff8111156105d7576105d76128b5565b60405190808252806020026020018201604052801561061c57816020015b60408051808201909152600080825260208201528152602001906001900390816105f55790505b50915060005b818110156106ff576000600a828154811061063f5761063f6128cb565b6000918252602090912060039091020180549091506001600160a01b031661066757506106ed565b80546001600160a01b039081166000908152600c602090815260408083209389168352929052205484518590849081106106a3576106a36128cb565b6020908102919091018101510152805484516001600160a01b03909116908590849081106106d3576106d36128cb565b60209081029190910101516001600160a01b039091169052505b806106f7816128f7565b915050610622565b5050919050565b60606011805461071590612912565b80601f016020809104026020016040519081016040528092919081815260200182805461074190612912565b801561078e5780601f106107635761010080835404028352916020019161078e565b820191906000526020600020905b81548152906001019060200180831161077157829003601f168201915b5050505050905090565b60006107a5338484611438565b50600192915050565b600260055414156107da5760405162461bcd60e51b81526004016107d19061294d565b60405180910390fd5b6002600555600854604080516307a77c5360e11b8152905133926001600160a01b031691630f4ef8a69160048083019260209291908290030181865afa158015610828573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084c9190612984565b6001600160a01b0316146108725760405162461bcd60e51b81526004016107d1906129a1565b600f80546001600160a01b0319166001600160a01b03929092169190911790556001600555565b336000908152602081905260409020546108b39082610a4e565b5050565b60006108c484848461155d565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156109495760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016107d1565b6109568533858403611438565b60019150505b9392505050565b6008546000906001600160a01b031633146109a85760405162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b60448201526064016107d1565b600082116109f85760405162461bcd60e51b815260206004820152601b60248201527f526577617264506f6f6c203a2043616e6e6f74207374616b652030000000000060448201526064016107d1565b610a028383611738565b826001600160a01b03167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d83604051610a3d91815260200190565b60405180910390a250600192915050565b60008115610a6057610a603333611823565b610a6a3384611889565b6008546009546040516305335c3960e21b81526004810191909152602481018590523360448201526001600160a01b03909116906314cd70e490606401600060405180830381600087803b158015610ac157600080fd5b505af1158015610ad5573d6000803e3d6000fd5b50506040518581523392507f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59150602001610a3d565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916107a5918590610b429086906129c1565b611438565b6000610b528261142d565b506001919050565b600060026005541415610b7f5760405162461bcd60e51b81526004016107d19061294d565b60026005556010805460ff60a01b1916600160a01b179055610ba13383611889565b6010805460ff60a01b191690556008546009546040516305335c3960e21b81526004810191909152602481018490523360448201526001600160a01b03909116906314cd70e490606401600060405180830381600087803b158015610c0557600080fd5b505af1158015610c19573d6000803e3d6000fd5b50506040518481523392507f2e39961a70a10f4d46383948095ac2752b3ee642a7c76aa827410aaff08c2e51915060200160405180910390a250600180600555919050565b60026005541415610c815760405162461bcd60e51b81526004016107d19061294d565b6002600555600854604080516307a77c5360e11b8152905133926001600160a01b031691630f4ef8a69160048083019260209291908290030181865afa158015610ccf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf39190612984565b6001600160a01b031614610d195760405162461bcd60e51b81526004016107d1906129a1565b610d22816119e0565b506001600555565b336001600160a01b03831614610d6a5760405162461bcd60e51b815260206004820152600560248201526410b9b2b63360d91b60448201526064016107d1565b6108b38282611823565b60026005541415610d975760405162461bcd60e51b81526004016107d19061294d565b6002600555336000818152600e602090815260409182902080546001600160a01b0319166001600160a01b03861690811790915591519182527ff4239ad0860f93469699dd4be8040b8838c5e25bb6cf24a1dfb381b937ff078c910160405180910390a2506001600555565b60118054610e1090612912565b159050610e4e5760405162461bcd60e51b815260206004820152600c60248201526b185b1c9958591e481a5b9a5d60a21b60448201526064016107d1565b601080546001600160a01b03199081166001600160a01b0389811691909117909255600680548216888416179055600780548216878416179055600880549091168583161790556009829055604080516306fdde0360e01b81529051918416916306fdde03916004808201926000929091908290030181865afa158015610ed9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f0191908101906129d9565b604051602001610f119190612a7b565b60405160208183030381529060405260119080519060200190610f359291906125ab565b50816001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015610f74573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f9c91908101906129d9565b604051602001610fac9190612aae565b60405160208183030381529060405260129080519060200190610fd09291906125ab565b50610fda866119e0565b600854604080516307a77c5360e11b815290516000926001600160a01b031691630f4ef8a69160048083019260209291908290030181865afa158015611024573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110489190612984565b90506110b4816001600160a01b031663923c1d616040518163ffffffff1660e01b8152600401602060405180830381865afa15801561108b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110af9190612984565b6119e0565b806001600160a01b03166344214ecf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111169190612984565b600f80546001600160a01b0319166001600160a01b039290921691909117905550505050505050565b60606012805461071590612912565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156111d05760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016107d1565b6111dd3385858403611438565b5060019392505050565b60006107a533848461155d565b6001600160a01b038181166000908152600e6020526040902054161561123d576001600160a01b038082166000908152600e602052604090205461123a91839116611823565b50565b61123a8182611823565b600a818154811061125757600080fd5b60009182526020909120600390910201805460018201546002909201546001600160a01b03909116925083565b600260055414156112a75760405162461bcd60e51b81526004016107d19061294d565b6002600555600854604080516307a77c5360e11b8152905133926001600160a01b031691630f4ef8a69160048083019260209291908290030181865afa1580156112f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113199190612984565b6001600160a01b03161461133f5760405162461bcd60e51b81526004016107d1906129a1565b6001600160a01b0381166000908152600d60205260409020548015611424576000600a61136d600184612ad9565b8154811061137d5761137d6128cb565b6000918252602090912060039091020180549091506001600160a01b038481169116146113d85760405162461bcd60e51b8152602060048201526009602482015268042dad2e6dac2e8c6d60bb1b60448201526064016107d1565b80546001600160a01b03191681556040516001600160a01b03841681527f646cfe9445aed85f4853d501d1924d2bdabb1bbf12531df29f929f07ba4169e09060200160405180910390a1505b50506001600555565b61123a816000611823565b6001600160a01b03831661149a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107d1565b6001600160a01b0382166114fb5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107d1565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166115c15760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107d1565b6001600160a01b0382166116235760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107d1565b61162e838383611be0565b6001600160a01b038316600090815260208190526040902054818110156116a65760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016107d1565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906116dd9084906129c1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161172991815260200190565b60405180910390a35b50505050565b6001600160a01b03821661178e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016107d1565b61179a60008383611be0565b80600260008282546117ac91906129c1565b90915550506001600160a01b038216600090815260208190526040812080548392906117d99084906129c1565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600260055414156118465760405162461bcd60e51b81526004016107d19061294d565b6002600555611853611c21565b600a5460005b8181101561187e5761186c818585611def565b80611876816128f7565b915050611859565b505060016005555050565b6001600160a01b0382166118e95760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016107d1565b6118f582600083611be0565b6001600160a01b038216600090815260208190526040902054818110156119695760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016107d1565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611998908490612ad9565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611550565b505050565b6001600160a01b0381163014806119fe57506001600160a01b038116155b15611a065750565b6001600160a01b0381166000908152600d6020526040902054611b6757600a54600c11611a635760405162461bcd60e51b815260206004820152600b60248201526a6d6178207265776172647360a81b60448201526064016107d1565b600a80546001810182556003027fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b0384166001600160a01b03199091168117825591546000838152600d602052604080822092909255905163a9059cbb60e01b8152306004820152602481019190915290919063a9059cbb906044016020604051808303816000875af1925050508015611b24575060408051601f3d908101601f19168201909252611b2191810190612af0565b60015b611b2d57611b2f565b505b6040516001600160a01b038316907fb13fd610fe4e1b384966826794a9b2f6100ad031f352cc5ec6f22667f607498090600090a25050565b6001600160a01b0381166000908152600d602052604081205490600a611b8e600184612ad9565b81548110611b9e57611b9e6128cb565b6000918252602090912060039091020180549091506001600160a01b03166119db5780546001600160a01b0384166001600160a01b0319909116178155505050565b601054600160a01b900460ff166119db576001600160a01b03831615611c0957611c098361142d565b6001600160a01b038216156119db576119db8261142d565b600854600954604051631526fe2760e01b815260048101919091526000916001600160a01b031690631526fe279060240160a060405180830381865afa158015611c6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c939190612b0d565b5093505050508061123a57611ca661227c565b6008546009546006546040516303a0e5e160e41b815260048101929092526001600160a01b03908116602483015290911690633a0e5e1090604401600060405180830381600087803b158015611cfb57600080fd5b505af1158015611d0f573d6000803e3d6000fd5b5050600654600754604051634274debf60e11b81526001600160a01b039182166004820152911692506384e9bd7e9150602401600060405180830381600087803b158015611d5c57600080fd5b505af1158015611d70573d6000803e3d6000fd5b5050600f546001600160a01b031615915061123a905057600f60009054906101000a90046001600160a01b03166001600160a01b0316632663fcfc6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611dd757600080fd5b505af1925050508015611de8575060015b61123a5750565b6000600a8481548110611e0457611e046128cb565b6000918252602090912060039091020180549091506001600160a01b0316611e2c5750505050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611e74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e989190612b82565b905084611fbc576000826002015482611eb19190612ad9565b60085460405162ceb4af60e51b8152600481018390529192506000916001600160a01b03909116906319d695e090602401602060405180830381865afa158015611eff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f239190612b82565b90508015611fad5760085460408051630abca72960e41b81529051611fad926001600160a01b03169163abca72909160048083019260209291908290030181865afa158015611f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f9a9190612984565b6010546001600160a01b03169083612326565b611fb78184612ad9565b925050505b6000611fc760025490565b118015611fe357506000826002015482611fe19190612ad9565b115b1561202c576002546002830154611ffa9083612ad9565b61200d9068056bc75e2d63100000612b9b565b6120179190612bba565b826001015461202691906129c1565b60018301555b81546001600160a01b039081166000908152600b6020908152604080832088851684529091529020549084161515806120685750826001015481105b15612261576001600160a01b0384161561219157600068056bc75e2d631000008285600101546120989190612ad9565b6001600160a01b0388166000908152602081905260409020546120bb9190612b9b565b6120c59190612bba565b84546001600160a01b039081166000908152600c60209081526040808320938b16835292905220546120f791906129c1565b9050801561218b5783546001600160a01b039081166000908152600c602090815260408083208a85168452909152812055845461213691168683612326565b83546040518281526001600160a01b0387811692811691908916907fce405e67b4d6e56e438257e15f160ae28b450e6e7659bbc4c1f4e09a1ac846cb9060200160405180910390a46121888184612ad9565b92505b50612233565b68056bc75e2d631000008184600101546121ab9190612ad9565b6001600160a01b0387166000908152602081905260409020546121ce9190612b9b565b6121d89190612bba565b83546001600160a01b039081166000908152600c60209081526040808320938a168352929052205461220a91906129c1565b83546001600160a01b039081166000908152600c60209081526040808320938a16835292905220555b600183015483546001600160a01b039081166000908152600b60209081526040808320938a16835292905220555b8260020154821461227457600283018290555b505050505050565b60005b600881101561123a576006546040516354c49fe960e01b8152600481018390526000916001600160a01b0316906354c49fe990602401602060405180830381865afa1580156122d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122f69190612984565b90506001600160a01b03811661230a575050565b612313816119e0565b508061231e816128f7565b91505061227f565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908401526119db928692916000916123b6918516908490612433565b8051909150156119db57808060200190518101906123d49190612af0565b6119db5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016107d1565b6060612442848460008561244a565b949350505050565b6060824710156124ab5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016107d1565b843b6124f95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107d1565b600080866001600160a01b031685876040516125159190612bdc565b60006040518083038185875af1925050503d8060008114612552576040519150601f19603f3d011682016040523d82523d6000602084013e612557565b606091505b5091509150612567828286612572565b979650505050505050565b6060831561258157508161095c565b8251156125915782518084602001fd5b8160405162461bcd60e51b81526004016107d191906126fa565b8280546125b790612912565b90600052602060002090601f0160209004810192826125d9576000855561261f565b82601f106125f257805160ff191683800117855561261f565b8280016001018555821561261f579182015b8281111561261f578251825591602001919060010190612604565b5061262b92915061262f565b5090565b5b8082111561262b5760008155600101612630565b6001600160a01b038116811461123a57600080fd5b60006020828403121561266b57600080fd5b813561095c81612644565b602080825282518282018190526000919060409081850190868401855b828110156126c157815180516001600160a01b03168552860151868501529284019290850190600101612693565b5091979650505050505050565b60005b838110156126e95781810151838201526020016126d1565b838111156117325750506000910152565b60208152600082518060208401526127198160408501602087016126ce565b601f01601f19169190910160400192915050565b6000806040838503121561274057600080fd5b823561274b81612644565b946020939093013593505050565b801515811461123a57600080fd5b60006020828403121561277957600080fd5b813561095c81612759565b60008060006060848603121561279957600080fd5b83356127a481612644565b925060208401356127b481612644565b929592945050506040919091013590565b600080604083850312156127d857600080fd5b82356127e381612644565b915060208301356127f381612644565b809150509250929050565b6000806040838503121561281157600080fd5b8235915060208301356127f381612759565b60006020828403121561283557600080fd5b5035919050565b60008060008060008060c0878903121561285557600080fd5b863561286081612644565b9550602087013561287081612644565b9450604087013561288081612644565b9350606087013561289081612644565b925060808701356128a081612644565b8092505060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561290b5761290b6128e1565b5060010190565b600181811c9082168061292657607f821691505b6020821081141561294757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60006020828403121561299657600080fd5b815161095c81612644565b60208082526006908201526510b7bbb732b960d11b604082015260600190565b600082198211156129d4576129d46128e1565b500190565b6000602082840312156129eb57600080fd5b815167ffffffffffffffff80821115612a0357600080fd5b818401915084601f830112612a1757600080fd5b815181811115612a2957612a296128b5565b604051601f8201601f19908116603f01168101908382118183101715612a5157612a516128b5565b81604052828152876020848701011115612a6a57600080fd5b6125678360208301602088016126ce565b60008251612a8d8184602087016126ce565b6e0810dbdb9d995e0811195c1bdcda5d608a1b920191825250600f01919050565b620c6ecf60eb1b815260008251612acc8160038501602087016126ce565b9190910160030192915050565b600082821015612aeb57612aeb6128e1565b500390565b600060208284031215612b0257600080fd5b815161095c81612759565b600080600080600060a08688031215612b2557600080fd5b8551612b3081612644565b6020870151909550612b4181612644565b6040870151909450612b5281612644565b6060870151909350612b6381612759565b6080870151909250612b7481612644565b809150509295509295909350565b600060208284031215612b9457600080fd5b5051919050565b6000816000190483118215151615612bb557612bb56128e1565b500290565b600082612bd757634e487b7160e01b600052601260045260246000fd5b500490565b60008251612bee8184602087016126ce565b919091019291505056fea264697066735822122078be53517ad2e1b9654e45c69e0547483c942494ed9e8045207232c69da4710664736f6c634300080a0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102265760003560e01c80636a4874a111610130578063a9059cbb116100b8578063e509b9d91161007c578063e509b9d914610508578063e529ee9514610531578063f05cc0581461053a578063f301af4214610565578063f8112eed1461059d57600080fd5b8063a9059cbb14610499578063b95c5746146104ac578063c00007b0146104b4578063d619658b146104c7578063dd62ed3e146104cf57600080fd5b80637c04d07c116100ff5780637c04d07c1461043857806383d443391461044b57806395b6ef0c1461046b57806395d89b411461047e578063a457c2d71461048657600080fd5b80636a4874a1146103d65780636b091695146103e957806370a08231146103fc57806375a410141461042557600080fd5b80632ee40908116101b35780633950935111610182578063395093511461037757806344214ecf1461038a5780634b8200931461039d5780635312ea8e146103b05780635e43c47b146103c357600080fd5b80632ee4090814610317578063313ce5671461032a57806333fd6f741461033957806338d074361461036457600080fd5b806318160ddd116101fa57806318160ddd146102a15780631c1c6fe5146102b357806323b872dd146102c6578063280718e2146102d95780632cdacb501461030457600080fd5b80628cc2621461022b57806306fdde0314610254578063095ea7b3146102695780630d5225de1461028c575b600080fd5b61023e610239366004612659565b6105b0565b60405161024b9190612676565b60405180910390f35b61025c610706565b60405161024b91906126fa565b61027c61027736600461272d565b610798565b604051901515815260200161024b565b61029f61029a366004612659565b6107ae565b005b6002545b60405190815260200161024b565b61029f6102c1366004612767565b610899565b61027c6102d4366004612784565b6108b7565b6006546102ec906001600160a01b031681565b6040516001600160a01b03909116815260200161024b565b6008546102ec906001600160a01b031681565b61027c61032536600461272d565b610963565b6040516012815260200161024b565b6102a56103473660046127c5565b600c60209081526000928352604080842090915290825290205481565b61027c6103723660046127fe565b610a4e565b61027c61038536600461272d565b610b0b565b600f546102ec906001600160a01b031681565b61027c6103ab366004612659565b610b47565b61027c6103be366004612823565b610b5a565b61029f6103d1366004612659565b610c5e565b6010546102ec906001600160a01b031681565b61029f6103f73660046127c5565b610d2a565b6102a561040a366004612659565b6001600160a01b031660009081526020819052604090205490565b61029f610433366004612659565b610d74565b6007546102ec906001600160a01b031681565b6102a5610459366004612659565b600d6020526000908152604090205481565b61029f61047936600461283c565b610e03565b61025c61113f565b61027c61049436600461272d565b61114e565b61027c6104a736600461272d565b6111e7565b600a546102a5565b61029f6104c2366004612659565b6111f4565b6102a5600c81565b6102a56104dd3660046127c5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102ec610516366004612659565b600e602052600090815260409020546001600160a01b031681565b6102a560095481565b6102a56105483660046127c5565b600b60209081526000928352604080842090915290825290205481565b610578610573366004612823565b611247565b604080516001600160a01b03909416845260208401929092529082015260600161024b565b61029f6105ab366004612659565b611284565b60606105bb8261142d565b600a548067ffffffffffffffff8111156105d7576105d76128b5565b60405190808252806020026020018201604052801561061c57816020015b60408051808201909152600080825260208201528152602001906001900390816105f55790505b50915060005b818110156106ff576000600a828154811061063f5761063f6128cb565b6000918252602090912060039091020180549091506001600160a01b031661066757506106ed565b80546001600160a01b039081166000908152600c602090815260408083209389168352929052205484518590849081106106a3576106a36128cb565b6020908102919091018101510152805484516001600160a01b03909116908590849081106106d3576106d36128cb565b60209081029190910101516001600160a01b039091169052505b806106f7816128f7565b915050610622565b5050919050565b60606011805461071590612912565b80601f016020809104026020016040519081016040528092919081815260200182805461074190612912565b801561078e5780601f106107635761010080835404028352916020019161078e565b820191906000526020600020905b81548152906001019060200180831161077157829003601f168201915b5050505050905090565b60006107a5338484611438565b50600192915050565b600260055414156107da5760405162461bcd60e51b81526004016107d19061294d565b60405180910390fd5b6002600555600854604080516307a77c5360e11b8152905133926001600160a01b031691630f4ef8a69160048083019260209291908290030181865afa158015610828573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084c9190612984565b6001600160a01b0316146108725760405162461bcd60e51b81526004016107d1906129a1565b600f80546001600160a01b0319166001600160a01b03929092169190911790556001600555565b336000908152602081905260409020546108b39082610a4e565b5050565b60006108c484848461155d565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156109495760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016107d1565b6109568533858403611438565b60019150505b9392505050565b6008546000906001600160a01b031633146109a85760405162461bcd60e51b8152602060048201526005602482015264042c2eae8d60db1b60448201526064016107d1565b600082116109f85760405162461bcd60e51b815260206004820152601b60248201527f526577617264506f6f6c203a2043616e6e6f74207374616b652030000000000060448201526064016107d1565b610a028383611738565b826001600160a01b03167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d83604051610a3d91815260200190565b60405180910390a250600192915050565b60008115610a6057610a603333611823565b610a6a3384611889565b6008546009546040516305335c3960e21b81526004810191909152602481018590523360448201526001600160a01b03909116906314cd70e490606401600060405180830381600087803b158015610ac157600080fd5b505af1158015610ad5573d6000803e3d6000fd5b50506040518581523392507f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59150602001610a3d565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916107a5918590610b429086906129c1565b611438565b6000610b528261142d565b506001919050565b600060026005541415610b7f5760405162461bcd60e51b81526004016107d19061294d565b60026005556010805460ff60a01b1916600160a01b179055610ba13383611889565b6010805460ff60a01b191690556008546009546040516305335c3960e21b81526004810191909152602481018490523360448201526001600160a01b03909116906314cd70e490606401600060405180830381600087803b158015610c0557600080fd5b505af1158015610c19573d6000803e3d6000fd5b50506040518481523392507f2e39961a70a10f4d46383948095ac2752b3ee642a7c76aa827410aaff08c2e51915060200160405180910390a250600180600555919050565b60026005541415610c815760405162461bcd60e51b81526004016107d19061294d565b6002600555600854604080516307a77c5360e11b8152905133926001600160a01b031691630f4ef8a69160048083019260209291908290030181865afa158015610ccf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf39190612984565b6001600160a01b031614610d195760405162461bcd60e51b81526004016107d1906129a1565b610d22816119e0565b506001600555565b336001600160a01b03831614610d6a5760405162461bcd60e51b815260206004820152600560248201526410b9b2b63360d91b60448201526064016107d1565b6108b38282611823565b60026005541415610d975760405162461bcd60e51b81526004016107d19061294d565b6002600555336000818152600e602090815260409182902080546001600160a01b0319166001600160a01b03861690811790915591519182527ff4239ad0860f93469699dd4be8040b8838c5e25bb6cf24a1dfb381b937ff078c910160405180910390a2506001600555565b60118054610e1090612912565b159050610e4e5760405162461bcd60e51b815260206004820152600c60248201526b185b1c9958591e481a5b9a5d60a21b60448201526064016107d1565b601080546001600160a01b03199081166001600160a01b0389811691909117909255600680548216888416179055600780548216878416179055600880549091168583161790556009829055604080516306fdde0360e01b81529051918416916306fdde03916004808201926000929091908290030181865afa158015610ed9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f0191908101906129d9565b604051602001610f119190612a7b565b60405160208183030381529060405260119080519060200190610f359291906125ab565b50816001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015610f74573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f9c91908101906129d9565b604051602001610fac9190612aae565b60405160208183030381529060405260129080519060200190610fd09291906125ab565b50610fda866119e0565b600854604080516307a77c5360e11b815290516000926001600160a01b031691630f4ef8a69160048083019260209291908290030181865afa158015611024573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110489190612984565b90506110b4816001600160a01b031663923c1d616040518163ffffffff1660e01b8152600401602060405180830381865afa15801561108b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110af9190612984565b6119e0565b806001600160a01b03166344214ecf6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111169190612984565b600f80546001600160a01b0319166001600160a01b039290921691909117905550505050505050565b60606012805461071590612912565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156111d05760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016107d1565b6111dd3385858403611438565b5060019392505050565b60006107a533848461155d565b6001600160a01b038181166000908152600e6020526040902054161561123d576001600160a01b038082166000908152600e602052604090205461123a91839116611823565b50565b61123a8182611823565b600a818154811061125757600080fd5b60009182526020909120600390910201805460018201546002909201546001600160a01b03909116925083565b600260055414156112a75760405162461bcd60e51b81526004016107d19061294d565b6002600555600854604080516307a77c5360e11b8152905133926001600160a01b031691630f4ef8a69160048083019260209291908290030181865afa1580156112f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113199190612984565b6001600160a01b03161461133f5760405162461bcd60e51b81526004016107d1906129a1565b6001600160a01b0381166000908152600d60205260409020548015611424576000600a61136d600184612ad9565b8154811061137d5761137d6128cb565b6000918252602090912060039091020180549091506001600160a01b038481169116146113d85760405162461bcd60e51b8152602060048201526009602482015268042dad2e6dac2e8c6d60bb1b60448201526064016107d1565b80546001600160a01b03191681556040516001600160a01b03841681527f646cfe9445aed85f4853d501d1924d2bdabb1bbf12531df29f929f07ba4169e09060200160405180910390a1505b50506001600555565b61123a816000611823565b6001600160a01b03831661149a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107d1565b6001600160a01b0382166114fb5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107d1565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166115c15760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107d1565b6001600160a01b0382166116235760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107d1565b61162e838383611be0565b6001600160a01b038316600090815260208190526040902054818110156116a65760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016107d1565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906116dd9084906129c1565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161172991815260200190565b60405180910390a35b50505050565b6001600160a01b03821661178e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016107d1565b61179a60008383611be0565b80600260008282546117ac91906129c1565b90915550506001600160a01b038216600090815260208190526040812080548392906117d99084906129c1565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600260055414156118465760405162461bcd60e51b81526004016107d19061294d565b6002600555611853611c21565b600a5460005b8181101561187e5761186c818585611def565b80611876816128f7565b915050611859565b505060016005555050565b6001600160a01b0382166118e95760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016107d1565b6118f582600083611be0565b6001600160a01b038216600090815260208190526040902054818110156119695760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016107d1565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611998908490612ad9565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611550565b505050565b6001600160a01b0381163014806119fe57506001600160a01b038116155b15611a065750565b6001600160a01b0381166000908152600d6020526040902054611b6757600a54600c11611a635760405162461bcd60e51b815260206004820152600b60248201526a6d6178207265776172647360a81b60448201526064016107d1565b600a80546001810182556003027fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b0384166001600160a01b03199091168117825591546000838152600d602052604080822092909255905163a9059cbb60e01b8152306004820152602481019190915290919063a9059cbb906044016020604051808303816000875af1925050508015611b24575060408051601f3d908101601f19168201909252611b2191810190612af0565b60015b611b2d57611b2f565b505b6040516001600160a01b038316907fb13fd610fe4e1b384966826794a9b2f6100ad031f352cc5ec6f22667f607498090600090a25050565b6001600160a01b0381166000908152600d602052604081205490600a611b8e600184612ad9565b81548110611b9e57611b9e6128cb565b6000918252602090912060039091020180549091506001600160a01b03166119db5780546001600160a01b0384166001600160a01b0319909116178155505050565b601054600160a01b900460ff166119db576001600160a01b03831615611c0957611c098361142d565b6001600160a01b038216156119db576119db8261142d565b600854600954604051631526fe2760e01b815260048101919091526000916001600160a01b031690631526fe279060240160a060405180830381865afa158015611c6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c939190612b0d565b5093505050508061123a57611ca661227c565b6008546009546006546040516303a0e5e160e41b815260048101929092526001600160a01b03908116602483015290911690633a0e5e1090604401600060405180830381600087803b158015611cfb57600080fd5b505af1158015611d0f573d6000803e3d6000fd5b5050600654600754604051634274debf60e11b81526001600160a01b039182166004820152911692506384e9bd7e9150602401600060405180830381600087803b158015611d5c57600080fd5b505af1158015611d70573d6000803e3d6000fd5b5050600f546001600160a01b031615915061123a905057600f60009054906101000a90046001600160a01b03166001600160a01b0316632663fcfc6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611dd757600080fd5b505af1925050508015611de8575060015b61123a5750565b6000600a8481548110611e0457611e046128cb565b6000918252602090912060039091020180549091506001600160a01b0316611e2c5750505050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611e74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e989190612b82565b905084611fbc576000826002015482611eb19190612ad9565b60085460405162ceb4af60e51b8152600481018390529192506000916001600160a01b03909116906319d695e090602401602060405180830381865afa158015611eff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f239190612b82565b90508015611fad5760085460408051630abca72960e41b81529051611fad926001600160a01b03169163abca72909160048083019260209291908290030181865afa158015611f76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f9a9190612984565b6010546001600160a01b03169083612326565b611fb78184612ad9565b925050505b6000611fc760025490565b118015611fe357506000826002015482611fe19190612ad9565b115b1561202c576002546002830154611ffa9083612ad9565b61200d9068056bc75e2d63100000612b9b565b6120179190612bba565b826001015461202691906129c1565b60018301555b81546001600160a01b039081166000908152600b6020908152604080832088851684529091529020549084161515806120685750826001015481105b15612261576001600160a01b0384161561219157600068056bc75e2d631000008285600101546120989190612ad9565b6001600160a01b0388166000908152602081905260409020546120bb9190612b9b565b6120c59190612bba565b84546001600160a01b039081166000908152600c60209081526040808320938b16835292905220546120f791906129c1565b9050801561218b5783546001600160a01b039081166000908152600c602090815260408083208a85168452909152812055845461213691168683612326565b83546040518281526001600160a01b0387811692811691908916907fce405e67b4d6e56e438257e15f160ae28b450e6e7659bbc4c1f4e09a1ac846cb9060200160405180910390a46121888184612ad9565b92505b50612233565b68056bc75e2d631000008184600101546121ab9190612ad9565b6001600160a01b0387166000908152602081905260409020546121ce9190612b9b565b6121d89190612bba565b83546001600160a01b039081166000908152600c60209081526040808320938a168352929052205461220a91906129c1565b83546001600160a01b039081166000908152600c60209081526040808320938a16835292905220555b600183015483546001600160a01b039081166000908152600b60209081526040808320938a16835292905220555b8260020154821461227457600283018290555b505050505050565b60005b600881101561123a576006546040516354c49fe960e01b8152600481018390526000916001600160a01b0316906354c49fe990602401602060405180830381865afa1580156122d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122f69190612984565b90506001600160a01b03811661230a575050565b612313816119e0565b508061231e816128f7565b91505061227f565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564908401526119db928692916000916123b6918516908490612433565b8051909150156119db57808060200190518101906123d49190612af0565b6119db5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016107d1565b6060612442848460008561244a565b949350505050565b6060824710156124ab5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016107d1565b843b6124f95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107d1565b600080866001600160a01b031685876040516125159190612bdc565b60006040518083038185875af1925050503d8060008114612552576040519150601f19603f3d011682016040523d82523d6000602084013e612557565b606091505b5091509150612567828286612572565b979650505050505050565b6060831561258157508161095c565b8251156125915782518084602001fd5b8160405162461bcd60e51b81526004016107d191906126fa565b8280546125b790612912565b90600052602060002090601f0160209004810192826125d9576000855561261f565b82601f106125f257805160ff191683800117855561261f565b8280016001018555821561261f579182015b8281111561261f578251825591602001919060010190612604565b5061262b92915061262f565b5090565b5b8082111561262b5760008155600101612630565b6001600160a01b038116811461123a57600080fd5b60006020828403121561266b57600080fd5b813561095c81612644565b602080825282518282018190526000919060409081850190868401855b828110156126c157815180516001600160a01b03168552860151868501529284019290850190600101612693565b5091979650505050505050565b60005b838110156126e95781810151838201526020016126d1565b838111156117325750506000910152565b60208152600082518060208401526127198160408501602087016126ce565b601f01601f19169190910160400192915050565b6000806040838503121561274057600080fd5b823561274b81612644565b946020939093013593505050565b801515811461123a57600080fd5b60006020828403121561277957600080fd5b813561095c81612759565b60008060006060848603121561279957600080fd5b83356127a481612644565b925060208401356127b481612644565b929592945050506040919091013590565b600080604083850312156127d857600080fd5b82356127e381612644565b915060208301356127f381612644565b809150509250929050565b6000806040838503121561281157600080fd5b8235915060208301356127f381612759565b60006020828403121561283557600080fd5b5035919050565b60008060008060008060c0878903121561285557600080fd5b863561286081612644565b9550602087013561287081612644565b9450604087013561288081612644565b9350606087013561289081612644565b925060808701356128a081612644565b8092505060a087013590509295509295509295565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561290b5761290b6128e1565b5060010190565b600181811c9082168061292657607f821691505b6020821081141561294757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60006020828403121561299657600080fd5b815161095c81612644565b60208082526006908201526510b7bbb732b960d11b604082015260600190565b600082198211156129d4576129d46128e1565b500190565b6000602082840312156129eb57600080fd5b815167ffffffffffffffff80821115612a0357600080fd5b818401915084601f830112612a1757600080fd5b815181811115612a2957612a296128b5565b604051601f8201601f19908116603f01168101908382118183101715612a5157612a516128b5565b81604052828152876020848701011115612a6a57600080fd5b6125678360208301602088016126ce565b60008251612a8d8184602087016126ce565b6e0810dbdb9d995e0811195c1bdcda5d608a1b920191825250600f01919050565b620c6ecf60eb1b815260008251612acc8160038501602087016126ce565b9190910160030192915050565b600082821015612aeb57612aeb6128e1565b500390565b600060208284031215612b0257600080fd5b815161095c81612759565b600080600080600060a08688031215612b2557600080fd5b8551612b3081612644565b6020870151909550612b4181612644565b6040870151909450612b5281612644565b6060870151909350612b6381612759565b6080870151909250612b7481612644565b809150509295509295909350565b600060208284031215612b9457600080fd5b5051919050565b6000816000190483118215151615612bb557612bb56128e1565b500290565b600082612bd757634e487b7160e01b600052601260045260246000fd5b500490565b60008251612bee8184602087016126ce565b919091019291505056fea264697066735822122078be53517ad2e1b9654e45c69e0547483c942494ed9e8045207232c69da4710664736f6c634300080a0033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.