Overview
S Balance
0 S
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
GaugeFactory
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity)
/** *Submitted for verification at SonicScan.org on 2024-12-26 */ /** * EQUALIZER EXCHANGE * The New Liquidity Hub of Fantom chain! * https://equalizer.exchange (Dapp) * https://discord.gg/MaMhbgHMby (Community) * * * Contributors: * - Synthetix Network * - Curve Finance * - Andre Cronje, Solidly.Exchange * - 543 (Sam), ftm.guru, Eliteness.netowork & Equalizer.exchange * * Version: v4.11.0 * - Prohibit notifyRewards without existing farmers * - Trap dust from last farmer * * Version: v1.3.0 * - Split `baseReward` * - veRewards Split Ratio * - SplitLockTime * - Gauge Receipts (ERC20) Tracker * * * SPDX-License-Identifier: UNLICENSED */ /** *v1.5.5 *0xf438b2fdf46ea176ebf99ec7852c4699e8e38b1f *Submitted for verification at FtmScan.com on 2023-03-27 */ pragma solidity 0.8.9; // File: contracts/interfaces/IGaugeFactory.sol interface IGaugeFactory { function createGauge(address, address, address, bool, address[] memory) external returns (address); } // File: contracts/interfaces/IVotingEscrow.sol 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); } // File: contracts/interfaces/IVoter.sol interface IVoter { function _ve() external view returns (address); function governor() external view returns (address); function emergencyCouncil() external view returns (address); function protocolFeesTaker() external view returns (address); function attachTokenToGauge(uint _tokenId, address account) external; function attachable() external view returns (bool); function protocolFeesPerMillion() external view returns (uint); 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: contracts/interfaces/IPair.sol 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: contracts/interfaces/IERC20.sol interface IERC20 { function totalSupply() external view returns (uint256); function transfer(address recipient, uint amount) external returns (bool); function symbol() external view returns (string memory); function name() external view returns (string memory); function decimals() external view returns (uint8); 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: contracts/interfaces/IBribe.sol 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); function rewardsListLength() external view returns (uint); function rewards(uint) external view returns (address); } library Address { /** * @dev Returns true if `account` is a contract. * * This test is non-exhaustive, and there may be false-negatives: during the * execution of a contract's constructor, its address will be reported as * not containing a contract. * * > It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } } contract ReentrancyGuard { /// @dev counter to allow mutex lock with only one SSTORE operation uint256 private _guardCounter; constructor () { // The counter starts at one to prevent changing it from zero to a non-zero // value, which is a more expensive operation. _guardCounter = 1; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { _guardCounter += 1; uint256 localCounter = _guardCounter; _; require(localCounter == _guardCounter, "RG!"); } } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: non-zero to non-zero" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. // A Solidity high level call has three parts: // 1. The target address is checked to verify it contains contract code // 2. The call itself is made, and success asserted // 3. The return value is decoded, which in turn checks the size of the returned data. // solhint-disable-next-line max-line-length require(address(token).isContract(), "SafeERC20: non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: LLC fail"); //low-level call fail if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: !success"); } } } library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: +OF"); // addition overflow return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: -OF"); // subtraction overflow uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: *OF"); // multiplication overflow return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: /0"); // division by zero uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: %0"); // modulo by zero" return a % b; } } contract GaugeEquivalent is ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for IERC20; /* ========== STATE VARIABLES ========== */ struct Reward { address rewardsDistributor; uint256 rewardsDuration; uint256 periodFinish; uint256 rewardRate; uint256 lastUpdateTime; uint256 rewardPerTokenStored; } // Constants IERC20 public stake; IVotingEscrow public ve; IVoter public voter; bool public isForPair; address public baseReward; bool public paused; mapping(address => Reward) public rewardData; address[] public rewardTokens; address[] public bribeTokens; IBribe public bribe; // user -> reward token -> amount mapping(address => mapping(address => uint256)) public userRewardPerTokenPaid; mapping(address => mapping(address => uint256)) public rewards; mapping(address => bool) public isReward; mapping(address => bool) public isBribeToken; uint256 private _totalSupply; mapping(address => uint256) private _balances; address public feeTaker; uint256 public splitRatio; //per million uint256 public splitLocktime; mapping(address => uint) public payouts; mapping(address => uint) public payoutsNotified; mapping(address => mapping(address => uint)) public earnings; mapping(address => uint) public totalFeesPayouts; /* ========== CONSTRUCTOR ========== */ constructor( address _stake, address _ebribe, address __ve, address _voter, bool _forPair, address[] memory _allowedRewardTokens ) { stake = IERC20(_stake); bribe = IBribe(_ebribe); ve = IVotingEscrow(__ve); voter = IVoter(_voter); isForPair = _forPair; address _baseReward = ve.token(); baseReward = _baseReward; splitLocktime = 26 weeks; for (uint i; i < _allowedRewardTokens.length; i++) { if (_allowedRewardTokens[i] != address(0)) { isReward[_allowedRewardTokens[i]] = true; rewardTokens.push(_allowedRewardTokens[i]); rewardData[_allowedRewardTokens[i]].rewardsDistributor = _voter; rewardData[_allowedRewardTokens[i]].rewardsDuration = 7 days; } } if(_forPair) { //claimFees : Bribe Rewards //Pre-approve to save gas, since both Bribe & Gauge are immutable (address _token0, address _token1) = IPair(_stake).tokens(); IERC20(_token0).approve(_ebribe, type(uint256).max); IERC20(_token1).approve(_ebribe, type(uint256).max); bribeTokens.push(_token0); bribeTokens.push(_token1); isBribeToken[_token0] = true; isBribeToken[_token1] = true; emit BribeTokenSet(_token0, _ebribe, true); emit BribeTokenSet(_token1, _ebribe, true); } ///else ve.team() must manually `addBribeTokens()` IERC20(_baseReward).approve(address(__ve), type(uint256).max); } /* ========== VIEWS ========== */ function name() external view returns (string memory) { return string(abi.encodePacked("Equalizer Gauge for ", stake.name())); } function symbol() external view returns (string memory) { return string(abi.encodePacked("EQ.G:", stake.symbol())); } function decimals() external view returns (uint256) { return stake.decimals(); } function totalSupply() external view returns (uint256) { return _totalSupply; } function balanceOf(address account) external view returns (uint256) { return _balances[account]; } function lastTimeRewardApplicable(address _rewardsToken) public view returns (uint256) { return Math.min(block.timestamp, rewardData[_rewardsToken].periodFinish); } function rewardPerToken(address _rewardsToken) public view returns (uint256) { if (_totalSupply == 0) { return rewardData[_rewardsToken].rewardPerTokenStored; } return rewardData[_rewardsToken].rewardPerTokenStored.add( lastTimeRewardApplicable(_rewardsToken).sub(rewardData[_rewardsToken].lastUpdateTime).mul(rewardData[_rewardsToken].rewardRate).mul(1e18).div(_totalSupply) ); } /// @param account 1 /// @param _rewardsToken 2 function earnedBy(address account, address _rewardsToken) public view returns (uint256) { return _balances[account].mul(rewardPerToken(_rewardsToken).sub(userRewardPerTokenPaid[account][_rewardsToken])).div(1e18).add(rewards[account][_rewardsToken]); } /// Backwards compatible view with 3qu471738 <= v1.3 /// @param _rewardsToken 1 /// @param account 2 function earned(address _rewardsToken, address account) public view returns (uint256) { return earnedBy(account, _rewardsToken); } function getRewardForDuration(address _rewardsToken) external view returns (uint256) { return rewardData[_rewardsToken].rewardRate.mul(rewardData[_rewardsToken].rewardsDuration); } function left(address _rewardsToken) external view returns (uint) { if (block.timestamp >= rewardData[_rewardsToken].periodFinish) return 0; uint256 remaining = rewardData[_rewardsToken].periodFinish.sub(block.timestamp); return remaining.mul(rewardData[_rewardsToken].rewardRate); } function rewardsListLength() external view returns (uint) { return rewardTokens.length; } function bribesListLength() external view returns (uint) { return bribeTokens.length; } /* ========== BACKWARDS-COMPATIBLE VIEW FUNCTIONS ========== */ function _ve() external view returns (address) { return address(ve); } function periodFinish(address _tkn) external view returns (uint) { return rewardData[_tkn].periodFinish; } function rewardRate(address _tkn) external view returns (uint) { return rewardData[_tkn].rewardRate; } function lastUpdateTime(address _tkn) external view returns (uint) { return rewardData[_tkn].lastUpdateTime; } /* ========== MUTATIVE FUNCTIONS ========== */ function setRewardsDistributor(address _rewardsToken, address _rewardsDistributor) external onlyOwner { rewardData[_rewardsToken].rewardsDistributor = _rewardsDistributor; } function deposit(uint256 amount) public nonReentrant notPaused updateReward(msg.sender) { require(amount > 0, "0a"); // Cannot stake 0 _totalSupply = _totalSupply.add(amount); _balances[msg.sender] = _balances[msg.sender].add(amount); stake.safeTransferFrom(msg.sender, address(this), amount); emit Deposit(msg.sender, amount); emit Transfer(address(0), msg.sender, amount); //_claimFees(); } function depositFor(address _user, uint256 amount) public nonReentrant notPaused updateReward(_user) { require(amount > 0, "0a"); // Cannot stake 0 _totalSupply = _totalSupply.add(amount); _balances[_user] = _balances[_user].add(amount); stake.safeTransferFrom(msg.sender, address(this), amount); emit Deposit(_user, amount); emit Transfer(address(0), _user, amount); //_claimFees(); } function depositAll() external { deposit(stake.balanceOf(msg.sender)); } function depositAllFor(address _user) external { depositFor(_user, stake.balanceOf(msg.sender)); } function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) { require(amount > 0, "0a"); // Cannot withdraw 0 require(amount < _totalSupply, "0t"); // Last Farmer should reduce withdraw amount by 1; Please use (amount-1) _totalSupply = _totalSupply.sub(amount); _balances[msg.sender] = _balances[msg.sender].sub(amount); stake.safeTransfer(msg.sender, amount); emit Withdrawn(msg.sender, amount); emit Transfer(msg.sender, address(0), amount); //_claimFees(); } function withdrawAll() external { withdraw(_balances[msg.sender]); } function exit() external { withdraw(_balances[msg.sender]); getReward(); } function getReward() public nonReentrant updateReward(msg.sender) { for (uint i; i < rewardTokens.length; i++) { address _rewardsToken = rewardTokens[i]; uint256 _reward = rewards[msg.sender][_rewardsToken]; _sendReward(msg.sender, _rewardsToken, _reward); } _claimFees(); } function getReward(address account, address[] memory tokens) external { require(msg.sender == account || msg.sender == address(voter), "Un-authorized claim!"); voter.distribute(address(this)); _getReward(account, tokens); } function _getReward(address account, address[] memory _tokens) internal nonReentrant updateReward(account) { for (uint i; i < _tokens.length; i++) { address _rewardsToken = _tokens[i]; uint256 _reward = rewards[account][_rewardsToken]; _sendReward(account, _rewardsToken, _reward); } _claimFees(); } function _sendReward(address _acc, address _toke, uint _rew) internal { if (_rew > 0) { rewards[_acc][_toke] = 0; if(_toke == baseReward) { uint _spr = splitRatio; if(_spr > 0) { uint _toLock = ( _rew.mul(_spr) ).div(1e6); ve.create_lock_for(_toLock, splitLocktime, _acc); IERC20(_toke).safeTransfer(_acc, _rew.sub(_toLock)); } else { IERC20(_toke).safeTransfer(_acc, _rew); } } else { IERC20(_toke).safeTransfer(_acc, _rew); } emit ClaimRewards(_toke, _acc, _rew); payouts[_toke] += _rew; earnings[_acc][_toke] += _rew; } } function notifyRewardAmount(address _rewardsToken, uint256 _reward) external nonReentrant updateReward(address(0)) { require(_rewardsToken != address(stake), "!!stk"); // Can't distribute staked token as reward! require(isReward[_rewardsToken], "Not a reward!!" ); require(_totalSupply>0,"No Farmers!"); /// The old pattern to get force collection of fees at least once a week during emission distribution to this gauge /// & distribute it to voters over the next week via the (external) Bribe _claimFees(); /// Support feeOnTransfer tokens like ELITE etc. uint rtbb = IERC20(_rewardsToken).balanceOf(address(this)); // handle the transfer of reward tokens via `transferFrom` to reduce the number // of transactions required and ensure correctness of the reward amount IERC20(_rewardsToken).safeTransferFrom(msg.sender, address(this), _reward); uint rtba = IERC20(_rewardsToken).balanceOf(address(this)); _reward = rtba - rtbb; require(_reward > 0, "0r"); // Reward amount must be greater than 0! if (block.timestamp >= rewardData[_rewardsToken].periodFinish) { rewardData[_rewardsToken].rewardRate = _reward.div(rewardData[_rewardsToken].rewardsDuration); } else { //Griefing Protection Enabled for Unknown reward adders uint _oldRewardRate = rewardData[_rewardsToken].rewardRate; uint256 remaining = rewardData[_rewardsToken].periodFinish.sub(block.timestamp); uint256 leftover = remaining.mul(rewardData[_rewardsToken].rewardRate); rewardData[_rewardsToken].rewardRate = _reward.add(leftover).div(rewardData[_rewardsToken].rewardsDuration); if( msg.sender!=address(voter) || msg.sender!=rewardData[_rewardsToken].rewardsDistributor || msg.sender!=ve.team() ) { require( ( rewardData[_rewardsToken].rewardRate >= _oldRewardRate || _reward > leftover ), "EGPE" // Enhanced Griefing Protection Enabled! ); } } rewardData[_rewardsToken].lastUpdateTime = block.timestamp; rewardData[_rewardsToken].periodFinish = block.timestamp.add(rewardData[_rewardsToken].rewardsDuration); emit RewardAdded(_rewardsToken, msg.sender, _reward); payoutsNotified[_rewardsToken] += _reward; } function claimFees() external nonReentrant returns (uint claimed0, uint claimed1) { return _claimFees(); } function _claimFees() internal returns (uint claimed0, uint claimed1) { uint _pfpm = voter.protocolFeesPerMillion(); address _pft = _pfpm > 0 ? voter.protocolFeesTaker() : address(0); /// Equa7izer v1.5: Support Custom pools to be Gaugable if (!isForPair) { /// For non-official/external/independent gauges only /// If compatible, the claimed fees should be notified to Bribe /// Else, this contract will hold the fees & ve.team() can rescue() uint _bn = bribeTokens.length; IERC20[] memory _brews = new IERC20[](_bn); uint[] memory _brewbals = new uint[](_bn); for(uint _n; _n < _bn; _n++) { _brews[_n] = IERC20( bribeTokens[_n] ); /// Record current balance to protect gauge deposits & rewards. /// Also Support feeOnTransfer tokens like ELITE etc. /// Also makes sure a bribe-reward isnt 'killed' or uninitialized. _brewbals[_n] = address(_brews[_n]) == address(0) ? 0 : _brews[_n].balanceOf(address(this)); } try IPair(address(stake)).claimFees() { /// if call succeeds, gauge will have a surplus of extra tokens which can be sent to bribes /// useful in cases of non-equa1izer lps, like conc., weighted or multi-token Liquidity pools for(uint _n = 0; _n < _bn; _n++) { /// Don't trigger bribes for 0x00 rewards uint _a = address(_brews[_n]) == address(0) ? 0 : _brews[_n].balanceOf(address(this)); /// Trigger only when a token balance increases when we try IPair(stake).claimFees() /// because there could possibly be an overlap between rewardTokens & bribeTokens if(_a > _brewbals[_n]) { ///Protocol Fees if( ( (_a - _brewbals[_n]) * _pfpm) / 1e6 > 0) { _brews[_n].transfer(_pft, ( (_a.sub(_brewbals[_n])) * _pfpm) / 1e6 ); emit ProtocolFees(msg.sender,_pft,address(_brews[_n]),((_a.sub(_brewbals[_n])) * _pfpm) / 1e6); _a = _brews[_n].balanceOf(address(this)); } ///Normal Fees -> Bribe if (feeTaker == address(0)) { bribe.notifyRewardAmount( address(_brews[_n]), (_a.sub(_brewbals[_n])) ); emit ClaimFees(msg.sender, address(bribe), address(_brews[_n]), (_a - _brewbals[_n]) ); totalFeesPayouts[ address(_brews[_n]) ] += (_a - _brewbals[_n]); } ///Re-channeled Fees -> FeesTaker else { _brews[_n].transfer(feeTaker, (_a.sub(_brewbals[_n])) ); emit ClaimFees(msg.sender, feeTaker, address(_brews[_n]), (_a - _brewbals[_n]) ); totalFeesPayouts[ address(_brews[_n]) ] += (_a - _brewbals[_n]); } } /// else: we dont have any fees here ser! } return (0, 0); } catch { /// if call fails, do nothing (much). return (0, 0); } } //else: /// For actual Protocol gauges, created by Voter, for E9ua1izer Factory Pairs (address _token0, address _token1) = IPair(address(stake)).tokens(); /// Support feeOnTransfer tokens like ELITE etc. uint t0bb = IERC20(_token0).balanceOf(address(this)); uint t1bb = IERC20(_token1).balanceOf(address(this)); //(claimed0, claimed1) = try IPair(address(stake)).claimFees() { claimed0 = IERC20(_token0).balanceOf(address(this)) - t0bb; claimed1 = IERC20(_token1).balanceOf(address(this)) - t1bb; //claimed0 = t0ba - t0bb; //claimed1 = t1ba - t1bb; ///ProtocolFees if( ( claimed0 * _pfpm) / 1e6 > 0) { IERC20(_token0).transfer(_pft, (claimed0*_pfpm)/1e6 ); emit ProtocolFees(msg.sender,_token0,_pft,(claimed0*_pfpm)/1e6); claimed0 = IERC20(_token0).balanceOf(address(this)).sub(t0bb); } if( ( claimed1 * _pfpm) / 1e6 > 0) { IERC20(_token1).transfer(_pft, (claimed1*_pfpm)/1e6 ); emit ProtocolFees(msg.sender,_token1,_pft,(claimed1*_pfpm)/1e6); claimed1 = IERC20(_token1).balanceOf(address(this)).sub(t1bb); } ///Normal Fees -> Bribe if (feeTaker == address(0)) { if (claimed0 > 0) { bribe.notifyRewardAmount(_token0, claimed0); totalFeesPayouts[ _token0 ] += claimed0; // stores total token0 fees claimed since genesis emit ClaimFees(msg.sender, address(bribe), _token0, claimed0); } if (claimed1 > 0) { bribe.notifyRewardAmount(_token1, claimed1); totalFeesPayouts[ _token1 ] += claimed1; // stores total token1 fees claimed since genesis emit ClaimFees(msg.sender, address(bribe), _token1, claimed1); } } ///Re-channeled Fees -> FeesTaker else { IERC20(_token0).transfer(feeTaker, claimed0); IERC20(_token1).transfer(feeTaker, claimed1); emit ClaimFees(msg.sender, feeTaker, _token0, claimed0); emit ClaimFees(msg.sender, feeTaker, _token1, claimed1); totalFeesPayouts[ _token0 ] += claimed0; // stores total token0 fees claimed since genesis totalFeesPayouts[ _token1 ] += claimed1; // stores total token1 fees claimed since genesis } return (claimed0, claimed1); } catch { ///dont revert if _claimFees_ fails, just skip it. Useful with fee-on-transfer tokens. return (0, 0); } } /* ========== RESTRICTED FUNCTIONS ========== */ function addReward(address _rewardsToken, address _rewardsDistributor, uint256 _rewardsDuration) public onlyOwner { require( isReward[_rewardsToken] == false && rewardData[_rewardsToken].rewardsDuration == 0 , "AI" // Already Initialized! ); require( _rewardsToken != address(stake), "!!stk"); // Cannot reward staking token! rewardTokens.push(_rewardsToken); isReward[_rewardsToken] = true; rewardData[_rewardsToken].rewardsDistributor = _rewardsDistributor; rewardData[_rewardsToken].rewardsDuration = _rewardsDuration; } /// This can break claims of rewards! /// Useful during a platform-wide upgrade (optional) function rescue(uint _amt, address _token, address _to) external onlyOwner { if(_token == address(stake)) { /// totalSupply marks the sum of all user deposits. /// surplus checks for any additional holdings that are not user-deposits /// Helps rescue of extra rewards from single-side same-token staking. uint _surplus = (stake.balanceOf(address(this))).sub(_totalSupply); require( _amt <= _surplus, "!!stk"); // Rescuing User Deposits Prohibited! } IERC20(_token).transfer(_to, _amt); emit Recovered(_token, _amt); } function setRewardsDuration(address _rewardsToken, uint256 _rewardsDuration) external onlyOwner { require( block.timestamp > rewardData[_rewardsToken].periodFinish, "RPa" // Reward period still active ); require(_rewardsDuration > 0, "0d"); // Reward duration must be non-zero rewardData[_rewardsToken].rewardsDuration = _rewardsDuration; emit RewardsDurationUpdated(_rewardsToken, rewardData[_rewardsToken].rewardsDuration); } function addBribeToken(address _t) public onlyOwner { require(isBribeToken[_t] == false, "BTa"); // Bribe Token already Active! require( _t != address(stake), "!!stk"); // Cannot bribe staking token! IERC20(_t).approve(address(bribe), type(uint256).max); bribeTokens.push(_t); isBribeToken[_t] = true; emit BribeTokenSet(_t, address(bribe), true); } function removeBribeToken(address _t) public onlyOwner { require(isBribeToken[_t] == true, "BTi"); // Bribe Token Inactive! IERC20(_t).approve(address(bribe), 0); uint _bl = bribeTokens.length; if(bribeTokens[_bl-1]==_t) { bribeTokens.pop(); isBribeToken[_t] = false; } else { for(uint i; i < bribeTokens.length - 1; i++) { if(bribeTokens[i]==_t) { bribeTokens[i] = bribeTokens[_bl-1]; bribeTokens.pop(); isBribeToken[_t] = false; } } } emit BribeTokenSet(_t, address(bribe), false); } function addBribeTokens(address[] memory _tks) external onlyOwner { for(uint _j; _j < _tks.length; _j++) { addBribeToken(_tks[_j]); } } function removeBribeTokens(address[] memory _tks) external onlyOwner { for(uint _j; _j < _tks.length; _j++) { removeBribeToken(_tks[_j]); } } /// When feeTaker is set, all Fees Claims go to it instead of going to the Bribe. /// Useful during a platform-wide upgrade (optional) function setFeeTaker(address _ft) external onlyOwner { feeTaker = _ft; } function setPaused(bool _b) external onlyOwner { paused = _b; } function setBribe(address _b) external { require(msg.sender==address(voter), "Who U"); // Un-authorized! address _ob = address(bribe); for(uint i;i<bribeTokens.length;i++) { address _rt = bribeTokens[i]; IERC20(_rt).approve(_ob, 0); // revoke old-bribe allowances IERC20(_rt).approve(_b, type(uint256).max); // approve new bribe } bribe = IBribe(_b); } function setSplitParameters(uint256 _sr, uint256 _st) external onlyOwner { require(_sr<=1e6, "+SR"); // SR: Must be under a million! splitRatio = _sr; splitLocktime = _st; } /* ========== MODIFIERS ========== */ modifier updateReward(address account) { for (uint i; i < rewardTokens.length; i++) { address token = rewardTokens[i]; rewardData[token].rewardPerTokenStored = rewardPerToken(token); rewardData[token].lastUpdateTime = lastTimeRewardApplicable(token); if (account != address(0)) { rewards[account][token] = earnedBy(account, token); userRewardPerTokenPaid[account][token] = rewardData[token].rewardPerTokenStored; } } _; } modifier onlyOwner { require(msg.sender==ve.team(), "!TEAM"); // Only ve.team! _; } modifier notPaused { require(!paused, "PAUSE"); // Paused _; } /* ========== EVENTS ========== */ event RewardAdded(address indexed token, address indexed notifier, uint256 reward); event Deposit(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event Transfer(address indexed from, address indexed to, uint256 amount); event ClaimRewards(address indexed token, address indexed user, uint256 reward); event RewardsDurationUpdated(address indexed token, uint256 newDuration); event Recovered(address indexed token, uint256 amount); event BribeTokenSet(address indexed token, address indexed bribe, bool indexed active); event ProtocolFees(address indexed initiator, address indexed taker, address indexed token, uint amount); event ClaimFees(address indexed initiator, address indexed beneficiary, address indexed token, uint amount); } // File: contracts/factories/GaugeFactory.sol contract GaugeFactory is IGaugeFactory { address public lastGauge; event GaugeCreated(address indexed maker, address indexed pool, address g, address b, address v, bool i, address[] a); function createGauge( address _pool, address _bribe, address _ve, bool isPair, address[] memory _allowedRewards ) external returns (address) { GaugeEquivalent gauge = new GaugeEquivalent( _pool, _bribe, _ve, msg.sender, isPair, _allowedRewards ); lastGauge = address(gauge); emit GaugeCreated(msg.sender, _pool, address(gauge), _bribe, _ve, isPair, _allowedRewards); return lastGauge; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"maker","type":"address"},{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"address","name":"g","type":"address"},{"indexed":false,"internalType":"address","name":"b","type":"address"},{"indexed":false,"internalType":"address","name":"v","type":"address"},{"indexed":false,"internalType":"bool","name":"i","type":"bool"},{"indexed":false,"internalType":"address[]","name":"a","type":"address[]"}],"name":"GaugeCreated","type":"event"},{"inputs":[{"internalType":"address","name":"_pool","type":"address"},{"internalType":"address","name":"_bribe","type":"address"},{"internalType":"address","name":"_ve","type":"address"},{"internalType":"bool","name":"isPair","type":"bool"},{"internalType":"address[]","name":"_allowedRewards","type":"address[]"}],"name":"createGauge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastGauge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50615fe0806100206000396000f3fe60806040523480156200001157600080fd5b50600436106200003a5760003560e01c80631ede5a8e146200003f578063b46d34651462000072575b600080fd5b62000056620000503660046200018d565b62000086565b6040516001600160a01b03909116815260200160405180910390f35b60005462000056906001600160a01b031681565b6000808686863387876040516200009d906200014c565b620000ae96959493929190620002f9565b604051809103906000f080158015620000cb573d6000803e3d6000fd5b50600080546001600160a01b0319166001600160a01b038381169190911790915560405191925088169033907eaba88e0f5bf7d92560ada0256f8eba87415938ce7b97f4f1d2fb68ee78c1d4906200012d9085908b908b908b908b906200034b565b60405180910390a350506000546001600160a01b031695945050505050565b615c16806200039583390190565b80356001600160a01b03811681146200017257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080600060a08688031215620001a657600080fd5b620001b1866200015a565b94506020620001c28188016200015a565b9450620001d2604088016200015a565b935060608701358015158114620001e857600080fd5b9250608087013567ffffffffffffffff808211156200020657600080fd5b818901915089601f8301126200021b57600080fd5b81358181111562000230576200023062000177565b8060051b604051601f19603f8301168101818110858211171562000258576200025862000177565b60405291825284820192508381018501918c8311156200027757600080fd5b938501935b82851015620002a05762000290856200015a565b845293850193928501926200027c565b8096505050505050509295509295909350565b600081518084526020808501945080840160005b83811015620002ee5781516001600160a01b031687529582019590820190600101620002c7565b509495945050505050565b6001600160a01b0387811682528681166020830152858116604083015284166060820152821515608082015260c060a082018190526000906200033f90830184620002b3565b98975050505050505050565b6001600160a01b038681168252858116602083015284166040820152821515606082015260a0608082018190526000906200038990830184620002b3565b97965050505050505056fe60806040523480156200001157600080fd5b5060405162005c1638038062005c1683398101604081905262000034916200063b565b6001600081815581546001600160a01b03808a166001600160a01b031992831617909355600880548985169083161790556002805488851692168217905560038054861515600160a01b026001600160a81b0319909116948816949094179390931790925560408051637e062a3560e11b8152905191929163fc0c546a91600480820192602092909190829003018186803b158015620000d357600080fd5b505afa158015620000e8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200010e91906200076c565b600480546001600160a01b0319166001600160a01b03831617905562eff100601155905060005b8251811015620002f05760006001600160a01b03168382815181106200015f576200015f62000791565b60200260200101516001600160a01b031614620002db576001600b600085848151811062000191576200019162000791565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055506006838281518110620001e757620001e762000791565b6020908102919091018101518254600181018455600093845291832090910180546001600160a01b0319166001600160a01b03909216919091179055835186916005918690859081106200023f576200023f62000791565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555062093a8060056000858481518110620002ab57620002ab62000791565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600101819055505b80620002e781620007a7565b91505062000135565b5082156200056257600080886001600160a01b0316639d63848a6040518163ffffffff1660e01b81526004016040805180830381600087803b1580156200033657600080fd5b505af11580156200034b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003719190620007d1565b60405163095ea7b360e01b81526001600160a01b038b8116600483015260001960248301529294509092509083169063095ea7b390604401602060405180830381600087803b158015620003c457600080fd5b505af1158015620003d9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003ff919062000809565b5060405163095ea7b360e01b81526001600160a01b038981166004830152600019602483015282169063095ea7b390604401602060405180830381600087803b1580156200044c57600080fd5b505af115801562000461573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000487919062000809565b5060078054600181810183557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68891820180546001600160a01b038088166001600160a01b0319928316811790935585548085019096559490930180548686169416841790556000818152600c6020526040808220805460ff19908116861790915594825280822080549095168417909455925191938c1692909160008051602062005bf68339815191529190a46040516001906001600160a01b03808b16919084169060008051602062005bf683398151915290600090a450505b60405163095ea7b360e01b81526001600160a01b038681166004830152600019602483015282169063095ea7b390604401602060405180830381600087803b158015620005ae57600080fd5b505af1158015620005c3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005e9919062000809565b505050505050505062000827565b80516001600160a01b03811681146200060f57600080fd5b919050565b805180151581146200060f57600080fd5b634e487b7160e01b600052604160045260246000fd5b60008060008060008060c087890312156200065557600080fd5b6200066087620005f7565b9550602062000671818901620005f7565b95506200068160408901620005f7565b94506200069160608901620005f7565b9350620006a16080890162000614565b60a08901519093506001600160401b0380821115620006bf57600080fd5b818a0191508a601f830112620006d457600080fd5b815181811115620006e957620006e962000625565b8060051b604051601f19603f8301168101818110858211171562000711576200071162000625565b60405291825284820192508381018501918d8311156200073057600080fd5b938501935b8285101562000759576200074985620005f7565b8452938501939285019262000735565b8096505050505050509295509295509295565b6000602082840312156200077f57600080fd5b6200078a82620005f7565b9392505050565b634e487b7160e01b600052603260045260246000fd5b6000600019821415620007ca57634e487b7160e01b600052601160045260246000fd5b5060010190565b60008060408385031215620007e557600080fd5b620007f083620005f7565b91506200080060208401620005f7565b90509250929050565b6000602082840312156200081c57600080fd5b6200078a8262000614565b6153bf80620008376000396000f3fe608060405234801561001057600080fd5b50600436106103af5760003560e01c80635a6e6eab116101f457806399bcc0521161011a578063de5f6268116100ad578063e81defce1161007c578063e81defce14610931578063e9fad8ee14610944578063f12297771461094c578063f5ae22401461095f57600080fd5b8063de5f6268146108e2578063e5748213146108ea578063e6886396146108fe578063e70b9e271461090657600080fd5b8063d0ed26ae116100e9578063d0ed26ae14610863578063d294f09314610876578063da09d19d14610893578063dd501205146108bf57600080fd5b806399bcc05214610817578063b66503cf1461082a578063b6b55f251461083d578063bcd110141461085057600080fd5b8063749f1044116101925780638a501100116101615780638a501100146107e35780638dd598fb146107f65780638f27f1041461080757806395d89b411461080f57600080fd5b8063749f1044146107a257806376ad03bc146107b55780637bb7bed1146107c8578063853828b6146107db57600080fd5b8063638634ee116101ce578063638634ee1461071b57806365bcfbe71461072e5780637035ab981461074e57806370a082311461077957600080fd5b80635a6e6eab146106eb5780635c59f3bb146106fe5780635c975abb1461070757600080fd5b80632f4f21e2116102d95780633f695b45116102775780634d5ce038116102465780634d5ce0381461067f5780634ec5908d146106b257806352f18405146106c55780635557cc61146106d857600080fd5b80633f695b45146105c257806345797e67146105d557806346c96aac146105e857806348e5d9f8146105fb57600080fd5b8063313ce567116102b3578063313ce5671461058c57806337d0208c146105945780633a4b66f1146105a75780633d18b912146105ba57600080fd5b80632f4f21e2146105535780633010d8ef1461056657806331279d3d1461057957600080fd5b806318160ddd116103515780632378bea6116103205780632378bea6146104d65780632af2cecc146104e95780632ce9aead146105145780632e1a7d4d1461054057600080fd5b806318160ddd146104645780631f8507161461046c578063211dc32d14610497578063221ca18c146104aa57600080fd5b80630efeb2fb1161038d5780630efeb2fb146103fe578063102a7ad41461041e57806315ae92f71461043157806316c38b3c1461045157600080fd5b8063023df767146103b457806306fdde03146103c95780630a91a2c4146103e7575b600080fd5b6103c76103c2366004614d0b565b610972565b005b6103d1610bcc565b6040516103de9190614d54565b60405180910390f35b6103f060115481565b6040519081526020016103de565b6103f061040c366004614d0b565b60136020526000908152604090205481565b6103f061042c366004614d87565b610c71565b6103f061043f366004614d0b565b60156020526000908152604090205481565b6103c761045f366004614dce565b610d0c565b600d546103f0565b60025461047f906001600160a01b031681565b6040516001600160a01b0390911681526020016103de565b6103f06104a5366004614d87565b610de2565b6103f06104b8366004614d0b565b6001600160a01b031660009081526005602052604090206003015490565b6103c76104e4366004614deb565b610dee565b6103f06104f7366004614d87565b601460209081526000928352604080842090915290825290205481565b6103f0610522366004614d0b565b6001600160a01b031660009081526005602052604090206004015490565b6103c761054e366004614e17565b610f87565b6103c7610561366004614deb565b6111dc565b6103c7610574366004614d0b565b61145d565b6103c7610587366004614f00565b6114e1565b6103f06115ac565b60085461047f906001600160a01b031681565b60015461047f906001600160a01b031681565b6103c7611631565b6103c76105d0366004614d87565b6117ea565b6103c76105e3366004614f50565b6118d0565b60035461047f906001600160a01b031681565b610648610609366004614d0b565b60056020819052600091825260409091208054600182015460028301546003840154600485015494909501546001600160a01b03909316949193909286565b604080516001600160a01b0390971687526020870195909552938501929092526060840152608083015260a082015260c0016103de565b6106a261068d366004614d0b565b600b6020526000908152604090205460ff1681565b60405190151581526020016103de565b6103c76106c0366004614d0b565b6119cc565b6103c76106d3366004614f72565b611aa6565b6103c76106e6366004614d0b565b611b9e565b6103c76106f9366004614f72565b611f41565b6103f060105481565b6004546106a290600160a01b900460ff1681565b6103f0610729366004614d0b565b612039565b6103f061073c366004614d0b565b60126020526000908152604090205481565b6103f061075c366004614d87565b600960209081526000928352604080842090915290825290205481565b6103f0610787366004614d0b565b6001600160a01b03166000908152600e602052604090205490565b600f5461047f906001600160a01b031681565b60045461047f906001600160a01b031681565b61047f6107d6366004614e17565b612060565b6103c761208a565b6103c76107f1366004614fa7565b6120a5565b6002546001600160a01b031661047f565b6007546103f0565b6103d16122e8565b6103f0610825366004614d0b565b612379565b6103c7610838366004614deb565b6123fa565b6103c761084b366004614e17565b612a4e565b6103f061085e366004614d0b565b612c85565b6103c7610871366004614fe9565b612cb1565b61087e612e8c565b604080519283526020830191909152016103de565b6103f06108a1366004614d0b565b6001600160a01b031660009081526005602052604090206002015490565b6106a26108cd366004614d0b565b600c6020526000908152604090205460ff1681565b6103c7612edb565b6003546106a290600160a01b900460ff1681565b6006546103f0565b6103f0610914366004614d87565b600a60209081526000928352604080842090915290825290205481565b6103c761093f366004614d0b565b612f58565b6103c7613111565b6103f061095a366004614d0b565b613132565b61047f61096d366004614e17565b6131d6565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156109c257600080fd5b505af11580156109d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fa919061502a565b6001600160a01b0316336001600160a01b031614610a335760405162461bcd60e51b8152600401610a2a90615047565b60405180910390fd5b6001600160a01b0381166000908152600c602052604090205460ff1615610a825760405162461bcd60e51b815260206004820152600360248201526242546160e81b6044820152606401610a2a565b6001546001600160a01b0382811691161415610ab05760405162461bcd60e51b8152600401610a2a90615066565b60085460405163095ea7b360e01b81526001600160a01b038381169263095ea7b392610ae6929091169060001990600401615085565b602060405180830381600087803b158015610b0057600080fd5b505af1158015610b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b38919061509e565b506007805460018082019092557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b0319166001600160a01b038481169182179092556000818152600c6020526040808220805460ff19168617905560085490519316927f6f3d0c80b7142a8d817dfedfe293680f67ba78aacbbc59db82973fd195982d059190a450565b600154604080516306fdde0360e01b815290516060926001600160a01b0316916306fdde03916004808301926000929190829003018186803b158015610c1157600080fd5b505afa158015610c25573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c4d91908101906150bb565b604051602001610c5d919061514f565b604051602081830303815290604052905090565b6001600160a01b038083166000818152600a60209081526040808320948616808452948252808320549383526009825280832094835293905291822054610d039190610cfd90670de0b6b3a764000090610cf790610cd890610cd289613132565b906131e6565b6001600160a01b0389166000908152600e60205260409020549061323c565b906132a1565b906132ed565b90505b92915050565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610d5c57600080fd5b505af1158015610d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d94919061502a565b6001600160a01b0316336001600160a01b031614610dc45760405162461bcd60e51b8152600401610a2a90615047565b60048054911515600160a01b0260ff60a01b19909216919091179055565b6000610d038284610c71565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610e3e57600080fd5b505af1158015610e52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e76919061502a565b6001600160a01b0316336001600160a01b031614610ea65760405162461bcd60e51b8152600401610a2a90615047565b6001600160a01b0382166000908152600560205260409020600201544211610ef65760405162461bcd60e51b815260206004820152600360248201526252506160e81b6044820152606401610a2a565b60008111610f2b5760405162461bcd60e51b81526020600482015260026024820152610c1960f21b6044820152606401610a2a565b6001600160a01b03821660008181526005602052604090819020600101839055517fad2f86b01ed93b4b3a150d448c61a4f5d8d38075d3c0c64cc0a26fd6e1f4954590610f7b9084815260200190565b60405180910390a25050565b6001600080828254610f9991906151a1565b9091555050600080549033905b60065481101561109b57600060068281548110610fc557610fc56151b9565b6000918252602090912001546001600160a01b03169050610fe581613132565b6001600160a01b0382166000908152600560208190526040909120015561100b81612039565b6001600160a01b038083166000908152600560205260409020600401919091558316156110885761103c8382610c71565b6001600160a01b038085166000818152600a6020908152604080832094871680845294825280832095909555600580825285832001549282526009815284822093825292909252919020555b5080611093816151cf565b915050610fa6565b50600083116110bc5760405162461bcd60e51b8152600401610a2a906151ea565b600d5483106110f25760405162461bcd60e51b81526020600482015260026024820152610c1d60f21b6044820152606401610a2a565b600d546110ff90846131e6565b600d55336000908152600e602052604090205461111c90846131e6565b336000818152600e6020526040902091909155600154611148916001600160a01b03909116908561333c565b60405183815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a260405183815260009033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35060005481146111d85760405162461bcd60e51b8152600401610a2a90615206565b5050565b60016000808282546111ee91906151a1565b9091555050600054600454600160a01b900460ff16156112385760405162461bcd60e51b8152602060048201526005602482015264504155534560d81b6044820152606401610a2a565b8260005b6006548110156113315760006006828154811061125b5761125b6151b9565b6000918252602090912001546001600160a01b0316905061127b81613132565b6001600160a01b038216600090815260056020819052604090912001556112a181612039565b6001600160a01b0380831660009081526005602052604090206004019190915583161561131e576112d28382610c71565b6001600160a01b038085166000818152600a6020908152604080832094871680845294825280832095909555600580825285832001549282526009815284822093825292909252919020555b5080611329816151cf565b91505061123c565b50600083116113525760405162461bcd60e51b8152600401610a2a906151ea565b600d5461135f90846132ed565b600d556001600160a01b0384166000908152600e602052604090205461138590846132ed565b6001600160a01b038086166000908152600e60205260409020919091556001546113b29116333086613392565b836001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c846040516113ed91815260200190565b60405180910390a26040518381526001600160a01b038516906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35060005481146114585760405162461bcd60e51b8152600401610a2a90615206565b505050565b6001546040516370a0823160e01b81523360048201526114de9183916001600160a01b03909116906370a082319060240160206040518083038186803b1580156114a657600080fd5b505afa1580156114ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105619190615223565b50565b336001600160a01b038316148061150257506003546001600160a01b031633145b6115455760405162461bcd60e51b8152602060048201526014602482015273556e2d617574686f72697a656420636c61696d2160601b6044820152606401610a2a565b6003546040516363453ae160e01b81523060048201526001600160a01b03909116906363453ae190602401600060405180830381600087803b15801561158a57600080fd5b505af115801561159e573d6000803e3d6000fd5b505050506111d882826133d0565b6001546040805163313ce56760e01b815290516000926001600160a01b03169163313ce567916004808301926020929190829003018186803b1580156115f157600080fd5b505afa158015611605573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611629919061523c565b60ff16905090565b600160008082825461164391906151a1565b9091555050600080549033905b6006548110156117455760006006828154811061166f5761166f6151b9565b6000918252602090912001546001600160a01b0316905061168f81613132565b6001600160a01b038216600090815260056020819052604090912001556116b581612039565b6001600160a01b03808316600090815260056020526040902060040191909155831615611732576116e68382610c71565b6001600160a01b038085166000818152600a6020908152604080832094871680845294825280832095909555600580825285832001549282526009815284822093825292909252919020555b508061173d816151cf565b915050611650565b5060005b6006548110156117bd57600060068281548110611768576117686151b9565b600091825260208083209091015433808452600a835260408085206001600160a01b039093168086529290935291909220549192506117a8908383613587565b505080806117b5906151cf565b915050611749565b506117c6613781565b50505060005481146114de5760405162461bcd60e51b8152600401610a2a90615206565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561183a57600080fd5b505af115801561184e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611872919061502a565b6001600160a01b0316336001600160a01b0316146118a25760405162461bcd60e51b8152600401610a2a90615047565b6001600160a01b03918216600090815260056020526040902080546001600160a01b03191691909216179055565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561192057600080fd5b505af1158015611934573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611958919061502a565b6001600160a01b0316336001600160a01b0316146119885760405162461bcd60e51b8152600401610a2a90615047565b620f42408211156119c15760405162461bcd60e51b815260206004820152600360248201526215a9a960e91b6044820152606401610a2a565b601091909155601155565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a1c57600080fd5b505af1158015611a30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a54919061502a565b6001600160a01b0316336001600160a01b031614611a845760405162461bcd60e51b8152600401610a2a90615047565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611af657600080fd5b505af1158015611b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b2e919061502a565b6001600160a01b0316336001600160a01b031614611b5e5760405162461bcd60e51b8152600401610a2a90615047565b60005b81518110156111d857611b8c828281518110611b7f57611b7f6151b9565b6020026020010151610972565b80611b96816151cf565b915050611b61565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611bee57600080fd5b505af1158015611c02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c26919061502a565b6001600160a01b0316336001600160a01b031614611c565760405162461bcd60e51b8152600401610a2a90615047565b6001600160a01b0381166000908152600c602052604090205460ff161515600114611ca95760405162461bcd60e51b815260206004820152600360248201526242546960e81b6044820152606401610a2a565b60085460405163095ea7b360e01b81526001600160a01b038381169263095ea7b392611cde9290911690600090600401615085565b602060405180830381600087803b158015611cf857600080fd5b505af1158015611d0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d30919061509e565b5060078054906001600160a01b03831690611d4c60018461525f565b81548110611d5c57611d5c6151b9565b6000918252602090912001546001600160a01b03161415611dcf576007805480611d8857611d88615276565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0384168252600c905260409020805460ff19169055611eff565b60005b600754611de19060019061525f565b811015611efd57826001600160a01b031660078281548110611e0557611e056151b9565b6000918252602090912001546001600160a01b03161415611eeb576007611e2d60018461525f565b81548110611e3d57611e3d6151b9565b600091825260209091200154600780546001600160a01b039092169183908110611e6957611e696151b9565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506007805480611ea857611ea8615276565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0385168252600c905260409020805460ff191690555b80611ef5816151cf565b915050611dd2565b505b6008546040516000916001600160a01b0390811691908516907f6f3d0c80b7142a8d817dfedfe293680f67ba78aacbbc59db82973fd195982d05908490a45050565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611f9157600080fd5b505af1158015611fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc9919061502a565b6001600160a01b0316336001600160a01b031614611ff95760405162461bcd60e51b8152600401610a2a90615047565b60005b81518110156111d85761202782828151811061201a5761201a6151b9565b6020026020010151611b9e565b80612031816151cf565b915050611ffc565b6001600160a01b038116600090815260056020526040812060020154610d06904290614b87565b6006818154811061207057600080fd5b6000918252602090912001546001600160a01b0316905081565b336000908152600e60205260409020546120a390610f87565b565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156120f557600080fd5b505af1158015612109573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061212d919061502a565b6001600160a01b0316336001600160a01b03161461215d5760405162461bcd60e51b8152600401610a2a90615047565b6001546001600160a01b038381169116141561221f57600d546001546040516370a0823160e01b81523060048201526000926121fb9290916001600160a01b03909116906370a08231906024015b60206040518083038186803b1580156121c357600080fd5b505afa1580156121d7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd29190615223565b90508084111561221d5760405162461bcd60e51b8152600401610a2a90615066565b505b60405163a9059cbb60e01b81526001600160a01b0383169063a9059cbb9061224d9084908790600401615085565b602060405180830381600087803b15801561226757600080fd5b505af115801561227b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229f919061509e565b50816001600160a01b03167f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28846040516122db91815260200190565b60405180910390a2505050565b600154604080516395d89b4160e01b815290516060926001600160a01b0316916395d89b41916004808301926000929190829003018186803b15801561232d57600080fd5b505afa158015612341573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261236991908101906150bb565b604051602001610c5d919061528c565b6001600160a01b03811660009081526005602052604081206002015442106123a357506000919050565b6001600160a01b0382166000908152600560205260408120600201546123c990426131e6565b6001600160a01b0384166000908152600560205260409020600301549091506123f390829061323c565b9392505050565b600160008082825461240c91906151a1565b90915550506000805490805b60065481101561250d57600060068281548110612437576124376151b9565b6000918252602090912001546001600160a01b0316905061245781613132565b6001600160a01b0382166000908152600560208190526040909120015561247d81612039565b6001600160a01b038083166000908152600560205260409020600401919091558316156124fa576124ae8382610c71565b6001600160a01b038085166000818152600a6020908152604080832094871680845294825280832095909555600580825285832001549282526009815284822093825292909252919020555b5080612505816151cf565b915050612418565b506001546001600160a01b038581169116141561253c5760405162461bcd60e51b8152600401610a2a90615066565b6001600160a01b0384166000908152600b602052604090205460ff166125955760405162461bcd60e51b815260206004820152600e60248201526d4e6f74206120726577617264212160901b6044820152606401610a2a565b6000600d54116125d55760405162461bcd60e51b815260206004820152600b60248201526a4e6f204661726d6572732160a81b6044820152606401610a2a565b6125dd613781565b50506040516370a0823160e01b81523060048201526000906001600160a01b038616906370a082319060240160206040518083038186803b15801561262157600080fd5b505afa158015612635573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126599190615223565b90506126706001600160a01b038616333087613392565b6040516370a0823160e01b81523060048201526000906001600160a01b038716906370a082319060240160206040518083038186803b1580156126b257600080fd5b505afa1580156126c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ea9190615223565b90506126f6828261525f565b94506000851161272d5760405162461bcd60e51b8152602060048201526002602482015261183960f11b6044820152606401610a2a565b6001600160a01b0386166000908152600560205260409020600201544210612797576001600160a01b0386166000908152600560205260409020600101546127769086906132a1565b6001600160a01b038716600090815260056020526040902060030155612977565b6001600160a01b038616600090815260056020526040812060038101546002909101549091906127c790426131e6565b6001600160a01b038916600090815260056020526040812060030154919250906127f290839061323c565b6001600160a01b038a1660009081526005602052604090206001015490915061281f90610cf78a846132ed565b6001600160a01b038a811660009081526005602052604090206003908101929092559054163314158061286c57506001600160a01b03898116600090815260056020526040902054163314155b806129105750600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156128c257600080fd5b505af11580156128d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128fa919061502a565b6001600160a01b0316336001600160a01b031614155b15612973576001600160a01b0389166000908152600560205260409020600301548311158061293e57508088115b6129735760405162461bcd60e51b8152600401610a2a906020808252600490820152634547504560e01b604082015260600190565b5050505b6001600160a01b038616600090815260056020526040902042600482018190556001909101546129a791906132ed565b6001600160a01b038716600081815260056020908152604091829020600201939093555187815233927f0f7cde3c0518e1cc590491be5861d70a2e333f7e65af2e1ebd91a3c9a3cc638d910160405180910390a36001600160a01b03861660009081526013602052604081208054879290612a239084906151a1565b9250508190555050505060005481146114585760405162461bcd60e51b8152600401610a2a90615206565b6001600080828254612a6091906151a1565b9091555050600054600454600160a01b900460ff1615612aaa5760405162461bcd60e51b8152602060048201526005602482015264504155534560d81b6044820152606401610a2a565b3360005b600654811015612ba357600060068281548110612acd57612acd6151b9565b6000918252602090912001546001600160a01b03169050612aed81613132565b6001600160a01b03821660009081526005602081905260409091200155612b1381612039565b6001600160a01b03808316600090815260056020526040902060040191909155831615612b9057612b448382610c71565b6001600160a01b038085166000818152600a6020908152604080832094871680845294825280832095909555600580825285832001549282526009815284822093825292909252919020555b5080612b9b816151cf565b915050612aae565b5060008311612bc45760405162461bcd60e51b8152600401610a2a906151ea565b600d54612bd190846132ed565b600d55336000908152600e6020526040902054612bee90846132ed565b336000818152600e6020526040902091909155600154612c1b916001600160a01b03909116903086613392565b60405183815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a260405183815233906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016111ae565b6001600160a01b03811660009081526005602052604081206001810154600390910154610d069161323c565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015612d0157600080fd5b505af1158015612d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d39919061502a565b6001600160a01b0316336001600160a01b031614612d695760405162461bcd60e51b8152600401610a2a90615047565b6001600160a01b0383166000908152600b602052604090205460ff16158015612dab57506001600160a01b038316600090815260056020526040902060010154155b612ddc5760405162461bcd60e51b8152602060048201526002602482015261414960f01b6044820152606401610a2a565b6001546001600160a01b0384811691161415612e0a5760405162461bcd60e51b8152600401610a2a90615066565b6006805460018181019092557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b039586166001600160a01b031991821681179092556000918252600b60209081526040808420805460ff19168617905560059091529091208054949095169316929092178355910155565b6000806001600080828254612ea191906151a1565b9091555050600054612eb1613781565b925092506000548114612ed65760405162461bcd60e51b8152600401610a2a90615206565b509091565b6001546040516370a0823160e01b81523360048201526120a3916001600160a01b0316906370a082319060240160206040518083038186803b158015612f2057600080fd5b505afa158015612f34573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084b9190615223565b6003546001600160a01b03163314612f9a5760405162461bcd60e51b815260206004820152600560248201526457686f205560d81b6044820152606401610a2a565b6008546001600160a01b031660005b6007548110156130ed57600060078281548110612fc857612fc86151b9565b600091825260208220015460405163095ea7b360e01b81526001600160a01b039091169250829163095ea7b391613003918791600401615085565b602060405180830381600087803b15801561301d57600080fd5b505af1158015613031573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613055919061509e565b5060405163095ea7b360e01b81526001600160a01b0382169063095ea7b39061308690879060001990600401615085565b602060405180830381600087803b1580156130a057600080fd5b505af11580156130b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d8919061509e565b505080806130e5906151cf565b915050612fa9565b5050600880546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600e602052604090205461312a90610f87565b6120a3611631565b6000600d546000141561315f57506001600160a01b03166000908152600560208190526040909120015490565b600d546001600160a01b03831660009081526005602052604090206003810154600490910154610d06926131b3929091610cf791670de0b6b3a7640000916131ad91908290610cd28b612039565b9061323c565b6001600160a01b03841660009081526005602081905260409091200154906132ed565b6007818154811061207057600080fd5b6000828211156132285760405162461bcd60e51b815260206004820152600d60248201526c29b0b332a6b0ba341d1016a7a360991b6044820152606401610a2a565b6000613234838561525f565b949350505050565b60008261324b57506000610d06565b600061325783856152b9565b90508261326485836152d8565b14610d035760405162461bcd60e51b815260206004820152600d60248201526c29b0b332a6b0ba341d101527a360991b6044820152606401610a2a565b60008082116132e15760405162461bcd60e51b815260206004820152600c60248201526b0536166654d6174683a202f360a41b6044820152606401610a2a565b600061323483856152d8565b6000806132fa83856151a1565b905083811015610d035760405162461bcd60e51b815260206004820152600d60248201526c29b0b332a6b0ba341d1015a7a360991b6044820152606401610a2a565b6114588363a9059cbb60e01b848460405160240161335b929190615085565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614b9d565b6040516001600160a01b03808516602483015283166044820152606481018290526133ca9085906323b872dd60e01b9060840161335b565b50505050565b60016000808282546133e291906151a1565b9091555050600080549083905b6006548110156134e45760006006828154811061340e5761340e6151b9565b6000918252602090912001546001600160a01b0316905061342e81613132565b6001600160a01b0382166000908152600560208190526040909120015561345481612039565b6001600160a01b038083166000908152600560205260409020600401919091558316156134d1576134858382610c71565b6001600160a01b038085166000818152600a6020908152604080832094871680845294825280832095909555600580825285832001549282526009815284822093825292909252919020555b50806134dc816151cf565b9150506133ef565b5060005b835181101561355a576000848281518110613505576135056151b9565b6020908102919091018101516001600160a01b038089166000908152600a8452604080822092841682529190935290912054909150613545878383613587565b50508080613552906151cf565b9150506134e8565b50613563613781565b50505060005481146114585760405162461bcd60e51b8152600401610a2a90615206565b8015611458576001600160a01b038084166000908152600a60209081526040808320868516808552925282209190915560045490911614156136b25760105480156136985760006135df620f4240610cf7858561323c565b60025460115460405163d4e54c3b60e01b81526004810184905260248101919091526001600160a01b03888116604483015292935091169063d4e54c3b90606401602060405180830381600087803b15801561363a57600080fd5b505af115801561364e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136729190615223565b506136928561368185846131e6565b6001600160a01b038716919061333c565b506136ac565b6136ac6001600160a01b038416858461333c565b506136c6565b6136c66001600160a01b038316848361333c565b826001600160a01b0316826001600160a01b03167f9aa05b3d70a9e3e2f004f039648839560576334fb45c81f91b6db03ad9e2efc98360405161370b91815260200190565b60405180910390a36001600160a01b0382166000908152601260205260408120805483929061373b9084906151a1565b90915550506001600160a01b038084166000908152601460209081526040808320938616835292905290812080548392906137779084906151a1565b9091555050505050565b6000806000600360009054906101000a90046001600160a01b03166001600160a01b0316633f6678256040518163ffffffff1660e01b815260040160206040518083038186803b1580156137d457600080fd5b505afa1580156137e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061380c9190615223565b9050600080821161381e5760006138a4565b600360009054906101000a90046001600160a01b03166001600160a01b03166313416d996040518163ffffffff1660e01b815260040160206040518083038186803b15801561386c57600080fd5b505afa158015613880573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138a4919061502a565b600354909150600160a01b900460ff166142625760075460008167ffffffffffffffff8111156138d6576138d6614e30565b6040519080825280602002602001820160405280156138ff578160200160208202803683370190505b50905060008267ffffffffffffffff81111561391d5761391d614e30565b604051908082528060200260200182016040528015613946578160200160208202803683370190505b50905060005b83811015613ab65760078181548110613967576139676151b9565b9060005260206000200160009054906101000a90046001600160a01b0316838281518110613997576139976151b9565b60200260200101906001600160a01b031690816001600160a01b03168152505060006001600160a01b03168382815181106139d4576139d46151b9565b60200260200101516001600160a01b031614613a84578281815181106139fc576139fc6151b9565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015613a4757600080fd5b505afa158015613a5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a7f9190615223565b613a87565b60005b828281518110613a9957613a996151b9565b602090810291909101015280613aae816151cf565b91505061394c565b506001546040805163d294f09360e01b815281516001600160a01b039093169263d294f093926004808401939192918290030181600087803b158015613afb57600080fd5b505af1925050508015613b2b575060408051601f3d908101601f19168201909252613b28918101906152fa565b60015b613b3e5750600096879650945050505050565b505060005b83811015614252576000806001600160a01b0316848381518110613b6957613b696151b9565b60200260200101516001600160a01b031614613c1957838281518110613b9157613b916151b9565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015613bdc57600080fd5b505afa158015613bf0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c149190615223565b613c1c565b60005b9050828281518110613c3057613c306151b9565b602002602001015181111561423f576000620f424088858581518110613c5857613c586151b9565b602002602001015184613c6b919061525f565b613c7591906152b9565b613c7f91906152d8565b1115613ea957838281518110613c9757613c976151b9565b60200260200101516001600160a01b031663a9059cbb87620f42408a613cdf888881518110613cc857613cc86151b9565b6020026020010151876131e690919063ffffffff16565b613ce991906152b9565b613cf391906152d8565b6040518363ffffffff1660e01b8152600401613d10929190615085565b602060405180830381600087803b158015613d2a57600080fd5b505af1158015613d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d62919061509e565b50838281518110613d7557613d756151b9565b60200260200101516001600160a01b0316866001600160a01b0316336001600160a01b03167f78c0b7f8dc279098cd35e7f6ed62faef6b268eb5f31ece1326f32e1bc1d5a048620f42408b613dec898981518110613dd557613dd56151b9565b6020026020010151886131e690919063ffffffff16565b613df691906152b9565b613e0091906152d8565b60405190815260200160405180910390a4838281518110613e2357613e236151b9565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015613e6e57600080fd5b505afa158015613e82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ea69190615223565b90505b600f546001600160a01b03166140735760085484516001600160a01b039091169063b66503cf90869085908110613ee257613ee26151b9565b6020026020010151613f16868681518110613eff57613eff6151b9565b6020026020010151856131e690919063ffffffff16565b6040518363ffffffff1660e01b8152600401613f33929190615085565b600060405180830381600087803b158015613f4d57600080fd5b505af1158015613f61573d6000803e3d6000fd5b50505050838281518110613f7757613f776151b9565b60200260200101516001600160a01b0316600860009054906101000a90046001600160a01b03166001600160a01b0316336001600160a01b031660008051602061536a833981519152868681518110613fd257613fd26151b9565b602002602001015185613fe5919061525f565b60405190815260200160405180910390a4828281518110614008576140086151b9565b60200260200101518161401b919061525f565b60156000868581518110614031576140316151b9565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600082825461406891906151a1565b9091555061423f9050565b838281518110614085576140856151b9565b60200260200101516001600160a01b031663a9059cbb600f60009054906101000a90046001600160a01b03166140c6868681518110613eff57613eff6151b9565b6040518363ffffffff1660e01b81526004016140e3929190615085565b602060405180830381600087803b1580156140fd57600080fd5b505af1158015614111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614135919061509e565b50838281518110614148576141486151b9565b60200260200101516001600160a01b0316600f60009054906101000a90046001600160a01b03166001600160a01b0316336001600160a01b031660008051602061536a8339815191528686815181106141a3576141a36151b9565b6020026020010151856141b6919061525f565b60405190815260200160405180910390a48282815181106141d9576141d96151b9565b6020026020010151816141ec919061525f565b60156000868581518110614202576142026151b9565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600082825461423991906151a1565b90915550505b508061424a816151cf565b915050613b43565b5060009788975095505050505050565b60015460408051634eb1c24560e11b8152815160009384936001600160a01b0390911692639d63848a926004808301939282900301818787803b1580156142a857600080fd5b505af11580156142bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142e0919061531e565b6040516370a0823160e01b815230600482015291935091506000906001600160a01b038416906370a082319060240160206040518083038186803b15801561432757600080fd5b505afa15801561433b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061435f9190615223565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a082319060240160206040518083038186803b1580156143a457600080fd5b505afa1580156143b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143dc9190615223565b6001546040805163d294f09360e01b815281519394506001600160a01b039092169263d294f0939260048082019392918290030181600087803b15801561442257600080fd5b505af1925050508015614452575060408051601f3d908101601f1916820190925261444f918101906152fa565b60015b614466575060009788975095505050505050565b50506040516370a0823160e01b815230600482015282906001600160a01b038616906370a082319060240160206040518083038186803b1580156144a957600080fd5b505afa1580156144bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144e19190615223565b6144eb919061525f565b6040516370a0823160e01b815230600482015290985081906001600160a01b038516906370a082319060240160206040518083038186803b15801561452f57600080fd5b505afa158015614543573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145679190615223565b614571919061525f565b96506000620f4240614583888b6152b9565b61458d91906152d8565b11156146b9576001600160a01b03841663a9059cbb86620f42406145b18a8d6152b9565b6145bb91906152d8565b6040518363ffffffff1660e01b81526004016145d8929190615085565b602060405180830381600087803b1580156145f257600080fd5b505af1158015614606573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061462a919061509e565b506001600160a01b03808616908516337f78c0b7f8dc279098cd35e7f6ed62faef6b268eb5f31ece1326f32e1bc1d5a048620f42406146698b8e6152b9565b61467391906152d8565b60405190815260200160405180910390a46040516370a0823160e01b81523060048201526146b69083906001600160a01b038716906370a08231906024016121ab565b97505b6000620f42406146c9888a6152b9565b6146d391906152d8565b11156147ff576001600160a01b03831663a9059cbb86620f42406146f78a8c6152b9565b61470191906152d8565b6040518363ffffffff1660e01b815260040161471e929190615085565b602060405180830381600087803b15801561473857600080fd5b505af115801561474c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614770919061509e565b506001600160a01b03808616908416337f78c0b7f8dc279098cd35e7f6ed62faef6b268eb5f31ece1326f32e1bc1d5a048620f42406147af8b8d6152b9565b6147b991906152d8565b60405190815260200160405180910390a46040516370a0823160e01b81523060048201526147fc9082906001600160a01b038616906370a08231906024016121ab565b96505b600f546001600160a01b03166149ac5787156148db5760085460405163b66503cf60e01b81526001600160a01b039091169063b66503cf906148479087908c90600401615085565b600060405180830381600087803b15801561486157600080fd5b505af1158015614875573d6000803e3d6000fd5b505050506001600160a01b038416600090815260156020526040812080548a92906148a19084906151a1565b90915550506008546040518981526001600160a01b03868116921690339060008051602061536a8339815191529060200160405180910390a45b86156149a75760085460405163b66503cf60e01b81526001600160a01b039091169063b66503cf906149139086908b90600401615085565b600060405180830381600087803b15801561492d57600080fd5b505af1158015614941573d6000803e3d6000fd5b505050506001600160a01b0383166000908152601560205260408120805489929061496d9084906151a1565b90915550506008546040518881526001600160a01b03858116921690339060008051602061536a8339815191529060200160405180910390a45b614b7d565b600f5460405163a9059cbb60e01b81526001600160a01b038681169263a9059cbb926149e092909116908c90600401615085565b602060405180830381600087803b1580156149fa57600080fd5b505af1158015614a0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a32919061509e565b50600f5460405163a9059cbb60e01b81526001600160a01b038581169263a9059cbb92614a6792909116908b90600401615085565b602060405180830381600087803b158015614a8157600080fd5b505af1158015614a95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614ab9919061509e565b50600f546040518981526001600160a01b03868116921690339060008051602061536a8339815191529060200160405180910390a4600f546040518881526001600160a01b03858116921690339060008051602061536a8339815191529060200160405180910390a46001600160a01b038416600090815260156020526040812080548a9290614b4a9084906151a1565b90915550506001600160a01b03831660009081526015602052604081208054899290614b779084906151a1565b90915550505b5050505050509091565b6000818310614b965781610d03565b5090919050565b6001600160a01b0382163b614bf45760405162461bcd60e51b815260206004820152601760248201527f5361666545524332303a206e6f6e2d636f6e74726163740000000000000000006044820152606401610a2a565b600080836001600160a01b031683604051614c0f919061534d565b6000604051808303816000865af19150503d8060008114614c4c576040519150601f19603f3d011682016040523d82523d6000602084013e614c51565b606091505b509150915081614c995760405162461bcd60e51b815260206004820152601360248201527214d85999515490cc8c0e88131310c819985a5b606a1b6044820152606401610a2a565b8051156133ca5780806020019051810190614cb4919061509e565b6133ca5760405162461bcd60e51b81526020600482015260136024820152725361666545524332303a20217375636365737360681b6044820152606401610a2a565b6001600160a01b03811681146114de57600080fd5b600060208284031215614d1d57600080fd5b8135610d0381614cf6565b60005b83811015614d43578181015183820152602001614d2b565b838111156133ca5750506000910152565b6020815260008251806020840152614d73816040850160208701614d28565b601f01601f19169190910160400192915050565b60008060408385031215614d9a57600080fd5b8235614da581614cf6565b91506020830135614db581614cf6565b809150509250929050565b80151581146114de57600080fd5b600060208284031215614de057600080fd5b8135610d0381614dc0565b60008060408385031215614dfe57600080fd5b8235614e0981614cf6565b946020939093013593505050565b600060208284031215614e2957600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614e6f57614e6f614e30565b604052919050565b600082601f830112614e8857600080fd5b8135602067ffffffffffffffff821115614ea457614ea4614e30565b8160051b614eb3828201614e46565b9283528481018201928281019087851115614ecd57600080fd5b83870192505b84831015614ef5578235614ee681614cf6565b82529183019190830190614ed3565b979650505050505050565b60008060408385031215614f1357600080fd5b8235614f1e81614cf6565b9150602083013567ffffffffffffffff811115614f3a57600080fd5b614f4685828601614e77565b9150509250929050565b60008060408385031215614f6357600080fd5b50508035926020909101359150565b600060208284031215614f8457600080fd5b813567ffffffffffffffff811115614f9b57600080fd5b61323484828501614e77565b600080600060608486031215614fbc57600080fd5b833592506020840135614fce81614cf6565b91506040840135614fde81614cf6565b809150509250925092565b600080600060608486031215614ffe57600080fd5b833561500981614cf6565b9250602084013561501981614cf6565b929592945050506040919091013590565b60006020828403121561503c57600080fd5b8151610d0381614cf6565b602080825260059082015264215445414d60d81b604082015260600190565b602080825260059082015264212173746b60d81b604082015260600190565b6001600160a01b03929092168252602082015260400190565b6000602082840312156150b057600080fd5b8151610d0381614dc0565b6000602082840312156150cd57600080fd5b815167ffffffffffffffff808211156150e557600080fd5b818401915084601f8301126150f957600080fd5b81518181111561510b5761510b614e30565b61511e601f8201601f1916602001614e46565b915080825285602082850101111561513557600080fd5b615146816020840160208601614d28565b50949350505050565b73022b8bab0b634bd32b91023b0bab3b2903337b9160651b81526000825161517e816014850160208701614d28565b9190910160140192915050565b634e487b7160e01b600052601160045260246000fd5b600082198211156151b4576151b461518b565b500190565b634e487b7160e01b600052603260045260246000fd5b60006000198214156151e3576151e361518b565b5060010190565b602080825260029082015261306160f01b604082015260600190565b60208082526003908201526252472160e81b604082015260600190565b60006020828403121561523557600080fd5b5051919050565b60006020828403121561524e57600080fd5b815160ff81168114610d0357600080fd5b6000828210156152715761527161518b565b500390565b634e487b7160e01b600052603160045260246000fd5b6422a897239d60d91b8152600082516152ac816005850160208701614d28565b9190910160050192915050565b60008160001904831182151516156152d3576152d361518b565b500290565b6000826152f557634e487b7160e01b600052601260045260246000fd5b500490565b6000806040838503121561530d57600080fd5b505080516020909101519092909150565b6000806040838503121561533157600080fd5b825161533c81614cf6565b6020840151909250614db581614cf6565b6000825161535f818460208701614d28565b919091019291505056feee447878094bcc87bd81b55e4831b5e9e3d095866fce10f4f7e4caa64ea7a558a264697066735822122023af05e3daf5c615cce81ab6e1bd9272b0e1895173ea9881729dfe513f056e8364736f6c634300080900336f3d0c80b7142a8d817dfedfe293680f67ba78aacbbc59db82973fd195982d05a2646970667358221220083de4fbaa30d2a4ee1c42eabefd61c68cdc762e230f09f7038b8d969e320db664736f6c63430008090033
Deployed Bytecode
0x60806040523480156200001157600080fd5b50600436106200003a5760003560e01c80631ede5a8e146200003f578063b46d34651462000072575b600080fd5b62000056620000503660046200018d565b62000086565b6040516001600160a01b03909116815260200160405180910390f35b60005462000056906001600160a01b031681565b6000808686863387876040516200009d906200014c565b620000ae96959493929190620002f9565b604051809103906000f080158015620000cb573d6000803e3d6000fd5b50600080546001600160a01b0319166001600160a01b038381169190911790915560405191925088169033907eaba88e0f5bf7d92560ada0256f8eba87415938ce7b97f4f1d2fb68ee78c1d4906200012d9085908b908b908b908b906200034b565b60405180910390a350506000546001600160a01b031695945050505050565b615c16806200039583390190565b80356001600160a01b03811681146200017257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080600080600060a08688031215620001a657600080fd5b620001b1866200015a565b94506020620001c28188016200015a565b9450620001d2604088016200015a565b935060608701358015158114620001e857600080fd5b9250608087013567ffffffffffffffff808211156200020657600080fd5b818901915089601f8301126200021b57600080fd5b81358181111562000230576200023062000177565b8060051b604051601f19603f8301168101818110858211171562000258576200025862000177565b60405291825284820192508381018501918c8311156200027757600080fd5b938501935b82851015620002a05762000290856200015a565b845293850193928501926200027c565b8096505050505050509295509295909350565b600081518084526020808501945080840160005b83811015620002ee5781516001600160a01b031687529582019590820190600101620002c7565b509495945050505050565b6001600160a01b0387811682528681166020830152858116604083015284166060820152821515608082015260c060a082018190526000906200033f90830184620002b3565b98975050505050505050565b6001600160a01b038681168252858116602083015284166040820152821515606082015260a0608082018190526000906200038990830184620002b3565b97965050505050505056fe60806040523480156200001157600080fd5b5060405162005c1638038062005c1683398101604081905262000034916200063b565b6001600081815581546001600160a01b03808a166001600160a01b031992831617909355600880548985169083161790556002805488851692168217905560038054861515600160a01b026001600160a81b0319909116948816949094179390931790925560408051637e062a3560e11b8152905191929163fc0c546a91600480820192602092909190829003018186803b158015620000d357600080fd5b505afa158015620000e8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200010e91906200076c565b600480546001600160a01b0319166001600160a01b03831617905562eff100601155905060005b8251811015620002f05760006001600160a01b03168382815181106200015f576200015f62000791565b60200260200101516001600160a01b031614620002db576001600b600085848151811062000191576200019162000791565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055506006838281518110620001e757620001e762000791565b6020908102919091018101518254600181018455600093845291832090910180546001600160a01b0319166001600160a01b03909216919091179055835186916005918690859081106200023f576200023f62000791565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555062093a8060056000858481518110620002ab57620002ab62000791565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600101819055505b80620002e781620007a7565b91505062000135565b5082156200056257600080886001600160a01b0316639d63848a6040518163ffffffff1660e01b81526004016040805180830381600087803b1580156200033657600080fd5b505af11580156200034b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003719190620007d1565b60405163095ea7b360e01b81526001600160a01b038b8116600483015260001960248301529294509092509083169063095ea7b390604401602060405180830381600087803b158015620003c457600080fd5b505af1158015620003d9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003ff919062000809565b5060405163095ea7b360e01b81526001600160a01b038981166004830152600019602483015282169063095ea7b390604401602060405180830381600087803b1580156200044c57600080fd5b505af115801562000461573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000487919062000809565b5060078054600181810183557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68891820180546001600160a01b038088166001600160a01b0319928316811790935585548085019096559490930180548686169416841790556000818152600c6020526040808220805460ff19908116861790915594825280822080549095168417909455925191938c1692909160008051602062005bf68339815191529190a46040516001906001600160a01b03808b16919084169060008051602062005bf683398151915290600090a450505b60405163095ea7b360e01b81526001600160a01b038681166004830152600019602483015282169063095ea7b390604401602060405180830381600087803b158015620005ae57600080fd5b505af1158015620005c3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005e9919062000809565b505050505050505062000827565b80516001600160a01b03811681146200060f57600080fd5b919050565b805180151581146200060f57600080fd5b634e487b7160e01b600052604160045260246000fd5b60008060008060008060c087890312156200065557600080fd5b6200066087620005f7565b9550602062000671818901620005f7565b95506200068160408901620005f7565b94506200069160608901620005f7565b9350620006a16080890162000614565b60a08901519093506001600160401b0380821115620006bf57600080fd5b818a0191508a601f830112620006d457600080fd5b815181811115620006e957620006e962000625565b8060051b604051601f19603f8301168101818110858211171562000711576200071162000625565b60405291825284820192508381018501918d8311156200073057600080fd5b938501935b8285101562000759576200074985620005f7565b8452938501939285019262000735565b8096505050505050509295509295509295565b6000602082840312156200077f57600080fd5b6200078a82620005f7565b9392505050565b634e487b7160e01b600052603260045260246000fd5b6000600019821415620007ca57634e487b7160e01b600052601160045260246000fd5b5060010190565b60008060408385031215620007e557600080fd5b620007f083620005f7565b91506200080060208401620005f7565b90509250929050565b6000602082840312156200081c57600080fd5b6200078a8262000614565b6153bf80620008376000396000f3fe608060405234801561001057600080fd5b50600436106103af5760003560e01c80635a6e6eab116101f457806399bcc0521161011a578063de5f6268116100ad578063e81defce1161007c578063e81defce14610931578063e9fad8ee14610944578063f12297771461094c578063f5ae22401461095f57600080fd5b8063de5f6268146108e2578063e5748213146108ea578063e6886396146108fe578063e70b9e271461090657600080fd5b8063d0ed26ae116100e9578063d0ed26ae14610863578063d294f09314610876578063da09d19d14610893578063dd501205146108bf57600080fd5b806399bcc05214610817578063b66503cf1461082a578063b6b55f251461083d578063bcd110141461085057600080fd5b8063749f1044116101925780638a501100116101615780638a501100146107e35780638dd598fb146107f65780638f27f1041461080757806395d89b411461080f57600080fd5b8063749f1044146107a257806376ad03bc146107b55780637bb7bed1146107c8578063853828b6146107db57600080fd5b8063638634ee116101ce578063638634ee1461071b57806365bcfbe71461072e5780637035ab981461074e57806370a082311461077957600080fd5b80635a6e6eab146106eb5780635c59f3bb146106fe5780635c975abb1461070757600080fd5b80632f4f21e2116102d95780633f695b45116102775780634d5ce038116102465780634d5ce0381461067f5780634ec5908d146106b257806352f18405146106c55780635557cc61146106d857600080fd5b80633f695b45146105c257806345797e67146105d557806346c96aac146105e857806348e5d9f8146105fb57600080fd5b8063313ce567116102b3578063313ce5671461058c57806337d0208c146105945780633a4b66f1146105a75780633d18b912146105ba57600080fd5b80632f4f21e2146105535780633010d8ef1461056657806331279d3d1461057957600080fd5b806318160ddd116103515780632378bea6116103205780632378bea6146104d65780632af2cecc146104e95780632ce9aead146105145780632e1a7d4d1461054057600080fd5b806318160ddd146104645780631f8507161461046c578063211dc32d14610497578063221ca18c146104aa57600080fd5b80630efeb2fb1161038d5780630efeb2fb146103fe578063102a7ad41461041e57806315ae92f71461043157806316c38b3c1461045157600080fd5b8063023df767146103b457806306fdde03146103c95780630a91a2c4146103e7575b600080fd5b6103c76103c2366004614d0b565b610972565b005b6103d1610bcc565b6040516103de9190614d54565b60405180910390f35b6103f060115481565b6040519081526020016103de565b6103f061040c366004614d0b565b60136020526000908152604090205481565b6103f061042c366004614d87565b610c71565b6103f061043f366004614d0b565b60156020526000908152604090205481565b6103c761045f366004614dce565b610d0c565b600d546103f0565b60025461047f906001600160a01b031681565b6040516001600160a01b0390911681526020016103de565b6103f06104a5366004614d87565b610de2565b6103f06104b8366004614d0b565b6001600160a01b031660009081526005602052604090206003015490565b6103c76104e4366004614deb565b610dee565b6103f06104f7366004614d87565b601460209081526000928352604080842090915290825290205481565b6103f0610522366004614d0b565b6001600160a01b031660009081526005602052604090206004015490565b6103c761054e366004614e17565b610f87565b6103c7610561366004614deb565b6111dc565b6103c7610574366004614d0b565b61145d565b6103c7610587366004614f00565b6114e1565b6103f06115ac565b60085461047f906001600160a01b031681565b60015461047f906001600160a01b031681565b6103c7611631565b6103c76105d0366004614d87565b6117ea565b6103c76105e3366004614f50565b6118d0565b60035461047f906001600160a01b031681565b610648610609366004614d0b565b60056020819052600091825260409091208054600182015460028301546003840154600485015494909501546001600160a01b03909316949193909286565b604080516001600160a01b0390971687526020870195909552938501929092526060840152608083015260a082015260c0016103de565b6106a261068d366004614d0b565b600b6020526000908152604090205460ff1681565b60405190151581526020016103de565b6103c76106c0366004614d0b565b6119cc565b6103c76106d3366004614f72565b611aa6565b6103c76106e6366004614d0b565b611b9e565b6103c76106f9366004614f72565b611f41565b6103f060105481565b6004546106a290600160a01b900460ff1681565b6103f0610729366004614d0b565b612039565b6103f061073c366004614d0b565b60126020526000908152604090205481565b6103f061075c366004614d87565b600960209081526000928352604080842090915290825290205481565b6103f0610787366004614d0b565b6001600160a01b03166000908152600e602052604090205490565b600f5461047f906001600160a01b031681565b60045461047f906001600160a01b031681565b61047f6107d6366004614e17565b612060565b6103c761208a565b6103c76107f1366004614fa7565b6120a5565b6002546001600160a01b031661047f565b6007546103f0565b6103d16122e8565b6103f0610825366004614d0b565b612379565b6103c7610838366004614deb565b6123fa565b6103c761084b366004614e17565b612a4e565b6103f061085e366004614d0b565b612c85565b6103c7610871366004614fe9565b612cb1565b61087e612e8c565b604080519283526020830191909152016103de565b6103f06108a1366004614d0b565b6001600160a01b031660009081526005602052604090206002015490565b6106a26108cd366004614d0b565b600c6020526000908152604090205460ff1681565b6103c7612edb565b6003546106a290600160a01b900460ff1681565b6006546103f0565b6103f0610914366004614d87565b600a60209081526000928352604080842090915290825290205481565b6103c761093f366004614d0b565b612f58565b6103c7613111565b6103f061095a366004614d0b565b613132565b61047f61096d366004614e17565b6131d6565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156109c257600080fd5b505af11580156109d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fa919061502a565b6001600160a01b0316336001600160a01b031614610a335760405162461bcd60e51b8152600401610a2a90615047565b60405180910390fd5b6001600160a01b0381166000908152600c602052604090205460ff1615610a825760405162461bcd60e51b815260206004820152600360248201526242546160e81b6044820152606401610a2a565b6001546001600160a01b0382811691161415610ab05760405162461bcd60e51b8152600401610a2a90615066565b60085460405163095ea7b360e01b81526001600160a01b038381169263095ea7b392610ae6929091169060001990600401615085565b602060405180830381600087803b158015610b0057600080fd5b505af1158015610b14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b38919061509e565b506007805460018082019092557fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b0319166001600160a01b038481169182179092556000818152600c6020526040808220805460ff19168617905560085490519316927f6f3d0c80b7142a8d817dfedfe293680f67ba78aacbbc59db82973fd195982d059190a450565b600154604080516306fdde0360e01b815290516060926001600160a01b0316916306fdde03916004808301926000929190829003018186803b158015610c1157600080fd5b505afa158015610c25573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c4d91908101906150bb565b604051602001610c5d919061514f565b604051602081830303815290604052905090565b6001600160a01b038083166000818152600a60209081526040808320948616808452948252808320549383526009825280832094835293905291822054610d039190610cfd90670de0b6b3a764000090610cf790610cd890610cd289613132565b906131e6565b6001600160a01b0389166000908152600e60205260409020549061323c565b906132a1565b906132ed565b90505b92915050565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610d5c57600080fd5b505af1158015610d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d94919061502a565b6001600160a01b0316336001600160a01b031614610dc45760405162461bcd60e51b8152600401610a2a90615047565b60048054911515600160a01b0260ff60a01b19909216919091179055565b6000610d038284610c71565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015610e3e57600080fd5b505af1158015610e52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e76919061502a565b6001600160a01b0316336001600160a01b031614610ea65760405162461bcd60e51b8152600401610a2a90615047565b6001600160a01b0382166000908152600560205260409020600201544211610ef65760405162461bcd60e51b815260206004820152600360248201526252506160e81b6044820152606401610a2a565b60008111610f2b5760405162461bcd60e51b81526020600482015260026024820152610c1960f21b6044820152606401610a2a565b6001600160a01b03821660008181526005602052604090819020600101839055517fad2f86b01ed93b4b3a150d448c61a4f5d8d38075d3c0c64cc0a26fd6e1f4954590610f7b9084815260200190565b60405180910390a25050565b6001600080828254610f9991906151a1565b9091555050600080549033905b60065481101561109b57600060068281548110610fc557610fc56151b9565b6000918252602090912001546001600160a01b03169050610fe581613132565b6001600160a01b0382166000908152600560208190526040909120015561100b81612039565b6001600160a01b038083166000908152600560205260409020600401919091558316156110885761103c8382610c71565b6001600160a01b038085166000818152600a6020908152604080832094871680845294825280832095909555600580825285832001549282526009815284822093825292909252919020555b5080611093816151cf565b915050610fa6565b50600083116110bc5760405162461bcd60e51b8152600401610a2a906151ea565b600d5483106110f25760405162461bcd60e51b81526020600482015260026024820152610c1d60f21b6044820152606401610a2a565b600d546110ff90846131e6565b600d55336000908152600e602052604090205461111c90846131e6565b336000818152600e6020526040902091909155600154611148916001600160a01b03909116908561333c565b60405183815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d59060200160405180910390a260405183815260009033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35060005481146111d85760405162461bcd60e51b8152600401610a2a90615206565b5050565b60016000808282546111ee91906151a1565b9091555050600054600454600160a01b900460ff16156112385760405162461bcd60e51b8152602060048201526005602482015264504155534560d81b6044820152606401610a2a565b8260005b6006548110156113315760006006828154811061125b5761125b6151b9565b6000918252602090912001546001600160a01b0316905061127b81613132565b6001600160a01b038216600090815260056020819052604090912001556112a181612039565b6001600160a01b0380831660009081526005602052604090206004019190915583161561131e576112d28382610c71565b6001600160a01b038085166000818152600a6020908152604080832094871680845294825280832095909555600580825285832001549282526009815284822093825292909252919020555b5080611329816151cf565b91505061123c565b50600083116113525760405162461bcd60e51b8152600401610a2a906151ea565b600d5461135f90846132ed565b600d556001600160a01b0384166000908152600e602052604090205461138590846132ed565b6001600160a01b038086166000908152600e60205260409020919091556001546113b29116333086613392565b836001600160a01b03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c846040516113ed91815260200190565b60405180910390a26040518381526001600160a01b038516906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35060005481146114585760405162461bcd60e51b8152600401610a2a90615206565b505050565b6001546040516370a0823160e01b81523360048201526114de9183916001600160a01b03909116906370a082319060240160206040518083038186803b1580156114a657600080fd5b505afa1580156114ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105619190615223565b50565b336001600160a01b038316148061150257506003546001600160a01b031633145b6115455760405162461bcd60e51b8152602060048201526014602482015273556e2d617574686f72697a656420636c61696d2160601b6044820152606401610a2a565b6003546040516363453ae160e01b81523060048201526001600160a01b03909116906363453ae190602401600060405180830381600087803b15801561158a57600080fd5b505af115801561159e573d6000803e3d6000fd5b505050506111d882826133d0565b6001546040805163313ce56760e01b815290516000926001600160a01b03169163313ce567916004808301926020929190829003018186803b1580156115f157600080fd5b505afa158015611605573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611629919061523c565b60ff16905090565b600160008082825461164391906151a1565b9091555050600080549033905b6006548110156117455760006006828154811061166f5761166f6151b9565b6000918252602090912001546001600160a01b0316905061168f81613132565b6001600160a01b038216600090815260056020819052604090912001556116b581612039565b6001600160a01b03808316600090815260056020526040902060040191909155831615611732576116e68382610c71565b6001600160a01b038085166000818152600a6020908152604080832094871680845294825280832095909555600580825285832001549282526009815284822093825292909252919020555b508061173d816151cf565b915050611650565b5060005b6006548110156117bd57600060068281548110611768576117686151b9565b600091825260208083209091015433808452600a835260408085206001600160a01b039093168086529290935291909220549192506117a8908383613587565b505080806117b5906151cf565b915050611749565b506117c6613781565b50505060005481146114de5760405162461bcd60e51b8152600401610a2a90615206565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561183a57600080fd5b505af115801561184e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611872919061502a565b6001600160a01b0316336001600160a01b0316146118a25760405162461bcd60e51b8152600401610a2a90615047565b6001600160a01b03918216600090815260056020526040902080546001600160a01b03191691909216179055565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561192057600080fd5b505af1158015611934573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611958919061502a565b6001600160a01b0316336001600160a01b0316146119885760405162461bcd60e51b8152600401610a2a90615047565b620f42408211156119c15760405162461bcd60e51b815260206004820152600360248201526215a9a960e91b6044820152606401610a2a565b601091909155601155565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611a1c57600080fd5b505af1158015611a30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a54919061502a565b6001600160a01b0316336001600160a01b031614611a845760405162461bcd60e51b8152600401610a2a90615047565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611af657600080fd5b505af1158015611b0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b2e919061502a565b6001600160a01b0316336001600160a01b031614611b5e5760405162461bcd60e51b8152600401610a2a90615047565b60005b81518110156111d857611b8c828281518110611b7f57611b7f6151b9565b6020026020010151610972565b80611b96816151cf565b915050611b61565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611bee57600080fd5b505af1158015611c02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c26919061502a565b6001600160a01b0316336001600160a01b031614611c565760405162461bcd60e51b8152600401610a2a90615047565b6001600160a01b0381166000908152600c602052604090205460ff161515600114611ca95760405162461bcd60e51b815260206004820152600360248201526242546960e81b6044820152606401610a2a565b60085460405163095ea7b360e01b81526001600160a01b038381169263095ea7b392611cde9290911690600090600401615085565b602060405180830381600087803b158015611cf857600080fd5b505af1158015611d0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d30919061509e565b5060078054906001600160a01b03831690611d4c60018461525f565b81548110611d5c57611d5c6151b9565b6000918252602090912001546001600160a01b03161415611dcf576007805480611d8857611d88615276565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0384168252600c905260409020805460ff19169055611eff565b60005b600754611de19060019061525f565b811015611efd57826001600160a01b031660078281548110611e0557611e056151b9565b6000918252602090912001546001600160a01b03161415611eeb576007611e2d60018461525f565b81548110611e3d57611e3d6151b9565b600091825260209091200154600780546001600160a01b039092169183908110611e6957611e696151b9565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506007805480611ea857611ea8615276565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0385168252600c905260409020805460ff191690555b80611ef5816151cf565b915050611dd2565b505b6008546040516000916001600160a01b0390811691908516907f6f3d0c80b7142a8d817dfedfe293680f67ba78aacbbc59db82973fd195982d05908490a45050565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015611f9157600080fd5b505af1158015611fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc9919061502a565b6001600160a01b0316336001600160a01b031614611ff95760405162461bcd60e51b8152600401610a2a90615047565b60005b81518110156111d85761202782828151811061201a5761201a6151b9565b6020026020010151611b9e565b80612031816151cf565b915050611ffc565b6001600160a01b038116600090815260056020526040812060020154610d06904290614b87565b6006818154811061207057600080fd5b6000918252602090912001546001600160a01b0316905081565b336000908152600e60205260409020546120a390610f87565b565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156120f557600080fd5b505af1158015612109573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061212d919061502a565b6001600160a01b0316336001600160a01b03161461215d5760405162461bcd60e51b8152600401610a2a90615047565b6001546001600160a01b038381169116141561221f57600d546001546040516370a0823160e01b81523060048201526000926121fb9290916001600160a01b03909116906370a08231906024015b60206040518083038186803b1580156121c357600080fd5b505afa1580156121d7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd29190615223565b90508084111561221d5760405162461bcd60e51b8152600401610a2a90615066565b505b60405163a9059cbb60e01b81526001600160a01b0383169063a9059cbb9061224d9084908790600401615085565b602060405180830381600087803b15801561226757600080fd5b505af115801561227b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229f919061509e565b50816001600160a01b03167f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28846040516122db91815260200190565b60405180910390a2505050565b600154604080516395d89b4160e01b815290516060926001600160a01b0316916395d89b41916004808301926000929190829003018186803b15801561232d57600080fd5b505afa158015612341573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261236991908101906150bb565b604051602001610c5d919061528c565b6001600160a01b03811660009081526005602052604081206002015442106123a357506000919050565b6001600160a01b0382166000908152600560205260408120600201546123c990426131e6565b6001600160a01b0384166000908152600560205260409020600301549091506123f390829061323c565b9392505050565b600160008082825461240c91906151a1565b90915550506000805490805b60065481101561250d57600060068281548110612437576124376151b9565b6000918252602090912001546001600160a01b0316905061245781613132565b6001600160a01b0382166000908152600560208190526040909120015561247d81612039565b6001600160a01b038083166000908152600560205260409020600401919091558316156124fa576124ae8382610c71565b6001600160a01b038085166000818152600a6020908152604080832094871680845294825280832095909555600580825285832001549282526009815284822093825292909252919020555b5080612505816151cf565b915050612418565b506001546001600160a01b038581169116141561253c5760405162461bcd60e51b8152600401610a2a90615066565b6001600160a01b0384166000908152600b602052604090205460ff166125955760405162461bcd60e51b815260206004820152600e60248201526d4e6f74206120726577617264212160901b6044820152606401610a2a565b6000600d54116125d55760405162461bcd60e51b815260206004820152600b60248201526a4e6f204661726d6572732160a81b6044820152606401610a2a565b6125dd613781565b50506040516370a0823160e01b81523060048201526000906001600160a01b038616906370a082319060240160206040518083038186803b15801561262157600080fd5b505afa158015612635573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126599190615223565b90506126706001600160a01b038616333087613392565b6040516370a0823160e01b81523060048201526000906001600160a01b038716906370a082319060240160206040518083038186803b1580156126b257600080fd5b505afa1580156126c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ea9190615223565b90506126f6828261525f565b94506000851161272d5760405162461bcd60e51b8152602060048201526002602482015261183960f11b6044820152606401610a2a565b6001600160a01b0386166000908152600560205260409020600201544210612797576001600160a01b0386166000908152600560205260409020600101546127769086906132a1565b6001600160a01b038716600090815260056020526040902060030155612977565b6001600160a01b038616600090815260056020526040812060038101546002909101549091906127c790426131e6565b6001600160a01b038916600090815260056020526040812060030154919250906127f290839061323c565b6001600160a01b038a1660009081526005602052604090206001015490915061281f90610cf78a846132ed565b6001600160a01b038a811660009081526005602052604090206003908101929092559054163314158061286c57506001600160a01b03898116600090815260056020526040902054163314155b806129105750600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156128c257600080fd5b505af11580156128d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128fa919061502a565b6001600160a01b0316336001600160a01b031614155b15612973576001600160a01b0389166000908152600560205260409020600301548311158061293e57508088115b6129735760405162461bcd60e51b8152600401610a2a906020808252600490820152634547504560e01b604082015260600190565b5050505b6001600160a01b038616600090815260056020526040902042600482018190556001909101546129a791906132ed565b6001600160a01b038716600081815260056020908152604091829020600201939093555187815233927f0f7cde3c0518e1cc590491be5861d70a2e333f7e65af2e1ebd91a3c9a3cc638d910160405180910390a36001600160a01b03861660009081526013602052604081208054879290612a239084906151a1565b9250508190555050505060005481146114585760405162461bcd60e51b8152600401610a2a90615206565b6001600080828254612a6091906151a1565b9091555050600054600454600160a01b900460ff1615612aaa5760405162461bcd60e51b8152602060048201526005602482015264504155534560d81b6044820152606401610a2a565b3360005b600654811015612ba357600060068281548110612acd57612acd6151b9565b6000918252602090912001546001600160a01b03169050612aed81613132565b6001600160a01b03821660009081526005602081905260409091200155612b1381612039565b6001600160a01b03808316600090815260056020526040902060040191909155831615612b9057612b448382610c71565b6001600160a01b038085166000818152600a6020908152604080832094871680845294825280832095909555600580825285832001549282526009815284822093825292909252919020555b5080612b9b816151cf565b915050612aae565b5060008311612bc45760405162461bcd60e51b8152600401610a2a906151ea565b600d54612bd190846132ed565b600d55336000908152600e6020526040902054612bee90846132ed565b336000818152600e6020526040902091909155600154612c1b916001600160a01b03909116903086613392565b60405183815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a260405183815233906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016111ae565b6001600160a01b03811660009081526005602052604081206001810154600390910154610d069161323c565b600260009054906101000a90046001600160a01b03166001600160a01b03166385f2aef26040518163ffffffff1660e01b8152600401602060405180830381600087803b158015612d0157600080fd5b505af1158015612d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d39919061502a565b6001600160a01b0316336001600160a01b031614612d695760405162461bcd60e51b8152600401610a2a90615047565b6001600160a01b0383166000908152600b602052604090205460ff16158015612dab57506001600160a01b038316600090815260056020526040902060010154155b612ddc5760405162461bcd60e51b8152602060048201526002602482015261414960f01b6044820152606401610a2a565b6001546001600160a01b0384811691161415612e0a5760405162461bcd60e51b8152600401610a2a90615066565b6006805460018181019092557ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b039586166001600160a01b031991821681179092556000918252600b60209081526040808420805460ff19168617905560059091529091208054949095169316929092178355910155565b6000806001600080828254612ea191906151a1565b9091555050600054612eb1613781565b925092506000548114612ed65760405162461bcd60e51b8152600401610a2a90615206565b509091565b6001546040516370a0823160e01b81523360048201526120a3916001600160a01b0316906370a082319060240160206040518083038186803b158015612f2057600080fd5b505afa158015612f34573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084b9190615223565b6003546001600160a01b03163314612f9a5760405162461bcd60e51b815260206004820152600560248201526457686f205560d81b6044820152606401610a2a565b6008546001600160a01b031660005b6007548110156130ed57600060078281548110612fc857612fc86151b9565b600091825260208220015460405163095ea7b360e01b81526001600160a01b039091169250829163095ea7b391613003918791600401615085565b602060405180830381600087803b15801561301d57600080fd5b505af1158015613031573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613055919061509e565b5060405163095ea7b360e01b81526001600160a01b0382169063095ea7b39061308690879060001990600401615085565b602060405180830381600087803b1580156130a057600080fd5b505af11580156130b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130d8919061509e565b505080806130e5906151cf565b915050612fa9565b5050600880546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600e602052604090205461312a90610f87565b6120a3611631565b6000600d546000141561315f57506001600160a01b03166000908152600560208190526040909120015490565b600d546001600160a01b03831660009081526005602052604090206003810154600490910154610d06926131b3929091610cf791670de0b6b3a7640000916131ad91908290610cd28b612039565b9061323c565b6001600160a01b03841660009081526005602081905260409091200154906132ed565b6007818154811061207057600080fd5b6000828211156132285760405162461bcd60e51b815260206004820152600d60248201526c29b0b332a6b0ba341d1016a7a360991b6044820152606401610a2a565b6000613234838561525f565b949350505050565b60008261324b57506000610d06565b600061325783856152b9565b90508261326485836152d8565b14610d035760405162461bcd60e51b815260206004820152600d60248201526c29b0b332a6b0ba341d101527a360991b6044820152606401610a2a565b60008082116132e15760405162461bcd60e51b815260206004820152600c60248201526b0536166654d6174683a202f360a41b6044820152606401610a2a565b600061323483856152d8565b6000806132fa83856151a1565b905083811015610d035760405162461bcd60e51b815260206004820152600d60248201526c29b0b332a6b0ba341d1015a7a360991b6044820152606401610a2a565b6114588363a9059cbb60e01b848460405160240161335b929190615085565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614b9d565b6040516001600160a01b03808516602483015283166044820152606481018290526133ca9085906323b872dd60e01b9060840161335b565b50505050565b60016000808282546133e291906151a1565b9091555050600080549083905b6006548110156134e45760006006828154811061340e5761340e6151b9565b6000918252602090912001546001600160a01b0316905061342e81613132565b6001600160a01b0382166000908152600560208190526040909120015561345481612039565b6001600160a01b038083166000908152600560205260409020600401919091558316156134d1576134858382610c71565b6001600160a01b038085166000818152600a6020908152604080832094871680845294825280832095909555600580825285832001549282526009815284822093825292909252919020555b50806134dc816151cf565b9150506133ef565b5060005b835181101561355a576000848281518110613505576135056151b9565b6020908102919091018101516001600160a01b038089166000908152600a8452604080822092841682529190935290912054909150613545878383613587565b50508080613552906151cf565b9150506134e8565b50613563613781565b50505060005481146114585760405162461bcd60e51b8152600401610a2a90615206565b8015611458576001600160a01b038084166000908152600a60209081526040808320868516808552925282209190915560045490911614156136b25760105480156136985760006135df620f4240610cf7858561323c565b60025460115460405163d4e54c3b60e01b81526004810184905260248101919091526001600160a01b03888116604483015292935091169063d4e54c3b90606401602060405180830381600087803b15801561363a57600080fd5b505af115801561364e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136729190615223565b506136928561368185846131e6565b6001600160a01b038716919061333c565b506136ac565b6136ac6001600160a01b038416858461333c565b506136c6565b6136c66001600160a01b038316848361333c565b826001600160a01b0316826001600160a01b03167f9aa05b3d70a9e3e2f004f039648839560576334fb45c81f91b6db03ad9e2efc98360405161370b91815260200190565b60405180910390a36001600160a01b0382166000908152601260205260408120805483929061373b9084906151a1565b90915550506001600160a01b038084166000908152601460209081526040808320938616835292905290812080548392906137779084906151a1565b9091555050505050565b6000806000600360009054906101000a90046001600160a01b03166001600160a01b0316633f6678256040518163ffffffff1660e01b815260040160206040518083038186803b1580156137d457600080fd5b505afa1580156137e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061380c9190615223565b9050600080821161381e5760006138a4565b600360009054906101000a90046001600160a01b03166001600160a01b03166313416d996040518163ffffffff1660e01b815260040160206040518083038186803b15801561386c57600080fd5b505afa158015613880573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138a4919061502a565b600354909150600160a01b900460ff166142625760075460008167ffffffffffffffff8111156138d6576138d6614e30565b6040519080825280602002602001820160405280156138ff578160200160208202803683370190505b50905060008267ffffffffffffffff81111561391d5761391d614e30565b604051908082528060200260200182016040528015613946578160200160208202803683370190505b50905060005b83811015613ab65760078181548110613967576139676151b9565b9060005260206000200160009054906101000a90046001600160a01b0316838281518110613997576139976151b9565b60200260200101906001600160a01b031690816001600160a01b03168152505060006001600160a01b03168382815181106139d4576139d46151b9565b60200260200101516001600160a01b031614613a84578281815181106139fc576139fc6151b9565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015613a4757600080fd5b505afa158015613a5b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a7f9190615223565b613a87565b60005b828281518110613a9957613a996151b9565b602090810291909101015280613aae816151cf565b91505061394c565b506001546040805163d294f09360e01b815281516001600160a01b039093169263d294f093926004808401939192918290030181600087803b158015613afb57600080fd5b505af1925050508015613b2b575060408051601f3d908101601f19168201909252613b28918101906152fa565b60015b613b3e5750600096879650945050505050565b505060005b83811015614252576000806001600160a01b0316848381518110613b6957613b696151b9565b60200260200101516001600160a01b031614613c1957838281518110613b9157613b916151b9565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015613bdc57600080fd5b505afa158015613bf0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c149190615223565b613c1c565b60005b9050828281518110613c3057613c306151b9565b602002602001015181111561423f576000620f424088858581518110613c5857613c586151b9565b602002602001015184613c6b919061525f565b613c7591906152b9565b613c7f91906152d8565b1115613ea957838281518110613c9757613c976151b9565b60200260200101516001600160a01b031663a9059cbb87620f42408a613cdf888881518110613cc857613cc86151b9565b6020026020010151876131e690919063ffffffff16565b613ce991906152b9565b613cf391906152d8565b6040518363ffffffff1660e01b8152600401613d10929190615085565b602060405180830381600087803b158015613d2a57600080fd5b505af1158015613d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d62919061509e565b50838281518110613d7557613d756151b9565b60200260200101516001600160a01b0316866001600160a01b0316336001600160a01b03167f78c0b7f8dc279098cd35e7f6ed62faef6b268eb5f31ece1326f32e1bc1d5a048620f42408b613dec898981518110613dd557613dd56151b9565b6020026020010151886131e690919063ffffffff16565b613df691906152b9565b613e0091906152d8565b60405190815260200160405180910390a4838281518110613e2357613e236151b9565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015613e6e57600080fd5b505afa158015613e82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ea69190615223565b90505b600f546001600160a01b03166140735760085484516001600160a01b039091169063b66503cf90869085908110613ee257613ee26151b9565b6020026020010151613f16868681518110613eff57613eff6151b9565b6020026020010151856131e690919063ffffffff16565b6040518363ffffffff1660e01b8152600401613f33929190615085565b600060405180830381600087803b158015613f4d57600080fd5b505af1158015613f61573d6000803e3d6000fd5b50505050838281518110613f7757613f776151b9565b60200260200101516001600160a01b0316600860009054906101000a90046001600160a01b03166001600160a01b0316336001600160a01b031660008051602061536a833981519152868681518110613fd257613fd26151b9565b602002602001015185613fe5919061525f565b60405190815260200160405180910390a4828281518110614008576140086151b9565b60200260200101518161401b919061525f565b60156000868581518110614031576140316151b9565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600082825461406891906151a1565b9091555061423f9050565b838281518110614085576140856151b9565b60200260200101516001600160a01b031663a9059cbb600f60009054906101000a90046001600160a01b03166140c6868681518110613eff57613eff6151b9565b6040518363ffffffff1660e01b81526004016140e3929190615085565b602060405180830381600087803b1580156140fd57600080fd5b505af1158015614111573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614135919061509e565b50838281518110614148576141486151b9565b60200260200101516001600160a01b0316600f60009054906101000a90046001600160a01b03166001600160a01b0316336001600160a01b031660008051602061536a8339815191528686815181106141a3576141a36151b9565b6020026020010151856141b6919061525f565b60405190815260200160405180910390a48282815181106141d9576141d96151b9565b6020026020010151816141ec919061525f565b60156000868581518110614202576142026151b9565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020600082825461423991906151a1565b90915550505b508061424a816151cf565b915050613b43565b5060009788975095505050505050565b60015460408051634eb1c24560e11b8152815160009384936001600160a01b0390911692639d63848a926004808301939282900301818787803b1580156142a857600080fd5b505af11580156142bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142e0919061531e565b6040516370a0823160e01b815230600482015291935091506000906001600160a01b038416906370a082319060240160206040518083038186803b15801561432757600080fd5b505afa15801561433b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061435f9190615223565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a082319060240160206040518083038186803b1580156143a457600080fd5b505afa1580156143b8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143dc9190615223565b6001546040805163d294f09360e01b815281519394506001600160a01b039092169263d294f0939260048082019392918290030181600087803b15801561442257600080fd5b505af1925050508015614452575060408051601f3d908101601f1916820190925261444f918101906152fa565b60015b614466575060009788975095505050505050565b50506040516370a0823160e01b815230600482015282906001600160a01b038616906370a082319060240160206040518083038186803b1580156144a957600080fd5b505afa1580156144bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906144e19190615223565b6144eb919061525f565b6040516370a0823160e01b815230600482015290985081906001600160a01b038516906370a082319060240160206040518083038186803b15801561452f57600080fd5b505afa158015614543573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145679190615223565b614571919061525f565b96506000620f4240614583888b6152b9565b61458d91906152d8565b11156146b9576001600160a01b03841663a9059cbb86620f42406145b18a8d6152b9565b6145bb91906152d8565b6040518363ffffffff1660e01b81526004016145d8929190615085565b602060405180830381600087803b1580156145f257600080fd5b505af1158015614606573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061462a919061509e565b506001600160a01b03808616908516337f78c0b7f8dc279098cd35e7f6ed62faef6b268eb5f31ece1326f32e1bc1d5a048620f42406146698b8e6152b9565b61467391906152d8565b60405190815260200160405180910390a46040516370a0823160e01b81523060048201526146b69083906001600160a01b038716906370a08231906024016121ab565b97505b6000620f42406146c9888a6152b9565b6146d391906152d8565b11156147ff576001600160a01b03831663a9059cbb86620f42406146f78a8c6152b9565b61470191906152d8565b6040518363ffffffff1660e01b815260040161471e929190615085565b602060405180830381600087803b15801561473857600080fd5b505af115801561474c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614770919061509e565b506001600160a01b03808616908416337f78c0b7f8dc279098cd35e7f6ed62faef6b268eb5f31ece1326f32e1bc1d5a048620f42406147af8b8d6152b9565b6147b991906152d8565b60405190815260200160405180910390a46040516370a0823160e01b81523060048201526147fc9082906001600160a01b038616906370a08231906024016121ab565b96505b600f546001600160a01b03166149ac5787156148db5760085460405163b66503cf60e01b81526001600160a01b039091169063b66503cf906148479087908c90600401615085565b600060405180830381600087803b15801561486157600080fd5b505af1158015614875573d6000803e3d6000fd5b505050506001600160a01b038416600090815260156020526040812080548a92906148a19084906151a1565b90915550506008546040518981526001600160a01b03868116921690339060008051602061536a8339815191529060200160405180910390a45b86156149a75760085460405163b66503cf60e01b81526001600160a01b039091169063b66503cf906149139086908b90600401615085565b600060405180830381600087803b15801561492d57600080fd5b505af1158015614941573d6000803e3d6000fd5b505050506001600160a01b0383166000908152601560205260408120805489929061496d9084906151a1565b90915550506008546040518881526001600160a01b03858116921690339060008051602061536a8339815191529060200160405180910390a45b614b7d565b600f5460405163a9059cbb60e01b81526001600160a01b038681169263a9059cbb926149e092909116908c90600401615085565b602060405180830381600087803b1580156149fa57600080fd5b505af1158015614a0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a32919061509e565b50600f5460405163a9059cbb60e01b81526001600160a01b038581169263a9059cbb92614a6792909116908b90600401615085565b602060405180830381600087803b158015614a8157600080fd5b505af1158015614a95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614ab9919061509e565b50600f546040518981526001600160a01b03868116921690339060008051602061536a8339815191529060200160405180910390a4600f546040518881526001600160a01b03858116921690339060008051602061536a8339815191529060200160405180910390a46001600160a01b038416600090815260156020526040812080548a9290614b4a9084906151a1565b90915550506001600160a01b03831660009081526015602052604081208054899290614b779084906151a1565b90915550505b5050505050509091565b6000818310614b965781610d03565b5090919050565b6001600160a01b0382163b614bf45760405162461bcd60e51b815260206004820152601760248201527f5361666545524332303a206e6f6e2d636f6e74726163740000000000000000006044820152606401610a2a565b600080836001600160a01b031683604051614c0f919061534d565b6000604051808303816000865af19150503d8060008114614c4c576040519150601f19603f3d011682016040523d82523d6000602084013e614c51565b606091505b509150915081614c995760405162461bcd60e51b815260206004820152601360248201527214d85999515490cc8c0e88131310c819985a5b606a1b6044820152606401610a2a565b8051156133ca5780806020019051810190614cb4919061509e565b6133ca5760405162461bcd60e51b81526020600482015260136024820152725361666545524332303a20217375636365737360681b6044820152606401610a2a565b6001600160a01b03811681146114de57600080fd5b600060208284031215614d1d57600080fd5b8135610d0381614cf6565b60005b83811015614d43578181015183820152602001614d2b565b838111156133ca5750506000910152565b6020815260008251806020840152614d73816040850160208701614d28565b601f01601f19169190910160400192915050565b60008060408385031215614d9a57600080fd5b8235614da581614cf6565b91506020830135614db581614cf6565b809150509250929050565b80151581146114de57600080fd5b600060208284031215614de057600080fd5b8135610d0381614dc0565b60008060408385031215614dfe57600080fd5b8235614e0981614cf6565b946020939093013593505050565b600060208284031215614e2957600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715614e6f57614e6f614e30565b604052919050565b600082601f830112614e8857600080fd5b8135602067ffffffffffffffff821115614ea457614ea4614e30565b8160051b614eb3828201614e46565b9283528481018201928281019087851115614ecd57600080fd5b83870192505b84831015614ef5578235614ee681614cf6565b82529183019190830190614ed3565b979650505050505050565b60008060408385031215614f1357600080fd5b8235614f1e81614cf6565b9150602083013567ffffffffffffffff811115614f3a57600080fd5b614f4685828601614e77565b9150509250929050565b60008060408385031215614f6357600080fd5b50508035926020909101359150565b600060208284031215614f8457600080fd5b813567ffffffffffffffff811115614f9b57600080fd5b61323484828501614e77565b600080600060608486031215614fbc57600080fd5b833592506020840135614fce81614cf6565b91506040840135614fde81614cf6565b809150509250925092565b600080600060608486031215614ffe57600080fd5b833561500981614cf6565b9250602084013561501981614cf6565b929592945050506040919091013590565b60006020828403121561503c57600080fd5b8151610d0381614cf6565b602080825260059082015264215445414d60d81b604082015260600190565b602080825260059082015264212173746b60d81b604082015260600190565b6001600160a01b03929092168252602082015260400190565b6000602082840312156150b057600080fd5b8151610d0381614dc0565b6000602082840312156150cd57600080fd5b815167ffffffffffffffff808211156150e557600080fd5b818401915084601f8301126150f957600080fd5b81518181111561510b5761510b614e30565b61511e601f8201601f1916602001614e46565b915080825285602082850101111561513557600080fd5b615146816020840160208601614d28565b50949350505050565b73022b8bab0b634bd32b91023b0bab3b2903337b9160651b81526000825161517e816014850160208701614d28565b9190910160140192915050565b634e487b7160e01b600052601160045260246000fd5b600082198211156151b4576151b461518b565b500190565b634e487b7160e01b600052603260045260246000fd5b60006000198214156151e3576151e361518b565b5060010190565b602080825260029082015261306160f01b604082015260600190565b60208082526003908201526252472160e81b604082015260600190565b60006020828403121561523557600080fd5b5051919050565b60006020828403121561524e57600080fd5b815160ff81168114610d0357600080fd5b6000828210156152715761527161518b565b500390565b634e487b7160e01b600052603160045260246000fd5b6422a897239d60d91b8152600082516152ac816005850160208701614d28565b9190910160050192915050565b60008160001904831182151516156152d3576152d361518b565b500290565b6000826152f557634e487b7160e01b600052601260045260246000fd5b500490565b6000806040838503121561530d57600080fd5b505080516020909101519092909150565b6000806040838503121561533157600080fd5b825161533c81614cf6565b6020840151909250614db581614cf6565b6000825161535f818460208701614d28565b919091019291505056feee447878094bcc87bd81b55e4831b5e9e3d095866fce10f4f7e4caa64ea7a558a264697066735822122023af05e3daf5c615cce81ab6e1bd9272b0e1895173ea9881729dfe513f056e8364736f6c634300080900336f3d0c80b7142a8d817dfedfe293680f67ba78aacbbc59db82973fd195982d05a2646970667358221220083de4fbaa30d2a4ee1c42eabefd61c68cdc762e230f09f7038b8d969e320db664736f6c63430008090033
Deployed Bytecode Sourcemap
39934:768:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40135:564;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1999:32:1;;;1981:51;;1969:2;1954:18;40135:564:0;;;;;;;39980:24;;;;;-1:-1:-1;;;;;39980:24:0;;;40135:564;40317:7;40337:21;40395:5;40415:6;40436:3;40454:10;40479:6;40500:15;40361:165;;;;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;40537:9:0;:26;;-1:-1:-1;;;;;;40537:26:0;-1:-1:-1;;;;;40537:26:0;;;;;;;;;;40579:85;;40537:26;;-1:-1:-1;40579:85:0;;;40592:10;;40579:85;;;;40537:26;;40627:6;;40635:3;;40640:6;;40648:15;;40579:85;:::i;:::-;;;;;;;;-1:-1:-1;;40682:9:0;;-1:-1:-1;;;;;40682:9:0;40135:564;;;;;;;:::o;-1:-1:-1:-;;;;;;;;:::o;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:127::-;253:10;248:3;244:20;241:1;234:31;284:4;281:1;274:15;308:4;305:1;298:15;324:1506;441:6;449;457;465;473;526:3;514:9;505:7;501:23;497:33;494:53;;;543:1;540;533:12;494:53;566:29;585:9;566:29;:::i;:::-;556:39;;614:2;635:38;669:2;658:9;654:18;635:38;:::i;:::-;625:48;;692:38;726:2;715:9;711:18;692:38;:::i;:::-;682:48;;780:2;769:9;765:18;752:32;827:5;820:13;813:21;806:5;803:32;793:60;;849:1;846;839:12;793:60;872:5;-1:-1:-1;928:3:1;913:19;;900:33;952:18;982:14;;;979:34;;;1009:1;1006;999:12;979:34;1047:6;1036:9;1032:22;1022:32;;1092:7;1085:4;1081:2;1077:13;1073:27;1063:55;;1114:1;1111;1104:12;1063:55;1150:2;1137:16;1172:2;1168;1165:10;1162:36;;;1178:18;;:::i;:::-;1224:2;1221:1;1217:10;1256:2;1250:9;1319:2;1315:7;1310:2;1306;1302:11;1298:25;1290:6;1286:38;1374:6;1362:10;1359:22;1354:2;1342:10;1339:18;1336:46;1333:72;;;1385:18;;:::i;:::-;1421:2;1414:22;1471:18;;;1505:15;;;;-1:-1:-1;1547:11:1;;;1543:20;;;1575:19;;;1572:39;;;1607:1;1604;1597:12;1572:39;1631:11;;;;1651:148;1667:6;1662:3;1659:15;1651:148;;;1733:23;1752:3;1733:23;:::i;:::-;1721:36;;1684:12;;;;1777;;;;1651:148;;;1818:6;1808:16;;;;;;;;324:1506;;;;;;;;:::o;2043:461::-;2096:3;2134:5;2128:12;2161:6;2156:3;2149:19;2187:4;2216:2;2211:3;2207:12;2200:19;;2253:2;2246:5;2242:14;2274:1;2284:195;2298:6;2295:1;2292:13;2284:195;;;2363:13;;-1:-1:-1;;;;;2359:39:1;2347:52;;2419:12;;;;2454:15;;;;2395:1;2313:9;2284:195;;;-1:-1:-1;2495:3:1;;2043:461;-1:-1:-1;;;;;2043:461:1:o;2509:704::-;-1:-1:-1;;;;;2860:15:1;;;2842:34;;2912:15;;;2907:2;2892:18;;2885:43;2964:15;;;2959:2;2944:18;;2937:43;3016:15;;3011:2;2996:18;;2989:43;3076:14;;3069:22;3063:3;3048:19;;3041:51;3129:3;2822;3108:19;;3101:32;;;2785:4;;3150:57;;3187:19;;3179:6;3150:57;:::i;:::-;3142:65;2509:704;-1:-1:-1;;;;;;;;2509:704:1:o;3218:623::-;-1:-1:-1;;;;;3541:15:1;;;3523:34;;3593:15;;;3588:2;3573:18;;3566:43;3645:15;;3640:2;3625:18;;3618:43;3704:14;;3697:22;3692:2;3677:18;;3670:50;3503:3;3751;3736:19;;3729:32;;;3466:4;;3778:57;;3815:19;;3807:6;3778:57;:::i;:::-;3770:65;3218:623;-1:-1:-1;;;;;;;3218:623:1:o
Swarm Source
ipfs://083de4fbaa30d2a4ee1c42eabefd61c68cdc762e230f09f7038b8d969e320db6
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.