false
true
0

Contract Address Details

0xdad8b930e8ed35576226B38d87ab23a2a6c5712c

Contract Name
TurboGauge
Creator
0x9b282e–8bf091 at 0x844fb1–65ef5c
Balance
0 PLS ( )
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
0 Transfers
Gas Used
Fetching gas used...
Last Balance Update
27553453
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been partially verified via Sourcify. View contract in Sourcify repository
Contract name:
TurboGauge




Optimization enabled
true
Compiler version
v0.6.12+commit.27d51765




Optimization runs
200
EVM Version
istanbul




Verified at
2026-05-17T02:59:42.073676Z

TurboGauge.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;
//pragma experimental ABIEncoderV2;

import "./SMinter.sol";

contract TurboGauge is SExactGauge {
    address public staking;
    mapping(address => uint) public lastTurboOf;
    uint public lastTurboSupply;

	function initialize(address governor, address _minter, address _lp_token, address _staking) virtual public initializer {
	    super.initialize(governor, _minter, _lp_token);
	    staking = _staking;
	}
    
	function setStaking(address _staking) virtual public governance {
	    staking = _staking;
	}
	
	function lastCheckTime(address addr) internal view returns (uint t) {
        t = integrate_checkpoint_of[addr]; 
        if(t == 0)
            t = IStakingRewards2(staking).stakeTimeOf(addr);
	}
	
	function ratioStaking(address addr) public view returns (uint r) {
	    if(balanceOf[addr] == 0)
	        return 0;
        r = IStakingRewards2(staking).balanceOf(addr);
        r = r.mul(1 ether).div(IStakingRewards2(staking).stakingPerLPT(address(this)));
        r = r.mul(1 ether).div(balanceOf[addr]);
        if(now > lastCheckTime(addr))
            r = r.mul(IStakingRewards2(staking).spendAgeOf(addr)).div(now.sub(lastCheckTime(addr)));
	}
	
	function factorOf(address addr) public view returns (uint f) {
	    f = IStakingRewards2(staking).factorOf(addr);
	    uint r = ratioStaking(addr);
	    if(r < 1 ether)
	        f = f.sub(1 ether).mul(r).div(1 ether).add(1 ether);
	}

    
    function virtualBalanceOf(address addr) virtual public view returns (uint) {
        if(span == 0 || totalSupply == 0)
            return balanceOf[addr];
        if(now == lastCheckTime(addr))
            return balanceOf[addr].add(lastTurboOf[addr]);
        return balanceOf[addr].mul(factorOf(addr)).div(1 ether);
    }
    
    function virtualTotalSupply() virtual public view returns (uint) {
        return totalSupply.add(lastTurboSupply);
    }
    
    function _virtualTotalSupply(address addr, uint vbo) virtual internal view returns (uint) {
        return virtualTotalSupply().add(vbo).sub(balanceOf[addr].add(lastTurboOf[addr]));
    }
    
    function _virtual_claimable_last(address addr, uint delta, uint sumPer, uint lastSumPer) virtual internal view returns (uint amount) {
        if(span == 0 || totalSupply == 0)
            return 0;
        
        amount = sumPer.sub(lastSumPer);
        amount = amount.add(delta.mul(1 ether).div(virtualTotalSupply()));
        amount = amount.mul(balanceOf[addr].add(lastTurboOf[addr])).div(1 ether);
    }

    function claimable_tokens(address addr) virtual override public view returns (uint r) {
        r = integrate_fraction[addr].sub(Minter(minter).minted(addr, address(this)));
        r = r.add(_virtual_claimable_last(addr, claimableDelta(), sumMiningPer, sumMiningPerOf[addr]));
    }
    
    function _checkpoint(address addr, bool _claim_rewards) virtual override internal {
        if(span == 0 || totalSupply == 0)
            return;
        
        uint vbo = virtualBalanceOf(addr);
        uint _vts = _virtualTotalSupply(addr, vbo);
        
        uint delta = claimableDelta();
        uint amount = _virtual_claimable_last(addr, delta, sumMiningPer, sumMiningPerOf[addr]);
        
        //if(delta != amount)
        //    bufReward = bufReward.add(delta).sub(amount);
        if(delta > 0) {
            integrate_fraction[address(0)] = integrate_fraction[address(0)].add(delta);     // total checked
            sumMiningPer = sumMiningPer.add(delta.mul(1 ether).div(_vts));
        }
        if(sumMiningPerOf[addr] != sumMiningPer)
            sumMiningPerOf[addr] = sumMiningPer;
        if(lastTurboOf[addr] != vbo.sub(balanceOf[addr]))
            lastTurboOf[addr] = vbo.sub(balanceOf[addr]);
        if(lastTurboSupply != _vts.sub(totalSupply))
            lastTurboSupply = _vts.sub(totalSupply);
        if(now > lastCheckTime(addr)) {
            uint coinAge = balanceOf[addr].mul(IStakingRewards2(staking).stakingPerLPT(address(this))).div(1 ether).mul(now.sub(lastCheckTime(addr)));
            IStakingRewards2(staking).spendCoinAge(addr, coinAge);
        }
        integrate_checkpoint_of[addr] = now;
        lasttime = now;

        _checkpoint(addr, amount);
        _checkpoint_rewards(addr, _claim_rewards);
    }

}


        

/TransferHelper.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');
    }

    function safeTransfer(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
    }

    function safeTransferFrom(address token, address from, address to, uint value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }

    function safeTransferETH(address to, uint value) internal {
        (bool success,) = to.call{value:value}(new bytes(0));
        require(success, 'TransferHelper: ETH_TRANSFER_FAILED');
    }
}
          

/Governable.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @title Initializable
 *
 * @dev Helper contract to support initializer functions. To use it, replace
 * the constructor with a function that has the `initializer` modifier.
 * WARNING: Unlike constructors, initializer functions must be manually
 * invoked. This applies both to deploying an Initializable contract, as well
 * as extending an Initializable contract via inheritance.
 * WARNING: When used with inheritance, manual care must be taken to not invoke
 * a parent initializer twice, or ensure that all initializers are idempotent,
 * because this is not dealt with automatically as with constructors.
 */
contract Initializable {

  /**
   * @dev Indicates that the contract has been initialized.
   */
  bool private initialized;

  /**
   * @dev Indicates that the contract is in the process of being initialized.
   */
  bool private initializing;

  /**
   * @dev Modifier to use in the initializer function of a contract.
   */
  modifier initializer() {
    require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized");

    bool isTopLevelCall = !initializing;
    if (isTopLevelCall) {
      initializing = true;
      initialized = true;
    }

    _;

    if (isTopLevelCall) {
      initializing = false;
    }
  }

  /**
   * @dev Modifier to use in the initializer function of a contract when upgrade EVEN times.
   */
  modifier initializerEven() {
    require(initializing || isConstructor() || initialized, "Contract instance has already been initialized EVEN times");

    bool isTopLevelCall = !initializing;
    if (isTopLevelCall) {
      initializing = true;
      initialized = false;
    }

    _;

    if (isTopLevelCall) {
      initializing = false;
    }
  }

  /// @dev Returns true if and only if the function is running in the constructor
  function isConstructor() private view returns (bool) {
    // extcodesize checks the size of the code stored in an address, and
    // address returns the current address. Since the code is still not
    // deployed when running a constructor, any checks on its code size will
    // yield zero, making it an effective way to detect if a contract is
    // under construction or not.
    address self = address(this);
    uint256 cs;
    assembly { cs := extcodesize(self) }
    return cs == 0;
  }

  // Reserved storage space to allow for layout changes in the future.
  uint256[50] private ______gap;
}


contract Governable is Initializable {
    address public governor;

    event GovernorshipTransferred(address indexed previousGovernor, address indexed newGovernor);

    /**
     * @dev Contract initializer.
     * called once by the factory at time of deployment
     */
    function initialize(address governor_) virtual public initializer {
        governor = governor_;
        emit GovernorshipTransferred(address(0), governor);
    }

    modifier governance() {
        require(msg.sender == governor);
        _;
    }

    /**
     * @dev Allows the current governor to relinquish control of the contract.
     * @notice Renouncing to governorship will leave the contract without an governor.
     * It will not be possible to call the functions with the `governance`
     * modifier anymore.
     */
    function renounceGovernorship() public governance {
        emit GovernorshipTransferred(governor, address(0));
        governor = address(0);
    }

    /**
     * @dev Allows the current governor to transfer control of the contract to a newGovernor.
     * @param newGovernor The address to transfer governorship to.
     */
    function transferGovernorship(address newGovernor) public governance {
        _transferGovernorship(newGovernor);
    }

    /**
     * @dev Transfers control of the contract to a newGovernor.
     * @param newGovernor The address to transfer governorship to.
     */
    function _transferGovernorship(address newGovernor) internal {
        require(newGovernor != address(0));
        emit GovernorshipTransferred(governor, newGovernor);
        governor = newGovernor;
    }
}


contract Configurable is Governable {

    mapping (bytes32 => uint) internal config;
    
    function getConfig(bytes32 key) public view returns (uint) {
        return config[key];
    }
    function getConfig(bytes32 key, uint index) public view returns (uint) {
        return config[bytes32(uint(key) ^ index)];
    }
    function getConfig(bytes32 key, address addr) public view returns (uint) {
        return config[bytes32(uint(key) ^ uint(addr))];
    }

    function _setConfig(bytes32 key, uint value) internal {
        if(config[key] != value)
            config[key] = value;
    }
    function _setConfig(bytes32 key, uint index, uint value) internal {
        _setConfig(bytes32(uint(key) ^ index), value);
    }
    function _setConfig(bytes32 key, address addr, uint value) internal {
        _setConfig(bytes32(uint(key) ^ uint(addr)), value);
    }
    
    function setConfig(bytes32 key, uint value) external governance {
        _setConfig(key, value);
    }
    function setConfig(bytes32 key, uint index, uint value) external governance {
        _setConfig(bytes32(uint(key) ^ index), value);
    }
    function setConfig(bytes32 key, address addr, uint value) external governance {
        _setConfig(bytes32(uint(key) ^ uint(addr)), value);
    }
}
          

/SMinter.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;
//pragma experimental ABIEncoderV2;

import "./SToken.sol";
import "./Governable.sol";

import "./TransferHelper.sol";


interface Minter {
    event Minted(address indexed recipient, address reward_contract, uint minted);

    function token() external view returns (address);
    function controller() external view returns (address);
    function minted(address, address) external view returns (uint);
    function allowed_to_mint_for(address, address) external view returns (bool);
    
    function mint(address gauge) external;
    function mint_many(address[8] calldata gauges) external;
    function mint_for(address gauge, address _for) external;
    function toggle_approve_mint(address minting_user) external;
}

interface LiquidityGauge {
    event Deposit(address indexed provider, uint value);
    event Withdraw(address indexed provider, uint value);
    event UpdateLiquidityLimit(address user, uint original_balance, uint original_supply, uint working_balance, uint working_supply);

    function user_checkpoint (address addr) external returns (bool);
    function claimable_tokens(address addr) external view returns (uint);
    function claimable_reward(address addr) external view returns (uint);
    function integrate_checkpoint()         external view returns (uint);

    function kick(address addr) external;
    function set_approve_deposit(address addr, bool can_deposit) external;
    function deposit(uint _value) external;
    function deposit(uint _value, address addr) external;
    function withdraw(uint _value) external;
    function withdraw(uint _value, bool claim_rewards) external;
    function claim_rewards() external;
    function claim_rewards(address addr) external;

