Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
QueryData
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /// @title Pool state that never changes /// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values interface IUniswapV3PoolImmutables { /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface /// @return The contract address function factory() external view returns (address); /// @notice The first of the two tokens of the pool, sorted by address /// @return The token contract address function token0() external view returns (address); /// @notice The second of the two tokens of the pool, sorted by address /// @return The token contract address function token1() external view returns (address); /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6 /// @return The fee function fee() external view returns (uint24); /// @notice The pool tick spacing /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ... /// This value is an int24 to avoid casting even though it is always positive. /// @return The tick spacing function tickSpacing() external view returns (int24); /// @notice The maximum amount of position liquidity that can use any tick in the range /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool /// @return The max amount of liquidity per tick function maxLiquidityPerTick() external view returns (uint128); } /// @title Pool state that can change /// @notice These methods compose the pool's state, and can change with any frequency including multiple times /// per transaction interface IUniswapV3PoolState { /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas /// when accessed externally. /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value /// tick The current tick of the pool, i.e. according to the last tick transition that was run. /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick /// boundary. /// observationIndex The index of the last oracle observation that was written, /// observationCardinality The current maximum number of observations stored in the pool, /// observationCardinalityNext The next maximum number of observations, to be updated when the observation. /// feeProtocol The protocol fee for both tokens of the pool. /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0 /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee. /// unlocked Whether the pool is currently locked to reentrancy function slot0() external view returns ( uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked ); /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool /// @dev This value can overflow the uint256 function feeGrowthGlobal0X128() external view returns (uint256); /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool /// @dev This value can overflow the uint256 function feeGrowthGlobal1X128() external view returns (uint256); /// @notice The amounts of token0 and token1 that are owed to the protocol /// @dev Protocol fees will never exceed uint128 max in either token function protocolFees() external view returns (uint128 token0, uint128 token1); /// @notice The currently in range liquidity available to the pool /// @dev This value has no relationship to the total liquidity across all ticks function liquidity() external view returns (uint128); /// @notice Look up information about a specific tick in the pool /// @param tick The tick to look up /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or /// tick upper, /// liquidityNet how much liquidity changes when the pool price crosses the tick, /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0, /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1, /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick, /// secondsOutside the seconds spent on the other side of the tick from the current tick, /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false. /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0. /// In addition, these values are only relative and must be used only in comparison to previous snapshots for /// a specific position. function ticks( int24 tick ) external view returns ( uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized ); /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information function tickBitmap(int16 wordPosition) external view returns (uint256); /// @notice Returns the information about a position by the position's key /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper /// @return _liquidity The amount of liquidity in the position, /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke, /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke, /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke, /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke function positions( bytes32 key ) external view returns ( uint128 _liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1 ); /// @notice Returns data about a specific observation index /// @param index The element of the observations array to fetch /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time /// ago, rather than at a specific index in the array. /// @return blockTimestamp The timestamp of the observation, /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp, /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp, /// Returns initialized whether the observation has been initialized and the values are safe to use function observations( uint256 index ) external view returns ( uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized ); } interface IZumiPool { function points(int24 tick) external view returns (uint256, int128, uint256, uint256, bool); function pointDelta() external view returns (int24); function orderOrEndpoint(int24 tick) external view returns (int24); function limitOrderData( int24 point ) external view returns ( uint128 sellingX, uint128 earnY, uint256 accEarnY, uint256 legacyAccEarnY, uint128 legacyEarnY, uint128 sellingY, uint128 earnX, uint128 legacyEarnX, uint256 accEarnX, uint256 legacyAccEarnX ); function pointBitmap(int16 tick) external view returns (uint256); function factory() external view returns (address); } interface IHorizonPool { function tickDistance() external view returns (int24); function ticks( int24 tick ) external view returns ( uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside, uint128 secondsPerLiquidityOutside ); function initializedTicks(int24 tick) external view returns (int24 previous, int24 next); function getPoolState() external view returns (uint160 sqrtP, int24 currentTick, int24 nearestCurrentTick, bool locked); } /// @title The interface for a Uniswap V3 Pool /// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform /// to the ERC20 specification /// @dev The pool interface is broken up into many smaller pieces interface IAlgebraPool { function globalState() external view returns ( uint160 price, int24 tick, int24 prevInitializedTick, uint16 fee, uint16 timepointIndex, uint8 communityFee, bool unlocked ); function tickSpacing() external view returns (int24); function ticks( int24 tick ) external view returns ( uint128 liquidityTotal, int128 liquidityDelta, uint256 outerFeeGrowth0Token, uint256 outerFeeGrowth1Token, int24 prevTick, int24 nextTick, uint160 outerSecondsPerLiquidity, uint32 outerSecondsSpent, bool hasLimitOrders ); function tickTable(int16 wordPosition) external view returns (uint256); function prevInitializedTick() external view returns (int24); } interface IAlgebraPoolV1_9 { function globalState() external view returns ( uint160 price, int24 tick, int24 prevInitializedTick, uint16 fee, uint16 timepointIndex, uint8 communityFee, bool unlocked ); function tickSpacing() external view returns (int24); function ticks( int24 tick ) external view returns ( uint128 liquidityTotal, int128 liquidityDelta, uint256 outerFeeGrowth0Token, uint256 outerFeeGrowth1Token, int56 outerTickCumulative, uint160 outerSecondsPerLiquidity, uint32 outerSecondsSpent, bool initialized ); function tickTable(int16 wordPosition) external view returns (uint256); } interface IUniswapV3Pool is IUniswapV3PoolImmutables, IUniswapV3PoolState {} /// @title DexNativeRouter /// @notice Entrance of trading native token in web3-dex contract QueryData { int24 internal constant MIN_TICK_MINUS_1 = -887_272 - 1; int24 internal constant MAX_TICK_PLUS_1 = 887_272 + 1; struct SuperVar { int24 tickSpacing; int24 currTick; int24 right; int24 left; int24 leftMost; int24 rightMost; uint256 initPoint; uint256 initPoint2; } /** * 算法逻辑: * 1. 查到slot0对应的currTick和tickSpacing * 2. 根据currTick算出当前的word, 如果currTick < 0, 则word--. 原因是 tick 1 和 tick -1在除以256之后的word都是0, 为了区别, 将tick -1 存放在 word=-1的map上 * 3. 查到currTick对应的initPoint, 即currTick在tickMap里面的index, index值的取值范围只能是 [0, 255], 所以需要对256 取模. 利用的是 currTick/tickSpacing = index + (currTick/tickSpacing//256 - 0 ? 1)* 256 * 4. 分成两个方向进行遍历, 第一个方向从小到大, 第二个方向从大到小 * 假设tickMap查出来的结果如下: 10101010 (8bit 方便理解), initPoint = 3, 即: 1010[1]010 * 5. 方向从小到大: * 5.1 首先把结果res向右移动initPoint位,得到新的结果如下: 00010101. 移动过后,左侧用0补齐 * 5.2 取res中的最右侧元素与0b00000001进行比较, 如果为true, 此时最右侧元素的index即为原先的initPoint. 如果为false, 说明没有流动性, 则进行下一个循环 * 5.3 然后根据index 和 right值, 重新利用公式 (index + 256 * right) * tickSpacing = tick 算出tick * 5.4 根据算出的tick拿到对应的delta L和 limitOrder的数据 * 5.5 循环开始条件即为 i = initPoint, 循环次数应该为: 256 - initPoint, 即循环条件为 i < 256, 方向为 i++ * 6. 方向从大到小: * 6.1 首先把结果res向左移动256-initPoint位, 得到新的结果如下: 01000000, 移动过后, 右侧用0补齐 * 6.2 去res中的最左侧元素与0b10000000进行比较, 如果为true, 说明有流动性. 注意此时的index为原先的initPoint - 1, 而不是initPoint. 如果为false, 说明没有流动性, 则进行下一个循环 * 6.3 然后根据index 和 left, 重新利用公式 (index + 256 * left) * tickSpacing = tick 算出tick * 6.4 根据算出的tick拿到对应的delta L和 limitOrder的数据 * 6.5 循环的开始条件即为 i = initPoint - 1, 循环次数为: initPoint次, 即循环条件为 i >= 0, 方向为 i-- * * 问题是: * initPoint = 0时, 方向从大到小应该怎么处理? 此时应该进入下一个循环. */ function queryUniv3TicksSuperCompact(address pool, uint256 len) public view returns (bytes memory) { SuperVar memory tmp; tmp.tickSpacing = IUniswapV3Pool(pool).tickSpacing(); // fix-bug: pancake pool's slot returns different types of params than uniV3, which will cause problem { (, bytes memory slot0) = pool.staticcall(abi.encodeWithSignature("slot0()")); int24 currTick; assembly { currTick := mload(add(slot0, 64)) } tmp.currTick = currTick; } tmp.right = tmp.currTick / tmp.tickSpacing / int24(256); tmp.leftMost = -887_272 / tmp.tickSpacing / int24(256) - 2; tmp.rightMost = 887_272 / tmp.tickSpacing / int24(256) + 1; if (tmp.currTick < 0) { tmp.initPoint = uint256( int256(tmp.currTick) / int256(tmp.tickSpacing) - (int256(tmp.currTick) / int256(tmp.tickSpacing) / 256 - 1) * 256 ) % 256; } else { tmp.initPoint = (uint256(int256(tmp.currTick)) / uint256(int256(tmp.tickSpacing))) % 256; } tmp.initPoint2 = tmp.initPoint; if (tmp.currTick < 0) tmp.right--; bytes memory tickInfo; tmp.left = tmp.right; uint256 index = 0; while (index < len / 2 && tmp.right < tmp.rightMost) { uint256 res = IUniswapV3Pool(pool).tickBitmap(int16(tmp.right)); if (res > 0) { res = res >> tmp.initPoint; for (uint256 i = tmp.initPoint; i < 256 && index < len / 2; i++) { uint256 isInit = res & 0x01; if (isInit > 0) { int256 tick = int256((256 * tmp.right + int256(i)) * tmp.tickSpacing); // (, int128 liquidityNet,,,,,,) = IUniswapV3Pool(pool).ticks(int24(int256(tick))); // fix-bug: to make consistent with solidlyV3 and ramsesV2 int128 liquidityNet; (, bytes memory d) = pool.staticcall( abi.encodeWithSelector(IUniswapV3PoolState.ticks.selector, int24(int256(tick))) ); assembly { liquidityNet := mload(add(d, 64)) } int256 data = int256(uint256(int256(tick)) << 128) + (int256(liquidityNet) & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff); tickInfo = bytes.concat(tickInfo, bytes32(uint256(data))); index++; } res = res >> 1; } } tmp.initPoint = 0; tmp.right++; } bool isInitPoint = true; while (index < len && tmp.left > tmp.leftMost) { uint256 res = IUniswapV3Pool(pool).tickBitmap(int16(tmp.left)); if (res > 0 && tmp.initPoint2 != 0) { res = isInitPoint ? res << ((256 - tmp.initPoint2) % 256) : res; for (uint256 i = tmp.initPoint2 - 1; i >= 0 && index < len; i--) { uint256 isInit = res & 0x8000000000000000000000000000000000000000000000000000000000000000; if (isInit > 0) { int256 tick = int256((256 * tmp.left + int256(i)) * tmp.tickSpacing); // (, int128 liquidityNet,,,,,,) = IUniswapV3Pool(pool).ticks(int24(int256(tick))); // fix-bug: to make consistent with solidlyV3 and ramsesV2 int128 liquidityNet; (, bytes memory d) = pool.staticcall( abi.encodeWithSelector(IUniswapV3PoolState.ticks.selector, int24(int256(tick))) ); assembly { liquidityNet := mload(add(d, 64)) } int256 data = int256(uint256(int256(tick)) << 128) + (int256(liquidityNet) & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff); tickInfo = bytes.concat(tickInfo, bytes32(uint256(data))); index++; } res = res << 1; if (i == 0) break; } } isInitPoint = false; tmp.initPoint2 = 256; tmp.left--; } return tickInfo; } function queryAlgebraTicksSuperCompact(address pool, uint256 len) public view returns (bytes memory) { SuperVar memory tmp; { (, bytes memory slot0) = pool.staticcall(abi.encodeWithSignature("globalState()")); int24 currTick; assembly { currTick := mload(add(slot0, 64)) } tmp.currTick = currTick; } tmp.right = tmp.currTick / int24(256); tmp.leftMost = -887_272 / int24(256) - 2; tmp.rightMost = 887_272 / int24(256) + 1; if (tmp.currTick < 0) { tmp.initPoint = (256 - (uint256(int256(-tmp.currTick)) % 256)) % 256; } else { tmp.initPoint = uint256(int256(tmp.currTick)) % 256; } tmp.initPoint2 = tmp.initPoint; if (tmp.currTick < 0) tmp.right--; bytes memory tickInfo; tmp.left = tmp.right; uint256 index = 0; while (index < len / 2 && tmp.right < tmp.rightMost) { uint256 res = IAlgebraPoolV1_9(pool).tickTable(int16(tmp.right)); if (res > 0) { res = res >> tmp.initPoint; for (uint256 i = tmp.initPoint; i < 256 && index < len / 2; i++) { uint256 isInit = res & 0x01; if (isInit > 0) { int256 tick = int256((256 * tmp.right + int256(i))); // (, int128 liquidityNet,,,,,,) = IAlgebraPoolV1_9(pool).ticks(int24(int256(tick))); (, bytes memory deltaL) = pool.staticcall(abi.encodeWithSignature("ticks(int24)", tick)); int128 liquidityNet; assembly { liquidityNet := mload(add(deltaL, 64)) } int256 data = int256(uint256(int256(tick)) << 128) + (int256(liquidityNet) & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff); tickInfo = bytes.concat(tickInfo, bytes32(uint256(data))); index++; } res = res >> 1; } } tmp.initPoint = 0; tmp.right++; } bool isInitPoint = true; while (index < len && tmp.left > tmp.leftMost) { uint256 res = IAlgebraPoolV1_9(pool).tickTable(int16(tmp.left)); if (res > 0 && tmp.initPoint2 != 0) { res = isInitPoint ? res << ((256 - tmp.initPoint2) % 256) : res; for (uint256 i = tmp.initPoint2 - 1; i >= 0 && index < len; i--) { uint256 isInit = res & 0x8000000000000000000000000000000000000000000000000000000000000000; if (isInit > 0) { int256 tick = int256((256 * tmp.left + int256(i))); // (, int128 liquidityNet,,,,,,) = IAlgebraPoolV1_9(pool).ticks(int24(int256(tick))); (, bytes memory deltaL) = pool.staticcall(abi.encodeWithSignature("ticks(int24)", tick)); int128 liquidityNet; assembly { liquidityNet := mload(add(deltaL, 64)) } int256 data = int256(uint256(int256(tick)) << 128) + (int256(liquidityNet) & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff); tickInfo = bytes.concat(tickInfo, bytes32(uint256(data))); index++; } res = res << 1; if (i == 0) break; } } isInitPoint = false; tmp.initPoint2 = 256; tmp.left--; } return tickInfo; } function queryAlgebraTicksSuperCompact3_back(address pool, uint256 len) public view returns (bytes memory) { SuperVar memory tmp; tmp.tickSpacing = IAlgebraPool(pool).tickSpacing(); { (, bytes memory slot0) = pool.staticcall(abi.encodeWithSignature("globalState()")); int24 currTick; assembly { currTick := mload(add(slot0, 64)) } tmp.currTick = currTick; } tmp.right = tmp.currTick / tmp.tickSpacing / int24(256); tmp.leftMost = -887_272 / tmp.tickSpacing / int24(256) - 2; tmp.rightMost = 887_272 / tmp.tickSpacing / int24(256) + 1; if (tmp.currTick < 0) { tmp.initPoint = uint256( int256(tmp.currTick) / int256(tmp.tickSpacing) - (int256(tmp.currTick) / int256(tmp.tickSpacing) / 256 - 1) * 256 ) % 256; } else { tmp.initPoint = (uint256(int256(tmp.currTick)) / uint256(int256(tmp.tickSpacing))) % 256; } tmp.initPoint2 = tmp.initPoint; if (tmp.currTick < 0) tmp.right--; bytes memory tickInfo; tmp.left = tmp.right; uint256 index = 0; while (index < len / 2 && tmp.right < tmp.rightMost) { uint256 res = IAlgebraPoolV1_9(pool).tickTable(int16(tmp.right)); if (res > 0) { res = res >> tmp.initPoint; for (uint256 i = tmp.initPoint; i < 256 && index < len / 2; i++) { uint256 isInit = res & 0x01; if (isInit > 0) { int256 tick = int256((256 * tmp.right + int256(i)) * tmp.tickSpacing); // (, int128 liquidityNet,,,,,,) = IAlgebraPoolV1_9(pool).ticks(int24(int256(tick))); (, bytes memory deltaL) = pool.staticcall(abi.encodeWithSignature("ticks(int24)", tick)); int128 liquidityNet; assembly { liquidityNet := mload(add(deltaL, 64)) } int256 data = int256(uint256(int256(tick)) << 128) + (int256(liquidityNet) & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff); tickInfo = bytes.concat(tickInfo, bytes32(uint256(data))); index++; } res = res >> 1; } } tmp.initPoint = 0; tmp.right++; } bool isInitPoint = true; while (index < len && tmp.left > tmp.leftMost) { uint256 res = IAlgebraPoolV1_9(pool).tickTable(int16(tmp.left)); if (res > 0 && tmp.initPoint2 != 0) { res = isInitPoint ? res << ((256 - tmp.initPoint2) % 256) : res; for (uint256 i = tmp.initPoint2 - 1; i >= 0 && index < len; i--) { uint256 isInit = res & 0x8000000000000000000000000000000000000000000000000000000000000000; if (isInit > 0) { int256 tick = int256((256 * tmp.left + int256(i)) * tmp.tickSpacing); // (, int128 liquidityNet,,,,,,) = IAlgebraPoolV1_9(pool).ticks(int24(int256(tick))); (, bytes memory deltaL) = pool.staticcall(abi.encodeWithSignature("ticks(int24)", tick)); int128 liquidityNet; assembly { liquidityNet := mload(add(deltaL, 64)) } int256 data = int256(uint256(int256(tick)) << 128) + (int256(liquidityNet) & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff); tickInfo = bytes.concat(tickInfo, bytes32(uint256(data))); index++; } res = res << 1; if (i == 0) break; } } isInitPoint = false; tmp.initPoint2 = 256; tmp.left--; } return tickInfo; } function queryHorizonTicksSuperCompact(address pool, uint256 iteration) public view returns (bytes memory) { (, , int24 currTick, ) = IHorizonPool(pool).getPoolState(); int24 currTick2 = currTick; uint256 threshold = iteration / 2; // travel from left to right bytes memory tickInfo; while (currTick < MAX_TICK_PLUS_1 && iteration > threshold) { (, int128 liquidityNet, , ) = IHorizonPool(pool).ticks(currTick); int256 data = int256(uint256(int256(currTick)) << 128) + (int256(liquidityNet) & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff); tickInfo = bytes.concat(tickInfo, bytes32(uint256(data))); (, int24 nextTick) = IHorizonPool(pool).initializedTicks(currTick); if (currTick == nextTick) { break; } currTick = nextTick; iteration--; } while (currTick2 > MIN_TICK_MINUS_1 && iteration > 0) { (, int128 liquidityNet, , ) = IHorizonPool(pool).ticks(currTick2); int256 data = int256(uint256(int256(currTick2)) << 128) + (int256(liquidityNet) & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff); tickInfo = bytes.concat(tickInfo, bytes32(uint256(data))); (int24 prevTick, ) = IHorizonPool(pool).initializedTicks(currTick2); if (prevTick == currTick2) { break; } currTick2 = prevTick; iteration--; } return tickInfo; } function queryAlgebraTicksSuperCompact2(address pool, uint256 iteration) public view returns (bytes memory) { int24 currTick; { (bool s, bytes memory res) = pool.staticcall(abi.encodeWithSignature("prevInitializedTick()")); if (s) { currTick = abi.decode(res, (int24)); } else { (s, res) = pool.staticcall(abi.encodeWithSignature("globalState()")); if (s) { assembly { currTick := mload(add(res, 96)) } } } } int24 currTick2 = currTick; uint256 threshold = iteration / 2; // travel from left to right bytes memory tickInfo; while (currTick < MAX_TICK_PLUS_1 && iteration > threshold) { (, int128 liquidityNet, , , int24 prevTick, int24 nextTick, , , ) = IAlgebraPool(pool).ticks(currTick); int256 data = int256(uint256(int256(currTick)) << 128) + (int256(liquidityNet) & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff); tickInfo = bytes.concat(tickInfo, bytes32(uint256(data))); if (currTick == nextTick) { break; } currTick = nextTick; iteration--; } while (currTick2 > MIN_TICK_MINUS_1 && iteration > 0) { (, int128 liquidityNet, , , int24 prevTick, int24 nextTick, , , ) = IAlgebraPool(pool).ticks(currTick2); int256 data = int256(uint256(int256(currTick2)) << 128) + (int256(liquidityNet) & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff); tickInfo = bytes.concat(tickInfo, bytes32(uint256(data))); if (currTick2 == prevTick) { break; } currTick2 = prevTick; iteration--; } return tickInfo; } function queryIzumiSuperCompact(address pool, uint256 len) public view returns (bytes memory, bytes memory) { SuperVar memory tmp; tmp.tickSpacing = IZumiPool(pool).pointDelta(); { (, bytes memory slot0) = pool.staticcall(abi.encodeWithSignature("state()")); int24 currTick; assembly { currTick := mload(add(slot0, 64)) } tmp.currTick = currTick; } tmp.right = tmp.currTick / tmp.tickSpacing / int24(256); tmp.leftMost = -887_272 / tmp.tickSpacing / int24(256) - 2; tmp.rightMost = 887_272 / tmp.tickSpacing / int24(256) + 1; if (tmp.currTick < 0) { tmp.initPoint = uint256( int256(tmp.currTick) / int256(tmp.tickSpacing) - (int256(tmp.currTick) / int256(tmp.tickSpacing) / 256 - 1) * 256 ) % 256; } else { tmp.initPoint = (uint256(int256(tmp.currTick)) / uint256(int256(tmp.tickSpacing))) % 256; } tmp.initPoint2 = tmp.initPoint; if (tmp.currTick < 0) tmp.right--; bytes memory tickInfo; bytes memory limitOrderInfo; tmp.left = tmp.right; uint256 index = 0; while (index < len / 2 && tmp.right < tmp.rightMost) { uint256 res = IZumiPool(pool).pointBitmap(int16(tmp.right)); if (res > 0) { res = res >> tmp.initPoint; for (uint256 i = tmp.initPoint; i < 256; i++) { uint256 isInit = res & 0x01; if (isInit > 0) { int24 tick = int24(int256((256 * tmp.right + int256(i)) * tmp.tickSpacing)); int24 orderOrEndpoint = IZumiPool(pool).orderOrEndpoint(tick / tmp.tickSpacing); if (orderOrEndpoint & 0x01 == 0x01) { (, int128 liquidityNet, , , ) = IZumiPool(pool).points(tick); if (liquidityNet != 0) { int256 data = int256(uint256(int256(tick)) << 128) + (int256(liquidityNet) & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff); tickInfo = bytes.concat(tickInfo, bytes32(uint256(data))); index++; } } if (orderOrEndpoint & 0x02 == 0x02) { (uint128 sellingX, , , , , uint128 sellingY, , , , ) = IZumiPool(pool).limitOrderData(tick); if (sellingX != 0 || sellingY != 0) { bytes32 data = bytes32( abi.encodePacked(int32(tick), uint112(sellingX), uint112(sellingY)) ); limitOrderInfo = bytes.concat(limitOrderInfo, data); index++; } } } res = res >> 1; } } tmp.initPoint = 0; tmp.right++; } bool isInitPoint = true; while (index < len && tmp.left > tmp.leftMost) { uint256 res = IZumiPool(pool).pointBitmap(int16(tmp.left)); if (res > 0 && tmp.initPoint2 != 0) { res = isInitPoint ? res << ((256 - tmp.initPoint2) % 256) : res; for (uint256 i = tmp.initPoint2 - 1; i >= 0 && index < len; i--) { uint256 isInit = res & 0x8000000000000000000000000000000000000000000000000000000000000000; if (isInit > 0) { int24 tick = int24(int256((256 * tmp.left + int256(i)) * tmp.tickSpacing)); int24 orderOrEndpoint = IZumiPool(pool).orderOrEndpoint(tick / tmp.tickSpacing); if (orderOrEndpoint & 0x01 == 0x01) { (, int128 liquidityNet, , , ) = IZumiPool(pool).points(tick); if (liquidityNet != 0) { int256 data = int256(uint256(int256(tick)) << 128) + (int256(liquidityNet) & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff); tickInfo = bytes.concat(tickInfo, bytes32(uint256(data))); index++; } } if (orderOrEndpoint & 0x02 == 0x02) { (uint128 sellingX, , , , , uint128 sellingY, , , , ) = IZumiPool(pool).limitOrderData(tick); if (sellingX != 0 || sellingY != 0) { bytes32 data = bytes32( abi.encodePacked(int32(tick), uint112(sellingX), uint112(sellingY)) ); limitOrderInfo = bytes.concat(limitOrderInfo, data); index++; } } } res = res << 1; if (i == 0) break; } } isInitPoint = false; tmp.initPoint2 = 256; tmp.left--; } return (tickInfo, limitOrderInfo); } function queryAlgebraTicksSuperCompact3(address pool, uint256 len) public view returns (bytes memory) { SuperVar memory tmp; tmp.tickSpacing = 1; { (, bytes memory slot0) = pool.staticcall(abi.encodeWithSignature("globalState()")); int24 currTick; assembly { currTick := mload(add(slot0, 64)) } tmp.currTick = currTick; } int24 step = int24(int(len)) * 200; tmp.right = tmp.currTick / tmp.tickSpacing / int24(256); tmp.leftMost = (tmp.currTick - step) / tmp.tickSpacing / int24(256) - 2; tmp.rightMost = (tmp.currTick + step) / tmp.tickSpacing / int24(256) + 1; if (tmp.currTick < 0) { tmp.initPoint = uint256( int256(tmp.currTick) / int256(tmp.tickSpacing) - (int256(tmp.currTick) / int256(tmp.tickSpacing) / 256 - 1) * 256 ) % 256; } else { tmp.initPoint = (uint256(int256(tmp.currTick)) / uint256(int256(tmp.tickSpacing))) % 256; } tmp.initPoint2 = tmp.initPoint; if (tmp.currTick < 0) tmp.right--; bytes memory tickInfo; tmp.left = tmp.right; uint256 index = 0; while (index < len / 2 && tmp.right < tmp.rightMost) { uint256 res = IAlgebraPoolV1_9(pool).tickTable(int16(tmp.right)); if (res > 0) { res = res >> tmp.initPoint; for (uint256 i = tmp.initPoint; i < 256 && index < len / 2; i++) { uint256 isInit = res & 0x01; if (isInit > 0) { int256 tick = int256((256 * tmp.right + int256(i)) * tmp.tickSpacing); // (, int128 liquidityNet,,,,,,) = IAlgebraPoolV1_9(pool).ticks(int24(int256(tick))); (, bytes memory deltaL) = pool.staticcall(abi.encodeWithSignature("ticks(int24)", tick)); int128 liquidityNet; assembly { liquidityNet := mload(add(deltaL, 64)) } int256 data = int256(uint256(int256(tick)) << 128) + (int256(liquidityNet) & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff); tickInfo = bytes.concat(tickInfo, bytes32(uint256(data))); index++; } res = res >> 1; } } tmp.initPoint = 0; tmp.right++; } bool isInitPoint = true; while (index < len && tmp.left > tmp.leftMost) { uint256 res = IAlgebraPoolV1_9(pool).tickTable(int16(tmp.left)); if (res > 0 && tmp.initPoint2 != 0) { res = isInitPoint ? res << ((256 - tmp.initPoint2) % 256) : res; for (uint256 i = tmp.initPoint2 - 1; i >= 0 && index < len; i--) { uint256 isInit = res & 0x8000000000000000000000000000000000000000000000000000000000000000; if (isInit > 0) { int256 tick = int256((256 * tmp.left + int256(i)) * tmp.tickSpacing); // (, int128 liquidityNet,,,,,,) = IAlgebraPoolV1_9(pool).ticks(int24(int256(tick))); (, bytes memory deltaL) = pool.staticcall(abi.encodeWithSignature("ticks(int24)", tick)); int128 liquidityNet; assembly { liquidityNet := mload(add(deltaL, 64)) } int256 data = int256(uint256(int256(tick)) << 128) + (int256(liquidityNet) & 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff); tickInfo = bytes.concat(tickInfo, bytes32(uint256(data))); index++; } res = res << 1; if (i == 0) break; } } isInitPoint = false; tmp.initPoint2 = 256; tmp.left--; } return tickInfo; } }
{ "remappings": [ "forge-std/=lib/forge-std/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"len","type":"uint256"}],"name":"queryAlgebraTicksSuperCompact","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"iteration","type":"uint256"}],"name":"queryAlgebraTicksSuperCompact2","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"len","type":"uint256"}],"name":"queryAlgebraTicksSuperCompact3","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"len","type":"uint256"}],"name":"queryAlgebraTicksSuperCompact3_back","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"iteration","type":"uint256"}],"name":"queryHorizonTicksSuperCompact","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"len","type":"uint256"}],"name":"queryIzumiSuperCompact","outputs":[{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"len","type":"uint256"}],"name":"queryUniv3TicksSuperCompact","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061360e806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063c38f8f351161005b578063c38f8f35146100df578063c684206c146100f2578063ca883bec14610105578063f9f59a771461011857600080fd5b80632d6d225e14610082578063594a1bf3146100ab5780637df8773a146100cc575b600080fd5b610095610090366004612f7c565b61012b565b6040516100a29190612ff8565b60405180910390f35b6100be6100b9366004612f7c565b61088c565b6040516100a2929190613012565b6100956100da366004612f7c565b611354565b6100956100ed366004612f7c565b6119a7565b610095610100366004612f7c565b6120d4565b610095610113366004612f7c565b612442565b610095610126366004612f7c565b6127be565b6060610135612f20565b836001600160a01b031663d0c93a7c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610173573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101979190613057565b60020b815260408051600481526024810182526020810180516001600160e01b03166339db007960e21b17905290516000916001600160a01b038716916101de9190613072565b600060405180830381855afa9150503d8060008114610219576040519150601f19603f3d011682016040523d82523d6000602084013e61021e565b606091505b506040015160020b602084018190528351610100935061023f9250906130ba565b61024991906130ba565b600290810b604083015281516101009061026790620d89e7196130ba565b61027191906130ba565b61027b91906130f4565b60020b608082015280516101009061029690620d89e86130ba565b6102a091906130ba565b6102ab906001613119565b600290810b60a083015260208201516000910b121561033e576101006001610100836000015160020b846020015160020b6102e6919061313e565b6102f0919061313e565b6102fa919061316c565b61030690610100613193565b826000015160020b836020015160020b610320919061313e565b61032a919061316c565b61033491906131c3565b60c082015261036b565b610100816000015160020b826020015160020b61035b91906131d7565b61036591906131c3565b60c08201525b60c081015160e08201526020810151600060029190910b121561039f5760408101805190610398826131eb565b60020b9052505b604081015160020b60608281019190915260005b6103be6002866131d7565b811080156103d957508260a0015160020b836040015160020b125b156105f6576040838101519051630633bf1f60e51b815260019190910b60048201526000906001600160a01b0388169063c677e3e090602401602060405180830381865afa15801561042f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610453919061320e565b905080156105d25760c084015190811c905b6101008110801561047f575061047c6002886131d7565b83105b156105d0576001821680156105b6576000866000015160020b8388604001516101006104ab9190613227565b60020b6104b89190613247565b6104c29190613193565b905060008a6001600160a01b0316826040516024016104e391815260200190565b60408051601f198184030181529181526020820180516001600160e01b031663f30dba9360e01b179052516105189190613072565b600060405180830381855afa9150503d8060008114610553576040519150601f19603f3d011682016040523d82523d6000602084013e610558565b606091505b5060408101519092509050600061057c6001600160801b038316608086901b613247565b604051909150610592908a90839060200161326f565b604051602081830303815290604052985087806105ae90613291565b985050505050505b5060019190911c90806105c881613291565b915050610465565b505b600060c0850152604084018051906105e9826132aa565b60020b9052506103b39050565b60015b85821080156106155750836080015160020b846060015160020b135b1561087f576060840151604051630633bf1f60e51b815260019190910b60048201526000906001600160a01b0389169063c677e3e090602401602060405180830381865afa15801561066b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068f919061320e565b90506000811180156106a4575060e085015115155b1561085657816106b457806106d7565b6101008560e001516101006106c991906132cb565b6106d391906131c3565b81901b5b9050600060018660e001516106ec91906132cb565b90505b8784101561085457600160ff1b8216801561082c576000876000015160020b8389606001516101006107219190613227565b60020b61072e9190613247565b6107389190613193565b905060008b6001600160a01b03168260405160240161075991815260200190565b60408051601f198184030181529181526020820180516001600160e01b031663f30dba9360e01b1790525161078e9190613072565b600060405180830381855afa9150503d80600081146107c9576040519150601f19603f3d011682016040523d82523d6000602084013e6107ce565b606091505b506040810151909250905060006107f26001600160801b038316608086901b613247565b604051909150610808908b90839060200161326f565b6040516020818303038152906040529950888061082490613291565b995050505050505b600183901b9250816000036108415750610854565b508061084c816132de565b9150506106ef565b505b61010060e08601526060850180516000935090610872826131eb565b60020b9052506105f99050565b5090925050505b92915050565b606080610897612f20565b846001600160a01b03166358c51ce66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f99190613057565b60020b815260408051600481526024810182526020810180516001600160e01b031663c19d93fb60e01b17905290516000916001600160a01b038816916109409190613072565b600060405180830381855afa9150503d806000811461097b576040519150601f19603f3d011682016040523d82523d6000602084013e610980565b606091505b506040015160020b60208401819052835161010093506109a19250906130ba565b6109ab91906130ba565b600290810b60408301528151610100906109c990620d89e7196130ba565b6109d391906130ba565b6109dd91906130f4565b60020b60808201528051610100906109f890620d89e86130ba565b610a0291906130ba565b610a0d906001613119565b600290810b60a083015260208201516000910b1215610aa0576101006001610100836000015160020b846020015160020b610a48919061313e565b610a52919061313e565b610a5c919061316c565b610a6890610100613193565b826000015160020b836020015160020b610a82919061313e565b610a8c919061316c565b610a9691906131c3565b60c0820152610acd565b610100816000015160020b826020015160020b610abd91906131d7565b610ac791906131c3565b60c08201525b60c081015160e08201526020810151600060029190910b1215610b015760408101805190610afa826131eb565b60020b9052505b604081015160020b6060828101919091528060005b610b216002886131d7565b81108015610b3c57508360a0015160020b846040015160020b125b15610efc576040848101519051634c507b9760e11b815260019190910b60048201526000906001600160a01b038a16906398a0f72e90602401602060405180830381865afa158015610b92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb6919061320e565b90508015610ed85760c085015190811c905b610100811015610ed657600182168015610ebc576000876000015160020b838960400151610100610bf99190613227565b60020b610c069190613247565b610c109190613193565b905060008c6001600160a01b031663edcba3b28a6000015184610c3391906130ba565b6040516001600160e01b031960e084901b16815260029190910b6004820152602401602060405180830381865afa158015610c72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c969190613057565b90508060011660020b600103610d7b576040516375c0e0d560e01b8152600283900b60048201526000906001600160a01b038f16906375c0e0d59060240160a060405180830381865afa158015610cf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d159190613317565b50505091505080600f0b600014610d79576000610d426001600160801b038316608086901b60120b613247565b604051909150610d58908b90839060200161326f565b60405160208183030381529060405299508780610d7490613291565b985050505b505b8060021660020b600203610eb9576000808e6001600160a01b0316638790aca3856040518263ffffffff1660e01b8152600401610dc1919060029190910b815260200190565b61014060405180830381865afa158015610ddf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e03919061337e565b505050509550505050509150816001600160801b03166000141580610e3057506001600160801b03811615155b15610eb6576040805160e086901b601e0b60208201526001600160901b0319609085811b8216602484015284901b16603282015260009101604051602081830303815290604052610e809061341c565b90508981604051602001610e9592919061326f565b60405160208183030381529060405299508880610eb190613291565b995050505b50505b50505b5060019190911c9080610ece81613291565b915050610bc8565b505b600060c086015260408501805190610eef826132aa565b60020b905250610b169050565b60015b8782108015610f1b5750846080015160020b856060015160020b135b15611346576060850151604051634c507b9760e11b815260019190910b60048201526000906001600160a01b038b16906398a0f72e90602401602060405180830381865afa158015610f71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f95919061320e565b9050600081118015610faa575060e086015115155b1561131d5781610fba5780610fdd565b6101008660e00151610100610fcf91906132cb565b610fd991906131c3565b81901b5b9050600060018760e00151610ff291906132cb565b90505b8984101561131b57600160ff1b821680156112f3576000886000015160020b838a606001516101006110279190613227565b60020b6110349190613247565b61103e9190613193565b905060008d6001600160a01b031663edcba3b28b600001518461106191906130ba565b6040516001600160e01b031960e084901b16815260029190910b6004820152602401602060405180830381865afa1580156110a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c49190613057565b90508060011660020b6001036111b25760008e6001600160a01b03166375c0e0d5846040518263ffffffff1660e01b815260040161110b919060029190910b815260200190565b60a060405180830381865afa158015611128573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114c9190613317565b50505091505080600f0b6000146111b05760006111796001600160801b038316608086901b60120b613247565b60405190915061118f908c90839060200161326f565b6040516020818303038152906040529a5088806111ab90613291565b995050505b505b8060021660020b6002036112f0576000808f6001600160a01b0316638790aca3856040518263ffffffff1660e01b81526004016111f8919060029190910b815260200190565b61014060405180830381865afa158015611216573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123a919061337e565b505050509550505050509150816001600160801b0316600014158061126757506001600160801b03811615155b156112ed576040805160e086901b601e0b60208201526001600160901b0319609085811b8216602484015284901b166032820152600091016040516020818303038152906040526112b79061341c565b90508a816040516020016112cc92919061326f565b6040516020818303038152906040529a5089806112e890613291565b9a5050505b50505b50505b600183901b925081600003611308575061131b565b5080611313816132de565b915050610ff5565b505b61010060e08701526060860180516000935090611339826131eb565b60020b905250610eff9050565b509197909650945050505050565b606061135e612f20565b60408051600481526024810182526020810180516001600160e01b03166339db007960e21b17905290516000916001600160a01b038716916113a09190613072565b600060405180830381855afa9150503d80600081146113db576040519150601f19603f3d011682016040523d82523d6000602084013e6113e0565b606091505b506040015160020b602084018190526113fe925061010091506130ba565b600290810b6040830152611418610100620d89e7196130ba565b61142291906130f4565b60020b6080820152611439610100620d89e86130ba565b611444906001613119565b600290810b60a083015260208201516000910b121561149c5761010080826020015161146f90613443565b60020b61147c91906131c3565b611488906101006132cb565b61149291906131c3565b60c08201526114b7565b610100816020015160020b6114b191906131c3565b60c08201525b60c081015160e08201526020810151600060029190910b12156114eb57604081018051906114e4826131eb565b60020b9052505b604081015160020b60608281019190915260005b61150a6002866131d7565b8110801561152557508260a0015160020b836040015160020b125b15611730576040838101519051630633bf1f60e51b815260019190910b60048201526000906001600160a01b0388169063c677e3e090602401602060405180830381865afa15801561157b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159f919061320e565b9050801561170c5760c084015190811c905b610100811080156115cb57506115c86002886131d7565b83105b1561170a576001821680156116f05760008287604001516101006115ef9190613227565b60020b6115fc9190613247565b905060008a6001600160a01b03168260405160240161161d91815260200190565b60408051601f198184030181529181526020820180516001600160e01b031663f30dba9360e01b179052516116529190613072565b600060405180830381855afa9150503d806000811461168d576040519150601f19603f3d011682016040523d82523d6000602084013e611692565b606091505b506040810151909250905060006116b66001600160801b038316608086901b613247565b6040519091506116cc908a90839060200161326f565b604051602081830303815290604052985087806116e890613291565b985050505050505b5060019190911c908061170281613291565b9150506115b1565b505b600060c085015260408401805190611723826132aa565b60020b9052506114ff9050565b60015b858210801561174f5750836080015160020b846060015160020b135b1561087f576060840151604051630633bf1f60e51b815260019190910b60048201526000906001600160a01b0389169063c677e3e090602401602060405180830381865afa1580156117a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c9919061320e565b90506000811180156117de575060e085015115155b1561197e57816117ee5780611811565b6101008560e0015161010061180391906132cb565b61180d91906131c3565b81901b5b9050600060018660e0015161182691906132cb565b90505b8784101561197c57600160ff1b821680156119545760008288606001516101006118539190613227565b60020b6118609190613247565b905060008b6001600160a01b03168260405160240161188191815260200190565b60408051601f198184030181529181526020820180516001600160e01b031663f30dba9360e01b179052516118b69190613072565b600060405180830381855afa9150503d80600081146118f1576040519150601f19603f3d011682016040523d82523d6000602084013e6118f6565b606091505b5060408101519092509050600061191a6001600160801b038316608086901b613247565b604051909150611930908b90839060200161326f565b6040516020818303038152906040529950888061194c90613291565b995050505050505b600183901b925081600003611969575061197c565b5080611974816132de565b915050611829565b505b61010060e0860152606085018051600093509061199a826131eb565b60020b9052506117339050565b60606119b1612f20565b6001815260408051600481526024810182526020810180516001600160e01b03166339db007960e21b17905290516000916001600160a01b038716916119f79190613072565b600060405180830381855afa9150503d8060008114611a32576040519150601f19603f3d011682016040523d82523d6000602084013e611a37565b606091505b506040015160020b60208401525060009050611a548460c8613227565b905061010082600001518360200151611a6d91906130ba565b611a7791906130ba565b600290810b6040840152825160208401516101009190611a989085906130f4565b611aa291906130ba565b611aac91906130ba565b611ab691906130f4565b60020b6080830152815160208301516101009190611ad5908490613119565b611adf91906130ba565b611ae991906130ba565b611af4906001613119565b600290810b60a084015260208301516000910b1215611b87576101006001610100846000015160020b856020015160020b611b2f919061313e565b611b39919061313e565b611b43919061316c565b611b4f90610100613193565b836000015160020b846020015160020b611b69919061313e565b611b73919061316c565b611b7d91906131c3565b60c0830152611bb4565b610100826000015160020b836020015160020b611ba491906131d7565b611bae91906131c3565b60c08301525b60c082015160e08301526020820151600060029190910b1215611be85760408201805190611be1826131eb565b60020b9052505b604082015160020b60608381019190915260005b611c076002876131d7565b81108015611c2257508360a0015160020b846040015160020b125b15611e3f576040848101519051630633bf1f60e51b815260019190910b60048201526000906001600160a01b0389169063c677e3e090602401602060405180830381865afa158015611c78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c9c919061320e565b90508015611e1b5760c085015190811c905b61010081108015611cc85750611cc56002896131d7565b83105b15611e1957600182168015611dff576000876000015160020b838960400151610100611cf49190613227565b60020b611d019190613247565b611d0b9190613193565b905060008b6001600160a01b031682604051602401611d2c91815260200190565b60408051601f198184030181529181526020820180516001600160e01b031663f30dba9360e01b17905251611d619190613072565b600060405180830381855afa9150503d8060008114611d9c576040519150601f19603f3d011682016040523d82523d6000602084013e611da1565b606091505b50604081015190925090506000611dc56001600160801b038316608086901b613247565b604051909150611ddb908a90839060200161326f565b60405160208183030381529060405298508780611df790613291565b985050505050505b5060019190911c9080611e1181613291565b915050611cae565b505b600060c086015260408501805190611e32826132aa565b60020b905250611bfc9050565b60015b8682108015611e5e5750846080015160020b856060015160020b135b156120c8576060850151604051630633bf1f60e51b815260019190910b60048201526000906001600160a01b038a169063c677e3e090602401602060405180830381865afa158015611eb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ed8919061320e565b9050600081118015611eed575060e086015115155b1561209f5781611efd5780611f20565b6101008660e00151610100611f1291906132cb565b611f1c91906131c3565b81901b5b9050600060018760e00151611f3591906132cb565b90505b8884101561209d57600160ff1b82168015612075576000886000015160020b838a60600151610100611f6a9190613227565b60020b611f779190613247565b611f819190613193565b905060008c6001600160a01b031682604051602401611fa291815260200190565b60408051601f198184030181529181526020820180516001600160e01b031663f30dba9360e01b17905251611fd79190613072565b600060405180830381855afa9150503d8060008114612012576040519150601f19603f3d011682016040523d82523d6000602084013e612017565b606091505b5060408101519092509050600061203b6001600160801b038316608086901b613247565b604051909150612051908b90839060200161326f565b6040516020818303038152906040529950888061206d90613291565b995050505050505b600183901b92508160000361208a575061209d565b5080612095816132de565b915050611f38565b505b61010060e087015260608601805160009350906120bb826131eb565b60020b905250611e429050565b50909695505050505050565b60606000836001600160a01b031663217ac2376040518163ffffffff1660e01b8152600401608060405180830381865afa158015612116573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213a9190613465565b5092508291506000905061214f6002866131d7565b905060605b620d89e9600285900b12801561216957508186115b156122c55760405163f30dba9360e01b8152600285900b60048201526000906001600160a01b0389169063f30dba9390602401608060405180830381865afa1580156121b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121dd91906134bb565b509092506000915061220190506001600160801b038316608088901b60120b613247565b604051909150612217908490839060200161326f565b60408051808303601f190181529082905263c0ac75cf60e01b8252600288900b600483015293506000906001600160a01b038b169063c0ac75cf906024016040805180830381865afa158015612271573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229591906134fd565b9150508060020b8760020b036122ad575050506122c5565b955085886122ba816132de565b995050505050612154565b620d89e819600284900b1380156122dc5750600086115b156124385760405163f30dba9360e01b8152600284900b60048201526000906001600160a01b0389169063f30dba9390602401608060405180830381865afa15801561232c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235091906134bb565b509092506000915061237490506001600160801b038316608087901b60120b613247565b60405190915061238a908490839060200161326f565b60408051808303601f190181529082905263c0ac75cf60e01b8252600287900b600483015293506000906001600160a01b038b169063c0ac75cf906024016040805180830381865afa1580156123e4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240891906134fd565b5090508560020b8160020b0361242057505050612438565b9450848861242d816132de565b9950505050506122c5565b9695505050505050565b60408051600481526024810182526020810180516001600160e01b031663bba0f17160e01b1790529051606091600091829182916001600160a01b0388169161248a91613072565b600060405180830381855afa9150503d80600081146124c5576040519150601f19603f3d011682016040523d82523d6000602084013e6124ca565b606091505b509150915081156124f057808060200190518101906124e99190613057565b9250612582565b60408051600481526024810182526020810180516001600160e01b03166339db007960e21b17905290516001600160a01b0388169161252e91613072565b600060405180830381855afa9150503d8060008114612569576040519150601f19603f3d011682016040523d82523d6000602084013e61256e565b606091505b509092509050811561258257606081015192505b5081905060006125936002866131d7565b905060605b620d89e9600285900b1280156125ad57508186115b156126aa5760405163f30dba9360e01b8152600285900b6004820152600090819081906001600160a01b038b169063f30dba939060240161012060405180830381865afa158015612602573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126269190613530565b505050955095505050935050600083600f0b6001600160801b031660808960020b901b6126539190613247565b604051909150612669908690839060200161326f565b60405160208183030381529060405294508160020b8860020b0361269057505050506126aa565b819750898061269e906132de565b9a505050505050612598565b620d89e819600284900b1380156126c15750600086115b156124385760405163f30dba9360e01b8152600284900b6004820152600090819081906001600160a01b038b169063f30dba939060240161012060405180830381865afa158015612716573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061273a9190613530565b505050955095505050935050600083600f0b6001600160801b031660808860020b901b6127679190613247565b60405190915061277d908690839060200161326f565b60405160208183030381529060405294508260020b8760020b036127a45750505050612438565b82965089806127b2906132de565b9a5050505050506126aa565b60606127c8612f20565b836001600160a01b031663d0c93a7c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612806573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282a9190613057565b60020b815260408051600481526024810182526020810180516001600160e01b0316633850c7bd60e01b17905290516000916001600160a01b038716916128719190613072565b600060405180830381855afa9150503d80600081146128ac576040519150601f19603f3d011682016040523d82523d6000602084013e6128b1565b606091505b506040015160020b60208401819052835161010093506128d29250906130ba565b6128dc91906130ba565b600290810b60408301528151610100906128fa90620d89e7196130ba565b61290491906130ba565b61290e91906130f4565b60020b608082015280516101009061292990620d89e86130ba565b61293391906130ba565b61293e906001613119565b600290810b60a083015260208201516000910b12156129d1576101006001610100836000015160020b846020015160020b612979919061313e565b612983919061313e565b61298d919061316c565b61299990610100613193565b826000015160020b836020015160020b6129b3919061313e565b6129bd919061316c565b6129c791906131c3565b60c08201526129fe565b610100816000015160020b826020015160020b6129ee91906131d7565b6129f891906131c3565b60c08201525b60c081015160e08201526020810151600060029190910b1215612a325760408101805190612a2b826131eb565b60020b9052505b604081015160020b60608281019190915260005b612a516002866131d7565b81108015612a6c57508260a0015160020b836040015160020b125b15612c9057604083810151905163299ce14b60e11b815260019190910b60048201526000906001600160a01b03881690635339c29690602401602060405180830381865afa158015612ac2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ae6919061320e565b90508015612c6c5760c084015190811c905b61010081108015612b125750612b0f6002886131d7565b83105b15612c6a57600182168015612c50576000866000015160020b838860400151610100612b3e9190613227565b60020b612b4b9190613247565b612b559190613193565b60408051600283900b60248083019190915282518083039091018152604490910182526020810180516001600160e01b031663f30dba9360e01b179052905191925060009182916001600160a01b038e1691612bb19190613072565b600060405180830381855afa9150503d8060008114612bec576040519150601f19603f3d011682016040523d82523d6000602084013e612bf1565b606091505b5060408101519350915060009050612c166001600160801b038416608086901b613247565b604051909150612c2c908a90839060200161326f565b60405160208183030381529060405298508780612c4890613291565b985050505050505b5060019190911c9080612c6281613291565b915050612af8565b505b600060c085015260408401805190612c83826132aa565b60020b905250612a469050565b60015b8582108015612caf5750836080015160020b846060015160020b135b1561087f57606084015160405163299ce14b60e11b815260019190910b60048201526000906001600160a01b03891690635339c29690602401602060405180830381865afa158015612d05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d29919061320e565b9050600081118015612d3e575060e085015115155b15612ef75781612d4e5780612d71565b6101008560e00151610100612d6391906132cb565b612d6d91906131c3565b81901b5b9050600060018660e00151612d8691906132cb565b90505b87841015612ef557600160ff1b82168015612ecd576000876000015160020b838960600151610100612dbb9190613227565b60020b612dc89190613247565b612dd29190613193565b60408051600283900b60248083019190915282518083039091018152604490910182526020810180516001600160e01b031663f30dba9360e01b179052905191925060009182916001600160a01b038f1691612e2e9190613072565b600060405180830381855afa9150503d8060008114612e69576040519150601f19603f3d011682016040523d82523d6000602084013e612e6e565b606091505b5060408101519350915060009050612e936001600160801b038416608086901b613247565b604051909150612ea9908b90839060200161326f565b60405160208183030381529060405299508880612ec590613291565b995050505050505b600183901b925081600003612ee25750612ef5565b5080612eed816132de565b915050612d89565b505b61010060e08601526060850180516000935090612f13826131eb565b60020b905250612c939050565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081019190915290565b6001600160a01b0381168114612f7957600080fd5b50565b60008060408385031215612f8f57600080fd5b8235612f9a81612f64565b946020939093013593505050565b60005b83811015612fc3578181015183820152602001612fab565b50506000910152565b60008151808452612fe4816020860160208601612fa8565b601f01601f19169290920160200192915050565b60208152600061300b6020830184612fcc565b9392505050565b6040815260006130256040830185612fcc565b82810360208401526130378185612fcc565b95945050505050565b8051600281900b811461305257600080fd5b919050565b60006020828403121561306957600080fd5b61300b82613040565b60008251613084818460208701612fa8565b9190910192915050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008160020b8360020b806130d1576130d161308e565b627fffff198214600019821416156130eb576130eb6130a4565b90059392505050565b600282810b9082900b03627fffff198112627fffff82131715610886576108866130a4565b600281810b9083900b01627fffff8113627fffff1982121715610886576108866130a4565b60008261314d5761314d61308e565b600160ff1b821460001984141615613167576131676130a4565b500590565b818103600083128015838313168383128216171561318c5761318c6130a4565b5092915050565b80820260008212600160ff1b841416156131af576131af6130a4565b8181058314821517610886576108866130a4565b6000826131d2576131d261308e565b500690565b6000826131e6576131e661308e565b500490565b60008160020b627fffff198103613204576132046130a4565b6000190192915050565b60006020828403121561322057600080fd5b5051919050565b60008260020b8260020b028060020b915080821461318c5761318c6130a4565b8082018281126000831280158216821582161715613267576132676130a4565b505092915050565b60008351613281818460208801612fa8565b9190910191825250602001919050565b6000600182016132a3576132a36130a4565b5060010190565b60008160020b627fffff81036132c2576132c26130a4565b60010192915050565b81810381811115610886576108866130a4565b6000816132ed576132ed6130a4565b506000190190565b8051600f81900b811461305257600080fd5b8051801515811461305257600080fd5b600080600080600060a0868803121561332f57600080fd5b8551945061333f602087016132f5565b9350604086015192506060860151915061335b60808701613307565b90509295509295909350565b80516001600160801b038116811461305257600080fd5b6000806000806000806000806000806101408b8d03121561339e57600080fd5b6133a78b613367565b99506133b560208c01613367565b985060408b0151975060608b015196506133d160808c01613367565b95506133df60a08c01613367565b94506133ed60c08c01613367565b93506133fb60e08c01613367565b92506101008b015191506101208b015190509295989b9194979a5092959850565b8051602080830151919081101561343d576000198160200360031b1b821691505b50919050565b60008160020b627fffff19810361345c5761345c6130a4565b60000392915050565b6000806000806080858703121561347b57600080fd5b845161348681612f64565b935061349460208601613040565b92506134a260408601613040565b91506134b060608601613307565b905092959194509250565b600080600080608085870312156134d157600080fd5b6134da85613367565b93506134e8602086016132f5565b9250604085015191506134b060608601613367565b6000806040838503121561351057600080fd5b61351983613040565b915061352760208401613040565b90509250929050565b60008060008060008060008060006101208a8c03121561354f57600080fd5b6135588a613367565b985061356660208b016132f5565b975060408a0151965060608a0151955061358260808b01613040565b945061359060a08b01613040565b935060c08a01516135a081612f64565b60e08b015190935063ffffffff811681146135ba57600080fd5b91506135c96101008b01613307565b9050929598509295985092959856fea26469706673582212205c3f3ecf2451495be67ad08c2ed57afff97df69a3927d5e3936446597cf8b1af64736f6c63430008110033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063c38f8f351161005b578063c38f8f35146100df578063c684206c146100f2578063ca883bec14610105578063f9f59a771461011857600080fd5b80632d6d225e14610082578063594a1bf3146100ab5780637df8773a146100cc575b600080fd5b610095610090366004612f7c565b61012b565b6040516100a29190612ff8565b60405180910390f35b6100be6100b9366004612f7c565b61088c565b6040516100a2929190613012565b6100956100da366004612f7c565b611354565b6100956100ed366004612f7c565b6119a7565b610095610100366004612f7c565b6120d4565b610095610113366004612f7c565b612442565b610095610126366004612f7c565b6127be565b6060610135612f20565b836001600160a01b031663d0c93a7c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610173573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101979190613057565b60020b815260408051600481526024810182526020810180516001600160e01b03166339db007960e21b17905290516000916001600160a01b038716916101de9190613072565b600060405180830381855afa9150503d8060008114610219576040519150601f19603f3d011682016040523d82523d6000602084013e61021e565b606091505b506040015160020b602084018190528351610100935061023f9250906130ba565b61024991906130ba565b600290810b604083015281516101009061026790620d89e7196130ba565b61027191906130ba565b61027b91906130f4565b60020b608082015280516101009061029690620d89e86130ba565b6102a091906130ba565b6102ab906001613119565b600290810b60a083015260208201516000910b121561033e576101006001610100836000015160020b846020015160020b6102e6919061313e565b6102f0919061313e565b6102fa919061316c565b61030690610100613193565b826000015160020b836020015160020b610320919061313e565b61032a919061316c565b61033491906131c3565b60c082015261036b565b610100816000015160020b826020015160020b61035b91906131d7565b61036591906131c3565b60c08201525b60c081015160e08201526020810151600060029190910b121561039f5760408101805190610398826131eb565b60020b9052505b604081015160020b60608281019190915260005b6103be6002866131d7565b811080156103d957508260a0015160020b836040015160020b125b156105f6576040838101519051630633bf1f60e51b815260019190910b60048201526000906001600160a01b0388169063c677e3e090602401602060405180830381865afa15801561042f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610453919061320e565b905080156105d25760c084015190811c905b6101008110801561047f575061047c6002886131d7565b83105b156105d0576001821680156105b6576000866000015160020b8388604001516101006104ab9190613227565b60020b6104b89190613247565b6104c29190613193565b905060008a6001600160a01b0316826040516024016104e391815260200190565b60408051601f198184030181529181526020820180516001600160e01b031663f30dba9360e01b179052516105189190613072565b600060405180830381855afa9150503d8060008114610553576040519150601f19603f3d011682016040523d82523d6000602084013e610558565b606091505b5060408101519092509050600061057c6001600160801b038316608086901b613247565b604051909150610592908a90839060200161326f565b604051602081830303815290604052985087806105ae90613291565b985050505050505b5060019190911c90806105c881613291565b915050610465565b505b600060c0850152604084018051906105e9826132aa565b60020b9052506103b39050565b60015b85821080156106155750836080015160020b846060015160020b135b1561087f576060840151604051630633bf1f60e51b815260019190910b60048201526000906001600160a01b0389169063c677e3e090602401602060405180830381865afa15801561066b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068f919061320e565b90506000811180156106a4575060e085015115155b1561085657816106b457806106d7565b6101008560e001516101006106c991906132cb565b6106d391906131c3565b81901b5b9050600060018660e001516106ec91906132cb565b90505b8784101561085457600160ff1b8216801561082c576000876000015160020b8389606001516101006107219190613227565b60020b61072e9190613247565b6107389190613193565b905060008b6001600160a01b03168260405160240161075991815260200190565b60408051601f198184030181529181526020820180516001600160e01b031663f30dba9360e01b1790525161078e9190613072565b600060405180830381855afa9150503d80600081146107c9576040519150601f19603f3d011682016040523d82523d6000602084013e6107ce565b606091505b506040810151909250905060006107f26001600160801b038316608086901b613247565b604051909150610808908b90839060200161326f565b6040516020818303038152906040529950888061082490613291565b995050505050505b600183901b9250816000036108415750610854565b508061084c816132de565b9150506106ef565b505b61010060e08601526060850180516000935090610872826131eb565b60020b9052506105f99050565b5090925050505b92915050565b606080610897612f20565b846001600160a01b03166358c51ce66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f99190613057565b60020b815260408051600481526024810182526020810180516001600160e01b031663c19d93fb60e01b17905290516000916001600160a01b038816916109409190613072565b600060405180830381855afa9150503d806000811461097b576040519150601f19603f3d011682016040523d82523d6000602084013e610980565b606091505b506040015160020b60208401819052835161010093506109a19250906130ba565b6109ab91906130ba565b600290810b60408301528151610100906109c990620d89e7196130ba565b6109d391906130ba565b6109dd91906130f4565b60020b60808201528051610100906109f890620d89e86130ba565b610a0291906130ba565b610a0d906001613119565b600290810b60a083015260208201516000910b1215610aa0576101006001610100836000015160020b846020015160020b610a48919061313e565b610a52919061313e565b610a5c919061316c565b610a6890610100613193565b826000015160020b836020015160020b610a82919061313e565b610a8c919061316c565b610a9691906131c3565b60c0820152610acd565b610100816000015160020b826020015160020b610abd91906131d7565b610ac791906131c3565b60c08201525b60c081015160e08201526020810151600060029190910b1215610b015760408101805190610afa826131eb565b60020b9052505b604081015160020b6060828101919091528060005b610b216002886131d7565b81108015610b3c57508360a0015160020b846040015160020b125b15610efc576040848101519051634c507b9760e11b815260019190910b60048201526000906001600160a01b038a16906398a0f72e90602401602060405180830381865afa158015610b92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb6919061320e565b90508015610ed85760c085015190811c905b610100811015610ed657600182168015610ebc576000876000015160020b838960400151610100610bf99190613227565b60020b610c069190613247565b610c109190613193565b905060008c6001600160a01b031663edcba3b28a6000015184610c3391906130ba565b6040516001600160e01b031960e084901b16815260029190910b6004820152602401602060405180830381865afa158015610c72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c969190613057565b90508060011660020b600103610d7b576040516375c0e0d560e01b8152600283900b60048201526000906001600160a01b038f16906375c0e0d59060240160a060405180830381865afa158015610cf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d159190613317565b50505091505080600f0b600014610d79576000610d426001600160801b038316608086901b60120b613247565b604051909150610d58908b90839060200161326f565b60405160208183030381529060405299508780610d7490613291565b985050505b505b8060021660020b600203610eb9576000808e6001600160a01b0316638790aca3856040518263ffffffff1660e01b8152600401610dc1919060029190910b815260200190565b61014060405180830381865afa158015610ddf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e03919061337e565b505050509550505050509150816001600160801b03166000141580610e3057506001600160801b03811615155b15610eb6576040805160e086901b601e0b60208201526001600160901b0319609085811b8216602484015284901b16603282015260009101604051602081830303815290604052610e809061341c565b90508981604051602001610e9592919061326f565b60405160208183030381529060405299508880610eb190613291565b995050505b50505b50505b5060019190911c9080610ece81613291565b915050610bc8565b505b600060c086015260408501805190610eef826132aa565b60020b905250610b169050565b60015b8782108015610f1b5750846080015160020b856060015160020b135b15611346576060850151604051634c507b9760e11b815260019190910b60048201526000906001600160a01b038b16906398a0f72e90602401602060405180830381865afa158015610f71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f95919061320e565b9050600081118015610faa575060e086015115155b1561131d5781610fba5780610fdd565b6101008660e00151610100610fcf91906132cb565b610fd991906131c3565b81901b5b9050600060018760e00151610ff291906132cb565b90505b8984101561131b57600160ff1b821680156112f3576000886000015160020b838a606001516101006110279190613227565b60020b6110349190613247565b61103e9190613193565b905060008d6001600160a01b031663edcba3b28b600001518461106191906130ba565b6040516001600160e01b031960e084901b16815260029190910b6004820152602401602060405180830381865afa1580156110a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c49190613057565b90508060011660020b6001036111b25760008e6001600160a01b03166375c0e0d5846040518263ffffffff1660e01b815260040161110b919060029190910b815260200190565b60a060405180830381865afa158015611128573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114c9190613317565b50505091505080600f0b6000146111b05760006111796001600160801b038316608086901b60120b613247565b60405190915061118f908c90839060200161326f565b6040516020818303038152906040529a5088806111ab90613291565b995050505b505b8060021660020b6002036112f0576000808f6001600160a01b0316638790aca3856040518263ffffffff1660e01b81526004016111f8919060029190910b815260200190565b61014060405180830381865afa158015611216573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123a919061337e565b505050509550505050509150816001600160801b0316600014158061126757506001600160801b03811615155b156112ed576040805160e086901b601e0b60208201526001600160901b0319609085811b8216602484015284901b166032820152600091016040516020818303038152906040526112b79061341c565b90508a816040516020016112cc92919061326f565b6040516020818303038152906040529a5089806112e890613291565b9a5050505b50505b50505b600183901b925081600003611308575061131b565b5080611313816132de565b915050610ff5565b505b61010060e08701526060860180516000935090611339826131eb565b60020b905250610eff9050565b509197909650945050505050565b606061135e612f20565b60408051600481526024810182526020810180516001600160e01b03166339db007960e21b17905290516000916001600160a01b038716916113a09190613072565b600060405180830381855afa9150503d80600081146113db576040519150601f19603f3d011682016040523d82523d6000602084013e6113e0565b606091505b506040015160020b602084018190526113fe925061010091506130ba565b600290810b6040830152611418610100620d89e7196130ba565b61142291906130f4565b60020b6080820152611439610100620d89e86130ba565b611444906001613119565b600290810b60a083015260208201516000910b121561149c5761010080826020015161146f90613443565b60020b61147c91906131c3565b611488906101006132cb565b61149291906131c3565b60c08201526114b7565b610100816020015160020b6114b191906131c3565b60c08201525b60c081015160e08201526020810151600060029190910b12156114eb57604081018051906114e4826131eb565b60020b9052505b604081015160020b60608281019190915260005b61150a6002866131d7565b8110801561152557508260a0015160020b836040015160020b125b15611730576040838101519051630633bf1f60e51b815260019190910b60048201526000906001600160a01b0388169063c677e3e090602401602060405180830381865afa15801561157b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159f919061320e565b9050801561170c5760c084015190811c905b610100811080156115cb57506115c86002886131d7565b83105b1561170a576001821680156116f05760008287604001516101006115ef9190613227565b60020b6115fc9190613247565b905060008a6001600160a01b03168260405160240161161d91815260200190565b60408051601f198184030181529181526020820180516001600160e01b031663f30dba9360e01b179052516116529190613072565b600060405180830381855afa9150503d806000811461168d576040519150601f19603f3d011682016040523d82523d6000602084013e611692565b606091505b506040810151909250905060006116b66001600160801b038316608086901b613247565b6040519091506116cc908a90839060200161326f565b604051602081830303815290604052985087806116e890613291565b985050505050505b5060019190911c908061170281613291565b9150506115b1565b505b600060c085015260408401805190611723826132aa565b60020b9052506114ff9050565b60015b858210801561174f5750836080015160020b846060015160020b135b1561087f576060840151604051630633bf1f60e51b815260019190910b60048201526000906001600160a01b0389169063c677e3e090602401602060405180830381865afa1580156117a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117c9919061320e565b90506000811180156117de575060e085015115155b1561197e57816117ee5780611811565b6101008560e0015161010061180391906132cb565b61180d91906131c3565b81901b5b9050600060018660e0015161182691906132cb565b90505b8784101561197c57600160ff1b821680156119545760008288606001516101006118539190613227565b60020b6118609190613247565b905060008b6001600160a01b03168260405160240161188191815260200190565b60408051601f198184030181529181526020820180516001600160e01b031663f30dba9360e01b179052516118b69190613072565b600060405180830381855afa9150503d80600081146118f1576040519150601f19603f3d011682016040523d82523d6000602084013e6118f6565b606091505b5060408101519092509050600061191a6001600160801b038316608086901b613247565b604051909150611930908b90839060200161326f565b6040516020818303038152906040529950888061194c90613291565b995050505050505b600183901b925081600003611969575061197c565b5080611974816132de565b915050611829565b505b61010060e0860152606085018051600093509061199a826131eb565b60020b9052506117339050565b60606119b1612f20565b6001815260408051600481526024810182526020810180516001600160e01b03166339db007960e21b17905290516000916001600160a01b038716916119f79190613072565b600060405180830381855afa9150503d8060008114611a32576040519150601f19603f3d011682016040523d82523d6000602084013e611a37565b606091505b506040015160020b60208401525060009050611a548460c8613227565b905061010082600001518360200151611a6d91906130ba565b611a7791906130ba565b600290810b6040840152825160208401516101009190611a989085906130f4565b611aa291906130ba565b611aac91906130ba565b611ab691906130f4565b60020b6080830152815160208301516101009190611ad5908490613119565b611adf91906130ba565b611ae991906130ba565b611af4906001613119565b600290810b60a084015260208301516000910b1215611b87576101006001610100846000015160020b856020015160020b611b2f919061313e565b611b39919061313e565b611b43919061316c565b611b4f90610100613193565b836000015160020b846020015160020b611b69919061313e565b611b73919061316c565b611b7d91906131c3565b60c0830152611bb4565b610100826000015160020b836020015160020b611ba491906131d7565b611bae91906131c3565b60c08301525b60c082015160e08301526020820151600060029190910b1215611be85760408201805190611be1826131eb565b60020b9052505b604082015160020b60608381019190915260005b611c076002876131d7565b81108015611c2257508360a0015160020b846040015160020b125b15611e3f576040848101519051630633bf1f60e51b815260019190910b60048201526000906001600160a01b0389169063c677e3e090602401602060405180830381865afa158015611c78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c9c919061320e565b90508015611e1b5760c085015190811c905b61010081108015611cc85750611cc56002896131d7565b83105b15611e1957600182168015611dff576000876000015160020b838960400151610100611cf49190613227565b60020b611d019190613247565b611d0b9190613193565b905060008b6001600160a01b031682604051602401611d2c91815260200190565b60408051601f198184030181529181526020820180516001600160e01b031663f30dba9360e01b17905251611d619190613072565b600060405180830381855afa9150503d8060008114611d9c576040519150601f19603f3d011682016040523d82523d6000602084013e611da1565b606091505b50604081015190925090506000611dc56001600160801b038316608086901b613247565b604051909150611ddb908a90839060200161326f565b60405160208183030381529060405298508780611df790613291565b985050505050505b5060019190911c9080611e1181613291565b915050611cae565b505b600060c086015260408501805190611e32826132aa565b60020b905250611bfc9050565b60015b8682108015611e5e5750846080015160020b856060015160020b135b156120c8576060850151604051630633bf1f60e51b815260019190910b60048201526000906001600160a01b038a169063c677e3e090602401602060405180830381865afa158015611eb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ed8919061320e565b9050600081118015611eed575060e086015115155b1561209f5781611efd5780611f20565b6101008660e00151610100611f1291906132cb565b611f1c91906131c3565b81901b5b9050600060018760e00151611f3591906132cb565b90505b8884101561209d57600160ff1b82168015612075576000886000015160020b838a60600151610100611f6a9190613227565b60020b611f779190613247565b611f819190613193565b905060008c6001600160a01b031682604051602401611fa291815260200190565b60408051601f198184030181529181526020820180516001600160e01b031663f30dba9360e01b17905251611fd79190613072565b600060405180830381855afa9150503d8060008114612012576040519150601f19603f3d011682016040523d82523d6000602084013e612017565b606091505b5060408101519092509050600061203b6001600160801b038316608086901b613247565b604051909150612051908b90839060200161326f565b6040516020818303038152906040529950888061206d90613291565b995050505050505b600183901b92508160000361208a575061209d565b5080612095816132de565b915050611f38565b505b61010060e087015260608601805160009350906120bb826131eb565b60020b905250611e429050565b50909695505050505050565b60606000836001600160a01b031663217ac2376040518163ffffffff1660e01b8152600401608060405180830381865afa158015612116573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061213a9190613465565b5092508291506000905061214f6002866131d7565b905060605b620d89e9600285900b12801561216957508186115b156122c55760405163f30dba9360e01b8152600285900b60048201526000906001600160a01b0389169063f30dba9390602401608060405180830381865afa1580156121b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121dd91906134bb565b509092506000915061220190506001600160801b038316608088901b60120b613247565b604051909150612217908490839060200161326f565b60408051808303601f190181529082905263c0ac75cf60e01b8252600288900b600483015293506000906001600160a01b038b169063c0ac75cf906024016040805180830381865afa158015612271573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229591906134fd565b9150508060020b8760020b036122ad575050506122c5565b955085886122ba816132de565b995050505050612154565b620d89e819600284900b1380156122dc5750600086115b156124385760405163f30dba9360e01b8152600284900b60048201526000906001600160a01b0389169063f30dba9390602401608060405180830381865afa15801561232c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061235091906134bb565b509092506000915061237490506001600160801b038316608087901b60120b613247565b60405190915061238a908490839060200161326f565b60408051808303601f190181529082905263c0ac75cf60e01b8252600287900b600483015293506000906001600160a01b038b169063c0ac75cf906024016040805180830381865afa1580156123e4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240891906134fd565b5090508560020b8160020b0361242057505050612438565b9450848861242d816132de565b9950505050506122c5565b9695505050505050565b60408051600481526024810182526020810180516001600160e01b031663bba0f17160e01b1790529051606091600091829182916001600160a01b0388169161248a91613072565b600060405180830381855afa9150503d80600081146124c5576040519150601f19603f3d011682016040523d82523d6000602084013e6124ca565b606091505b509150915081156124f057808060200190518101906124e99190613057565b9250612582565b60408051600481526024810182526020810180516001600160e01b03166339db007960e21b17905290516001600160a01b0388169161252e91613072565b600060405180830381855afa9150503d8060008114612569576040519150601f19603f3d011682016040523d82523d6000602084013e61256e565b606091505b509092509050811561258257606081015192505b5081905060006125936002866131d7565b905060605b620d89e9600285900b1280156125ad57508186115b156126aa5760405163f30dba9360e01b8152600285900b6004820152600090819081906001600160a01b038b169063f30dba939060240161012060405180830381865afa158015612602573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126269190613530565b505050955095505050935050600083600f0b6001600160801b031660808960020b901b6126539190613247565b604051909150612669908690839060200161326f565b60405160208183030381529060405294508160020b8860020b0361269057505050506126aa565b819750898061269e906132de565b9a505050505050612598565b620d89e819600284900b1380156126c15750600086115b156124385760405163f30dba9360e01b8152600284900b6004820152600090819081906001600160a01b038b169063f30dba939060240161012060405180830381865afa158015612716573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061273a9190613530565b505050955095505050935050600083600f0b6001600160801b031660808860020b901b6127679190613247565b60405190915061277d908690839060200161326f565b60405160208183030381529060405294508260020b8760020b036127a45750505050612438565b82965089806127b2906132de565b9a5050505050506126aa565b60606127c8612f20565b836001600160a01b031663d0c93a7c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612806573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061282a9190613057565b60020b815260408051600481526024810182526020810180516001600160e01b0316633850c7bd60e01b17905290516000916001600160a01b038716916128719190613072565b600060405180830381855afa9150503d80600081146128ac576040519150601f19603f3d011682016040523d82523d6000602084013e6128b1565b606091505b506040015160020b60208401819052835161010093506128d29250906130ba565b6128dc91906130ba565b600290810b60408301528151610100906128fa90620d89e7196130ba565b61290491906130ba565b61290e91906130f4565b60020b608082015280516101009061292990620d89e86130ba565b61293391906130ba565b61293e906001613119565b600290810b60a083015260208201516000910b12156129d1576101006001610100836000015160020b846020015160020b612979919061313e565b612983919061313e565b61298d919061316c565b61299990610100613193565b826000015160020b836020015160020b6129b3919061313e565b6129bd919061316c565b6129c791906131c3565b60c08201526129fe565b610100816000015160020b826020015160020b6129ee91906131d7565b6129f891906131c3565b60c08201525b60c081015160e08201526020810151600060029190910b1215612a325760408101805190612a2b826131eb565b60020b9052505b604081015160020b60608281019190915260005b612a516002866131d7565b81108015612a6c57508260a0015160020b836040015160020b125b15612c9057604083810151905163299ce14b60e11b815260019190910b60048201526000906001600160a01b03881690635339c29690602401602060405180830381865afa158015612ac2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ae6919061320e565b90508015612c6c5760c084015190811c905b61010081108015612b125750612b0f6002886131d7565b83105b15612c6a57600182168015612c50576000866000015160020b838860400151610100612b3e9190613227565b60020b612b4b9190613247565b612b559190613193565b60408051600283900b60248083019190915282518083039091018152604490910182526020810180516001600160e01b031663f30dba9360e01b179052905191925060009182916001600160a01b038e1691612bb19190613072565b600060405180830381855afa9150503d8060008114612bec576040519150601f19603f3d011682016040523d82523d6000602084013e612bf1565b606091505b5060408101519350915060009050612c166001600160801b038416608086901b613247565b604051909150612c2c908a90839060200161326f565b60405160208183030381529060405298508780612c4890613291565b985050505050505b5060019190911c9080612c6281613291565b915050612af8565b505b600060c085015260408401805190612c83826132aa565b60020b905250612a469050565b60015b8582108015612caf5750836080015160020b846060015160020b135b1561087f57606084015160405163299ce14b60e11b815260019190910b60048201526000906001600160a01b03891690635339c29690602401602060405180830381865afa158015612d05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d29919061320e565b9050600081118015612d3e575060e085015115155b15612ef75781612d4e5780612d71565b6101008560e00151610100612d6391906132cb565b612d6d91906131c3565b81901b5b9050600060018660e00151612d8691906132cb565b90505b87841015612ef557600160ff1b82168015612ecd576000876000015160020b838960600151610100612dbb9190613227565b60020b612dc89190613247565b612dd29190613193565b60408051600283900b60248083019190915282518083039091018152604490910182526020810180516001600160e01b031663f30dba9360e01b179052905191925060009182916001600160a01b038f1691612e2e9190613072565b600060405180830381855afa9150503d8060008114612e69576040519150601f19603f3d011682016040523d82523d6000602084013e612e6e565b606091505b5060408101519350915060009050612e936001600160801b038416608086901b613247565b604051909150612ea9908b90839060200161326f565b60405160208183030381529060405299508880612ec590613291565b995050505050505b600183901b925081600003612ee25750612ef5565b5080612eed816132de565b915050612d89565b505b61010060e08601526060850180516000935090612f13826131eb565b60020b905250612c939050565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081019190915290565b6001600160a01b0381168114612f7957600080fd5b50565b60008060408385031215612f8f57600080fd5b8235612f9a81612f64565b946020939093013593505050565b60005b83811015612fc3578181015183820152602001612fab565b50506000910152565b60008151808452612fe4816020860160208601612fa8565b601f01601f19169290920160200192915050565b60208152600061300b6020830184612fcc565b9392505050565b6040815260006130256040830185612fcc565b82810360208401526130378185612fcc565b95945050505050565b8051600281900b811461305257600080fd5b919050565b60006020828403121561306957600080fd5b61300b82613040565b60008251613084818460208701612fa8565b9190910192915050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008160020b8360020b806130d1576130d161308e565b627fffff198214600019821416156130eb576130eb6130a4565b90059392505050565b600282810b9082900b03627fffff198112627fffff82131715610886576108866130a4565b600281810b9083900b01627fffff8113627fffff1982121715610886576108866130a4565b60008261314d5761314d61308e565b600160ff1b821460001984141615613167576131676130a4565b500590565b818103600083128015838313168383128216171561318c5761318c6130a4565b5092915050565b80820260008212600160ff1b841416156131af576131af6130a4565b8181058314821517610886576108866130a4565b6000826131d2576131d261308e565b500690565b6000826131e6576131e661308e565b500490565b60008160020b627fffff198103613204576132046130a4565b6000190192915050565b60006020828403121561322057600080fd5b5051919050565b60008260020b8260020b028060020b915080821461318c5761318c6130a4565b8082018281126000831280158216821582161715613267576132676130a4565b505092915050565b60008351613281818460208801612fa8565b9190910191825250602001919050565b6000600182016132a3576132a36130a4565b5060010190565b60008160020b627fffff81036132c2576132c26130a4565b60010192915050565b81810381811115610886576108866130a4565b6000816132ed576132ed6130a4565b506000190190565b8051600f81900b811461305257600080fd5b8051801515811461305257600080fd5b600080600080600060a0868803121561332f57600080fd5b8551945061333f602087016132f5565b9350604086015192506060860151915061335b60808701613307565b90509295509295909350565b80516001600160801b038116811461305257600080fd5b6000806000806000806000806000806101408b8d03121561339e57600080fd5b6133a78b613367565b99506133b560208c01613367565b985060408b0151975060608b015196506133d160808c01613367565b95506133df60a08c01613367565b94506133ed60c08c01613367565b93506133fb60e08c01613367565b92506101008b015191506101208b015190509295989b9194979a5092959850565b8051602080830151919081101561343d576000198160200360031b1b821691505b50919050565b60008160020b627fffff19810361345c5761345c6130a4565b60000392915050565b6000806000806080858703121561347b57600080fd5b845161348681612f64565b935061349460208601613040565b92506134a260408601613040565b91506134b060608601613307565b905092959194509250565b600080600080608085870312156134d157600080fd5b6134da85613367565b93506134e8602086016132f5565b9250604085015191506134b060608601613367565b6000806040838503121561351057600080fd5b61351983613040565b915061352760208401613040565b90509250929050565b60008060008060008060008060006101208a8c03121561354f57600080fd5b6135588a613367565b985061356660208b016132f5565b975060408a0151965060608a0151955061358260808b01613040565b945061359060a08b01613040565b935060c08a01516135a081612f64565b60e08b015190935063ffffffff811681146135ba57600080fd5b91506135c96101008b01613307565b9050929598509295985092959856fea26469706673582212205c3f3ecf2451495be67ad08c2ed57afff97df69a3927d5e3936446597cf8b1af64736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.