Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 20 internal transactions
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
- | 11054480 | 1650 days ago | Contract Creation | 0 ETH | |||
- | 11051697 | 1650 days ago | Contract Creation | 0 ETH | |||
- | 11048877 | 1651 days ago | Contract Creation | 0 ETH | |||
- | 11035955 | 1653 days ago | Contract Creation | 0 ETH | |||
- | 11003241 | 1658 days ago | Contract Creation | 0 ETH | |||
- | 11003218 | 1658 days ago | Contract Creation | 0 ETH | |||
- | 11003189 | 1658 days ago | Contract Creation | 0 ETH | |||
- | 11003158 | 1658 days ago | Contract Creation | 0 ETH | |||
- | 11003137 | 1658 days ago | Contract Creation | 0 ETH | |||
- | 11003100 | 1658 days ago | Contract Creation | 0 ETH | |||
- | 11003056 | 1658 days ago | Contract Creation | 0 ETH | |||
- | 11002910 | 1658 days ago | Contract Creation | 0 ETH | |||
- | 11002858 | 1658 days ago | Contract Creation | 0 ETH | |||
- | 11002812 | 1658 days ago | Contract Creation | 0 ETH | |||
- | 11002744 | 1658 days ago | Contract Creation | 0 ETH | |||
- | 11002507 | 1658 days ago | Contract Creation | 0 ETH | |||
- | 11000521 | 1658 days ago | Contract Creation | 0 ETH | |||
- | 10994840 | 1659 days ago | Contract Creation | 0 ETH | |||
- | 10962514 | 1664 days ago | Contract Creation | 0 ETH | |||
- | 10961978 | 1664 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
BPoolCreator
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-09-30 */ // SPDX-License-Identifier: MIT pragma solidity 0.6.12; // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. library BConst { uint public constant BONE = 10**18; uint public constant MIN_BOUND_TOKENS = 2; uint public constant MAX_BOUND_TOKENS = 8; uint public constant DEFAULT_FEE = BONE * 3 / 1000; // 0.3% uint public constant MIN_FEE = BONE / 10**6; uint public constant MAX_FEE = BONE / 10; uint public constant DEFAULT_COLLECTED_FEE = BONE / 2000; // 0.05% uint public constant MAX_COLLECTED_FEE = BONE / 200; // 0.5% uint public constant DEFAULT_EXIT_FEE = 0; uint public constant MAX_EXIT_FEE = BONE / 1000; // 0.1% uint public constant MIN_WEIGHT = BONE; uint public constant MAX_WEIGHT = BONE * 50; uint public constant MAX_TOTAL_WEIGHT = BONE * 50; uint public constant MIN_BALANCE = BONE / 10**12; uint public constant DEFAULT_INIT_POOL_SUPPLY = BONE * 100; uint public constant MIN_INIT_POOL_SUPPLY = BONE / 1000; uint public constant MAX_INIT_POOL_SUPPLY = BONE * 10**18; uint public constant MIN_BPOW_BASE = 1 wei; uint public constant MAX_BPOW_BASE = (2 * BONE) - 1 wei; uint public constant BPOW_PRECISION = BONE / 10**10; uint public constant MAX_IN_RATIO = BONE / 2; uint public constant MAX_OUT_RATIO = (BONE / 3) + 1 wei; } // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. contract BNum { function btoi(uint a) internal pure returns (uint) { return a / BConst.BONE; } function bfloor(uint a) internal pure returns (uint) { return btoi(a) * BConst.BONE; } function badd(uint a, uint b) internal pure returns (uint) { uint c = a + b; require(c >= a, "add overflow"); return c; } function bsub(uint a, uint b) internal pure returns (uint) { (uint c, bool flag) = bsubSign(a, b); require(!flag, "sub underflow"); return c; } function bsubSign(uint a, uint b) internal pure returns (uint, bool) { if (a >= b) { return (a - b, false); } else { return (b - a, true); } } function bmul(uint a, uint b) internal pure returns (uint) { uint c0 = a * b; require(a == 0 || c0 / a == b, "mul overflow"); uint c1 = c0 + (BConst.BONE / 2); require(c1 >= c0, "mul overflow"); uint c2 = c1 / BConst.BONE; return c2; } function bdiv(uint a, uint b) internal pure returns (uint) { require(b != 0, "div by 0"); uint c0 = a * BConst.BONE; require(a == 0 || c0 / a == BConst.BONE, "div internal"); // bmul overflow uint c1 = c0 + (b / 2); require(c1 >= c0, "div internal"); // badd require uint c2 = c1 / b; return c2; } // DSMath.wpow function bpowi(uint a, uint n) internal pure returns (uint) { uint z = n % 2 != 0 ? a : BConst.BONE; for (n /= 2; n != 0; n /= 2) { a = bmul(a, a); if (n % 2 != 0) { z = bmul(z, a); } } return z; } // Compute b^(e.w) by splitting it into (b^e)*(b^0.w). // Use `bpowi` for `b^e` and `bpowK` for k iterations // of approximation of b^0.w function bpow(uint base, uint exp) internal pure returns (uint) { require(base >= BConst.MIN_BPOW_BASE, "base too low"); require(base <= BConst.MAX_BPOW_BASE, "base too high"); uint whole = bfloor(exp); uint remain = bsub(exp, whole); uint wholePow = bpowi(base, btoi(whole)); if (remain == 0) { return wholePow; } uint partialResult = bpowApprox(base, remain, BConst.BPOW_PRECISION); return bmul(wholePow, partialResult); } function bpowApprox(uint base, uint exp, uint precision) internal pure returns (uint) { // term 0: uint a = exp; (uint x, bool xneg) = bsubSign(base, BConst.BONE); uint term = BConst.BONE; uint sum = term; bool negative = false; // term(k) = numer / denom // = (product(a - i - 1, i=1-->k) * x^k) / (k!) // each iteration, multiply previous term by (a-(k-1)) * x / k // continue until term is less than precision for (uint i = 1; term >= precision; i++) { uint bigK = i * BConst.BONE; (uint c, bool cneg) = bsubSign(a, bsub(bigK, BConst.BONE)); term = bmul(term, bmul(c, x)); term = bdiv(term, bigK); if (term == 0) break; if (xneg) negative = !negative; if (cneg) negative = !negative; if (negative) { sum = bsub(sum, term); } else { sum = badd(sum, term); } } return sum; } } // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // Highly opinionated token implementation interface IERC20 { event Approval(address indexed src, address indexed dst, uint amt); event Transfer(address indexed src, address indexed dst, uint amt); function totalSupply() external view returns (uint); function balanceOf(address whom) external view returns (uint); function allowance(address src, address dst) external view returns (uint); function approve(address dst, uint amt) external returns (bool); function transfer(address dst, uint amt) external returns (bool); function transferFrom( address src, address dst, uint amt ) external returns (bool); } contract BTokenBase is BNum { mapping(address => uint) internal _balance; mapping(address => mapping(address=>uint)) internal _allowance; uint internal _totalSupply; event Approval(address indexed src, address indexed dst, uint amt); event Transfer(address indexed src, address indexed dst, uint amt); function _mint(uint amt) internal { _balance[address(this)] = badd(_balance[address(this)], amt); _totalSupply = badd(_totalSupply, amt); emit Transfer(address(0), address(this), amt); } function _burn(uint amt) internal { require(_balance[address(this)] >= amt, "!bal"); _balance[address(this)] = bsub(_balance[address(this)], amt); _totalSupply = bsub(_totalSupply, amt); emit Transfer(address(this), address(0), amt); } function _move(address src, address dst, uint amt) internal { require(_balance[src] >= amt, "!bal"); _balance[src] = bsub(_balance[src], amt); _balance[dst] = badd(_balance[dst], amt); emit Transfer(src, dst, amt); } function _push(address to, uint amt) internal { _move(address(this), to, amt); } function _pull(address from, uint amt) internal { _move(from, address(this), amt); } } contract BToken is BTokenBase, IERC20 { string private _name = "Value Liquidity Provider"; string private _symbol = "VLP"; uint8 private _decimals = 18; function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns(uint8) { return _decimals; } function allowance(address src, address dst) external override view returns (uint) { return _allowance[src][dst]; } function balanceOf(address whom) external override view returns (uint) { return _balance[whom]; } function totalSupply() public override view returns (uint) { return _totalSupply; } function approve(address dst, uint amt) external override returns (bool) { _allowance[msg.sender][dst] = amt; emit Approval(msg.sender, dst, amt); return true; } function increaseApproval(address dst, uint amt) external returns (bool) { _allowance[msg.sender][dst] = badd(_allowance[msg.sender][dst], amt); emit Approval(msg.sender, dst, _allowance[msg.sender][dst]); return true; } function decreaseApproval(address dst, uint amt) external returns (bool) { uint oldValue = _allowance[msg.sender][dst]; if (amt > oldValue) { _allowance[msg.sender][dst] = 0; } else { _allowance[msg.sender][dst] = bsub(oldValue, amt); } emit Approval(msg.sender, dst, _allowance[msg.sender][dst]); return true; } function transfer(address dst, uint amt) external override returns (bool) { _move(msg.sender, dst, amt); return true; } function transferFrom(address src, address dst, uint amt) external override returns (bool) { require(msg.sender == src || amt <= _allowance[src][msg.sender], "!spender"); _move(src, dst, amt); if (msg.sender != src && _allowance[src][msg.sender] != uint256(-1)) { _allowance[src][msg.sender] = bsub(_allowance[src][msg.sender], amt); emit Approval(msg.sender, dst, _allowance[src][msg.sender]); } return true; } } // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. contract BMath is BNum { /********************************************************************************************** // calcSpotPrice // // sP = spotPrice // // bI = tokenBalanceIn ( bI / wI ) 1 // // bO = tokenBalanceOut sP = ----------- * ---------- // // wI = tokenWeightIn ( bO / wO ) ( 1 - sF ) // // wO = tokenWeightOut // // sF = swapFee (+ collectedFee) // **********************************************************************************************/ function calcSpotPrice( uint tokenBalanceIn, uint tokenWeightIn, uint tokenBalanceOut, uint tokenWeightOut, uint swapFee ) public pure returns (uint spotPrice) { uint numer = bdiv(tokenBalanceIn, tokenWeightIn); uint denom = bdiv(tokenBalanceOut, tokenWeightOut); uint ratio = bdiv(numer, denom); uint scale = bdiv(BConst.BONE, bsub(BConst.BONE, swapFee)); return (spotPrice = bmul(ratio, scale)); } /********************************************************************************************** // calcOutGivenIn // // aO = tokenAmountOut // // bO = tokenBalanceOut // // bI = tokenBalanceIn / / bI \ (wI / wO) \ // // aI = tokenAmountIn aO = bO * | 1 - | -------------------------- | ^ | // // wI = tokenWeightIn \ \ ( bI + ( aI * ( 1 - sF )) / / // // wO = tokenWeightOut // // sF = swapFee (+ collectedFee) // **********************************************************************************************/ function calcOutGivenIn( uint tokenBalanceIn, uint tokenWeightIn, uint tokenBalanceOut, uint tokenWeightOut, uint tokenAmountIn, uint swapFee ) public pure returns (uint tokenAmountOut) { uint weightRatio = bdiv(tokenWeightIn, tokenWeightOut); uint adjustedIn = bsub(BConst.BONE, swapFee); adjustedIn = bmul(tokenAmountIn, adjustedIn); uint y = bdiv(tokenBalanceIn, badd(tokenBalanceIn, adjustedIn)); uint foo = bpow(y, weightRatio); uint bar = bsub(BConst.BONE, foo); tokenAmountOut = bmul(tokenBalanceOut, bar); return tokenAmountOut; } /********************************************************************************************** // calcInGivenOut // // aI = tokenAmountIn // // bO = tokenBalanceOut / / bO \ (wO / wI) \ // // bI = tokenBalanceIn bI * | | ------------ | ^ - 1 | // // aO = tokenAmountOut aI = \ \ ( bO - aO ) / / // // wI = tokenWeightIn -------------------------------------------- // // wO = tokenWeightOut ( 1 - sF ) // // sF = swapFee (+ collectedFee) // **********************************************************************************************/ function calcInGivenOut( uint tokenBalanceIn, uint tokenWeightIn, uint tokenBalanceOut, uint tokenWeightOut, uint tokenAmountOut, uint swapFee ) public pure returns (uint tokenAmountIn) { uint weightRatio = bdiv(tokenWeightOut, tokenWeightIn); uint diff = bsub(tokenBalanceOut, tokenAmountOut); uint y = bdiv(tokenBalanceOut, diff); uint foo = bpow(y, weightRatio); foo = bsub(foo, BConst.BONE); tokenAmountIn = bsub(BConst.BONE, swapFee); tokenAmountIn = bdiv(bmul(tokenBalanceIn, foo), tokenAmountIn); return tokenAmountIn; } /********************************************************************************************** // calcPoolOutGivenSingleIn // // pAo = poolAmountOut / \ // // tAi = tokenAmountIn /// / // wI \ \\ \ wI \ // // wI = tokenWeightIn //| tAi *| 1 - || 1 - -- | * sF || + tBi \ -- \ // // tW = totalWeight pAo=|| \ \ \\ tW / // | ^ tW | * pS - pS // // tBi = tokenBalanceIn \\ ------------------------------------- / / // // pS = poolSupply \\ tBi / / // // sF = swapFee (+ collectedFee)\ / // **********************************************************************************************/ function calcPoolOutGivenSingleIn( uint tokenBalanceIn, uint tokenWeightIn, uint poolSupply, uint totalWeight, uint tokenAmountIn, uint swapFee ) public pure returns (uint poolAmountOut) { // @dev Charge the trading fee for the proportion of tokenAi // which is implicitly traded to the other pool tokens. // That proportion is (1- weightTokenIn) // tokenAiAfterFee = tAi * (1 - (1-weightTi) * poolFee); uint normalizedWeight = bdiv(tokenWeightIn, totalWeight); uint zaz = bmul(bsub(BConst.BONE, normalizedWeight), swapFee); uint tokenAmountInAfterFee = bmul(tokenAmountIn, bsub(BConst.BONE, zaz)); uint newTokenBalanceIn = badd(tokenBalanceIn, tokenAmountInAfterFee); uint tokenInRatio = bdiv(newTokenBalanceIn, tokenBalanceIn); // uint newPoolSupply = (ratioTi ^ weightTi) * poolSupply; uint poolRatio = bpow(tokenInRatio, normalizedWeight); uint newPoolSupply = bmul(poolRatio, poolSupply); poolAmountOut = bsub(newPoolSupply, poolSupply); return poolAmountOut; } /********************************************************************************************** // calcSingleInGivenPoolOut // // tAi = tokenAmountIn //(pS + pAo)\ / 1 \\ // // pS = poolSupply || --------- | ^ | --------- || * bI - bI // // pAo = poolAmountOut \\ pS / \(wI / tW)// // // bI = balanceIn tAi = -------------------------------------------- // // wI = weightIn / wI \ // // tW = totalWeight | 1 - ---- | * sF // // sF = swapFee (+ collectedFee) \ tW / // **********************************************************************************************/ function calcSingleInGivenPoolOut( uint tokenBalanceIn, uint tokenWeightIn, uint poolSupply, uint totalWeight, uint poolAmountOut, uint swapFee ) public pure returns (uint tokenAmountIn) { uint normalizedWeight = bdiv(tokenWeightIn, totalWeight); uint newPoolSupply = badd(poolSupply, poolAmountOut); uint poolRatio = bdiv(newPoolSupply, poolSupply); //uint newBalTi = poolRatio^(1/weightTi) * balTi; uint boo = bdiv(BConst.BONE, normalizedWeight); uint tokenInRatio = bpow(poolRatio, boo); uint newTokenBalanceIn = bmul(tokenInRatio, tokenBalanceIn); uint tokenAmountInAfterFee = bsub(newTokenBalanceIn, tokenBalanceIn); // Do reverse order of fees charged in joinswap_ExternAmountIn, this way // ``` pAo == joinswap_ExternAmountIn(Ti, joinswap_PoolAmountOut(pAo, Ti)) ``` //uint tAi = tAiAfterFee / (1 - (1-weightTi) * swapFee) ; uint zar = bmul(bsub(BConst.BONE, normalizedWeight), swapFee); tokenAmountIn = bdiv(tokenAmountInAfterFee, bsub(BConst.BONE, zar)); return tokenAmountIn; } /********************************************************************************************** // calcSingleOutGivenPoolIn // // tAo = tokenAmountOut / / \\ // // bO = tokenBalanceOut / // pS - (pAi * (1 - eF)) \ / 1 \ \\ // // pAi = poolAmountIn | bO - || ----------------------- | ^ | --------- | * b0 || // // ps = poolSupply \ \\ pS / \(wO / tW)/ // // // wI = tokenWeightIn tAo = \ \ // // // tW = totalWeight / / wO \ \ // // sF = swapFee (+ collectedFee) * | 1 - | 1 - ---- | * sF | // // eF = exitFee \ \ tW / / // **********************************************************************************************/ function calcSingleOutGivenPoolIn( uint tokenBalanceOut, uint tokenWeightOut, uint poolSupply, uint totalWeight, uint poolAmountIn, uint swapFee, uint exitFee ) public pure returns (uint tokenAmountOut) { uint normalizedWeight = bdiv(tokenWeightOut, totalWeight); // charge exit fee on the pool token side // pAiAfterExitFee = pAi*(1-exitFee) uint poolAmountInAfterExitFee = bmul(poolAmountIn, bsub(BConst.BONE, exitFee)); uint newPoolSupply = bsub(poolSupply, poolAmountInAfterExitFee); uint poolRatio = bdiv(newPoolSupply, poolSupply); // newBalTo = poolRatio^(1/weightTo) * balTo; uint tokenOutRatio = bpow(poolRatio, bdiv(BConst.BONE, normalizedWeight)); uint newTokenBalanceOut = bmul(tokenOutRatio, tokenBalanceOut); uint tokenAmountOutBeforeSwapFee = bsub(tokenBalanceOut, newTokenBalanceOut); // charge swap fee on the output token side //uint tAo = tAoBeforeSwapFee * (1 - (1-weightTo) * swapFee) uint zaz = bmul(bsub(BConst.BONE, normalizedWeight), swapFee); tokenAmountOut = bmul(tokenAmountOutBeforeSwapFee, bsub(BConst.BONE, zaz)); return tokenAmountOut; } /********************************************************************************************** // calcPoolInGivenSingleOut // // pAi = poolAmountIn // / tAo \\ / wO \ \ // // bO = tokenBalanceOut // | bO - -------------------------- |\ | ---- | \ // // tAo = tokenAmountOut pS - || \ 1 - ((1 - (tO / tW)) * sF)/ | ^ \ tW / * pS | // // ps = poolSupply \\ -----------------------------------/ / // // wO = tokenWeightOut pAi = \\ bO / / // // tW = totalWeight ------------------------------------------------------------- // // sF = swapFee (+ collectedFee) ( 1 - eF ) // // eF = exitFee // **********************************************************************************************/ function calcPoolInGivenSingleOut( uint tokenBalanceOut, uint tokenWeightOut, uint poolSupply, uint totalWeight, uint tokenAmountOut, uint swapFee, uint exitFee ) public pure returns (uint poolAmountIn) { // charge swap fee on the output token side uint normalizedWeight = bdiv(tokenWeightOut, totalWeight); //uint tAoBeforeSwapFee = tAo / (1 - (1-weightTo) * swapFee) ; uint zoo = bsub(BConst.BONE, normalizedWeight); uint zar = bmul(zoo, swapFee); uint tokenAmountOutBeforeSwapFee = bdiv(tokenAmountOut, bsub(BConst.BONE, zar)); uint newTokenBalanceOut = bsub(tokenBalanceOut, tokenAmountOutBeforeSwapFee); uint tokenOutRatio = bdiv(newTokenBalanceOut, tokenBalanceOut); //uint newPoolSupply = (ratioTo ^ weightTo) * poolSupply; uint poolRatio = bpow(tokenOutRatio, normalizedWeight); uint newPoolSupply = bmul(poolRatio, poolSupply); uint poolAmountInAfterExitFee = bsub(poolSupply, newPoolSupply); // charge exit fee on the pool token side // pAi = pAiAfterExitFee/(1-exitFee) poolAmountIn = bdiv(poolAmountInAfterExitFee, bsub(BConst.BONE, exitFee)); return poolAmountIn; } } // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. interface IBFactory { function collectedToken() external view returns(address); } contract BPool is BToken, BMath { struct Record { bool bound; // is token bound to pool uint index; // private uint denorm; // denormalized weight uint balance; } event LOG_SWAP( address indexed caller, address indexed tokenIn, address indexed tokenOut, uint256 tokenAmountIn, uint256 tokenAmountOut ); event LOG_JOIN( address indexed caller, address indexed tokenIn, uint256 tokenAmountIn ); event LOG_EXIT( address indexed caller, address indexed tokenOut, uint256 tokenAmountOut ); event LOG_CALL( bytes4 indexed sig, address indexed caller, bytes data ) anonymous; modifier _logs_() { emit LOG_CALL(msg.sig, msg.sender, msg.data); _; } event LOG_COLLECTED_FUND( address indexed collectedToken, uint256 collectedAmount ); modifier _lock_() { require(!_mutex, "reentry"); _mutex = true; _; _mutex = false; } modifier _viewlock_() { require(!_mutex, "reentry"); _; } bool private _mutex; uint public version = 1001; address public factory; // BFactory address to push token exitFee to address public controller; // has CONTROL role bool public publicSwap; // `setSwapFee` and `finalize` require CONTROL // `finalize` sets `PUBLIC can SWAP`, `PUBLIC can JOIN` uint public initPoolSupply; uint public swapFee; uint public collectedFee; // 0.05% | https://yfv.finance/vip-vote/vip_5 uint public exitFee; bool public finalized; address[] private _tokens; mapping(address => Record) private _records; uint private _totalWeight; constructor(address _factory) public { controller = _factory; factory = _factory; initPoolSupply = BConst.DEFAULT_INIT_POOL_SUPPLY; swapFee = BConst.DEFAULT_FEE; collectedFee = BConst.DEFAULT_COLLECTED_FEE; exitFee = BConst.DEFAULT_EXIT_FEE; publicSwap = false; finalized = false; } function setInitPoolSupply(uint _initPoolSupply) public _logs_ { require(!finalized, "finalized"); require(msg.sender == controller, "!controller"); require(_initPoolSupply >= BConst.MIN_INIT_POOL_SUPPLY, "<minInitPoolSup"); require(_initPoolSupply <= BConst.MAX_INIT_POOL_SUPPLY, ">maxInitPoolSup"); initPoolSupply = _initPoolSupply; } function setCollectedFee(uint _collectedFee) public _logs_ { require(msg.sender == factory, "!factory"); require(_collectedFee <= BConst.MAX_COLLECTED_FEE, ">maxCoFee"); require(bmul(_collectedFee, 2) <= swapFee, ">swapFee/2"); collectedFee = _collectedFee; } function setExitFee(uint _exitFee) public _logs_ { require(!finalized, "finalized"); require(msg.sender == factory, "!factory"); require(_exitFee <= BConst.MAX_EXIT_FEE, ">maxExitFee"); exitFee = _exitFee; } function isBound(address t) external view returns (bool) { return _records[t].bound; } function getNumTokens() external view returns (uint) { return _tokens.length; } function getCurrentTokens() external view _viewlock_ returns (address[] memory tokens) { return _tokens; } function getFinalTokens() external view _viewlock_ returns (address[] memory tokens) { require(finalized, "!finalized"); return _tokens; } function getDenormalizedWeight(address token) external view _viewlock_ returns (uint) { require(_records[token].bound, "!bound"); return _records[token].denorm; } function getTotalDenormalizedWeight() external view _viewlock_ returns (uint) { return _totalWeight; } function getNormalizedWeight(address token) external view _viewlock_ returns (uint) { require(_records[token].bound, "!bound"); uint denorm = _records[token].denorm; return bdiv(denorm, _totalWeight); } function getBalance(address token) external view _viewlock_ returns (uint) { require(_records[token].bound, "!bound"); return _records[token].balance; } function setSwapFee(uint _swapFee) external _lock_ _logs_ { require(!finalized, "finalized"); require(msg.sender == controller, "!controller"); require(_swapFee >= BConst.MIN_FEE, "<minFee"); require(_swapFee <= BConst.MAX_FEE, ">maxFee"); require(bmul(collectedFee, 2) <= _swapFee, "<collectedFee*2"); swapFee = _swapFee; } function setController(address _controller) external _lock_ _logs_ { require(msg.sender == controller, "!controller"); controller = _controller; } function setPublicSwap(bool _publicSwap) external _lock_ _logs_ { require(!finalized, "finalized"); require(msg.sender == controller, "!controller"); publicSwap = _publicSwap; } function finalize() external _lock_ _logs_ { require(msg.sender == controller, "!controller"); require(!finalized, "finalized"); require(_tokens.length >= BConst.MIN_BOUND_TOKENS, "<minTokens"); finalized = true; publicSwap = true; _mintPoolShare(initPoolSupply); _pushPoolShare(msg.sender, initPoolSupply); } function bind(address token, uint balance, uint denorm) external _logs_ // _lock_ Bind does not lock because it jumps to `rebind`, which does { require(msg.sender == controller, "!controller"); require(!_records[token].bound, "bound"); require(!finalized, "finalized"); require(_tokens.length < BConst.MAX_BOUND_TOKENS, ">maxTokens"); _records[token] = Record({ bound: true, index: _tokens.length, denorm: 0, // balance and denorm will be validated balance: 0 // and set by `rebind` }); _tokens.push(token); rebind(token, balance, denorm); } function rebind(address token, uint balance, uint denorm) public _lock_ _logs_ { require(msg.sender == controller, "!controller"); require(_records[token].bound, "!bound"); require(!finalized, "finalized"); require(denorm >= BConst.MIN_WEIGHT, "<minWeight"); require(denorm <= BConst.MAX_WEIGHT, ">maxWeight"); require(balance >= BConst.MIN_BALANCE, "<minBal"); // Adjust the denorm and totalWeight uint oldWeight = _records[token].denorm; if (denorm > oldWeight) { _totalWeight = badd(_totalWeight, bsub(denorm, oldWeight)); require(_totalWeight <= BConst.MAX_TOTAL_WEIGHT, ">maxTWeight"); } else if (denorm < oldWeight) { _totalWeight = bsub(_totalWeight, bsub(oldWeight, denorm)); } _records[token].denorm = denorm; // Adjust the balance record and actual token balance uint oldBalance = _records[token].balance; _records[token].balance = balance; if (balance > oldBalance) { _pullUnderlying(token, msg.sender, bsub(balance, oldBalance)); } else if (balance < oldBalance) { // In this case liquidity is being withdrawn, so charge EXIT_FEE uint tokenBalanceWithdrawn = bsub(oldBalance, balance); uint tokenExitFee = bmul(tokenBalanceWithdrawn, exitFee); _pushUnderlying(token, msg.sender, bsub(tokenBalanceWithdrawn, tokenExitFee)); _pushUnderlying(token, factory, tokenExitFee); } } function unbind(address token) external _lock_ _logs_ { require(msg.sender == controller, "!controller"); require(_records[token].bound, "!bound"); require(!finalized, "finalized"); uint tokenBalance = _records[token].balance; uint tokenExitFee = bmul(tokenBalance, exitFee); _totalWeight = bsub(_totalWeight, _records[token].denorm); // Swap the token-to-unbind with the last token, // then delete the last token uint index = _records[token].index; uint last = _tokens.length - 1; _tokens[index] = _tokens[last]; _records[_tokens[index]].index = index; _tokens.pop(); _records[token] = Record({ bound: false, index: 0, denorm: 0, balance: 0 }); _pushUnderlying(token, msg.sender, bsub(tokenBalance, tokenExitFee)); _pushUnderlying(token, factory, tokenExitFee); } // Absorb any tokens that have been sent to this contract into the pool function gulp(address token) external _logs_ _lock_ { require(_records[token].bound, "!bound"); _records[token].balance = IERC20(token).balanceOf(address(this)); } function getSpotPrice(address tokenIn, address tokenOut) external view _viewlock_ returns (uint spotPrice) { require(_records[tokenIn].bound, "!bound"); require(_records[tokenOut].bound, "!bound"); Record storage inRecord = _records[tokenIn]; Record storage outRecord = _records[tokenOut]; return calcSpotPrice(inRecord.balance, inRecord.denorm, outRecord.balance, outRecord.denorm, swapFee); } function getSpotPriceSansFee(address tokenIn, address tokenOut) external view _viewlock_ returns (uint spotPrice) { require(_records[tokenIn].bound, "!bound"); require(_records[tokenOut].bound, "!bound"); Record storage inRecord = _records[tokenIn]; Record storage outRecord = _records[tokenOut]; return calcSpotPrice(inRecord.balance, inRecord.denorm, outRecord.balance, outRecord.denorm, 0); } function joinPool(uint poolAmountOut, uint[] calldata maxAmountsIn) external _lock_ _logs_ { require(finalized, "!finalized"); uint poolTotal = totalSupply(); uint ratio = bdiv(poolAmountOut, poolTotal); require(ratio != 0, "errMathAprox"); for (uint i = 0; i < _tokens.length; i++) { address t = _tokens[i]; uint bal = _records[t].balance; uint tokenAmountIn = bmul(ratio, bal); require(tokenAmountIn != 0, "errMathAprox"); require(tokenAmountIn <= maxAmountsIn[i], "<limIn"); _records[t].balance = badd(_records[t].balance, tokenAmountIn); emit LOG_JOIN(msg.sender, t, tokenAmountIn); _pullUnderlying(t, msg.sender, tokenAmountIn); } _mintPoolShare(poolAmountOut); _pushPoolShare(msg.sender, poolAmountOut); } function exitPool(uint poolAmountIn, uint[] calldata minAmountsOut) external _lock_ _logs_ { require(finalized, "!finalized"); uint poolTotal = totalSupply(); uint _exitFee = bmul(poolAmountIn, exitFee); uint pAiAfterExitFee = bsub(poolAmountIn, _exitFee); uint ratio = bdiv(pAiAfterExitFee, poolTotal); require(ratio != 0, "errMathAprox"); _pullPoolShare(msg.sender, poolAmountIn); _pushPoolShare(factory, _exitFee); _burnPoolShare(pAiAfterExitFee); for (uint i = 0; i < _tokens.length; i++) { address t = _tokens[i]; uint bal = _records[t].balance; uint tokenAmountOut = bmul(ratio, bal); require(tokenAmountOut != 0, "errMathAprox"); require(tokenAmountOut >= minAmountsOut[i], "<limO"); _records[t].balance = bsub(_records[t].balance, tokenAmountOut); emit LOG_EXIT(msg.sender, t, tokenAmountOut); _pushUnderlying(t, msg.sender, tokenAmountOut); } } function swapExactAmountIn( address tokenIn, uint tokenAmountIn, address tokenOut, uint minAmountOut, uint maxPrice ) external _lock_ _logs_ returns (uint tokenAmountOut, uint spotPriceAfter) { require(_records[tokenIn].bound, "!bound"); require(_records[tokenOut].bound, "!bound"); require(publicSwap, "!publicSwap"); Record storage inRecord = _records[address(tokenIn)]; Record storage outRecord = _records[address(tokenOut)]; require(tokenAmountIn <= bmul(inRecord.balance, BConst.MAX_IN_RATIO), ">maxIRat"); uint spotPriceBefore = calcSpotPrice( inRecord.balance, inRecord.denorm, outRecord.balance, outRecord.denorm, swapFee ); require(spotPriceBefore <= maxPrice, "badLimPrice"); tokenAmountOut = calcOutGivenIn( inRecord.balance, inRecord.denorm, outRecord.balance, outRecord.denorm, tokenAmountIn, swapFee ); require(tokenAmountOut >= minAmountOut, "<limO"); inRecord.balance = badd(inRecord.balance, tokenAmountIn); outRecord.balance = bsub(outRecord.balance, tokenAmountOut); spotPriceAfter = calcSpotPrice( inRecord.balance, inRecord.denorm, outRecord.balance, outRecord.denorm, swapFee ); require(spotPriceAfter >= spotPriceBefore, "errMathAprox"); require(spotPriceAfter <= maxPrice, ">limPrice"); require(spotPriceBefore <= bdiv(tokenAmountIn, tokenAmountOut), "errMathAprox"); emit LOG_SWAP(msg.sender, tokenIn, tokenOut, tokenAmountIn, tokenAmountOut); _pullUnderlying(tokenIn, msg.sender, tokenAmountIn); uint _subTokenAmountIn; (_subTokenAmountIn, tokenAmountOut) = _pushCollectedFundGivenOut(tokenIn, tokenAmountIn, tokenOut, tokenAmountOut); if (_subTokenAmountIn > 0) inRecord.balance = bsub(inRecord.balance, _subTokenAmountIn); _pushUnderlying(tokenOut, msg.sender, tokenAmountOut); return (tokenAmountOut, spotPriceAfter); } function swapExactAmountOut( address tokenIn, uint maxAmountIn, address tokenOut, uint tokenAmountOut, uint maxPrice ) external _lock_ _logs_ returns (uint tokenAmountIn, uint spotPriceAfter) { require(_records[tokenIn].bound, "!bound"); require(_records[tokenOut].bound, "!bound"); require(publicSwap, "!publicSwap"); Record storage inRecord = _records[address(tokenIn)]; Record storage outRecord = _records[address(tokenOut)]; require(tokenAmountOut <= bmul(outRecord.balance, BConst.MAX_OUT_RATIO), ">maxORat"); uint spotPriceBefore = calcSpotPrice( inRecord.balance, inRecord.denorm, outRecord.balance, outRecord.denorm, swapFee ); require(spotPriceBefore <= maxPrice, "badLimPrice"); tokenAmountIn = calcInGivenOut( inRecord.balance, inRecord.denorm, outRecord.balance, outRecord.denorm, tokenAmountOut, swapFee ); require(tokenAmountIn <= maxAmountIn, "<limIn"); inRecord.balance = badd(inRecord.balance, tokenAmountIn); outRecord.balance = bsub(outRecord.balance, tokenAmountOut); spotPriceAfter = calcSpotPrice( inRecord.balance, inRecord.denorm, outRecord.balance, outRecord.denorm, swapFee ); require(spotPriceAfter >= spotPriceBefore, "errMathAprox"); require(spotPriceAfter <= maxPrice, ">limPrice"); require(spotPriceBefore <= bdiv(tokenAmountIn, tokenAmountOut), "errMathAprox"); emit LOG_SWAP(msg.sender, tokenIn, tokenOut, tokenAmountIn, tokenAmountOut); _pullUnderlying(tokenIn, msg.sender, tokenAmountIn); _pushUnderlying(tokenOut, msg.sender, tokenAmountOut); uint _collectedFeeAmount = _pushCollectedFundGivenIn(tokenIn, tokenAmountIn); if (_collectedFeeAmount > 0) inRecord.balance = bsub(inRecord.balance, _collectedFeeAmount); return (tokenAmountIn, spotPriceAfter); } function joinswapExternAmountIn(address tokenIn, uint tokenAmountIn, uint minPoolAmountOut) external _lock_ _logs_ returns (uint poolAmountOut) { require(finalized, "!finalized"); require(_records[tokenIn].bound, "!bound"); require(tokenAmountIn <= bmul(_records[tokenIn].balance, BConst.MAX_IN_RATIO), ">maxIRat"); Record storage inRecord = _records[tokenIn]; poolAmountOut = calcPoolOutGivenSingleIn( inRecord.balance, inRecord.denorm, _totalSupply, _totalWeight, tokenAmountIn, swapFee ); require(poolAmountOut >= minPoolAmountOut, "<limO"); inRecord.balance = badd(inRecord.balance, tokenAmountIn); emit LOG_JOIN(msg.sender, tokenIn, tokenAmountIn); _mintPoolShare(poolAmountOut); _pullUnderlying(tokenIn, msg.sender, tokenAmountIn); uint _subTokenAmountIn; (_subTokenAmountIn, poolAmountOut) = _pushCollectedFundGivenOut(tokenIn, tokenAmountIn, address(this), poolAmountOut); if (_subTokenAmountIn > 0) inRecord.balance = bsub(inRecord.balance, _subTokenAmountIn); _pushPoolShare(msg.sender, poolAmountOut); return poolAmountOut; } function joinswapPoolAmountOut(address tokenIn, uint poolAmountOut, uint maxAmountIn) external _lock_ _logs_ returns (uint tokenAmountIn) { require(finalized, "!finalized"); require(_records[tokenIn].bound, "!bound"); Record storage inRecord = _records[tokenIn]; tokenAmountIn = calcSingleInGivenPoolOut( inRecord.balance, inRecord.denorm, _totalSupply, _totalWeight, poolAmountOut, swapFee ); require(tokenAmountIn != 0, "errMathAprox"); require(tokenAmountIn <= maxAmountIn, "<limIn"); require(tokenAmountIn <= bmul(_records[tokenIn].balance, BConst.MAX_IN_RATIO), ">maxIRat"); inRecord.balance = badd(inRecord.balance, tokenAmountIn); emit LOG_JOIN(msg.sender, tokenIn, tokenAmountIn); _mintPoolShare(poolAmountOut); _pushPoolShare(msg.sender, poolAmountOut); _pullUnderlying(tokenIn, msg.sender, tokenAmountIn); uint _collectedFeeAmount = _pushCollectedFundGivenIn(tokenIn, tokenAmountIn); if (_collectedFeeAmount > 0) inRecord.balance = bsub(inRecord.balance, _collectedFeeAmount); return tokenAmountIn; } function exitswapPoolAmountIn(address tokenOut, uint poolAmountIn, uint minAmountOut) external _lock_ _logs_ returns (uint tokenAmountOut) { require(finalized, "!finalized"); require(_records[tokenOut].bound, "!bound"); Record storage outRecord = _records[tokenOut]; tokenAmountOut = calcSingleOutGivenPoolIn( outRecord.balance, outRecord.denorm, _totalSupply, _totalWeight, poolAmountIn, swapFee, exitFee ); require(tokenAmountOut >= minAmountOut, "<limO"); require(tokenAmountOut <= bmul(_records[tokenOut].balance, BConst.MAX_OUT_RATIO), ">maxORat"); outRecord.balance = bsub(outRecord.balance, tokenAmountOut); uint _exitFee = bmul(poolAmountIn, exitFee); emit LOG_EXIT(msg.sender, tokenOut, tokenAmountOut); _pullPoolShare(msg.sender, poolAmountIn); _burnPoolShare(bsub(poolAmountIn, _exitFee)); _pushPoolShare(factory, _exitFee); (, tokenAmountOut) = _pushCollectedFundGivenOut(address(this), poolAmountIn, tokenOut, tokenAmountOut); _pushUnderlying(tokenOut, msg.sender, tokenAmountOut); return tokenAmountOut; } function exitswapExternAmountOut(address tokenOut, uint tokenAmountOut, uint maxPoolAmountIn) external _lock_ _logs_ returns (uint poolAmountIn) { require(finalized, "!finalized"); require(_records[tokenOut].bound, "!bound"); require(tokenAmountOut <= bmul(_records[tokenOut].balance, BConst.MAX_OUT_RATIO), ">maxORat"); Record storage outRecord = _records[tokenOut]; poolAmountIn = calcPoolInGivenSingleOut( outRecord.balance, outRecord.denorm, _totalSupply, _totalWeight, tokenAmountOut, swapFee, exitFee ); require(poolAmountIn != 0, "errMathAprox"); require(poolAmountIn <= maxPoolAmountIn, "<limIn"); outRecord.balance = bsub(outRecord.balance, tokenAmountOut); uint _exitFee = bmul(poolAmountIn, exitFee); emit LOG_EXIT(msg.sender, tokenOut, tokenAmountOut); _pullPoolShare(msg.sender, poolAmountIn); uint _collectedFeeAmount = _pushCollectedFundGivenIn(address(this), poolAmountIn); _burnPoolShare(bsub(bsub(poolAmountIn, _exitFee), _collectedFeeAmount)); _pushPoolShare(factory, _exitFee); _pushUnderlying(tokenOut, msg.sender, tokenAmountOut); return poolAmountIn; } // == // 'Underlying' token-manipulation functions make external calls but are NOT locked // You must `_lock_` or otherwise ensure reentry-safety function _pullUnderlying(address erc20, address from, uint amount) internal { bool xfer = IERC20(erc20).transferFrom(from, address(this), amount); require(xfer, "errErc20"); } function _pushUnderlying(address erc20, address to, uint amount) internal { bool xfer = IERC20(erc20).transfer(to, amount); require(xfer, "errErc20"); } function _pullPoolShare(address from, uint amount) internal { _pull(from, amount); } function _pushPoolShare(address to, uint amount) internal { _push(to, amount); } function _mintPoolShare(uint amount) internal { _mint(amount); } function _burnPoolShare(uint amount) internal { _burn(amount); } function _pushCollectedFundGivenOut(address _tokenIn, uint _tokenAmountIn, address _tokenOut, uint _tokenAmountOut) internal returns (uint subTokenAmountIn, uint tokenAmountOut) { subTokenAmountIn = 0; tokenAmountOut = _tokenAmountOut; if (collectedFee > 0) { address _collectedToken = IBFactory(factory).collectedToken(); if (_collectedToken == _tokenIn) { subTokenAmountIn = bdiv(bmul(_tokenAmountIn, collectedFee), BConst.BONE); _pushUnderlying(_tokenIn, factory, subTokenAmountIn); emit LOG_COLLECTED_FUND(_tokenIn, subTokenAmountIn); } else { uint _collectedFeeAmount = bdiv(bmul(_tokenAmountOut, collectedFee), BConst.BONE); _pushUnderlying(_tokenOut, factory, _collectedFeeAmount); tokenAmountOut = bsub(_tokenAmountOut, _collectedFeeAmount); emit LOG_COLLECTED_FUND(_tokenOut, _collectedFeeAmount); } } } // always push out _tokenIn (already have) function _pushCollectedFundGivenIn(address _tokenIn, uint _tokenAmountIn) internal returns (uint collectedFeeAmount) { collectedFeeAmount = 0; if (collectedFee > 0) { address _collectedToken = IBFactory(factory).collectedToken(); if (_collectedToken != address(0)) { collectedFeeAmount = bdiv(bmul(_tokenAmountIn, collectedFee), BConst.BONE); _pushUnderlying(_tokenIn, factory, collectedFeeAmount); emit LOG_COLLECTED_FUND(_tokenIn, collectedFeeAmount); } } } } // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is disstributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // Builds new BPools, logging their addresses and providing `isBPool(address) -> (bool)` contract BPoolCreator { function newBPool() external returns (BPool) { return new BPool(msg.sender); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"newBPool","outputs":[{"internalType":"contract BPool","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50615b21806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063d556c5dc14610030575b600080fd5b610038610054565b604080516001600160a01b039092168252519081900360200190f35b60003360405161006390610096565b6001600160a01b03909116815260405190819003602001906000f080158015610090573d6000803e3d6000fd5b50905090565b615a48806100a48339019056fe60c0604052601860808190527f56616c7565204c69717569646974792050726f7669646572000000000000000060a090815262000040916003919062000120565b50604080518082019091526003808252620564c560ec1b60209092019182526200006d9160049162000120565b506005805460ff191660121790556103e96006553480156200008e57600080fd5b5060405162005a4838038062005a4883398181016040526020811015620000b457600080fd5b505160088054600780546001600160a01b039094166001600160a01b0319948516811790915568056bc75e2d63100000600955660aa87bee538000600a556601c6bf52634000600b556000600c55921690911760ff60a01b19169055600d805460ff19169055620001bc565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200016357805160ff191683800117855562000193565b8280016001018555821562000193579182015b828111156200019357825182559160200191906001019062000176565b50620001a1929150620001a5565b5090565b5b80821115620001a15760008155600101620001a6565b61587c80620001cc6000396000f3fe608060405234801561001057600080fd5b50600436106103785760003560e01c80637c5e9ea4116101d3578063be3bbd2e11610104578063e4e1e538116100a2578063f1b8a9b71161007c578063f1b8a9b714610c26578063f77c479114610c4c578063f8b2cb4f14610c54578063f8d6aed414610c7a57610378565b8063e4e1e53814610bcf578063e5a583a914610c01578063e811f50a14610c1e57610378565b8063cd2ed8fb116100de578063cd2ed8fb14610b47578063cf5e7bd314610b4f578063d73dd62314610b75578063dd62ed3e14610ba157610378565b8063be3bbd2e14610ac3578063c45a015514610b1b578063cc77828d14610b3f57610378565b8063948d8ce611610171578063a9059cbb1161014b578063a9059cbb146109dd578063b02f0b7314610a09578063b3f05b9714610a80578063ba9530a614610a8857610378565b8063948d8ce61461097a57806395d89b41146109a0578063a221ee49146109a857610378565b80638c0ba32f116101ad5780638c0ba32f1461091e5780638c28cbe81461092657806392eefe9b1461094c578063936c34771461097257610378565b80637c5e9ea41461084a5780638201aa3f146108a35780638656b653146108e357610378565b8063429b4ae6116102ad5780635c1bbaf71161024b578063661884631161022557806366188463146107855780636d06dfa0146107b157806370a08231146107e357806379104ea61461080957610378565b80635c1bbaf7146107105780635db342771461074b5780636284ae411461077d57610378565b80634bb278f3116102875780634bb278f3146106815780634f69c0d41461068957806354cf2aeb1461070057806354fd4d501461070857610378565b8063429b4ae61461061357806346ab38f11461063057806349b595521461066257610378565b80631e1f761b1161031a5780632f37b624116102f45780632f37b62414610580578063313ce567146105a657806334e19907146105c45780633fdddaa2146105e157610378565b80631e1f761b1461052357806323b872dd1461052b5780632da778bc1461056157610378565b8063095ea7b311610356578063095ea7b31461047f5780631446a7ff146104bf57806315e84af9146104ed57806318160ddd1461051b57610378565b8063024eb2e31461037d57806302c96748146103d057806306fdde0314610402575b600080fd5b6103be600480360360e081101561039357600080fd5b5080359060208101359060408101359060608101359060808101359060a08101359060c00135610cb5565b60408051918252519081900360200190f35b6103be600480360360608110156103e657600080fd5b506001600160a01b038135169060208101359060400135610d79565b61040a6110c0565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561044457818101518382015260200161042c565b50505050905090810190601f1680156104715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ab6004803603604081101561049557600080fd5b506001600160a01b038135169060200135611156565b604080519115158252519081900360200190f35b6103be600480360360408110156104d557600080fd5b506001600160a01b03813581169160200135166111ab565b6103be6004803603604081101561050357600080fd5b506001600160a01b03813581169160200135166112ee565b6103be611428565b6103be61142e565b6104ab6004803603606081101561054157600080fd5b506001600160a01b03813581169160208101359091169060400135611434565b61057e6004803603602081101561057757600080fd5b5035611581565b005b6104ab6004803603602081101561059657600080fd5b50356001600160a01b031661171c565b6105ae61173a565b6040805160ff9092168252519081900360200190f35b61057e600480360360208110156105da57600080fd5b5035611743565b61057e600480360360608110156105f757600080fd5b506001600160a01b038135169060208101359060400135611969565b61057e6004803603602081101561062957600080fd5b5035611d2d565b6103be6004803603606081101561064657600080fd5b506001600160a01b038135169060208101359060400135611e73565b61057e6004803603602081101561067857600080fd5b50351515612166565b61057e6122c7565b61057e6004803603604081101561069f57600080fd5b813591908101906040810160208201356401000000008111156106c157600080fd5b8201836020820111156106d357600080fd5b803590602001918460208302840111640100000000831117156106f557600080fd5b509092509050612489565b6103be61275b565b6103be612761565b6103be600480360360c081101561072657600080fd5b5080359060208101359060408101359060608101359060808101359060a00135612767565b6103be6004803603606081101561076157600080fd5b506001600160a01b03813516906020810135906040013561281a565b6103be612ae5565b6104ab6004803603604081101561079b57600080fd5b506001600160a01b038135169060200135612aeb565b6103be600480360360608110156107c757600080fd5b506001600160a01b038135169060208101359060400135612bc3565b6103be600480360360208110156107f957600080fd5b50356001600160a01b0316612edd565b6103be600480360360e081101561081f57600080fd5b5080359060208101359060408101359060608101359060808101359060a08101359060c00135612ef8565b61088a600480360360a081101561086057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060800135612fc7565b6040805192835260208301919091528051918290030190f35b61088a600480360360a08110156108b957600080fd5b506001600160a01b038135811691602081013591604082013516906060810135906080013561347a565b6103be600480360360c08110156108f957600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613916565b6104ab6139b2565b61057e6004803603602081101561093c57600080fd5b50356001600160a01b03166139c2565b61057e6004803603602081101561096257600080fd5b50356001600160a01b0316613b6b565b6103be613c8c565b6103be6004803603602081101561099057600080fd5b50356001600160a01b0316613cdd565b61040a613d9c565b6103be600480360360a08110156109be57600080fd5b5080359060208101359060408101359060608101359060800135613dfd565b6104ab600480360360408110156109f357600080fd5b506001600160a01b038135169060200135613e62565b61057e60048036036040811015610a1f57600080fd5b81359190810190604081016020820135640100000000811115610a4157600080fd5b820183602082011115610a5357600080fd5b80359060200191846020830284011164010000000083111715610a7557600080fd5b509092509050613e78565b6104ab614191565b6103be600480360360c0811015610a9e57600080fd5b5080359060208101359060408101359060608101359060808101359060a0013561419a565b610acb61421b565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610b07578181015183820152602001610aef565b505050509050019250505060405180910390f35b610b23614308565b604080516001600160a01b039092168252519081900360200190f35b610acb614317565b6103be614361565b61057e60048036036020811015610b6557600080fd5b50356001600160a01b0316614367565b6104ab60048036036040811015610b8b57600080fd5b506001600160a01b0381351690602001356146be565b6103be60048036036040811015610bb757600080fd5b506001600160a01b038135811691602001351661473f565b61057e60048036036060811015610be557600080fd5b506001600160a01b03813516906020810135906040013561476a565b61057e60048036036020811015610c1757600080fd5b50356149a8565b6103be614ae6565b6103be60048036036020811015610c3c57600080fd5b50356001600160a01b0316614aec565b610b23614bbd565b6103be60048036036020811015610c6a57600080fd5b50356001600160a01b0316614bcc565b6103be600480360360c0811015610c9057600080fd5b5080359060208101359060408101359060608101359060808101359060a00135614c8b565b600080610cc28887614d0e565b90506000610cd8670de0b6b3a764000083614e15565b90506000610ce68287614e73565b90506000610d0588610d00670de0b6b3a764000085614e15565b614d0e565b90506000610d138d83614e15565b90506000610d21828f614d0e565b90506000610d2f8288614f2d565b90506000610d3d828f614e73565b90506000610d4b8f83614e15565b9050610d6381610d00670de0b6b3a76400008e614e15565b9950505050505050505050979650505050505050565b600554600090610100900460ff1615610dc3576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff16610e67576040805162461bcd60e51b815260206004820152600a60248201526908599a5b985b1a5e995960b21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f602052604090205460ff16610ebd576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f60205260409020600390810154610ef291670de0b6b3a76400005b04600101614e73565b831115610f31576040805162461bcd60e51b81526020600482015260086024820152670f9b585e13d4985d60c21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f6020526040902060038101546002808301549054601054600a54600c54610f6e95949392918a91610cb5565b915081610fb1576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b82821115610fef576040805162461bcd60e51b81526020600482015260066024820152651e3634b6a4b760d11b604482015290519081900360640190fd5b610ffd816003015485614e15565b8160030181905550600061101383600c54614e73565b6040805187815290519192506001600160a01b0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36110613384615029565b600061106d3085615037565b905061108a61108561107f8685614e15565b83614e15565b615143565b6007546110a0906001600160a01b03168361514f565b6110ab873388615159565b5050506005805461ff00191690559392505050565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561114c5780601f106111215761010080835404028352916020019161114c565b820191906000526020600020905b81548152906001019060200180831161112f57829003601f168201915b5050505050905090565b3360008181526001602090815260408083206001600160a01b03871680855290835281842086905581518681529151939490939092600080516020615827833981519152928290030190a35060015b92915050565b600554600090610100900460ff16156111f5576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6001600160a01b0383166000908152600f602052604090205460ff1661124b576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0382166000908152600f602052604090205460ff166112a1576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b038084166000908152600f602052604080822092851682528120600380840154600280860154928401549084015493946112e59492939290613dfd565b95945050505050565b600554600090610100900460ff1615611338576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6001600160a01b0383166000908152600f602052604090205460ff1661138e576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0382166000908152600f602052604090205460ff166113e4576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b038084166000908152600f6020526040808220928516825290206003808301546002808501549284015490840154600a546112e594929190613dfd565b60025490565b60095481565b6000336001600160a01b038516148061147057506001600160a01b03841660009081526001602090815260408083203384529091529020548211155b6114ac576040805162461bcd60e51b815260206004820152600860248201526710b9b832b73232b960c11b604482015290519081900360640190fd5b6114b7848484615223565b336001600160a01b038516148015906114f557506001600160a01b038416600090815260016020908152604080832033845290915290205460001914155b15611577576001600160a01b03841660009081526001602090815260408083203384529091529020546115289083614e15565b6001600160a01b03858116600090815260016020908152604080832033808552908352928190208590558051948552519287169391926000805160206158278339815191529281900390910190a35b5060019392505050565b336001600160a01b03166000356001600160e01b0319166001600160e01b03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff1615611626576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b6008546001600160a01b03163314611673576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b66038d7ea4c680008110156116c1576040805162461bcd60e51b815260206004820152600f60248201526e03c6d696e496e6974506f6f6c53757608c1b604482015290519081900360640190fd5b6ec097ce7bc90715b34b9f1000000000811115611717576040805162461bcd60e51b815260206004820152600f60248201526e03e6d6178496e6974506f6f6c53757608c1b604482015290519081900360640190fd5b600955565b6001600160a01b03166000908152600f602052604090205460ff1690565b60055460ff1690565b600554610100900460ff161561178a576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff161561182e576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b6008546001600160a01b0316331461187b576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b64e8d4a510008110156118bf576040805162461bcd60e51b81526020600482015260076024820152663c6d696e46656560c81b604482015290519081900360640190fd5b67016345785d8a0000811115611906576040805162461bcd60e51b81526020600482015260076024820152663e6d617846656560c81b604482015290519081900360640190fd5b80611914600b546002614e73565b1115611959576040805162461bcd60e51b815260206004820152600f60248201526e1e31b7b63632b1ba32b22332b2951960891b604482015290519081900360640190fd5b600a556005805461ff0019169055565b600554610100900460ff16156119b0576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a26008546001600160a01b03163314611a5d576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b6001600160a01b0383166000908152600f602052604090205460ff16611ab3576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b600d5460ff1615611af7576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b670de0b6b3a7640000811015611b41576040805162461bcd60e51b815260206004820152600a6024820152690f1b5a5b95d95a59da1d60b21b604482015290519081900360640190fd5b6802b5e3af16b1880000811115611b8c576040805162461bcd60e51b815260206004820152600a6024820152690f9b585e15d95a59da1d60b21b604482015290519081900360640190fd5b620f4240821015611bce576040805162461bcd60e51b81526020600482015260076024820152660f1b5a5b90985b60ca1b604482015290519081900360640190fd5b6001600160a01b0383166000908152600f602052604090206002015480821115611c5c57611c07601054611c028484614e15565b615325565b60108190556802b5e3af16b18800001015611c57576040805162461bcd60e51b815260206004820152600b60248201526a0f9b585e1515d95a59da1d60aa1b604482015290519081900360640190fd5b611c7d565b80821015611c7d57611c79601054611c748385614e15565b614e15565b6010555b6001600160a01b0384166000908152600f602052604090206002810183905560030180549084905580841115611cc657611cc18533611cbc8785614e15565b61536e565b611d1b565b80841015611d1b576000611cda8286614e15565b90506000611cea82600c54614e73565b9050611d008733611cfb8585614e15565b615159565b600754611d189088906001600160a01b031683615159565b50505b50506005805461ff0019169055505050565b336001600160a01b03166000356001600160e01b0319166001600160e01b03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a26007546001600160a01b03163314611dd8576040805162461bcd60e51b815260206004820152600860248201526721666163746f727960c01b604482015290519081900360640190fd5b6611c37937e08000811115611e20576040805162461bcd60e51b81526020600482015260096024820152683e6d6178436f46656560b81b604482015290519081900360640190fd5b600a54611e2e826002614e73565b1115611e6e576040805162461bcd60e51b815260206004820152600a6024820152691f39bbb0b82332b2979960b11b604482015290519081900360640190fd5b600b55565b600554600090610100900460ff1615611ebd576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff16611f61576040805162461bcd60e51b815260206004820152600a60248201526908599a5b985b1a5e995960b21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f602052604090205460ff16611fb7576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f6020526040902060038101546002808301549054601054600a54600c54611ff495949392918a91612ef8565b915082821015612033576040805162461bcd60e51b81526020600482015260056024820152643c6c696d4f60d81b604482015290519081900360640190fd5b6001600160a01b0385166000908152600f6020526040902060039081015461206391670de0b6b3a7640000610ee9565b8211156120a2576040805162461bcd60e51b81526020600482015260086024820152670f9b585e13d4985d60c21b604482015290519081900360640190fd5b6120b0816003015483614e15565b816003018190555060006120c685600c54614e73565b6040805185815290519192506001600160a01b0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36121143386615029565b6121216110858683614e15565b600754612137906001600160a01b03168261514f565b612143308688866153c7565b93506121529050863385615159565b50506005805461ff00191690559392505050565b600554610100900460ff16156121ad576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff1615612251576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b6008546001600160a01b0316331461229e576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b60088054911515600160a01b0260ff60a01b199092169190911790556005805461ff0019169055565b600554610100900460ff161561230e576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a26008546001600160a01b031633146123bb576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b600d5460ff16156123ff576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b600e5460021115612444576040805162461bcd60e51b815260206004820152600a6024820152693c6d696e546f6b656e7360b01b604482015290519081900360640190fd5b600d805460ff191660011790556008805460ff60a01b1916600160a01b1790556009546124709061554d565b61247c3360095461514f565b6005805461ff0019169055565b600554610100900460ff16156124d0576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff16612574576040805162461bcd60e51b815260206004820152600a60248201526908599a5b985b1a5e995960b21b604482015290519081900360640190fd5b600061257e611428565b9050600061258c8583614d0e565b9050806125cf576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b60005b600e54811015612747576000600e82815481106125eb57fe5b60009182526020808320909101546001600160a01b0316808352600f9091526040822060030154909250906126208583614e73565b905080612663576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b87878581811061266f57fe5b905060200201358111156126b3576040805162461bcd60e51b81526020600482015260066024820152651e3634b6a4b760d11b604482015290519081900360640190fd5b6001600160a01b0383166000908152600f60205260409020600301546126d99082615325565b6001600160a01b0384166000818152600f60209081526040918290206003019390935580518481529051919233927f63982df10efd8dfaaaa0fcc7f50b2d93b7cba26ccc48adee2873220d485dc39a9281900390910190a361273c83338361536e565b5050506001016125d2565b506127518561554d565b611d1b338661514f565b600a5481565b60065481565b6000806127748786614d0e565b905060006127828786615325565b905060006127908289614d0e565b905060006127a6670de0b6b3a764000085614d0e565b905060006127b48383614f2d565b905060006127c2828e614e73565b905060006127d0828f614e15565b905060006127ef6127e9670de0b6b3a76400008a614e15565b8b614e73565b905061280782610d00670de0b6b3a764000084614e15565b9f9e505050505050505050505050505050565b600554600090610100900460ff1615612864576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff16612908576040805162461bcd60e51b815260206004820152600a60248201526908599a5b985b1a5e995960b21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f602052604090205460ff1661295e576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f6020526040902060030154612990906002670de0b6b3a76400005b04614e73565b8311156129cf576040805162461bcd60e51b81526020600482015260086024820152670f9b585e1254985d60c21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f6020526040902060038101546002808301549054601054600a54612a0994939291908990613916565b915082821015612a48576040805162461bcd60e51b81526020600482015260056024820152643c6c696d4f60d81b604482015290519081900360640190fd5b612a56816003015485615325565b60038201556040805185815290516001600160a01b0387169133917f63982df10efd8dfaaaa0fcc7f50b2d93b7cba26ccc48adee2873220d485dc39a9181900360200190a3612aa48261554d565b612aaf85338661536e565b6000612abd868630866153c7565b935090508015612adb57612ad5826003015482614e15565b60038301555b612152338461514f565b600c5481565b3360009081526001602090815260408083206001600160a01b038616845290915281205480831115612b40573360009081526001602090815260408083206001600160a01b0388168452909152812055612b6f565b612b4a8184614e15565b3360009081526001602090815260408083206001600160a01b03891684529091529020555b3360008181526001602090815260408083206001600160a01b038916808552908352928190205481519081529051929392600080516020615827833981519152929181900390910190a35060019392505050565b600554600090610100900460ff1615612c0d576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff16612cb1576040805162461bcd60e51b815260206004820152600a60248201526908599a5b985b1a5e995960b21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f602052604090205460ff16612d07576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f6020526040902060038101546002808301549054601054600a54612d4194939291908990612767565b915081612d84576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b82821115612dc2576040805162461bcd60e51b81526020600482015260066024820152651e3634b6a4b760d11b604482015290519081900360640190fd5b6001600160a01b0385166000908152600f6020526040902060030154612df2906002670de0b6b3a764000061298a565b821115612e31576040805162461bcd60e51b81526020600482015260086024820152670f9b585e1254985d60c21b604482015290519081900360640190fd5b612e3f816003015483615325565b60038201556040805183815290516001600160a01b0387169133917f63982df10efd8dfaaaa0fcc7f50b2d93b7cba26ccc48adee2873220d485dc39a9181900360200190a3612e8d8461554d565b612e97338561514f565b612ea285338461536e565b6000612eae8684615037565b9050801561215257612ec4826003015482614e15565b600383015550506005805461ff00191690559392505050565b6001600160a01b031660009081526020819052604090205490565b600080612f058887614d0e565b90506000612f2486612f1f670de0b6b3a764000087614e15565b614e73565b90506000612f328983614e15565b90506000612f40828b614d0e565b90506000612f5f82612f5a670de0b6b3a764000088614d0e565b614f2d565b90506000612f6d828f614e73565b90506000612f7b8f83614e15565b90506000612f9a612f94670de0b6b3a76400008a614e15565b8c614e73565b9050612fb282612f1f670de0b6b3a764000084614e15565b98505050505050505050979650505050505050565b6005546000908190610100900460ff1615613013576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a26001600160a01b0387166000908152600f602052604090205460ff166130c9576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0385166000908152600f602052604090205460ff1661311f576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b600854600160a01b900460ff1661316b576040805162461bcd60e51b815260206004820152600b60248201526a0217075626c6963537761760ac1b604482015290519081900360640190fd5b6001600160a01b038088166000908152600f6020526040808220928816825290206003808201546131a491670de0b6b3a7640000610ee9565b8611156131e3576040805162461bcd60e51b81526020600482015260086024820152670f9b585e13d4985d60c21b604482015290519081900360640190fd5b60006132048360030154846002015484600301548560020154600a54613dfd565b905085811115613249576040805162461bcd60e51b815260206004820152600b60248201526a6261644c696d507269636560a81b604482015290519081900360640190fd5b61326983600301548460020154846003015485600201548b600a54614c8b565b9450888511156132a9576040805162461bcd60e51b81526020600482015260066024820152651e3634b6a4b760d11b604482015290519081900360640190fd5b6132b7836003015486615325565b83600301819055506132cd826003015488614e15565b600380840182905584015460028086015490850154600a546132f0949190613dfd565b935080841015613336576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b85841115613377576040805162461bcd60e51b81526020600482015260096024820152683e6c696d507269636560b81b604482015290519081900360640190fd5b6133818588614d0e565b8111156133c4576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b876001600160a01b03168a6001600160a01b0316336001600160a01b03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d43378888b604051808381526020018281526020019250505060405180910390a461342c8a338761536e565b613437883389615159565b60006134438b87615037565b9050801561345f57613459846003015482614e15565b60038501555b505050506005805461ff001916905590969095509350505050565b6005546000908190610100900460ff16156134c6576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a26001600160a01b0387166000908152600f602052604090205460ff1661357c576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0385166000908152600f602052604090205460ff166135d2576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b600854600160a01b900460ff1661361e576040805162461bcd60e51b815260206004820152600b60248201526a0217075626c6963537761760ac1b604482015290519081900360640190fd5b6001600160a01b038088166000908152600f6020526040808220928816825290206003820154613658906002670de0b6b3a764000061298a565b881115613697576040805162461bcd60e51b81526020600482015260086024820152670f9b585e1254985d60c21b604482015290519081900360640190fd5b60006136b88360030154846002015484600301548560020154600a54613dfd565b9050858111156136fd576040805162461bcd60e51b815260206004820152600b60248201526a6261644c696d507269636560a81b604482015290519081900360640190fd5b61371d83600301548460020154846003015485600201548d600a5461419a565b94508685101561375c576040805162461bcd60e51b81526020600482015260056024820152643c6c696d4f60d81b604482015290519081900360640190fd5b61376a83600301548a615325565b8360030181905550613780826003015486614e15565b600380840182905584015460028086015490850154600a546137a3949190613dfd565b9350808410156137e9576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b8584111561382a576040805162461bcd60e51b81526020600482015260096024820152683e6c696d507269636560b81b604482015290519081900360640190fd5b6138348986614d0e565b811115613877576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b876001600160a01b03168a6001600160a01b0316336001600160a01b03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d433788c89604051808381526020018281526020019250505060405180910390a46138df8a338b61536e565b60006138ed8b8b8b896153c7565b96509050801561390b57613905846003015482614e15565b60038501555b61345f893388615159565b6000806139238786614d0e565b9050600061394261393c670de0b6b3a764000084614e15565b85614e73565b9050600061395c86612f1f670de0b6b3a764000085614e15565b9050600061396a8b83615325565b90506000613978828d614d0e565b905060006139868287614f2d565b90506000613994828d614e73565b90506139a0818d614e15565b9e9d5050505050505050505050505050565b600854600160a01b900460ff1681565b336001600160a01b03166000356001600160e01b0319166001600160e01b03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615613a6a576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461ff0019166101001790556001600160a01b0381166000908152600f602052604090205460ff16613acf576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b604080516370a0823160e01b815230600482015290516001600160a01b038316916370a08231916024808301926020929190829003018186803b158015613b1557600080fd5b505afa158015613b29573d6000803e3d6000fd5b505050506040513d6020811015613b3f57600080fd5b50516001600160a01b039091166000908152600f60205260409020600301556005805461ff0019169055565b600554610100900460ff1615613bb2576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a26008546001600160a01b03163314613c5f576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b03929092169190911790556005805461ff0019169055565b600554600090610100900460ff1615613cd6576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b5060105490565b600554600090610100900460ff1615613d27576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6001600160a01b0382166000908152600f602052604090205460ff16613d7d576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b506001600160a01b03166000908152600f602052604090206002015490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561114c5780601f106111215761010080835404028352916020019161114c565b600080613e0a8787614d0e565b90506000613e188686614d0e565b90506000613e268383614d0e565b90506000613e48670de0b6b3a7640000610d00670de0b6b3a764000089614e15565b9050613e548282614e73565b9a9950505050505050505050565b6000613e6f338484615223565b50600192915050565b600554610100900460ff1615613ebf576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff16613f63576040805162461bcd60e51b815260206004820152600a60248201526908599a5b985b1a5e995960b21b604482015290519081900360640190fd5b6000613f6d611428565b90506000613f7d85600c54614e73565b90506000613f8b8683614e15565b90506000613f998285614d0e565b905080613fdc576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b613fe63388615029565b600754613ffc906001600160a01b03168461514f565b61400582615143565b60005b600e5481101561417c576000600e828154811061402157fe5b60009182526020808320909101546001600160a01b0316808352600f9091526040822060030154909250906140568583614e73565b905080614099576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b8989858181106140a557fe5b905060200201358110156140e8576040805162461bcd60e51b81526020600482015260056024820152643c6c696d4f60d81b604482015290519081900360640190fd5b6001600160a01b0383166000908152600f602052604090206003015461410e9082614e15565b6001600160a01b0384166000818152600f60209081526040918290206003019390935580518481529051919233927fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed9281900390910190a3614171833383615159565b505050600101614008565b50506005805461ff0019169055505050505050565b600d5460ff1681565b6000806141a78786614d0e565b905060006141bd670de0b6b3a764000085614e15565b90506141c98582614e73565b905060006141db8a610d008c85615325565b905060006141e98285614f2d565b905060006141ff670de0b6b3a764000083614e15565b905061420b8a82614e73565b9c9b505050505050505050505050565b600554606090610100900460ff1615614265576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b600d5460ff166142a9576040805162461bcd60e51b815260206004820152600a60248201526908599a5b985b1a5e995960b21b604482015290519081900360640190fd5b600e80548060200260200160405190810160405280929190818152602001828054801561114c57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116142e1575050505050905090565b6007546001600160a01b031681565b600554606090610100900460ff16156142a9576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b600e5490565b600554610100900460ff16156143ae576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a26008546001600160a01b0316331461445b576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b6001600160a01b0381166000908152600f602052604090205460ff166144b1576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b600d5460ff16156144f5576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b6001600160a01b0381166000908152600f6020526040812060030154600c54909190614522908390614e73565b6010546001600160a01b0385166000908152600f602052604090206002015491925061454d91614e15565b6010556001600160a01b0383166000908152600f6020526040902060010154600e8054600019810191908290811061458157fe5b600091825260209091200154600e80546001600160a01b0390921691849081106145a757fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555081600f6000600e85815481106145e757fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902060010155600e80548061461a57fe5b60008281526020808220600019908401810180546001600160a01b031916905590920190925560408051608081018252838152808301848152818301858152606083018681526001600160a01b038c168752600f909552929094209051815460ff191690151517815592516001840155516002830155516003909101556146a68533611cfb8787614e15565b600754611d1b9086906001600160a01b031685615159565b3360009081526001602090815260408083206001600160a01b03861684529091528120546146ec9083615325565b3360008181526001602090815260408083206001600160a01b038916808552908352928190208590558051948552519193600080516020615827833981519152929081900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b336001600160a01b03166000356001600160e01b0319166001600160e01b03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a26008546001600160a01b03163314614818576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b6001600160a01b0383166000908152600f602052604090205460ff161561486e576040805162461bcd60e51b8152602060048201526005602482015264189bdd5b9960da1b604482015290519081900360640190fd5b600d5460ff16156148b2576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b600e546008116148f6576040805162461bcd60e51b815260206004820152600a6024820152693e6d6178546f6b656e7360b01b604482015290519081900360640190fd5b604080516080810182526001808252600e805460208085019182526000858701818152606087018281526001600160a01b038c16808452600f9094529782209651875460ff1916901515178755925186860155915160028601559451600390940193909355805491820181559091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b03191690911790556149a3838383611969565b505050565b336001600160a01b03166000356001600160e01b0319166001600160e01b03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff1615614a4d576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b6007546001600160a01b03163314614a97576040805162461bcd60e51b815260206004820152600860248201526721666163746f727960c01b604482015290519081900360640190fd5b66038d7ea4c68000811115614ae1576040805162461bcd60e51b815260206004820152600b60248201526a3e6d61784578697446656560a81b604482015290519081900360640190fd5b600c55565b600b5481565b600554600090610100900460ff1615614b36576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6001600160a01b0382166000908152600f602052604090205460ff16614b8c576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0382166000908152600f6020526040902060020154601054614bb6908290614d0e565b9392505050565b6008546001600160a01b031681565b600554600090610100900460ff1615614c16576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6001600160a01b0382166000908152600f602052604090205460ff16614c6c576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b506001600160a01b03166000908152600f602052604090206003015490565b600080614c988588614d0e565b90506000614ca68786614e15565b90506000614cb48883614d0e565b90506000614cc28285614f2d565b9050614cd681670de0b6b3a7640000614e15565b9050614cea670de0b6b3a764000087614e15565b9450614cff614cf98c83614e73565b86614d0e565b9b9a5050505050505050505050565b600081614d4d576040805162461bcd60e51b8152602060048201526008602482015267064697620627920360c41b604482015290519081900360640190fd5b670de0b6b3a76400008302831580614d755750670de0b6b3a7640000848281614d7257fe5b04145b614db5576040805162461bcd60e51b815260206004820152600c60248201526b191a5d881a5b9d195c9b985b60a21b604482015290519081900360640190fd5b60028304810181811015614dff576040805162461bcd60e51b815260206004820152600c60248201526b191a5d881a5b9d195c9b985b60a21b604482015290519081900360640190fd5b6000848281614e0a57fe5b049695505050505050565b6000806000614e248585615556565b915091508015614e6b576040805162461bcd60e51b815260206004820152600d60248201526c73756220756e646572666c6f7760981b604482015290519081900360640190fd5b509392505050565b6000828202831580614e8d575082848281614e8a57fe5b04145b614ecd576040805162461bcd60e51b815260206004820152600c60248201526b6d756c206f766572666c6f7760a01b604482015290519081900360640190fd5b6706f05b59d3b20000810181811015614f1c576040805162461bcd60e51b815260206004820152600c60248201526b6d756c206f766572666c6f7760a01b604482015290519081900360640190fd5b6000670de0b6b3a764000082614e0a565b60006001831015614f74576040805162461bcd60e51b815260206004820152600c60248201526b6261736520746f6f206c6f7760a01b604482015290519081900360640190fd5b671bc16d674ec7ffff831115614fc1576040805162461bcd60e51b815260206004820152600d60248201526c0c4c2e6ca40e8dede40d0d2ced609b1b604482015290519081900360640190fd5b6000614fcc8361557b565b90506000614fda8483614e15565b90506000614ff086614feb85615596565b6155a4565b9050816150015792506111a5915050565b600061501287846305f5e1006155fb565b905061501e8282614e73565b979650505050505050565b61503382826156d9565b5050565b600b54600090156111a557600754604080516374b1330b60e11b815290516000926001600160a01b03169163e9626616916004808301926020929190829003018186803b15801561508757600080fd5b505afa15801561509b573d6000803e3d6000fd5b505050506040513d60208110156150b157600080fd5b505190506001600160a01b0381161561513c576150e16150d384600b54614e73565b670de0b6b3a7640000614d0e565b6007549092506150fc9085906001600160a01b031684615159565b6040805183815290516001600160a01b038616917faa299fc96f84481838321cf4ac49861748dc206dd9101e1b8ed3f34bb88cadbd919081900360200190a25b5092915050565b61514c816156e4565b50565b61503382826157a6565b6000836001600160a01b031663a9059cbb84846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156151b257600080fd5b505af11580156151c6573d6000803e3d6000fd5b505050506040513d60208110156151dc57600080fd5b505190508061521d576040805162461bcd60e51b8152602060048201526008602482015267065727245726332360c41b604482015290519081900360640190fd5b50505050565b6001600160a01b038316600090815260208190526040902054811115615279576040805162461bcd60e51b815260206004808301919091526024820152630858985b60e21b604482015290519081900360640190fd5b6001600160a01b03831660009081526020819052604090205461529c9082614e15565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546152cb9082615325565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082820183811015614bb6576040805162461bcd60e51b815260206004820152600c60248201526b616464206f766572666c6f7760a01b604482015290519081900360640190fd5b604080516323b872dd60e01b81526001600160a01b0384811660048301523060248301526044820184905291516000928616916323b872dd91606480830192602092919082900301818787803b1580156151b257600080fd5b600b5460009082901561554457600754604080516374b1330b60e11b815290516000926001600160a01b03169163e9626616916004808301926020929190829003018186803b15801561541957600080fd5b505afa15801561542d573d6000803e3d6000fd5b505050506040513d602081101561544357600080fd5b505190506001600160a01b0380821690881614156154c95761546a6150d387600b54614e73565b6007549093506154859088906001600160a01b031685615159565b6040805184815290516001600160a01b038916917faa299fc96f84481838321cf4ac49861748dc206dd9101e1b8ed3f34bb88cadbd919081900360200190a2615542565b60006154da6150d386600b54614e73565b6007549091506154f59087906001600160a01b031683615159565b6154ff8582614e15565b6040805183815290519194506001600160a01b038816917faa299fc96f84481838321cf4ac49861748dc206dd9101e1b8ed3f34bb88cadbd9181900360200190a2505b505b94509492505050565b61514c816157b1565b60008082841061556c5750508082036000615574565b505081810360015b9250929050565b6000670de0b6b3a764000061558f83615596565b0292915050565b670de0b6b3a7640000900490565b600080600283066155bd57670de0b6b3a76400006155bf565b835b90506002830492505b8215614bb6576155d88485614e73565b935060028306156155f0576155ed8185614e73565b90505b6002830492506155c8565b600082818061561287670de0b6b3a7640000615556565b9092509050670de0b6b3a764000080600060015b8884106156ca576000670de0b6b3a76400008202905060008061565a8a61565585670de0b6b3a7640000614e15565b615556565b9150915061566c87612f1f848c614e73565b96506156788784614d0e565b965086615687575050506156ca565b8715615691579315935b801561569b579315935b84156156b2576156ab8688614e15565b95506156bf565b6156bc8688615325565b95505b505050600101615626565b50909998505050505050505050565b615033823083615223565b30600090815260208190526040902054811115615731576040805162461bcd60e51b815260206004808301919091526024820152630858985b60e21b604482015290519081900360640190fd5b3060009081526020819052604090205461574b9082614e15565b306000908152602081905260409020556002546157689082614e15565b60025560408051828152905160009130917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b615033308383615223565b306000908152602081905260409020546157cb9082615325565b306000908152602081905260409020556002546157e89082615325565b60025560408051828152905130916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35056fe8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a26469706673582212204814ffc3fcf8d3e48bc307a87a7d058f3ac272a5642097cdb240483f9938a32564736f6c634300060c0033a2646970667358221220526fe36af79a194c0b42f08e57e9e256c1a45e742f8b5ec53273cd3f1bd3561e64736f6c634300060c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063d556c5dc14610030575b600080fd5b610038610054565b604080516001600160a01b039092168252519081900360200190f35b60003360405161006390610096565b6001600160a01b03909116815260405190819003602001906000f080158015610090573d6000803e3d6000fd5b50905090565b615a48806100a48339019056fe60c0604052601860808190527f56616c7565204c69717569646974792050726f7669646572000000000000000060a090815262000040916003919062000120565b50604080518082019091526003808252620564c560ec1b60209092019182526200006d9160049162000120565b506005805460ff191660121790556103e96006553480156200008e57600080fd5b5060405162005a4838038062005a4883398181016040526020811015620000b457600080fd5b505160088054600780546001600160a01b039094166001600160a01b0319948516811790915568056bc75e2d63100000600955660aa87bee538000600a556601c6bf52634000600b556000600c55921690911760ff60a01b19169055600d805460ff19169055620001bc565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200016357805160ff191683800117855562000193565b8280016001018555821562000193579182015b828111156200019357825182559160200191906001019062000176565b50620001a1929150620001a5565b5090565b5b80821115620001a15760008155600101620001a6565b61587c80620001cc6000396000f3fe608060405234801561001057600080fd5b50600436106103785760003560e01c80637c5e9ea4116101d3578063be3bbd2e11610104578063e4e1e538116100a2578063f1b8a9b71161007c578063f1b8a9b714610c26578063f77c479114610c4c578063f8b2cb4f14610c54578063f8d6aed414610c7a57610378565b8063e4e1e53814610bcf578063e5a583a914610c01578063e811f50a14610c1e57610378565b8063cd2ed8fb116100de578063cd2ed8fb14610b47578063cf5e7bd314610b4f578063d73dd62314610b75578063dd62ed3e14610ba157610378565b8063be3bbd2e14610ac3578063c45a015514610b1b578063cc77828d14610b3f57610378565b8063948d8ce611610171578063a9059cbb1161014b578063a9059cbb146109dd578063b02f0b7314610a09578063b3f05b9714610a80578063ba9530a614610a8857610378565b8063948d8ce61461097a57806395d89b41146109a0578063a221ee49146109a857610378565b80638c0ba32f116101ad5780638c0ba32f1461091e5780638c28cbe81461092657806392eefe9b1461094c578063936c34771461097257610378565b80637c5e9ea41461084a5780638201aa3f146108a35780638656b653146108e357610378565b8063429b4ae6116102ad5780635c1bbaf71161024b578063661884631161022557806366188463146107855780636d06dfa0146107b157806370a08231146107e357806379104ea61461080957610378565b80635c1bbaf7146107105780635db342771461074b5780636284ae411461077d57610378565b80634bb278f3116102875780634bb278f3146106815780634f69c0d41461068957806354cf2aeb1461070057806354fd4d501461070857610378565b8063429b4ae61461061357806346ab38f11461063057806349b595521461066257610378565b80631e1f761b1161031a5780632f37b624116102f45780632f37b62414610580578063313ce567146105a657806334e19907146105c45780633fdddaa2146105e157610378565b80631e1f761b1461052357806323b872dd1461052b5780632da778bc1461056157610378565b8063095ea7b311610356578063095ea7b31461047f5780631446a7ff146104bf57806315e84af9146104ed57806318160ddd1461051b57610378565b8063024eb2e31461037d57806302c96748146103d057806306fdde0314610402575b600080fd5b6103be600480360360e081101561039357600080fd5b5080359060208101359060408101359060608101359060808101359060a08101359060c00135610cb5565b60408051918252519081900360200190f35b6103be600480360360608110156103e657600080fd5b506001600160a01b038135169060208101359060400135610d79565b61040a6110c0565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561044457818101518382015260200161042c565b50505050905090810190601f1680156104715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ab6004803603604081101561049557600080fd5b506001600160a01b038135169060200135611156565b604080519115158252519081900360200190f35b6103be600480360360408110156104d557600080fd5b506001600160a01b03813581169160200135166111ab565b6103be6004803603604081101561050357600080fd5b506001600160a01b03813581169160200135166112ee565b6103be611428565b6103be61142e565b6104ab6004803603606081101561054157600080fd5b506001600160a01b03813581169160208101359091169060400135611434565b61057e6004803603602081101561057757600080fd5b5035611581565b005b6104ab6004803603602081101561059657600080fd5b50356001600160a01b031661171c565b6105ae61173a565b6040805160ff9092168252519081900360200190f35b61057e600480360360208110156105da57600080fd5b5035611743565b61057e600480360360608110156105f757600080fd5b506001600160a01b038135169060208101359060400135611969565b61057e6004803603602081101561062957600080fd5b5035611d2d565b6103be6004803603606081101561064657600080fd5b506001600160a01b038135169060208101359060400135611e73565b61057e6004803603602081101561067857600080fd5b50351515612166565b61057e6122c7565b61057e6004803603604081101561069f57600080fd5b813591908101906040810160208201356401000000008111156106c157600080fd5b8201836020820111156106d357600080fd5b803590602001918460208302840111640100000000831117156106f557600080fd5b509092509050612489565b6103be61275b565b6103be612761565b6103be600480360360c081101561072657600080fd5b5080359060208101359060408101359060608101359060808101359060a00135612767565b6103be6004803603606081101561076157600080fd5b506001600160a01b03813516906020810135906040013561281a565b6103be612ae5565b6104ab6004803603604081101561079b57600080fd5b506001600160a01b038135169060200135612aeb565b6103be600480360360608110156107c757600080fd5b506001600160a01b038135169060208101359060400135612bc3565b6103be600480360360208110156107f957600080fd5b50356001600160a01b0316612edd565b6103be600480360360e081101561081f57600080fd5b5080359060208101359060408101359060608101359060808101359060a08101359060c00135612ef8565b61088a600480360360a081101561086057600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060800135612fc7565b6040805192835260208301919091528051918290030190f35b61088a600480360360a08110156108b957600080fd5b506001600160a01b038135811691602081013591604082013516906060810135906080013561347a565b6103be600480360360c08110156108f957600080fd5b5080359060208101359060408101359060608101359060808101359060a00135613916565b6104ab6139b2565b61057e6004803603602081101561093c57600080fd5b50356001600160a01b03166139c2565b61057e6004803603602081101561096257600080fd5b50356001600160a01b0316613b6b565b6103be613c8c565b6103be6004803603602081101561099057600080fd5b50356001600160a01b0316613cdd565b61040a613d9c565b6103be600480360360a08110156109be57600080fd5b5080359060208101359060408101359060608101359060800135613dfd565b6104ab600480360360408110156109f357600080fd5b506001600160a01b038135169060200135613e62565b61057e60048036036040811015610a1f57600080fd5b81359190810190604081016020820135640100000000811115610a4157600080fd5b820183602082011115610a5357600080fd5b80359060200191846020830284011164010000000083111715610a7557600080fd5b509092509050613e78565b6104ab614191565b6103be600480360360c0811015610a9e57600080fd5b5080359060208101359060408101359060608101359060808101359060a0013561419a565b610acb61421b565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610b07578181015183820152602001610aef565b505050509050019250505060405180910390f35b610b23614308565b604080516001600160a01b039092168252519081900360200190f35b610acb614317565b6103be614361565b61057e60048036036020811015610b6557600080fd5b50356001600160a01b0316614367565b6104ab60048036036040811015610b8b57600080fd5b506001600160a01b0381351690602001356146be565b6103be60048036036040811015610bb757600080fd5b506001600160a01b038135811691602001351661473f565b61057e60048036036060811015610be557600080fd5b506001600160a01b03813516906020810135906040013561476a565b61057e60048036036020811015610c1757600080fd5b50356149a8565b6103be614ae6565b6103be60048036036020811015610c3c57600080fd5b50356001600160a01b0316614aec565b610b23614bbd565b6103be60048036036020811015610c6a57600080fd5b50356001600160a01b0316614bcc565b6103be600480360360c0811015610c9057600080fd5b5080359060208101359060408101359060608101359060808101359060a00135614c8b565b600080610cc28887614d0e565b90506000610cd8670de0b6b3a764000083614e15565b90506000610ce68287614e73565b90506000610d0588610d00670de0b6b3a764000085614e15565b614d0e565b90506000610d138d83614e15565b90506000610d21828f614d0e565b90506000610d2f8288614f2d565b90506000610d3d828f614e73565b90506000610d4b8f83614e15565b9050610d6381610d00670de0b6b3a76400008e614e15565b9950505050505050505050979650505050505050565b600554600090610100900460ff1615610dc3576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff16610e67576040805162461bcd60e51b815260206004820152600a60248201526908599a5b985b1a5e995960b21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f602052604090205460ff16610ebd576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f60205260409020600390810154610ef291670de0b6b3a76400005b04600101614e73565b831115610f31576040805162461bcd60e51b81526020600482015260086024820152670f9b585e13d4985d60c21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f6020526040902060038101546002808301549054601054600a54600c54610f6e95949392918a91610cb5565b915081610fb1576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b82821115610fef576040805162461bcd60e51b81526020600482015260066024820152651e3634b6a4b760d11b604482015290519081900360640190fd5b610ffd816003015485614e15565b8160030181905550600061101383600c54614e73565b6040805187815290519192506001600160a01b0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36110613384615029565b600061106d3085615037565b905061108a61108561107f8685614e15565b83614e15565b615143565b6007546110a0906001600160a01b03168361514f565b6110ab873388615159565b5050506005805461ff00191690559392505050565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561114c5780601f106111215761010080835404028352916020019161114c565b820191906000526020600020905b81548152906001019060200180831161112f57829003601f168201915b5050505050905090565b3360008181526001602090815260408083206001600160a01b03871680855290835281842086905581518681529151939490939092600080516020615827833981519152928290030190a35060015b92915050565b600554600090610100900460ff16156111f5576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6001600160a01b0383166000908152600f602052604090205460ff1661124b576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0382166000908152600f602052604090205460ff166112a1576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b038084166000908152600f602052604080822092851682528120600380840154600280860154928401549084015493946112e59492939290613dfd565b95945050505050565b600554600090610100900460ff1615611338576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6001600160a01b0383166000908152600f602052604090205460ff1661138e576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0382166000908152600f602052604090205460ff166113e4576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b038084166000908152600f6020526040808220928516825290206003808301546002808501549284015490840154600a546112e594929190613dfd565b60025490565b60095481565b6000336001600160a01b038516148061147057506001600160a01b03841660009081526001602090815260408083203384529091529020548211155b6114ac576040805162461bcd60e51b815260206004820152600860248201526710b9b832b73232b960c11b604482015290519081900360640190fd5b6114b7848484615223565b336001600160a01b038516148015906114f557506001600160a01b038416600090815260016020908152604080832033845290915290205460001914155b15611577576001600160a01b03841660009081526001602090815260408083203384529091529020546115289083614e15565b6001600160a01b03858116600090815260016020908152604080832033808552908352928190208590558051948552519287169391926000805160206158278339815191529281900390910190a35b5060019392505050565b336001600160a01b03166000356001600160e01b0319166001600160e01b03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff1615611626576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b6008546001600160a01b03163314611673576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b66038d7ea4c680008110156116c1576040805162461bcd60e51b815260206004820152600f60248201526e03c6d696e496e6974506f6f6c53757608c1b604482015290519081900360640190fd5b6ec097ce7bc90715b34b9f1000000000811115611717576040805162461bcd60e51b815260206004820152600f60248201526e03e6d6178496e6974506f6f6c53757608c1b604482015290519081900360640190fd5b600955565b6001600160a01b03166000908152600f602052604090205460ff1690565b60055460ff1690565b600554610100900460ff161561178a576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff161561182e576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b6008546001600160a01b0316331461187b576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b64e8d4a510008110156118bf576040805162461bcd60e51b81526020600482015260076024820152663c6d696e46656560c81b604482015290519081900360640190fd5b67016345785d8a0000811115611906576040805162461bcd60e51b81526020600482015260076024820152663e6d617846656560c81b604482015290519081900360640190fd5b80611914600b546002614e73565b1115611959576040805162461bcd60e51b815260206004820152600f60248201526e1e31b7b63632b1ba32b22332b2951960891b604482015290519081900360640190fd5b600a556005805461ff0019169055565b600554610100900460ff16156119b0576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a26008546001600160a01b03163314611a5d576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b6001600160a01b0383166000908152600f602052604090205460ff16611ab3576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b600d5460ff1615611af7576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b670de0b6b3a7640000811015611b41576040805162461bcd60e51b815260206004820152600a6024820152690f1b5a5b95d95a59da1d60b21b604482015290519081900360640190fd5b6802b5e3af16b1880000811115611b8c576040805162461bcd60e51b815260206004820152600a6024820152690f9b585e15d95a59da1d60b21b604482015290519081900360640190fd5b620f4240821015611bce576040805162461bcd60e51b81526020600482015260076024820152660f1b5a5b90985b60ca1b604482015290519081900360640190fd5b6001600160a01b0383166000908152600f602052604090206002015480821115611c5c57611c07601054611c028484614e15565b615325565b60108190556802b5e3af16b18800001015611c57576040805162461bcd60e51b815260206004820152600b60248201526a0f9b585e1515d95a59da1d60aa1b604482015290519081900360640190fd5b611c7d565b80821015611c7d57611c79601054611c748385614e15565b614e15565b6010555b6001600160a01b0384166000908152600f602052604090206002810183905560030180549084905580841115611cc657611cc18533611cbc8785614e15565b61536e565b611d1b565b80841015611d1b576000611cda8286614e15565b90506000611cea82600c54614e73565b9050611d008733611cfb8585614e15565b615159565b600754611d189088906001600160a01b031683615159565b50505b50506005805461ff0019169055505050565b336001600160a01b03166000356001600160e01b0319166001600160e01b03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a26007546001600160a01b03163314611dd8576040805162461bcd60e51b815260206004820152600860248201526721666163746f727960c01b604482015290519081900360640190fd5b6611c37937e08000811115611e20576040805162461bcd60e51b81526020600482015260096024820152683e6d6178436f46656560b81b604482015290519081900360640190fd5b600a54611e2e826002614e73565b1115611e6e576040805162461bcd60e51b815260206004820152600a6024820152691f39bbb0b82332b2979960b11b604482015290519081900360640190fd5b600b55565b600554600090610100900460ff1615611ebd576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff16611f61576040805162461bcd60e51b815260206004820152600a60248201526908599a5b985b1a5e995960b21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f602052604090205460ff16611fb7576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f6020526040902060038101546002808301549054601054600a54600c54611ff495949392918a91612ef8565b915082821015612033576040805162461bcd60e51b81526020600482015260056024820152643c6c696d4f60d81b604482015290519081900360640190fd5b6001600160a01b0385166000908152600f6020526040902060039081015461206391670de0b6b3a7640000610ee9565b8211156120a2576040805162461bcd60e51b81526020600482015260086024820152670f9b585e13d4985d60c21b604482015290519081900360640190fd5b6120b0816003015483614e15565b816003018190555060006120c685600c54614e73565b6040805185815290519192506001600160a01b0388169133917fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed919081900360200190a36121143386615029565b6121216110858683614e15565b600754612137906001600160a01b03168261514f565b612143308688866153c7565b93506121529050863385615159565b50506005805461ff00191690559392505050565b600554610100900460ff16156121ad576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff1615612251576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b6008546001600160a01b0316331461229e576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b60088054911515600160a01b0260ff60a01b199092169190911790556005805461ff0019169055565b600554610100900460ff161561230e576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a26008546001600160a01b031633146123bb576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b600d5460ff16156123ff576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b600e5460021115612444576040805162461bcd60e51b815260206004820152600a6024820152693c6d696e546f6b656e7360b01b604482015290519081900360640190fd5b600d805460ff191660011790556008805460ff60a01b1916600160a01b1790556009546124709061554d565b61247c3360095461514f565b6005805461ff0019169055565b600554610100900460ff16156124d0576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff16612574576040805162461bcd60e51b815260206004820152600a60248201526908599a5b985b1a5e995960b21b604482015290519081900360640190fd5b600061257e611428565b9050600061258c8583614d0e565b9050806125cf576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b60005b600e54811015612747576000600e82815481106125eb57fe5b60009182526020808320909101546001600160a01b0316808352600f9091526040822060030154909250906126208583614e73565b905080612663576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b87878581811061266f57fe5b905060200201358111156126b3576040805162461bcd60e51b81526020600482015260066024820152651e3634b6a4b760d11b604482015290519081900360640190fd5b6001600160a01b0383166000908152600f60205260409020600301546126d99082615325565b6001600160a01b0384166000818152600f60209081526040918290206003019390935580518481529051919233927f63982df10efd8dfaaaa0fcc7f50b2d93b7cba26ccc48adee2873220d485dc39a9281900390910190a361273c83338361536e565b5050506001016125d2565b506127518561554d565b611d1b338661514f565b600a5481565b60065481565b6000806127748786614d0e565b905060006127828786615325565b905060006127908289614d0e565b905060006127a6670de0b6b3a764000085614d0e565b905060006127b48383614f2d565b905060006127c2828e614e73565b905060006127d0828f614e15565b905060006127ef6127e9670de0b6b3a76400008a614e15565b8b614e73565b905061280782610d00670de0b6b3a764000084614e15565b9f9e505050505050505050505050505050565b600554600090610100900460ff1615612864576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff16612908576040805162461bcd60e51b815260206004820152600a60248201526908599a5b985b1a5e995960b21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f602052604090205460ff1661295e576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f6020526040902060030154612990906002670de0b6b3a76400005b04614e73565b8311156129cf576040805162461bcd60e51b81526020600482015260086024820152670f9b585e1254985d60c21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f6020526040902060038101546002808301549054601054600a54612a0994939291908990613916565b915082821015612a48576040805162461bcd60e51b81526020600482015260056024820152643c6c696d4f60d81b604482015290519081900360640190fd5b612a56816003015485615325565b60038201556040805185815290516001600160a01b0387169133917f63982df10efd8dfaaaa0fcc7f50b2d93b7cba26ccc48adee2873220d485dc39a9181900360200190a3612aa48261554d565b612aaf85338661536e565b6000612abd868630866153c7565b935090508015612adb57612ad5826003015482614e15565b60038301555b612152338461514f565b600c5481565b3360009081526001602090815260408083206001600160a01b038616845290915281205480831115612b40573360009081526001602090815260408083206001600160a01b0388168452909152812055612b6f565b612b4a8184614e15565b3360009081526001602090815260408083206001600160a01b03891684529091529020555b3360008181526001602090815260408083206001600160a01b038916808552908352928190205481519081529051929392600080516020615827833981519152929181900390910190a35060019392505050565b600554600090610100900460ff1615612c0d576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff16612cb1576040805162461bcd60e51b815260206004820152600a60248201526908599a5b985b1a5e995960b21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f602052604090205460ff16612d07576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0384166000908152600f6020526040902060038101546002808301549054601054600a54612d4194939291908990612767565b915081612d84576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b82821115612dc2576040805162461bcd60e51b81526020600482015260066024820152651e3634b6a4b760d11b604482015290519081900360640190fd5b6001600160a01b0385166000908152600f6020526040902060030154612df2906002670de0b6b3a764000061298a565b821115612e31576040805162461bcd60e51b81526020600482015260086024820152670f9b585e1254985d60c21b604482015290519081900360640190fd5b612e3f816003015483615325565b60038201556040805183815290516001600160a01b0387169133917f63982df10efd8dfaaaa0fcc7f50b2d93b7cba26ccc48adee2873220d485dc39a9181900360200190a3612e8d8461554d565b612e97338561514f565b612ea285338461536e565b6000612eae8684615037565b9050801561215257612ec4826003015482614e15565b600383015550506005805461ff00191690559392505050565b6001600160a01b031660009081526020819052604090205490565b600080612f058887614d0e565b90506000612f2486612f1f670de0b6b3a764000087614e15565b614e73565b90506000612f328983614e15565b90506000612f40828b614d0e565b90506000612f5f82612f5a670de0b6b3a764000088614d0e565b614f2d565b90506000612f6d828f614e73565b90506000612f7b8f83614e15565b90506000612f9a612f94670de0b6b3a76400008a614e15565b8c614e73565b9050612fb282612f1f670de0b6b3a764000084614e15565b98505050505050505050979650505050505050565b6005546000908190610100900460ff1615613013576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a26001600160a01b0387166000908152600f602052604090205460ff166130c9576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0385166000908152600f602052604090205460ff1661311f576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b600854600160a01b900460ff1661316b576040805162461bcd60e51b815260206004820152600b60248201526a0217075626c6963537761760ac1b604482015290519081900360640190fd5b6001600160a01b038088166000908152600f6020526040808220928816825290206003808201546131a491670de0b6b3a7640000610ee9565b8611156131e3576040805162461bcd60e51b81526020600482015260086024820152670f9b585e13d4985d60c21b604482015290519081900360640190fd5b60006132048360030154846002015484600301548560020154600a54613dfd565b905085811115613249576040805162461bcd60e51b815260206004820152600b60248201526a6261644c696d507269636560a81b604482015290519081900360640190fd5b61326983600301548460020154846003015485600201548b600a54614c8b565b9450888511156132a9576040805162461bcd60e51b81526020600482015260066024820152651e3634b6a4b760d11b604482015290519081900360640190fd5b6132b7836003015486615325565b83600301819055506132cd826003015488614e15565b600380840182905584015460028086015490850154600a546132f0949190613dfd565b935080841015613336576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b85841115613377576040805162461bcd60e51b81526020600482015260096024820152683e6c696d507269636560b81b604482015290519081900360640190fd5b6133818588614d0e565b8111156133c4576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b876001600160a01b03168a6001600160a01b0316336001600160a01b03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d43378888b604051808381526020018281526020019250505060405180910390a461342c8a338761536e565b613437883389615159565b60006134438b87615037565b9050801561345f57613459846003015482614e15565b60038501555b505050506005805461ff001916905590969095509350505050565b6005546000908190610100900460ff16156134c6576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a26001600160a01b0387166000908152600f602052604090205460ff1661357c576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0385166000908152600f602052604090205460ff166135d2576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b600854600160a01b900460ff1661361e576040805162461bcd60e51b815260206004820152600b60248201526a0217075626c6963537761760ac1b604482015290519081900360640190fd5b6001600160a01b038088166000908152600f6020526040808220928816825290206003820154613658906002670de0b6b3a764000061298a565b881115613697576040805162461bcd60e51b81526020600482015260086024820152670f9b585e1254985d60c21b604482015290519081900360640190fd5b60006136b88360030154846002015484600301548560020154600a54613dfd565b9050858111156136fd576040805162461bcd60e51b815260206004820152600b60248201526a6261644c696d507269636560a81b604482015290519081900360640190fd5b61371d83600301548460020154846003015485600201548d600a5461419a565b94508685101561375c576040805162461bcd60e51b81526020600482015260056024820152643c6c696d4f60d81b604482015290519081900360640190fd5b61376a83600301548a615325565b8360030181905550613780826003015486614e15565b600380840182905584015460028086015490850154600a546137a3949190613dfd565b9350808410156137e9576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b8584111561382a576040805162461bcd60e51b81526020600482015260096024820152683e6c696d507269636560b81b604482015290519081900360640190fd5b6138348986614d0e565b811115613877576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b876001600160a01b03168a6001600160a01b0316336001600160a01b03167f908fb5ee8f16c6bc9bc3690973819f32a4d4b10188134543c88706e0e1d433788c89604051808381526020018281526020019250505060405180910390a46138df8a338b61536e565b60006138ed8b8b8b896153c7565b96509050801561390b57613905846003015482614e15565b60038501555b61345f893388615159565b6000806139238786614d0e565b9050600061394261393c670de0b6b3a764000084614e15565b85614e73565b9050600061395c86612f1f670de0b6b3a764000085614e15565b9050600061396a8b83615325565b90506000613978828d614d0e565b905060006139868287614f2d565b90506000613994828d614e73565b90506139a0818d614e15565b9e9d5050505050505050505050505050565b600854600160a01b900460ff1681565b336001600160a01b03166000356001600160e01b0319166001600160e01b03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600554610100900460ff1615613a6a576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461ff0019166101001790556001600160a01b0381166000908152600f602052604090205460ff16613acf576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b604080516370a0823160e01b815230600482015290516001600160a01b038316916370a08231916024808301926020929190829003018186803b158015613b1557600080fd5b505afa158015613b29573d6000803e3d6000fd5b505050506040513d6020811015613b3f57600080fd5b50516001600160a01b039091166000908152600f60205260409020600301556005805461ff0019169055565b600554610100900460ff1615613bb2576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a26008546001600160a01b03163314613c5f576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b03929092169190911790556005805461ff0019169055565b600554600090610100900460ff1615613cd6576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b5060105490565b600554600090610100900460ff1615613d27576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6001600160a01b0382166000908152600f602052604090205460ff16613d7d576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b506001600160a01b03166000908152600f602052604090206002015490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561114c5780601f106111215761010080835404028352916020019161114c565b600080613e0a8787614d0e565b90506000613e188686614d0e565b90506000613e268383614d0e565b90506000613e48670de0b6b3a7640000610d00670de0b6b3a764000089614e15565b9050613e548282614e73565b9a9950505050505050505050565b6000613e6f338484615223565b50600192915050565b600554610100900460ff1615613ebf576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff16613f63576040805162461bcd60e51b815260206004820152600a60248201526908599a5b985b1a5e995960b21b604482015290519081900360640190fd5b6000613f6d611428565b90506000613f7d85600c54614e73565b90506000613f8b8683614e15565b90506000613f998285614d0e565b905080613fdc576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b613fe63388615029565b600754613ffc906001600160a01b03168461514f565b61400582615143565b60005b600e5481101561417c576000600e828154811061402157fe5b60009182526020808320909101546001600160a01b0316808352600f9091526040822060030154909250906140568583614e73565b905080614099576040805162461bcd60e51b815260206004820152600c60248201526b0cae4e49ac2e8d082e0e4def60a31b604482015290519081900360640190fd5b8989858181106140a557fe5b905060200201358110156140e8576040805162461bcd60e51b81526020600482015260056024820152643c6c696d4f60d81b604482015290519081900360640190fd5b6001600160a01b0383166000908152600f602052604090206003015461410e9082614e15565b6001600160a01b0384166000818152600f60209081526040918290206003019390935580518481529051919233927fe74c91552b64c2e2e7bd255639e004e693bd3e1d01cc33e65610b86afcc1ffed9281900390910190a3614171833383615159565b505050600101614008565b50506005805461ff0019169055505050505050565b600d5460ff1681565b6000806141a78786614d0e565b905060006141bd670de0b6b3a764000085614e15565b90506141c98582614e73565b905060006141db8a610d008c85615325565b905060006141e98285614f2d565b905060006141ff670de0b6b3a764000083614e15565b905061420b8a82614e73565b9c9b505050505050505050505050565b600554606090610100900460ff1615614265576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b600d5460ff166142a9576040805162461bcd60e51b815260206004820152600a60248201526908599a5b985b1a5e995960b21b604482015290519081900360640190fd5b600e80548060200260200160405190810160405280929190818152602001828054801561114c57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116142e1575050505050905090565b6007546001600160a01b031681565b600554606090610100900460ff16156142a9576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b600e5490565b600554610100900460ff16156143ae576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6005805461010061ff0019909116179055604080516020808252369082018190523392600080356001600160e01b0319169390929181908101848480828437600083820152604051601f909101601f19169092018290039550909350505050a26008546001600160a01b0316331461445b576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b6001600160a01b0381166000908152600f602052604090205460ff166144b1576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b600d5460ff16156144f5576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b6001600160a01b0381166000908152600f6020526040812060030154600c54909190614522908390614e73565b6010546001600160a01b0385166000908152600f602052604090206002015491925061454d91614e15565b6010556001600160a01b0383166000908152600f6020526040902060010154600e8054600019810191908290811061458157fe5b600091825260209091200154600e80546001600160a01b0390921691849081106145a757fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555081600f6000600e85815481106145e757fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902060010155600e80548061461a57fe5b60008281526020808220600019908401810180546001600160a01b031916905590920190925560408051608081018252838152808301848152818301858152606083018681526001600160a01b038c168752600f909552929094209051815460ff191690151517815592516001840155516002830155516003909101556146a68533611cfb8787614e15565b600754611d1b9086906001600160a01b031685615159565b3360009081526001602090815260408083206001600160a01b03861684529091528120546146ec9083615325565b3360008181526001602090815260408083206001600160a01b038916808552908352928190208590558051948552519193600080516020615827833981519152929081900390910190a350600192915050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b336001600160a01b03166000356001600160e01b0319166001600160e01b03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a26008546001600160a01b03163314614818576040805162461bcd60e51b815260206004820152600b60248201526a10b1b7b73a3937b63632b960a91b604482015290519081900360640190fd5b6001600160a01b0383166000908152600f602052604090205460ff161561486e576040805162461bcd60e51b8152602060048201526005602482015264189bdd5b9960da1b604482015290519081900360640190fd5b600d5460ff16156148b2576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b600e546008116148f6576040805162461bcd60e51b815260206004820152600a6024820152693e6d6178546f6b656e7360b01b604482015290519081900360640190fd5b604080516080810182526001808252600e805460208085019182526000858701818152606087018281526001600160a01b038c16808452600f9094529782209651875460ff1916901515178755925186860155915160028601559451600390940193909355805491820181559091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b03191690911790556149a3838383611969565b505050565b336001600160a01b03166000356001600160e01b0319166001600160e01b03191660003660405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2600d5460ff1615614a4d576040805162461bcd60e51b8152602060048201526009602482015268199a5b985b1a5e995960ba1b604482015290519081900360640190fd5b6007546001600160a01b03163314614a97576040805162461bcd60e51b815260206004820152600860248201526721666163746f727960c01b604482015290519081900360640190fd5b66038d7ea4c68000811115614ae1576040805162461bcd60e51b815260206004820152600b60248201526a3e6d61784578697446656560a81b604482015290519081900360640190fd5b600c55565b600b5481565b600554600090610100900460ff1615614b36576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6001600160a01b0382166000908152600f602052604090205460ff16614b8c576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b6001600160a01b0382166000908152600f6020526040902060020154601054614bb6908290614d0e565b9392505050565b6008546001600160a01b031681565b600554600090610100900460ff1615614c16576040805162461bcd60e51b81526020600482015260076024820152667265656e74727960c81b604482015290519081900360640190fd5b6001600160a01b0382166000908152600f602052604090205460ff16614c6c576040805162461bcd60e51b815260206004820152600660248201526508589bdd5b9960d21b604482015290519081900360640190fd5b506001600160a01b03166000908152600f602052604090206003015490565b600080614c988588614d0e565b90506000614ca68786614e15565b90506000614cb48883614d0e565b90506000614cc28285614f2d565b9050614cd681670de0b6b3a7640000614e15565b9050614cea670de0b6b3a764000087614e15565b9450614cff614cf98c83614e73565b86614d0e565b9b9a5050505050505050505050565b600081614d4d576040805162461bcd60e51b8152602060048201526008602482015267064697620627920360c41b604482015290519081900360640190fd5b670de0b6b3a76400008302831580614d755750670de0b6b3a7640000848281614d7257fe5b04145b614db5576040805162461bcd60e51b815260206004820152600c60248201526b191a5d881a5b9d195c9b985b60a21b604482015290519081900360640190fd5b60028304810181811015614dff576040805162461bcd60e51b815260206004820152600c60248201526b191a5d881a5b9d195c9b985b60a21b604482015290519081900360640190fd5b6000848281614e0a57fe5b049695505050505050565b6000806000614e248585615556565b915091508015614e6b576040805162461bcd60e51b815260206004820152600d60248201526c73756220756e646572666c6f7760981b604482015290519081900360640190fd5b509392505050565b6000828202831580614e8d575082848281614e8a57fe5b04145b614ecd576040805162461bcd60e51b815260206004820152600c60248201526b6d756c206f766572666c6f7760a01b604482015290519081900360640190fd5b6706f05b59d3b20000810181811015614f1c576040805162461bcd60e51b815260206004820152600c60248201526b6d756c206f766572666c6f7760a01b604482015290519081900360640190fd5b6000670de0b6b3a764000082614e0a565b60006001831015614f74576040805162461bcd60e51b815260206004820152600c60248201526b6261736520746f6f206c6f7760a01b604482015290519081900360640190fd5b671bc16d674ec7ffff831115614fc1576040805162461bcd60e51b815260206004820152600d60248201526c0c4c2e6ca40e8dede40d0d2ced609b1b604482015290519081900360640190fd5b6000614fcc8361557b565b90506000614fda8483614e15565b90506000614ff086614feb85615596565b6155a4565b9050816150015792506111a5915050565b600061501287846305f5e1006155fb565b905061501e8282614e73565b979650505050505050565b61503382826156d9565b5050565b600b54600090156111a557600754604080516374b1330b60e11b815290516000926001600160a01b03169163e9626616916004808301926020929190829003018186803b15801561508757600080fd5b505afa15801561509b573d6000803e3d6000fd5b505050506040513d60208110156150b157600080fd5b505190506001600160a01b0381161561513c576150e16150d384600b54614e73565b670de0b6b3a7640000614d0e565b6007549092506150fc9085906001600160a01b031684615159565b6040805183815290516001600160a01b038616917faa299fc96f84481838321cf4ac49861748dc206dd9101e1b8ed3f34bb88cadbd919081900360200190a25b5092915050565b61514c816156e4565b50565b61503382826157a6565b6000836001600160a01b031663a9059cbb84846040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156151b257600080fd5b505af11580156151c6573d6000803e3d6000fd5b505050506040513d60208110156151dc57600080fd5b505190508061521d576040805162461bcd60e51b8152602060048201526008602482015267065727245726332360c41b604482015290519081900360640190fd5b50505050565b6001600160a01b038316600090815260208190526040902054811115615279576040805162461bcd60e51b815260206004808301919091526024820152630858985b60e21b604482015290519081900360640190fd5b6001600160a01b03831660009081526020819052604090205461529c9082614e15565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546152cb9082615325565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082820183811015614bb6576040805162461bcd60e51b815260206004820152600c60248201526b616464206f766572666c6f7760a01b604482015290519081900360640190fd5b604080516323b872dd60e01b81526001600160a01b0384811660048301523060248301526044820184905291516000928616916323b872dd91606480830192602092919082900301818787803b1580156151b257600080fd5b600b5460009082901561554457600754604080516374b1330b60e11b815290516000926001600160a01b03169163e9626616916004808301926020929190829003018186803b15801561541957600080fd5b505afa15801561542d573d6000803e3d6000fd5b505050506040513d602081101561544357600080fd5b505190506001600160a01b0380821690881614156154c95761546a6150d387600b54614e73565b6007549093506154859088906001600160a01b031685615159565b6040805184815290516001600160a01b038916917faa299fc96f84481838321cf4ac49861748dc206dd9101e1b8ed3f34bb88cadbd919081900360200190a2615542565b60006154da6150d386600b54614e73565b6007549091506154f59087906001600160a01b031683615159565b6154ff8582614e15565b6040805183815290519194506001600160a01b038816917faa299fc96f84481838321cf4ac49861748dc206dd9101e1b8ed3f34bb88cadbd9181900360200190a2505b505b94509492505050565b61514c816157b1565b60008082841061556c5750508082036000615574565b505081810360015b9250929050565b6000670de0b6b3a764000061558f83615596565b0292915050565b670de0b6b3a7640000900490565b600080600283066155bd57670de0b6b3a76400006155bf565b835b90506002830492505b8215614bb6576155d88485614e73565b935060028306156155f0576155ed8185614e73565b90505b6002830492506155c8565b600082818061561287670de0b6b3a7640000615556565b9092509050670de0b6b3a764000080600060015b8884106156ca576000670de0b6b3a76400008202905060008061565a8a61565585670de0b6b3a7640000614e15565b615556565b9150915061566c87612f1f848c614e73565b96506156788784614d0e565b965086615687575050506156ca565b8715615691579315935b801561569b579315935b84156156b2576156ab8688614e15565b95506156bf565b6156bc8688615325565b95505b505050600101615626565b50909998505050505050505050565b615033823083615223565b30600090815260208190526040902054811115615731576040805162461bcd60e51b815260206004808301919091526024820152630858985b60e21b604482015290519081900360640190fd5b3060009081526020819052604090205461574b9082614e15565b306000908152602081905260409020556002546157689082614e15565b60025560408051828152905160009130917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350565b615033308383615223565b306000908152602081905260409020546157cb9082615325565b306000908152602081905260409020556002546157e89082615325565b60025560408051828152905130916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35056fe8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a26469706673582212204814ffc3fcf8d3e48bc307a87a7d058f3ac272a5642097cdb240483f9938a32564736f6c634300060c0033a2646970667358221220526fe36af79a194c0b42f08e57e9e256c1a45e742f8b5ec53273cd3f1bd3561e64736f6c634300060c0033
Deployed Bytecode Sourcemap
52805:124:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;52834:92;;;:::i;:::-;;;;-1:-1:-1;;;;;52834:92:0;;;;;;;;;;;;;;;52872:5;52907:10;52897:21;;;;;:::i;:::-;-1:-1:-1;;;;;52897:21:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;52890:28;;52834:92;:::o;-1:-1:-1:-;;;;;;;;:::o
Swarm Source
ipfs://526fe36af79a194c0b42f08e57e9e256c1a45e742f8b5ec53273cd3f1bd3561e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.