Contract 0x09236cff45047dbee6b921e00704bed6d6b8cf7e 18

 
Txn Hash Method
Block
From
To
Value
0x64e8e3903f8491b67fe1cdb9c8b718ad6e5966a08ee0e0377026dbea721eded6Reset1167183522024-02-27 12:04:411 hr 24 mins ago0x6afbc428dcde09679592b330a9164247e9614bd3 IN  Velodrome Finance: Voter0 ETH0.000073455380.00886244
0x0d4378c0385dee1663e720d7ed77979250e4a70d9b5055ade39fdafb24086202Reset1167063292024-02-27 5:23:558 hrs 5 mins ago0x58963127ba44077e936a8aa6462f9d6e45b38498 IN  Velodrome Finance: Voter0 ETH0.0001005004010.100098079
0x4640663a194cbef60732bff2f026aa14ba30dd04e6395c5f7719a0a2952dcb30Reset1167003232024-02-27 2:03:4311 hrs 25 mins ago0x92d0996e3f19d4b4a56754043f79e174c30be515 IN  Velodrome Finance: Voter0 ETH0.0000777351550.1
0x388eaf75f7fa287c2e1cf5517208baa185b3f14b24ccf5603ea091379b9c3ecdReset1167002492024-02-27 2:01:1511 hrs 28 mins ago0x92d0996e3f19d4b4a56754043f79e174c30be515 IN  Velodrome Finance: Voter0 ETH0.0000581537980.002028219
0x7531a0c893b067645aa1df011fcdbd464dfce47c58b7f497d0af686964bee4a2Reset1167001642024-02-27 1:58:2511 hrs 31 mins ago0x92d0996e3f19d4b4a56754043f79e174c30be515 IN  Velodrome Finance: Voter0 ETH0.0000508151840.002027674
0xd5f950fc369273b56a44305c845cacfbc7c679943f8ebd5aac0c915dcb1716d3Reset1167001342024-02-27 1:57:2511 hrs 32 mins ago0x92d0996e3f19d4b4a56754043f79e174c30be515 IN  Velodrome Finance: Voter0 ETH0.0000494186010.001825801
0x17ac21751b62b458cbd409b7e373e4f20d5fe0d80cdf0c637cfe7cb0a40fd61fReset1167001092024-02-27 1:56:3511 hrs 32 mins ago0x92d0996e3f19d4b4a56754043f79e174c30be515 IN  Velodrome Finance: Voter0 ETH0.0000553162390.00191006
0x14331c52d465d7ddb65fef871cf717c42aa18d309b2f676f62a093f6b70330fdReset1166930352024-02-26 22:00:4715 hrs 28 mins ago0x9d3dcc92b19eb66ae50e3b9a9b6efc44a0e3d34d IN  Velodrome Finance: Voter0 ETH0.0000707796460.003234947
0xd944bc4066339815bd3b918f5e7e4b5f4540266540e4afa3093f9d49da9e0425Reset1166273842024-02-25 9:32:252 days 3 hrs ago0xf2247702f152adf9161cd23cfaf24be7248444e3 IN  Velodrome Finance: Voter0 ETH0.0000385667420.0041656
0x436a1236a998a6eebd9fd98ca2aabe29a4c94e5ab5c4958aff0e7e6420ba9fb2Reset1165923492024-02-24 14:04:352 days 23 hrs ago0xa4491dbd3e3fe175633e186f6549e56cdc3fdecf IN  Velodrome Finance: Voter0 ETH0.0000496132210.003545483
0x6a653fc628e10e8471809b68de3e535f4e9e96a44e55bc017fe5df83d8d1640bReset1165829562024-02-24 8:51:293 days 4 hrs ago0x3432f2e175b57c904058a90528201280414ecce7 IN  Velodrome Finance: Voter0 ETH0.0000451428780.003096917
0x7c48d85a1d23bed00e88e00a30d408d535d01c750364d6b286430e6506ba7d66Reset1165558262024-02-23 17:47:093 days 19 hrs ago0x25c54bc2fa1e05e20ad8b720a2488eee91fafa5f IN  Velodrome Finance: Voter0 ETH0.000053903350.003563335
0x33040dccd1209c428b2c7855999fecfa03f2d5d3452d36c6122bcc25b0d3b935Reset1165557842024-02-23 17:45:453 days 19 hrs ago0x25c54bc2fa1e05e20ad8b720a2488eee91fafa5f IN  Velodrome Finance: Voter0 ETH0.0000594316620.003392204
0x50ca8d654091037e24b21b218b82d922a925150781be4176961bd393470357c6Reset1165557312024-02-23 17:43:593 days 19 hrs ago0x25c54bc2fa1e05e20ad8b720a2488eee91fafa5f IN  Velodrome Finance: Voter0 ETH0.0000607433030.003397697
0xda4a383f928bbf22246bdc6613537ad6b3af8bc040ec725ca6a558c0e3729a90Reset1165556552024-02-23 17:41:273 days 19 hrs ago0x25c54bc2fa1e05e20ad8b720a2488eee91fafa5f IN  Velodrome Finance: Voter0 ETH0.0000559045870.003388112
0x3f5bd1dc844e27e8c982541417a381565a4deab68c9cca76ba5682f08c4e1c9bReset1165521002024-02-23 15:42:573 days 21 hrs ago0x7eb71d68181f2d219eef78d834f6ba97d870ae85 IN  Velodrome Finance: Voter0 ETH0.0000930994330.003925566
0xb0eb543fe726202fd63fcd79f27d3193e86a2f8646d8748f4535bf489635862cReset1164867832024-02-22 3:25:435 days 10 hrs ago0x8b2d0db8c7ed1656b9b126069e869bd28407ffe9 IN  Velodrome Finance: Voter0 ETH0.0000535782840.0037294
0xfff0abdc5c9be700df6fe5bfc9e31442a5ed0906de002ebca234b98bb345f258Distribute1164809872024-02-22 0:12:315 days 13 hrs ago0x667edde578ba64b5d9deeaf3db6d46506460a7a7 IN  Velodrome Finance: Voter0 ETH0.0000633020930.003044022
0x4c755006375e616303da078b4529b2b7681cbf94f7676cfa99854258a46eb070Distribute1164809822024-02-22 0:12:215 days 13 hrs ago0x667edde578ba64b5d9deeaf3db6d46506460a7a7 IN  Velodrome Finance: Voter0 ETH0.0000674631090.003063181
0xeb4742856cd1c9a75eda1beecd5094efa55ff4f21b0850d49d4b1c62f358ead3Distribute1164809762024-02-22 0:12:095 days 13 hrs ago0x667edde578ba64b5d9deeaf3db6d46506460a7a7 IN  Velodrome Finance: Voter0 ETH0.0000611603020.003063353
0xd43109a39bf43c913b81ab2e1aed41700f3a38880a75ada85e552a4d48e77d01Distribute1164809702024-02-22 0:11:575 days 13 hrs ago0x667edde578ba64b5d9deeaf3db6d46506460a7a7 IN  Velodrome Finance: Voter0 ETH0.000063831820.003065327
0x05d8d4b3fd619610aebee65f4b5cf4f5abc202b945f9dc14a3bf0d862449828dDistribute1164809652024-02-22 0:11:475 days 13 hrs ago0x667edde578ba64b5d9deeaf3db6d46506460a7a7 IN  Velodrome Finance: Voter0 ETH0.0000661610130.003053757
0xce33c00798ed580490c61c09bf150f93551742922533a558b832afcd5a150f85Distribute1164809642024-02-22 0:11:455 days 13 hrs ago0x667edde578ba64b5d9deeaf3db6d46506460a7a7 IN  Velodrome Finance: Voter0 ETH0.0000673578880.003059879
0x91bcd56d3532ef2719740399df70fc17bc6aa99538547189623d4cc8e0f91957Distribute1164809592024-02-22 0:11:355 days 13 hrs ago0x667edde578ba64b5d9deeaf3db6d46506460a7a7 IN  Velodrome Finance: Voter0 ETH0.0000708744960.003052271
0xe12ffad71a13fc0048a4cbb0e589f76b5fc61190dae231b89ff4a574886c7435Distribute1164809582024-02-22 0:11:335 days 13 hrs ago0x667edde578ba64b5d9deeaf3db6d46506460a7a7 IN  Velodrome Finance: Voter0 ETH0.0000664371650.003058039
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xd8f8aff1e90f601709d3cdc9163954cc84e30c1d835094baf767c78a7536e0c31075583062023-07-30 11:09:49212 days 2 hrs ago Velodrome Finance: Voter 0x28786388d30e322bffbaff851c6fac958963b43d0 ETH
0xd8f8aff1e90f601709d3cdc9163954cc84e30c1d835094baf767c78a7536e0c31075583062023-07-30 11:09:49212 days 2 hrs ago Velodrome Finance: Voter 0x57224625f2f91a2f29767d1bb6eebe286d49d00d0 ETH
0xd8f8aff1e90f601709d3cdc9163954cc84e30c1d835094baf767c78a7536e0c31075583062023-07-30 11:09:49212 days 2 hrs ago Velodrome Finance: Voter 0x0e2d3f170c82cae9ab47102ea8aac392fa36838f0 ETH
0xd8f8aff1e90f601709d3cdc9163954cc84e30c1d835094baf767c78a7536e0c31075583062023-07-30 11:09:49212 days 2 hrs ago Velodrome Finance: Voter Velodrome Finance: veNFT Token0 ETH
0x247469a9352a4426649c8385515420498f6e9b7e056b47842ad4a6e2d3e502791075582992023-07-30 11:09:35212 days 2 hrs ago Velodrome Finance: Voter 0x4022e57784b2ff8dcee839c16161f283223ae87b0 ETH
0x247469a9352a4426649c8385515420498f6e9b7e056b47842ad4a6e2d3e502791075582992023-07-30 11:09:35212 days 2 hrs ago Velodrome Finance: Voter 0x3eff6dec1e223960a9302ff811026ae93c7374980 ETH
0x247469a9352a4426649c8385515420498f6e9b7e056b47842ad4a6e2d3e502791075582992023-07-30 11:09:35212 days 2 hrs ago Velodrome Finance: Voter Velodrome Finance: veNFT Token0 ETH
0x90e4f4ea4ecfc08e19108b1314f730575b070931e44b141c68a79701b8d70cc11075582162023-07-30 11:06:49212 days 2 hrs ago Velodrome Finance: Voter Velodrome Finance: veNFT Token0 ETH
0x90e4f4ea4ecfc08e19108b1314f730575b070931e44b141c68a79701b8d70cc11075582162023-07-30 11:06:49212 days 2 hrs ago Velodrome Finance: Voter 0x42ea76108c3cf6614153c7ac0239678753d880460 ETH
0x90e4f4ea4ecfc08e19108b1314f730575b070931e44b141c68a79701b8d70cc11075582162023-07-30 11:06:49212 days 2 hrs ago Velodrome Finance: Voter 0x28786388d30e322bffbaff851c6fac958963b43d0 ETH
0x90e4f4ea4ecfc08e19108b1314f730575b070931e44b141c68a79701b8d70cc11075582162023-07-30 11:06:49212 days 2 hrs ago Velodrome Finance: Voter 0x4ae8a7351f7e85151f8967454e4258dc0ea5e5ea0 ETH
0x90e4f4ea4ecfc08e19108b1314f730575b070931e44b141c68a79701b8d70cc11075582162023-07-30 11:06:49212 days 2 hrs ago Velodrome Finance: Voter 0x0e2d3f170c82cae9ab47102ea8aac392fa36838f0 ETH
0x90e4f4ea4ecfc08e19108b1314f730575b070931e44b141c68a79701b8d70cc11075582162023-07-30 11:06:49212 days 2 hrs ago Velodrome Finance: Voter0x058371ff2f18c2fe87d71aefdc7284bfd09a12580 ETH
0x90e4f4ea4ecfc08e19108b1314f730575b070931e44b141c68a79701b8d70cc11075582162023-07-30 11:06:49212 days 2 hrs ago Velodrome Finance: Voter 0x57224625f2f91a2f29767d1bb6eebe286d49d00d0 ETH
0x90e4f4ea4ecfc08e19108b1314f730575b070931e44b141c68a79701b8d70cc11075582162023-07-30 11:06:49212 days 2 hrs ago Velodrome Finance: Voter Velodrome Finance: veNFT Token0 ETH
0xf7b422d5e7643f1faea244a614eae2a109116bcd111cd9e8fcce234be66620811075579072023-07-30 10:56:31212 days 2 hrs ago Velodrome Finance: Voter Velodrome Finance: veNFT Token0 ETH
0xf7b422d5e7643f1faea244a614eae2a109116bcd111cd9e8fcce234be66620811075579072023-07-30 10:56:31212 days 2 hrs ago Velodrome Finance: Voter 0x91cfd7430e3de1f388aa30be2b82a95b00a5f07a0 ETH
0xf7b422d5e7643f1faea244a614eae2a109116bcd111cd9e8fcce234be66620811075579072023-07-30 10:56:31212 days 2 hrs ago Velodrome Finance: Voter 0xb768a1bd8385c1ceb11960fe381ce3212ab09ac10 ETH
0xf7b422d5e7643f1faea244a614eae2a109116bcd111cd9e8fcce234be66620811075579072023-07-30 10:56:31212 days 2 hrs ago Velodrome Finance: Voter Velodrome Finance: veNFT Token0 ETH
0xf7b422d5e7643f1faea244a614eae2a109116bcd111cd9e8fcce234be66620811075579072023-07-30 10:56:31212 days 2 hrs ago Velodrome Finance: Voter 0x91cfd7430e3de1f388aa30be2b82a95b00a5f07a0 ETH
0xf7b422d5e7643f1faea244a614eae2a109116bcd111cd9e8fcce234be66620811075579072023-07-30 10:56:31212 days 2 hrs ago Velodrome Finance: Voter 0xb768a1bd8385c1ceb11960fe381ce3212ab09ac10 ETH
0xf7b422d5e7643f1faea244a614eae2a109116bcd111cd9e8fcce234be66620811075579072023-07-30 10:56:31212 days 2 hrs ago Velodrome Finance: Sink Manager V2 Velodrome Finance: Voter0 ETH
0xafabba0b31017fd0ba5d853725ecea2dd39bee5df342d33fc4a58101b8c054131075578842023-07-30 10:55:45212 days 2 hrs ago Velodrome Finance: Voter Velodrome Finance: veNFT Token0 ETH
0xafabba0b31017fd0ba5d853725ecea2dd39bee5df342d33fc4a58101b8c054131075578842023-07-30 10:55:45212 days 2 hrs ago Velodrome Finance: Voter0xb345cd7215ca9cf5c1989646bf9ff6be6cc766780 ETH
0xafabba0b31017fd0ba5d853725ecea2dd39bee5df342d33fc4a58101b8c054131075578842023-07-30 10:55:45212 days 2 hrs ago Velodrome Finance: Voter0xa7d66ddc6c2a5c4553bd8de306b0f56ca492365b0 ETH
[ Download CSV Export 
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 'contracts/libraries/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 public immutable factory; // the PairFactory
    address internal immutable base;
    address public immutable gaugefactory;
    address public immutable 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
    mapping(address => address) public gauges; // pool => gauge
    mapping(address => address) public poolForGauge; // gauge => pool
    mapping(address => address) public internal_bribes; // gauge => internal bribe (only fees)
    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;

    event GaugeCreated(address indexed gauge, address creator, address internal_bribe, address indexed external_bribe, address indexed pool);
    event GaugeKilled(address indexed gauge);
    event GaugeRevived(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);

    constructor(address __ve, address _factory, address  _gauges, address _bribes) {
        _ve = __ve;
        factory = _factory;
        base = IVotingEscrow(__ve).token();
        gaugefactory = _gauges;
        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");
        _;
    }

    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 == emergencyCouncil);
        emergencyCouncil = _council;
    }

    function reset(uint _tokenId) external onlyNewEpoch(_tokenId) {
        require(IVotingEscrow(_ve).isApprovedOrOwner(msg.sender, _tokenId));
        lastVoted[_tokenId] = block.timestamp;
        _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(internal_bribes[gauges[_pool]])._withdraw(uint256(_votes), _tokenId);
                    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 {
        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]) {
                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(internal_bribes[_gauge])._deposit(uint256(_poolWeight), _tokenId);
                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 createGauge(address _pool) external returns (address) {
        require(gauges[_pool] == address(0x0), "exists");
        address[] memory allowedRewards = new address[](3);
        address[] memory internalRewards = new address[](2);
        bool isPair = IPairFactory(factory).isPair(_pool);
        address tokenA;
        address tokenB;

        if (isPair) {
            (tokenA, tokenB) = IPair(_pool).tokens();
            allowedRewards[0] = tokenA;
            allowedRewards[1] = tokenB;
            internalRewards[0] = tokenA;
            internalRewards[1] = tokenB;

            if (base != tokenA && base != tokenB) {
              allowedRewards[2] = base;
            }
        }

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

        address _internal_bribe = IBribeFactory(bribefactory).createInternalBribe(internalRewards);
        address _external_bribe = IBribeFactory(bribefactory).createExternalBribe(allowedRewards);
        address _gauge = IGaugeFactory(gaugefactory).createGauge(_pool, _internal_bribe, _external_bribe, _ve, isPair, allowedRewards);

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

    function killGauge(address _gauge) external {
        require(msg.sender == emergencyCouncil, "not emergency council");
        require(isAlive[_gauge], "gauge already dead");
        isAlive[_gauge] = false;
        claimable[_gauge] = 0;
        emit GaugeKilled(_gauge);
    }

    function reviveGauge(address _gauge) external {
        require(msg.sender == emergencyCouncil, "not emergency council");
        require(!isAlive[_gauge], "gauge already alive");
        isAlive[_gauge] = true;
        emit GaugeRevived(_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 {
        require(isGauge[msg.sender]);
        if (tokenId > 0) IVotingEscrow(_ve).detach(tokenId);
        emit Detach(account, msg.sender, tokenId);
    }

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

    function length() external view returns (uint) {
        return pools.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 claimFees(address[] memory _fees, address[][] memory _tokens, uint _tokenId) external {
        require(IVotingEscrow(_ve).isApprovedOrOwner(msg.sender, _tokenId));
        for (uint i = 0; i < _fees.length; i++) {
            IBribe(_fees[i]).getRewardForOwner(_tokenId, _tokens[i]);
        }
    }

    function distributeFees(address[] memory _gauges) external {
        for (uint i = 0; i < _gauges.length; i++) {
            if (IGauge(_gauges[i]).isForPair()){
                IGauge(_gauges[i]).claimFees();
            }
        }
    }

    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
pragma solidity 0.8.13;

library Math {
    function max(uint a, uint b) internal pure returns (uint) {
        return a >= b ? a : b;
    }
    function min(uint a, uint b) internal pure returns (uint) {
        return a < b ? a : b;
    }
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
    function cbrt(uint256 n) internal pure returns (uint256) { unchecked {
        uint256 x = 0;
        for (uint256 y = 1 << 255; y > 0; y >>= 3) {
            x <<= 1;
            uint256 z = 3 * x * (x + 1) + 1;
            if (n / y >= z) {
                n -= y * z;
                x += 1;
            }
        }
        return x;
    }}
}

File 3 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 4 of 12 : IBribeFactory.sol
pragma solidity 0.8.13;

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

File 5 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 claimFees() external returns (uint claimed0, uint claimed1);
    function left(address token) external view returns (uint);
    function isForPair() external view returns (bool);
}

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

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

File 7 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 8 of 12 : IMinter.sol
pragma solidity 0.8.13;

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

File 9 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 claimFees() external returns (uint, uint);
    function tokens() external returns (address, 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);
}

File 10 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 pairCodeHash() external pure returns (bytes32);
    function getPair(address tokenA, address token, bool stable) external view returns (address);
    function createPair(address tokenA, address tokenB, bool stable) external returns (address pair);
}

File 11 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;
}

File 12 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": [
    "LayerZero/=lib/LayerZero/contracts/",
    "ds-test/=lib/ds-test/src/",
    "forge-optimism/=lib/rollcall/lib/forge-optimism/src/",
    "forge-std/=lib/forge-std/src/",
    "lib/=lib/rollcall/src/lib/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "rollcall/=lib/rollcall/src/",
    "solmate/=lib/solmate/src/",
    "utils/=test/utils/",
    "contracts/=contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london"
}

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":"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":"gauge","type":"address"},{"indexed":false,"internalType":"address","name":"creator","type":"address"},{"indexed":false,"internalType":"address","name":"internal_bribe","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":"GaugeKilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gauge","type":"address"}],"name":"GaugeRevived","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":"_ve","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"attachTokenToGauge","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":"_fees","type":"address[]"},{"internalType":"address[][]","name":"_tokens","type":"address[][]"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"claimFees","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"}],"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":[{"internalType":"address[]","name":"_gauges","type":"address[]"}],"name":"distributeFees","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":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gaugefactory","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"internal_bribes","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"isGauge","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":"killGauge","outputs":[],"stateMutability":"nonpayable","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":"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":"_tokenId","type":"uint256"}],"name":"reset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gauge","type":"address"}],"name":"reviveGauge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_council","type":"address"}],"name":"setEmergencyCouncil","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"}]

