FTM Price: $0.68 (-5.65%)
Gas: 36 GWei

Contract

0xc9Ea7A2337f27935Cd3ccFB2f725B0428e731FBF
 

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Claim Bribes794594462024-04-16 9:14:181 hr ago1713258858IN
0xc9Ea7A23...28e731FBF
0 FTM0.0057288426
Vote794590202024-04-16 8:55:362 hrs ago1713257736IN
0xc9Ea7A23...28e731FBF
0 FTM0.0077168322.25121623
Reset794589952024-04-16 8:54:172 hrs ago1713257657IN
0xc9Ea7A23...28e731FBF
0 FTM0.0035221322.39472822
Vote794554032024-04-16 7:00:574 hrs ago1713250857IN
0xc9Ea7A23...28e731FBF
0 FTM0.0177012829.20315264
Reset794517162024-04-16 5:16:055 hrs ago1713244565IN
0xc9Ea7A23...28e731FBF
0 FTM0.0056637834
Vote794351822024-04-15 21:25:2113 hrs ago1713216321IN
0xc9Ea7A23...28e731FBF
0 FTM0.0191882149.83200458
Claim Bribes794269892024-04-15 18:56:2116 hrs ago1713207381IN
0xc9Ea7A23...28e731FBF
0 FTM0.0191082552.25288641
Vote794268412024-04-15 18:53:5316 hrs ago1713207233IN
0xc9Ea7A23...28e731FBF
0 FTM0.0128687753
Claim Bribes794173402024-04-15 16:06:5918 hrs ago1713197219IN
0xc9Ea7A23...28e731FBF
0 FTM0.0153500147
Claim Bribes794146512024-04-15 15:19:2419 hrs ago1713194364IN
0xc9Ea7A23...28e731FBF
0 FTM0.0074607652.85100657
Vote794113112024-04-15 14:19:2520 hrs ago1713190765IN
0xc9Ea7A23...28e731FBF
0 FTM0.0226816256
Claim Bribes793853392024-04-15 6:35:1128 hrs ago1713162911IN
0xc9Ea7A23...28e731FBF
0 FTM0.0115310356.23195424
Claim Bribes793724092024-04-14 23:16:0335 hrs ago1713136563IN
0xc9Ea7A23...28e731FBF
0 FTM0.0140430138
Claim Bribes793723242024-04-14 23:14:1835 hrs ago1713136458IN
0xc9Ea7A23...28e731FBF
0 FTM0.0454461337
Claim Bribes793723102024-04-14 23:13:5935 hrs ago1713136439IN
0xc9Ea7A23...28e731FBF
0 FTM0.0128140936
Claim Bribes793722972024-04-14 23:13:4635 hrs ago1713136426IN
0xc9Ea7A23...28e731FBF
0 FTM0.0613375536
Claim Bribes793722822024-04-14 23:13:2735 hrs ago1713136407IN
0xc9Ea7A23...28e731FBF
0 FTM0.0136734637
Claim Bribes793722682024-04-14 23:13:1235 hrs ago1713136392IN
0xc9Ea7A23...28e731FBF
0 FTM0.0098430443
Claim Bribes793722512024-04-14 23:12:5235 hrs ago1713136372IN
0xc9Ea7A23...28e731FBF
0 FTM0.0120576936
Claim Bribes793722372024-04-14 23:12:3235 hrs ago1713136352IN
0xc9Ea7A23...28e731FBF
0 FTM0.0077640436
Claim Bribes793722302024-04-14 23:12:2035 hrs ago1713136340IN
0xc9Ea7A23...28e731FBF
0 FTM0.012462836
Claim Bribes793722192024-04-14 23:12:0135 hrs ago1713136321IN
0xc9Ea7A23...28e731FBF
0 FTM0.013303936
Claim Bribes793722142024-04-14 23:11:4935 hrs ago1713136309IN
0xc9Ea7A23...28e731FBF
0 FTM0.0082406836
Claim Bribes793722002024-04-14 23:11:3035 hrs ago1713136290IN
0xc9Ea7A23...28e731FBF
0 FTM0.013303936
Claim Bribes793721902024-04-14 23:11:1735 hrs ago1713136277IN
0xc9Ea7A23...28e731FBF
0 FTM0.0086455637
View all transactions

Latest 1 internal transaction

Parent Txn Hash Block From To Value
649651872023-07-01 8:51:32290 days ago1688201492  Contract Creation0 FTM
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Voter

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

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

import 'openzeppelin-contracts/contracts/utils/math/Math.sol';
import 'contracts/interfaces/IBribe.sol';
import 'contracts/interfaces/IBribeFactory.sol';
import 'contracts/interfaces/IGauge.sol';
import 'contracts/interfaces/IGaugeFactory.sol';
import 'contracts/interfaces/IERC20.sol';
import 'contracts/interfaces/IMinter.sol';
import 'contracts/interfaces/IPair.sol';
import 'contracts/interfaces/IPairFactory.sol';
import 'contracts/interfaces/IVoter.sol';
import 'contracts/interfaces/IVotingEscrow.sol';