    function minter()                       external view returns (address);
    function crv_token()                    external view returns (address);
    function lp_token()                     external view returns (address);
    function controller()                   external view returns (address);
    function voting_escrow()                external view returns (address);
    function balanceOf(address)             external view returns (uint);
    function totalSupply()                  external view returns (uint);
    function future_epoch_time()            external view returns (uint);
    function approved_to_deposit(address, address)   external view returns (bool);
    function working_balances(address)      external view returns (uint);
    function working_supply()               external view returns (uint);
    function period()                       external view returns (int128);
    function period_timestamp(uint)         external view returns (uint);
    function integrate_inv_supply(uint)     external view returns (uint);
    function integrate_inv_supply_of(address) external view returns (uint);
    function integrate_checkpoint_of(address) external view returns (uint);
    function integrate_fraction(address)    external view returns (uint);
    function inflation_rate()               external view returns (uint);
    function reward_contract()              external view returns (address);
    function rewarded_token()               external view returns (address);
    function reward_integral()              external view returns (uint);
    function reward_integral_for(address)   external view returns (uint);
    function rewards_for(address)           external view returns (uint);
    function claimed_rewards_for(address)   external view returns (uint);
}

interface IStakingRewards {
    // Views
    function lastTimeRewardApplicable() external view returns (uint256);
    function rewardPerToken() external view returns (uint256);
    function rewards(address account) external view returns (uint256);
    function earned(address account) external view returns (uint256);
    function getRewardForDuration() external view returns (uint256);
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    // Mutative
    function stake(uint256 amount) external;
    function withdraw(uint256 amount) external;
    function getReward() external;
    function exit() external;
    // Events
    event RewardAdded(uint256 reward);
    event Staked(address indexed user, uint256 amount);
    event Withdrawn(address indexed user, uint256 amount);
    event RewardPaid(address indexed user, uint256 reward);
}

interface IStakingRewards2 is IStakingRewards {
	function totalMinted() external view returns (uint);
	function weightOfGauge(address gauge) external view returns (uint);
	function stakingPerLPT(address gauge) external view returns (uint);
	
	function stakeTimeOf(address account) external view returns (uint);
	function stakeAgeOf(address account) external view returns (uint);
	function factorOf(address account) external view returns (uint);

	function spendTimeOf(address account) external view returns (uint);
	function spendAgeOf(address account) external view returns (uint);
	function coinAgeOf(address account) external view returns (uint);
	
    function spendCoinAge(address account, uint coinAge) external returns (uint);
    
    event SpentCoinAge(address indexed gauge, address indexed account, uint coinAge);
}

contract SSimpleGauge is LiquidityGauge, Configurable {
    using SafeMath for uint;
    using TransferHelper for address;

    address override public minter;
    address override public crv_token;
    address override public lp_token;
    address override public controller;
    address override public voting_escrow;
    mapping(address => uint) override public balanceOf;
    uint override public totalSupply;
    uint override public future_epoch_time;
    
    // caller -> recipient -> can deposit?
    mapping(address => mapping(address => bool)) override public approved_to_deposit;
    
    mapping(address => uint) override public working_balances;
    uint override public working_supply;
    
    // The goal is to be able to calculate ∫(rate * balance / totalSupply dt) from 0 till checkpoint
    // All values are kept in units of being multiplied by 1e18
    int128 override public period;
    uint256[100000000000000000000000000000] override public period_timestamp;
    
    // 1e18 * ∫(rate(t) / totalSupply(t) dt) from 0 till checkpoint
    uint256[100000000000000000000000000000] override public integrate_inv_supply;  // bump epoch when rate() changes
    
    // 1e18 * ∫(rate(t) / totalSupply(t) dt) from (last_action) till checkpoint
    mapping(address => uint) override public integrate_inv_supply_of;
    mapping(address => uint) override public integrate_checkpoint_of;
    
    // ∫(balance * rate(t) / totalSupply(t) dt) from 0 till checkpoint
    // Units: rate * t = already number of coins per address to issue
    mapping(address => uint) override public integrate_fraction;
    
    uint override public inflation_rate;
    
    // For tracking external rewards
    address override public reward_contract;
    address override public rewarded_token;
    
    uint override public reward_integral;
    mapping(address => uint) override public reward_integral_for;
    mapping(address => uint) override public rewards_for;
    mapping(address => uint) override public claimed_rewards_for;
    

	uint public span;
	uint public end;

	function initialize(address governor, address _minter, address _lp_token) public initializer {
	    super.initialize(governor);
	    
	    minter      = _minter;
	    crv_token   = Minter(_minter).token();
	    lp_token    = _lp_token;
	    IERC20(lp_token).totalSupply();          // just check
	}
    
    function setSpan(uint _span, bool isLinear) virtual external governance {
        span = _span;
        if(isLinear)
            end = now + _span;
        else
            end = 0;
    }
    
    function kick(address addr) virtual override external {
        _checkpoint(addr, true);
    }
    
    function set_approve_deposit(address addr, bool can_deposit) virtual override external {
        approved_to_deposit[addr][msg.sender] = can_deposit;
    }
    
    function deposit(uint amount) virtual override external {
        deposit(amount, msg.sender);
    }
    function deposit(uint amount, address addr) virtual override public {
        require(addr == msg.sender || approved_to_deposit[msg.sender][addr], 'Not approved');

        _checkpoint(addr, true);
        
        _deposit(addr, amount);
        
        balanceOf[addr] = balanceOf[addr].add(amount);
        totalSupply = totalSupply.add(amount);
        
        emit Deposit(addr, amount);
    }
    function _deposit(address addr, uint amount) virtual internal {
        lp_token.safeTransferFrom(addr, address(this), amount);
    }
    
    function withdraw() virtual  external {
        withdraw(balanceOf[msg.sender], true);
    }
    function withdraw(uint amount) virtual override external {
        withdraw(amount, true);
    }
    function withdraw(uint amount, bool claim_rewards) virtual override public {
        _checkpoint(msg.sender, claim_rewards);
        
        totalSupply = totalSupply.sub(amount);
        balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);
        
        _withdraw(msg.sender, amount);
        
        emit Withdraw(msg.sender, amount);
    }
    function _withdraw(address to, uint amount) virtual internal {
        lp_token.safeTransfer(to, amount);
    }
    
    function claimable_reward(address) virtual override public view returns (uint) {
        return 0;
    }

    function claim_rewards() virtual override public {
        return claim_rewards(msg.sender);
    }
    function claim_rewards(address) virtual override public {
        return;
    }
    function _checkpoint_rewards(address, bool) virtual internal {
        return;
    }
    
    function claimable_tokens(address addr) virtual override public view returns (uint amount) {
        if(span == 0 || totalSupply == 0)
            return 0;
        
        amount = SMinter(minter).quotas(address(this));
        amount = amount.mul(balanceOf[addr]).div(totalSupply);
        
        uint lasttime = integrate_checkpoint_of[addr];
        if(end == 0) {                                                         // isNonLinear, endless
            if(now.sub(lasttime) < span)
                amount = amount.mul(now.sub(lasttime)).div(span);
        }else if(now < end)
            amount = amount.mul(now.sub(lasttime)).div(end.sub(lasttime));
        else if(lasttime >= end)
            amount = 0;
    }
    
    function _checkpoint(address addr, uint amount) virtual internal {
        if(amount > 0) {
            integrate_fraction[addr] = integrate_fraction[addr].add(amount);
            
            address teamAddr = address(config['teamAddr']);
            uint teamRatio = config['teamRatio'];
            if(teamAddr != address(0) && teamRatio != 0)
                integrate_fraction[teamAddr] = integrate_fraction[teamAddr].add(amount.mul(teamRatio).div(1 ether));
        }
    }

    function _checkpoint(address addr, bool _claim_rewards) virtual internal {
        uint amount = claimable_tokens(addr);
        _checkpoint(addr, amount);
        _checkpoint_rewards(addr, _claim_rewards);
    
        integrate_checkpoint_of[addr] = now;
    }
    
    function user_checkpoint(address addr) virtual override external returns (bool) {
        _checkpoint(addr, true);
        return true;
    }

    function integrate_checkpoint() override external view returns (uint) {
        return now;
    }
} 