61012060405260016011553480156200001757600080fd5b5060405162003656380380620036568339810160408190526200003a916200011c565b6001600160a01b03808516608081905290841660a05260408051637e062a3560e11b8152905163fc0c546a916004808201926020929091908290030181865afa1580156200008c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000b2919062000179565b6001600160a01b0390811660c05291821660e0521661010052505060008054336001600160a01b03199182168117909255600180548216831790556002805490911690911790556200019e565b80516001600160a01b03811681146200011757600080fd5b919050565b600080600080608085870312156200013357600080fd5b6200013e85620000ff565b93506200014e60208601620000ff565b92506200015e60408601620000ff565b91506200016e60608601620000ff565b905092959194509250565b6000602082840312156200018c57600080fd5b6200019782620000ff565b9392505050565b60805160a05160c05160e051610100516133e062000276600039600081816103e701528181611c680152611ce60152600081816104d30152611d79015260008181610b9401528181610c0d01528181610edd01528181610f9901528181611acd01528181611b0601528181611b380152611e5a0152600081816106fc015261192401526000818161058c0152818161092b015281816109d701528181610c9a01528181611069015281816111ea0152818161131a015281816114d901528181611dab015281816125e501526129a801526133e06000f3fe608060405234801561001057600080fd5b50600436106102f15760003560e01c806379e938241161019d578063ac4afa38116100e9578063d23254b4116100a2578063e586875f1161007c578063e586875f1461076f578063ea94ee4414610782578063eae40f2614610795578063f3594be0146107be57600080fd5b8063d23254b414610731578063d560b0d71461075c578063e4fc6b6d1461048557600080fd5b8063ac4afa381461067f578063ae21c4cb14610692578063b9a09fd5146106bb578063c42cf535146106e4578063c45a0155146106f7578063c527ee1f1461071e57600080fd5b80639b6a9d7211610156578063a61c713a11610130578063a61c713a14610616578063a7cac84614610629578063a86a366d14610649578063aa79979b1461065c57600080fd5b80639b6a9d72146105dd5780639f06247b146105f0578063a5f4301e1461060357600080fd5b806379e93824146105545780637ac09bf7146105745780638dd598fb1461058757806396c82e57146105ae578063992a7933146105b75780639b19251a146105ca57600080fd5b8063411b1f771161025c578063666256aa116102155780636ecbe38a116101ef5780636ecbe38a146105085780637625391a1461051b5780637715ee751461052e5780637778960e1461054157600080fd5b8063666256aa146104bb57806368c3acb3146104ce578063698473e3146104f557600080fd5b8063411b1f771461045f578063462d0b2e1461047257806347b3c6ba1461048557806353d786931461048d5780636138889b1461049557806363453ae1146104a857600080fd5b8063310bd74b116102ae578063310bd74b146103bc57806332145f90146103cf57806338752a9d146103e25780633af32abf146104095780633c6b16ab1461042c578063402914f51461043f57600080fd5b806306d6a1b2146102f6578063075461721461033c5780630c340a241461034f5780631703e5f9146103625780631f7b6d321461039557806320b1cb6f146103a7575b600080fd5b61031f610304366004612cea565b6006602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b60005461031f906001600160a01b031681565b60015461031f906001600160a01b031681565b610385610370366004612cea565b60106020526000908152604090205460ff1681565b6040519015158152602001610333565b6004545b604051908152602001610333565b6103ba6103b5366004612e6d565b6107de565b005b6103ba6103ca366004612ed1565b610894565b6103ba6103dd366004612ed1565b610a3f565b61031f7f000000000000000000000000000000000000000000000000000000000000000081565b610385610417366004612cea565b600f6020526000908152604090205460ff1681565b6103ba61043a366004612ed1565b610b8f565b61039961044d366004612cea565b60146020526000908152604090205481565b6103ba61046d366004612eea565b610c62565b6103ba610480366004612f1a565b610d3c565b6103ba610db7565b6103ba610dc8565b6103ba6104a3366004612f61565b610dd7565b6103ba6104b6366004612cea565b610e1b565b6103ba6104c9366004612f9e565b61104d565b61031f7f000000000000000000000000000000000000000000000000000000000000000081565b6103ba610503366004612eea565b611196565b6103ba610516366004612cea565b61128c565b6103ba61052936600461300b565b611298565b6103ba61053c366004612f9e565b6112fe565b60025461031f906001600160a01b031681565b610399610562366004612ed1565b600c6020526000908152604090205481565b6103ba610582366004613079565b611447565b61031f7f000000000000000000000000000000000000000000000000000000000000000081565b61039960035481565b6103ba6105c5366004612cea565b6115df565b6103ba6105d8366004612cea565b6116e4565b6103ba6105eb36600461300b565b611704565b6103ba6105fe366004612cea565b61176a565b61031f610611366004612cea565b611867565b6103ba6106243660046130f3565b612006565b610399610637366004612cea565b60096020526000908152604090205481565b61031f61065736600461300b565b61208a565b61038561066a366004612cea565b600e6020526000908152604090205460ff1681565b61031f61068d366004612ed1565b6120c2565b61031f6106a0366004612cea565b6008602052600090815260409020546001600160a01b031681565b61031f6106c9366004612cea565b6005602052600090815260409020546001600160a01b031681565b6103ba6106f2366004612cea565b6120ec565b61031f7f000000000000000000000000000000000000000000000000000000000000000081565b6103ba61072c366004612f61565b612125565b61039961073f366004612eea565b600a60209081526000928352604080842090915290825290205481565b6103ba61076a366004612f61565b612242565b6103ba61077d366004612cea565b612282565b6103ba6107903660046130f3565b6122bb565b61031f6107a3366004612cea565b6007602052600090815260409020546001600160a01b031681565b6103996107cc366004612ed1565b600d6020526000908152604090205481565b60005b825181101561088f578281815181106107fc576107fc61312b565b60200260200101516001600160a01b03166331279d3d338484815181106108255761082561312b565b60200260200101516040518363ffffffff1660e01b815260040161084a929190613185565b600060405180830381600087803b15801561086457600080fd5b505af1158015610878573d6000803e3d6000fd5b505050508080610887906131bf565b9150506107e1565b505050565b6000818152600d6020526040902054819062093a806108b381426131d8565b6108bd91906131fa565b1161090f5760405162461bcd60e51b815260206004820152601e60248201527f544f4b454e5f414c52454144595f564f5445445f544849535f45504f4348000060448201526064015b60405180910390fd5b60405163430c208160e01b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063430c208190604401602060405180830381865afa15801561097a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099e9190613219565b6109a757600080fd5b6000828152600d602052604090204290556109c18261231a565b60405163c1f0fb9f60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063c1f0fb9f90602401600060405180830381600087803b158015610a2357600080fd5b505af1158015610a37573d6000803e3d6000fd5b505050505050565b6000818152600b6020908152604080832080548251818502810185019093528083529192909190830182828015610a9f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a81575b5050505050905060008151905060008167ffffffffffffffff811115610ac757610ac7612d0e565b604051908082528060200260200182016040528015610af0578160200160208202803683370190505b50905060005b82811015610b7d57600a60008681526020019081526020016000206000858381518110610b2557610b2561312b565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054828281518110610b6057610b6061312b565b602090810291909101015280610b75816131bf565b915050610af6565b50610b898484836125c1565b50505050565b610bbb7f0000000000000000000000000000000000000000000000000000000000000000333084612a3f565b600354600090610bd383670de0b6b3a76400006131fa565b610bdd91906131d8565b90508015610bfd578060126000828254610bf7919061323b565b90915550505b6040518281526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169033907ff70d5c697de7ea828df48e5c4573cb2194c659f1901f70110c52b066dcf50826906020015b60405180910390a35050565b336000908152600e602052604090205460ff16610c7e57600080fd5b8115610cff57604051634c35bec560e11b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063986b7d8a90602401600060405180830381600087803b158015610ce657600080fd5b505af1158015610cfa573d6000803e3d6000fd5b505050505b60405182815233906001600160a01b038316907fae268d9aab12f3605f58efd74fd3801fa812b03fdb44317eb70f46dff0e19e2290602001610c56565b6000546001600160a01b03163314610d5357600080fd5b60005b8251811015610d9357610d81838281518110610d7457610d7461312b565b6020026020010151612b2f565b80610d8b816131bf565b915050610d56565b50600080546001600160a01b0319166001600160a01b039290921691909117905550565b600454610dc690600090611298565b565b600454610dc690600090611704565b60005b8151811015610e1757610e05828281518110610df857610df861312b565b6020026020010151610e1b565b80610e0f816131bf565b915050610dda565b5050565b601154600114610e2a57600080fd5b600260118190555060008054906101000a90046001600160a01b03166001600160a01b031663ed29fc116040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610e85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea99190613253565b50610eb381612ba2565b6001600160a01b0381811660008181526014602052604090819020549051634cde602960e11b81527f00000000000000000000000000000000000000000000000000000000000000009093166004840152916399bcc05290602401602060405180830381865afa158015610f2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4f9190613253565b81118015610f6957506000610f6762093a80836131d8565b115b15611044576001600160a01b03828116600081815260146020526040808220919091555163b66503cf60e01b81527f00000000000000000000000000000000000000000000000000000000000000009092166004830152602482018390529063b66503cf90604401600060405180830381600087803b158015610feb57600080fd5b505af1158015610fff573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507f4fa9693cae526341d334e2862ca2413b2e503f1266255f9e0869fb36e6d89b179060200160405180910390a35b50506001601155565b60405163430c208160e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063430c208190604401602060405180830381865afa1580156110b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110dc9190613219565b6110e557600080fd5b60005b8351811015610b89578381815181106111035761110361312b565b60200260200101516001600160a01b031663a7852afa8385848151811061112c5761112c61312b565b60200260200101516040518363ffffffff1660e01b815260040161115192919061326c565b600060405180830381600087803b15801561116b57600080fd5b505af115801561117f573d6000803e3d6000fd5b50505050808061118e906131bf565b9150506110e8565b336000908152600e602052604090205460ff166111b257600080fd5b3360009081526010602052604090205460ff166111ce57600080fd5b811561124f5760405163fbd3a29d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063fbd3a29d90602401600060405180830381600087803b15801561123657600080fd5b505af115801561124a573d6000803e3d6000fd5b505050505b60405182815233906001600160a01b038316907f60940192810a6fb3bce3fd3e2e3a13fd6ccc7605e963fb87ee971aba829989bd90602001610c56565b61129581612ba2565b50565b815b8181101561088f576112ec60056000600484815481106112bc576112bc61312b565b60009182526020808320909101546001600160a01b03908116845290830193909352604090910190205416610e1b565b806112f6816131bf565b91505061129a565b60405163430c208160e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063430c208190604401602060405180830381865afa158015611369573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138d9190613219565b61139657600080fd5b60005b8351811015610b89578381815181106113b4576113b461312b565b60200260200101516001600160a01b031663a7852afa838584815181106113dd576113dd61312b565b60200260200101516040518363ffffffff1660e01b815260040161140292919061326c565b600060405180830381600087803b15801561141c57600080fd5b505af1158015611430573d6000803e3d6000fd5b50505050808061143f906131bf565b915050611399565b6000858152600d6020526040902054859062093a8061146681426131d8565b61147091906131fa565b116114bd5760405162461bcd60e51b815260206004820152601e60248201527f544f4b454e5f414c52454144595f564f5445445f544849535f45504f434800006044820152606401610906565b60405163430c208160e01b8152336004820152602481018790527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063430c208190604401602060405180830381865afa158015611528573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154c9190613219565b61155557600080fd5b83821461156157600080fd5b6000868152600d602090815260409182902042905581518682028181018301909352868152610a379289928991899182919085019084908082843760009201919091525050604080516020808a028281018201909352898252909350899250889182918501908490808284376000920191909152506125c192505050565b6002546001600160a01b031633146116315760405162461bcd60e51b81526020600482015260156024820152741b9bdd08195b595c99d95b98de4818dbdd5b98da5b605a1b6044820152606401610906565b6001600160a01b03811660009081526010602052604090205460ff1661168e5760405162461bcd60e51b815260206004820152601260248201527119d85d59d948185b1c9958591e481919585960721b6044820152606401610906565b6001600160a01b0381166000818152601060209081526040808320805460ff191690556014909152808220829055517f04a5d3f5d80d22d9345acc80618f4a4e7e663cf9e1aed23b57d975acec002ba79190a250565b6001546001600160a01b031633146116fb57600080fd5b61129581612b2f565b815b8181101561088f5761175860056000600484815481106117285761172861312b565b60009182526020808320909101546001600160a01b03908116845290830193909352604090910190205416612ba2565b80611762816131bf565b915050611706565b6002546001600160a01b031633146117bc5760405162461bcd60e51b81526020600482015260156024820152741b9bdd08195b595c99d95b98de4818dbdd5b98da5b605a1b6044820152606401610906565b6001600160a01b03811660009081526010602052604090205460ff161561181b5760405162461bcd60e51b8152602060048201526013602482015272676175676520616c726561647920616c69766560681b6044820152606401610906565b6001600160a01b038116600081815260106020526040808220805460ff19166001179055517fed18e9faa3dccfd8aa45f69c4de40546b2ca9cccc4538a2323531656516db1aa9190a250565b6001600160a01b03818116600090815260056020526040812054909116156118ba5760405162461bcd60e51b815260206004820152600660248201526565786973747360d01b6044820152606401610906565b60408051600380825260808201909252600091602082016060803683375050604080516002808252606082018352939450600093909250906020830190803683370190505060405163e5e31b1360e01b81526001600160a01b0386811660048301529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063e5e31b1390602401602060405180830381865afa15801561196b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198f9190613219565b90506000808215611b8b57866001600160a01b0316639d63848a6040518163ffffffff1660e01b815260040160408051808303816000875af11580156119d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fd9190613285565b80925081935050508185600081518110611a1957611a1961312b565b60200260200101906001600160a01b031690816001600160a01b0316815250508085600181518110611a4d57611a4d61312b565b60200260200101906001600160a01b031690816001600160a01b0316815250508184600081518110611a8157611a8161312b565b60200260200101906001600160a01b031690816001600160a01b0316815250508084600181518110611ab557611ab561312b565b6001600160a01b0392831660209182029290920101527f0000000000000000000000000000000000000000000000000000000000000000811690831614801590611b315750806001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614155b15611b8b577f000000000000000000000000000000000000000000000000000000000000000085600281518110611b6a57611b6a61312b565b60200260200101906001600160a01b031690816001600160a01b0316815250505b6001546001600160a01b03163314611c4e5782611bd35760405162461bcd60e51b81526020600482015260066024820152650857dc1bdbdb60d21b6044820152606401610906565b6001600160a01b0382166000908152600f602052604090205460ff168015611c1357506001600160a01b0381166000908152600f602052604090205460ff165b611c4e5760405162461bcd60e51b815260206004820152600c60248201526b085dda1a5d195b1a5cdd195960a21b6044820152606401610906565b604051632a26b9eb60e01b81526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632a26b9eb90611c9d9088906004016132b4565b6020604051808303816000875af1158015611cbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce091906132c7565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636485f0c4886040518263ffffffff1660e01b8152600401611d3091906132b4565b6020604051808303816000875af1158015611d4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d7391906132c7565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630bc25f4f8b85857f00000000000000000000000000000000000000000000000000000000000000008b8e6040518763ffffffff1660e01b8152600401611ded969594939291906132e4565b6020604051808303816000875af1158015611e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3091906132c7565b60405163095ea7b360e01b81526001600160a01b03808316600483015260001960248301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063095ea7b3906044016020604051808303816000875af1158015611ea5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec99190613219565b506001600160a01b03818116600081815260076020908152604080832080546001600160a01b03199081168a8816179091556008835281842080548216898816179055948f16808452600583528184208054871686179055938352600682528083208054909516909317909355600e8352818120805460ff19908116600190811790925560109094529190208054909216179055611f6681612ba2565b600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b038c8116918217909255604080513381528684166020820152919285811692908516917fa4d97e9e7c65249b4cd01acb82add613adea98af32daf092366982f0a0d4e453910160405180910390a49998505050505050505050565b336000908152600e602052604090205460ff1661202257600080fd5b3360009081526010602052604090205460ff1661203e57600080fd5b604080518481526020810183905233916001600160a01b038516917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d791015b60405180910390a3505050565b600b60205281600052604060002081815481106120a657600080fd5b6000918252602090912001546001600160a01b03169150829050565b600481815481106120d257600080fd5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b0316331461210357600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60005b8151811015610e17578181815181106121435761214361312b565b60200260200101516001600160a01b031663e57482136040518163ffffffff1660e01b8152600401602060405180830381865afa158015612188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ac9190613219565b15612230578181815181106121c3576121c361312b565b60200260200101516001600160a01b031663d294f0936040518163ffffffff1660e01b815260040160408051808303816000875af1158015612209573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222d9190613334565b50505b8061223a816131bf565b915050612128565b60005b8151811015610e17576122708282815181106122635761226361312b565b6020026020010151612ba2565b8061227a816131bf565b915050612245565b6002546001600160a01b0316331461229957600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600e602052604090205460ff166122d757600080fd5b604080518481526020810183905233916001600160a01b038516917ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb567910161207d565b6000818152600b6020526040812080549091805b8281101561258557600084828154811061234a5761234a61312b565b6000918252602080832090910154888352600a825260408084206001600160a01b03909216808552919092529120549091508015612570576001600160a01b038083166000908152600560205260409020546123a69116612ba2565b6001600160a01b038216600090815260096020526040812080548392906123ce908490613358565b90915550506000878152600a602090815260408083206001600160a01b038616845290915281208054839290612405908490613358565b90915550508015612529576001600160a01b038281166000908152600560209081526040808320548416835260079091529081902054905163278afc8b60e21b815260048101849052602481018a9052911690639e2bf22c90604401600060405180830381600087803b15801561247b57600080fd5b505af115801561248f573d6000803e3d6000fd5b505050506001600160a01b038281166000908152600560209081526040808320548416835260089091529081902054905163278afc8b60e21b815260048101849052602481018a9052911690639e2bf22c90604401600060405180830381600087803b1580156124fe57600080fd5b505af1158015612512573d6000803e3d6000fd5b505050508084612522919061323b565b9350612536565b6125338185613358565b93505b60408051888152602081018390527fa9f3ca5f8a9e1580edb2741e0ba560084ec72e0067ba3423f9e9327a176882db910160405180910390a15b5050808061257d906131bf565b91505061232e565b5080600360008282546125989190613358565b90915550506000848152600c60209081526040808320839055600b9091528120610b8991612ca3565b6125ca8361231a565b81516040516339f890b560e21b8152600481018590526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e7e242d490602401602060405180830381865afa158015612634573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126589190613253565b90506000806000805b858110156126a25786818151811061267b5761267b61312b565b60200260200101518461268e919061323b565b93508061269a816131bf565b915050612661565b5060005b8581101561298b5760008882815181106126c2576126c261312b565b6020908102919091018101516001600160a01b03808216600090815260058452604080822054909216808252600e909452205490925060ff161561297657600086888b86815181106127165761271661312b565b602002602001015161272891906131fa565b61273291906131d8565b60008d8152600a602090815260408083206001600160a01b03881684529091529020549091501561276257600080fd5b8060000361276f57600080fd5b61277882612ba2565b60008c8152600b6020908152604080832080546001810182559084528284200180546001600160a01b0319166001600160a01b03881690811790915583526009909152812080548392906127cd90849061323b565b909155505060008c8152600a602090815260408083206001600160a01b03871684529091528120805483929061280490849061323b565b90915550506001600160a01b038083166000908152600760205260409081902054905163f320772360e01b815260048101849052602481018f905291169063f320772390604401600060405180830381600087803b15801561286557600080fd5b505af1158015612879573d6000803e3d6000fd5b5050505060086000836001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160a01b03166001600160a01b031663f3207723828e6040518363ffffffff1660e01b81526004016128ec929190918252602082015260400190565b600060405180830381600087803b15801561290657600080fd5b505af115801561291a573d6000803e3d6000fd5b50505050808561292a919061323b565b9450612936818761323b565b604080518e81526020810184905291975033917fea66f58e474bc09f580000e81f31b334d171db387d0c6098ba47bd897741679b910160405180910390a2505b50508080612983906131bf565b9150506126a6565b508015612a0d5760405163fd4a77f160e01b8152600481018990527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063fd4a77f190602401600060405180830381600087803b1580156129f457600080fd5b505af1158015612a08573d6000803e3d6000fd5b505050505b8160036000828254612a1f919061323b565b90915550506000978852600c602052604090972096909655505050505050565b6000846001600160a01b03163b11612a5657600080fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691612aba919061336f565b6000604051808303816000865af19150503d8060008114612af7576040519150601f19603f3d011682016040523d82523d6000602084013e612afc565b606091505b5091509150818015612b26575080511580612b26575080806020019051810190612b269190613219565b610a3757600080fd5b6001600160a01b0381166000908152600f602052604090205460ff1615612b5557600080fd5b6001600160a01b0381166000818152600f6020526040808220805460ff191660011790555133917f6661a7108aecd07864384529117d96c319c1163e3010c01390f6b704726e07de91a350565b6001600160a01b038082166000908152600660209081526040808320549093168083526009909152919020548015612c82576001600160a01b038316600090815260136020526040812080546012549182905591612c008383613358565b90508015610a37576000670de0b6b3a7640000612c1d83876131fa565b612c2791906131d8565b6001600160a01b03881660009081526010602052604090205490915060ff1615612c79576001600160a01b03871660009081526014602052604081208054839290612c7390849061323b565b90915550505b50505050505050565b6012546001600160a01b038416600090815260136020526040902055505050565b508054600082559060005260206000209081019061129591905b80821115612cd15760008155600101612cbd565b5090565b6001600160a01b038116811461129557600080fd5b600060208284031215612cfc57600080fd5b8135612d0781612cd5565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612d4d57612d4d612d0e565b604052919050565b600067ffffffffffffffff821115612d6f57612d6f612d0e565b5060051b60200190565b600082601f830112612d8a57600080fd5b81356020612d9f612d9a83612d55565b612d24565b82815260059290921b84018101918181019086841115612dbe57600080fd5b8286015b84811015612de2578035612dd581612cd5565b8352918301918301612dc2565b509695505050505050565b600082601f830112612dfe57600080fd5b81356020612e0e612d9a83612d55565b82815260059290921b84018101918181019086841115612e2d57600080fd5b8286015b84811015612de257803567ffffffffffffffff811115612e515760008081fd5b612e5f8986838b0101612d79565b845250918301918301612e31565b60008060408385031215612e8057600080fd5b823567ffffffffffffffff80821115612e9857600080fd5b612ea486838701612d79565b93506020850135915080821115612eba57600080fd5b50612ec785828601612ded565b9150509250929050565b600060208284031215612ee357600080fd5b5035919050565b60008060408385031215612efd57600080fd5b823591506020830135612f0f81612cd5565b809150509250929050565b60008060408385031215612f2d57600080fd5b823567ffffffffffffffff811115612f4457600080fd5b612f5085828601612d79565b9250506020830135612f0f81612cd5565b600060208284031215612f7357600080fd5b813567ffffffffffffffff811115612f8a57600080fd5b612f9684828501612d79565b949350505050565b600080600060608486031215612fb357600080fd5b833567ffffffffffffffff80821115612fcb57600080fd5b612fd787838801612d79565b94506020860135915080821115612fed57600080fd5b50612ffa86828701612ded565b925050604084013590509250925092565b6000806040838503121561301e57600080fd5b50508035926020909101359150565b60008083601f84011261303f57600080fd5b50813567ffffffffffffffff81111561305757600080fd5b6020830191508360208260051b850101111561307257600080fd5b9250929050565b60008060008060006060868803121561309157600080fd5b85359450602086013567ffffffffffffffff808211156130b057600080fd5b6130bc89838a0161302d565b909650945060408801359150808211156130d557600080fd5b506130e28882890161302d565b969995985093965092949392505050565b60008060006060848603121561310857600080fd5b83359250602084013561311a81612cd5565b929592945050506040919091013590565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b8381101561317a5781516001600160a01b031687529582019590820190600101613155565b509495945050505050565b6001600160a01b0383168152604060208201819052600090612f9690830184613141565b634e487b7160e01b600052601160045260246000fd5b6000600182016131d1576131d16131a9565b5060010190565b6000826131f557634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615613214576132146131a9565b500290565b60006020828403121561322b57600080fd5b81518015158114612d0757600080fd5b6000821982111561324e5761324e6131a9565b500190565b60006020828403121561326557600080fd5b5051919050565b828152604060208201526000612f966040830184613141565b6000806040838503121561329857600080fd5b82516132a381612cd5565b6020840151909250612f0f81612cd5565b602081526000612d076020830184613141565b6000602082840312156132d957600080fd5b8151612d0781612cd5565b6001600160a01b0387811682528681166020830152858116604083015284166060820152821515608082015260c060a0820181905260009061332890830184613141565b98975050505050505050565b6000806040838503121561334757600080fd5b505080516020909101519092909150565b60008282101561336a5761336a6131a9565b500390565b6000825160005b818110156133905760208186018101518583015201613376565b8181111561339f576000828501525b50919091019291505056fea2646970667358221220cb2d5d918ba1f4dd2d2e82aaa55326525eb672936ffd95faab54c7785d17a09364736f6c634300080d00330000000000000000000000009c7305eb78a432ced5c4d14cac27e8ed569a2e2600000000000000000000000025cbddb98b35ab1ff77413456b31ec81a6b6b746000000000000000000000000c5be2c918eb04b091962fdf095a217a55cfa42c5000000000000000000000000a84ea94aa705f7d009cddf2a60f65c0d446b748e

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102f15760003560e01c806379e938241161019d578063ac4afa38116100e9578063d23254b4116100a2578063e586875f1161007c578063e586875f1461076f578063ea94ee4414610782578063eae40f2614610795578063f3594be0146107be57600080fd5b8063d23254b414610731578063d560b0d71461075c578063e4fc6b6d1461048557600080fd5b8063ac4afa381461067f578063ae21c4cb14610692578063b9a09fd5146106bb578063c42cf535146106e4578063c45a0155146106f7578063c527ee1f1461071e57600080fd5b80639b6a9d7211610156578063a61c713a11610130578063a61c713a14610616578063a7cac84614610629578063a86a366d14610649578063aa79979b1461065c57600080fd5b80639b6a9d72146105dd5780639f06247b146105f0578063a5f4301e1461060357600080fd5b806379e93824146105545780637ac09bf7146105745780638dd598fb1461058757806396c82e57146105ae578063992a7933146105b75780639b19251a146105ca57600080fd5b8063411b1f771161025c578063666256aa116102155780636ecbe38a116101ef5780636ecbe38a146105085780637625391a1461051b5780637715ee751461052e5780637778960e1461054157600080fd5b8063666256aa146104bb57806368c3acb3146104ce578063698473e3146104f557600080fd5b8063411b1f771461045f578063462d0b2e1461047257806347b3c6ba1461048557806353d786931461048d5780636138889b1461049557806363453ae1146104a857600080fd5b8063310bd74b116102ae578063310bd74b146103bc57806332145f90146103cf57806338752a9d146103e25780633af32abf146104095780633c6b16ab1461042c578063402914f51461043f57600080fd5b806306d6a1b2146102f6578063075461721461033c5780630c340a241461034f5780631703e5f9146103625780631f7b6d321461039557806320b1cb6f146103a7575b600080fd5b61031f610304366004612cea565b6006602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b60005461031f906001600160a01b031681565b60015461031f906001600160a01b031681565b610385610370366004612cea565b60106020526000908152604090205460ff1681565b6040519015158152602001610333565b6004545b604051908152602001610333565b6103ba6103b5366004612e6d565b6107de565b005b6103ba6103ca366004612ed1565b610894565b6103ba6103dd366004612ed1565b610a3f565b61031f7f000000000000000000000000a84ea94aa705f7d009cddf2a60f65c0d446b748e81565b610385610417366004612cea565b600f6020526000908152604090205460ff1681565b6103ba61043a366004612ed1565b610b8f565b61039961044d366004612cea565b60146020526000908152604090205481565b6103ba61046d366004612eea565b610c62565b6103ba610480366004612f1a565b610d3c565b6103ba610db7565b6103ba610dc8565b6103ba6104a3366004612f61565b610dd7565b6103ba6104b6366004612cea565b610e1b565b6103ba6104c9366004612f9e565b61104d565b61031f7f000000000000000000000000c5be2c918eb04b091962fdf095a217a55cfa42c581565b6103ba610503366004612eea565b611196565b6103ba610516366004612cea565b61128c565b6103ba61052936600461300b565b611298565b6103ba61053c366004612f9e565b6112fe565b60025461031f906001600160a01b031681565b610399610562366004612ed1565b600c6020526000908152604090205481565b6103ba610582366004613079565b611447565b61031f7f0000000000000000000000009c7305eb78a432ced5c4d14cac27e8ed569a2e2681565b61039960035481565b6103ba6105c5366004612cea565b6115df565b6103ba6105d8366004612cea565b6116e4565b6103ba6105eb36600461300b565b611704565b6103ba6105fe366004612cea565b61176a565b61031f610611366004612cea565b611867565b6103ba6106243660046130f3565b612006565b610399610637366004612cea565b60096020526000908152604090205481565b61031f61065736600461300b565b61208a565b61038561066a366004612cea565b600e6020526000908152604090205460ff1681565b61031f61068d366004612ed1565b6120c2565b61031f6106a0366004612cea565b6008602052600090815260409020546001600160a01b031681565b61031f6106c9366004612cea565b6005602052600090815260409020546001600160a01b031681565b6103ba6106f2366004612cea565b6120ec565b61031f7f00000000000000000000000025cbddb98b35ab1ff77413456b31ec81a6b6b74681565b6103ba61072c366004612f61565b612125565b61039961073f366004612eea565b600a60209081526000928352604080842090915290825290205481565b6103ba61076a366004612f61565b612242565b6103ba61077d366004612cea565b612282565b6103ba6107903660046130f3565b6122bb565b61031f6107a3366004612cea565b6007602052600090815260409020546001600160a01b031681565b6103996107cc366004612ed1565b600d6020526000908152604090205481565b60005b825181101561088f578281815181106107fc576107fc61312b565b60200260200101516001600160a01b03166331279d3d338484815181106108255761082561312b565b60200260200101516040518363ffffffff1660e01b815260040161084a929190613185565b600060405180830381600087803b15801561086457600080fd5b505af1158015610878573d6000803e3d6000fd5b505050508080610887906131bf565b9150506107e1565b505050565b6000818152600d6020526040902054819062093a806108b381426131d8565b6108bd91906131fa565b1161090f5760405162461bcd60e51b815260206004820152601e60248201527f544f4b454e5f414c52454144595f564f5445445f544849535f45504f4348000060448201526064015b60405180910390fd5b60405163430c208160e01b8152336004820152602481018390527f0000000000000000000000009c7305eb78a432ced5c4d14cac27e8ed569a2e266001600160a01b03169063430c208190604401602060405180830381865afa15801561097a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099e9190613219565b6109a757600080fd5b6000828152600d602052604090204290556109c18261231a565b60405163c1f0fb9f60e01b8152600481018390527f0000000000000000000000009c7305eb78a432ced5c4d14cac27e8ed569a2e266001600160a01b03169063c1f0fb9f90602401600060405180830381600087803b158015610a2357600080fd5b505af1158015610a37573d6000803e3d6000fd5b505050505050565b6000818152600b6020908152604080832080548251818502810185019093528083529192909190830182828015610a9f57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a81575b5050505050905060008151905060008167ffffffffffffffff811115610ac757610ac7612d0e565b604051908082528060200260200182016040528015610af0578160200160208202803683370190505b50905060005b82811015610b7d57600a60008681526020019081526020016000206000858381518110610b2557610b2561312b565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002054828281518110610b6057610b6061312b565b602090810291909101015280610b75816131bf565b915050610af6565b50610b898484836125c1565b50505050565b610bbb7f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a05333084612a3f565b600354600090610bd383670de0b6b3a76400006131fa565b610bdd91906131d8565b90508015610bfd578060126000828254610bf7919061323b565b90915550505b6040518281526001600160a01b037f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a05169033907ff70d5c697de7ea828df48e5c4573cb2194c659f1901f70110c52b066dcf50826906020015b60405180910390a35050565b336000908152600e602052604090205460ff16610c7e57600080fd5b8115610cff57604051634c35bec560e11b8152600481018390527f0000000000000000000000009c7305eb78a432ced5c4d14cac27e8ed569a2e266001600160a01b03169063986b7d8a90602401600060405180830381600087803b158015610ce657600080fd5b505af1158015610cfa573d6000803e3d6000fd5b505050505b60405182815233906001600160a01b038316907fae268d9aab12f3605f58efd74fd3801fa812b03fdb44317eb70f46dff0e19e2290602001610c56565b6000546001600160a01b03163314610d5357600080fd5b60005b8251811015610d9357610d81838281518110610d7457610d7461312b565b6020026020010151612b2f565b80610d8b816131bf565b915050610d56565b50600080546001600160a01b0319166001600160a01b039290921691909117905550565b600454610dc690600090611298565b565b600454610dc690600090611704565b60005b8151811015610e1757610e05828281518110610df857610df861312b565b6020026020010151610e1b565b80610e0f816131bf565b915050610dda565b5050565b601154600114610e2a57600080fd5b600260118190555060008054906101000a90046001600160a01b03166001600160a01b031663ed29fc116040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610e85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea99190613253565b50610eb381612ba2565b6001600160a01b0381811660008181526014602052604090819020549051634cde602960e11b81527f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a059093166004840152916399bcc05290602401602060405180830381865afa158015610f2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4f9190613253565b81118015610f6957506000610f6762093a80836131d8565b115b15611044576001600160a01b03828116600081815260146020526040808220919091555163b66503cf60e01b81527f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a059092166004830152602482018390529063b66503cf90604401600060405180830381600087803b158015610feb57600080fd5b505af1158015610fff573d6000803e3d6000fd5b50506040518381526001600160a01b03851692503391507f4fa9693cae526341d334e2862ca2413b2e503f1266255f9e0869fb36e6d89b179060200160405180910390a35b50506001601155565b60405163430c208160e01b8152336004820152602481018290527f0000000000000000000000009c7305eb78a432ced5c4d14cac27e8ed569a2e266001600160a01b03169063430c208190604401602060405180830381865afa1580156110b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110dc9190613219565b6110e557600080fd5b60005b8351811015610b89578381815181106111035761110361312b565b60200260200101516001600160a01b031663a7852afa8385848151811061112c5761112c61312b565b60200260200101516040518363ffffffff1660e01b815260040161115192919061326c565b600060405180830381600087803b15801561116b57600080fd5b505af115801561117f573d6000803e3d6000fd5b50505050808061118e906131bf565b9150506110e8565b336000908152600e602052604090205460ff166111b257600080fd5b3360009081526010602052604090205460ff166111ce57600080fd5b811561124f5760405163fbd3a29d60e01b8152600481018390527f0000000000000000000000009c7305eb78a432ced5c4d14cac27e8ed569a2e266001600160a01b03169063fbd3a29d90602401600060405180830381600087803b15801561123657600080fd5b505af115801561124a573d6000803e3d6000fd5b505050505b60405182815233906001600160a01b038316907f60940192810a6fb3bce3fd3e2e3a13fd6ccc7605e963fb87ee971aba829989bd90602001610c56565b61129581612ba2565b50565b815b8181101561088f576112ec60056000600484815481106112bc576112bc61312b565b60009182526020808320909101546001600160a01b03908116845290830193909352604090910190205416610e1b565b806112f6816131bf565b91505061129a565b60405163430c208160e01b8152336004820152602481018290527f0000000000000000000000009c7305eb78a432ced5c4d14cac27e8ed569a2e266001600160a01b03169063430c208190604401602060405180830381865afa158015611369573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138d9190613219565b61139657600080fd5b60005b8351811015610b89578381815181106113b4576113b461312b565b60200260200101516001600160a01b031663a7852afa838584815181106113dd576113dd61312b565b60200260200101516040518363ffffffff1660e01b815260040161140292919061326c565b600060405180830381600087803b15801561141c57600080fd5b505af1158015611430573d6000803e3d6000fd5b50505050808061143f906131bf565b915050611399565b6000858152600d6020526040902054859062093a8061146681426131d8565b61147091906131fa565b116114bd5760405162461bcd60e51b815260206004820152601e60248201527f544f4b454e5f414c52454144595f564f5445445f544849535f45504f434800006044820152606401610906565b60405163430c208160e01b8152336004820152602481018790527f0000000000000000000000009c7305eb78a432ced5c4d14cac27e8ed569a2e266001600160a01b03169063430c208190604401602060405180830381865afa158015611528573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154c9190613219565b61155557600080fd5b83821461156157600080fd5b6000868152600d602090815260409182902042905581518682028181018301909352868152610a379289928991899182919085019084908082843760009201919091525050604080516020808a028281018201909352898252909350899250889182918501908490808284376000920191909152506125c192505050565b6002546001600160a01b031633146116315760405162461bcd60e51b81526020600482015260156024820152741b9bdd08195b595c99d95b98de4818dbdd5b98da5b605a1b6044820152606401610906565b6001600160a01b03811660009081526010602052604090205460ff1661168e5760405162461bcd60e51b815260206004820152601260248201527119d85d59d948185b1c9958591e481919585960721b6044820152606401610906565b6001600160a01b0381166000818152601060209081526040808320805460ff191690556014909152808220829055517f04a5d3f5d80d22d9345acc80618f4a4e7e663cf9e1aed23b57d975acec002ba79190a250565b6001546001600160a01b031633146116fb57600080fd5b61129581612b2f565b815b8181101561088f5761175860056000600484815481106117285761172861312b565b60009182526020808320909101546001600160a01b03908116845290830193909352604090910190205416612ba2565b80611762816131bf565b915050611706565b6002546001600160a01b031633146117bc5760405162461bcd60e51b81526020600482015260156024820152741b9bdd08195b595c99d95b98de4818dbdd5b98da5b605a1b6044820152606401610906565b6001600160a01b03811660009081526010602052604090205460ff161561181b5760405162461bcd60e51b8152602060048201526013602482015272676175676520616c726561647920616c69766560681b6044820152606401610906565b6001600160a01b038116600081815260106020526040808220805460ff19166001179055517fed18e9faa3dccfd8aa45f69c4de40546b2ca9cccc4538a2323531656516db1aa9190a250565b6001600160a01b03818116600090815260056020526040812054909116156118ba5760405162461bcd60e51b815260206004820152600660248201526565786973747360d01b6044820152606401610906565b60408051600380825260808201909252600091602082016060803683375050604080516002808252606082018352939450600093909250906020830190803683370190505060405163e5e31b1360e01b81526001600160a01b0386811660048301529192506000917f00000000000000000000000025cbddb98b35ab1ff77413456b31ec81a6b6b746169063e5e31b1390602401602060405180830381865afa15801561196b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198f9190613219565b90506000808215611b8b57866001600160a01b0316639d63848a6040518163ffffffff1660e01b815260040160408051808303816000875af11580156119d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fd9190613285565b80925081935050508185600081518110611a1957611a1961312b565b60200260200101906001600160a01b031690816001600160a01b0316815250508085600181518110611a4d57611a4d61312b565b60200260200101906001600160a01b031690816001600160a01b0316815250508184600081518110611a8157611a8161312b565b60200260200101906001600160a01b031690816001600160a01b0316815250508084600181518110611ab557611ab561312b565b6001600160a01b0392831660209182029290920101527f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a05811690831614801590611b315750806001600160a01b03167f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a056001600160a01b031614155b15611b8b577f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a0585600281518110611b6a57611b6a61312b565b60200260200101906001600160a01b031690816001600160a01b0316815250505b6001546001600160a01b03163314611c4e5782611bd35760405162461bcd60e51b81526020600482015260066024820152650857dc1bdbdb60d21b6044820152606401610906565b6001600160a01b0382166000908152600f602052604090205460ff168015611c1357506001600160a01b0381166000908152600f602052604090205460ff165b611c4e5760405162461bcd60e51b815260206004820152600c60248201526b085dda1a5d195b1a5cdd195960a21b6044820152606401610906565b604051632a26b9eb60e01b81526000906001600160a01b037f000000000000000000000000a84ea94aa705f7d009cddf2a60f65c0d446b748e1690632a26b9eb90611c9d9088906004016132b4565b6020604051808303816000875af1158015611cbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce091906132c7565b905060007f000000000000000000000000a84ea94aa705f7d009cddf2a60f65c0d446b748e6001600160a01b0316636485f0c4886040518263ffffffff1660e01b8152600401611d3091906132b4565b6020604051808303816000875af1158015611d4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d7391906132c7565b905060007f000000000000000000000000c5be2c918eb04b091962fdf095a217a55cfa42c56001600160a01b0316630bc25f4f8b85857f0000000000000000000000009c7305eb78a432ced5c4d14cac27e8ed569a2e268b8e6040518763ffffffff1660e01b8152600401611ded969594939291906132e4565b6020604051808303816000875af1158015611e0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3091906132c7565b60405163095ea7b360e01b81526001600160a01b03808316600483015260001960248301529192507f0000000000000000000000003c8b650257cfb5f272f799f5e2b4e65093a11a059091169063095ea7b3906044016020604051808303816000875af1158015611ea5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec99190613219565b506001600160a01b03818116600081815260076020908152604080832080546001600160a01b03199081168a8816179091556008835281842080548216898816179055948f16808452600583528184208054871686179055938352600682528083208054909516909317909355600e8352818120805460ff19908116600190811790925560109094529190208054909216179055611f6681612ba2565b600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b038c8116918217909255604080513381528684166020820152919285811692908516917fa4d97e9e7c65249b4cd01acb82add613adea98af32daf092366982f0a0d4e453910160405180910390a49998505050505050505050565b336000908152600e602052604090205460ff1661202257600080fd5b3360009081526010602052604090205460ff1661203e57600080fd5b604080518481526020810183905233916001600160a01b038516917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d791015b60405180910390a3505050565b600b60205281600052604060002081815481106120a657600080fd5b6000918252602090912001546001600160a01b03169150829050565b600481815481106120d257600080fd5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b0316331461210357600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b60005b8151811015610e17578181815181106121435761214361312b565b60200260200101516001600160a01b031663e57482136040518163ffffffff1660e01b8152600401602060405180830381865afa158015612188573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121ac9190613219565b15612230578181815181106121c3576121c361312b565b60200260200101516001600160a01b031663d294f0936040518163ffffffff1660e01b815260040160408051808303816000875af1158015612209573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222d9190613334565b50505b8061223a816131bf565b915050612128565b60005b8151811015610e17576122708282815181106122635761226361312b565b6020026020010151612ba2565b8061227a816131bf565b915050612245565b6002546001600160a01b0316331461229957600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600e602052604090205460ff166122d757600080fd5b604080518481526020810183905233916001600160a01b038516917ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb567910161207d565b6000818152600b6020526040812080549091805b8281101561258557600084828154811061234a5761234a61312b565b6000918252602080832090910154888352600a825260408084206001600160a01b03909216808552919092529120549091508015612570576001600160a01b038083166000908152600560205260409020546123a69116612ba2565b6001600160a01b038216600090815260096020526040812080548392906123ce908490613358565b90915550506000878152600a602090815260408083206001600160a01b038616845290915281208054839290612405908490613358565b90915550508015612529576001600160a01b038281166000908152600560209081526040808320548416835260079091529081902054905163278afc8b60e21b815260048101849052602481018a9052911690639e2bf22c90604401600060405180830381600087803b15801561247b57600080fd5b505af115801561248f573d6000803e3d6000fd5b505050506001600160a01b038281166000908152600560209081526040808320548416835260089091529081902054905163278afc8b60e21b815260048101849052602481018a9052911690639e2bf22c90604401600060405180830381600087803b1580156124fe57600080fd5b505af1158015612512573d6000803e3d6000fd5b505050508084612522919061323b565b9350612536565b6125338185613358565b93505b60408051888152602081018390527fa9f3ca5f8a9e1580edb2741e0ba560084ec72e0067ba3423f9e9327a176882db910160405180910390a15b5050808061257d906131bf565b91505061232e565b5080600360008282546125989190613358565b90915550506000848152600c60209081526040808320839055600b9091528120610b8991612ca3565b6125ca8361231a565b81516040516339f890b560e21b8152600481018590526000907f0000000000000000000000009c7305eb78a432ced5c4d14cac27e8ed569a2e266001600160a01b03169063e7e242d490602401602060405180830381865afa158015612634573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126589190613253565b90506000806000805b858110156126a25786818151811061267b5761267b61312b565b60200260200101518461268e919061323b565b93508061269a816131bf565b915050612661565b5060005b8581101561298b5760008882815181106126c2576126c261312b565b6020908102919091018101516001600160a01b03808216600090815260058452604080822054909216808252600e909452205490925060ff161561297657600086888b86815181106127165761271661312b565b602002602001015161272891906131fa565b61273291906131d8565b60008d8152600a602090815260408083206001600160a01b03881684529091529020549091501561276257600080fd5b8060000361276f57600080fd5b61277882612ba2565b60008c8152600b6020908152604080832080546001810182559084528284200180546001600160a01b0319166001600160a01b03881690811790915583526009909152812080548392906127cd90849061323b565b909155505060008c8152600a602090815260408083206001600160a01b03871684529091528120805483929061280490849061323b565b90915550506001600160a01b038083166000908152600760205260409081902054905163f320772360e01b815260048101849052602481018f905291169063f320772390604401600060405180830381600087803b15801561286557600080fd5b505af1158015612879573d6000803e3d6000fd5b5050505060086000836001600160a01b03166001600160a01b0316815260200190815260200160002060009054906101000a90046001600160a01b03166001600160a01b031663f3207723828e6040518363ffffffff1660e01b81526004016128ec929190918252602082015260400190565b600060405180830381600087803b15801561290657600080fd5b505af115801561291a573d6000803e3d6000fd5b50505050808561292a919061323b565b9450612936818761323b565b604080518e81526020810184905291975033917fea66f58e474bc09f580000e81f31b334d171db387d0c6098ba47bd897741679b910160405180910390a2505b50508080612983906131bf565b9150506126a6565b508015612a0d5760405163fd4a77f160e01b8152600481018990527f0000000000000000000000009c7305eb78a432ced5c4d14cac27e8ed569a2e266001600160a01b03169063fd4a77f190602401600060405180830381600087803b1580156129f457600080fd5b505af1158015612a08573d6000803e3d6000fd5b505050505b8160036000828254612a1f919061323b565b90915550506000978852600c602052604090972096909655505050505050565b6000846001600160a01b03163b11612a5657600080fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b1790529151600092839290881691612aba919061336f565b6000604051808303816000865af19150503d8060008114612af7576040519150601f19603f3d011682016040523d82523d6000602084013e612afc565b606091505b5091509150818015612b26575080511580612b26575080806020019051810190612b269190613219565b610a3757600080fd5b6001600160a01b0381166000908152600f602052604090205460ff1615612b5557600080fd5b6001600160a01b0381166000818152600f6020526040808220805460ff191660011790555133917f6661a7108aecd07864384529117d96c319c1163e3010c01390f6b704726e07de91a350565b6001600160a01b038082166000908152600660209081526040808320549093168083526009909152919020548015612c82576001600160a01b038316600090815260136020526040812080546012549182905591612c008383613358565b90508015610a37576000670de0b6b3a7640000612c1d83876131fa565b612c2791906131d8565b6001600160a01b03881660009081526010602052604090205490915060ff1615612c79576001600160a01b03871660009081526014602052604081208054839290612c7390849061323b565b90915550505b50505050505050565b6012546001600160a01b038416600090815260136020526040902055505050565b508054600082559060005260206000209081019061129591905b80821115612cd15760008155600101612cbd565b5090565b6001600160a01b038116811461129557600080fd5b600060208284031215612cfc57600080fd5b8135612d0781612cd5565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612d4d57612d4d612d0e565b604052919050565b600067ffffffffffffffff821115612d6f57612d6f612d0e565b5060051b60200190565b600082601f830112612d8a57600080fd5b81356020612d9f612d9a83612d55565b612d24565b82815260059290921b84018101918181019086841115612dbe57600080fd5b8286015b84811015612de2578035612dd581612cd5565b8352918301918301612dc2565b509695505050505050565b600082601f830112612dfe57600080fd5b81356020612e0e612d9a83612d55565b82815260059290921b84018101918181019086841115612e2d57600080fd5b8286015b84811015612de257803567ffffffffffffffff811115612e515760008081fd5b612e5f8986838b0101612d79565b845250918301918301612e31565b60008060408385031215612e8057600080fd5b823567ffffffffffffffff80821115612e9857600080fd5b612ea486838701612d79565b93506020850135915080821115612eba57600080fd5b50612ec785828601612ded565b9150509250929050565b600060208284031215612ee357600080fd5b5035919050565b60008060408385031215612efd57600080fd5b823591506020830135612f0f81612cd5565b809150509250929050565b60008060408385031215612f2d57600080fd5b823567ffffffffffffffff811115612f4457600080fd5b612f5085828601612d79565b9250506020830135612f0f81612cd5565b600060208284031215612f7357600080fd5b813567ffffffffffffffff811115612f8a57600080fd5b612f9684828501612d79565b949350505050565b600080600060608486031215612fb357600080fd5b833567ffffffffffffffff80821115612fcb57600080fd5b612fd787838801612d79565b94506020860135915080821115612fed57600080fd5b50612ffa86828701612ded565b925050604084013590509250925092565b6000806040838503121561301e57600080fd5b50508035926020909101359150565b60008083601f84011261303f57600080fd5b50813567ffffffffffffffff81111561305757600080fd5b6020830191508360208260051b850101111561307257600080fd5b9250929050565b60008060008060006060868803121561309157600080fd5b85359450602086013567ffffffffffffffff808211156130b057600080fd5b6130bc89838a0161302d565b909650945060408801359150808211156130d557600080fd5b506130e28882890161302d565b969995985093965092949392505050565b60008060006060848603121561310857600080fd5b83359250602084013561311a81612cd5565b929592945050506040919091013590565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b8381101561317a5781516001600160a01b031687529582019590820190600101613155565b509495945050505050565b6001600160a01b0383168152604060208201819052600090612f9690830184613141565b634e487b7160e01b600052601160045260246000fd5b6000600182016131d1576131d16131a9565b5060010190565b6000826131f557634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615613214576132146131a9565b500290565b60006020828403121561322b57600080fd5b81518015158114612d0757600080fd5b6000821982111561324e5761324e6131a9565b500190565b60006020828403121561326557600080fd5b5051919050565b828152604060208201526000612f966040830184613141565b6000806040838503121561329857600080fd5b82516132a381612cd5565b6020840151909250612f0f81612cd5565b602081526000612d076020830184613141565b6000602082840312156132d957600080fd5b8151612d0781612cd5565b6001600160a01b0387811682528681166020830152858116604083015284166060820152821515608082015260c060a0820181905260009061332890830184613141565b98975050505050505050565b6000806040838503121561334757600080fd5b505080516020909101519092909150565b60008282101561336a5761336a6131a9565b500390565b6000825160005b818110156133905760208186018101518583015201613376565b8181111561339f576000828501525b50919091019291505056fea2646970667358221220cb2d5d918ba1f4dd2d2e82aaa55326525eb672936ffd95faab54c7785d17a09364736f6c634300080d0033

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

0000000000000000000000009c7305eb78a432ced5c4d14cac27e8ed569a2e2600000000000000000000000025cbddb98b35ab1ff77413456b31ec81a6b6b746000000000000000000000000c5be2c918eb04b091962fdf095a217a55cfa42c5000000000000000000000000a84ea94aa705f7d009cddf2a60f65c0d446b748e

-----Decoded View---------------
Arg [0] : __ve (address): 0x9c7305eb78a432ced5C4D14Cac27E8Ed569A2e26
Arg [1] : _factory (address): 0x25CbdDb98b35ab1FF77413456B31EC81A6B6B746
Arg [2] : _gauges (address): 0xC5be2c918EB04B091962fDF095A217A55CFA42C5
Arg [3] : _bribes (address): 0xA84EA94Aa705F7d009CDDF2a60f65c0d446b748E

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000009c7305eb78a432ced5c4d14cac27e8ed569a2e26
Arg [1] : 00000000000000000000000025cbddb98b35ab1ff77413456b31ec81a6b6b746
Arg [2] : 000000000000000000000000c5be2c918eb04b091962fdf095a217a55cfa42c5
Arg [3] : 000000000000000000000000a84ea94aa705f7d009cddf2a60f65c0d446b748e


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.