contract Voter is IVoter {

    address public immutable _ve; // the ve token that governs these contracts
    address internal immutable base;

    address[] public factories; // Array with all the pair factories
    address[] public gaugeFactories; // array with all the gauge factories
    address public bribefactory;
    uint internal constant DURATION = 7 days; // rewards are released over 7 days
    address public minter;
    address public governor; // should be set to an IGovernor
    address public emergencyCouncil; // credibly neutral party similar to Curve's Emergency DAO

    uint public totalWeight; // total voting weight

    address[] public pools; // all pools viable for incentives
    address[] public killedGauges;

    mapping(address => address) public gauges; // pool => gauge
    mapping(address => address) public poolForGauge; // gauge => pool
    mapping(address => address) public external_bribes; // gauge => external bribe (real bribes)
    mapping(address => uint256) public weights; // pool => weight
    mapping(uint => mapping(address => uint256)) public votes; // nft => pool => votes
    mapping(uint => address[]) public poolVote; // nft => pools
    mapping(uint => uint) public usedWeights;  // nft => total voting weight of user
    mapping(uint => uint) public lastVoted; // nft => timestamp of last vote, to ensure one vote per epoch
    mapping(address => bool) public isGauge;
    mapping(address => bool) public isWhitelisted;
    mapping(address => bool) public isAlive;
    mapping(address => bool) public isFactory; // factory  => boolean [the pair factory exists?]
    mapping(address => bool) public isGaugeFactory; // g.factory=> boolean [the gauge factory exists?]

    event GaugeCreated(address indexed gauge, address creator, address indexed external_bribe, address indexed pool);
    event GaugeKilledTotally(address indexed gauge);
    event GaugePaused(address indexed gauge);
    event GaugeRestarted(address indexed gauge);
    event Voted(address indexed voter, uint tokenId, uint256 weight);
    event Abstained(uint tokenId, uint256 weight);
    event Deposit(address indexed lp, address indexed gauge, uint tokenId, uint amount);
    event Withdraw(address indexed lp, address indexed gauge, uint tokenId, uint amount);
    event NotifyReward(address indexed sender, address indexed reward, uint amount);
    event DistributeReward(address indexed sender, address indexed gauge, uint amount);
    event Attach(address indexed owner, address indexed gauge, uint tokenId);
    event Detach(address indexed owner, address indexed gauge, uint tokenId);
    event Whitelisted(address indexed whitelister, address indexed token);
    event Blacklisted(address indexed blacklister, address indexed token);
    event BribeFactorySet(address indexed setter, address newBribeFatory);
    event ExternalBribeSet(address indexed setter, address indexed gauge, address externalBribe);
    event FactoryAdded(address indexed setter, address indexed pairFactory, address indexed gaugeFactory);
    event FactoryReplaced(address indexed setter, address indexed pairFactory, address indexed gaugeFactory, uint256 pos);
    event FactoryRemoved(address indexed setter, uint256 indexed pos);

    constructor(address __ve, address _factory, address _gauges, address _bribes) {
        _ve = __ve;
        base = IVotingEscrow(__ve).token();

        factories.push(_factory);
        isFactory[_factory] = true;

        gaugeFactories.push(_gauges);
        isGaugeFactory[_gauges] = true;

        bribefactory = _bribes;
        minter = msg.sender;
        governor = msg.sender;
        emergencyCouncil = msg.sender;
    }

    // simple re-entrancy check
    uint internal _unlocked = 1;

    modifier lock() {
        require(_unlocked == 1);
        _unlocked = 2;
        _;
        _unlocked = 1;
    }

    modifier onlyNewEpoch(uint _tokenId) {
        // ensure new epoch since last vote
        require((block.timestamp / DURATION) * DURATION > lastVoted[_tokenId], "TOKEN_ALREADY_VOTED_THIS_EPOCH");
        _;
    }

    modifier onlyEmergencyCouncil() {
        require(msg.sender == emergencyCouncil, "not emergencyCouncil");
        _;
    }

    function initialize(address[] memory _tokens, address _minter) external {
        require(msg.sender == minter);
        for (uint i = 0; i < _tokens.length; i++) {
            _whitelist(_tokens[i]);
        }
        minter = _minter;
    }

    function setGovernor(address _governor) public {
        require(msg.sender == governor);
        governor = _governor;
    }

    function setEmergencyCouncil(address _council) public {
        require(msg.sender == governor);
        emergencyCouncil = _council;
    }

    function setBribeFactory(address _bribeFactory) external onlyEmergencyCouncil {
        bribefactory = _bribeFactory;
        emit BribeFactorySet(msg.sender, _bribeFactory);
    }

    /// @notice Set a new External bribe for a given gauge
    function setExternalBribeFor(address _gauge, address _external) external onlyEmergencyCouncil {
        require(isGauge[_gauge]);
        _setExternalBribe(_gauge, _external);
    }

    function _setExternalBribe(address _gauge, address _external) private {
        external_bribes[_gauge] = _external;
        address pool = poolForGauge[_gauge];
        try IPair(pool).setExternalBribe(_external){} catch {}
        emit ExternalBribeSet(msg.sender, _gauge, _external);
    }

    function addFactory(address _pairFactory, address _gaugeFactory) external onlyEmergencyCouncil {
        require(_pairFactory != address(0), 'addr 0');
        require(_gaugeFactory != address(0), 'addr 0');
        require(!isGaugeFactory[_gaugeFactory], 'g.fact true');

        factories.push(_pairFactory);
        gaugeFactories.push(_gaugeFactory);
        isFactory[_pairFactory] = true;
        isGaugeFactory[_gaugeFactory] = true;

        emit FactoryAdded(msg.sender, _pairFactory, _gaugeFactory);
    }

    function replaceFactory(address _pairFactory, address _gaugeFactory, uint256 _pos) external onlyEmergencyCouncil {
        require(_pairFactory != address(0), 'addr 0');
        require(_gaugeFactory != address(0), 'addr 0');
        require(_pos < factoryLength() && _pos < gaugeFactoriesLength(), '_pos out of range');
        require(isFactory[_pairFactory], 'factory false');
        require(isGaugeFactory[_gaugeFactory], 'g.fact false');
        address oldPF = factories[_pos];
        address oldGF = gaugeFactories[_pos];
        isFactory[oldPF] = false;
        isGaugeFactory[oldGF] = false;

        factories[_pos] = (_pairFactory);
        gaugeFactories[_pos] = (_gaugeFactory);
        isFactory[_pairFactory] = true;
        isGaugeFactory[_gaugeFactory] = true;

        emit FactoryReplaced(msg.sender, _pairFactory, _gaugeFactory, _pos);
    }

    function removeFactory(uint256 _pos) external onlyEmergencyCouncil {
        require(_pos < factoryLength() && _pos < gaugeFactoriesLength(), '_pos out of range');
        address oldPF = factories[_pos];
        address oldGF = gaugeFactories[_pos];
        require(isFactory[oldPF], 'factory false');
        require(isGaugeFactory[oldGF], 'g.fact false');
        factories[_pos] = address(0);
        gaugeFactories[_pos] = address(0);
        isFactory[oldPF] = false;
        isGaugeFactory[oldGF] = false;

        emit FactoryRemoved(msg.sender, _pos);
    }

    function reset(uint _tokenId) external onlyNewEpoch(_tokenId) {
        require(IVotingEscrow(_ve).isApprovedOrOwner(msg.sender, _tokenId));
        _reset(_tokenId);
        IVotingEscrow(_ve).abstain(_tokenId);
    }

    function _reset(uint _tokenId) internal {
        address[] storage _poolVote = poolVote[_tokenId];
        uint _poolVoteCnt = _poolVote.length;
        uint256 _totalWeight = 0;

        for (uint i = 0; i < _poolVoteCnt; i ++) {
            address _pool = _poolVote[i];
            uint256 _votes = votes[_tokenId][_pool];

            if (_votes != 0) {
                _updateFor(gauges[_pool]);
                weights[_pool] -= _votes;
                votes[_tokenId][_pool] -= _votes;
                if (_votes > 0) {
                    IBribe(external_bribes[gauges[_pool]])._withdraw(uint256(_votes), _tokenId);
                    _totalWeight += _votes;
                } else {
                    _totalWeight -= _votes;
                }
                emit Abstained(_tokenId, _votes);
            }
        }
        totalWeight -= uint256(_totalWeight);
        usedWeights[_tokenId] = 0;
        delete poolVote[_tokenId];
    }

    function poke(uint _tokenId) external onlyNewEpoch(_tokenId) {
        require(IVotingEscrow(_ve).isApprovedOrOwner(msg.sender, _tokenId) || msg.sender == governor);
        lastVoted[_tokenId] = block.timestamp;

        address[] memory _poolVote = poolVote[_tokenId];
        uint _poolCnt = _poolVote.length;
        uint256[] memory _weights = new uint256[](_poolCnt);

        for (uint i = 0; i < _poolCnt; i ++) {
            _weights[i] = votes[_tokenId][_poolVote[i]];
        }

        _vote(_tokenId, _poolVote, _weights);
    }

    function _vote(uint _tokenId, address[] memory _poolVote, uint256[] memory _weights) internal {
        _reset(_tokenId);
        uint _poolCnt = _poolVote.length;
        uint256 _weight = IVotingEscrow(_ve).balanceOfNFT(_tokenId);
        uint256 _totalVoteWeight = 0;
        uint256 _totalWeight = 0;
        uint256 _usedWeight = 0;

        for (uint i = 0; i < _poolCnt; i++) {
            _totalVoteWeight += _weights[i];
        }

        for (uint i = 0; i < _poolCnt; i++) {
            address _pool = _poolVote[i];
            address _gauge = gauges[_pool];

            if (isGauge[_gauge]) {
                require(isAlive[_gauge], "gauge already dead");
                uint256 _poolWeight = _weights[i] * _weight / _totalVoteWeight;
                require(votes[_tokenId][_pool] == 0);
                require(_poolWeight != 0);
                _updateFor(_gauge);

                poolVote[_tokenId].push(_pool);

                weights[_pool] += _poolWeight;
                votes[_tokenId][_pool] += _poolWeight;
                IBribe(external_bribes[_gauge])._deposit(uint256(_poolWeight), _tokenId);
                _usedWeight += _poolWeight;
                _totalWeight += _poolWeight;
                emit Voted(msg.sender, _tokenId, _poolWeight);
            }
        }
        if (_usedWeight > 0) IVotingEscrow(_ve).voting(_tokenId);
        totalWeight += uint256(_totalWeight);
        usedWeights[_tokenId] = uint256(_usedWeight);
    }

    function vote(uint tokenId, address[] calldata _poolVote, uint256[] calldata _weights) external onlyNewEpoch(tokenId) {
        require(IVotingEscrow(_ve).isApprovedOrOwner(msg.sender, tokenId));
        require(_poolVote.length == _weights.length);
        lastVoted[tokenId] = block.timestamp;
        _vote(tokenId, _poolVote, _weights);
    }

    function whitelist(address _token) public {
        require(msg.sender == governor);
        _whitelist(_token);
    }

    function _whitelist(address _token) internal {
        require(!isWhitelisted[_token]);
        isWhitelisted[_token] = true;
        emit Whitelisted(msg.sender, _token);
    }

    function blacklist(address _token) public {
        require(msg.sender == governor);
        _blacklist(_token);
    }

    function _blacklist(address _token) internal {
        require(isWhitelisted[_token]);
        isWhitelisted[_token] = false;
        emit Blacklisted(msg.sender, _token);
    }

    function createGauge(address _pool, uint256 _gaugeType) external returns (address) {
        require(_gaugeType < factories.length, "gaugetype big");
        require(gauges[_pool] == address(0x0), "exists");
        address[] memory allowedRewards = new address[](3);
        address[] memory internalRewards = new address[](2);
        address tokenA;
        address tokenB;
        address _factory = factories[_gaugeType];
        address _gaugeFactory = gaugeFactories[_gaugeType];
        require(_factory != address(0));
        require(_gaugeFactory != address(0));
        bool isPair = IPairFactory(_factory).isPair(_pool);

        if (isPair) {
            tokenA = IPair(_pool).token0();
            tokenB = IPair(_pool).token1();
            allowedRewards[0] = tokenA;
            allowedRewards[1] = tokenB;
            internalRewards[0] = tokenA;
            internalRewards[1] = tokenB;
            // if one of the tokens is not base (FLOW) then add base(FLOW) to allowed rewards
            if (base != tokenA && base != tokenB) {
              allowedRewards[2] = base;
            }
        }

        if (msg.sender != governor && msg.sender != emergencyCouncil) { // gov can create for any pool, even non-Velocimeter pairs
            require(isPair, "!_pool");
            require(isWhitelisted[tokenA] && isWhitelisted[tokenB], "!whitelisted");
        }

        address _external_bribe = IBribeFactory(bribefactory).createExternalBribe(allowedRewards);
        address _gauge = IGaugeFactory(_gaugeFactory).createGauge(_pool, _external_bribe, _ve, isPair, allowedRewards);

        IERC20(base).approve(_gauge, type(uint).max);
        external_bribes[_gauge] = _external_bribe;
        gauges[_pool] = _gauge;
        poolForGauge[_gauge] = _pool;
        isGauge[_gauge] = true;
        isAlive[_gauge] = true;
        _updateFor(_gauge);
        pools.push(_pool);
        if (isPair) {
            IPair(_pool).setHasGauge(true);
            IPair(_pool).setExternalBribe(_external_bribe);
        }
        emit GaugeCreated(_gauge, msg.sender, _external_bribe, _pool);
        return _gauge;
    }

    function pauseGauge(address _gauge) external {
        require(msg.sender == emergencyCouncil, "not emergency council");
        require(isAlive[_gauge], "gauge already dead");
        isAlive[_gauge] = false;
        claimable[_gauge] = 0;
        address _pair = IGauge(_gauge).stake(); // TODO: add test cases
        try IPair(_pair).setHasGauge(false) {} catch {}
        emit GaugePaused(_gauge);
    }

    function restartGauge(address _gauge) external {
        require(msg.sender == emergencyCouncil, "not emergency council");
        require(!isAlive[_gauge], "gauge already alive");
        isAlive[_gauge] = true;
        address _pair = IGauge(_gauge).stake(); // TODO: add test cases
        try IPair(_pair).setHasGauge(true) {} catch {}
        emit GaugeRestarted(_gauge);
    }

    function killGaugeTotally(address _gauge) external {
        require(msg.sender == emergencyCouncil, "not emergency council");
        require(isAlive[_gauge], "gauge already dead");

        address _pool = poolForGauge[_gauge];

        delete isAlive[_gauge];
        delete external_bribes[_gauge];
        delete poolForGauge[_gauge];
        delete isGauge[_gauge];
        delete claimable[_gauge];
        delete supplyIndex[_gauge];
        delete gauges[_pool];
        try IPair(_pool).setHasGauge(false) {} catch {}

        killedGauges.push(_gauge);

        emit GaugeKilledTotally(_gauge);
    }

    function attachTokenToGauge(uint tokenId, address account) external {
        require(isGauge[msg.sender]);
        require(isAlive[msg.sender]); // killed gauges cannot attach tokens to themselves
        if (tokenId > 0) IVotingEscrow(_ve).attach(tokenId);
        emit Attach(account, msg.sender, tokenId);
    }

    function emitDeposit(uint tokenId, address account, uint amount) external {
        require(isGauge[msg.sender]);
        require(isAlive[msg.sender]);
        emit Deposit(account, msg.sender, tokenId, amount);
    }

    function detachTokenFromGauge(uint tokenId, address account) external {
        if (tokenId > 0) IVotingEscrow(_ve).detach(tokenId);
        emit Detach(account, msg.sender, tokenId);
    }

    function emitWithdraw(uint tokenId, address account, uint amount) external {
        emit Withdraw(account, msg.sender, tokenId, amount);
    }

    function length() external view returns (uint) {
        return pools.length;
    }

    function _factories() external view returns(address[] memory){
        return factories;
    }
    
    function factoryLength() public view returns(uint){
        return factories.length;
    }
    
    function _gaugeFactories() external view returns(address[] memory){
        return gaugeFactories;
    }
    
    function gaugeFactoriesLength() public view returns(uint) {
        return gaugeFactories.length;
    }

    function _killedGauges() external view returns(address[] memory){
        return killedGauges;
    }
    
    function killedGaugesLength() public view returns(uint) {
        return killedGauges.length;
    }

    uint internal index;
    mapping(address => uint) internal supplyIndex;
    mapping(address => uint) public claimable;

    function notifyRewardAmount(uint amount) external {
        _safeTransferFrom(base, msg.sender, address(this), amount); // transfer the distro in
        uint256 _ratio = amount * 1e18 / totalWeight; // 1e18 adjustment is removed during claim
        if (_ratio > 0) {
            index += _ratio;
        }
        emit NotifyReward(msg.sender, base, amount);
    }

    function updateFor(address[] memory _gauges) external {
        for (uint i = 0; i < _gauges.length; i++) {
            _updateFor(_gauges[i]);
        }
    }

    function updateForRange(uint start, uint end) public {
        for (uint i = start; i < end; i++) {
            _updateFor(gauges[pools[i]]);
        }
    }

    function updateAll() external {
        updateForRange(0, pools.length);
    }

    function updateGauge(address _gauge) external {
        _updateFor(_gauge);
    }

    function _updateFor(address _gauge) internal {
        address _pool = poolForGauge[_gauge];
        uint256 _supplied = weights[_pool];
        if (_supplied > 0) {
            uint _supplyIndex = supplyIndex[_gauge];
            uint _index = index; // get global index0 for accumulated distro
            supplyIndex[_gauge] = _index; // update _gauge current position to global position
            uint _delta = _index - _supplyIndex; // see if there is any difference that need to be accrued
            if (_delta > 0) {
                uint _share = uint(_supplied) * _delta / 1e18; // add accrued difference for each supplied token
                if (isAlive[_gauge]) {
                    claimable[_gauge] += _share;
                }
            }
        } else {
            supplyIndex[_gauge] = index; // new users are set to the default global state
        }
    }

    function claimRewards(address[] memory _gauges, address[][] memory _tokens) external {
        for (uint i = 0; i < _gauges.length; i++) {
            IGauge(_gauges[i]).getReward(msg.sender, _tokens[i]);
        }
    }

    function claimBribes(address[] memory _bribes, address[][] memory _tokens, uint _tokenId) external {
        require(IVotingEscrow(_ve).isApprovedOrOwner(msg.sender, _tokenId));
        for (uint i = 0; i < _bribes.length; i++) {
            IBribe(_bribes[i]).getRewardForOwner(_tokenId, _tokens[i]);
        }
    }

    function distribute(address _gauge) public lock {
        IMinter(minter).update_period();
        _updateFor(_gauge); // should set claimable to 0 if killed
        uint _claimable = claimable[_gauge];
        if (_claimable > IGauge(_gauge).left(base) && _claimable / DURATION > 0) {
            claimable[_gauge] = 0;
            IGauge(_gauge).notifyRewardAmount(base, _claimable);
            emit DistributeReward(msg.sender, _gauge, _claimable);
        }
    }

    function distro() external {
        distribute(0, pools.length);
    }

    function distribute() external {
        distribute(0, pools.length);
    }

    function distribute(uint start, uint finish) public {
        for (uint x = start; x < finish; x++) {
            distribute(gauges[pools[x]]);
        }
    }

    function distribute(address[] memory _gauges) external {
        for (uint x = 0; x < _gauges.length; x++) {
            distribute(_gauges[x]);
        }
    }

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

File 2 of 12 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

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

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

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

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

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

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

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

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

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

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

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

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 2 of 12 : IBribe.sol
pragma solidity 0.8.13;

interface IBribe {
    function _deposit(uint amount, uint tokenId) external;
    function _withdraw(uint amount, uint tokenId) external;
    function getRewardForOwner(uint tokenId, address[] memory tokens) external;
    function notifyRewardAmount(address token, uint amount) external;
    function left(address token) external view returns (uint);
}

File 2 of 12 : IBribeFactory.sol
pragma solidity 0.8.13;

interface IBribeFactory {
    function createExternalBribe(address[] memory) external returns (address);
}

File 2 of 12 : IGauge.sol
pragma solidity 0.8.13;

interface IGauge {
    function notifyRewardAmount(address token, uint amount) external;
    function getReward(address account, address[] memory tokens) external;
    function left(address token) external view returns (uint);
    function isForPair() external view returns (bool);
    function stake() external view returns (address);
}

File 2 of 12 : IGaugeFactory.sol
pragma solidity 0.8.13;

interface IGaugeFactory {
    function createGauge(address, address, address, bool, address[] memory) external returns (address);
}

File 2 of 12 : IERC20.sol
pragma solidity 0.8.13;

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function transfer(address recipient, uint amount) external returns (bool);
    function decimals() external view returns (uint8);
    function symbol() external view returns (string memory);
    function balanceOf(address) external view returns (uint);
    function transferFrom(address sender, address recipient, uint amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint);
    function approve(address spender, uint value) external returns (bool);

    event Transfer(address indexed from, address indexed to, uint value);
    event Approval(address indexed owner, address indexed spender, uint value);
}