contract SExactGauge is LiquidityGauge, Configurable {
    using SafeMath for uint;
    using TransferHelper for address;
    
    bytes32 internal constant _devAddr_         = 'devAddr';
    bytes32 internal constant _devRatio_        = 'devRatio';
    bytes32 internal constant _ecoAddr_         = 'ecoAddr';
    bytes32 internal constant _ecoRatio_        = 'ecoRatio';
    bytes32 internal constant _claim_rewards_   = 'claim_rewards';
    
    address override public minter;
    address override public crv_token;
    address override public lp_token;
    address override public controller;
    address override public voting_escrow;
    mapping(address => uint) override public balanceOf;
    uint override public totalSupply;
    uint override public future_epoch_time;
    
    // caller -> recipient -> can deposit?
    mapping(address => mapping(address => bool)) override public approved_to_deposit;
    
    mapping(address => uint) override public working_balances;
    uint override public working_supply;
    
    // The goal is to be able to calculate ∫(rate * balance / totalSupply dt) from 0 till checkpoint
    // All values are kept in units of being multiplied by 1e18
    int128 override public period;
    uint256[100000000000000000000000000000] override public period_timestamp;
    
    // 1e18 * ∫(rate(t) / totalSupply(t) dt) from 0 till checkpoint
    uint256[100000000000000000000000000000] override public integrate_inv_supply;  // bump epoch when rate() changes
    
    // 1e18 * ∫(rate(t) / totalSupply(t) dt) from (last_action) till checkpoint
    mapping(address => uint) override public integrate_inv_supply_of;
    mapping(address => uint) override public integrate_checkpoint_of;
    
    // ∫(balance * rate(t) / totalSupply(t) dt) from 0 till checkpoint
    // Units: rate * t = already number of coins per address to issue
    mapping(address => uint) override public integrate_fraction;
    
    uint override public inflation_rate;
    
    // For tracking external rewards
    address override public reward_contract;
    address override public rewarded_token;
    
    mapping(address => uint) public reward_integral_;                             // rewarded_token => reward_integral
    mapping(address => mapping(address => uint)) public reward_integral_for_;     // recipient => rewarded_token => reward_integral_for
    mapping(address => mapping(address => uint)) public rewards_for_; 
    mapping(address => mapping(address => uint)) public claimed_rewards_for_; 

	uint public span;
	uint public end;
	mapping(address => uint) public sumMiningPerOf;
	uint public sumMiningPer;
	uint public bufReward;                              // obsoleted, instead of integrate_fraction[address(0)]
	uint public lasttime;                               // repetition of integrate_checkpoint()
	
	function initialize(address governor, address _minter, address _lp_token) public virtual initializer {
	    super.initialize(governor);
	    
	    minter      = _minter;
	    crv_token   = Minter(_minter).token();
	    lp_token    = _lp_token;
	    IERC20(lp_token).totalSupply();                 // just check
	}
    
    function setSpan(uint _span, bool isLinear) virtual external governance {
        span = _span;
        if(isLinear)
            end = now + _span;
        else
            end = 0;
            
        if(lasttime == 0)
            lasttime = now;
    }
    
    function kick(address addr) virtual override external {
        _checkpoint(addr, true);
    }
    
    function set_approve_deposit(address addr, bool can_deposit) virtual override external {
        approved_to_deposit[addr][msg.sender] = can_deposit;
    }
    
    function deposit(uint amount) virtual override external {
        deposit(amount, msg.sender);
    }
    function deposit(uint amount, address addr) virtual override public {
        require(addr == msg.sender || approved_to_deposit[msg.sender][addr], 'Not approved');

        _checkpoint(addr, config[_claim_rewards_] == 0 ? false : true);
        
        _deposit(addr, amount);

        balanceOf[msg.sender] = balanceOf[msg.sender].add(amount);
        totalSupply = totalSupply.add(amount);
        
        emit Deposit(msg.sender, amount);
    }
    function _deposit(address addr, uint amount) virtual internal {
        lp_token.safeTransferFrom(addr, address(this), amount);
    }
    
    function withdraw() virtual external {
        withdraw(balanceOf[msg.sender]);
    }
    function withdraw(uint amount) virtual override public {
        withdraw(amount, config[_claim_rewards_] == 0 ? false : true);
    }
    function withdraw(uint amount, bool _claim_rewards) virtual override public {
        _checkpoint(msg.sender, _claim_rewards);
        
        totalSupply = totalSupply.sub(amount);
        balanceOf[msg.sender] = balanceOf[msg.sender].sub(amount);
        
        _withdraw(msg.sender, amount);
        
        emit Withdraw(msg.sender, amount);
    }
    function _withdraw(address to, uint amount) virtual internal {
        lp_token.safeTransfer(to, amount);
    }
    
    function claimable_reward(address addr) virtual override public view returns (uint) {
        addr;
        return 0;
    }

    function claim_rewards() virtual override public {
        return claim_rewards(msg.sender);
    }
    function claim_rewards(address) virtual override public {
        return;
    }
    function _checkpoint_rewards(address, bool) virtual internal {
        return;
    }
    
    function claimable_tokens(address addr) virtual override public view returns (uint r) {
        r = integrate_fraction[addr].sub(Minter(minter).minted(addr, address(this)));
        r = r.add(_claimable_last(addr, claimableDelta(), sumMiningPer, sumMiningPerOf[addr]));
    }
    
    function _claimable_last(address addr, uint delta, uint sumPer, uint lastSumPer) virtual internal view returns (uint amount) {
        if(span == 0 || totalSupply == 0)
            return 0;
        
        amount = sumPer.sub(lastSumPer);
        amount = amount.add(delta.mul(1 ether).div(totalSupply));
        amount = amount.mul(balanceOf[addr]).div(1 ether);
    }
    function claimableDelta() virtual public view returns(uint amount) {
        if(span == 0 || totalSupply == 0)
            return 0;
        
        //amount = SMinter(minter).quotas(address(this)).sub(bufReward);
        amount = SMinter(minter).quotas(address(this)).add(Minter(minter).minted(address(0), address(this))).sub(integrate_fraction[address(0)]);

        if(end == 0) {                                                         // isNonLinear, endless
            if(now.sub(lasttime) < span)
                amount = amount.mul(now.sub(lasttime)).div(span);
        }else if(now < end)
            amount = amount.mul(now.sub(lasttime)).div(end.sub(lasttime));
        else if(lasttime >= end)
            amount = 0;
    }

    function _checkpoint(address addr, uint amount) virtual internal {
        if(amount > 0) {
            integrate_fraction[addr] = integrate_fraction[addr].add(amount);
            
            addr = address(config[_devAddr_]);
            uint ratio = config[_devRatio_];
            if(addr != address(0) && ratio != 0)
                integrate_fraction[addr] = integrate_fraction[addr].add(amount.mul(ratio).div(1 ether));

            addr = address(config[_ecoAddr_]);
            ratio = config[_ecoRatio_];
            if(addr != address(0) && ratio != 0)
                integrate_fraction[addr] = integrate_fraction[addr].add(amount.mul(ratio).div(1 ether));
        }
    }
    
    function _checkpoint(address addr, bool _claim_rewards) virtual internal {
        if(span == 0 || totalSupply == 0)
            return;
        
        uint delta = claimableDelta();
        uint amount = _claimable_last(addr, delta, sumMiningPer, sumMiningPerOf[addr]);
        
        //if(delta != amount)
        //    bufReward = bufReward.add(delta).sub(amount);
        if(delta > 0) {
            integrate_fraction[address(0)] = integrate_fraction[address(0)].add(delta);     // total checked
            sumMiningPer = sumMiningPer.add(delta.mul(1 ether).div(totalSupply));
        }
        if(sumMiningPerOf[addr] != sumMiningPer)
            sumMiningPerOf[addr] = sumMiningPer;
        lasttime = now;

        _checkpoint(addr, amount);
        _checkpoint_rewards(addr, _claim_rewards);
    }

    function user_checkpoint(address addr) virtual override external returns (bool) {
        _checkpoint(addr, config[_claim_rewards_] == 0 ? false : true);
        return true;
    }

    function integrate_checkpoint() override external view returns (uint) {
        return lasttime;
    }
    
    function reward_integral() virtual override external view returns (uint) {
        return reward_integral_[rewarded_token];
    }
    
    function reward_integral_for(address addr) virtual override external view returns (uint) {
        return reward_integral_for_[addr][rewarded_token];
    }
    
    function rewards_for(address addr) virtual override external view returns (uint) {
        return rewards_for_[addr][rewarded_token];
    }
    
    function claimed_rewards_for(address addr) virtual override external view returns (uint) {
        return claimed_rewards_for_[addr][rewarded_token];
    }
} 


contract SNestGauge is SExactGauge {
	address[] public rewards;
	//mapping(address => mapping(address =>uint)) internal sumRewardPerOf_;      // recipient => rewarded_token => can sumRewardPerOf            // obsolete, instead of reward_integral_
	//mapping(address => uint) internal sumRewardPer_;                           // rewarded_token => can sumRewardPerOf                         // obsolete, instead of reward_integral_for_

	function initialize(address governor, address _minter, address _lp_token, address _nestGauge, address[] memory _moreRewards) public initializer {
	    super.initialize(governor, _minter, _lp_token);
	    
	    reward_contract = _nestGauge;
	    rewarded_token  = LiquidityGauge(_nestGauge).crv_token();
	    rewards         = _moreRewards;
	    rewards.push(rewarded_token);
	    address rewarded_token2 = LiquidityGauge(_nestGauge).rewarded_token();
	    if(rewarded_token2 != address(0))
    	    rewards.push(rewarded_token2);
	    
	    LiquidityGauge(_nestGauge).integrate_checkpoint();      // just check
	    for(uint i=0; i<_moreRewards.length; i++)
	        IERC20(_moreRewards[i]).totalSupply();              // just check
	}
    
    function _deposit(address from, uint amount) virtual override internal {
        super._deposit(from, amount);                           // lp_token.safeTransferFrom(from, address(this), amount);
        lp_token.safeApprove(reward_contract, amount);
        LiquidityGauge(reward_contract).deposit(amount);
    }

    function _withdraw(address to, uint amount) virtual override internal {
        LiquidityGauge(reward_contract).withdraw(amount);
        super._withdraw(to, amount);                            // lp_token.safeTransfer(to, amount);
    }
    
    function claim_rewards(address to) virtual override public {
        if(span == 0 || totalSupply == 0)
            return;
        
        _checkpoint_rewards(to, true);
        
        for(uint i=0; i<rewards.length; i++) {
            uint amount = rewards_for_[to][rewards[i]].sub(claimed_rewards_for_[to][rewards[i]]);
            if(amount > 0) {
                rewards[i].safeTransfer(to, amount);
                claimed_rewards_for_[to][rewards[i]] = rewards_for_[to][rewards[i]];
            }
        }
    }

    function _checkpoint_rewards(address addr, bool _claim_rewards) virtual override internal {
        if(span == 0 || totalSupply == 0)
            return;
        
        uint[] memory drs = new uint[](rewards.length);
        
        if(_claim_rewards) {
            for(uint i=0; i<drs.length; i++)
                drs[i] = IERC20(rewards[i]).balanceOf(address(this));
                
            Minter(LiquidityGauge(reward_contract).minter()).mint(reward_contract);
            LiquidityGauge(reward_contract).claim_rewards();
            
            for(uint i=0; i<drs.length; i++)
                drs[i] = IERC20(rewards[i]).balanceOf(address(this)).sub(drs[i]);
        }

        for(uint i=0; i<drs.length; i++) {
            uint amount = _claimable_last(addr, drs[i], reward_integral_[rewards[i]], reward_integral_for_[addr][rewards[i]]);
            if(amount > 0)
                rewards_for_[addr][rewards[i]] = rewards_for_[addr][rewards[i]].add(amount);
            
            if(drs[i] > 0)
                reward_integral_[rewards[i]] = reward_integral_[rewards[i]].add(drs[i].mul(1 ether).div(totalSupply));
            if(reward_integral_for_[addr][rewards[i]] != reward_integral_[rewards[i]])
                reward_integral_for_[addr][rewards[i]] = reward_integral_[rewards[i]];
        }
    }

    function claimable_reward(address addr) virtual override public view returns (uint r) {
        //uint delta = LiquidityGauge(reward_contract).claimable_tokens(address(this));     // Error: Mutable call in static context
        uint delta = LiquidityGauge(reward_contract).integrate_fraction(address(this)).sub(Minter(LiquidityGauge(reward_contract).minter()).minted(address(this), reward_contract));
        r = _claimable_last(addr, delta, reward_integral_[rewarded_token], reward_integral_for_[addr][rewarded_token]);
        r = r.add(rewards_for_[addr][rewarded_token].sub(claimed_rewards_for_[addr][rewarded_token]));
    }
    
    function claimable_reward2(address addr) virtual public view returns (uint r) {
        uint delta = LiquidityGauge(reward_contract).claimable_reward(address(this)).sub(LiquidityGauge(reward_contract).claimed_rewards_for(address(this)));
        address reward2 = LiquidityGauge(reward_contract).rewarded_token();
        r = _claimable_last(addr, delta, reward_integral_[reward2], reward_integral_for_[addr][reward2]);
        r = r.add(rewards_for_[addr][reward2].sub(claimed_rewards_for_[addr][reward2]));
    }    

    function claimable_reward(address addr, address reward) virtual public view returns (uint r) {
        r = _claimable_last(addr, 0, reward_integral_[reward], reward_integral_for_[addr][reward]);
        r = r.add(rewards_for_[addr][reward].sub(claimed_rewards_for_[addr][reward]));
    }
    
    function claimed_rewards_for2(address addr) virtual public view returns (uint) {
        return claimed_rewards_for_[addr][LiquidityGauge(reward_contract).rewarded_token()];
    }
    
    function rewards_for2(address addr) virtual public view returns (uint) {
        return rewards_for_[addr][LiquidityGauge(reward_contract).rewarded_token()];
    }
    
}


