More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x58A9d05e...45d1dA65C The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
AlgebraPool
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
Yes with 0 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.7.6;import './interfaces/IAlgebraPool.sol';import './interfaces/IDataStorageOperator.sol';import './interfaces/IAlgebraVirtualPool.sol';import './base/PoolState.sol';import './base/PoolImmutables.sol';import './libraries/TokenDeltaMath.sol';import './libraries/PriceMovementMath.sol';import './libraries/TickManager.sol';import './libraries/TickTable.sol';import './libraries/LowGasSafeMath.sol';import './libraries/SafeCast.sol';import './libraries/FullMath.sol';import './libraries/Constants.sol';import './libraries/TransferHelper.sol';import './libraries/TickMath.sol';import './libraries/LiquidityMath.sol';import './interfaces/IAlgebraPoolDeployer.sol';import './interfaces/IAlgebraFactory.sol';
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.7.6;import '../interfaces/pool/IAlgebraPoolImmutables.sol';import '../interfaces/IAlgebraPoolDeployer.sol';import '../libraries/Constants.sol';abstract contract PoolImmutables is IAlgebraPoolImmutables {/// @inheritdoc IAlgebraPoolImmutablesaddress public immutable override dataStorageOperator;/// @inheritdoc IAlgebraPoolImmutablesaddress public immutable override factory;/// @inheritdoc IAlgebraPoolImmutablesaddress public immutable override token0;/// @inheritdoc IAlgebraPoolImmutablesaddress public immutable override token1;/// @inheritdoc IAlgebraPoolImmutablesfunction maxLiquidityPerTick() external pure override returns (uint128) {return Constants.MAX_LIQUIDITY_PER_TICK;}constructor(address deployer) {(dataStorageOperator, factory, token0, token1) = IAlgebraPoolDeployer(deployer).parameters();}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.7.6;import '../interfaces/pool/IAlgebraPoolState.sol';import '../libraries/TickManager.sol';abstract contract PoolState is IAlgebraPoolState {struct GlobalState {uint160 price; // The square root of the current price in Q64.96 formatint24 tick; // The current tickuint16 feeZto; // The current fee for ZtO swap in hundredths of a bip, i.e. 1e-6uint16 feeOtz; // The current fee for OtZ swap in hundredths of a bip, i.e. 1e-6uint16 timepointIndex; // The index of the last written timepointuint8 communityFeeToken0; // The community fee represented as a percent of all collected fee in thousandths (1e-3)uint8 communityFeeToken1;bool unlocked; // True if the contract is unlocked, otherwise - false}/// @inheritdoc IAlgebraPoolStateuint256 public override totalFeeGrowth0Token;/// @inheritdoc IAlgebraPoolStateuint256 public override totalFeeGrowth1Token;/// @inheritdoc IAlgebraPoolStateGlobalState public override globalState;/// @inheritdoc IAlgebraPoolState
1234567891011121314151617181920// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/*** @title Callback for IAlgebraPoolActions#flash* @notice Any contract that calls IAlgebraPoolActions#flash must implement this interface* @dev Credit to Uniswap Labs under GPL-2.0-or-later license:* https://github.com/Uniswap/v3-core/tree/main/contracts/interfaces*/interface IAlgebraFlashCallback {/*** @notice Called to `msg.sender` after transferring to the recipient from IAlgebraPool#flash.* @dev In the implementation you must repay the pool the tokens sent by flash plus the computed fee amounts.* The caller of this method must be checked to be a AlgebraPool deployed by the canonical AlgebraFactory.* @param fee0 The fee amount in token0 due to the pool by the end of the flash* @param fee1 The fee amount in token1 due to the pool by the end of the flash* @param data Any data passed through by the caller via the IAlgebraPoolActions#flash call*/function algebraFlashCallback(uint256 fee0, uint256 fee1, bytes calldata data) external;}
1234567891011121314151617181920// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Callback for IAlgebraPoolActions#mint/// @notice Any contract that calls IAlgebraPoolActions#mint must implement this interface/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/tree/main/contracts/interfacesinterface IAlgebraMintCallback {/// @notice Called to `msg.sender` after minting liquidity to a position from IAlgebraPool#mint./// @dev In the implementation you must pay the pool tokens owed for the minted liquidity./// The caller of this method must be checked to be a AlgebraPool deployed by the canonical AlgebraFactory./// @param amount0Owed The amount of token0 due to the pool for the minted liquidity/// @param amount1Owed The amount of token1 due to the pool for the minted liquidity/// @param data Any data passed through by the caller via the IAlgebraPoolActions#mint callfunction algebraMintCallback(uint256 amount0Owed,uint256 amount1Owed,bytes calldata data) external;}
1234567891011121314151617181920212223// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Callback for IAlgebraPoolActions#swap/// @notice Any contract that calls IAlgebraPoolActions#swap must implement this interface/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/tree/main/contracts/interfacesinterface IAlgebraSwapCallback {/// @notice Called to `msg.sender` after executing a swap via IAlgebraPool#swap./// @dev In the implementation you must pay the pool tokens owed for the swap./// The caller of this method must be checked to be a AlgebraPool deployed by the canonical AlgebraFactory./// amount0Delta and amount1Delta can both be 0 if no tokens were swapped./// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by/// the end of the swap. If positive, the callback must send that amount of token0 to the pool./// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by/// the end of the swap. If positive, the callback must send that amount of token1 to the pool./// @param data Any data passed through by the caller via the IAlgebraPoolActions#swap callfunction algebraSwapCallback(int256 amount0Delta,int256 amount1Delta,bytes calldata data) external;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/*** @title The interface for the Algebra Factory* @dev Credit to Uniswap Labs under GPL-2.0-or-later license:* https://github.com/Uniswap/v3-core/tree/main/contracts/interfaces*/interface IAlgebraFactory {/*** @notice Emitted when the owner of the factory is changed* @param newOwner The owner after the owner was changed*/event Owner(address indexed newOwner);/*** @notice Emitted when the vault address is changed* @param newVaultAddress The vault address after the address was changed*/event VaultAddress(address indexed newVaultAddress);/*** @notice Emitted when a pool is created* @param token0 The first token of the pool by address sort order* @param token1 The second token of the pool by address sort order* @param pool The address of the created pool
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;import './pool/IAlgebraPoolImmutables.sol';import './pool/IAlgebraPoolState.sol';import './pool/IAlgebraPoolDerivedState.sol';import './pool/IAlgebraPoolActions.sol';import './pool/IAlgebraPoolPermissionedActions.sol';import './pool/IAlgebraPoolEvents.sol';/*** @title The interface for a Algebra Pool* @dev The pool interface is broken up into many smaller pieces.* Credit to Uniswap Labs under GPL-2.0-or-later license:* https://github.com/Uniswap/v3-core/tree/main/contracts/interfaces*/interface IAlgebraPool isIAlgebraPoolImmutables,IAlgebraPoolState,IAlgebraPoolDerivedState,IAlgebraPoolActions,IAlgebraPoolPermissionedActions,IAlgebraPoolEvents{// used only for combining interfaces}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/*** @title An interface for a contract that is capable of deploying Algebra Pools* @notice A contract that constructs a pool must implement this to pass arguments to the pool* @dev This is used to avoid having constructor arguments in the pool contract, which results in the init code hash* of the pool being constant allowing the CREATE2 address of the pool to be cheaply computed on-chain.* Credit to Uniswap Labs under GPL-2.0-or-later license:* https://github.com/Uniswap/v3-core/tree/main/contracts/interfaces*/interface IAlgebraPoolDeployer {/*** @notice Emitted when the factory address is changed* @param factory The factory address after the address was changed*/event Factory(address indexed factory);/*** @notice Get the parameters to be used in constructing the pool, set transiently during pool creation.* @dev Called by the pool constructor to fetch the parameters of the pool* Returns dataStorage The pools associated dataStorage* Returns factory The factory address* Returns token0 The first token of the pool by address sort order* Returns token1 The second token of the pool by address sort order*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;interface IAlgebraVirtualPool {enum Status {NOT_EXIST,ACTIVE,NOT_STARTED}/*** @dev This function is called by the main pool when an initialized tick is crossed there.* If the tick is also initialized in a virtual pool it should be crossed too* @param nextTick The crossed tick* @param zeroToOne The direction*/function cross(int24 nextTick, bool zeroToOne) external;/*** @dev This function is called from the main pool before every swap To increase seconds per liquidity* cumulative considering previous timestamp and liquidity. The liquidity is stored in a virtual pool* @param currentTimestamp The timestamp of the current swap* @return Status The status of virtual pool*/function increaseCumulative(uint32 currentTimestamp) external returns (Status);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;pragma abicoder v2;import '../libraries/AdaptiveFee.sol';interface IDataStorageOperator {event FeeConfiguration(bool zto, AdaptiveFee.Configuration feeConfig);/*** @notice Returns data belonging to a certain timepoint* @param index The index of timepoint in the array* @dev There is more convenient function to fetch a timepoint: getTimepoints(). Which requires not an index but seconds* @return initialized Whether the timepoint has been initialized and the values are safe to use,* blockTimestamp The timestamp of the observation,* tickCumulative The tick multiplied by seconds elapsed for the life of the pool as of the timepoint timestamp,* secondsPerLiquidityCumulative The seconds per in range liquidity for the life of the pool as of the timepoint timestamp,* volatilityCumulative Cumulative standard deviation for the life of the pool as of the timepoint timestamp,* averageTick Time-weighted average tick,* volumePerLiquidityCumulative Cumulative swap volume per liquidity for the life of the pool as of the timepoint timestamp*/function timepoints(uint256 index)externalviewreturns (bool initialized,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Minimal ERC20 interface for Algebra/// @notice Contains a subset of the full ERC20 interface that is used in Algebra/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/tree/main/contracts/interfacesinterface IERC20Minimal {/// @notice Returns the balance of a token/// @param account The account for which to look up the number of tokens it has, i.e. its balance/// @return The number of tokens held by the accountfunction balanceOf(address account) external view returns (uint256);/// @notice Transfers the amount of token from the `msg.sender` to the recipient/// @param recipient The account that will receive the amount transferred/// @param amount The number of tokens to send from the sender to the recipient/// @return Returns true for a successful transfer, false for an unsuccessful transferfunction transfer(address recipient, uint256 amount) external returns (bool);/// @notice Returns the current allowance given to a spender by an owner/// @param owner The account of the token owner/// @param spender The account of the token spender/// @return The current allowance granted by `owner` to `spender`function allowance(address owner, address spender) external view returns (uint256);/// @notice Sets the allowance of a spender from the `msg.sender` to the value `amount`
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Permissionless pool actions/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/tree/main/contracts/interfacesinterface IAlgebraPoolActions {/*** @notice Sets the initial price for the pool* @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value* @param price the initial sqrt price of the pool as a Q64.96*/function initialize(uint160 price) external;/*** @notice Adds liquidity for the given recipient/bottomTick/topTick position* @dev The caller of this method receives a callback in the form of IAlgebraMintCallback# AlgebraMintCallback* in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends* on bottomTick, topTick, the amount of liquidity, and the current price.* @param sender The address which will receive potential surplus of paid tokens* @param recipient The address for which the liquidity will be created* @param bottomTick The lower tick of the position in which to add liquidity* @param topTick The upper tick of the position in which to add liquidity* @param amount The desired amount of liquidity to mint* @param data Any data that should be passed through to the callback* @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/*** @title Pool state that is not stored* @notice Contains view functions to provide information about the pool that is computed rather than stored on the* blockchain. The functions here may have variable gas costs.* @dev Credit to Uniswap Labs under GPL-2.0-or-later license:* https://github.com/Uniswap/v3-core/tree/main/contracts/interfaces*/interface IAlgebraPoolDerivedState {/*** @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp* @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing* the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,* you must call it with secondsAgos = [3600, 0].* @dev The time weighted average tick represents the geometric time weighted average price of the pool, in* log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.* @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned* @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp* @return secondsPerLiquidityCumulatives Cumulative seconds per liquidity-in-range value as of each `secondsAgos`* from the current block timestamp* @return volatilityCumulatives Cumulative standard deviation as of each `secondsAgos`* @return volumePerAvgLiquiditys Cumulative swap volume per liquidity as of each `secondsAgos`*/function getTimepoints(uint32[] calldata secondsAgos)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Events emitted by a pool/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/tree/main/contracts/interfacesinterface IAlgebraPoolEvents {/*** @notice Emitted exactly once by a pool when #initialize is first called on the pool* @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize* @param price The initial sqrt price of the pool, as a Q64.96* @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool*/event Initialize(uint160 price, int24 tick);/*** @notice Emitted when liquidity is minted for a given position* @param sender The address that minted the liquidity* @param owner The owner of the position and recipient of any minted liquidity* @param bottomTick The lower tick of the position* @param topTick The upper tick of the position* @param liquidityAmount The amount of liquidity minted to the position range* @param amount0 How much token0 was required for the minted liquidity* @param amount1 How much token1 was required for the minted liquidity*/event Mint(
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;import '../IDataStorageOperator.sol';/// @title Pool state that never changes/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/tree/main/contracts/interfacesinterface IAlgebraPoolImmutables {/*** @notice The contract that stores all the timepoints and can perform actions with them* @return The operator address*/function dataStorageOperator() external view returns (address);/*** @notice The contract that deployed the pool, which must adhere to the IAlgebraFactory 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);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/*** @title Permissioned pool actions* @notice Contains pool methods that may only be called by the factory owner or tokenomics* @dev Credit to Uniswap Labs under GPL-2.0-or-later license:* https://github.com/Uniswap/v3-core/tree/main/contracts/interfaces*/interface IAlgebraPoolPermissionedActions {/*** @notice Set the community's % share of the fees. Cannot exceed 25% (250)* @param communityFee0 new community fee percent for token0 of the pool in thousandths (1e-3)* @param communityFee1 new community fee percent for token1 of the pool in thousandths (1e-3)*/function setCommunityFee(uint8 communityFee0, uint8 communityFee1) external;/// @notice Set the new tick spacing values. Only factory owner/// @param newTickSpacing The new tick spacing valuefunction setTickSpacing(int24 newTickSpacing) external;/*** @notice Sets an active incentive* @param virtualPoolAddress The address of a virtual pool associated with the incentive*/function setIncentive(address virtualPoolAddress) external;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Pool state that can change/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/tree/main/contracts/interfacesinterface IAlgebraPoolState {/*** @notice The globalState structure in the pool stores many values but requires only one slot* and is exposed as a single method to save gas when accessed externally.* @return price The current price of the pool as a sqrt(token1/token0) Q64.96 value;* Returns tick The current tick of the pool, i.e. according to the last tick transition that was run;* Returns This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(price) if the price is on a tick* boundary;* Returns feeZto The last pool fee value for ZtO swaps in hundredths of a bip, i.e. 1e-6;* Returns feeOtz The last pool fee value for OtZ swaps in hundredths of a bip, i.e. 1e-6;* Returns timepointIndex The index of the last written timepoint;* Returns communityFeeToken0 The community fee percentage of the swap fee in thousandths (1e-3) for token0;* Returns communityFeeToken1 The community fee percentage of the swap fee in thousandths (1e-3) for token1;* Returns unlocked Whether the pool is currently locked to reentrancy;*/function globalState()externalviewreturns (uint160 price,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.7.6;import './Constants.sol';/// @title AdaptiveFee/// @notice Calculates fee based on combination of sigmoidslibrary AdaptiveFee {// alpha1 + alpha2 + baseFee must be <= type(uint16).maxstruct Configuration {uint16 alpha1; // max value of the first sigmoiduint16 alpha2; // max value of the second sigmoiduint32 beta1; // shift along the x-axis for the first sigmoiduint32 beta2; // shift along the x-axis for the second sigmoiduint16 gamma1; // horizontal stretch factor for the first sigmoiduint16 gamma2; // horizontal stretch factor for the second sigmoiduint32 volumeBeta; // shift along the x-axis for the outer volume-sigmoiduint16 volumeGamma; // horizontal stretch factor the outer volume-sigmoiduint16 baseFee; // minimum possible fee}/// @notice Calculates fee based on formula:/// baseFee + sigmoidVolume(sigmoid1(volatility, volumePerLiquidity) + sigmoid2(volatility, volumePerLiquidity))/// maximum value capped by baseFee + alpha1 + alpha2function getFee(uint88 volatility,
123456789101112131415161718// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity =0.7.6;library Constants {uint8 internal constant RESOLUTION = 96;uint256 internal constant Q96 = 0x1000000000000000000000000;uint256 internal constant Q128 = 0x100000000000000000000000000000000;// fee value in hundredths of a bip, i.e. 1e-6uint16 internal constant BASE_FEE = 100;int24 internal constant MAX_TICK_SPACING = 500;// max(uint128) / (MAX_TICK - MIN_TICK)uint128 internal constant MAX_LIQUIDITY_PER_TICK = 191757638537527648490752896198553;uint32 internal constant MAX_LIQUIDITY_COOLDOWN = 1 days;uint8 internal constant MAX_COMMUNITY_FEE = 250;uint256 internal constant COMMUNITY_FEE_DENOMINATOR = 1000;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0;/// @title Contains 512-bit math functions/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision/// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bitslibrary FullMath {/// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0/// @param a The multiplicand/// @param b The multiplier/// @param denominator The divisor/// @return result The 256-bit result/// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldivfunction mulDiv(uint256 a,uint256 b,uint256 denominator) internal pure returns (uint256 result) {// 512-bit multiply [prod1 prod0] = a * b// Compute the product mod 2**256 and mod 2**256 - 1// then use the Chinese Remainder Theorem to reconstruct// the 512 bit result. The result is stored in two 256// variables such that product = prod1 * 2**256 + prod0uint256 prod0 = a * b; // Least significant 256 bits of the productuint256 prod1; // Most significant 256 bits of the productassembly {
12345678910111213141516171819// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Math library for liquidity/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/blob/main/contracts/librarieslibrary LiquidityMath {/// @notice Add a signed liquidity delta to liquidity and revert if it overflows or underflows/// @param x The liquidity before change/// @param y The delta by which liquidity should be changed/// @return z The liquidity deltafunction addDelta(uint128 x, int128 y) internal pure returns (uint128 z) {if (y < 0) {require((z = x - uint128(-y)) < x, 'LS');} else {require((z = x + uint128(y)) >= x, 'LA');}}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.7.0;/// @title Optimized overflow and underflow safe math operations/// @notice Contains methods for doing math operations that revert on overflow or underflow for minimal gas cost/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/blob/main/contracts/librarieslibrary LowGasSafeMath {/// @notice Returns x + y, reverts if sum overflows uint256/// @param x The augend/// @param y The addend/// @return z The sum of x and yfunction add(uint256 x, uint256 y) internal pure returns (uint256 z) {require((z = x + y) >= x);}/// @notice Returns x - y, reverts if underflows/// @param x The minuend/// @param y The subtrahend/// @return z The difference of x and yfunction sub(uint256 x, uint256 y) internal pure returns (uint256 z) {require((z = x - y) <= x);}/// @notice Returns x * y, reverts if overflows/// @param x The multiplicand
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.7.6;import './FullMath.sol';import './TokenDeltaMath.sol';/// @title Computes the result of price movement/// @notice Contains methods for computing the result of price movement within a single tick price range.library PriceMovementMath {using LowGasSafeMath for uint256;using SafeCast for uint256;/// @notice Gets the next sqrt price given an input amount of token0 or token1/// @dev Throws if price or liquidity are 0, or if the next price is out of bounds/// @param price The starting Q64.96 sqrt price, i.e., before accounting for the input amount/// @param liquidity The amount of usable liquidity/// @param input How much of token0, or token1, is being swapped in/// @param zeroToOne Whether the amount in is token0 or token1/// @return resultPrice The Q64.96 sqrt price after adding the input amount to token0 or token1function getNewPriceAfterInput(uint160 price,uint128 liquidity,uint256 input,bool zeroToOne) internal pure returns (uint160 resultPrice) {return getNewPrice(price, liquidity, input, zeroToOne, true);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Safe casting methods/// @notice Contains methods for safely casting between types/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/blob/main/contracts/librarieslibrary SafeCast {/// @notice Cast a uint256 to a uint160, revert on overflow/// @param y The uint256 to be downcasted/// @return z The downcasted integer, now type uint160function toUint160(uint256 y) internal pure returns (uint160 z) {require((z = uint160(y)) == y);}/// @notice Cast a int256 to a int128, revert on overflow or underflow/// @param y The int256 to be downcasted/// @return z The downcasted integer, now type int128function toInt128(int256 y) internal pure returns (int128 z) {require((z = int128(y)) == y);}/// @notice Cast a uint256 to a int256, revert on overflow/// @param y The uint256 to be casted/// @return z The casted integer, now type int256function toInt256(uint256 y) internal pure returns (int256 z) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.7.6;import './LowGasSafeMath.sol';import './SafeCast.sol';import './LiquidityMath.sol';import './Constants.sol';/// @title TickManager/// @notice Contains functions for managing tick processes and relevant calculationslibrary TickManager {using LowGasSafeMath for int256;using SafeCast for int256;// info stored for each initialized individual tickstruct Tick {uint128 liquidityTotal; // the total position liquidity that references this tickint128 liquidityDelta; // amount of net liquidity added (subtracted) when tick is crossed left-right (right-left),// fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)// only has relative meaning, not absolute — the value depends on when the tick is initializeduint256 outerFeeGrowth0Token;uint256 outerFeeGrowth1Token;int56 outerTickCumulative; // the cumulative tick value on the other side of the tickuint160 outerSecondsPerLiquidity; // the seconds per unit of liquidity on the _other_ side of current tick, (relative meaning)uint32 outerSecondsSpent; // the seconds spent on the other side of the current tick, only has relative meaning
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Math library for computing sqrt prices from ticks and vice versa/// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports/// prices between 2**-128 and 2**128/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/blob/main/contracts/librarieslibrary TickMath {/// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128int24 internal constant MIN_TICK = -887272;/// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128int24 internal constant MAX_TICK = -MIN_TICK;/// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)uint160 internal constant MIN_SQRT_RATIO = 4295128739;/// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;/// @notice Calculates sqrt(1.0001^tick) * 2^96/// @dev Throws if |tick| > max tick/// @param tick The input tick for the above formula/// @return price A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0)/// at the given tickfunction getSqrtRatioAtTick(int24 tick) internal pure returns (uint160 price) {// get abs value
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.7.6;import './TickMath.sol';/// @title Packed tick initialized state library/// @notice Stores a packed mapping of tick index to its initialized state/// @dev The mapping uses int16 for keys since ticks are represented as int24 and there are 256 (2^8) values per word.library TickTable {/// @notice Toggles the initialized state for a given tick from false to true, or vice versa/// @param self The mapping in which to toggle the tick/// @param tick The tick to togglefunction toggleTick(mapping(int16 => uint256) storage self, int24 tick) internal {int16 rowNumber;uint8 bitNumber;assembly {bitNumber := and(tick, 0xFF)rowNumber := shr(8, tick)}self[rowNumber] ^= 1 << bitNumber;}/// @notice get position of single 1-bit/// @dev it is assumed that word contains exactly one 1-bit, otherwise the result will be incorrect/// @param word The word containing only one 1-bit
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.7.6;import './LowGasSafeMath.sol';import './SafeCast.sol';import './FullMath.sol';import './Constants.sol';/// @title Functions based on Q64.96 sqrt price and liquidity/// @notice Contains the math that uses square root of price as a Q64.96 and liquidity to compute deltaslibrary TokenDeltaMath {using LowGasSafeMath for uint256;using SafeCast for uint256;/// @notice Gets the token0 delta between two prices/// @dev Calculates liquidity / sqrt(lower) - liquidity / sqrt(upper)/// @param priceLower A Q64.96 sqrt price/// @param priceUpper Another Q64.96 sqrt price/// @param liquidity The amount of usable liquidity/// @param roundUp Whether to round the amount up or down/// @return token0Delta Amount of token0 required to cover a position of size liquidity between the two passed pricesfunction getToken0Delta(uint160 priceLower,uint160 priceUpper,uint128 liquidity,
123456789101112131415161718192021222324// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.6.0;import '../interfaces/IERC20Minimal.sol';/// @title TransferHelper/// @notice Contains helper methods for interacting with ERC20 tokens that do not consistently return true/false/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/blob/main/contracts/librarieslibrary TransferHelper {/// @notice Transfers tokens from msg.sender to a recipient/// @dev Calls transfer on token contract, errors with TF if transfer fails/// @param token The contract address of the token which will be transferred/// @param to The recipient of the transfer/// @param value The value of the transferfunction safeTransfer(address token,address to,uint256 value) internal {(bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20Minimal.transfer.selector, to, value));require(success && (data.length == 0 || abi.decode(data, (bool))), 'TF');}}
1234567891011121314151617181920212223{"optimizer": {"enabled": true,"runs": 0},"metadata": {"bytecodeHash": "none","useLiteralContent": true},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"]}},"libraries": {}}
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"int24","name":"bottomTick","type":"int24"},{"indexed":true,"internalType":"int24","name":"topTick","type":"int24"},{"indexed":false,"internalType":"uint128","name":"liquidityAmount","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"int24","name":"bottomTick","type":"int24"},{"indexed":true,"internalType":"int24","name":"topTick","type":"int24"},{"indexed":false,"internalType":"uint128","name":"amount0","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"amount1","type":"uint128"}],"name":"Collect","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"communityFee0New","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"communityFee1New","type":"uint8"}],"name":"CommunityFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"feeZto","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"feeOtz","type":"uint16"}],"name":"Fee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paid0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paid1","type":"uint256"}],"name":"Flash","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"virtualPoolAddress","type":"address"}],"name":"Incentive","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint160","name":"price","type":"uint160"},{"indexed":false,"internalType":"int24","name":"tick","type":"int24"}],"name":"Initialize","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"liquidityCooldown","type":"uint32"}],"name":"LiquidityCooldown","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"int24","name":"bottomTick","type":"int24"},{"indexed":true,"internalType":"int24","name":"topTick","type":"int24"},{"indexed":false,"internalType":"uint128","name":"liquidityAmount","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"int256","name":"amount0","type":"int256"},{"indexed":false,"internalType":"int256","name":"amount1","type":"int256"},{"indexed":false,"internalType":"uint160","name":"price","type":"uint160"},{"indexed":false,"internalType":"uint128","name":"liquidity","type":"uint128"},{"indexed":false,"internalType":"int24","name":"tick","type":"int24"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"int24","name":"newTickSpacing","type":"int24"}],"name":"TickSpacing","type":"event"},{"inputs":[],"name":"activeIncentive","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int24","name":"bottomTick","type":"int24"},{"internalType":"int24","name":"topTick","type":"int24"},{"internalType":"uint128","name":"amount","type":"uint128"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"int24","name":"bottomTick","type":"int24"},{"internalType":"int24","name":"topTick","type":"int24"},{"internalType":"uint128","name":"amount0Requested","type":"uint128"},{"internalType":"uint128","name":"amount1Requested","type":"uint128"}],"name":"collect","outputs":[{"internalType":"uint128","name":"amount0","type":"uint128"},{"internalType":"uint128","name":"amount1","type":"uint128"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dataStorageOperator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"flash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int24","name":"bottomTick","type":"int24"},{"internalType":"int24","name":"topTick","type":"int24"}],"name":"getInnerCumulatives","outputs":[{"internalType":"int56","name":"innerTickCumulative","type":"int56"},{"internalType":"uint160","name":"innerSecondsSpentPerLiquidity","type":"uint160"},{"internalType":"uint32","name":"innerSecondsSpent","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32[]","name":"secondsAgos","type":"uint32[]"}],"name":"getTimepoints","outputs":[{"internalType":"int56[]","name":"tickCumulatives","type":"int56[]"},{"internalType":"uint160[]","name":"secondsPerLiquidityCumulatives","type":"uint160[]"},{"internalType":"uint112[]","name":"volatilityCumulatives","type":"uint112[]"},{"internalType":"uint256[]","name":"volumePerAvgLiquiditys","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"globalState","outputs":[{"internalType":"uint160","name":"price","type":"uint160"},{"internalType":"int24","name":"tick","type":"int24"},{"internalType":"uint16","name":"feeZto","type":"uint16"},{"internalType":"uint16","name":"feeOtz","type":"uint16"},{"internalType":"uint16","name":"timepointIndex","type":"uint16"},{"internalType":"uint8","name":"communityFeeToken0","type":"uint8"},{"internalType":"uint8","name":"communityFeeToken1","type":"uint8"},{"internalType":"bool","name":"unlocked","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint160","name":"initialPrice","type":"uint160"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"liquidity","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityCooldown","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLiquidityPerTick","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"int24","name":"bottomTick","type":"int24"},{"internalType":"int24","name":"topTick","type":"int24"},{"internalType":"uint128","name":"liquidityDesired","type":"uint128"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mint","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"uint128","name":"liquidityActual","type":"uint128"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"positions","outputs":[{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint32","name":"lastLiquidityAddTimestamp","type":"uint32"},{"internalType":"uint256","name":"innerFeeGrowth0Token","type":"uint256"},{"internalType":"uint256","name":"innerFeeGrowth1Token","type":"uint256"},{"internalType":"uint128","name":"fees0","type":"uint128"},{"internalType":"uint128","name":"fees1","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"communityFee0","type":"uint8"},{"internalType":"uint8","name":"communityFee1","type":"uint8"}],"name":"setCommunityFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"virtualPoolAddress","type":"address"}],"name":"setIncentive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"newLiquidityCooldown","type":"uint32"}],"name":"setLiquidityCooldown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int24","name":"newTickSpacing","type":"int24"}],"name":"setTickSpacing","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bool","name":"zeroToOne","type":"bool"},{"internalType":"int256","name":"amountRequired","type":"int256"},{"internalType":"uint160","name":"limitSqrtPrice","type":"uint160"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[{"internalType":"int256","name":"amount0","type":"int256"},{"internalType":"int256","name":"amount1","type":"int256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bool","name":"zeroToOne","type":"bool"},{"internalType":"int256","name":"amountRequired","type":"int256"},{"internalType":"uint160","name":"limitSqrtPrice","type":"uint160"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swapSupportingFeeOnInputTokens","outputs":[{"internalType":"int256","name":"amount0","type":"int256"},{"internalType":"int256","name":"amount1","type":"int256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tickSpacing","outputs":[{"internalType":"int24","name":"","type":"int24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int16","name":"","type":"int16"}],"name":"tickTable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int24","name":"","type":"int24"}],"name":"ticks","outputs":[{"internalType":"uint128","name":"liquidityTotal","type":"uint128"},{"internalType":"int128","name":"liquidityDelta","type":"int128"},{"internalType":"uint256","name":"outerFeeGrowth0Token","type":"uint256"},{"internalType":"uint256","name":"outerFeeGrowth1Token","type":"uint256"},{"internalType":"int56","name":"outerTickCumulative","type":"int56"},{"internalType":"uint160","name":"outerSecondsPerLiquidity","type":"uint160"},{"internalType":"uint32","name":"outerSecondsSpent","type":"uint32"},{"internalType":"bool","name":"initialized","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"timepoints","outputs":[{"internalType":"bool","name":"initialized","type":"bool"},{"internalType":"uint32","name":"blockTimestamp","type":"uint32"},{"internalType":"int56","name":"tickCumulative","type":"int56"},{"internalType":"uint160","name":"secondsPerLiquidityCumulative","type":"uint160"},{"internalType":"uint88","name":"volatilityCumulative","type":"uint88"},{"internalType":"int24","name":"averageTick","type":"int24"},{"internalType":"uint144","name":"volumePerLiquidityCumulative","type":"uint144"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalFeeGrowth0Token","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalFeeGrowth1Token","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061015f5760003560e01c80630dfe168114610164578063128acb081461018857806317e25b3c146102355780631a68650214610256578063289fe9b01461027a57806329047dfa1461029f578063490e6cbc146102a75780634f1eb3d814610331578063514ea4bf146103b15780636378ae441461041657806370cf754a14610430578063713346941461043857806374eceae6146104d55780637c0112b7146105515780637c1fe0c814610579578063920c34e51461059f5780639d3a5241146105fa578063a34123a71461078b578063aafe29c0146107c5578063c45a015514610897578063c677e3e01461089f578063d0c93a7c146108bf578063d21220a7146108de578063e76c01e4146108e6578063ecdecf421461094a578063f085a61014610952578063f30dba9314610972578063f637731d146109f4578063facb0eb114610a1a575b600080fd5b61016c610a22565b604080516001600160a01b039092168252519081900360200190f35b61021c600480360360a081101561019e57600080fd5b6001600160a01b0382358116926020810135151592604082013592606083013516919081019060a081016080820135600160201b8111156101de57600080fd5b8201836020820111156101f057600080fd5b803590602001918460018302840111600160201b8311171561021157600080fd5b509092509050610a46565b6040805192835260208301919091528051918290030190f35b61023d610c84565b6040805163ffffffff9092168252519081900360200190f35b61025e610c90565b604080516001600160801b039092168252519081900360200190f35b61029d6004803603602081101561029057600080fd5b503563ffffffff16610c9f565b005b61016c610db3565b61029d600480360360808110156102bd57600080fd5b6001600160a01b038235169160208101359160408201359190810190608081016060820135600160201b8111156102f357600080fd5b82018360208201111561030557600080fd5b803590602001918460018302840111600160201b8311171561032657600080fd5b509092509050610dd7565b610382600480360360a081101561034757600080fd5b506001600160a01b03813516906020810135600290810b91604081013590910b906001600160801b036060820135811691608001351661124f565b60405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390f35b6103ce600480360360208110156103c757600080fd5b503561144d565b604080516001600160801b03978816815263ffffffff90961660208701528581019490945260608501929092528416608084015290921660a082015290519081900360c00190f35b61041e611496565b60408051918252519081900360200190f35b61025e61149c565b61021c600480360360c081101561044e57600080fd5b6001600160a01b0382358116926020810135821692604082013515159260608301359260808101359091169181019060c0810160a0820135600160201b81111561049757600080fd5b8201836020820111156104a957600080fd5b803590602001918460018302840111600160201b831117156104ca57600080fd5b5090925090506114ae565b6104f2600480360360208110156104eb57600080fd5b50356117b0565b60408051971515885263ffffffff909616602088015260069490940b868601526001600160a01b0390921660608601526001600160581b0316608085015260020b60a08401526001600160901b031660c0830152519081900360e00190f35b61029d6004803603604081101561056757600080fd5b5060ff81358116916020013516611881565b61029d6004803603602081101561058f57600080fd5b50356001600160a01b0316611a1c565b6105c9600480360360408110156105b557600080fd5b508035600290810b9160200135900b611b0b565b6040805160069490940b84526001600160a01b03909216602084015263ffffffff1682820152519081900360600190f35b6106686004803603602081101561061057600080fd5b810190602081018135600160201b81111561062a57600080fd5b82018360208201111561063c57600080fd5b803590602001918460208302840111600160201b8311171561065d57600080fd5b509092509050611dc2565b6040518080602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b838110156106b457818101518382015260200161069c565b50505050905001858103845288818151815260200191508051906020019060200280838360005b838110156106f35781810151838201526020016106db565b50505050905001858103835287818151815260200191508051906020019060200280838360005b8381101561073257818101518382015260200161071a565b50505050905001858103825286818151815260200191508051906020019060200280838360005b83811015610771578181015183820152602001610759565b505050509050019850505050505050505060405180910390f35b61021c600480360360608110156107a157600080fd5b508035600290810b91602081013590910b90604001356001600160801b0316612127565b610870600480360360c08110156107db57600080fd5b6001600160a01b0382358116926020810135909116916040820135600290810b92606081013590910b916001600160801b03608083013516919081019060c0810160a0820135600160201b81111561083257600080fd5b82018360208201111561084457600080fd5b803590602001918460018302840111600160201b8311171561086557600080fd5b509092509050612367565b6040805193845260208401929092526001600160801b031682820152519081900360600190f35b61016c61293d565b61041e600480360360208110156108b557600080fd5b503560010b612961565b6108c7612973565b6040805160029290920b8252519081900360200190f35b61016c612983565b6108ee6129a7565b604080516001600160a01b03909916895260029790970b602089015261ffff95861688880152938516606088015291909316608086015260ff92831660a086015290911660c0840152151560e083015251908190036101000190f35b61041e612a02565b61029d6004803603602081101561096857600080fd5b503560020b612a08565b6109926004803603602081101561098857600080fd5b503560020b612bed565b604080516001600160801b039099168952600f9790970b602089015287870195909552606087019390935260069190910b60808601526001600160a01b031660a085015263ffffffff1660c0840152151560e083015251908190036101000190f35b61029d60048036036020811015610a0a57600080fd5b50356001600160a01b0316612c57565b61016c612ec5565b7f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b55781565b600080600080600080610a5a8b8b8b612edb565b949a509298509096509450925090508a15610b0f576000851215610aa657610aa67f0000000000000000000000005ae062c25330a7d3ff46d361d0a2dde93d81d2c18d876000036137ed565b6000610ab061393b565b9050610abe87878b8b6139db565b610ac661393b565b610ad08289613a7b565b1115610b09576040805162461bcd60e51b815260206004820152600360248201526249494160e81b604482015290519081900360640190fd5b50610bab565b6000861215610b4657610b467f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5578d886000036137ed565b6000610b50613a91565b9050610b5e87878b8b6139db565b610b66613a91565b610b708288613a7b565b1115610ba9576040805162461bcd60e51b815260206004820152600360248201526249494160e81b604482015290519081900360640190fd5b505b8015610c0757610c078b610bdf577f0000000000000000000000005ae062c25330a7d3ff46d361d0a2dde93d81d2c1610c01565b7f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5575b82613b00565b60408051878152602081018790526001600160a01b03868116828401526001600160801b0385166060830152600286900b60808301529151918e16913391600080516020615875833981519152919081900360a00190a35050600280546001600160f81b0316600160f81b17905550919890975095505050505050565b60045463ffffffff1681565b6003546001600160801b031681565b7f00000000000000000000000010aa510d94e094bd643677bd2964c3ee085daffc6001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cf857600080fd5b505afa158015610d0c573d6000803e3d6000fd5b505050506040513d6020811015610d2257600080fd5b50516001600160a01b03163314610d3857600080fd5b6201518063ffffffff821611801590610d5c575060045463ffffffff828116911614155b610d6557600080fd5b6004805463ffffffff831663ffffffff19909116811790915560408051918252517fb5e51602371b0e74f991b6e965cd7d32b4b14c7e6ede6d1298037650a0e1405f9181900360200190a150565b7f0000000000000000000000008826ad54c46f66662b05a3052a3e62c3a9c5920b81565b600254600160f81b900460ff16610e1b576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b600280546001600160f81b031690556003546001600160801b031680610e6c576040805162461bcd60e51b81526020600482015260016024820152601360fa1b604482015290519081900360640190fd5b6064600080610e7961393b565b90508715610ec057610e93888461ffff16620f4240613b99565b9150610ec07f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5578a8a6137ed565b600080610ecb613a91565b90508815610f1257610ee5898661ffff16620f4240613b99565b9150610f127f0000000000000000000000005ae062c25330a7d3ff46d361d0a2dde93d81d2c18c8b6137ed565b336001600160a01b031663a60b0d3c85848b8b6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015610f9457600080fd5b505af1158015610fa8573d6000803e3d6000fd5b5050505060007f00000000000000000000000010aa510d94e094bd643677bd2964c3ee085daffc6001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b15801561100757600080fd5b505afa15801561101b573d6000803e3d6000fd5b505050506040513d602081101561103157600080fd5b50519050600061103f61393b565b90508061104c8688613a7b565b1115611084576040805162461bcd60e51b8152602060048201526002602482015261046360f41b604482015290519081900360640190fd5b84900380156110fe57600254600160e81b900460ff16600081156110d857506103e860ff82168302046110d87f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b55785836137ed565b6110f2818403600160801b8c6001600160801b0316613c0e565b60008054909101905550505b6000611108613a91565b9050806111158587613a7b565b111561114d576040805162461bcd60e51b8152602060048201526002602482015261463160f01b604482015290519081900360640190fd5b83900380156111c757600254600160f01b900460ff16600081156111a157506103e860ff82168302046111a17f0000000000000000000000005ae062c25330a7d3ff46d361d0a2dde93d81d2c186836137ed565b6111bb818403600160801b8d6001600160801b0316613c0e565b60018054909101905550505b8d6001600160a01b0316336001600160a01b03167fbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca6338f8f86866040518085815260200184815260200183815260200182815260200194505050505060405180910390a35050600280546001600160f81b0316600160f81b179055505050505050505050505050565b6002546000908190600160f81b900460ff16611298576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b600280546001600160f81b0316905560006112b4338888613ca4565b60038101549091506001600160801b0380821691600160801b9004811690871682106112e057866112e2565b815b9450806001600160801b0316866001600160801b0316116113035785611305565b805b93506001600160801b0385851716156113c9576003830180546001600160801b0319168684036001600160801b03908116919091178116600160801b87850383160217909155851615611386576113867f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5578b876001600160801b03166137ed565b6001600160801b038416156113c9576113c97f0000000000000000000000005ae062c25330a7d3ff46d361d0a2dde93d81d2c18b866001600160801b03166137ed565b604080516001600160a01b038c1681526001600160801b038088166020830152861681830152905160028a810b92908c900b9133917f70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0919081900360600190a45050600280546001600160f81b0316600160f81b1790555090969095509350505050565b60076020526000908152604090208054600182015460028301546003909301546001600160801b038084169463ffffffff600160801b9586900416949092808316929190041686565b60005481565b6d09745258e83de0d0f4e400fce79990565b6002546000908190600160f81b900460ff166114f7576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b600280546001600160f81b03169055861561157a57600061151661393b565b905061152587600087876139db565b60006115398261153361393b565b90613cc8565b97508713611574576040805162461bcd60e51b815260206004820152600360248201526249494160e81b604482015290519081900360640190fd5b506115de565b6000611584613a91565b905061159360008887876139db565b60006115a182611533613a91565b975087136115dc576040805162461bcd60e51b815260206004820152600360248201526249494160e81b604482015290519081900360640190fd5b505b600280546001600160f81b0316600160f81b17905560008080806116038b8b8b612edb565b949a509298509096509450925090508a1561169057600085121561164f5761164f7f0000000000000000000000005ae062c25330a7d3ff46d361d0a2dde93d81d2c18d876000036137ed565b8986121561168b5761168b7f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5578e6116868d8a613cd8565b6137ed565b6116fe565b60008612156116c7576116c77f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5578d886000036137ed565b898512156116fe576116fe7f0000000000000000000000005ae062c25330a7d3ff46d361d0a2dde93d81d2c18e6116868d89613cd8565b8015611732576117328b610bdf577f0000000000000000000000005ae062c25330a7d3ff46d361d0a2dde93d81d2c1610c01565b60408051878152602081018790526001600160a01b03868116828401526001600160801b0385166060830152600286900b60808301529151918e16913391600080516020615875833981519152919081900360a00190a35050600280546001600160f81b0316600160f81b1790555091999098509650505050505050565b60008060008060008060007f0000000000000000000000008826ad54c46f66662b05a3052a3e62c3a9c5920b6001600160a01b03166374eceae6896040518263ffffffff1660e01b81526004018082815260200191505060e06040518083038186803b15801561181f57600080fd5b505afa158015611833573d6000803e3d6000fd5b505050506040513d60e081101561184957600080fd5b508051602082015160408301516060840151608085015160a086015160c090960151949e939d50919b50995097509195509350915050565b600254600160f81b900460ff166118c5576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b600280546001600160f81b0316905560408051638da5cb5b60e01b815290516001600160a01b037f00000000000000000000000010aa510d94e094bd643677bd2964c3ee085daffc1691638da5cb5b916004808301926020929190829003018186803b15801561193457600080fd5b505afa158015611948573d6000803e3d6000fd5b505050506040513d602081101561195e57600080fd5b50516001600160a01b0316331461197457600080fd5b60fa60ff83161180159061198c575060fa60ff821611155b61199557600080fd5b6002805460ff60f01b1916600160f01b60ff8481169182029290921760ff60e81b1916600160e81b9286169283021790925560408051918252602082019290925281517f9e22b964b08e25c3aaa72102bb0071c089258fb82d51271a8ddf5c24921356ee929181900390910190a15050600280546001600160f81b0316600160f81b179055565b7f00000000000000000000000010aa510d94e094bd643677bd2964c3ee085daffc6001600160a01b0316638a2ade586040518163ffffffff1660e01b815260040160206040518083038186803b158015611a7557600080fd5b505afa158015611a89573d6000803e3d6000fd5b505050506040513d6020811015611a9f57600080fd5b50516001600160a01b03163314611ab557600080fd5b60048054600160201b600160c01b031916600160201b6001600160a01b038416908102919091179091556040517f915c5369e6580733735d1c2e30ca20dcaa395697a041033c9f35f80f53525e8490600090a250565b600080808484620d89e9600282900b12611b52576040805162461bcd60e51b815260206004820152600360248201526254554d60e81b604482015290519081900360640190fd5b8160020b8160020b13611b92576040805162461bcd60e51b8152602060048201526003602482015262544c5560e81b604482015290519081900360640190fd5b620d89e819600283900b13611bd4576040805162461bcd60e51b8152602060048201526003602482015262544c4d60e81b604482015290519081900360640190fd5b611bdc6157a5565b600288810b900b6000908152600560209081526040918290206003810154600160d81b810463ffffffff1693850193909352600160381b83046001600160a01b031691840191909152600682810b810b900b835290600160f81b900460ff16611c4457600080fd5b50611c4d6157a5565b600288810b900b6000908152600560209081526040918290206003810154600160d81b810463ffffffff1693850193909352600160381b83046001600160a01b031691840191909152600682810b810b900b835290600160f81b900460ff16611cb557600080fd5b5060028054600160a01b8104820b91600160d81b90910461ffff16908b810b9083900b1215611d0e5782600001518460000151038360200151856020015103846040015186604001510398509850985050505050611db9565b8960020b8260020b1215611d8d576000611d26613cee565b9050600080611d4e8360008787600360009054906101000a90046001600160801b0316613cf2565b5050915091508560000151876000015183030386602001518860200151830303876040015189604001518603039b509b509b5050505050505050611db9565b836000015183600001510384602001518460200151038560400151856040015103985098509850505050505b50509250925092565b6060806060807f0000000000000000000000008826ad54c46f66662b05a3052a3e62c3a9c5920b6001600160a01b031663fd31e988611dff613cee565b6002805460035460405160e086901b6001600160e01b031916815263ffffffff851660048201908152600160a01b8404850b9485900b6044830152600160d81b90930461ffff16606482018190526001600160801b039092166084820181905260a06024830190815260a483018e90528e958e9590949390919060c401876020880280828437600081840152601f19601f82011690508083019250505097505050505050505060006040518083038186803b158015611ebd57600080fd5b505afa158015611ed1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526080811015611efa57600080fd5b8101908080516040519392919084600160201b821115611f1957600080fd5b908301906020820185811115611f2e57600080fd5b82518660208202830111600160201b82111715611f4a57600080fd5b82525081516020918201928201910280838360005b83811015611f77578181015183820152602001611f5f565b5050505090500160405260200180516040519392919084600160201b821115611f9f57600080fd5b908301906020820185811115611fb457600080fd5b82518660208202830111600160201b82111715611fd057600080fd5b82525081516020918201928201910280838360005b83811015611ffd578181015183820152602001611fe5565b5050505090500160405260200180516040519392919084600160201b82111561202557600080fd5b90830190602082018581111561203a57600080fd5b82518660208202830111600160201b8211171561205657600080fd5b82525081516020918201928201910280838360005b8381101561208357818101518382015260200161206b565b5050505090500160405260200180516040519392919084600160201b8211156120ab57600080fd5b9083019060208201858111156120c057600080fd5b82518660208202830111600160201b821117156120dc57600080fd5b82525081516020918201928201910280838360005b838110156121095781810151838201526020016120f1565b50505050905001604052505050935093509350935092959194509250565b6002546000908190600160f81b900460ff16612170576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b600280546001600160f81b0316815585908590620d89e99082900b126121c3576040805162461bcd60e51b815260206004820152600360248201526254554d60e81b604482015290519081900360640190fd5b8160020b8160020b13612203576040805162461bcd60e51b8152602060048201526003602482015262544c5560e81b604482015290519081900360640190fd5b620d89e819600283900b13612245576040805162461bcd60e51b8152602060048201526003602482015262544c4d60e81b604482015290519081900360640190fd5b600080600061226a338b8b6122628c6001600160801b0316613de2565b600003613df8565b9250925092508160000396508060000395508587176000146122eb57600383015461229e906001600160801b0316886140b7565b60038401546122bd90600160801b90046001600160801b0316886140b7565b6003850180546001600160801b03938416928416600160801b029316929092176001600160801b0319161790555b604080516001600160801b038a16815260208101899052808201889052905160028b810b92908d900b9133917f0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c919081900360600190a45050600280546001600160f81b0316600160f81b179055509296919550909350505050565b60025460009081908190600160f81b900460ff166123b2576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b600280546001600160f81b0316815588908890620d89e99082900b12612405576040805162461bcd60e51b815260206004820152600360248201526254554d60e81b604482015290519081900360640190fd5b8160020b8160020b13612445576040805162461bcd60e51b8152602060048201526003602482015262544c5560e81b604482015290519081900360640190fd5b620d89e819600283900b13612487576040805162461bcd60e51b8152602060048201526003602482015262544c4d60e81b604482015290519081900360640190fd5b6000886001600160801b0316116124ca576040805162461bcd60e51b8152602060048201526002602482015261125360f21b604482015290519081900360640190fd5b600454600160c01b9004600290810b9081810b908b900b816124e857fe5b078160020b8c60020b816124f857fe5b071760020b15612544576040805162461bcd60e51b81526020600482015260126024820152711d1a58dac81a5cc81b9bdd081cdc1858d95960721b604482015290519081900360640190fd5b5060008061257c8c8c61255f8d6001600160801b0316613de2565b60028054600160a01b810490910b906001600160a01b03166140d3565b50909750955060009150819050861561259a5761259761393b565b91505b85156125ab576125a8613a91565b90505b336001600160a01b0316633dd657c588888c8c6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b15801561262d57600080fd5b505af1158015612641573d6000803e3d6000fd5b5050505060008711156126985760008261265961393b565b0392508211612698576040805162461bcd60e51b815260206004808301919091526024820152634949414d60e01b604482015290519081900360640190fd5b85156126e8576000816126a9613a91565b03915081116126e8576040805162461bcd60e51b815260206004808301919091526024820152634949414d60e01b604482015290519081900360640190fd5b8994508682101561270a576127078a6001600160801b03168389613c0e565b94505b8581101561274a5760006127288b6001600160801b03168389613c0e565b9050856001600160801b0316816001600160801b03161015612748578095505b505b6000856001600160801b031611612791576040805162461bcd60e51b8152602060048083019190915260248201526324a4a61960e11b604482015290519081900360640190fd5b6000806127b18f8f8f6127ac8b6001600160801b0316613de2565b613df8565b9250925050838299508911156127f6576040805162461bcd60e51b815260206004820152600560248201526424a4a0a69960d91b604482015290519081900360640190fd5b82819850881115612836576040805162461bcd60e51b815260206004820152600560248201526424a4a0a69960d91b604482015290519081900360640190fd5b50508682111561286d5761286d7f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5578f8985036137ed565b858111156128a2576128a27f0000000000000000000000005ae062c25330a7d3ff46d361d0a2dde93d81d2c18f8884036137ed565b8a60020b8c60020b8e6001600160a01b03167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33898c8c60405180856001600160a01b03168152602001846001600160801b0316815260200183815260200182815260200194505050505060405180910390a45050600280546001600160f81b0316600160f81b17905550929a919950975095505050505050565b7f00000000000000000000000010aa510d94e094bd643677bd2964c3ee085daffc81565b60066020526000908152604090205481565b600454600160c01b900460020b81565b7f0000000000000000000000005ae062c25330a7d3ff46d361d0a2dde93d81d2c181565b600280546001600160a01b03811691600160a01b8204900b9061ffff600160b81b8204811691600160c81b8104821691600160d81b8204169060ff600160e81b8204811691600160f01b8104821691600160f81b9091041688565b60015481565b600254600160f81b900460ff16612a4c576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b600280546001600160f81b0316905560408051638da5cb5b60e01b815290516001600160a01b037f00000000000000000000000010aa510d94e094bd643677bd2964c3ee085daffc1691638da5cb5b916004808301926020929190829003018186803b158015612abb57600080fd5b505afa158015612acf573d6000803e3d6000fd5b505050506040513d6020811015612ae557600080fd5b50516001600160a01b03163314612afb57600080fd5b60008160020b138015612b1457506101f4600282900b13155b8015612b325750600454600282810b600160c01b909204810b900b14155b612b7c576040805162461bcd60e51b8152602060048201526016602482015275496e76616c6964206e65775469636b53706163696e6760501b604482015290519081900360640190fd5b60048054600283900b62ffffff8116600160c01b0262ffffff60c01b199092169190911790915560408051918252517f01413b1d5d4c359e9a0daa7909ecda165f6e8c51fe2ff529d74b22a5a7c026459181900360200190a150600280546001600160f81b0316600160f81b179055565b60056020526000908152604090208054600182015460028301546003909301546001600160801b03831693600160801b909304600f0b9290600681900b90600160381b81046001600160a01b031690600160d81b810463ffffffff1690600160f81b900460ff1688565b6002546001600160a01b031615612c9a576040805162461bcd60e51b8152602060048201526002602482015261414960f01b604482015290519081900360640190fd5b6000612ca58261416b565b905060007f00000000000000000000000010aa510d94e094bd643677bd2964c3ee085daffc6001600160a01b0316632f8a39dd6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d0257600080fd5b505afa158015612d16573d6000803e3d6000fd5b505050506040513d6020811015612d2c57600080fd5b505190506000612d3a613cee565b90507f0000000000000000000000008826ad54c46f66662b05a3052a3e62c3a9c5920b6001600160a01b031663475fb80c82856040518363ffffffff1660e01b8152600401808363ffffffff1681526020018260020b815260200192505050600060405180830381600087803b158015612db357600080fd5b505af1158015612dc7573d6000803e3d6000fd5b5050505083600260000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550816002600001601d6101000a81548160ff021916908360ff160217905550816002600001601e6101000a81548160ff021916908360ff16021790555060016002600001601f6101000a81548160ff02191690831515021790555082600260000160146101000a81548162ffffff021916908360020b62ffffff1602179055507f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95848460405180836001600160a01b031681526020018260020b81526020019250505060405180910390a150505050565b600454600160201b90046001600160a01b031681565b6000806000806000806000612eee6157c5565b600280546001600160a01b0381169750600160a01b9004900b94508a612f2157600254600160c81b900461ffff16612f30565b600254600160b81b900461ffff165b61ffff90811661016083015260028054600160d81b81049092166101a08401526001600160f81b038216905560ff600160e81b8204811691600160f01b8104821691600160f81b9091041680612fb3576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b8c612fea576040805162461bcd60e51b8152602060048201526002602482015261415360f01b604482015290519081900360640190fd5b60008d1361014085015260a084018d90526003546001600160801b03600160801b8204811660208701521696508d1561309257886001600160a01b03168c6001600160a01b031610801561304b57506401000276a36001600160a01b038d16115b613082576040805162461bcd60e51b815260206004820152600360248201526214d41360ea1b604482015290519081900360640190fd5b60005460e0850152828452613112565b886001600160a01b03168c6001600160a01b03161180156130cf575073fffd8963efd1fc6a506488495d951d5263988d266001600160a01b038d16105b613106576040805162461bcd60e51b815260206004820152600360248201526214d41360ea1b604482015290519081900360640190fd5b60015460e08501528184525b600288810b900b610180850152613127613cee565b600454909550600160201b90046001600160a01b03161561323d57600060048054906101000a90046001600160a01b03166001600160a01b0316637f376059876040518263ffffffff1660e01b8152600401808263ffffffff168152602001915050602060405180830381600087803b1580156131a357600080fd5b505af11580156131b7573d6000803e3d6000fd5b505050506040513d60208110156131cd57600080fd5b5051905060008160028111156131df57fe5b14156131fd5760048054600160201b600160c01b031916905561323b565b600181600281111561320b57fe5b141561321e57600161012086015261323b565b600281600281111561322c57fe5b141561323b5760026101208601525b505b600061325a856101a00151878761018001518b8960200151614456565b9050846101a0015161ffff168161ffff16146132bc5761ffff81166101a0860152600060208601528e156132a457613294868a838b61452a565b5061ffff166101608601526132bc565b6132b0868a838b61452a565b61ffff16610160870152505b505050506132c8615836565b6001600160a01b03871681526132e06006878e61466c565b15156040830152600290810b900b602082018190526132fe90614755565b6001600160a01b039081166060830181905261333c918e918a918e16118215151461332d57836060015161332f565b8c5b888f876101600151614a6f565b60c085015260a08401526080830152610140830151909750156133955761336c8160c00151826080015101614c33565b8b039a5061338b6133808260a00151614c33565b60c084015190613cd8565b60c08301526133cd565b6133a28160a00151614c33565b8b019a506133c76133bc8260c00151836080015101614c33565b60c084015190614c49565b60c08301525b81511561340957815160c08201516000916103e8916133eb91614c5f565b816133f257fe5b60c084018051929091049182900390529490940193505b6001600160801b03851615613440576134348160c00151600160801b876001600160801b0316613c0e565b60e08301805190910190525b80606001516001600160a01b0316876001600160a01b03161415613607578060400151156135e85781608001516134c457613489836000846101800151856101a0015189613cf2565b50506001600160a01b03166060840152600690810b900b6040830152600160808301528b6134b9576000546134bd565b6001545b6101008301525b600082610120015160028111156134d757fe5b1461355f5760048054906101000a90046001600160a01b03166001600160a01b03166301342b1982602001518e6040518363ffffffff1660e01b8152600401808360020b8152602001821515815260200192505050600060405180830381600087803b15801561354657600080fd5b505af115801561355a573d6000803e3d6000fd5b505050505b60008c156135a45761359a82602001518460e0015185610100015186606001518760400151896005614c83909695949392919063ffffffff16565b60000390506135da565b6135d782602001518461010001518560e0015186606001518760400151896005614c83909695949392919063ffffffff16565b90505b6135e48682614d37565b9550505b8b6135f7578060200151613600565b60018160200151035b955061362b565b80516001600160a01b0388811691161461362b576136248761416b565b9550613658565b8a15806136495750896001600160a01b0316876001600160a01b0316145b1561365357613658565b6132c8565b81610140015115158c151514613679578160c001518b8360a0015103613686565b8a8260a00151038260c001515b6101a08401516002805461ffff60d81b1916600160d81b61ffff909316929092029190911762ffffff60a01b1916600160a01b62ffffff8b840b1602176001600160a01b0319166001600160a01b038b81169190911790915560408051631b7297f760e11b81526001600160801b038a16600482015260248101859052604481018490529051939c50919a5087927f0000000000000000000000008826ad54c46f66662b05a3052a3e62c3a9c5920b909116916336e52fee916064808301926020929190829003018186803b15801561375e57600080fd5b505afa158015613772573d6000803e3d6000fd5b505050506040513d602081101561378857600080fd5b50516020840151600380546001600160801b03948516929093018416600160801b0293909216929092176001600160801b0319169190911790558b156137d55760e08201516000556137de565b60e08201516001555b50505093975093979195509350565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1781529251825160009485949389169392918291908083835b602083106138695780518252601f19909201916020918201910161384a565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146138cb576040519150601f19603f3d011682016040523d82523d6000602084013e6138d0565b606091505b50915091508180156138fe5750805115806138fe57508080602001905160208110156138fb57600080fd5b50515b613934576040805162461bcd60e51b81526020600482015260026024820152612a2360f11b604482015290519081900360640190fd5b5050505050565b60007f00000000000000000000000048b62137edfa95a428d35c09e44256a739f6b5576001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156139aa57600080fd5b505afa1580156139be573d6000803e3d6000fd5b505050506040513d60208110156139d457600080fd5b5051905090565b336001600160a01b0316632c8958f6858585856040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015613a5d57600080fd5b505af1158015613a71573d6000803e3d6000fd5b5050505050505050565b80820182811015613a8b57600080fd5b92915050565b60007f0000000000000000000000005ae062c25330a7d3ff46d361d0a2dde93d81d2c16001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156139aa57600080fd5b60007f00000000000000000000000010aa510d94e094bd643677bd2964c3ee085daffc6001600160a01b031663430bf08a6040518163ffffffff1660e01b815260040160206040518083038186803b158015613b5b57600080fd5b505afa158015613b6f573d6000803e3d6000fd5b505050506040513d6020811015613b8557600080fd5b50519050613b948382846137ed565b505050565b6000831580613bb457505082820282848281613bb157fe5b04145b15613bd55760008211613bc657600080fd5b81810490829006151501613c07565b613be0848484613c0e565b905060008280613bec57fe5b8486091115613c07576000198110613c0357600080fd5b6001015b9392505050565b60008383028160001985870982811083820303915050808411613c3057600080fd5b80613c4057508290049050613c07565b8385870960008581038616958690049560026003880281188089028203028089028203028089028203028089028203028089028203028089029091030291819003819004600101858411909403939093029190930391909104170290509392505050565b62ffffff9081169116601892831b1790911b17600090815260076020526040902090565b80820382811115613a8b57600080fd5b80820382811315600083121514613a8b57600080fd5b4290565b604080516314c5407960e01b815263ffffffff808816600483015286166024820152600285900b604482015261ffff841660648201526001600160801b038316608482015290516000918291829182916001600160a01b037f0000000000000000000000008826ad54c46f66662b05a3052a3e62c3a9c5920b16916314c540799160a4808301926080929190829003018186803b158015613d9257600080fd5b505afa158015613da6573d6000803e3d6000fd5b505050506040513d6080811015613dbc57600080fd5b50805160208201516040830151606090930151919c909b50919950975095505050505050565b80600f81900b8114613df357600080fd5b919050565b60408051606081018252600280546001600160a01b0381168352600160a01b8104820b90910b6020830152600160d81b900461ffff169181019190915260009081908190613e47888888613ca4565b60008054600154929650919080600f89900b15613f0e576000613e68613cee565b9050600080613e988360008a602001518b60400151600360009054906101000a90046001600160801b0316613cf2565b505091509150613ec78e89602001518e8a8a86888a60006005614ded909998979695949392919063ffffffff16565b15613edb5760019450613edb60068f614f87565b6020880151613ef6906005908f908f8b8b87898b6001614ded565b15613f0a5760019350613f0a60068e614f87565b5050505b60208501516000908190613f2a906005908f908f908a8a614fb3565b91509150613f3a8a8c8484615055565b8a600f0b6000146140a65760008b600f0b1215613fb5578315613f835760028d810b810b6000908152600560205260408120818155600181018290559182018190556003909101555b8215613fb55760028c810b810b6000908152600560205260408120818155600181018290559182018190556003909101555b6000613fcc8e8e8e8b602001518c600001516140d3565b919b5099509050600f81900b156140a45760035460408901516001600160801b039091169060009061401f90614000613cee565b60208d01516003548690600160801b90046001600160801b0316614456565b90508061ffff168a6040015161ffff16146140775761404b61403f613cee565b8b60200151838561452a565b50506002805461ffff60d81b1916600160d81b61ffff841602179055600380546001600160801b031690555b614081828f614d37565b600380546001600160801b0319166001600160801b039290921691909117905550505b505b505050505050509450945094915050565b8082016001600160801b038084169082161015613a8b57600080fd5b60008060008760020b8560020b1215614108576141016140f289614755565b6140fb89614755565b88615233565b9250614160565b8660020b8560020b121561414257614123846140fb89614755565b925061413861413189614755565b8588615278565b9150859050614160565b61415d61414e89614755565b61415789614755565b88615278565b91505b955095509592505050565b60006401000276a36001600160a01b038316108015906141a7575073fffd8963efd1fc6a506488495d951d5263988d266001600160a01b038316105b6141dc576040805162461bcd60e51b81526020600482015260016024820152602960f91b604482015290519081900360640190fd5b600160201b600160c01b03602083901b166001600160801b03811160071b81811c6001600160401b03811160061b90811c63ffffffff811160051b90811c61ffff811160041b90811c60ff8111600390811b91821c600f811160021b90811c918211600190811b92831c9790881196179094179092171790911717176080811061426e57607f810383901c9150614278565b80607f0383901b91505b908002607f81811c60ff83811c9190911c800280831c81831c1c800280841c81841c1c800280851c81851c1c800280861c81861c1c800280871c81871c1c800280881c81881c1c800280891c81891c1c8002808a1c818a1c1c8002808b1c818b1c1c8002808c1c818c1c1c8002808d1c818d1c1c8002808e1c9c81901c9c909c1c80029c8d901c9e9d607f198f0160401b60c09190911c6001603f1b161760c19b909b1c6001603e1b169a909a1760c29990991c6001603d1b169890981760c39790971c6001603c1b169690961760c49590951c6001603b1b169490941760c59390931c6001603a1b169290921760c69190911c600160391b161760c79190911c600160381b161760c89190911c600160371b161760c99190911c600160361b161760ca9190911c600160351b161760cb9190911c600160341b161760cc9190911c600160331b161760cd9190911c600160321b1617693627a301d71055774c8581026f028f6481ab7f045a5af012a19d003aa9198101608090811d906fdb2df09e81959a81455e260799a0632f8301901d600281810b9083900b1461444757886001600160a01b031661442b82614755565b6001600160a01b031611156144405781614442565b805b614449565b815b9998505050505050505050565b60408051630eea437960e11b815261ffff8716600482015263ffffffff86166024820152600285900b60448201526001600160801b0380851660648301528316608482015290516000916001600160a01b037f0000000000000000000000008826ad54c46f66662b05a3052a3e62c3a9c5920b1691631dd486f29160a48082019260209290919082900301818787803b1580156144f257600080fd5b505af1158015614506573d6000803e3d6000fd5b505050506040513d602081101561451c57600080fd5b505190505b95945050505050565b6040805163a80b96a160e01b815263ffffffff86166004820152600285900b602482015261ffff841660448201526001600160801b0383166064820152815160009283926001600160a01b037f0000000000000000000000008826ad54c46f66662b05a3052a3e62c3a9c5920b169263a80b96a192608480840193919291829003018186803b1580156145bc57600080fd5b505afa1580156145d0573d6000803e3d6000fd5b505050506040513d60408110156145e657600080fd5b5080516020918201516002805461ffff60c81b1916600160c81b61ffff8085169182029290921761ffff60b81b1916600160b81b92861692830217909255604080519182529481019190915283519295509093507f8a89de70856bccec096661388f305b9a75f5f65cb0d8a0e1e803c39dabedb57f92908290030190a194509492505050565b60008082156146ec57600884901c600181810b900b60009081526020879052604090205460ff868116918282039091161b80156146cd576146ac816152a8565b60ff0360ff16870396506146bf876152eb565b60019450945050505061474d565b8160ff16870396506146de876152eb565b60009450945050505061474d565b6001938401600881901c80860b90950b60009081526020879052604090205490949060ff861690811c801561473957614729818260000316615320565b60ff16870196506146bf876152eb565b8160ff0360ff16870196506146de876152eb565b935093915050565b6000600282810b60171d90818418829003900b620d89e88111156147a4576040805162461bcd60e51b81526020600482015260016024820152601560fa1b604482015290519081900360640190fd5b6000600182166147b857600160801b6147ca565b6ffffcb933bd6fad37aa2d162d1a5940015b6001600160881b0316905060028216156147f4576ffff97272373d413259a46990580e213a0260801c5b6004821615614813576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b6008821615614832576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b6010821615614851576fffcb9843d60f6159c9db58835c9266440260801c5b6020821615614870576fff973b41fa98c081472e6896dfb254c00260801c5b604082161561488f576fff2ea16466c96a3843ec78b326b528610260801c5b60808216156148ae576ffe5dee046a99a2a811c461f1969c30530260801c5b6101008216156148ce576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b6102008216156148ee576ff987a7253ac413176f2b074cf7815e540260801c5b61040082161561490e576ff3392b0822b70005940c7a398e4b70f30260801c5b61080082161561492e576fe7159475a2c29b7443b29c7fa6e889d90260801c5b61100082161561494e576fd097f3bdfd2022b8845ad8f792aa58250260801c5b61200082161561496e576fa9f746462d870fdf8a65dc1f90e061e50260801c5b61400082161561498e576f70d869a156d2a1b890bb3df62baf32f70260801c5b6180008216156149ae576f31be135f97d08fd981231505542fcfa60260801c5b620100008216156149cf576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b620200008216156149ef576e5d6af8dedb81196699c329225ee6040260801c5b62040000821615614a0e576d2216e584f5fa1ea926041bedfe980260801c5b62080000821615614a2b576b048a170391f7dc42444e8fa20260801c5b60008560020b1315614a46578060001981614a4257fe5b0490505b600160201b810615614a59576001614a5c565b60005b60ff16602082901c019350505050919050565b6000806000806158728a614a8557615434614a89565b6154435b905060008712614b75576000614ab1888861ffff16620f42400362ffffff16620f4240613c0e565b9050614ac28a8c8b8563ffffffff16565b9450848110614aef57899550614ae88561ffff891662ffffff620f424082900316613b99565b9250614b4e565b614afb8b8a838f615452565b9550856001600160a01b03168a6001600160a01b031614614b3157614b25868c8b8563ffffffff16565b94508488039250614b4e565b614b4b8561ffff891662ffffff620f424082900316613b99565b92505b614b6d868c8b8f614b6157615462614b65565b6154715b63ffffffff16565b935050614c25565b6158728b614b8557615462614b89565b6154715b9050614b9a8a8c8b8463ffffffff16565b9350876000039750838810614bb157899550614bf6565b614bbd8b8a8a8f615480565b9550856001600160a01b03168a6001600160a01b031614614bea57614be7868c8b8463ffffffff16565b93505b87841115614bf6578793505b614c05868c8b8563ffffffff16565b9450614c218561ffff891662ffffff620f424082900316613b99565b9250505b509650965096509692505050565b6000600160ff1b8210614c4557600080fd5b5090565b81810182811215600083121514613a8b57600080fd5b6000821580614c7a57505081810281838281614c7757fe5b04145b613a8b57600080fd5b600286810b810b60009081526020899052604090206003810180546001600160a01b03600160381b63ffffffff600160d81b808504821689039091160263ffffffff60d81b199093169290921782810482168903909116909102600160381b600160d81b031990911617600681810b8703900b66ffffffffffffff1666ffffffffffffff199091161790559081018054860390556001810180548703905554600160801b9004600f0b979650505050505050565b60008082600f0b1215614d9c57826001600160801b03168260000384039150816001600160801b031610614d97576040805162461bcd60e51b81526020600482015260026024820152614c5360f01b604482015290519081900360640190fd5b613a8b565b826001600160801b03168284019150816001600160801b03161015613a8b576040805162461bcd60e51b81526020600482015260026024820152614c4160f01b604482015290519081900360640190fd5b600289810b900b600090815260208b9052604081208054600160801b8104600f0b906001600160801b031683614e23828d614d37565b90506d09745258e83de0d0f4e400fce79a6001600160801b03821610614e75576040805162461bcd60e51b81526020600482015260026024820152614c4f60f01b604482015290519081900360640190fd5b85614e9857614e93614e8e600f85810b908f900b614c49565b613de2565b614eac565b614eac614e8e600f85810b908f900b613cd8565b84546001600160801b03838116600f9390930b8116600160801b02918116919091176001600160801b03191682178655901595508216614f7557841594508c60020b8e60020b13614f5d57600184018b9055600284018a9055600384018054600160381b600160d81b031916600160381b6001600160a01b038c16021766ffffffffffffff191666ffffffffffffff60068b900b161763ffffffff60d81b1916600160d81b63ffffffff8a16021790555b6003840180546001600160f81b0316600160f81b1790555b505050509a9950505050505050505050565b600881901c600190810b810b60009081526020939093526040909220805460ff9092169290921b189055565b600285810b810b60009081526020889052604080822087840b80850b84529183209293849391929088900b121561502d578860020b8760020b1261500857816001015486039350816002015485039250615017565b81600101549350816002015492505b6001810154600282015494039390920391615048565b81600101548160010154039350816002015481600201540392505b5050965096945050505050565b83546001600160801b03811690600160801b900463ffffffff16600f85900b6150c0576000826001600160801b0316116150bb576040805162461bcd60e51b815260206004820152600260248201526104e560f41b604482015290519081900360640190fd5b615179565b600085600f0b12156150ff5760045463ffffffff1680156150fd578063ffffffff16826150eb613cee565b0363ffffffff1610156150fd57600080fd5b505b600061510b8387614d37565b9050806000826001600160801b03161161512657600061513f565b600087600f0b13615137578261513f565b61513f613cee565b88546001600160801b039092166001600160801b031963ffffffff909216600160801b0263ffffffff60801b199093169290921716178755505b6001860154600287015460008683146151b057600189018790556151ad8388036001600160801b038716600160801b613c0e565b90505b60008287146151dd5760028a018790556151da8388036001600160801b038816600160801b613c0e565b90505b6001600160801b0382821716156152275760038a0180546001600160801b031981166001600160801b039182168501821617808216600160801b9182900483168501909216021790555b50505050505050505050565b60008082600f0b1215615260576152586152538585856000036000615490565b614c33565b600003615270565b6152706152538585856001615490565b949350505050565b60008082600f0b121561529857615258615253858585600003600061551f565b615270615253858585600161551f565b600181811c909117600281901c17600481901c17600881901c17601081901c17602081901c17604081901c17608081901c179081901c90036000613a8b82615320565b80620d89e719600282900b12156153075750620d89e719613df3565b620d89e8600282900b1315613df35750620d89e8919050565b7f55555555555555555555555555555555555555555555555555555555555555558116156001600160801b0382161560071b176001600160401b03600160801b03600160c01b0382161560061b177bffffffff00000000ffffffff00000000ffffffff00000000ffffffff82161560051b177dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff82161560041b177eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff82161560031b177f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f82161560021b177f3333333333333333333333333333333333333333333333333333333333333333919091161560011b1790565b6000615270838584600161551f565b60006152708484846001615490565b6000614521858585856001615590565b60006152708385846000615490565b6000615270848484600061551f565b6000614521858585856000615590565b60006001600160a01b03858503811690851681106154ad57600080fd5b600160601b600160e01b03606085901b16836154ee57866001600160a01b03166154e18383896001600160a01b0316613c0e565b816154e857fe5b04615514565b6155146155058383896001600160a01b0316613b99565b886001600160a01b0316615784565b979650505050505050565b6000846001600160a01b0316846001600160a01b0316101561554057600080fd5b6001600160a01b03858503168261556e5761556981856001600160801b0316600160601b613c0e565b615586565b61558681856001600160801b0316600160601b613b99565b9695505050505050565b600080866001600160a01b0316116155a757600080fd5b6000856001600160801b0316116155bd57600080fd5b81151583151514156156af57836155d5575084614521565b600160601b600160e01b03606086901b168215615663576001600160a01b0387168581029086828161560357fe5b0414156156345781810182811061563257615628838a6001600160a01b031683613b99565b9350505050614521565b505b61565a82615655888b6001600160a01b0316868161564e57fe5b0490613a7b565b615784565b92505050614521565b6001600160a01b0387168581029086828161567a57fe5b041461568557600080fd5b80821161569157600080fd5b61565a6156aa838a6001600160a01b0316848603613b99565b61578f565b81156157165761570f6156aa6001600160a01b038611156156e7576156e286600160601b896001600160801b0316613c0e565b6156ff565b6001600160801b038716606087901b816156fd57fe5b045b6001600160a01b03891690613a7b565b9050614521565b60006001600160a01b038511156157445761573f85600160601b886001600160801b0316613b99565b61575b565b61575b606086901b6001600160801b038816615784565b905080876001600160a01b03161161577257600080fd5b6001600160a01b038716039050614521565b808204910615150190565b806001600160a01b0381168114613df357600080fd5b604080516060810182526000808252602082018190529181019190915290565b604080516101c081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052906101208201908152600060208201819052604082018190526060820181905260809091015290565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565bfefec42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67a164736f6c6343000706000a
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.