File 2 of 12 : IMinter.sol
pragma solidity 0.8.13;

interface IMinter {
    function update_period() external returns (uint);
}

File 2 of 12 : IPair.sol
pragma solidity 0.8.13;

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

File 2 of 12 : IPairFactory.sol
pragma solidity 0.8.13;

interface IPairFactory {
    function allPairsLength() external view returns (uint);
    function isPair(address pair) external view returns (bool);
    function isPaused() external view returns (bool);
    function pairCodeHash() external pure returns (bytes32);
    function getFee(address pair) external view returns (uint256);
    function getPair(address tokenA, address token, bool stable) external view returns (address);
    function getInitializable() external view returns (address, address, bool);
    function createPair(address tokenA, address tokenB, bool stable) external returns (address pair);
    function voter() external view returns (address);
    function tank() external view returns (address);
}

File 2 of 12 : IVoter.sol
pragma solidity 0.8.13;

interface IVoter {
    function _ve() external view returns (address);
    function governor() external view returns (address);
    function emergencyCouncil() external view returns (address);
    function attachTokenToGauge(uint _tokenId, address account) external;
    function detachTokenFromGauge(uint _tokenId, address account) external;
    function emitDeposit(uint _tokenId, address account, uint amount) external;
    function emitWithdraw(uint _tokenId, address account, uint amount) external;
    function isWhitelisted(address token) external view returns (bool);
    function notifyRewardAmount(uint amount) external;
    function distribute(address _gauge) external;
    function gauges(address) external view returns (address);
}

File 2 of 12 : IVotingEscrow.sol
pragma solidity 0.8.13;

interface IVotingEscrow {

    struct Point {
        int128 bias;
        int128 slope; // # -dweight / dt
        uint256 ts;
        uint256 blk; // block
    }

    function token() external view returns (address);
    function team() external returns (address);
    function epoch() external view returns (uint);
    function point_history(uint loc) external view returns (Point memory);
    function user_point_history(uint tokenId, uint loc) external view returns (Point memory);
    function user_point_epoch(uint tokenId) external view returns (uint);

    function ownerOf(uint) external view returns (address);
    function isApprovedOrOwner(address, uint) external view returns (bool);
    function transferFrom(address, address, uint) external;

    function voting(uint tokenId) external;
    function abstain(uint tokenId) external;
    function attach(uint tokenId) external;
    function detach(uint tokenId) external;

    function checkpoint() external;
    function deposit_for(uint tokenId, uint value) external;
    function create_lock_for(uint, uint, address) external returns (uint);

    function balanceOfNFT(uint) external view returns (uint);
    function totalSupply() external view returns (uint);
}