contract SMinter is Minter, Configurable {
    using SafeMath for uint;
    using Address for address payable;
    using TransferHelper for address;
    
	bytes32 internal constant _allowContract_   = 'allowContract';
	bytes32 internal constant _allowlist_       = 'allowlist';
	bytes32 internal constant _blocklist_       = 'blocklist';

    address override public token;
    address override public controller;
    mapping(address => mapping(address => uint)) override public minted;                    // user => reward_contract => value
    mapping(address => mapping(address => bool)) override public allowed_to_mint_for;       // minter => user => can mint?
    mapping(address => uint) public quotas;                                                 // reward_contract => quota;

    function initialize(address governor, address token_) public initializer {
        super.initialize(governor);
        token = token_;
    }
    
    function setGaugeQuota(address gauge, uint quota) public governance {
       quotas[gauge] = quota;
    }
    
    function mint(address gauge) virtual override public {
        mint_for(gauge, msg.sender);   
    }
    
    function mint_many(address[8] calldata gauges) virtual override external {
        for(uint i=0; i<gauges.length; i++)
            mint(gauges[i]);
    }
    
    function mint_many(address[] calldata gauges) virtual external {
        for(uint i=0; i<gauges.length; i++)
            mint(gauges[i]);
    }
    
    function mint_for(address gauge, address _for) virtual override public {
        require(_for == msg.sender || allowed_to_mint_for[msg.sender][_for], 'Not approved');
        require(quotas[gauge] > 0, 'No quota');
        
        require(getConfig(_blocklist_, msg.sender) == 0, 'In blocklist');
        bool isContract = msg.sender.isContract();
        require(!isContract || config[_allowContract_] != 0 || getConfig(_allowlist_, msg.sender) != 0, 'No allowContract');

        LiquidityGauge(gauge).user_checkpoint(_for);
        uint total_mint = LiquidityGauge(gauge).integrate_fraction(_for);
        uint to_mint = total_mint.sub(minted[_for][gauge]);
    
        if(to_mint != 0) {
            quotas[gauge] = quotas[gauge].sub(to_mint);
            token.safeTransfer(_for, to_mint);
            minted[_for][gauge] = total_mint;
            minted[address(0)][gauge] = minted[address(0)][gauge].add(to_mint);         // total minted of gauge
    
            emit Minted(_for, gauge, total_mint);
        }
    }
    
    function toggle_approve_mint(address minting_user) virtual override external {
        allowed_to_mint_for[minting_user][msg.sender] = !allowed_to_mint_for[minting_user][msg.sender];
    }
}

/*
// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');
    }

    function safeTransfer(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
    }

    function safeTransferFrom(address token, address from, address to, uint value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }

    function safeTransferETH(address to, uint value) internal {
        (bool success,) = to.call{value:value}(new bytes(0));
        require(success, 'TransferHelper: ETH_TRANSFER_FAILED');
    }
}
*/
          

/SToken.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}


/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

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

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

        return c;
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
    
	function sqrt(uint x)public pure returns(uint y) {
        uint z = (x + 1) / 2;
        y = x;
        while (z < y) {
            y = z;
            z = (x / z + z) / 2;
        }
    }
}


