Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
BubbleQuoter
Compiler Version
v0.7.6+commit.7338295f
Contract Source Code (Solidity Multiple files format)
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; pragma abicoder v2; import 'SafeCast.sol'; import 'TickMath.sol'; import 'IBubblePool.sol'; import 'IBubbleSwapCallback.sol'; import 'IQuoter.sol'; import 'PeripheryImmutableState.sol'; import 'Path.sol'; import 'PoolAddress.sol'; import 'CallbackValidation.sol'; /// @title Provides quotes for swaps /// @notice Allows getting the expected amount out or amount in for a given swap without executing the swap /// @dev These functions are not gas efficient and should _not_ be called on chain. Instead, optimistically execute /// the swap and check the amounts in the callback. contract BubbleQuoter is IQuoter, IBubbleSwapCallback, PeripheryImmutableState { using Path for bytes; using SafeCast for uint256; /// @dev Transient storage variable used to check a safety condition in exact output swaps. uint256 private amountOutCached; constructor(address _factory, address _WETH9) PeripheryImmutableState(_factory, _WETH9) {} function getPool( address tokenA, address tokenB, uint24 fee ) private view returns (IBubblePool) { return IBubblePool(PoolAddress.computeAddress(factory, PoolAddress.getPoolKey(tokenA, tokenB, fee))); } /// @inheritdoc IBubbleSwapCallback function bubbleSwapCallback( int256 amount0Delta, int256 amount1Delta, bytes memory path ) external view override { require(amount0Delta > 0 || amount1Delta > 0); // swaps entirely within 0-liquidity regions are not supported (address tokenIn, address tokenOut, uint24 fee) = path.decodeFirstPool(); CallbackValidation.verifyCallback(factory, tokenIn, tokenOut, fee); (bool isExactInput, uint256 amountToPay, uint256 amountReceived) = amount0Delta > 0 ? (tokenIn < tokenOut, uint256(amount0Delta), uint256(-amount1Delta)) : (tokenOut < tokenIn, uint256(amount1Delta), uint256(-amount0Delta)); if (isExactInput) { assembly { let ptr := mload(0x40) mstore(ptr, amountReceived) revert(ptr, 32) } } else { // if the cache has been populated, ensure that the full output amount has been received if (amountOutCached != 0) require(amountReceived == amountOutCached); assembly { let ptr := mload(0x40) mstore(ptr, amountToPay) revert(ptr, 32) } } } /// @dev Parses a revert reason that should contain the numeric quote function parseRevertReason(bytes memory reason) private pure returns (uint256) { if (reason.length != 32) { if (reason.length < 68) revert('Unexpected error'); assembly { reason := add(reason, 0x04) } revert(abi.decode(reason, (string))); } return abi.decode(reason, (uint256)); } /// @inheritdoc IQuoter function quoteExactInputSingle( address tokenIn, address tokenOut, uint24 fee, uint256 amountIn, uint160 sqrtPriceLimitX96 ) public override returns (uint256 amountOut) { bool zeroForOne = tokenIn < tokenOut; try getPool(tokenIn, tokenOut, fee).swap( address(this), // address(0) might cause issues with some tokens zeroForOne, amountIn.toInt256(), sqrtPriceLimitX96 == 0 ? (zeroForOne ? TickMath.MIN_SQRT_RATIO + 1 : TickMath.MAX_SQRT_RATIO - 1) : sqrtPriceLimitX96, abi.encodePacked(tokenIn, fee, tokenOut) ) {} catch (bytes memory reason) { return parseRevertReason(reason); } } /// @inheritdoc IQuoter function quoteExactInput(bytes memory path, uint256 amountIn) external override returns (uint256 amountOut) { while (true) { bool hasMultiplePools = path.hasMultiplePools(); (address tokenIn, address tokenOut, uint24 fee) = path.decodeFirstPool(); // the outputs of prior swaps become the inputs to subsequent ones amountIn = quoteExactInputSingle(tokenIn, tokenOut, fee, amountIn, 0); // decide whether to continue or terminate if (hasMultiplePools) { path = path.skipToken(); } else { return amountIn; } } } /// @inheritdoc IQuoter function quoteExactOutputSingle( address tokenIn, address tokenOut, uint24 fee, uint256 amountOut, uint160 sqrtPriceLimitX96 ) public override returns (uint256 amountIn) { bool zeroForOne = tokenIn < tokenOut; // if no price limit has been specified, cache the output amount for comparison in the swap callback if (sqrtPriceLimitX96 == 0) amountOutCached = amountOut; try getPool(tokenIn, tokenOut, fee).swap( address(this), // address(0) might cause issues with some tokens zeroForOne, -amountOut.toInt256(), sqrtPriceLimitX96 == 0 ? (zeroForOne ? TickMath.MIN_SQRT_RATIO + 1 : TickMath.MAX_SQRT_RATIO - 1) : sqrtPriceLimitX96, abi.encodePacked(tokenOut, fee, tokenIn) ) {} catch (bytes memory reason) { if (sqrtPriceLimitX96 == 0) delete amountOutCached; // clear cache return parseRevertReason(reason); } } /// @inheritdoc IQuoter function quoteExactOutput(bytes memory path, uint256 amountOut) external override returns (uint256 amountIn) { while (true) { bool hasMultiplePools = path.hasMultiplePools(); (address tokenOut, address tokenIn, uint24 fee) = path.decodeFirstPool(); // the inputs of prior swaps become the outputs of subsequent ones amountOut = quoteExactOutputSingle(tokenIn, tokenOut, fee, amountOut, 0); // decide whether to continue or terminate if (hasMultiplePools) { path = path.skipToken(); } else { return amountOut; } } } }
// SPDX-License-Identifier: GPL-2.0-or-later /* * @title Solidity Bytes Arrays Utils * @author Gonçalo Sá <[email protected]> * * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity. * The library lets you concatenate, slice and type cast bytes arrays both in memory and storage. */ pragma solidity >=0.5.0 <0.8.0; library BytesLib { function slice( bytes memory _bytes, uint256 _start, uint256 _length ) internal pure returns (bytes memory) { require(_length + 31 >= _length, 'slice_overflow'); require(_start + _length >= _start, 'slice_overflow'); require(_bytes.length >= _start + _length, 'slice_outOfBounds'); bytes memory tempBytes; assembly { switch iszero(_length) case 0 { // Get a location of some free memory and store it in tempBytes as // Solidity does for memory variables. tempBytes := mload(0x40) // The first word of the slice result is potentially a partial // word read from the original array. To read it, we calculate // the length of that partial word and start copying that many // bytes into the array. The first word we copy will start with // data we don't care about, but the last `lengthmod` bytes will // land at the beginning of the contents of the new array. When // we're done copying, we overwrite the full first word with // the actual length of the slice. let lengthmod := and(_length, 31) // The multiplication in the next line is necessary // because when slicing multiples of 32 bytes (lengthmod == 0) // the following copy loop was copying the origin's length // and then ending prematurely not copying everything it should. let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod))) let end := add(mc, _length) for { // The multiplication in the next line has the same exact purpose // as the one above. let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start) } lt(mc, end) { mc := add(mc, 0x20) cc := add(cc, 0x20) } { mstore(mc, mload(cc)) } mstore(tempBytes, _length) //update free-memory pointer //allocating the array padded to 32 bytes like the compiler does now mstore(0x40, and(add(mc, 31), not(31))) } //if we want a zero-length slice let's just return a zero-length array default { tempBytes := mload(0x40) //zero out the 32 bytes slice we are about to return //we need to do it because Solidity does not garbage collect mstore(tempBytes, 0) mstore(0x40, add(tempBytes, 0x20)) } } return tempBytes; } function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) { require(_start + 20 >= _start, 'toAddress_overflow'); require(_bytes.length >= _start + 20, 'toAddress_outOfBounds'); address tempAddress; assembly { tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000) } return tempAddress; } function toUint24(bytes memory _bytes, uint256 _start) internal pure returns (uint24) { require(_start + 3 >= _start, 'toUint24_overflow'); require(_bytes.length >= _start + 3, 'toUint24_outOfBounds'); uint24 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x3), _start)) } return tempUint; } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; import 'IBubblePool.sol'; import 'PoolAddress.sol'; /// @notice Provides validation for callbacks from Bubble Pools library CallbackValidation { /// @notice Returns the address of a valid Bubble Pool /// @param factory The contract address of the Bubble factory /// @param tokenA The contract address of either token0 or token1 /// @param tokenB The contract address of the other token /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip /// @return pool The V3 pool contract address function verifyCallback( address factory, address tokenA, address tokenB, uint24 fee ) internal view returns (IBubblePool pool) { return verifyCallback(factory, PoolAddress.getPoolKey(tokenA, tokenB, fee)); } /// @notice Returns the address of a valid Bubble Pool /// @param factory The contract address of the Bubble factory /// @param poolKey The identifying key of the pool /// @return pool The V3 pool contract address function verifyCallback(address factory, PoolAddress.PoolKey memory poolKey) internal view returns (IBubblePool pool) { pool = IBubblePool(PoolAddress.computeAddress(factory, poolKey)); require(msg.sender == address(pool)); } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; import 'IBubblePoolImmutables.sol'; import 'IBubblePoolState.sol'; import 'IBubblePoolDerivedState.sol'; import 'IBubblePoolActions.sol'; import 'IBubblePoolOwnerActions.sol'; import 'IBubblePoolEvents.sol'; /// @title The interface for a Bubble Pool /// @notice A Bubble pool facilitates swapping and automated market making between any two assets that strictly conform /// to the ERC20 specification /// @dev The pool interface is broken up into many smaller pieces interface IBubblePool is IBubblePoolImmutables, IBubblePoolState, IBubblePoolDerivedState, IBubblePoolActions, IBubblePoolOwnerActions, IBubblePoolEvents { }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Permissionless pool actions /// @notice Contains pool methods that can be called by anyone interface IBubblePoolActions { /// @notice Sets the initial price for the pool /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96 function initialize(uint160 sqrtPriceX96) external; /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position /// @dev The caller of this method receives a callback in the form of IBubbleMintCallback#BubbleMintCallback /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends /// on tickLower, tickUpper, the amount of liquidity, and the current price. /// @param recipient The address for which the liquidity will be created /// @param tickLower The lower tick of the position in which to add liquidity /// @param tickUpper The upper tick of the position in which to add liquidity /// @param amount The 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 /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback function mint( address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes calldata data ) external returns (uint256 amount0, uint256 amount1); /// @notice Collects tokens owed to a position /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity. /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity. /// @param recipient The address which should receive the fees collected /// @param tickLower The lower tick of the position for which to collect fees /// @param tickUpper The upper tick of the position for which to collect fees /// @param amount0Requested How much token0 should be withdrawn from the fees owed /// @param amount1Requested How much token1 should be withdrawn from the fees owed /// @return amount0 The amount of fees collected in token0 /// @return amount1 The amount of fees collected in token1 function collect( address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested ) external returns (uint128 amount0, uint128 amount1); /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0 /// @dev Fees must be collected separately via a call to #collect /// @param tickLower The lower tick of the position for which to burn liquidity /// @param tickUpper The upper tick of the position for which to burn liquidity /// @param amount How much liquidity to burn /// @return amount0 The amount of token0 sent to the recipient /// @return amount1 The amount of token1 sent to the recipient function burn( int24 tickLower, int24 tickUpper, uint128 amount ) external returns (uint256 amount0, uint256 amount1); /// @notice Swap token0 for token1, or token1 for token0 /// @dev The caller of this method receives a callback in the form of IBubbleSwapCallback#BubbleSwapCallback /// @param recipient The address to receive the output of the swap /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0 /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative) /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this /// value after the swap. If one for zero, the price cannot be greater than this value after the swap /// @param data Any data to be passed through to the callback /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive function swap( address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes calldata data ) external returns (int256 amount0, int256 amount1); /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback /// @dev The caller of this method receives a callback in the form of IBubbleFlashCallback#BubbleFlashCallback /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling /// with 0 amount{0,1} and sending the donation amount(s) from the callback /// @param recipient The address which will receive the token0 and token1 amounts /// @param amount0 The amount of token0 to send /// @param amount1 The amount of token1 to send /// @param data Any data to be passed through to the callback function flash( address recipient, uint256 amount0, uint256 amount1, bytes calldata data ) external; /// @notice Increase the maximum number of price and liquidity observations that this pool will store /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to /// the input observationCardinalityNext. /// @param observationCardinalityNext The desired minimum number of observations for the pool to store function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma 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. interface IBubblePoolDerivedState { /// @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 secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block /// timestamp function observe(uint32[] calldata secondsAgos) external view returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s); /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed. /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first /// snapshot is taken and the second snapshot is taken. /// @param tickLower The lower tick of the range /// @param tickUpper The upper tick of the range /// @return tickCumulativeInside The snapshot of the tick accumulator for the range /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range /// @return secondsInside The snapshot of seconds per liquidity for the range function snapshotCumulativesInside(int24 tickLower, int24 tickUpper) external view returns ( int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside ); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Events emitted by a pool /// @notice Contains all events emitted by the pool interface IBubblePoolEvents { /// @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 sqrtPriceX96 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 sqrtPriceX96, 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 tickLower The lower tick of the position /// @param tickUpper The upper tick of the position /// @param amount 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( address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1 ); /// @notice Emitted when fees are collected by the owner of a position /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees /// @param owner The owner of the position for which fees are collected /// @param tickLower The lower tick of the position /// @param tickUpper The upper tick of the position /// @param amount0 The amount of token0 fees collected /// @param amount1 The amount of token1 fees collected event Collect( address indexed owner, address recipient, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount0, uint128 amount1 ); /// @notice Emitted when a position's liquidity is removed /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect /// @param owner The owner of the position for which liquidity is removed /// @param tickLower The lower tick of the position /// @param tickUpper The upper tick of the position /// @param amount The amount of liquidity to remove /// @param amount0 The amount of token0 withdrawn /// @param amount1 The amount of token1 withdrawn event Burn( address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1 ); /// @notice Emitted by the pool for any swaps between token0 and token1 /// @param sender The address that initiated the swap call, and that received the callback /// @param recipient The address that received the output of the swap /// @param amount0 The delta of the token0 balance of the pool /// @param amount1 The delta of the token1 balance of the pool /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96 /// @param liquidity The liquidity of the pool after the swap /// @param tick The log base 1.0001 of price of the pool after the swap event Swap( address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick ); /// @notice Emitted by the pool for any flashes of token0/token1 /// @param sender The address that initiated the swap call, and that received the callback /// @param recipient The address that received the tokens from flash /// @param amount0 The amount of token0 that was flashed /// @param amount1 The amount of token1 that was flashed /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee event Flash( address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1 ); /// @notice Emitted by the pool for increases to the number of observations that can be stored /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index /// just before a mint/swap/burn. /// @param observationCardinalityNextOld The previous value of the next observation cardinality /// @param observationCardinalityNextNew The updated value of the next observation cardinality event IncreaseObservationCardinalityNext( uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew ); /// @notice Emitted when the protocol fee is changed by the pool /// @param feeProtocol0Old The previous value of the token0 protocol fee /// @param feeProtocol1Old The previous value of the token1 protocol fee /// @param feeProtocol0New The updated value of the token0 protocol fee /// @param feeProtocol1New The updated value of the token1 protocol fee event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New); /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner /// @param sender The address that collects the protocol fees /// @param recipient The address that receives the collected protocol fees /// @param amount0 The amount of token0 protocol fees that is withdrawn /// @param amount0 The amount of token1 protocol fees that is withdrawn event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Pool state that never changes /// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values interface IBubblePoolImmutables { /// @notice The contract that deployed the pool, which must adhere to the IBubbleFactory interface /// @return The contract address function factory() external view returns (address); /// @notice The first of the two tokens of the pool, sorted by address /// @return The token contract address function token0() external view returns (address); /// @notice The second of the two tokens of the pool, sorted by address /// @return The token contract address function token1() external view returns (address); /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6 /// @return The fee function fee() external view returns (uint24); /// @notice The pool tick spacing /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ... /// This value is an int24 to avoid casting even though it is always positive. /// @return The tick spacing function tickSpacing() external view returns (int24); /// @notice The maximum amount of position liquidity that can use any tick in the range /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool /// @return The max amount of liquidity per tick function maxLiquidityPerTick() external view returns (uint128); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Permissioned pool actions /// @notice Contains pool methods that may only be called by the factory owner interface IBubblePoolOwnerActions { /// @notice Set the denominator of the protocol's % share of the fees /// @param feeProtocol0 new protocol fee for token0 of the pool /// @param feeProtocol1 new protocol fee for token1 of the pool function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external; /// @notice Collect the protocol fee accrued to the pool /// @param recipient The address to which collected protocol fees should be sent /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1 /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0 /// @return amount0 The protocol fee collected in token0 /// @return amount1 The protocol fee collected in token1 function collectProtocol( address recipient, uint128 amount0Requested, uint128 amount1Requested ) external returns (uint128 amount0, uint128 amount1); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Pool state that can change /// @notice These methods compose the pool's state, and can change with any frequency including multiple times /// per transaction interface IBubblePoolState { /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas /// when accessed externally. /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value /// tick The current tick of the pool, i.e. according to the last tick transition that was run. /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick /// boundary. /// observationIndex The index of the last oracle observation that was written, /// observationCardinality The current maximum number of observations stored in the pool, /// observationCardinalityNext The next maximum number of observations, to be updated when the observation. /// feeProtocol The protocol fee for both tokens of the pool. /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0 /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee. /// unlocked Whether the pool is currently locked to reentrancy function slot0() external view returns ( uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked ); /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool /// @dev This value can overflow the uint256 function feeGrowthGlobal0X128() external view returns (uint256); /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool /// @dev This value can overflow the uint256 function feeGrowthGlobal1X128() external view returns (uint256); /// @notice The amounts of token0 and token1 that are owed to the protocol /// @dev Protocol fees will never exceed uint128 max in either token function protocolFees() external view returns (uint128 token0, uint128 token1); /// @notice The currently in range liquidity available to the pool /// @dev This value has no relationship to the total liquidity across all ticks function liquidity() external view returns (uint128); /// @notice Look up information about a specific tick in the pool /// @param tick The tick to look up /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or /// tick upper, /// liquidityNet how much liquidity changes when the pool price crosses the tick, /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0, /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1, /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick, /// secondsOutside the seconds spent on the other side of the tick from the current tick, /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false. /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0. /// In addition, these values are only relative and must be used only in comparison to previous snapshots for /// a specific position. function ticks(int24 tick) external view returns ( uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized ); /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information function tickBitmap(int16 wordPosition) external view returns (uint256); /// @notice Returns the information about a position by the position's key /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper /// @return _liquidity The amount of liquidity in the position, /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke, /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke, /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke, /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke function positions(bytes32 key) external view returns ( uint128 _liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1 ); /// @notice Returns data about a specific observation index /// @param index The element of the observations array to fetch /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time /// ago, rather than at a specific index in the array. /// @return blockTimestamp The timestamp of the observation, /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp, /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp, /// Returns initialized whether the observation has been initialized and the values are safe to use function observations(uint256 index) external view returns ( uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized ); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Callback for IBubblePoolActions#swap /// @notice Any contract that calls IBubblePoolActions#swap must implement this interface interface IBubbleSwapCallback { /// @notice Called to `msg.sender` after executing a swap via IBubblePool#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 BubblePool deployed by the canonical BubbleFactory. /// 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 IBubblePoolActions#swap call function bubbleSwapCallback( int256 amount0Delta, int256 amount1Delta, bytes calldata data ) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Immutable state /// @notice Functions that return immutable state of the router interface IPeripheryImmutableState { /// @return Returns the address of the Bubble factory function factory() external view returns (address); /// @return Returns the address of WETH9 function WETH9() external view returns (address); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.5; pragma abicoder v2; /// @title Quoter Interface /// @notice Supports quoting the calculated amounts from exact input or exact output swaps /// @dev These functions are not marked view because they rely on calling non-view functions and reverting /// to compute the result. They are also not gas efficient and should not be called on-chain. interface IQuoter { /// @notice Returns the amount out received for a given exact input swap without executing the swap /// @param path The path of the swap, i.e. each token pair and the pool fee /// @param amountIn The amount of the first token to swap /// @return amountOut The amount of the last token that would be received function quoteExactInput(bytes memory path, uint256 amountIn) external returns (uint256 amountOut); /// @notice Returns the amount out received for a given exact input but for a swap of a single pool /// @param tokenIn The token being swapped in /// @param tokenOut The token being swapped out /// @param fee The fee of the token pool to consider for the pair /// @param amountIn The desired input amount /// @param sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap /// @return amountOut The amount of `tokenOut` that would be received function quoteExactInputSingle( address tokenIn, address tokenOut, uint24 fee, uint256 amountIn, uint160 sqrtPriceLimitX96 ) external returns (uint256 amountOut); /// @notice Returns the amount in required for a given exact output swap without executing the swap /// @param path The path of the swap, i.e. each token pair and the pool fee /// @param amountOut The amount of the last token to receive /// @return amountIn The amount of first token required to be paid function quoteExactOutput(bytes memory path, uint256 amountOut) external returns (uint256 amountIn); /// @notice Returns the amount in required to receive the given exact output amount but for a swap of a single pool /// @param tokenIn The token being swapped in /// @param tokenOut The token being swapped out /// @param fee The fee of the token pool to consider for the pair /// @param amountOut The desired output amount /// @param sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap /// @return amountIn The amount required as the input for the swap in order to receive `amountOut` function quoteExactOutputSingle( address tokenIn, address tokenOut, uint24 fee, uint256 amountOut, uint160 sqrtPriceLimitX96 ) external returns (uint256 amountIn); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.6.0; import 'BytesLib.sol'; /// @title Functions for manipulating path data for multihop swaps library Path { using BytesLib for bytes; /// @dev The length of the bytes encoded address uint256 private constant ADDR_SIZE = 20; /// @dev The length of the bytes encoded fee uint256 private constant FEE_SIZE = 3; /// @dev The offset of a single token address and pool fee uint256 private constant NEXT_OFFSET = ADDR_SIZE + FEE_SIZE; /// @dev The offset of an encoded pool key uint256 private constant POP_OFFSET = NEXT_OFFSET + ADDR_SIZE; /// @dev The minimum length of an encoding that contains 2 or more pools uint256 private constant MULTIPLE_POOLS_MIN_LENGTH = POP_OFFSET + NEXT_OFFSET; /// @notice Returns true iff the path contains two or more pools /// @param path The encoded swap path /// @return True if path contains two or more pools, otherwise false function hasMultiplePools(bytes memory path) internal pure returns (bool) { return path.length >= MULTIPLE_POOLS_MIN_LENGTH; } /// @notice Decodes the first pool in path /// @param path The bytes encoded swap path /// @return tokenA The first token of the given pool /// @return tokenB The second token of the given pool /// @return fee The fee level of the pool function decodeFirstPool(bytes memory path) internal pure returns ( address tokenA, address tokenB, uint24 fee ) { tokenA = path.toAddress(0); fee = path.toUint24(ADDR_SIZE); tokenB = path.toAddress(NEXT_OFFSET); } /// @notice Gets the segment corresponding to the first pool in the path /// @param path The bytes encoded swap path /// @return The segment containing all data necessary to target the first pool in the path function getFirstPool(bytes memory path) internal pure returns (bytes memory) { return path.slice(0, POP_OFFSET); } /// @notice Skips a token + fee element from the buffer and returns the remainder /// @param path The swap path /// @return The remaining token + fee elements in the path function skipToken(bytes memory path) internal pure returns (bytes memory) { return path.slice(NEXT_OFFSET, path.length - NEXT_OFFSET); } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity =0.7.6; import 'IPeripheryImmutableState.sol'; /// @title Immutable state /// @notice Immutable state used by periphery contracts abstract contract PeripheryImmutableState is IPeripheryImmutableState { /// @inheritdoc IPeripheryImmutableState address public immutable override factory; /// @inheritdoc IPeripheryImmutableState address public immutable override WETH9; constructor(address _factory, address _WETH9) { factory = _factory; WETH9 = _WETH9; } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Provides functions for deriving a pool address from the factory, tokens, and the fee library PoolAddress { bytes32 internal constant POOL_INIT_CODE_HASH = 0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54; /// @notice The identifying key of the pool struct PoolKey { address token0; address token1; uint24 fee; } /// @notice Returns PoolKey: the ordered tokens with the matched fee levels /// @param tokenA The first token of a pool, unsorted /// @param tokenB The second token of a pool, unsorted /// @param fee The fee level of the pool /// @return Poolkey The pool details with ordered token0 and token1 assignments function getPoolKey( address tokenA, address tokenB, uint24 fee ) internal pure returns (PoolKey memory) { if (tokenA > tokenB) (tokenA, tokenB) = (tokenB, tokenA); return PoolKey({token0: tokenA, token1: tokenB, fee: fee}); } /// @notice Deterministically computes the pool address given the factory and PoolKey /// @param factory The Bubble factory contract address /// @param key The PoolKey /// @return pool The contract address of the pool function computeAddress(address factory, PoolKey memory key) internal pure returns (address pool) { require(key.token0 < key.token1); pool = address( uint256( keccak256( abi.encodePacked( hex'ff', factory, keccak256(abi.encode(key.token0, key.token1, key.fee)), POOL_INIT_CODE_HASH ) ) ) ); } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Safe casting methods /// @notice Contains methods for safely casting between types library 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 uint160 function 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 int128 function 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 int256 function toInt256(uint256 y) internal pure returns (int256 z) { require(y < 2**255); z = int256(y); } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma 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 library TickMath { /// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128 int24 internal constant MIN_TICK = -887272; /// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128 int24 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 sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0) /// at the given tick function getSqrtRatioAtTick(int24 tick) internal pure returns (uint160 sqrtPriceX96) { uint256 absTick = tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick)); require(absTick <= uint256(MAX_TICK), 'T'); uint256 ratio = absTick & 0x1 != 0 ? 0xfffcb933bd6fad37aa2d162d1a594001 : 0x100000000000000000000000000000000; if (absTick & 0x2 != 0) ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128; if (absTick & 0x4 != 0) ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128; if (absTick & 0x8 != 0) ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128; if (absTick & 0x10 != 0) ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128; if (absTick & 0x20 != 0) ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128; if (absTick & 0x40 != 0) ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128; if (absTick & 0x80 != 0) ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128; if (absTick & 0x100 != 0) ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128; if (absTick & 0x200 != 0) ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128; if (absTick & 0x400 != 0) ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128; if (absTick & 0x800 != 0) ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128; if (absTick & 0x1000 != 0) ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128; if (absTick & 0x2000 != 0) ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128; if (absTick & 0x4000 != 0) ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128; if (absTick & 0x8000 != 0) ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128; if (absTick & 0x10000 != 0) ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128; if (absTick & 0x20000 != 0) ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128; if (absTick & 0x40000 != 0) ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128; if (absTick & 0x80000 != 0) ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128; if (tick > 0) ratio = type(uint256).max / ratio; // this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96. // we then downcast because we know the result always fits within 160 bits due to our tick input constraint // we round up in the division so getTickAtSqrtRatio of the output price is always consistent sqrtPriceX96 = uint160((ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1)); } /// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio /// @dev Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may /// ever return. /// @param sqrtPriceX96 The sqrt ratio for which to compute the tick as a Q64.96 /// @return tick The greatest tick for which the ratio is less than or equal to the input ratio function getTickAtSqrtRatio(uint160 sqrtPriceX96) internal pure returns (int24 tick) { // second inequality must be < because the price can never reach the price at the max tick require(sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO, 'R'); uint256 ratio = uint256(sqrtPriceX96) << 32; uint256 r = ratio; uint256 msb = 0; assembly { let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(5, gt(r, 0xFFFFFFFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(4, gt(r, 0xFFFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(3, gt(r, 0xFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(2, gt(r, 0xF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(1, gt(r, 0x3)) msb := or(msb, f) r := shr(f, r) } assembly { let f := gt(r, 0x1) msb := or(msb, f) } if (msb >= 128) r = ratio >> (msb - 127); else r = ratio << (127 - msb); int256 log_2 = (int256(msb) - 128) << 64; assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(63, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(62, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(61, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(60, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(59, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(58, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(57, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(56, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(55, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(54, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(53, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(52, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(51, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(50, f)) } int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number int24 tickLow = int24((log_sqrt10001 - 3402992956809132418596140100660247210) >> 128); int24 tickHi = int24((log_sqrt10001 + 291339464771989622907027621153398088495) >> 128); tick = tickLow == tickHi ? tickLow : getSqrtRatioAtTick(tickHi) <= sqrtPriceX96 ? tickHi : tickLow; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH9","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"path","type":"bytes"}],"name":"bubbleSwapCallback","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"quoteExactInput","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"name":"quoteExactInputSingle","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"quoteExactOutput","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"name":"quoteExactOutputSingle","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c060405234801561001057600080fd5b50604051610f86380380610f8683398101604081905261002f91610069565b6001600160601b0319606092831b8116608052911b1660a05261009b565b80516001600160a01b038116811461006457600080fd5b919050565b6000806040838503121561007b578182fd5b6100848361004d565b91506100926020840161004d565b90509250929050565b60805160601c60a05160601c610eb86100ce600039806102f052508061031452806103b552806105ec5250610eb86000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063c45a01551161005b578063c45a0155146100d3578063cdca1753146100db578063e102022d146100ee578063f7729d43146101035761007d565b80632f80bb1d1461008257806330d07f21146100ab5780634aa4a4fc146100be575b600080fd5b610095610090366004610bb0565b610116565b6040516100a29190610deb565b60405180910390f35b6100956100b9366004610b42565b61017b565b6100c66102ee565b6040516100a29190610d4d565b6100c6610312565b6100956100e9366004610bb0565b610336565b6101016100fc366004610c16565b610384565b005b610095610111366004610b42565b61045b565b60005b600061012484610595565b905060008060006101348761059d565b92509250925061014882848389600061017b565b9550831561016057610159876105ce565b965061016c565b85945050505050610175565b50505050610119565b92915050565b60006001600160a01b03808616878216109083166101995760008490555b6101a48787876105e5565b6001600160a01b031663128acb0830836101bd88610623565b6000036001600160a01b038816156101d557876101fb565b856101f45773fffd8963efd1fc6a506488495d951d5263988d256101fb565b6401000276a45b8b8b8e60405160200161021093929190610d12565b6040516020818303038152906040526040518663ffffffff1660e01b815260040161023f959493929190610d61565b6040805180830381600087803b15801561025857600080fd5b505af1925050508015610288575060408051601f3d908101601f1916820190925261028591810190610bf3565b60015b6102e1573d8080156102b6576040519150601f19603f3d011682016040523d82523d6000602084013e6102bb565b606091505b506001600160a01b0384166102cf57600080555b6102d881610639565b925050506102e5565b5050505b95945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60005b600061034484610595565b905060008060006103548761059d565b92509250925061036883838389600061045b565b9550831561016057610379876105ce565b965050505050610339565b60008313806103935750600082135b61039c57600080fd5b60008060006103aa8461059d565b9250925092506103dc7f00000000000000000000000000000000000000000000000000000000000000008484846106b6565b50600080600080891361040857856001600160a01b0316856001600160a01b031610888a600003610423565b846001600160a01b0316866001600160a01b03161089896000035b925092509250821561043a57604051818152602081fd5b6000541561045057600054811461045057600080fd5b604051828152602081fd5b60006001600160a01b03808616908716106104778787876105e5565b6001600160a01b031663128acb08308361049088610623565b6001600160a01b038816156104a557876104cb565b856104c45773fffd8963efd1fc6a506488495d951d5263988d256104cb565b6401000276a45b8c8b8d6040516020016104e093929190610d12565b6040516020818303038152906040526040518663ffffffff1660e01b815260040161050f959493929190610d61565b6040805180830381600087803b15801561052857600080fd5b505af1925050508015610558575060408051601f3d908101601f1916820190925261055591810190610bf3565b60015b6102e1573d808015610586576040519150601f19603f3d011682016040523d82523d6000602084013e61058b565b606091505b506102d881610639565b516042111590565b600080806105ab84826106cc565b92506105b884601461077c565b90506105c58460176106cc565b91509193909250565b805160609061017590839060179060161901610823565b600061061b7f0000000000000000000000000000000000000000000000000000000000000000610616868686610974565b6109ca565b949350505050565b6000600160ff1b821061063557600080fd5b5090565b600081516020146106a25760448251101561066f5760405162461bcd60e51b815260040161066690610dc1565b60405180910390fd5b600482019150818060200190518101906106899190610c64565b60405162461bcd60e51b81526004016106669190610da7565b818060200190518101906101759190610cce565b60006102e5856106c7868686610974565b610aae565b60008182601401101561071b576040805162461bcd60e51b8152602060048201526012602482015271746f416464726573735f6f766572666c6f7760701b604482015290519081900360640190fd5b816014018351101561076c576040805162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b604482015290519081900360640190fd5b500160200151600160601b900490565b6000818260030110156107ca576040805162461bcd60e51b8152602060048201526011602482015270746f55696e7432345f6f766572666c6f7760781b604482015290519081900360640190fd5b816003018351101561081a576040805162461bcd60e51b8152602060048201526014602482015273746f55696e7432345f6f75744f66426f756e647360601b604482015290519081900360640190fd5b50016003015190565b60608182601f01101561086e576040805162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b604482015290519081900360640190fd5b8282840110156108b6576040805162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b604482015290519081900360640190fd5b81830184511015610902576040805162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b604482015290519081900360640190fd5b606082158015610921576040519150600082526020820160405261096b565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561095a578051835260209283019201610942565b5050858452601f01601f1916604052505b50949350505050565b61097c610ad1565b826001600160a01b0316846001600160a01b0316111561099a579192915b50604080516060810182526001600160a01b03948516815292909316602083015262ffffff169181019190915290565b600081602001516001600160a01b031682600001516001600160a01b0316106109f257600080fd5b50805160208083015160409384015184516001600160a01b0394851681850152939091168385015262ffffff166060808401919091528351808403820181526080840185528051908301206001600160f81b031960a085015294901b6bffffffffffffffffffffffff191660a183015260b58201939093527fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460d5808301919091528251808303909101815260f5909101909152805191012090565b6000610aba83836109ca565b9050336001600160a01b0382161461017557600080fd5b604080516060810182526000808252602082018190529181019190915290565b600082601f830112610b01578081fd5b8135610b14610b0f82610e18565b610df4565b818152846020838601011115610b28578283fd5b816020850160208301379081016020019190915292915050565b600080600080600060a08688031215610b59578081fd5b8535610b6481610e6a565b94506020860135610b7481610e6a565b9350604086013562ffffff81168114610b8b578182fd5b9250606086013591506080860135610ba281610e6a565b809150509295509295909350565b60008060408385031215610bc2578182fd5b823567ffffffffffffffff811115610bd8578283fd5b610be485828601610af1565b95602094909401359450505050565b60008060408385031215610c05578182fd5b505080516020909101519092909150565b600080600060608486031215610c2a578283fd5b8335925060208401359150604084013567ffffffffffffffff811115610c4e578182fd5b610c5a86828701610af1565b9150509250925092565b600060208284031215610c75578081fd5b815167ffffffffffffffff811115610c8b578182fd5b8201601f81018413610c9b578182fd5b8051610ca9610b0f82610e18565b818152856020838501011115610cbd578384fd5b6102e5826020830160208601610e3a565b600060208284031215610cdf578081fd5b5051919050565b60008151808452610cfe816020860160208601610e3a565b601f01601f19169290920160200192915050565b606093841b6bffffffffffffffffffffffff19908116825260e89390931b6001600160e81b0319166014820152921b166017820152602b0190565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528515156020830152604082018590528316606082015260a060808201819052600090610d9c90830184610ce6565b979650505050505050565b600060208252610dba6020830184610ce6565b9392505050565b60208082526010908201526f2ab732bc3832b1ba32b21032b93937b960811b604082015260600190565b90815260200190565b60405181810167ffffffffffffffff81118282101715610e1057fe5b604052919050565b600067ffffffffffffffff821115610e2c57fe5b50601f01601f191660200190565b60005b83811015610e55578181015183820152602001610e3d565b83811115610e64576000848401525b50505050565b6001600160a01b0381168114610e7f57600080fd5b5056fea264697066735822122045a16218c8d260ab8699ada375e07a5948840da4228dc839daac65b97ec2ee9b64736f6c6343000706003300000000000000000000000092219032b7bd969143ffe56d2ed49ae831f388fa000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063c45a01551161005b578063c45a0155146100d3578063cdca1753146100db578063e102022d146100ee578063f7729d43146101035761007d565b80632f80bb1d1461008257806330d07f21146100ab5780634aa4a4fc146100be575b600080fd5b610095610090366004610bb0565b610116565b6040516100a29190610deb565b60405180910390f35b6100956100b9366004610b42565b61017b565b6100c66102ee565b6040516100a29190610d4d565b6100c6610312565b6100956100e9366004610bb0565b610336565b6101016100fc366004610c16565b610384565b005b610095610111366004610b42565b61045b565b60005b600061012484610595565b905060008060006101348761059d565b92509250925061014882848389600061017b565b9550831561016057610159876105ce565b965061016c565b85945050505050610175565b50505050610119565b92915050565b60006001600160a01b03808616878216109083166101995760008490555b6101a48787876105e5565b6001600160a01b031663128acb0830836101bd88610623565b6000036001600160a01b038816156101d557876101fb565b856101f45773fffd8963efd1fc6a506488495d951d5263988d256101fb565b6401000276a45b8b8b8e60405160200161021093929190610d12565b6040516020818303038152906040526040518663ffffffff1660e01b815260040161023f959493929190610d61565b6040805180830381600087803b15801561025857600080fd5b505af1925050508015610288575060408051601f3d908101601f1916820190925261028591810190610bf3565b60015b6102e1573d8080156102b6576040519150601f19603f3d011682016040523d82523d6000602084013e6102bb565b606091505b506001600160a01b0384166102cf57600080555b6102d881610639565b925050506102e5565b5050505b95945050505050565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b7f00000000000000000000000092219032b7bd969143ffe56d2ed49ae831f388fa81565b60005b600061034484610595565b905060008060006103548761059d565b92509250925061036883838389600061045b565b9550831561016057610379876105ce565b965050505050610339565b60008313806103935750600082135b61039c57600080fd5b60008060006103aa8461059d565b9250925092506103dc7f00000000000000000000000092219032b7bd969143ffe56d2ed49ae831f388fa8484846106b6565b50600080600080891361040857856001600160a01b0316856001600160a01b031610888a600003610423565b846001600160a01b0316866001600160a01b03161089896000035b925092509250821561043a57604051818152602081fd5b6000541561045057600054811461045057600080fd5b604051828152602081fd5b60006001600160a01b03808616908716106104778787876105e5565b6001600160a01b031663128acb08308361049088610623565b6001600160a01b038816156104a557876104cb565b856104c45773fffd8963efd1fc6a506488495d951d5263988d256104cb565b6401000276a45b8c8b8d6040516020016104e093929190610d12565b6040516020818303038152906040526040518663ffffffff1660e01b815260040161050f959493929190610d61565b6040805180830381600087803b15801561052857600080fd5b505af1925050508015610558575060408051601f3d908101601f1916820190925261055591810190610bf3565b60015b6102e1573d808015610586576040519150601f19603f3d011682016040523d82523d6000602084013e61058b565b606091505b506102d881610639565b516042111590565b600080806105ab84826106cc565b92506105b884601461077c565b90506105c58460176106cc565b91509193909250565b805160609061017590839060179060161901610823565b600061061b7f00000000000000000000000092219032b7bd969143ffe56d2ed49ae831f388fa610616868686610974565b6109ca565b949350505050565b6000600160ff1b821061063557600080fd5b5090565b600081516020146106a25760448251101561066f5760405162461bcd60e51b815260040161066690610dc1565b60405180910390fd5b600482019150818060200190518101906106899190610c64565b60405162461bcd60e51b81526004016106669190610da7565b818060200190518101906101759190610cce565b60006102e5856106c7868686610974565b610aae565b60008182601401101561071b576040805162461bcd60e51b8152602060048201526012602482015271746f416464726573735f6f766572666c6f7760701b604482015290519081900360640190fd5b816014018351101561076c576040805162461bcd60e51b8152602060048201526015602482015274746f416464726573735f6f75744f66426f756e647360581b604482015290519081900360640190fd5b500160200151600160601b900490565b6000818260030110156107ca576040805162461bcd60e51b8152602060048201526011602482015270746f55696e7432345f6f766572666c6f7760781b604482015290519081900360640190fd5b816003018351101561081a576040805162461bcd60e51b8152602060048201526014602482015273746f55696e7432345f6f75744f66426f756e647360601b604482015290519081900360640190fd5b50016003015190565b60608182601f01101561086e576040805162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b604482015290519081900360640190fd5b8282840110156108b6576040805162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b604482015290519081900360640190fd5b81830184511015610902576040805162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b604482015290519081900360640190fd5b606082158015610921576040519150600082526020820160405261096b565b6040519150601f8416801560200281840101858101878315602002848b0101015b8183101561095a578051835260209283019201610942565b5050858452601f01601f1916604052505b50949350505050565b61097c610ad1565b826001600160a01b0316846001600160a01b0316111561099a579192915b50604080516060810182526001600160a01b03948516815292909316602083015262ffffff169181019190915290565b600081602001516001600160a01b031682600001516001600160a01b0316106109f257600080fd5b50805160208083015160409384015184516001600160a01b0394851681850152939091168385015262ffffff166060808401919091528351808403820181526080840185528051908301206001600160f81b031960a085015294901b6bffffffffffffffffffffffff191660a183015260b58201939093527fe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b5460d5808301919091528251808303909101815260f5909101909152805191012090565b6000610aba83836109ca565b9050336001600160a01b0382161461017557600080fd5b604080516060810182526000808252602082018190529181019190915290565b600082601f830112610b01578081fd5b8135610b14610b0f82610e18565b610df4565b818152846020838601011115610b28578283fd5b816020850160208301379081016020019190915292915050565b600080600080600060a08688031215610b59578081fd5b8535610b6481610e6a565b94506020860135610b7481610e6a565b9350604086013562ffffff81168114610b8b578182fd5b9250606086013591506080860135610ba281610e6a565b809150509295509295909350565b60008060408385031215610bc2578182fd5b823567ffffffffffffffff811115610bd8578283fd5b610be485828601610af1565b95602094909401359450505050565b60008060408385031215610c05578182fd5b505080516020909101519092909150565b600080600060608486031215610c2a578283fd5b8335925060208401359150604084013567ffffffffffffffff811115610c4e578182fd5b610c5a86828701610af1565b9150509250925092565b600060208284031215610c75578081fd5b815167ffffffffffffffff811115610c8b578182fd5b8201601f81018413610c9b578182fd5b8051610ca9610b0f82610e18565b818152856020838501011115610cbd578384fd5b6102e5826020830160208601610e3a565b600060208284031215610cdf578081fd5b5051919050565b60008151808452610cfe816020860160208601610e3a565b601f01601f19169290920160200192915050565b606093841b6bffffffffffffffffffffffff19908116825260e89390931b6001600160e81b0319166014820152921b166017820152602b0190565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528515156020830152604082018590528316606082015260a060808201819052600090610d9c90830184610ce6565b979650505050505050565b600060208252610dba6020830184610ce6565b9392505050565b60208082526010908201526f2ab732bc3832b1ba32b21032b93937b960811b604082015260600190565b90815260200190565b60405181810167ffffffffffffffff81118282101715610e1057fe5b604052919050565b600067ffffffffffffffff821115610e2c57fe5b50601f01601f191660200190565b60005b83811015610e55578181015183820152602001610e3d565b83811115610e64576000848401525b50505050565b6001600160a01b0381168114610e7f57600080fd5b5056fea264697066735822122045a16218c8d260ab8699ada375e07a5948840da4228dc839daac65b97ec2ee9b64736f6c63430007060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000092219032b7bd969143ffe56d2ed49ae831f388fa000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
-----Decoded View---------------
Arg [0] : _factory (address): 0x92219032b7bd969143FFE56D2eD49aE831f388fA
Arg [1] : _WETH9 (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000092219032b7bd969143ffe56d2ed49ae831f388fa
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Deployed Bytecode Sourcemap
668:5862:15:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5846:681;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4710:1099;;;;;;:::i;:::-;;:::i;417:39:13:-;;;:::i;:::-;;;;;;;:::i;323:41::-;;;:::i;3997:676:15:-;;;;;;:::i;:::-;;:::i;1349:1270::-;;;;;;:::i;:::-;;:::i;:::-;;3120:840;;;;;;:::i;:::-;;:::i;5846:681::-;5937:16;5966:554;5994:21;6018:23;:4;:21;:23::i;:::-;5994:47;;6059:16;6077:15;6094:10;6108:22;:4;:20;:22::i;:::-;6058:72;;;;;;6239:60;6262:7;6271:8;6281:3;6286:9;6297:1;6239:22;:60::i;:::-;6227:72;;6376:16;6372:137;;;6420:16;:4;:14;:16::i;:::-;6413:23;;6372:137;;;6484:9;6477:16;;;;;;;;6372:137;5966:554;;;;;;;5846:681;;;;:::o;4710:1099::-;4912:16;-1:-1:-1;;;;;4959:18:15;;;;;;;;5104:22;;5100:55;;5128:15;:27;;;5100:55;5183:31;5191:7;5200:8;5210:3;5183:7;:31::i;:::-;-1:-1:-1;;;;;5183:36:15;;5246:4;5320:10;5350:20;:9;:18;:20::i;:::-;5349:21;;-1:-1:-1;;;;;5389:22:15;;;:159;;5531:17;5389:159;;;5436:10;:70;;5479:27;5436:70;;;5449:27;5436:70;5584:8;5594:3;5599:7;5567:40;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;5183:439;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5183:439:15;;;;;;;;-1:-1:-1;;5183:439:15;;;;;;;;;;;;:::i;:::-;;;5166:636;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;5682:22:15;;5678:50;;5713:15;5706:22;;5678:50;5765:25;5783:6;5765:17;:25::i;:::-;5758:32;;;;;;5166:636;;;4710:1099;;;;;;;;;:::o;417:39:13:-;;;:::o;323:41::-;;;:::o;3997:676:15:-;4086:17;4116:550;4144:21;4168:23;:4;:21;:23::i;:::-;4144:47;;4209:15;4226:16;4244:10;4258:22;:4;:20;:22::i;:::-;4208:72;;;;;;4388:58;4410:7;4419:8;4429:3;4434:8;4444:1;4388:21;:58::i;:::-;4377:69;;4523:16;4519:136;;;4567:16;:4;:14;:16::i;:::-;4560:23;;4116:550;;;;;;1349:1270;1529:1;1514:12;:16;:36;;;;1549:1;1534:12;:16;1514:36;1506:45;;;;;;1626:15;1643:16;1661:10;1675:22;:4;:20;:22::i;:::-;1625:72;;;;;;1708:66;1742:7;1751;1760:8;1770:3;1708:33;:66::i;:::-;;1788:17;1807:19;1828:22;1882:1;1867:12;:16;:190;;2002:7;-1:-1:-1;;;;;1991:18:15;:8;-1:-1:-1;;;;;1991:18:15;;2019:12;2043;2042:13;;1867:190;;;1914:8;-1:-1:-1;;;;;1904:18:15;:7;-1:-1:-1;;;;;1904:18:15;;1932:12;1956;1955:13;;1867:190;1787:270;;;;;;2072:12;2068:544;;;2146:4;2140:11;2181:14;2176:3;2169:27;2226:2;2221:3;2214:15;2110:134;2382:15;;:20;2378:68;;2430:15;;2412:14;:33;2404:42;;;;;;2506:4;2500:11;2541;2536:3;2529:24;2583:2;2578:3;2571:15;3120:840;3320:17;-1:-1:-1;;;;;3368:18:15;;;;;;;3416:31;3368:7;3378:8;3443:3;3416:7;:31::i;:::-;-1:-1:-1;;;;;3416:36:15;;3479:4;3553:10;3582:19;:8;:17;:19::i;:::-;-1:-1:-1;;;;;3620:22:15;;;:159;;3762:17;3620:159;;;3667:10;:70;;3710:27;3667:70;;;3680:27;3667:70;3815:7;3824:3;3829:8;3798:40;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;3416:437;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3416:437:15;;;;;;;;-1:-1:-1;;3416:437:15;;;;;;;;;;;;:::i;:::-;;;3399:554;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3916:25;3934:6;3916:17;:25::i;1014:140:12:-;1106:11;794:24;-1:-1:-1;1106:40:12;;1014:140::o;1423:326::-;1531:14;;;1636:17;:4;1531:14;1636;:17::i;:::-;1627:26;-1:-1:-1;1670:24:12;:4;312:2;1670:13;:24::i;:::-;1664:30;-1:-1:-1;1714:27:12;:4;520:20;1714:14;:27::i;:::-;1705:36;;1423:326;;;;;:::o;2303:151::-;2420:11;;2364:12;;2396:50;;2420:4;;520:20;;-1:-1:-1;;2420:25:12;2396:10;:50::i;1051:249:15:-;1168:11;1211:80;1238:7;1247:43;1270:6;1278;1286:3;1247:22;:43::i;:::-;1211:26;:80::i;:::-;1192:100;1051:249;-1:-1:-1;;;;1051:249:15:o;947:124:16:-;999:8;-1:-1:-1;;;1028:1:16;:10;1020:19;;;;;;-1:-1:-1;1061:1:16;947:124::o;2702:381:15:-;2772:7;2796:6;:13;2813:2;2796:19;2792:237;;2852:2;2836:6;:13;:18;2832:50;;;2856:26;;-1:-1:-1;;;2856:26:15;;;;;;;:::i;:::-;;;;;;;;2832:50;2947:4;2939:6;2935:17;2925:27;;2999:6;2988:28;;;;;;;;;;;;:::i;:::-;2981:36;;-1:-1:-1;;;2981:36:15;;;;;;;;:::i;2792:237::-;3057:6;3046:29;;;;;;;;;;;;:::i;642:263:1:-;793:16;829:68;844:7;853:43;876:6;884;892:3;853:22;:43::i;:::-;829:14;:68::i;3489:426:0:-;3568:7;3611:6;3596;3605:2;3596:11;:21;;3588:52;;;;;-1:-1:-1;;;3588:52:0;;;;;;;;;;;;-1:-1:-1;;;3588:52:0;;;;;;;;;;;;;;;3676:6;3685:2;3676:11;3659:6;:13;:28;;3651:62;;;;;-1:-1:-1;;;3651:62:0;;;;;;;;;;;;-1:-1:-1;;;3651:62:0;;;;;;;;;;;;;;;-1:-1:-1;3805:30:0;3821:4;3805:30;3799:37;-1:-1:-1;;;3795:71:0;;;3489:426::o;3923:375::-;4001:6;4042;4028;4037:1;4028:10;:20;;4020:50;;;;;-1:-1:-1;;;4020:50:0;;;;;;;;;;;;-1:-1:-1;;;4020:50:0;;;;;;;;;;;;;;;4106:6;4115:1;4106:10;4089:6;:13;:27;;4081:60;;;;;-1:-1:-1;;;4081:60:0;;;;;;;;;;;;-1:-1:-1;;;4081:60:0;;;;;;;;;;;;;;;-1:-1:-1;4222:29:0;4238:3;4222:29;4216:36;;3923:375::o;410:3071::-;536:12;585:7;569;579:2;569:12;:23;;561:50;;;;;-1:-1:-1;;;561:50:0;;;;;;;;;;;;-1:-1:-1;;;561:50:0;;;;;;;;;;;;;;;650:6;639:7;630:6;:16;:26;;622:53;;;;;-1:-1:-1;;;622:53:0;;;;;;;;;;;;-1:-1:-1;;;622:53:0;;;;;;;;;;;;;;;720:7;711:6;:16;694:6;:13;:33;;686:63;;;;;-1:-1:-1;;;686:63:0;;;;;;;;;;;;-1:-1:-1;;;686:63:0;;;;;;;;;;;;;;;762:22;828:15;;861:2137;;;;3154:4;3148:11;3135:24;;3355:1;3344:9;3337:20;3409:4;3398:9;3394:20;3388:4;3381:34;821:2613;;861:2137;1058:4;1052:11;1039:24;;1763:2;1754:7;1750:16;2171:9;2164:17;2158:4;2154:28;2142:9;2131;2127:25;2123:60;2224:7;2220:2;2216:16;2497:6;2483:9;2476:17;2470:4;2466:28;2454:9;2446:6;2442:22;2438:57;2434:70;2256:470;2535:3;2531:2;2528:11;2256:470;;;2693:9;;2682:21;;2581:4;2573:13;;;;2618;2256:470;;;-1:-1:-1;;2750:26:0;;;2974:2;2957:11;-1:-1:-1;;2953:25:0;2947:4;2940:39;-1:-1:-1;821:2613:0;-1:-1:-1;3464:9:0;410:3071;-1:-1:-1;;;;410:3071:0:o;803:281:14:-;924:14;;:::i;:::-;964:6;-1:-1:-1;;;;;955:15:14;:6;-1:-1:-1;;;;;955:15:14;;951:56;;;992:6;;1000;951:56;-1:-1:-1;1025:51:14;;;;;;;;-1:-1:-1;;;;;1025:51:14;;;;;;;;;;;;;;;;;;;;;;;803:281::o;1330:526::-;1414:12;1460:3;:10;;;-1:-1:-1;;;;;1447:23:14;:3;:10;;;-1:-1:-1;;;;;1447:23:14;;1439:32;;;;;;-1:-1:-1;1701:10:14;;1713;;;;;1725:7;;;;;1690:43;;-1:-1:-1;;;;;1690:43:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1680:54;;;;;;-1:-1:-1;;;;;;1569:234:14;;;;;;;-1:-1:-1;;1569:234:14;;;;;;;;;;;;246:66;1569:234;;;;;;;;;;;;;;;;;;;;;;;;;1537:285;;;;;;1330:526::o;1147:280:1:-;1274:16;1327:44;1354:7;1363;1327:26;:44::i;:::-;1308:64;-1:-1:-1;1391:10:1;-1:-1:-1;;;;;1391:27:1;;;1383:36;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;14:485:18:-;;111:3;104:4;96:6;92:17;88:27;78:2;;133:5;126;119:20;78:2;173:6;160:20;204:49;219:33;249:2;219:33;:::i;:::-;204:49;:::i;:::-;278:2;269:7;262:19;324:3;317:4;312:2;304:6;300:15;296:26;293:35;290:2;;;345:5;338;331:20;290:2;414;407:4;399:6;395:17;388:4;379:7;375:18;362:55;437:16;;;455:4;433:27;426:42;;;;441:7;68:431;-1:-1:-1;;68:431:18:o;504:795::-;;;;;;683:3;671:9;662:7;658:23;654:33;651:2;;;705:6;697;690:22;651:2;749:9;736:23;768:33;795:5;768:33;:::i;:::-;820:5;-1:-1:-1;877:2:18;862:18;;849:32;890:35;849:32;890:35;:::i;:::-;944:7;-1:-1:-1;1003:2:18;988:18;;975:32;1051:8;1038:22;;1026:35;;1016:2;;1080:6;1072;1065:22;1016:2;1108:7;-1:-1:-1;1162:2:18;1147:18;;1134:32;;-1:-1:-1;1218:3:18;1203:19;;1190:33;1232:35;1190:33;1232:35;:::i;:::-;1286:7;1276:17;;;641:658;;;;;;;;:::o;1304:410::-;;;1442:2;1430:9;1421:7;1417:23;1413:32;1410:2;;;1463:6;1455;1448:22;1410:2;1508:9;1495:23;1541:18;1533:6;1530:30;1527:2;;;1578:6;1570;1563:22;1527:2;1606:51;1649:7;1640:6;1629:9;1625:22;1606:51;:::i;:::-;1596:61;1704:2;1689:18;;;;1676:32;;-1:-1:-1;;;;1400:314:18:o;1719:253::-;;;1857:2;1845:9;1836:7;1832:23;1828:32;1825:2;;;1878:6;1870;1863:22;1825:2;-1:-1:-1;;1906:16:18;;1962:2;1947:18;;;1941:25;1906:16;;1941:25;;-1:-1:-1;1815:157:18:o;1977:476::-;;;;2130:2;2118:9;2109:7;2105:23;2101:32;2098:2;;;2151:6;2143;2136:22;2098:2;2192:9;2179:23;2169:33;;2249:2;2238:9;2234:18;2221:32;2211:42;;2304:2;2293:9;2289:18;2276:32;2331:18;2323:6;2320:30;2317:2;;;2368:6;2360;2353:22;2317:2;2396:51;2439:7;2430:6;2419:9;2415:22;2396:51;:::i;:::-;2386:61;;;2088:365;;;;;:::o;2458:676::-;;2591:2;2579:9;2570:7;2566:23;2562:32;2559:2;;;2612:6;2604;2597:22;2559:2;2650:9;2644:16;2683:18;2675:6;2672:30;2669:2;;;2720:6;2712;2705:22;2669:2;2748:22;;2801:4;2793:13;;2789:27;-1:-1:-1;2779:2:18;;2835:6;2827;2820:22;2779:2;2869;2863:9;2894:49;2909:33;2939:2;2909:33;:::i;2894:49::-;2966:2;2959:5;2952:17;3006:7;3001:2;2996;2992;2988:11;2984:20;2981:33;2978:2;;;3032:6;3024;3017:22;2978:2;3050:54;3101:2;3096;3089:5;3085:14;3080:2;3076;3072:11;3050:54;:::i;3139:194::-;;3262:2;3250:9;3241:7;3237:23;3233:32;3230:2;;;3283:6;3275;3268:22;3230:2;-1:-1:-1;3311:16:18;;3220:113;-1:-1:-1;3220:113:18:o;3338:259::-;;3419:5;3413:12;3446:6;3441:3;3434:19;3462:63;3518:6;3511:4;3506:3;3502:14;3495:4;3488:5;3484:16;3462:63;:::i;:::-;3579:2;3558:15;-1:-1:-1;;3554:29:18;3545:39;;;;3586:4;3541:50;;3389:208;-1:-1:-1;;3389:208:18:o;3602:431::-;3855:2;3851:15;;;-1:-1:-1;;3847:24:18;;;3835:37;;3928:3;3906:16;;;;-1:-1:-1;;;;;;3902:41:18;3897:2;3888:12;;3881:63;3978:15;;3974:24;3969:2;3960:12;;3953:46;4024:2;4015:12;;3775:258::o;4038:203::-;-1:-1:-1;;;;;4202:32:18;;;;4184:51;;4172:2;4157:18;;4139:102::o;4246:570::-;-1:-1:-1;;;;;4535:15:18;;;4517:34;;4594:14;;4587:22;4582:2;4567:18;;4560:50;4641:2;4626:18;;4619:34;;;4689:15;;4684:2;4669:18;;4662:43;4497:3;4736;4721:19;;4714:32;;;4246:570;;4763:47;;4790:19;;4782:6;4763:47;:::i;:::-;4755:55;4469:347;-1:-1:-1;;;;;;;4469:347:18:o;4821:221::-;;4970:2;4959:9;4952:21;4990:46;5032:2;5021:9;5017:18;5009:6;4990:46;:::i;:::-;4982:54;4942:100;-1:-1:-1;;;4942:100:18:o;5047:340::-;5249:2;5231:21;;;5288:2;5268:18;;;5261:30;-1:-1:-1;;;5322:2:18;5307:18;;5300:46;5378:2;5363:18;;5221:166::o;5392:177::-;5538:25;;;5526:2;5511:18;;5493:76::o;5574:242::-;5644:2;5638:9;5674:17;;;5721:18;5706:34;;5742:22;;;5703:62;5700:2;;;5768:9;5700:2;5795;5788:22;5618:198;;-1:-1:-1;5618:198:18:o;5821:181::-;;5904:18;5896:6;5893:30;5890:2;;;5926:9;5890:2;-1:-1:-1;5985:2:18;5962:17;-1:-1:-1;;5958:31:18;5991:4;5954:42;;5880:122::o;6007:258::-;6079:1;6089:113;6103:6;6100:1;6097:13;6089:113;;;6179:11;;;6173:18;6160:11;;;6153:39;6125:2;6118:10;6089:113;;;6220:6;6217:1;6214:13;6211:2;;;6255:1;6246:6;6241:3;6237:16;6230:27;6211:2;;6060:205;;;:::o;6270:133::-;-1:-1:-1;;;;;6347:31:18;;6337:42;;6327:2;;6393:1;6390;6383:12;6327:2;6317:86;:::o
Swarm Source
ipfs://45a16218c8d260ab8699ada375e07a5948840da4228dc839daac65b97ec2ee9b
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.