Settings
{
  "remappings": [
    "ds-test/=lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/",
    "solmate/=lib/solmate/src/",
    "utils/=test/utils/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"__ve","type":"address"},{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_gauges","type":"address"},{"internalType":"address","name":"_bribes","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"weight","type":"uint256"}],"name":"Abstained","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Attach","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"blacklister","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"Blacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"setter","type":"address"},{"indexed":false,"internalType":"address","name":"newBribeFatory","type":"address"}],"name":"BribeFactorySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"lp","type":"address"},{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Detach","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DistributeReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"setter","type":"address"},{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":false,"internalType":"address","name":"externalBribe","type":"address"}],"name":"ExternalBribeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"setter","type":"address"},{"indexed":true,"internalType":"address","name":"pairFactory","type":"address"},{"indexed":true,"internalType":"address","name":"gaugeFactory","type":"address"}],"name":"FactoryAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"setter","type":"address"},{"indexed":true,"internalType":"uint256","name":"pos","type":"uint256"}],"name":"FactoryRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"setter","type":"address"},{"indexed":true,"internalType":"address","name":"pairFactory","type":"address"},{"indexed":true,"internalType":"address","name":"gaugeFactory","type":"address"},{"indexed":false,"internalType":"uint256","name":"pos","type":"uint256"}],"name":"FactoryReplaced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":false,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"address","name":"external_bribe","type":"address"},{"indexed":true,"internalType":"address","name":"pool","type":"address"}],"name":"GaugeCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gauge","type":"address"}],"name":"GaugeKilledTotally","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gauge","type":"address"}],"name":"GaugePaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gauge","type":"address"}],"name":"GaugeRestarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"reward","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"NotifyReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"weight","type":"uint256"}],"name":"Voted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"whitelister","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"Whitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"lp","type":"address"},{"indexed":true,"internalType":"address","name":"gauge","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"_factories","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_gaugeFactories","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_killedGauges","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_ve","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_pairFactory","type":"address"},{"internalType":"address","name":"_gaugeFactory","type":"address"}],"name":"addFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"attachTokenToGauge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"blacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bribefactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_bribes","type":"address[]"},{"internalType":"address[][]","name":"_tokens","type":"address[][]"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"claimBribes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_gauges","type":"address[]"},{"internalType":"address[][]","name":"_tokens","type":"address[][]"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_pool","type":"address"},{"internalType":"uint256","name":"_gaugeType","type":"uint256"}],"name":"createGauge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"detachTokenFromGauge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_gauges","type":"address[]"}],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gauge","type":"address"}],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"finish","type":"uint256"}],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distro","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyCouncil","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emitDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emitWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"external_bribes","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"factories","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factoryLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"gaugeFactories","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gaugeFactoriesLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"gauges","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"},{"internalType":"address","name":"_minter","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAlive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isFactory","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isGauge","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isGaugeFactory","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_gauge","type":"address"}],"name":"killGaugeTotally","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"killedGauges","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"killedGaugesLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lastVoted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"length","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gauge","type":"address"}],"name":"pauseGauge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"poke","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"poolForGauge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolVote","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pools","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pos","type":"uint256"}],"name":"removeFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pairFactory","type":"address"},{"internalType":"address","name":"_gaugeFactory","type":"address"},{"internalType":"uint256","name":"_pos","type":"uint256"}],"name":"replaceFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"reset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gauge","type":"address"}],"name":"restartGauge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bribeFactory","type":"address"}],"name":"setBribeFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_council","type":"address"}],"name":"setEmergencyCouncil","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gauge","type":"address"},{"internalType":"address","name":"_external","type":"address"}],"name":"setExternalBribeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governor","type":"address"}],"name":"setGovernor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"updateAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_gauges","type":"address[]"}],"name":"updateFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"updateForRange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gauge","type":"address"}],"name":"updateGauge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"usedWeights","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address[]","name":"_poolVote","type":"address[]"},{"internalType":"uint256[]","name":"_weights","type":"uint256[]"}],"name":"vote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"votes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"weights","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"whitelist","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405260016016553480156200001657600080fd5b5060405162004532380380620045328339810160408190526200003991620001b4565b6001600160a01b038416608081905260408051637e062a3560e11b8152905163fc0c546a916004808201926020929091908290030181865afa15801562000084573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000aa919062000211565b6001600160a01b0390811660a05260008054600181810183557f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56390910180549684166001600160a01b031997881681179091558252601460209081526040808420805460ff199081168517909155835480850185557fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6018054988716988a1689179055968452601590915290912080549094161790925560028054919092169083161790556003805482163390811790915560048054831682179055600580549092161790555062000236565b80516001600160a01b0381168114620001af57600080fd5b919050565b60008060008060808587031215620001cb57600080fd5b620001d68562000197565b9350620001e66020860162000197565b9250620001f66040860162000197565b9150620002066060860162000197565b905092959194509250565b6000602082840312156200022457600080fd5b6200022f8262000197565b9392505050565b60805160a05161425f620002d36000396000818161126a015281816112e3015281816117e6015281816118a2015281816129430152818161297c015281816129ae0152612c160152600081816106f001528181610f1401528181610faf015281816110790152818161135401528181611b6b01528181611c9b01528181611e3001528181612b680152818161328901526135e3015261425f6000f3fe608060405234801561001057600080fd5b50600436106103d05760003560e01c80637778960e116101ff578063ae21c4cb1161011a578063daa168bd116100ad578063e9f6adfa1161007c578063e9f6adfa146108ff578063ea94ee4414610907578063f3594be01461091a578063f9f92be41461093a57600080fd5b8063daa168bd146108c6578063dcd9e47a146108d9578063e4fc6b6d146105c7578063e586875f146108ec57600080fd5b8063c448c78d116100e9578063c448c78d14610878578063cbadada414610880578063d23254b414610888578063d560b0d7146108b357600080fd5b8063ae21c4cb1461080b578063b52a315114610834578063b9a09fd51461083c578063c42cf5351461086557600080fd5b80639fb5dc0511610192578063a86a366d11610161578063a86a366d146107af578063a9b5aa7e146107c2578063aa79979b146107d5578063ac4afa38146107f857600080fd5b80639fb5dc0514610754578063a61c713a14610769578063a7cac8461461077c578063a82029f91461079c57600080fd5b806396c82e57116101ce57806396c82e57146107125780639b19251a1461071b5780639b6a9d721461072e5780639edfd4601461074157600080fd5b80637778960e146106a557806379e93824146106b85780637ac09bf7146106d85780638dd598fb146106eb57600080fd5b8063402914f5116102ef57806363453ae111610282578063698473e311610251578063698473e3146106595780636ecbe38a1461066c5780637625391a1461067f5780637715ee751461069257600080fd5b806363453ae1146105fd5780636566afad14610610578063657021fb14610623578063672383c41461064657600080fd5b806347b3c6ba116102be57806347b3c6ba146105c757806353d78693146105cf578063577387b5146105d75780636138889b146105ea57600080fd5b8063402914f514610579578063411b1f7714610599578063462d0b2e146105ac578063470f4985146105bf57600080fd5b806320b1cb6f1161036757806332145f901161033657806332145f901461051d57806338752a9d146105305780633af32abf146105435780633c6b16ab1461056657600080fd5b806320b1cb6f146104d157806323e1af42146104e457806327e5c823146104f7578063310bd74b1461050a57600080fd5b80630f04ba67116103a35780630f04ba67146104565780631703e5f914610489578063173de600146104ac5780631f7b6d32146104bf57600080fd5b806303c39b00146103d557806306d6a1b2146103ea57806307546172146104305780630c340a2414610443575b600080fd5b6103e86103e3366004613a5b565b61094d565b005b6104136103f8366004613a5b565b600a602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b600354610413906001600160a01b031681565b600454610413906001600160a01b031681565b610479610464366004613a5b565b60146020526000908152604090205460ff1681565b6040519015158152602001610427565b610479610497366004613a5b565b60136020526000908152604090205460ff1681565b6104136104ba366004613a7f565b610ad1565b6007545b604051908152602001610427565b6103e86104df366004613bf7565b610afb565b6104136104f2366004613a7f565b610bb1565b6103e8610505366004613c5b565b610bc1565b6103e8610518366004613a7f565b610eb2565b6103e861052b366004613a7f565b611017565b600254610413906001600160a01b031681565b610479610551366004613a5b565b60126020526000908152604090205460ff1681565b6103e8610574366004613a7f565b611265565b6104c3610587366004613a5b565b60196020526000908152604090205481565b6103e86105a7366004613c9c565b611338565b6103e86105ba366004613ccc565b6113f6565b6000546104c3565b6103e8611471565b6103e8611482565b6103e86105e5366004613a7f565b611491565b6103e86105f8366004613d13565b6116ea565b6103e861060b366004613a5b565b61172e565b6103e861061e366004613d50565b611956565b610479610631366004613a5b565b60156020526000908152604090205460ff1681565b610413610654366004613a7f565b611b07565b6103e8610667366004613c9c565b611b17565b6103e861067a366004613a5b565b611c0d565b6103e861068d366004613d7e565b611c19565b6103e86106a0366004613da0565b611c7f565b600554610413906001600160a01b031681565b6104c36106c6366004613a7f565b600f6020526000908152604090205481565b6103e86106e6366004613e59565b611dce565b6104137f000000000000000000000000000000000000000000000000000000000000000081565b6104c360065481565b6103e8610729366004613a5b565b611f36565b6103e861073c366004613d7e565b611f56565b6103e861074f366004613a5b565b611fbc565b61075c612169565b6040516104279190613f17565b6103e8610777366004613f2a565b6121cb565b6104c361078a366004613a5b565b600c6020526000908152604090205481565b6103e86107aa366004613a5b565b61224f565b6104136107bd366004613d7e565b6123ea565b6103e86107d0366004613a5b565b612422565b6104796107e3366004613a5b565b60116020526000908152604090205460ff1681565b610413610806366004613a7f565b6124a2565b610413610819366004613a5b565b600b602052600090815260409020546001600160a01b031681565b6001546104c3565b61041361084a366004613a5b565b6009602052600090815260409020546001600160a01b031681565b6103e8610873366004613a5b565b6124b2565b6008546104c3565b61075c6124eb565b6104c3610896366004613c9c565b600d60209081526000928352604080842090915290825290205481565b6103e86108c1366004613d13565b61254b565b6103e86108d4366004613d50565b61258b565b6104136108e7366004613f51565b6125e4565b6103e86108fa366004613a5b565b612f45565b61075c612f7e565b6103e8610915366004613f2a565b612fde565b6104c3610928366004613a7f565b60106020526000908152604090205481565b6103e8610948366004613a5b565b613021565b6005546001600160a01b031633146109805760405162461bcd60e51b815260040161097790613f7d565b60405180910390fd5b6001600160a01b03811660009081526013602052604090205460ff166109b85760405162461bcd60e51b815260040161097790613fac565b6001600160a01b0381166000818152601360209081526040808320805460ff19169055601982528083208390558051633a4b66f160e01b81529051929392633a4b66f1926004808401939192918290030181865afa158015610a1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a429190613fd8565b6040516305916c7f60e51b8152600060048201529091506001600160a01b0382169063b22d8fe090602401600060405180830381600087803b158015610a8757600080fd5b505af1925050508015610a98575060015b506040516001600160a01b038316907f745308c08240010b7d5acf1a287fddff3bd591868cf1bc876f5f4ce80da4b22790600090a25050565b60088181548110610ae157600080fd5b6000918252602090912001546001600160a01b0316905081565b60005b8251811015610bac57828181518110610b1957610b19613ff5565b60200260200101516001600160a01b03166331279d3d33848481518110610b4257610b42613ff5565b60200260200101516040518363ffffffff1660e01b8152600401610b6792919061400b565b600060405180830381600087803b158015610b8157600080fd5b505af1158015610b95573d6000803e3d6000fd5b505050508080610ba490614045565b915050610afe565b505050565b60018181548110610ae157600080fd5b6005546001600160a01b03163314610beb5760405162461bcd60e51b81526004016109779061405e565b6001600160a01b038316610c115760405162461bcd60e51b81526004016109779061408c565b6001600160a01b038216610c375760405162461bcd60e51b81526004016109779061408c565b60005481108015610c49575060015481105b610c895760405162461bcd60e51b81526020600482015260116024820152705f706f73206f7574206f662072616e676560781b6044820152606401610977565b6001600160a01b03831660009081526014602052604090205460ff16610ce15760405162461bcd60e51b815260206004820152600d60248201526c666163746f72792066616c736560981b6044820152606401610977565b6001600160a01b03821660009081526015602052604090205460ff16610d385760405162461bcd60e51b815260206004820152600c60248201526b672e666163742066616c736560a01b6044820152606401610977565b6000808281548110610d4c57610d4c613ff5565b6000918252602082200154600180546001600160a01b0390921693509084908110610d7957610d79613ff5565b60009182526020808320909101546001600160a01b038581168452601483526040808520805460ff1990811690915591909216808552601590935290832080549091169055815490925086919085908110610dd657610dd6613ff5565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508360018481548110610e1857610e18613ff5565b600091825260208083209190910180546001600160a01b0319166001600160a01b03948516179055878316808352601482526040808420805460ff199081166001908117909255958a168086526015855294829020805490961617909455925186815291929133917f3633a7f9c2b4cc760354edf1370d3cd58da11f6fbf1ef237641548407a4bd6f8910160405180910390a45050505050565b600081815260106020526040902054819062093a80610ed181426140ac565b610edb91906140ce565b11610ef85760405162461bcd60e51b8152600401610977906140ed565b60405163430c208160e01b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063430c208190604401602060405180830381865afa158015610f63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f879190614124565b610f9057600080fd5b610f9982613041565b60405163c1f0fb9f60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063c1f0fb9f90602401600060405180830381600087803b158015610ffb57600080fd5b505af115801561100f573d6000803e3d6000fd5b505050505050565b600081815260106020526040902054819062093a8061103681426140ac565b61104091906140ce565b1161105d5760405162461bcd60e51b8152600401610977906140ed565b60405163430c208160e01b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063430c208190604401602060405180830381865afa1580156110c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ec9190614124565b8061110157506004546001600160a01b031633145b61110a57600080fd5b6000828152601060209081526040808320429055600e82528083208054825181850281018501909352808352919290919083018282801561117457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611156575b5050505050905060008151905060008167ffffffffffffffff81111561119c5761119c613a98565b6040519080825280602002602001820160405280156111c5578160200160208202803683370190505b50905060005b8281101561125257600d600087815260200190815260200160002060008583815181106111fa576111fa613ff5565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205482828151811061123557611235613ff5565b60209081029190910101528061124a81614045565b9150506111cb565b5061125e858483613265565b5050505050565b6112917f000000000000000000000000000000000000000000000000000000000000000033308461367a565b6006546000906112a983670de0b6b3a76400006140ce565b6112b391906140ac565b905080156112d35780601760008282546112cd9190614146565b90915550505b6040518281526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169033907ff70d5c697de7ea828df48e5c4573cb2194c659f1901f70110c52b066dcf50826906020015b60405180910390a35050565b81156113b957604051634c35bec560e11b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063986b7d8a90602401600060405180830381600087803b1580156113a057600080fd5b505af11580156113b4573d6000803e3d6000fd5b505050505b60405182815233906001600160a01b038316907fae268d9aab12f3605f58efd74fd3801fa812b03fdb44317eb70f46dff0e19e229060200161132c565b6003546001600160a01b0316331461140d57600080fd5b60005b825181101561144d5761143b83828151811061142e5761142e613ff5565b602002602001015161376a565b8061144581614045565b915050611410565b50600380546001600160a01b0319166001600160a01b039290921691909117905550565b60075461148090600090611c19565b565b60075461148090600090611f56565b6005546001600160a01b031633146114bb5760405162461bcd60e51b81526004016109779061405e565b600054811080156114cd575060015481105b61150d5760405162461bcd60e51b81526020600482015260116024820152705f706f73206f7574206f662072616e676560781b6044820152606401610977565b600080828154811061152157611521613ff5565b6000918252602082200154600180546001600160a01b039092169350908490811061154e5761154e613ff5565b60009182526020808320909101546001600160a01b03858116845260149092526040909220549116915060ff166115b75760405162461bcd60e51b815260206004820152600d60248201526c666163746f72792066616c736560981b6044820152606401610977565b6001600160a01b03811660009081526015602052604090205460ff1661160e5760405162461bcd60e51b815260206004820152600c60248201526b672e666163742066616c736560a01b6044820152606401610977565b600080848154811061162257611622613ff5565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060006001848154811061166557611665613ff5565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790558483168252601481526040808320805460ff199081169091559385168352601590915280822080549093169092559051849133917f0b8a5f427e4dc8f150fa67b8072e1e0c1dd5a67cbb3c3e5e99fd9593f814f4129190a3505050565b60005b815181101561172a5761171882828151811061170b5761170b613ff5565b602002602001015161172e565b8061172281614045565b9150506116ed565b5050565b60165460011461173d57600080fd5b60026016556003546040805163ed29fc1160e01b815290516001600160a01b039092169163ed29fc119160048082019260209290919082900301816000875af115801561178e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b2919061415e565b506117bc816137dd565b6001600160a01b0381811660008181526019602052604090819020549051634cde602960e11b81527f00000000000000000000000000000000000000000000000000000000000000009093166004840152916399bcc05290602401602060405180830381865afa158015611834573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611858919061415e565b811180156118725750600061187062093a80836140ac565b115b1561194d576001600160a01b03828116600081815260196020526040808220919091555163b66503cf60e01b81527f00000000000000000000000000000000000000000000000000000000000000009092166004830152602482018390529063b66503cf90604401600060405180830381600087803b1580156118f457600080fd5b505af1158015611908573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507f4fa9693cae526341d334e2862ca2413b2e503f1266255f9e0869fb36e6d89b179060200160405180910390a35b50506001601655565b6005546001600160a01b031633146119805760405162461bcd60e51b81526004016109779061405e565b6001600160a01b0382166119a65760405162461bcd60e51b81526004016109779061408c565b6001600160a01b0381166119cc5760405162461bcd60e51b81526004016109779061408c565b6001600160a01b03811660009081526015602052604090205460ff1615611a235760405162461bcd60e51b815260206004820152600b60248201526a672e66616374207472756560a81b6044820152606401610977565b60008054600181810183557f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56390910180546001600160a01b038087166001600160a01b03199283168117909355835480850185557fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6018054918716919092168117909155818452601460209081526040808620805460ff19908116871790915583875260159092528086208054909216909417905591519192909133917f5af5acd828b04c6899aa8e9823b472c3a176605a47cae52d5acc849a12ab88bc91a45050565b60008181548110610ae157600080fd5b3360009081526011602052604090205460ff16611b3357600080fd5b3360009081526013602052604090205460ff16611b4f57600080fd5b8115611bd05760405163fbd3a29d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063fbd3a29d90602401600060405180830381600087803b158015611bb757600080fd5b505af1158015611bcb573d6000803e3d6000fd5b505050505b60405182815233906001600160a01b038316907f60940192810a6fb3bce3fd3e2e3a13fd6ccc7605e963fb87ee971aba829989bd9060200161132c565b611c16816137dd565b50565b815b81811015610bac57611c6d6009600060078481548110611c3d57611c3d613ff5565b60009182526020808320909101546001600160a01b0390811684529083019390935260409091019020541661172e565b80611c7781614045565b915050611c1b565b60405163430c208160e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063430c208190604401602060405180830381865afa158015611cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0e9190614124565b611d1757600080fd5b60005b8351811015611dc857838181518110611d3557611d35613ff5565b60200260200101516001600160a01b031663a7852afa83858481518110611d5e57611d5e613ff5565b60200260200101516040518363ffffffff1660e01b8152600401611d83929190614177565b600060405180830381600087803b158015611d9d57600080fd5b505af1158015611db1573d6000803e3d6000fd5b505050508080611dc090614045565b915050611d1a565b50505050565b600085815260106020526040902054859062093a80611ded81426140ac565b611df791906140ce565b11611e145760405162461bcd60e51b8152600401610977906140ed565b60405163430c208160e01b8152336004820152602481018790527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063430c208190604401602060405180830381865afa158015611e7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea39190614124565b611eac57600080fd5b838214611eb857600080fd5b6000868152601060209081526040918290204290558151868202818101830190935286815261100f9289928991899182919085019084908082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525061326592505050565b6004546001600160a01b03163314611f4d57600080fd5b611c168161376a565b815b81811015610bac57611faa6009600060078481548110611f7a57611f7a613ff5565b60009182526020808320909101546001600160a01b039081168452908301939093526040909101902054166137dd565b80611fb481614045565b915050611f58565b6005546001600160a01b03163314611fe65760405162461bcd60e51b815260040161097790613f7d565b6001600160a01b03811660009081526013602052604090205460ff1661201e5760405162461bcd60e51b815260040161097790613fac565b6001600160a01b038181166000908152600a60209081526040808320805460138452828520805460ff19908116909155600b855283862080546001600160a01b031990811690915583548116909355601185528386208054909116905560198452828520859055601884528285208590559094168084526009909252808320805490941690935591516305916c7f60e51b81526004810191909152819063b22d8fe090602401600060405180830381600087803b1580156120de57600080fd5b505af19250505080156120ef575060015b506008805460018101825560009182527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b03851690811790915560405190917f3ee2da044873b7ddb31d4960187639074c5137888f359c667b947320284709c391a25050565b606060018054806020026020016040519081016040528092919081815260200182805480156121c157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121a3575b5050505050905090565b3360009081526011602052604090205460ff166121e757600080fd5b3360009081526013602052604090205460ff1661220357600080fd5b604080518481526020810183905233916001600160a01b038516917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d791015b60405180910390a3505050565b6005546001600160a01b031633146122795760405162461bcd60e51b815260040161097790613f7d565b6001600160a01b03811660009081526013602052604090205460ff16156122d85760405162461bcd60e51b8152602060048201526013602482015272676175676520616c726561647920616c69766560681b6044820152606401610977565b6001600160a01b0381166000818152601360209081526040808320805460ff191660011790558051633a4b66f160e01b81529051929392633a4b66f1926004808401939192918290030181865afa158015612337573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235b9190613fd8565b6040516305916c7f60e51b8152600160048201529091506001600160a01b0382169063b22d8fe090602401600060405180830381600087803b1580156123a057600080fd5b505af19250505080156123b1575060015b506040516001600160a01b038316907f3b8274015fe59b73ee1fb9c5d7ad25a8f253dc8d45ebd178bfef3295240fcabd90600090a25050565b600e602052816000526040600020818154811061240657600080fd5b6000918252602090912001546001600160a01b03169150829050565b6005546001600160a01b0316331461244c5760405162461bcd60e51b81526004016109779061405e565b600280546001600160a01b0319166001600160a01b03831690811790915560405190815233907f557e0f02d402561222ba54007de263881f84edad9a3877340d06e330e3400fa89060200160405180910390a250565b60078181548110610ae157600080fd5b6004546001600160a01b031633146124c957600080fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b606060088054806020026020016040519081016040528092919081815260200182805480156121c1576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116121a3575050505050905090565b60005b815181101561172a5761257982828151811061256c5761256c613ff5565b60200260200101516137dd565b8061258381614045565b91505061254e565b6005546001600160a01b031633146125b55760405162461bcd60e51b81526004016109779061405e565b6001600160a01b03821660009081526011602052604090205460ff166125da57600080fd5b61172a82826138de565b6000805482106126265760405162461bcd60e51b815260206004820152600d60248201526c6761756765747970652062696760981b6044820152606401610977565b6001600160a01b0383811660009081526009602052604090205416156126775760405162461bcd60e51b815260206004820152600660248201526565786973747360d01b6044820152606401610977565b604080516003808252608082019092526000916020820160608036833750506040805160028082526060820183529394506000939092509060208301908036833701905050905060008060008087815481106126d5576126d5613ff5565b6000918252602082200154600180546001600160a01b039092169350908990811061270257612702613ff5565b6000918252602090912001546001600160a01b039081169150821661272657600080fd5b6001600160a01b03811661273957600080fd5b60405163e5e31b1360e01b81526001600160a01b038a811660048301526000919084169063e5e31b1390602401602060405180830381865afa158015612783573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127a79190614124565b90508015612a0157896001600160a01b0316630dfe16816040518163ffffffff1660e01b81526004016020604051808303816000875af11580156127ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128139190613fd8565b9450896001600160a01b031663d21220a76040518163ffffffff1660e01b81526004016020604051808303816000875af1158015612855573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128799190613fd8565b9350848760008151811061288f5761288f613ff5565b60200260200101906001600160a01b031690816001600160a01b03168152505083876001815181106128c3576128c3613ff5565b60200260200101906001600160a01b031690816001600160a01b03168152505084866000815181106128f7576128f7613ff5565b60200260200101906001600160a01b031690816001600160a01b031681525050838660018151811061292b5761292b613ff5565b6001600160a01b0392831660209182029290920101527f00000000000000000000000000000000000000000000000000000000000000008116908616148015906129a75750836001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614155b15612a01577f0000000000000000000000000000000000000000000000000000000000000000876002815181106129e0576129e0613ff5565b60200260200101906001600160a01b031690816001600160a01b0316815250505b6004546001600160a01b03163314801590612a2757506005546001600160a01b03163314155b15612add5780612a625760405162461bcd60e51b81526020600482015260066024820152650857dc1bdbdb60d21b6044820152606401610977565b6001600160a01b03851660009081526012602052604090205460ff168015612aa257506001600160a01b03841660009081526012602052604090205460ff165b612add5760405162461bcd60e51b815260206004820152600c60248201526b085dda1a5d195b1a5cdd195960a21b6044820152606401610977565b6002546040516319217c3160e21b81526000916001600160a01b031690636485f0c490612b0e908b90600401613f17565b6020604051808303816000875af1158015612b2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b519190613fd8565b90506000836001600160a01b0316631ede5a8e8d847f0000000000000000000000000000000000000000000000000000000000000000878e6040518663ffffffff1660e01b8152600401612ba9959493929190614190565b6020604051808303816000875af1158015612bc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bec9190613fd8565b60405163095ea7b360e01b81526001600160a01b03808316600483015260001960248301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063095ea7b3906044016020604051808303816000875af1158015612c61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c859190614124565b5081600b6000836001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080600960008e6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055508b600a6000836001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600160116000836001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550600160136000836001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550612de9816137dd565b600780546001810182556000919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b0319166001600160a01b038e161790558215612ef0576040516305916c7f60e51b8152600160048201526001600160a01b038d169063b22d8fe090602401600060405180830381600087803b158015612e7c57600080fd5b505af1158015612e90573d6000803e3d6000fd5b5050604051630ccccab360e11b81526001600160a01b0385811660048301528f16925063199995669150602401600060405180830381600087803b158015612ed757600080fd5b505af1158015612eeb573d6000803e3d6000fd5b505050505b6040513381526001600160a01b03808e1691848216918416907f48d3c521fd0d5541640f58c6d6381eed7cb2e8c9df421ae165a4f4c2d221ee0d9060200160405180910390a49b9a5050505050505050505050565b6004546001600160a01b03163314612f5c57600080fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b606060008054806020026020016040519081016040528092919081815260200182805480156121c1576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116121a3575050505050905090565b604080518481526020810183905233916001600160a01b038516917ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5679101612242565b6004546001600160a01b0316331461303857600080fd5b611c16816139a5565b6000818152600e6020526040812080549091805b8281101561322957600084828154811061307157613071613ff5565b6000918252602080832090910154888352600d825260408084206001600160a01b03909216808552919092529120549091508015613214576001600160a01b038083166000908152600960205260409020546130cd91166137dd565b6001600160a01b0382166000908152600c6020526040812080548392906130f59084906141d7565b90915550506000878152600d602090815260408083206001600160a01b03861684529091528120805483929061312c9084906141d7565b909155505080156131cd576001600160a01b0382811660009081526009602090815260408083205484168352600b9091529081902054905163278afc8b60e21b815260048101849052602481018a9052911690639e2bf22c90604401600060405180830381600087803b1580156131a257600080fd5b505af11580156131b6573d6000803e3d6000fd5b5050505080846131c69190614146565b93506131da565b6131d781856141d7565b93505b60408051888152602081018390527fa9f3ca5f8a9e1580edb2741e0ba560084ec72e0067ba3423f9e9327a176882db910160405180910390a15b5050808061322190614045565b915050613055565b50806006600082825461323c91906141d7565b90915550506000848152600f60209081526040808320839055600e9091528120611dc891613a14565b61326e83613041565b81516040516339f890b560e21b8152600481018590526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e7e242d490602401602060405180830381865afa1580156132d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132fc919061415e565b90506000806000805b858110156133465786818151811061331f5761331f613ff5565b6020026020010151846133329190614146565b93508061333e81614045565b915050613305565b5060005b858110156135c657600088828151811061336657613366613ff5565b6020908102919091018101516001600160a01b038082166000908152600984526040808220549092168082526011909452205490925060ff16156135b1576001600160a01b03811660009081526013602052604090205460ff166133dc5760405162461bcd60e51b815260040161097790613fac565b600086888b86815181106133f2576133f2613ff5565b602002602001015161340491906140ce565b61340e91906140ac565b60008d8152600d602090815260408083206001600160a01b03881684529091529020549091501561343e57600080fd5b8060000361344b57600080fd5b613454826137dd565b60008c8152600e6020908152604080832080546001810182559084528284200180546001600160a01b0319166001600160a01b0388169081179091558352600c909152812080548392906134a9908490614146565b909155505060008c8152600d602090815260408083206001600160a01b0387168452909152812080548392906134e0908490614146565b90915550506001600160a01b038083166000908152600b60205260409081902054905163f320772360e01b815260048101849052602481018f905291169063f320772390604401600060405180830381600087803b15801561354157600080fd5b505af1158015613555573d6000803e3d6000fd5b5050505080856135659190614146565b94506135718187614146565b604080518e81526020810184905291975033917fea66f58e474bc09f580000e81f31b334d171db387d0c6098ba47bd897741679b910160405180910390a2505b505080806135be90614045565b91505061334a565b5080156136485760405163fd4a77f160e01b8152600481018990527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063fd4a77f190602401600060405180830381600087803b15801561362f57600080fd5b505af1158015613643573d6000803e3d6000fd5b505050505b816006600082825461365a9190614146565b90915550506000978852600f602052604090972096909655505050505050565b6000846001600160a01b03163b1161369157600080fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916136f591906141ee565b6000604051808303816000865af19150503d8060008114613732576040519150601f19603f3d011682016040523d82523d6000602084013e613737565b606091505b50915091508180156137615750805115806137615750808060200190518101906137619190614124565b61100f57600080fd5b6001600160a01b03811660009081526012602052604090205460ff161561379057600080fd5b6001600160a01b038116600081815260126020526040808220805460ff191660011790555133917f6661a7108aecd07864384529117d96c319c1163e3010c01390f6b704726e07de91a350565b6001600160a01b038082166000908152600a6020908152604080832054909316808352600c9091529190205480156138bd576001600160a01b03831660009081526018602052604081208054601754918290559161383b83836141d7565b9050801561100f576000670de0b6b3a764000061385883876140ce565b61386291906140ac565b6001600160a01b03881660009081526013602052604090205490915060ff16156138b4576001600160a01b038716600090815260196020526040812080548392906138ae908490614146565b90915550505b50505050505050565b6017546001600160a01b038416600090815260186020526040902055505050565b6001600160a01b038281166000908152600b6020908152604080832080546001600160a01b031916868616908117909155600a90925291829020549151630ccccab360e11b815260048101919091529116908190631999956690602401600060405180830381600087803b15801561395557600080fd5b505af1925050508015613966575060015b506040516001600160a01b03838116825284169033907ebe62e0582fada1d424f6ac546ee748e1e6066b71cabe22576ef6b8b279cca590602001612242565b6001600160a01b03811660009081526012602052604090205460ff166139ca57600080fd5b6001600160a01b038116600081815260126020526040808220805460ff191690555133917fd36871fdf6981136f3ac0564927005901eda06f7a9dff1e8b2a1d7846b8ebb5091a350565b5080546000825590600052602060002090810190611c1691905b80821115613a425760008155600101613a2e565b5090565b6001600160a01b0381168114611c1657600080fd5b600060208284031215613a6d57600080fd5b8135613a7881613a46565b9392505050565b600060208284031215613a9157600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613ad757613ad7613a98565b604052919050565b600067ffffffffffffffff821115613af957613af9613a98565b5060051b60200190565b600082601f830112613b1457600080fd5b81356020613b29613b2483613adf565b613aae565b82815260059290921b84018101918181019086841115613b4857600080fd5b8286015b84811015613b6c578035613b5f81613a46565b8352918301918301613b4c565b509695505050505050565b600082601f830112613b8857600080fd5b81356020613b98613b2483613adf565b82815260059290921b84018101918181019086841115613bb757600080fd5b8286015b84811015613b6c57803567ffffffffffffffff811115613bdb5760008081fd5b613be98986838b0101613b03565b845250918301918301613bbb565b60008060408385031215613c0a57600080fd5b823567ffffffffffffffff80821115613c2257600080fd5b613c2e86838701613b03565b93506020850135915080821115613c4457600080fd5b50613c5185828601613b77565b9150509250929050565b600080600060608486031215613c7057600080fd5b8335613c7b81613a46565b92506020840135613c8b81613a46565b929592945050506040919091013590565b60008060408385031215613caf57600080fd5b823591506020830135613cc181613a46565b809150509250929050565b60008060408385031215613cdf57600080fd5b823567ffffffffffffffff811115613cf657600080fd5b613d0285828601613b03565b9250506020830135613cc181613a46565b600060208284031215613d2557600080fd5b813567ffffffffffffffff811115613d3c57600080fd5b613d4884828501613b03565b949350505050565b60008060408385031215613d6357600080fd5b8235613d6e81613a46565b91506020830135613cc181613a46565b60008060408385031215613d9157600080fd5b50508035926020909101359150565b600080600060608486031215613db557600080fd5b833567ffffffffffffffff80821115613dcd57600080fd5b613dd987838801613b03565b94506020860135915080821115613def57600080fd5b50613dfc86828701613b77565b925050604084013590509250925092565b60008083601f840112613e1f57600080fd5b50813567ffffffffffffffff811115613e3757600080fd5b6020830191508360208260051b8501011115613e5257600080fd5b9250929050565b600080600080600060608688031215613e7157600080fd5b85359450602086013567ffffffffffffffff80821115613e9057600080fd5b613e9c89838a01613e0d565b90965094506040880135915080821115613eb557600080fd5b50613ec288828901613e0d565b969995985093965092949392505050565b600081518084526020808501945080840160005b83811015613f0c5781516001600160a01b031687529582019590820190600101613ee7565b509495945050505050565b602081526000613a786020830184613ed3565b600080600060608486031215613f3f57600080fd5b833592506020840135613c8b81613a46565b60008060408385031215613f6457600080fd5b8235613f6f81613a46565b946020939093013593505050565b6020808252601590820152741b9bdd08195b595c99d95b98de4818dbdd5b98da5b605a1b604082015260600190565b60208082526012908201527119d85d59d948185b1c9958591e481919585960721b604082015260600190565b600060208284031215613fea57600080fd5b8151613a7881613a46565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0383168152604060208201819052600090613d4890830184613ed3565b634e487b7160e01b600052601160045260246000fd5b6000600182016140575761405761402f565b5060010190565b6020808252601490820152731b9bdd08195b595c99d95b98de50dbdd5b98da5b60621b604082015260600190565b60208082526006908201526506164647220360d41b604082015260600190565b6000826140c957634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156140e8576140e861402f565b500290565b6020808252601e908201527f544f4b454e5f414c52454144595f564f5445445f544849535f45504f43480000604082015260600190565b60006020828403121561413657600080fd5b81518015158114613a7857600080fd5b600082198211156141595761415961402f565b500190565b60006020828403121561417057600080fd5b5051919050565b828152604060208201526000613d486040830184613ed3565b6001600160a01b038681168252858116602083015284166040820152821515606082015260a0608082018190526000906141cc90830184613ed3565b979650505050505050565b6000828210156141e9576141e961402f565b500390565b6000825160005b8181101561420f57602081860181015185830152016141f5565b8181111561421e576000828501525b50919091019291505056fea26469706673582212201e63102ed515111c8005772dde3315d55a6717147db164445afb4e327b9beb1b64736f6c634300080d0033000000000000000000000000ae459ee7377fb9f67518047bba5482c2f0963236000000000000000000000000472f3c3c9608fe0ae8d702f3f8a2d12c410c881a0000000000000000000000008691dc917a50fc0881f9107a5edf4d2605f041ba000000000000000000000000e472002ec1de4eb6b14ba4ee66e345485c2e68d7

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103d05760003560e01c80637778960e116101ff578063ae21c4cb1161011a578063daa168bd116100ad578063e9f6adfa1161007c578063e9f6adfa146108ff578063ea94ee4414610907578063f3594be01461091a578063f9f92be41461093a57600080fd5b8063daa168bd146108c6578063dcd9e47a146108d9578063e4fc6b6d146105c7578063e586875f146108ec57600080fd5b8063c448c78d116100e9578063c448c78d14610878578063cbadada414610880578063d23254b414610888578063d560b0d7146108b357600080fd5b8063ae21c4cb1461080b578063b52a315114610834578063b9a09fd51461083c578063c42cf5351461086557600080fd5b80639fb5dc0511610192578063a86a366d11610161578063a86a366d146107af578063a9b5aa7e146107c2578063aa79979b146107d5578063ac4afa38146107f857600080fd5b80639fb5dc0514610754578063a61c713a14610769578063a7cac8461461077c578063a82029f91461079c57600080fd5b806396c82e57116101ce57806396c82e57146107125780639b19251a1461071b5780639b6a9d721461072e5780639edfd4601461074157600080fd5b80637778960e146106a557806379e93824146106b85780637ac09bf7146106d85780638dd598fb146106eb57600080fd5b8063402914f5116102ef57806363453ae111610282578063698473e311610251578063698473e3146106595780636ecbe38a1461066c5780637625391a1461067f5780637715ee751461069257600080fd5b806363453ae1146105fd5780636566afad14610610578063657021fb14610623578063672383c41461064657600080fd5b806347b3c6ba116102be57806347b3c6ba146105c757806353d78693146105cf578063577387b5146105d75780636138889b146105ea57600080fd5b8063402914f514610579578063411b1f7714610599578063462d0b2e146105ac578063470f4985146105bf57600080fd5b806320b1cb6f1161036757806332145f901161033657806332145f901461051d57806338752a9d146105305780633af32abf146105435780633c6b16ab1461056657600080fd5b806320b1cb6f146104d157806323e1af42146104e457806327e5c823146104f7578063310bd74b1461050a57600080fd5b80630f04ba67116103a35780630f04ba67146104565780631703e5f914610489578063173de600146104ac5780631f7b6d32146104bf57600080fd5b806303c39b00146103d557806306d6a1b2146103ea57806307546172146104305780630c340a2414610443575b600080fd5b6103e86103e3366004613a5b565b61094d565b005b6104136103f8366004613a5b565b600a602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b600354610413906001600160a01b031681565b600454610413906001600160a01b031681565b610479610464366004613a5b565b60146020526000908152604090205460ff1681565b6040519015158152602001610427565b610479610497366004613a5b565b60136020526000908152604090205460ff1681565b6104136104ba366004613a7f565b610ad1565b6007545b604051908152602001610427565b6103e86104df366004613bf7565b610afb565b6104136104f2366004613a7f565b610bb1565b6103e8610505366004613c5b565b610bc1565b6103e8610518366004613a7f565b610eb2565b6103e861052b366004613a7f565b611017565b600254610413906001600160a01b031681565b610479610551366004613a5b565b60126020526000908152604090205460ff1681565b6103e8610574366004613a7f565b611265565b6104c3610587366004613a5b565b60196020526000908152604090205481565b6103e86105a7366004613c9c565b611338565b6103e86105ba366004613ccc565b6113f6565b6000546104c3565b6103e8611471565b6103e8611482565b6103e86105e5366004613a7f565b611491565b6103e86105f8366004613d13565b6116ea565b6103e861060b366004613a5b565b61172e565b6103e861061e366004613d50565b611956565b610479610631366004613a5b565b60156020526000908152604090205460ff1681565b610413610654366004613a7f565b611b07565b6103e8610667366004613c9c565b611b17565b6103e861067a366004613a5b565b611c0d565b6103e861068d366004613d7e565b611c19565b6103e86106a0366004613da0565b611c7f565b600554610413906001600160a01b031681565b6104c36106c6366004613a7f565b600f6020526000908152604090205481565b6103e86106e6366004613e59565b611dce565b6104137f000000000000000000000000ae459ee7377fb9f67518047bba5482c2f096323681565b6104c360065481565b6103e8610729366004613a5b565b611f36565b6103e861073c366004613d7e565b611f56565b6103e861074f366004613a5b565b611fbc565b61075c612169565b6040516104279190613f17565b6103e8610777366004613f2a565b6121cb565b6104c361078a366004613a5b565b600c6020526000908152604090205481565b6103e86107aa366004613a5b565b61224f565b6104136107bd366004613d7e565b6123ea565b6103e86107d0366004613a5b565b612422565b6104796107e3366004613a5b565b60116020526000908152604090205460ff1681565b610413610806366004613a7f565b6124a2565b610413610819366004613a5b565b600b602052600090815260409020546001600160a01b031681565b6001546104c3565b61041361084a366004613a5b565b6009602052600090815260409020546001600160a01b031681565b6103e8610873366004613a5b565b6124b2565b6008546104c3565b61075c6124eb565b6104c3610896366004613c9c565b600d60209081526000928352604080842090915290825290205481565b6103e86108c1366004613d13565b61254b565b6103e86108d4366004613d50565b61258b565b6104136108e7366004613f51565b6125e4565b6103e86108fa366004613a5b565b612f45565b61075c612f7e565b6103e8610915366004613f2a565b612fde565b6104c3610928366004613a7f565b60106020526000908152604090205481565b6103e8610948366004613a5b565b613021565b6005546001600160a01b031633146109805760405162461bcd60e51b815260040161097790613f7d565b60405180910390fd5b6001600160a01b03811660009081526013602052604090205460ff166109b85760405162461bcd60e51b815260040161097790613fac565b6001600160a01b0381166000818152601360209081526040808320805460ff19169055601982528083208390558051633a4b66f160e01b81529051929392633a4b66f1926004808401939192918290030181865afa158015610a1e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a429190613fd8565b6040516305916c7f60e51b8152600060048201529091506001600160a01b0382169063b22d8fe090602401600060405180830381600087803b158015610a8757600080fd5b505af1925050508015610a98575060015b506040516001600160a01b038316907f745308c08240010b7d5acf1a287fddff3bd591868cf1bc876f5f4ce80da4b22790600090a25050565b60088181548110610ae157600080fd5b6000918252602090912001546001600160a01b0316905081565b60005b8251811015610bac57828181518110610b1957610b19613ff5565b60200260200101516001600160a01b03166331279d3d33848481518110610b4257610b42613ff5565b60200260200101516040518363ffffffff1660e01b8152600401610b6792919061400b565b600060405180830381600087803b158015610b8157600080fd5b505af1158015610b95573d6000803e3d6000fd5b505050508080610ba490614045565b915050610afe565b505050565b60018181548110610ae157600080fd5b6005546001600160a01b03163314610beb5760405162461bcd60e51b81526004016109779061405e565b6001600160a01b038316610c115760405162461bcd60e51b81526004016109779061408c565b6001600160a01b038216610c375760405162461bcd60e51b81526004016109779061408c565b60005481108015610c49575060015481105b610c895760405162461bcd60e51b81526020600482015260116024820152705f706f73206f7574206f662072616e676560781b6044820152606401610977565b6001600160a01b03831660009081526014602052604090205460ff16610ce15760405162461bcd60e51b815260206004820152600d60248201526c666163746f72792066616c736560981b6044820152606401610977565b6001600160a01b03821660009081526015602052604090205460ff16610d385760405162461bcd60e51b815260206004820152600c60248201526b672e666163742066616c736560a01b6044820152606401610977565b6000808281548110610d4c57610d4c613ff5565b6000918252602082200154600180546001600160a01b0390921693509084908110610d7957610d79613ff5565b60009182526020808320909101546001600160a01b038581168452601483526040808520805460ff1990811690915591909216808552601590935290832080549091169055815490925086919085908110610dd657610dd6613ff5565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508360018481548110610e1857610e18613ff5565b600091825260208083209190910180546001600160a01b0319166001600160a01b03948516179055878316808352601482526040808420805460ff199081166001908117909255958a168086526015855294829020805490961617909455925186815291929133917f3633a7f9c2b4cc760354edf1370d3cd58da11f6fbf1ef237641548407a4bd6f8910160405180910390a45050505050565b600081815260106020526040902054819062093a80610ed181426140ac565b610edb91906140ce565b11610ef85760405162461bcd60e51b8152600401610977906140ed565b60405163430c208160e01b8152336004820152602481018390527f000000000000000000000000ae459ee7377fb9f67518047bba5482c2f09632366001600160a01b03169063430c208190604401602060405180830381865afa158015610f63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f879190614124565b610f9057600080fd5b610f9982613041565b60405163c1f0fb9f60e01b8152600481018390527f000000000000000000000000ae459ee7377fb9f67518047bba5482c2f09632366001600160a01b03169063c1f0fb9f90602401600060405180830381600087803b158015610ffb57600080fd5b505af115801561100f573d6000803e3d6000fd5b505050505050565b600081815260106020526040902054819062093a8061103681426140ac565b61104091906140ce565b1161105d5760405162461bcd60e51b8152600401610977906140ed565b60405163430c208160e01b8152336004820152602481018390527f000000000000000000000000ae459ee7377fb9f67518047bba5482c2f09632366001600160a01b03169063430c208190604401602060405180830381865afa1580156110c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ec9190614124565b8061110157506004546001600160a01b031633145b61110a57600080fd5b6000828152601060209081526040808320429055600e82528083208054825181850281018501909352808352919290919083018282801561117457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611156575b5050505050905060008151905060008167ffffffffffffffff81111561119c5761119c613a98565b6040519080825280602002602001820160405280156111c5578160200160208202803683370190505b50905060005b8281101561125257600d600087815260200190815260200160002060008583815181106111fa576111fa613ff5565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205482828151811061123557611235613ff5565b60209081029190910101528061124a81614045565b9150506111cb565b5061125e858483613265565b5050505050565b6112917f00000000000000000000000007bb65faac502d4996532f834a1b7ba5dc32ff9633308461367a565b6006546000906112a983670de0b6b3a76400006140ce565b6112b391906140ac565b905080156112d35780601760008282546112cd9190614146565b90915550505b6040518281526001600160a01b037f00000000000000000000000007bb65faac502d4996532f834a1b7ba5dc32ff96169033907ff70d5c697de7ea828df48e5c4573cb2194c659f1901f70110c52b066dcf50826906020015b60405180910390a35050565b81156113b957604051634c35bec560e11b8152600481018390527f000000000000000000000000ae459ee7377fb9f67518047bba5482c2f09632366001600160a01b03169063986b7d8a90602401600060405180830381600087803b1580156113a057600080fd5b505af11580156113b4573d6000803e3d6000fd5b505050505b60405182815233906001600160a01b038316907fae268d9aab12f3605f58efd74fd3801fa812b03fdb44317eb70f46dff0e19e229060200161132c565b6003546001600160a01b0316331461140d57600080fd5b60005b825181101561144d5761143b83828151811061142e5761142e613ff5565b602002602001015161376a565b8061144581614045565b915050611410565b50600380546001600160a01b0319166001600160a01b039290921691909117905550565b60075461148090600090611c19565b565b60075461148090600090611f56565b6005546001600160a01b031633146114bb5760405162461bcd60e51b81526004016109779061405e565b600054811080156114cd575060015481105b61150d5760405162461bcd60e51b81526020600482015260116024820152705f706f73206f7574206f662072616e676560781b6044820152606401610977565b600080828154811061152157611521613ff5565b6000918252602082200154600180546001600160a01b039092169350908490811061154e5761154e613ff5565b60009182526020808320909101546001600160a01b03858116845260149092526040909220549116915060ff166115b75760405162461bcd60e51b815260206004820152600d60248201526c666163746f72792066616c736560981b6044820152606401610977565b6001600160a01b03811660009081526015602052604090205460ff1661160e5760405162461bcd60e51b815260206004820152600c60248201526b672e666163742066616c736560a01b6044820152606401610977565b600080848154811061162257611622613ff5565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060006001848154811061166557611665613ff5565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790558483168252601481526040808320805460ff199081169091559385168352601590915280822080549093169092559051849133917f0b8a5f427e4dc8f150fa67b8072e1e0c1dd5a67cbb3c3e5e99fd9593f814f4129190a3505050565b60005b815181101561172a5761171882828151811061170b5761170b613ff5565b602002602001015161172e565b8061172281614045565b9150506116ed565b5050565b60165460011461173d57600080fd5b60026016556003546040805163ed29fc1160e01b815290516001600160a01b039092169163ed29fc119160048082019260209290919082900301816000875af115801561178e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b2919061415e565b506117bc816137dd565b6001600160a01b0381811660008181526019602052604090819020549051634cde602960e11b81527f00000000000000000000000007bb65faac502d4996532f834a1b7ba5dc32ff969093166004840152916399bcc05290602401602060405180830381865afa158015611834573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611858919061415e565b811180156118725750600061187062093a80836140ac565b115b1561194d576001600160a01b03828116600081815260196020526040808220919091555163b66503cf60e01b81527f00000000000000000000000007bb65faac502d4996532f834a1b7ba5dc32ff969092166004830152602482018390529063b66503cf90604401600060405180830381600087803b1580156118f457600080fd5b505af1158015611908573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507f4fa9693cae526341d334e2862ca2413b2e503f1266255f9e0869fb36e6d89b179060200160405180910390a35b50506001601655565b6005546001600160a01b031633146119805760405162461bcd60e51b81526004016109779061405e565b6001600160a01b0382166119a65760405162461bcd60e51b81526004016109779061408c565b6001600160a01b0381166119cc5760405162461bcd60e51b81526004016109779061408c565b6001600160a01b03811660009081526015602052604090205460ff1615611a235760405162461bcd60e51b815260206004820152600b60248201526a672e66616374207472756560a81b6044820152606401610977565b60008054600181810183557f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56390910180546001600160a01b038087166001600160a01b03199283168117909355835480850185557fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6018054918716919092168117909155818452601460209081526040808620805460ff19908116871790915583875260159092528086208054909216909417905591519192909133917f5af5acd828b04c6899aa8e9823b472c3a176605a47cae52d5acc849a12ab88bc91a45050565b60008181548110610ae157600080fd5b3360009081526011602052604090205460ff16611b3357600080fd5b3360009081526013602052604090205460ff16611b4f57600080fd5b8115611bd05760405163fbd3a29d60e01b8152600481018390527f000000000000000000000000ae459ee7377fb9f67518047bba5482c2f09632366001600160a01b03169063fbd3a29d90602401600060405180830381600087803b158015611bb757600080fd5b505af1158015611bcb573d6000803e3d6000fd5b505050505b60405182815233906001600160a01b038316907f60940192810a6fb3bce3fd3e2e3a13fd6ccc7605e963fb87ee971aba829989bd9060200161132c565b611c16816137dd565b50565b815b81811015610bac57611c6d6009600060078481548110611c3d57611c3d613ff5565b60009182526020808320909101546001600160a01b0390811684529083019390935260409091019020541661172e565b80611c7781614045565b915050611c1b565b60405163430c208160e01b8152336004820152602481018290527f000000000000000000000000ae459ee7377fb9f67518047bba5482c2f09632366001600160a01b03169063430c208190604401602060405180830381865afa158015611cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0e9190614124565b611d1757600080fd5b60005b8351811015611dc857838181518110611d3557611d35613ff5565b60200260200101516001600160a01b031663a7852afa83858481518110611d5e57611d5e613ff5565b60200260200101516040518363ffffffff1660e01b8152600401611d83929190614177565b600060405180830381600087803b158015611d9d57600080fd5b505af1158015611db1573d6000803e3d6000fd5b505050508080611dc090614045565b915050611d1a565b50505050565b600085815260106020526040902054859062093a80611ded81426140ac565b611df791906140ce565b11611e145760405162461bcd60e51b8152600401610977906140ed565b60405163430c208160e01b8152336004820152602481018790527f000000000000000000000000ae459ee7377fb9f67518047bba5482c2f09632366001600160a01b03169063430c208190604401602060405180830381865afa158015611e7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea39190614124565b611eac57600080fd5b838214611eb857600080fd5b6000868152601060209081526040918290204290558151868202818101830190935286815261100f9289928991899182919085019084908082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201919091525061326592505050565b6004546001600160a01b03163314611f4d57600080fd5b611c168161376a565b815b81811015610bac57611faa6009600060078481548110611f7a57611f7a613ff5565b60009182526020808320909101546001600160a01b039081168452908301939093526040909101902054166137dd565b80611fb481614045565b915050611f58565b6005546001600160a01b03163314611fe65760405162461bcd60e51b815260040161097790613f7d565b6001600160a01b03811660009081526013602052604090205460ff1661201e5760405162461bcd60e51b815260040161097790613fac565b6001600160a01b038181166000908152600a60209081526040808320805460138452828520805460ff19908116909155600b855283862080546001600160a01b031990811690915583548116909355601185528386208054909116905560198452828520859055601884528285208590559094168084526009909252808320805490941690935591516305916c7f60e51b81526004810191909152819063b22d8fe090602401600060405180830381600087803b1580156120de57600080fd5b505af19250505080156120ef575060015b506008805460018101825560009182527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b0319166001600160a01b03851690811790915560405190917f3ee2da044873b7ddb31d4960187639074c5137888f359c667b947320284709c391a25050565b606060018054806020026020016040519081016040528092919081815260200182805480156121c157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121a3575b5050505050905090565b3360009081526011602052604090205460ff166121e757600080fd5b3360009081526013602052604090205460ff1661220357600080fd5b604080518481526020810183905233916001600160a01b038516917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d791015b60405180910390a3505050565b6005546001600160a01b031633146122795760405162461bcd60e51b815260040161097790613f7d565b6001600160a01b03811660009081526013602052604090205460ff16156122d85760405162461bcd60e51b8152602060048201526013602482015272676175676520616c726561647920616c69766560681b6044820152606401610977565b6001600160a01b0381166000818152601360209081526040808320805460ff191660011790558051633a4b66f160e01b81529051929392633a4b66f1926004808401939192918290030181865afa158015612337573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235b9190613fd8565b6040516305916c7f60e51b8152600160048201529091506001600160a01b0382169063b22d8fe090602401600060405180830381600087803b1580156123a057600080fd5b505af19250505080156123b1575060015b506040516001600160a01b038316907f3b8274015fe59b73ee1fb9c5d7ad25a8f253dc8d45ebd178bfef3295240fcabd90600090a25050565b600e602052816000526040600020818154811061240657600080fd5b6000918252602090912001546001600160a01b03169150829050565b6005546001600160a01b0316331461244c5760405162461bcd60e51b81526004016109779061405e565b600280546001600160a01b0319166001600160a01b03831690811790915560405190815233907f557e0f02d402561222ba54007de263881f84edad9a3877340d06e330e3400fa89060200160405180910390a250565b60078181548110610ae157600080fd5b6004546001600160a01b031633146124c957600080fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b606060088054806020026020016040519081016040528092919081815260200182805480156121c1576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116121a3575050505050905090565b60005b815181101561172a5761257982828151811061256c5761256c613ff5565b60200260200101516137dd565b8061258381614045565b91505061254e565b6005546001600160a01b031633146125b55760405162461bcd60e51b81526004016109779061405e565b6001600160a01b03821660009081526011602052604090205460ff166125da57600080fd5b61172a82826138de565b6000805482106126265760405162461bcd60e51b815260206004820152600d60248201526c6761756765747970652062696760981b6044820152606401610977565b6001600160a01b0383811660009081526009602052604090205416156126775760405162461bcd60e51b815260206004820152600660248201526565786973747360d01b6044820152606401610977565b604080516003808252608082019092526000916020820160608036833750506040805160028082526060820183529394506000939092509060208301908036833701905050905060008060008087815481106126d5576126d5613ff5565b6000918252602082200154600180546001600160a01b039092169350908990811061270257612702613ff5565b6000918252602090912001546001600160a01b039081169150821661272657600080fd5b6001600160a01b03811661273957600080fd5b60405163e5e31b1360e01b81526001600160a01b038a811660048301526000919084169063e5e31b1390602401602060405180830381865afa158015612783573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127a79190614124565b90508015612a0157896001600160a01b0316630dfe16816040518163ffffffff1660e01b81526004016020604051808303816000875af11580156127ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128139190613fd8565b9450896001600160a01b031663d21220a76040518163ffffffff1660e01b81526004016020604051808303816000875af1158015612855573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128799190613fd8565b9350848760008151811061288f5761288f613ff5565b60200260200101906001600160a01b031690816001600160a01b03168152505083876001815181106128c3576128c3613ff5565b60200260200101906001600160a01b031690816001600160a01b03168152505084866000815181106128f7576128f7613ff5565b60200260200101906001600160a01b031690816001600160a01b031681525050838660018151811061292b5761292b613ff5565b6001600160a01b0392831660209182029290920101527f00000000000000000000000007bb65faac502d4996532f834a1b7ba5dc32ff968116908616148015906129a75750836001600160a01b03167f00000000000000000000000007bb65faac502d4996532f834a1b7ba5dc32ff966001600160a01b031614155b15612a01577f00000000000000000000000007bb65faac502d4996532f834a1b7ba5dc32ff96876002815181106129e0576129e0613ff5565b60200260200101906001600160a01b031690816001600160a01b0316815250505b6004546001600160a01b03163314801590612a2757506005546001600160a01b03163314155b15612add5780612a625760405162461bcd60e51b81526020600482015260066024820152650857dc1bdbdb60d21b6044820152606401610977565b6001600160a01b03851660009081526012602052604090205460ff168015612aa257506001600160a01b03841660009081526012602052604090205460ff165b612add5760405162461bcd60e51b815260206004820152600c60248201526b085dda1a5d195b1a5cdd195960a21b6044820152606401610977565b6002546040516319217c3160e21b81526000916001600160a01b031690636485f0c490612b0e908b90600401613f17565b6020604051808303816000875af1158015612b2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b519190613fd8565b90506000836001600160a01b0316631ede5a8e8d847f000000000000000000000000ae459ee7377fb9f67518047bba5482c2f0963236878e6040518663ffffffff1660e01b8152600401612ba9959493929190614190565b6020604051808303816000875af1158015612bc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bec9190613fd8565b60405163095ea7b360e01b81526001600160a01b03808316600483015260001960248301529192507f00000000000000000000000007bb65faac502d4996532f834a1b7ba5dc32ff969091169063095ea7b3906044016020604051808303816000875af1158015612c61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c859190614124565b5081600b6000836001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080600960008e6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055508b600a6000836001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600160116000836001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550600160136000836001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550612de9816137dd565b600780546001810182556000919091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b0319166001600160a01b038e161790558215612ef0576040516305916c7f60e51b8152600160048201526001600160a01b038d169063b22d8fe090602401600060405180830381600087803b158015612e7c57600080fd5b505af1158015612e90573d6000803e3d6000fd5b5050604051630ccccab360e11b81526001600160a01b0385811660048301528f16925063199995669150602401600060405180830381600087803b158015612ed757600080fd5b505af1158015612eeb573d6000803e3d6000fd5b505050505b6040513381526001600160a01b03808e1691848216918416907f48d3c521fd0d5541640f58c6d6381eed7cb2e8c9df421ae165a4f4c2d221ee0d9060200160405180910390a49b9a5050505050505050505050565b6004546001600160a01b03163314612f5c57600080fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b606060008054806020026020016040519081016040528092919081815260200182805480156121c1576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116121a3575050505050905090565b604080518481526020810183905233916001600160a01b038516917ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5679101612242565b6004546001600160a01b0316331461303857600080fd5b611c16816139a5565b6000818152600e6020526040812080549091805b8281101561322957600084828154811061307157613071613ff5565b6000918252602080832090910154888352600d825260408084206001600160a01b03909216808552919092529120549091508015613214576001600160a01b038083166000908152600960205260409020546130cd91166137dd565b6001600160a01b0382166000908152600c6020526040812080548392906130f59084906141d7565b90915550506000878152600d602090815260408083206001600160a01b03861684529091528120805483929061312c9084906141d7565b909155505080156131cd576001600160a01b0382811660009081526009602090815260408083205484168352600b9091529081902054905163278afc8b60e21b815260048101849052602481018a9052911690639e2bf22c90604401600060405180830381600087803b1580156131a257600080fd5b505af11580156131b6573d6000803e3d6000fd5b5050505080846131c69190614146565b93506131da565b6131d781856141d7565b93505b60408051888152602081018390527fa9f3ca5f8a9e1580edb2741e0ba560084ec72e0067ba3423f9e9327a176882db910160405180910390a15b5050808061322190614045565b915050613055565b50806006600082825461323c91906141d7565b90915550506000848152600f60209081526040808320839055600e9091528120611dc891613a14565b61326e83613041565b81516040516339f890b560e21b8152600481018590526000907f000000000000000000000000ae459ee7377fb9f67518047bba5482c2f09632366001600160a01b03169063e7e242d490602401602060405180830381865afa1580156132d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132fc919061415e565b90506000806000805b858110156133465786818151811061331f5761331f613ff5565b6020026020010151846133329190614146565b93508061333e81614045565b915050613305565b5060005b858110156135c657600088828151811061336657613366613ff5565b6020908102919091018101516001600160a01b038082166000908152600984526040808220549092168082526011909452205490925060ff16156135b1576001600160a01b03811660009081526013602052604090205460ff166133dc5760405162461bcd60e51b815260040161097790613fac565b600086888b86815181106133f2576133f2613ff5565b602002602001015161340491906140ce565b61340e91906140ac565b60008d8152600d602090815260408083206001600160a01b03881684529091529020549091501561343e57600080fd5b8060000361344b57600080fd5b613454826137dd565b60008c8152600e6020908152604080832080546001810182559084528284200180546001600160a01b0319166001600160a01b0388169081179091558352600c909152812080548392906134a9908490614146565b909155505060008c8152600d602090815260408083206001600160a01b0387168452909152812080548392906134e0908490614146565b90915550506001600160a01b038083166000908152600b60205260409081902054905163f320772360e01b815260048101849052602481018f905291169063f320772390604401600060405180830381600087803b15801561354157600080fd5b505af1158015613555573d6000803e3d6000fd5b5050505080856135659190614146565b94506135718187614146565b604080518e81526020810184905291975033917fea66f58e474bc09f580000e81f31b334d171db387d0c6098ba47bd897741679b910160405180910390a2505b505080806135be90614045565b91505061334a565b5080156136485760405163fd4a77f160e01b8152600481018990527f000000000000000000000000ae459ee7377fb9f67518047bba5482c2f09632366001600160a01b03169063fd4a77f190602401600060405180830381600087803b15801561362f57600080fd5b505af1158015613643573d6000803e3d6000fd5b505050505b816006600082825461365a9190614146565b90915550506000978852600f602052604090972096909655505050505050565b6000846001600160a01b03163b1161369157600080fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916136f591906141ee565b6000604051808303816000865af19150503d8060008114613732576040519150601f19603f3d011682016040523d82523d6000602084013e613737565b606091505b50915091508180156137615750805115806137615750808060200190518101906137619190614124565b61100f57600080fd5b6001600160a01b03811660009081526012602052604090205460ff161561379057600080fd5b6001600160a01b038116600081815260126020526040808220805460ff191660011790555133917f6661a7108aecd07864384529117d96c319c1163e3010c01390f6b704726e07de91a350565b6001600160a01b038082166000908152600a6020908152604080832054909316808352600c9091529190205480156138bd576001600160a01b03831660009081526018602052604081208054601754918290559161383b83836141d7565b9050801561100f576000670de0b6b3a764000061385883876140ce565b61386291906140ac565b6001600160a01b03881660009081526013602052604090205490915060ff16156138b4576001600160a01b038716600090815260196020526040812080548392906138ae908490614146565b90915550505b50505050505050565b6017546001600160a01b038416600090815260186020526040902055505050565b6001600160a01b038281166000908152600b6020908152604080832080546001600160a01b031916868616908117909155600a90925291829020549151630ccccab360e11b815260048101919091529116908190631999956690602401600060405180830381600087803b15801561395557600080fd5b505af1925050508015613966575060015b506040516001600160a01b03838116825284169033907ebe62e0582fada1d424f6ac546ee748e1e6066b71cabe22576ef6b8b279cca590602001612242565b6001600160a01b03811660009081526012602052604090205460ff166139ca57600080fd5b6001600160a01b038116600081815260126020526040808220805460ff191690555133917fd36871fdf6981136f3ac0564927005901eda06f7a9dff1e8b2a1d7846b8ebb5091a350565b5080546000825590600052602060002090810190611c1691905b80821115613a425760008155600101613a2e565b5090565b6001600160a01b0381168114611c1657600080fd5b600060208284031215613a6d57600080fd5b8135613a7881613a46565b9392505050565b600060208284031215613a9157600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613ad757613ad7613a98565b604052919050565b600067ffffffffffffffff821115613af957613af9613a98565b5060051b60200190565b600082601f830112613b1457600080fd5b81356020613b29613b2483613adf565b613aae565b82815260059290921b84018101918181019086841115613b4857600080fd5b8286015b84811015613b6c578035613b5f81613a46565b8352918301918301613b4c565b509695505050505050565b600082601f830112613b8857600080fd5b81356020613b98613b2483613adf565b82815260059290921b84018101918181019086841115613bb757600080fd5b8286015b84811015613b6c57803567ffffffffffffffff811115613bdb5760008081fd5b613be98986838b0101613b03565b845250918301918301613bbb565b60008060408385031215613c0a57600080fd5b823567ffffffffffffffff80821115613c2257600080fd5b613c2e86838701613b03565b93506020850135915080821115613c4457600080fd5b50613c5185828601613b77565b9150509250929050565b600080600060608486031215613c7057600080fd5b8335613c7b81613a46565b92506020840135613c8b81613a46565b929592945050506040919091013590565b60008060408385031215613caf57600080fd5b823591506020830135613cc181613a46565b809150509250929050565b60008060408385031215613cdf57600080fd5b823567ffffffffffffffff811115613cf657600080fd5b613d0285828601613b03565b9250506020830135613cc181613a46565b600060208284031215613d2557600080fd5b813567ffffffffffffffff811115613d3c57600080fd5b613d4884828501613b03565b949350505050565b60008060408385031215613d6357600080fd5b8235613d6e81613a46565b91506020830135613cc181613a46565b60008060408385031215613d9157600080fd5b50508035926020909101359150565b600080600060608486031215613db557600080fd5b833567ffffffffffffffff80821115613dcd57600080fd5b613dd987838801613b03565b94506020860135915080821115613def57600080fd5b50613dfc86828701613b77565b925050604084013590509250925092565b60008083601f840112613e1f57600080fd5b50813567ffffffffffffffff811115613e3757600080fd5b6020830191508360208260051b8501011115613e5257600080fd5b9250929050565b600080600080600060608688031215613e7157600080fd5b85359450602086013567ffffffffffffffff80821115613e9057600080fd5b613e9c89838a01613e0d565b90965094506040880135915080821115613eb557600080fd5b50613ec288828901613e0d565b969995985093965092949392505050565b600081518084526020808501945080840160005b83811015613f0c5781516001600160a01b031687529582019590820190600101613ee7565b509495945050505050565b602081526000613a786020830184613ed3565b600080600060608486031215613f3f57600080fd5b833592506020840135613c8b81613a46565b60008060408385031215613f6457600080fd5b8235613f6f81613a46565b946020939093013593505050565b6020808252601590820152741b9bdd08195b595c99d95b98de4818dbdd5b98da5b605a1b604082015260600190565b60208082526012908201527119d85d59d948185b1c9958591e481919585960721b604082015260600190565b600060208284031215613fea57600080fd5b8151613a7881613a46565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0383168152604060208201819052600090613d4890830184613ed3565b634e487b7160e01b600052601160045260246000fd5b6000600182016140575761405761402f565b5060010190565b6020808252601490820152731b9bdd08195b595c99d95b98de50dbdd5b98da5b60621b604082015260600190565b60208082526006908201526506164647220360d41b604082015260600190565b6000826140c957634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156140e8576140e861402f565b500290565b6020808252601e908201527f544f4b454e5f414c52454144595f564f5445445f544849535f45504f43480000604082015260600190565b60006020828403121561413657600080fd5b81518015158114613a7857600080fd5b600082198211156141595761415961402f565b500190565b60006020828403121561417057600080fd5b5051919050565b828152604060208201526000613d486040830184613ed3565b6001600160a01b038681168252858116602083015284166040820152821515606082015260a0608082018190526000906141cc90830184613ed3565b979650505050505050565b6000828210156141e9576141e961402f565b500390565b6000825160005b8181101561420f57602081860181015185830152016141f5565b8181111561421e576000828501525b50919091019291505056fea26469706673582212201e63102ed515111c8005772dde3315d55a6717147db164445afb4e327b9beb1b64736f6c634300080d0033

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

000000000000000000000000ae459ee7377fb9f67518047bba5482c2f0963236000000000000000000000000472f3c3c9608fe0ae8d702f3f8a2d12c410c881a0000000000000000000000008691dc917a50fc0881f9107a5edf4d2605f041ba000000000000000000000000e472002ec1de4eb6b14ba4ee66e345485c2e68d7

-----Decoded View---------------
Arg [0] : __ve (address): 0xAE459eE7377Fb9F67518047BBA5482C2F0963236
Arg [1] : _factory (address): 0x472f3C3c9608fe0aE8d702f3f8A2d12c410C881A
Arg [2] : _gauges (address): 0x8691dc917a50FC0881f9107A5Edf4D2605F041bA
Arg [3] : _bribes (address): 0xe472002ec1de4EB6b14BA4eE66e345485c2E68d7

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000ae459ee7377fb9f67518047bba5482c2f0963236
Arg [1] : 000000000000000000000000472f3c3c9608fe0ae8d702f3f8a2d12c410c881a
Arg [2] : 0000000000000000000000008691dc917a50fc0881f9107a5edf4d2605f041ba
Arg [3] : 000000000000000000000000e472002ec1de4eb6b14ba4ee66e345485c2e68d7


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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