/**
 * @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 in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}


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


/**
 * @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 guidelines: functions revert instead
 * of 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 {
    using SafeMath for uint256;
    using Address for address;

    mapping (address => uint256) public _balances;

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

    uint256 public _totalSupply;

    string internal _name;
    string internal _symbol;
    uint8 internal _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;
        _decimals = 18;
    }
    
    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view 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 {_setupDecimals} is
     * called.
     *
     * 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 returns (uint8) {
        return _decimals;
    }

    /**
     * @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);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        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].add(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) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is 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);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(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
     *
     * - `to` 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 = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(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);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is 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 Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

    /**
     * @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 to 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 { }
    
}


contract SfgToken is ERC20 {

	constructor(address SfgFarm) ERC20("Stable Finance Governance Token", "SFG") public {
		uint8 decimals = 18;
		_setupDecimals(decimals);
		
		_mint(SfgFarm,  21000000 * 10 ** uint256(decimals));       // 100%, 21000000
	}
}

contract SfyToken is ERC20 {

	constructor(address SfyFarm) ERC20("Stable Finance Yield Token", "SFY") public {
		uint8 decimals = 18;
		_setupDecimals(decimals);
		
		_mint(SfyFarm,  21000000 * 10 ** uint256(decimals));       // 100%, 21000000
	}
}
          

Compiler Settings

{"remappings":[],"optimizer":{"runs":200,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"istanbul","compilationTarget":{"TurboGauge.sol":"TurboGauge"}}
              

Contract ABI

[{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"provider","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"GovernorshipTransferred","inputs":[{"type":"address","name":"previousGovernor","internalType":"address","indexed":true},{"type":"address","name":"newGovernor","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"UpdateLiquidityLimit","inputs":[{"type":"address","name":"user","internalType":"address","indexed":false},{"type":"uint256","name":"original_balance","internalType":"uint256","indexed":false},{"type":"uint256","name":"original_supply","internalType":"uint256","indexed":false},{"type":"uint256","name":"working_balance","internalType":"uint256","indexed":false},{"type":"uint256","name":"working_supply","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Withdraw","inputs":[{"type":"address","name":"provider","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approved_to_deposit","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"bufReward","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claim_rewards","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claim_rewards","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"}],"name":"claimableDelta","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"claimable_reward","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"r","internalType":"uint256"}],"name":"claimable_tokens","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"claimed_rewards_for","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"claimed_rewards_for_","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"controller","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"crv_token","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deposit","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"end","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"f","internalType":"uint256"}],"name":"factorOf","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"future_epoch_time","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getConfig","inputs":[{"type":"bytes32","name":"key","internalType":"bytes32"},{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getConfig","inputs":[{"type":"bytes32","name":"key","internalType":"bytes32"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getConfig","inputs":[{"type":"bytes32","name":"key","internalType":"bytes32"},{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"governor","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"inflation_rate","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"governor","internalType":"address"},{"type":"address","name":"_minter","internalType":"address"},{"type":"address","name":"_lp_token","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"governor_","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"governor","internalType":"address"},{"type":"address","name":"_minter","internalType":"address"},{"type":"address","name":"_lp_token","internalType":"address"},{"type":"address","name":"_staking","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"integrate_checkpoint","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"integrate_checkpoint_of","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"integrate_fraction","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"integrate_inv_supply","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"integrate_inv_supply_of","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"kick","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastTurboOf","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastTurboSupply","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lasttime","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"lp_token","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"minter","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"int128","name":"","internalType":"int128"}],"name":"period","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"period_timestamp","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"r","internalType":"uint256"}],"name":"ratioStaking","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceGovernorship","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"reward_contract","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"reward_integral","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"reward_integral_","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"reward_integral_for","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"reward_integral_for_","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"rewarded_token","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"rewards_for","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"rewards_for_","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setConfig","inputs":[{"type":"bytes32","name":"key","internalType":"bytes32"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setConfig","inputs":[{"type":"bytes32","name":"key","internalType":"bytes32"},{"type":"address","name":"addr","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setConfig","inputs":[{"type":"bytes32","name":"key","internalType":"bytes32"},{"type":"uint256","name":"index","internalType":"uint256"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSpan","inputs":[{"type":"uint256","name":"_span","internalType":"uint256"},{"type":"bool","name":"isLinear","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setStaking","inputs":[{"type":"address","name":"_staking","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"set_approve_deposit","inputs":[{"type":"address","name":"addr","internalType":"address"},{"type":"bool","name":"can_deposit","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"span","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"staking","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"sumMiningPer","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"sumMiningPerOf","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferGovernorship","inputs":[{"type":"address","name":"newGovernor","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"user_checkpoint","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"virtualBalanceOf","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"virtualTotalSupply","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"voting_escrow","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"bool","name":"_claim_rewards","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"working_balances","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"working_supply","inputs":[]}]
              

Contract Creation Code

Verify & Publish
0x608060405234801561001057600080fd5b50612e48806100206000396000f3fe608060405234801561001057600080fd5b50600436106104075760003560e01c806382c6306611610220578063c0c53b8b11610130578063e1522536116100b8578063f77c479111610087578063f77c479114610b04578063f8c8765e14610b0c578063fd96044b14610b4a578063fe06566c14610b70578063fec8ee0c14610b9657610407565b8063e152253614610aa7578063e6f1daf214610ad5578063ef78d4fd14610add578063efbe1c1c14610afc57610407565b8063d31f3f6d116100ff578063d31f3f6d14610a40578063d4378c5714610a48578063ddf2be3f14610a50578063de263bfa14610a79578063dfe0503114610a9f57610407565b8063c0c53b8b14610996578063c4d66de8146109ce578063cb742358146109f4578063d2797b5914610a1a57610407565b80639df4ed56116101b3578063b6aa515b11610182578063b6aa515b1461091d578063b6b55f2514610943578063bce998f414610960578063be5d1be914610986578063bf88a6ff1461098e57610407565b80639df4ed56146108b5578063aaa626b6146108db578063b21544f3146108e3578063b6a1912d1461091557610407565b80638ff39099116101ef5780638ff390991461081557806396c551751461083b578063972656a3146108615780639bd324f21461088f57610407565b806382c630661461079f57806384e9bd7e146107a757806387564d84146107cd5780638ec872e3146107f257610407565b8063331345831161031b57806352665f47116102ae5780636e553f651161027d5780636e553f651461072057806370a082311461074c5780637598108c1461077257806376d8b1171461078f57806381c0c2631461079757610407565b806352665f47146106a957806361aac4da146106d557806365fe9451146106fb5780636dd5b69d1461070357610407565b80634b820093116102ea5780634b8200931461060b5780634c87a0a5146106455780634cf088d9146106735780634d3ced191461067b57610407565b806333134583146105b057806338d07436146105d65780633ccfd60b146105fb57806343d7f86f1461060357610407565b806317e280891161039e5780631d2747d41161036d5780631d2747d41461052f57806323a582921461055d5780632585581f14610565578063267716d21461056d5780632e1a7d4d1461059357610407565b806317e28089146104f1578063180692d0146104f957806318160ddd146105015780631b9f546f1461050957610407565b806313ecb1ca116103da57806313ecb1ca1461047857806313fa13681461049e57806315fe96dc146104c457806316fa50b1146104e957610407565b8063075461721461040c57806309400707146104305780630c340a241461046857806313aecab114610470575b600080fd5b610414610bb3565b604080516001600160a01b039092168252519081900360200190f35b6104566004803603602081101561044657600080fd5b50356001600160a01b0316610bc2565b60408051918252519081900360200190f35b610414610be0565b610456610bef565b6104566004803603602081101561048e57600080fd5b50356001600160a01b0316610c1a565b610456600480360360208110156104b457600080fd5b50356001600160a01b0316610c2c565b6104e7600480360360408110156104da57600080fd5b5080359060200135610c73565b005b610414610c98565b610456610cb3565b610456610cb9565b610456610ccb565b6104566004803603602081101561051f57600080fd5b50356001600160a01b0316610cd1565b6104e76004803603604081101561054557600080fd5b506001600160a01b0381351690602001351515610cef565b610456610d25565b610456610d37565b6104566004803603602081101561058357600080fd5b50356001600160a01b0316610d49565b6104e7600480360360208110156105a957600080fd5b5035610d67565b610456600480360360208110156105c657600080fd5b50356001600160a01b0316610dbf565b6104e7600480360360408110156105ec57600080fd5b50803590602001351515610ec4565b6104e7610f4f565b610456610f6a565b6106316004803603602081101561062157600080fd5b50356001600160a01b0316610f7c565b604080519115158252519081900360200190f35b6104566004803603604081101561065b57600080fd5b506001600160a01b0381358116916020013516610fdb565b610414611004565b6104566004803603604081101561069157600080fd5b506001600160a01b038135811691602001351661101f565b610456600480360360408110156106bf57600080fd5b50803590602001356001600160a01b0316611048565b610456600480360360208110156106eb57600080fd5b50356001600160a01b0316611064565b610456611145565b6104566004803603602081101561071957600080fd5b5035611157565b6104e76004803603604081101561073657600080fd5b50803590602001356001600160a01b0316611169565b6104566004803603602081101561076257600080fd5b50356001600160a01b03166112ae565b6104566004803603602081101561078857600080fd5b50356112c0565b6104146112e0565b6104e76112ef565b610414611350565b6104e7600480360360208110156107bd57600080fd5b50356001600160a01b0316610dbc565b6104e7600480360360408110156107e357600080fd5b5080359060200135151561135f565b6104566004803603604081101561080857600080fd5b50803590602001356113dd565b6104e76004803603602081101561082b57600080fd5b50356001600160a01b03166113f0565b6104e76004803603602081101561085157600080fd5b50356001600160a01b0316611435565b6104566004803603604081101561087757600080fd5b506001600160a01b0381358116916020013516611440565b610456600480360360208110156108a557600080fd5b50356001600160a01b0316611469565b610456600480360360208110156108cb57600080fd5b50356001600160a01b0316611487565b6104566114cb565b6104e7600480360360608110156108f957600080fd5b508035906001600160a01b036020820135169060400135611501565b610456611532565b6104e76004803603602081101561093357600080fd5b50356001600160a01b0316611544565b6104e76004803603602081101561095957600080fd5b5035611564565b6104566004803603602081101561097657600080fd5b50356001600160a01b031661156e565b61045661179f565b6104146117a5565b6104e7600480360360608110156109ac57600080fd5b506001600160a01b0381358116916020810135821691604090910135166117c0565b6104e7600480360360208110156109e457600080fd5b50356001600160a01b0316611982565b61045660048036036020811015610a0a57600080fd5b50356001600160a01b0316611a73565b61045660048036036020811015610a3057600080fd5b50356001600160a01b0316611b3e565b610456611b44565b610456611b56565b6104e760048036036060811015610a6657600080fd5b5080359060208101359060400135611de4565b61045660048036036020811015610a8f57600080fd5b50356001600160a01b0316611e07565b610414611e25565b61063160048036036040811015610abd57600080fd5b506001600160a01b0381358116916020013516611e34565b6104e7611e54565b610ae5611e5d565b60408051600f9290920b8252519081900360200190f35b610456611e66565b610414611e78565b6104e760048036036080811015610b2257600080fd5b506001600160a01b038135811691602081013582169160408201358116916060013516611e87565b61045660048036036020811015610b6057600080fd5b50356001600160a01b0316611f5f565b61045660048036036020811015610b8657600080fd5b50356001600160a01b0316611fa3565b61045660048036036020811015610bac57600080fd5b5035611fc1565b6035546001600160a01b031681565b6c02863c1f5cdae42f95400000436020526000908152604090205481565b6033546001600160a01b031681565b6000610c146c02863c1f5cdae42f954000005354603b54611fe690919063ffffffff16565b90505b90565b603e6020526000908152604090205481565b6001600160a01b0380821660009081526c02863c1f5cdae42f9540000048602090815260408083206c02863c1f5cdae42f954000004654909416835292905220545b919050565b6033546001600160a01b03163314610c8a57600080fd5b610c948282612047565b5050565b6c02863c1f5cdae42f9540000046546001600160a01b031681565b603f5481565b6c02863c1f5cdae42f95400000445481565b603b5481565b6c02863c1f5cdae42f954000004d6020526000908152604090205481565b6001600160a01b03919091166000908152603d602090815260408083203384529091529020805460ff1916911515919091179055565b6c02863c1f5cdae42f95400000505481565b6c02863c1f5cdae42f954000004b5481565b6c02863c1f5cdae42f95400000476020526000908152604090205481565b6c636c61696d5f7265776172647360981b60005260346020527f684da2165171dc71a63fa7e63bc201bb3b7b8a39bd56bf2e6eba52a048e47ff854610dbc90829015610db4576001610db7565b60005b610ec4565b50565b603554604080516308b752bb60e41b81526001600160a01b0384811660048301523060248301529151600093610e6d931691638b752bb0916044808301926020929190829003018186803b158015610e1657600080fd5b505afa158015610e2a573d6000803e3d6000fd5b505050506040513d6020811015610e4057600080fd5b50516001600160a01b03841660009081526c02863c1f5cdae42f954000004360205260409020549061206e565b9050610ebe610eb783610e7e611b56565b6c02863c1f5cdae42f954000004e546001600160a01b03871660009081526c02863c1f5cdae42f954000004d60205260409020546120b0565b8290611fe6565b92915050565b610ece3382612162565b603b54610edb908361206e565b603b55336000908152603a6020526040902054610ef8908361206e565b336000818152603a6020526040902091909155610f1590836125ba565b60408051838152905133917f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364919081900360200190a25050565b336000908152603a6020526040902054610f6890610d67565b565b6c02863c1f5cdae42f954000004f5481565b6c636c61696d5f7265776172647360981b600090815260346020527f684da2165171dc71a63fa7e63bc201bb3b7b8a39bd56bf2e6eba52a048e47ff854610fd390839015610fcb576001610fce565b60005b612162565b506001919050565b6c02863c1f5cdae42f954000004860209081526000928352604080842090915290825290205481565b6c02863c1f5cdae42f9540000051546001600160a01b031681565b6c02863c1f5cdae42f954000004a60209081526000928352604080842090915290825290205481565b6001600160a01b03161860009081526034602052604090205490565b6c02863c1f5cdae42f954000005154604080516330d5626d60e11b81526001600160a01b038481166004830152915160009392909216916361aac4da91602480820192602092909190829003018186803b1580156110c157600080fd5b505afa1580156110d5573d6000803e3d6000fd5b505050506040513d60208110156110eb57600080fd5b5051905060006110fa8361156e565b9050670de0b6b3a764000081101561113f5761113c670de0b6b3a7640000611136816111308561112a888461206e565b906125d1565b9061262a565b90611fe6565b91505b50919050565b6c02863c1f5cdae42f954000004e5481565b60009081526034602052604090205490565b6001600160a01b0381163314806111a35750336000908152603d602090815260408083206001600160a01b038516845290915290205460ff165b6111e3576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6c636c61696d5f7265776172647360981b60005260346020527f684da2165171dc71a63fa7e63bc201bb3b7b8a39bd56bf2e6eba52a048e47ff85461123090829015610fcb576001610fce565b61123a818361266c565b336000908152603a60205260409020546112549083611fe6565b336000908152603a6020526040902055603b546112719083611fe6565b603b5560408051838152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25050565b603a6020526000908152604090205481565b6041816c01431e0fae6d7217caa000000081106112d957fe5b0154905081565b6036546001600160a01b031681565b6033546001600160a01b0316331461130657600080fd5b6033546040516000916001600160a01b0316907fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a908390a3603380546001600160a01b0319169055565b6037546001600160a01b031681565b6033546001600160a01b0316331461137657600080fd5b6c02863c1f5cdae42f954000004b82905580156113a4574282016c02863c1f5cdae42f954000004c556113b6565b60006c02863c1f5cdae42f954000004c555b6c02863c1f5cdae42f954000005054610c9457426c02863c1f5cdae42f9540000050555050565b1860009081526034602052604090205490565b6033546001600160a01b0316331461140757600080fd5b6c02863c1f5cdae42f954000005180546001600160a01b0319166001600160a01b0392909216919091179055565b610dbc816001612162565b6c02863c1f5cdae42f954000004960209081526000928352604080842090915290825290205481565b6c02863c1f5cdae42f95400000426020526000908152604090205481565b6001600160a01b0390811660009081526c02863c1f5cdae42f9540000049602090815260408083206c02863c1f5cdae42f9540000046549094168352929052205490565b6c02863c1f5cdae42f9540000046546001600160a01b031660009081526c02863c1f5cdae42f9540000047602052604090205490565b6033546001600160a01b0316331461151857600080fd5b61152d6001600160a01b038316841882612047565b505050565b6c02863c1f5cdae42f95400000535481565b6033546001600160a01b0316331461155b57600080fd5b610dbc81612684565b610dbc8133611169565b6001600160a01b0381166000908152603a602052604081205461159357506000610c6e565b6c02863c1f5cdae42f954000005154604080516370a0823160e01b81526001600160a01b038581166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156115ec57600080fd5b505afa158015611600573d6000803e3d6000fd5b505050506040513d602081101561161657600080fd5b50516c02863c1f5cdae42f95400000515460408051635eb7a8fd60e11b815230600482015290519293506116b4926001600160a01b039092169163bd6f51fa91602480820192602092909190829003018186803b15801561167657600080fd5b505afa15801561168a573d6000803e3d6000fd5b505050506040513d60208110156116a057600080fd5b505161113083670de0b6b3a76400006125d1565b6001600160a01b0383166000908152603a60205260409020549091506116e69061113083670de0b6b3a76400006125d1565b90506116f1826126f3565b421115610c6e57610ebe61170e611707846126f3565b429061206e565b6c02863c1f5cdae42f9540000051546040805163e4a3a0f360e01b81526001600160a01b038781166004830152915161113093929092169163e4a3a0f391602480820192602092909190829003018186803b15801561176c57600080fd5b505afa158015611780573d6000803e3d6000fd5b505050506040513d602081101561179657600080fd5b505184906125d1565b603c5481565b6c02863c1f5cdae42f9540000045546001600160a01b031681565b600054610100900460ff16806117d957506117d96127a8565b806117e7575060005460ff16155b6118225760405162461bcd60e51b815260040180806020018281038252602e815260200180612dc1602e913960400191505060405180910390fd5b600054610100900460ff1615801561184d576000805460ff1961ff0019909116610100171660011790555b61185684611982565b603580546001600160a01b0319166001600160a01b03851690811790915560408051637e062a3560e11b8152905163fc0c546a91600480820192602092909190829003018186803b1580156118aa57600080fd5b505afa1580156118be573d6000803e3d6000fd5b505050506040513d60208110156118d457600080fd5b5051603680546001600160a01b03199081166001600160a01b0393841617909155603780549091168483161790819055604080516318160ddd60e01b8152905191909216916318160ddd916004808301926020929190829003018186803b15801561193e57600080fd5b505afa158015611952573d6000803e3d6000fd5b505050506040513d602081101561196857600080fd5b5050801561197c576000805461ff00191690555b50505050565b600054610100900460ff168061199b575061199b6127a8565b806119a9575060005460ff16155b6119e45760405162461bcd60e51b815260040180806020018281038252602e815260200180612dc1602e913960400191505060405180910390fd5b600054610100900460ff16158015611a0f576000805460ff1961ff0019909116610100171660011790555b603380546001600160a01b0319166001600160a01b0384811691909117918290556040519116906000907fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a908290a38015610c94576000805461ff00191690555050565b60006c02863c1f5cdae42f954000004b5460001480611a925750603b54155b15611ab657506001600160a01b0381166000908152603a6020526040902054610c6e565b611abf826126f3565b421415611b07576001600160a01b03821660009081526c02863c1f5cdae42f95400000526020908152604080832054603a90925290912054611b0091611fe6565b9050610c6e565b610ebe670de0b6b3a7640000611130611b1f85611064565b6001600160a01b0386166000908152603a6020526040902054906125d1565b50600090565b6c02863c1f5cdae42f95400000505490565b60006c02863c1f5cdae42f954000004b5460001480611b755750603b54155b15611b8257506000610c17565b60008080526c02863c1f5cdae42f954000004360209081527ffac29d6dc13b331e40816b9be50243e1457c2a6502423c6223b3c4757ac0b40c54603554604080516308b752bb60e41b8152600481019590955230602486015251611cc2949293611cbc936001600160a01b0390931692638b752bb09260448083019392829003018186803b158015611c1357600080fd5b505afa158015611c27573d6000803e3d6000fd5b505050506040513d6020811015611c3d57600080fd5b50516035546040805163c33342e960e01b815230600482015290516001600160a01b039092169163c33342e991602480820192602092909190829003018186803b158015611c8a57600080fd5b505afa158015611c9e573d6000803e3d6000fd5b505050506040513d6020811015611cb457600080fd5b505190611fe6565b9061206e565b90506c02863c1f5cdae42f954000004c5460001415611d4f576c02863c1f5cdae42f954000004b546c02863c1f5cdae42f954000005054611d0490429061206e565b1015611d4a57611d476c02863c1f5cdae42f954000004b54611130611d406c02863c1f5cdae42f9540000050544261206e90919063ffffffff16565b84906125d1565b90505b610c17565b6c02863c1f5cdae42f954000004c54421015611dbb57611d47611d976c02863c1f5cdae42f9540000050546c02863c1f5cdae42f954000004c5461206e90919063ffffffff16565b611130611d406c02863c1f5cdae42f9540000050544261206e90919063ffffffff16565b6c02863c1f5cdae42f954000004c546c02863c1f5cdae42f95400000505410610c175750600090565b6033546001600160a01b03163314611dfb57600080fd5b61152d83831882612047565b6c02863c1f5cdae42f95400000416020526000908152604090205481565b6039546001600160a01b031681565b603d60209081526000928352604080842090915290825290205460ff1681565b610f6833610dbc565b604054600f0b81565b6c02863c1f5cdae42f954000004c5481565b6038546001600160a01b031681565b600054610100900460ff1680611ea05750611ea06127a8565b80611eae575060005460ff16155b611ee95760405162461bcd60e51b815260040180806020018281038252602e815260200180612dc1602e913960400191505060405180910390fd5b600054610100900460ff16158015611f14576000805460ff1961ff0019909116610100171660011790555b611f1f8585856117c0565b6c02863c1f5cdae42f954000005180546001600160a01b0319166001600160a01b0384161790558015611f58576000805461ff00191690555b5050505050565b6001600160a01b0390811660009081526c02863c1f5cdae42f954000004a602090815260408083206c02863c1f5cdae42f9540000046549094168352929052205490565b6c02863c1f5cdae42f95400000526020526000908152604090205481565b6c01431e0fae6d7217caa0000041816c01431e0fae6d7217caa000000081106112d957fe5b600082820183811015612040576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000828152603460205260409020548114610c945760009182526034602052604090912055565b600061204083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506127ae565b60006c02863c1f5cdae42f954000004b54600014806120cf5750603b54155b156120dc5750600061215a565b6120e6838361206e565b9050612108610eb76120f6610bef565b61113087670de0b6b3a76400006125d1565b6001600160a01b03861660009081526c02863c1f5cdae42f95400000526020908152604080832054603a9092529091205491925061215791670de0b6b3a76400009161113091611d4091611fe6565b90505b949350505050565b6c02863c1f5cdae42f954000004b54158061217d5750603b54155b1561218757610c94565b600061219283611a73565b905060006121a08483612845565b905060006121ac611b56565b905060006121fb86836c02863c1f5cdae42f954000004e546c02863c1f5cdae42f954000004d60008b6001600160a01b03166001600160a01b03168152602001908152602001600020546120b0565b905081156122b957600080526c02863c1f5cdae42f95400000436020527ffac29d6dc13b331e40816b9be50243e1457c2a6502423c6223b3c4757ac0b40c546122449083611fe6565b600080526c02863c1f5cdae42f95400000436020527ffac29d6dc13b331e40816b9be50243e1457c2a6502423c6223b3c4757ac0b40c556122a96122948461113085670de0b6b3a76400006125d1565b6c02863c1f5cdae42f954000004e5490611fe6565b6c02863c1f5cdae42f954000004e555b6c02863c1f5cdae42f954000004e546001600160a01b03871660009081526c02863c1f5cdae42f954000004d602052604090205414612327576c02863c1f5cdae42f954000004e546001600160a01b03871660009081526c02863c1f5cdae42f954000004d60205260409020555b6001600160a01b0386166000908152603a602052604090205461234b90859061206e565b6001600160a01b03871660009081526c02863c1f5cdae42f95400000526020526040902054146123bf576001600160a01b0386166000908152603a602052604090205461239990859061206e565b6001600160a01b03871660009081526c02863c1f5cdae42f954000005260205260409020555b603b546123cd90849061206e565b6c02863c1f5cdae42f954000005354146123ff57603b546123ef90849061206e565b6c02863c1f5cdae42f9540000053555b612408866126f3565b4211156125665760006124d4612420611707896126f3565b6c02863c1f5cdae42f95400000515460408051635eb7a8fd60e11b8152306004820152905161112a92670de0b6b3a764000092611130926001600160a01b039092169163bd6f51fa91602480820192602092909190829003018186803b15801561248957600080fd5b505afa15801561249d573d6000803e3d6000fd5b505050506040513d60208110156124b357600080fd5b50516001600160a01b038d166000908152603a6020526040902054906125d1565b6c02863c1f5cdae42f95400000515460408051636faf950f60e11b81526001600160a01b038b8116600483015260248201859052915193945091169163df5f2a1e916044808201926020929091908290030181600087803b15801561253857600080fd5b505af115801561254c573d6000803e3d6000fd5b505050506040513d602081101561256257600080fd5b5050505b6001600160a01b03861660009081526c02863c1f5cdae42f95400000426020526040902042908190556c02863c1f5cdae42f9540000050556125a8868261288f565b6125b28686610c94565b505050505050565b603754610c94906001600160a01b03168383612a82565b6000826125e057506000610ebe565b828202828482816125ed57fe5b04146120405760405162461bcd60e51b8152600401808060200182810382526021815260200180612da06021913960400191505060405180910390fd5b600061204083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612be5565b603754610c94906001600160a01b0316833084612c4a565b6001600160a01b03811661269757600080fd5b6033546040516001600160a01b038084169216907fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a90600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526c02863c1f5cdae42f9540000042602052604090205480610c6e576c02863c1f5cdae42f954000005154604080516337b7efef60e01b81526001600160a01b038581166004830152915191909216916337b7efef916024808301926020929190829003018186803b15801561277657600080fd5b505afa15801561278a573d6000803e3d6000fd5b505050506040513d60208110156127a057600080fd5b505192915050565b303b1590565b6000818484111561283d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156128025781810151838201526020016127ea565b50505050905090810190601f16801561282f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b03821660009081526c02863c1f5cdae42f95400000526020908152604080832054603a909252822054612040916128839190611fe6565b611cbc84611136610bef565b8015610c94576001600160a01b03821660009081526c02863c1f5cdae42f954000004360205260409020546128c49082611fe6565b6001600160a01b0392831660009081526c02863c1f5cdae42f95400000436020908152604082209290925560349091527fe9b68ca2b566af5bdfbb3361c12fcbb5dbf956c250bbd74cc175cc06ec62c7915467646576526174696f60c01b9091527fb8fbd2e70438ec482a0e7fc9b87580647182c1694aea1065027a1d634e92d6b954909283161580159061295857508015155b156129c7576129a1612976670de0b6b3a764000061113085856125d1565b6001600160a01b03851660009081526c02863c1f5cdae42f9540000043602052604090205490611fe6565b6001600160a01b03841660009081526c02863c1f5cdae42f954000004360205260409020555b5060346020527f82e0b58992d24d827851dcbd63485b5933f9d3ae4c2ca50477d1437e73f6d342546765636f526174696f60c01b6000527ffc6561c6b7742261fbeab673eba1bedd2f5b1d7221f757ea8c9a87d664cfbed2549092506001600160a01b03831615801590612a3a57508015155b1561152d57612a58612976670de0b6b3a764000061113085856125d1565b6001600160a01b03841660009081526c02863c1f5cdae42f95400000436020526040902055505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310612aff5780518252601f199092019160209182019101612ae0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612b61576040519150601f19603f3d011682016040523d82523d6000602084013e612b66565b606091505b5091509150818015612b94575080511580612b945750808060200190516020811015612b9157600080fd5b50515b611f58576040805162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015290519081900360640190fd5b60008183612c345760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156128025781810151838201526020016127ea565b506000838581612c4057fe5b0495945050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310612ccf5780518252601f199092019160209182019101612cb0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612d31576040519150601f19603f3d011682016040523d82523d6000602084013e612d36565b606091505b5091509150818015612d64575080511580612d645750808060200190516020811015612d6157600080fd5b50515b6125b25760405162461bcd60e51b8152600401808060200182810382526024815260200180612def6024913960400191505060405180910390fdfe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a65645472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544a2646970667358221220851b8d9e34fa0916773a02a8976ebd1511f609318aec6bcef838d295d24cebf964736f6c634300060c0033

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106104075760003560e01c806382c6306611610220578063c0c53b8b11610130578063e1522536116100b8578063f77c479111610087578063f77c479114610b04578063f8c8765e14610b0c578063fd96044b14610b4a578063fe06566c14610b70578063fec8ee0c14610b9657610407565b8063e152253614610aa7578063e6f1daf214610ad5578063ef78d4fd14610add578063efbe1c1c14610afc57610407565b8063d31f3f6d116100ff578063d31f3f6d14610a40578063d4378c5714610a48578063ddf2be3f14610a50578063de263bfa14610a79578063dfe0503114610a9f57610407565b8063c0c53b8b14610996578063c4d66de8146109ce578063cb742358146109f4578063d2797b5914610a1a57610407565b80639df4ed56116101b3578063b6aa515b11610182578063b6aa515b1461091d578063b6b55f2514610943578063bce998f414610960578063be5d1be914610986578063bf88a6ff1461098e57610407565b80639df4ed56146108b5578063aaa626b6146108db578063b21544f3146108e3578063b6a1912d1461091557610407565b80638ff39099116101ef5780638ff390991461081557806396c551751461083b578063972656a3146108615780639bd324f21461088f57610407565b806382c630661461079f57806384e9bd7e146107a757806387564d84146107cd5780638ec872e3146107f257610407565b8063331345831161031b57806352665f47116102ae5780636e553f651161027d5780636e553f651461072057806370a082311461074c5780637598108c1461077257806376d8b1171461078f57806381c0c2631461079757610407565b806352665f47146106a957806361aac4da146106d557806365fe9451146106fb5780636dd5b69d1461070357610407565b80634b820093116102ea5780634b8200931461060b5780634c87a0a5146106455780634cf088d9146106735780634d3ced191461067b57610407565b806333134583146105b057806338d07436146105d65780633ccfd60b146105fb57806343d7f86f1461060357610407565b806317e280891161039e5780631d2747d41161036d5780631d2747d41461052f57806323a582921461055d5780632585581f14610565578063267716d21461056d5780632e1a7d4d1461059357610407565b806317e28089146104f1578063180692d0146104f957806318160ddd146105015780631b9f546f1461050957610407565b806313ecb1ca116103da57806313ecb1ca1461047857806313fa13681461049e57806315fe96dc146104c457806316fa50b1146104e957610407565b8063075461721461040c57806309400707146104305780630c340a241461046857806313aecab114610470575b600080fd5b610414610bb3565b604080516001600160a01b039092168252519081900360200190f35b6104566004803603602081101561044657600080fd5b50356001600160a01b0316610bc2565b60408051918252519081900360200190f35b610414610be0565b610456610bef565b6104566004803603602081101561048e57600080fd5b50356001600160a01b0316610c1a565b610456600480360360208110156104b457600080fd5b50356001600160a01b0316610c2c565b6104e7600480360360408110156104da57600080fd5b5080359060200135610c73565b005b610414610c98565b610456610cb3565b610456610cb9565b610456610ccb565b6104566004803603602081101561051f57600080fd5b50356001600160a01b0316610cd1565b6104e76004803603604081101561054557600080fd5b506001600160a01b0381351690602001351515610cef565b610456610d25565b610456610d37565b6104566004803603602081101561058357600080fd5b50356001600160a01b0316610d49565b6104e7600480360360208110156105a957600080fd5b5035610d67565b610456600480360360208110156105c657600080fd5b50356001600160a01b0316610dbf565b6104e7600480360360408110156105ec57600080fd5b50803590602001351515610ec4565b6104e7610f4f565b610456610f6a565b6106316004803603602081101561062157600080fd5b50356001600160a01b0316610f7c565b604080519115158252519081900360200190f35b6104566004803603604081101561065b57600080fd5b506001600160a01b0381358116916020013516610fdb565b610414611004565b6104566004803603604081101561069157600080fd5b506001600160a01b038135811691602001351661101f565b610456600480360360408110156106bf57600080fd5b50803590602001356001600160a01b0316611048565b610456600480360360208110156106eb57600080fd5b50356001600160a01b0316611064565b610456611145565b6104566004803603602081101561071957600080fd5b5035611157565b6104e76004803603604081101561073657600080fd5b50803590602001356001600160a01b0316611169565b6104566004803603602081101561076257600080fd5b50356001600160a01b03166112ae565b6104566004803603602081101561078857600080fd5b50356112c0565b6104146112e0565b6104e76112ef565b610414611350565b6104e7600480360360208110156107bd57600080fd5b50356001600160a01b0316610dbc565b6104e7600480360360408110156107e357600080fd5b5080359060200135151561135f565b6104566004803603604081101561080857600080fd5b50803590602001356113dd565b6104e76004803603602081101561082b57600080fd5b50356001600160a01b03166113f0565b6104e76004803603602081101561085157600080fd5b50356001600160a01b0316611435565b6104566004803603604081101561087757600080fd5b506001600160a01b0381358116916020013516611440565b610456600480360360208110156108a557600080fd5b50356001600160a01b0316611469565b610456600480360360208110156108cb57600080fd5b50356001600160a01b0316611487565b6104566114cb565b6104e7600480360360608110156108f957600080fd5b508035906001600160a01b036020820135169060400135611501565b610456611532565b6104e76004803603602081101561093357600080fd5b50356001600160a01b0316611544565b6104e76004803603602081101561095957600080fd5b5035611564565b6104566004803603602081101561097657600080fd5b50356001600160a01b031661156e565b61045661179f565b6104146117a5565b6104e7600480360360608110156109ac57600080fd5b506001600160a01b0381358116916020810135821691604090910135166117c0565b6104e7600480360360208110156109e457600080fd5b50356001600160a01b0316611982565b61045660048036036020811015610a0a57600080fd5b50356001600160a01b0316611a73565b61045660048036036020811015610a3057600080fd5b50356001600160a01b0316611b3e565b610456611b44565b610456611b56565b6104e760048036036060811015610a6657600080fd5b5080359060208101359060400135611de4565b61045660048036036020811015610a8f57600080fd5b50356001600160a01b0316611e07565b610414611e25565b61063160048036036040811015610abd57600080fd5b506001600160a01b0381358116916020013516611e34565b6104e7611e54565b610ae5611e5d565b60408051600f9290920b8252519081900360200190f35b610456611e66565b610414611e78565b6104e760048036036080811015610b2257600080fd5b506001600160a01b038135811691602081013582169160408201358116916060013516611e87565b61045660048036036020811015610b6057600080fd5b50356001600160a01b0316611f5f565b61045660048036036020811015610b8657600080fd5b50356001600160a01b0316611fa3565b61045660048036036020811015610bac57600080fd5b5035611fc1565b6035546001600160a01b031681565b6c02863c1f5cdae42f95400000436020526000908152604090205481565b6033546001600160a01b031681565b6000610c146c02863c1f5cdae42f954000005354603b54611fe690919063ffffffff16565b90505b90565b603e6020526000908152604090205481565b6001600160a01b0380821660009081526c02863c1f5cdae42f9540000048602090815260408083206c02863c1f5cdae42f954000004654909416835292905220545b919050565b6033546001600160a01b03163314610c8a57600080fd5b610c948282612047565b5050565b6c02863c1f5cdae42f9540000046546001600160a01b031681565b603f5481565b6c02863c1f5cdae42f95400000445481565b603b5481565b6c02863c1f5cdae42f954000004d6020526000908152604090205481565b6001600160a01b03919091166000908152603d602090815260408083203384529091529020805460ff1916911515919091179055565b6c02863c1f5cdae42f95400000505481565b6c02863c1f5cdae42f954000004b5481565b6c02863c1f5cdae42f95400000476020526000908152604090205481565b6c636c61696d5f7265776172647360981b60005260346020527f684da2165171dc71a63fa7e63bc201bb3b7b8a39bd56bf2e6eba52a048e47ff854610dbc90829015610db4576001610db7565b60005b610ec4565b50565b603554604080516308b752bb60e41b81526001600160a01b0384811660048301523060248301529151600093610e6d931691638b752bb0916044808301926020929190829003018186803b158015610e1657600080fd5b505afa158015610e2a573d6000803e3d6000fd5b505050506040513d6020811015610e4057600080fd5b50516001600160a01b03841660009081526c02863c1f5cdae42f954000004360205260409020549061206e565b9050610ebe610eb783610e7e611b56565b6c02863c1f5cdae42f954000004e546001600160a01b03871660009081526c02863c1f5cdae42f954000004d60205260409020546120b0565b8290611fe6565b92915050565b610ece3382612162565b603b54610edb908361206e565b603b55336000908152603a6020526040902054610ef8908361206e565b336000818152603a6020526040902091909155610f1590836125ba565b60408051838152905133917f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364919081900360200190a25050565b336000908152603a6020526040902054610f6890610d67565b565b6c02863c1f5cdae42f954000004f5481565b6c636c61696d5f7265776172647360981b600090815260346020527f684da2165171dc71a63fa7e63bc201bb3b7b8a39bd56bf2e6eba52a048e47ff854610fd390839015610fcb576001610fce565b60005b612162565b506001919050565b6c02863c1f5cdae42f954000004860209081526000928352604080842090915290825290205481565b6c02863c1f5cdae42f9540000051546001600160a01b031681565b6c02863c1f5cdae42f954000004a60209081526000928352604080842090915290825290205481565b6001600160a01b03161860009081526034602052604090205490565b6c02863c1f5cdae42f954000005154604080516330d5626d60e11b81526001600160a01b038481166004830152915160009392909216916361aac4da91602480820192602092909190829003018186803b1580156110c157600080fd5b505afa1580156110d5573d6000803e3d6000fd5b505050506040513d60208110156110eb57600080fd5b5051905060006110fa8361156e565b9050670de0b6b3a764000081101561113f5761113c670de0b6b3a7640000611136816111308561112a888461206e565b906125d1565b9061262a565b90611fe6565b91505b50919050565b6c02863c1f5cdae42f954000004e5481565b60009081526034602052604090205490565b6001600160a01b0381163314806111a35750336000908152603d602090815260408083206001600160a01b038516845290915290205460ff165b6111e3576040805162461bcd60e51b815260206004820152600c60248201526b139bdd08185c1c1c9bdd995960a21b604482015290519081900360640190fd5b6c636c61696d5f7265776172647360981b60005260346020527f684da2165171dc71a63fa7e63bc201bb3b7b8a39bd56bf2e6eba52a048e47ff85461123090829015610fcb576001610fce565b61123a818361266c565b336000908152603a60205260409020546112549083611fe6565b336000908152603a6020526040902055603b546112719083611fe6565b603b5560408051838152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a25050565b603a6020526000908152604090205481565b6041816c01431e0fae6d7217caa000000081106112d957fe5b0154905081565b6036546001600160a01b031681565b6033546001600160a01b0316331461130657600080fd5b6033546040516000916001600160a01b0316907fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a908390a3603380546001600160a01b0319169055565b6037546001600160a01b031681565b6033546001600160a01b0316331461137657600080fd5b6c02863c1f5cdae42f954000004b82905580156113a4574282016c02863c1f5cdae42f954000004c556113b6565b60006c02863c1f5cdae42f954000004c555b6c02863c1f5cdae42f954000005054610c9457426c02863c1f5cdae42f9540000050555050565b1860009081526034602052604090205490565b6033546001600160a01b0316331461140757600080fd5b6c02863c1f5cdae42f954000005180546001600160a01b0319166001600160a01b0392909216919091179055565b610dbc816001612162565b6c02863c1f5cdae42f954000004960209081526000928352604080842090915290825290205481565b6c02863c1f5cdae42f95400000426020526000908152604090205481565b6001600160a01b0390811660009081526c02863c1f5cdae42f9540000049602090815260408083206c02863c1f5cdae42f9540000046549094168352929052205490565b6c02863c1f5cdae42f9540000046546001600160a01b031660009081526c02863c1f5cdae42f9540000047602052604090205490565b6033546001600160a01b0316331461151857600080fd5b61152d6001600160a01b038316841882612047565b505050565b6c02863c1f5cdae42f95400000535481565b6033546001600160a01b0316331461155b57600080fd5b610dbc81612684565b610dbc8133611169565b6001600160a01b0381166000908152603a602052604081205461159357506000610c6e565b6c02863c1f5cdae42f954000005154604080516370a0823160e01b81526001600160a01b038581166004830152915191909216916370a08231916024808301926020929190829003018186803b1580156115ec57600080fd5b505afa158015611600573d6000803e3d6000fd5b505050506040513d602081101561161657600080fd5b50516c02863c1f5cdae42f95400000515460408051635eb7a8fd60e11b815230600482015290519293506116b4926001600160a01b039092169163bd6f51fa91602480820192602092909190829003018186803b15801561167657600080fd5b505afa15801561168a573d6000803e3d6000fd5b505050506040513d60208110156116a057600080fd5b505161113083670de0b6b3a76400006125d1565b6001600160a01b0383166000908152603a60205260409020549091506116e69061113083670de0b6b3a76400006125d1565b90506116f1826126f3565b421115610c6e57610ebe61170e611707846126f3565b429061206e565b6c02863c1f5cdae42f9540000051546040805163e4a3a0f360e01b81526001600160a01b038781166004830152915161113093929092169163e4a3a0f391602480820192602092909190829003018186803b15801561176c57600080fd5b505afa158015611780573d6000803e3d6000fd5b505050506040513d602081101561179657600080fd5b505184906125d1565b603c5481565b6c02863c1f5cdae42f9540000045546001600160a01b031681565b600054610100900460ff16806117d957506117d96127a8565b806117e7575060005460ff16155b6118225760405162461bcd60e51b815260040180806020018281038252602e815260200180612dc1602e913960400191505060405180910390fd5b600054610100900460ff1615801561184d576000805460ff1961ff0019909116610100171660011790555b61185684611982565b603580546001600160a01b0319166001600160a01b03851690811790915560408051637e062a3560e11b8152905163fc0c546a91600480820192602092909190829003018186803b1580156118aa57600080fd5b505afa1580156118be573d6000803e3d6000fd5b505050506040513d60208110156118d457600080fd5b5051603680546001600160a01b03199081166001600160a01b0393841617909155603780549091168483161790819055604080516318160ddd60e01b8152905191909216916318160ddd916004808301926020929190829003018186803b15801561193e57600080fd5b505afa158015611952573d6000803e3d6000fd5b505050506040513d602081101561196857600080fd5b5050801561197c576000805461ff00191690555b50505050565b600054610100900460ff168061199b575061199b6127a8565b806119a9575060005460ff16155b6119e45760405162461bcd60e51b815260040180806020018281038252602e815260200180612dc1602e913960400191505060405180910390fd5b600054610100900460ff16158015611a0f576000805460ff1961ff0019909116610100171660011790555b603380546001600160a01b0319166001600160a01b0384811691909117918290556040519116906000907fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a908290a38015610c94576000805461ff00191690555050565b60006c02863c1f5cdae42f954000004b5460001480611a925750603b54155b15611ab657506001600160a01b0381166000908152603a6020526040902054610c6e565b611abf826126f3565b421415611b07576001600160a01b03821660009081526c02863c1f5cdae42f95400000526020908152604080832054603a90925290912054611b0091611fe6565b9050610c6e565b610ebe670de0b6b3a7640000611130611b1f85611064565b6001600160a01b0386166000908152603a6020526040902054906125d1565b50600090565b6c02863c1f5cdae42f95400000505490565b60006c02863c1f5cdae42f954000004b5460001480611b755750603b54155b15611b8257506000610c17565b60008080526c02863c1f5cdae42f954000004360209081527ffac29d6dc13b331e40816b9be50243e1457c2a6502423c6223b3c4757ac0b40c54603554604080516308b752bb60e41b8152600481019590955230602486015251611cc2949293611cbc936001600160a01b0390931692638b752bb09260448083019392829003018186803b158015611c1357600080fd5b505afa158015611c27573d6000803e3d6000fd5b505050506040513d6020811015611c3d57600080fd5b50516035546040805163c33342e960e01b815230600482015290516001600160a01b039092169163c33342e991602480820192602092909190829003018186803b158015611c8a57600080fd5b505afa158015611c9e573d6000803e3d6000fd5b505050506040513d6020811015611cb457600080fd5b505190611fe6565b9061206e565b90506c02863c1f5cdae42f954000004c5460001415611d4f576c02863c1f5cdae42f954000004b546c02863c1f5cdae42f954000005054611d0490429061206e565b1015611d4a57611d476c02863c1f5cdae42f954000004b54611130611d406c02863c1f5cdae42f9540000050544261206e90919063ffffffff16565b84906125d1565b90505b610c17565b6c02863c1f5cdae42f954000004c54421015611dbb57611d47611d976c02863c1f5cdae42f9540000050546c02863c1f5cdae42f954000004c5461206e90919063ffffffff16565b611130611d406c02863c1f5cdae42f9540000050544261206e90919063ffffffff16565b6c02863c1f5cdae42f954000004c546c02863c1f5cdae42f95400000505410610c175750600090565b6033546001600160a01b03163314611dfb57600080fd5b61152d83831882612047565b6c02863c1f5cdae42f95400000416020526000908152604090205481565b6039546001600160a01b031681565b603d60209081526000928352604080842090915290825290205460ff1681565b610f6833610dbc565b604054600f0b81565b6c02863c1f5cdae42f954000004c5481565b6038546001600160a01b031681565b600054610100900460ff1680611ea05750611ea06127a8565b80611eae575060005460ff16155b611ee95760405162461bcd60e51b815260040180806020018281038252602e815260200180612dc1602e913960400191505060405180910390fd5b600054610100900460ff16158015611f14576000805460ff1961ff0019909116610100171660011790555b611f1f8585856117c0565b6c02863c1f5cdae42f954000005180546001600160a01b0319166001600160a01b0384161790558015611f58576000805461ff00191690555b5050505050565b6001600160a01b0390811660009081526c02863c1f5cdae42f954000004a602090815260408083206c02863c1f5cdae42f9540000046549094168352929052205490565b6c02863c1f5cdae42f95400000526020526000908152604090205481565b6c01431e0fae6d7217caa0000041816c01431e0fae6d7217caa000000081106112d957fe5b600082820183811015612040576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000828152603460205260409020548114610c945760009182526034602052604090912055565b600061204083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506127ae565b60006c02863c1f5cdae42f954000004b54600014806120cf5750603b54155b156120dc5750600061215a565b6120e6838361206e565b9050612108610eb76120f6610bef565b61113087670de0b6b3a76400006125d1565b6001600160a01b03861660009081526c02863c1f5cdae42f95400000526020908152604080832054603a9092529091205491925061215791670de0b6b3a76400009161113091611d4091611fe6565b90505b949350505050565b6c02863c1f5cdae42f954000004b54158061217d5750603b54155b1561218757610c94565b600061219283611a73565b905060006121a08483612845565b905060006121ac611b56565b905060006121fb86836c02863c1f5cdae42f954000004e546c02863c1f5cdae42f954000004d60008b6001600160a01b03166001600160a01b03168152602001908152602001600020546120b0565b905081156122b957600080526c02863c1f5cdae42f95400000436020527ffac29d6dc13b331e40816b9be50243e1457c2a6502423c6223b3c4757ac0b40c546122449083611fe6565b600080526c02863c1f5cdae42f95400000436020527ffac29d6dc13b331e40816b9be50243e1457c2a6502423c6223b3c4757ac0b40c556122a96122948461113085670de0b6b3a76400006125d1565b6c02863c1f5cdae42f954000004e5490611fe6565b6c02863c1f5cdae42f954000004e555b6c02863c1f5cdae42f954000004e546001600160a01b03871660009081526c02863c1f5cdae42f954000004d602052604090205414612327576c02863c1f5cdae42f954000004e546001600160a01b03871660009081526c02863c1f5cdae42f954000004d60205260409020555b6001600160a01b0386166000908152603a602052604090205461234b90859061206e565b6001600160a01b03871660009081526c02863c1f5cdae42f95400000526020526040902054146123bf576001600160a01b0386166000908152603a602052604090205461239990859061206e565b6001600160a01b03871660009081526c02863c1f5cdae42f954000005260205260409020555b603b546123cd90849061206e565b6c02863c1f5cdae42f954000005354146123ff57603b546123ef90849061206e565b6c02863c1f5cdae42f9540000053555b612408866126f3565b4211156125665760006124d4612420611707896126f3565b6c02863c1f5cdae42f95400000515460408051635eb7a8fd60e11b8152306004820152905161112a92670de0b6b3a764000092611130926001600160a01b039092169163bd6f51fa91602480820192602092909190829003018186803b15801561248957600080fd5b505afa15801561249d573d6000803e3d6000fd5b505050506040513d60208110156124b357600080fd5b50516001600160a01b038d166000908152603a6020526040902054906125d1565b6c02863c1f5cdae42f95400000515460408051636faf950f60e11b81526001600160a01b038b8116600483015260248201859052915193945091169163df5f2a1e916044808201926020929091908290030181600087803b15801561253857600080fd5b505af115801561254c573d6000803e3d6000fd5b505050506040513d602081101561256257600080fd5b5050505b6001600160a01b03861660009081526c02863c1f5cdae42f95400000426020526040902042908190556c02863c1f5cdae42f9540000050556125a8868261288f565b6125b28686610c94565b505050505050565b603754610c94906001600160a01b03168383612a82565b6000826125e057506000610ebe565b828202828482816125ed57fe5b04146120405760405162461bcd60e51b8152600401808060200182810382526021815260200180612da06021913960400191505060405180910390fd5b600061204083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612be5565b603754610c94906001600160a01b0316833084612c4a565b6001600160a01b03811661269757600080fd5b6033546040516001600160a01b038084169216907fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a90600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526c02863c1f5cdae42f9540000042602052604090205480610c6e576c02863c1f5cdae42f954000005154604080516337b7efef60e01b81526001600160a01b038581166004830152915191909216916337b7efef916024808301926020929190829003018186803b15801561277657600080fd5b505afa15801561278a573d6000803e3d6000fd5b505050506040513d60208110156127a057600080fd5b505192915050565b303b1590565b6000818484111561283d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156128025781810151838201526020016127ea565b50505050905090810190601f16801561282f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b03821660009081526c02863c1f5cdae42f95400000526020908152604080832054603a909252822054612040916128839190611fe6565b611cbc84611136610bef565b8015610c94576001600160a01b03821660009081526c02863c1f5cdae42f954000004360205260409020546128c49082611fe6565b6001600160a01b0392831660009081526c02863c1f5cdae42f95400000436020908152604082209290925560349091527fe9b68ca2b566af5bdfbb3361c12fcbb5dbf956c250bbd74cc175cc06ec62c7915467646576526174696f60c01b9091527fb8fbd2e70438ec482a0e7fc9b87580647182c1694aea1065027a1d634e92d6b954909283161580159061295857508015155b156129c7576129a1612976670de0b6b3a764000061113085856125d1565b6001600160a01b03851660009081526c02863c1f5cdae42f9540000043602052604090205490611fe6565b6001600160a01b03841660009081526c02863c1f5cdae42f954000004360205260409020555b5060346020527f82e0b58992d24d827851dcbd63485b5933f9d3ae4c2ca50477d1437e73f6d342546765636f526174696f60c01b6000527ffc6561c6b7742261fbeab673eba1bedd2f5b1d7221f757ea8c9a87d664cfbed2549092506001600160a01b03831615801590612a3a57508015155b1561152d57612a58612976670de0b6b3a764000061113085856125d1565b6001600160a01b03841660009081526c02863c1f5cdae42f95400000436020526040902055505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310612aff5780518252601f199092019160209182019101612ae0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612b61576040519150601f19603f3d011682016040523d82523d6000602084013e612b66565b606091505b5091509150818015612b94575080511580612b945750808060200190516020811015612b9157600080fd5b50515b611f58576040805162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015290519081900360640190fd5b60008183612c345760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156128025781810151838201526020016127ea565b506000838581612c4057fe5b0495945050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b60208310612ccf5780518252601f199092019160209182019101612cb0565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114612d31576040519150601f19603f3d011682016040523d82523d6000602084013e612d36565b606091505b5091509150818015612d64575080511580612d645750808060200190516020811015612d6157600080fd5b50515b6125b25760405162461bcd60e51b8152600401808060200182810382526024815260200180612def6024913960400191505060405180910390fdfe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a65645472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c4544a2646970667358221220851b8d9e34fa0916773a02a8976ebd1511f609318aec6bcef838d295d24cebf964736f6c634300060c0033