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 0x54e533E8...673c638BE The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
AlgebraPool
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 2200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.8.20;pragma abicoder v1;import './base/AlgebraPoolBase.sol';import './base/ReentrancyGuard.sol';import './base/Positions.sol';import './base/SwapCalculation.sol';import './base/ReservesManager.sol';import './base/TickStructure.sol';import './libraries/FullMath.sol';import './libraries/Constants.sol';import './libraries/SafeCast.sol';import './libraries/TickMath.sol';import './libraries/LiquidityMath.sol';import './libraries/Plugins.sol';import './interfaces/plugin/IAlgebraPlugin.sol';import './interfaces/IAlgebraFactory.sol';/// @title Algebra concentrated liquidity pool/// @notice This contract is responsible for liquidity positions, swaps and flashloans/// @dev Version: Algebra Integral 1.0contract AlgebraPool is AlgebraPoolBase, TickStructure, ReentrancyGuard, Positions, SwapCalculation, ReservesManager {using SafeCast for uint256;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.8.20;import '../interfaces/callback/IAlgebraSwapCallback.sol';import '../interfaces/callback/IAlgebraMintCallback.sol';import '../interfaces/callback/IAlgebraFlashCallback.sol';import '../interfaces/plugin/IAlgebraDynamicFeePlugin.sol';import '../interfaces/IAlgebraPool.sol';import '../interfaces/IAlgebraFactory.sol';import '../interfaces/IAlgebraPoolDeployer.sol';import '../interfaces/IERC20Minimal.sol';import '../libraries/TickManagement.sol';import '../libraries/SafeTransfer.sol';import '../libraries/Constants.sol';import '../libraries/Plugins.sol';import './common/Timestamp.sol';/// @title Algebra pool base abstract contract/// @notice Contains state variables, immutables and common internal functions/// @dev Decoupling into a separate abstract contract simplifies testingabstract contract AlgebraPoolBase is IAlgebraPool, Timestamp {using TickManagement for mapping(int24 => TickManagement.Tick);/// @notice The struct with important state values of pool
12345678910111213// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.8.20;/// @title Abstract contract with modified blockTimestamp functionality/// @notice Allows the pool and other contracts to get a timestamp truncated to 32 bits/// @dev Can be overridden in tests to make testing easierabstract contract Timestamp {/// @dev This function is created for testing by overriding it./// @return A timestamp converted to uint32function _blockTimestamp() internal view virtual returns (uint32) {return uint32(block.timestamp); // truncation is desired}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.8.20;import '../libraries/LiquidityMath.sol';import '../libraries/TickManagement.sol';import './AlgebraPoolBase.sol';/// @title Algebra positions abstract contract/// @notice Contains the logic of recalculation and change of liquidity positions/// @dev Relies on method _addOrRemoveTicks, which is implemented in TickStructureabstract contract Positions is AlgebraPoolBase {using TickManagement for mapping(int24 => TickManagement.Tick);struct Position {uint256 liquidity; // The amount of liquidity concentrated in the rangeuint256 innerFeeGrowth0Token; // The last updated fee growth per unit of liquidityuint256 innerFeeGrowth1Token;uint128 fees0; // The amount of token0 owed to a LPuint128 fees1; // The amount of token1 owed to a LP}/// @inheritdoc IAlgebraPoolStatemapping(bytes32 => Position) public override positions;/// @notice This function fetches certain position object/// @param owner The address owing the position
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.8.20;import './AlgebraPoolBase.sol';/// @title Algebra reentrancy protection/// @notice Provides a modifier that protects against reentrancyabstract contract ReentrancyGuard is AlgebraPoolBase {/// @notice checks that reentrancy lock is unlockedmodifier onlyUnlocked() {_checkUnlocked();_;}/// @dev using private function to save bytecodefunction _checkUnlocked() internal view {if (!globalState.unlocked) revert IAlgebraPoolErrors.locked();}/// @dev using private function to save bytecodefunction _lock() internal {if (!globalState.unlocked) revert IAlgebraPoolErrors.locked();globalState.unlocked = false;}/// @dev using private function to save bytecode
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.8.20;import '../libraries/SafeCast.sol';import './AlgebraPoolBase.sol';/// @title Algebra reserves management abstract contract/// @notice Encapsulates logic for tracking and changing pool reserves/// @dev The reserve mechanism allows the pool to keep track of unexpected increases in balancesabstract contract ReservesManager is AlgebraPoolBase {using SafeCast for uint256;/// @dev The tracked token0 and token1 reserves of pooluint128 internal reserve0;uint128 internal reserve1;/// @inheritdoc IAlgebraPoolStatefunction getReserves() external view returns (uint128, uint128) {return (reserve0, reserve1);}/// @dev updates reserves data and distributes excess in the form of fee to liquidity providers./// If any of the balances is greater than uint128, the excess is sent to the communityVaultfunction _updateReserves() internal returns (uint256 balance0, uint256 balance1) {(balance0, balance1) = (_balanceToken0(), _balanceToken1());// we do not support tokens with totalSupply > type(uint128).max, so any excess will be sent to communityVault
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.8.20;import '../libraries/PriceMovementMath.sol';import '../libraries/LowGasSafeMath.sol';import '../libraries/SafeCast.sol';import './AlgebraPoolBase.sol';/// @title Algebra swap calculation abstract contract/// @notice Contains _calculateSwap encapsulating internal logic of swapsabstract contract SwapCalculation is AlgebraPoolBase {using TickManagement for mapping(int24 => TickManagement.Tick);using SafeCast for uint256;using LowGasSafeMath for uint256;using LowGasSafeMath for int256;struct SwapCalculationCache {uint256 communityFee; // The community fee of the selling token, uint256 to minimize castsbool crossedAnyTick; // If we have already crossed at least one active tickint256 amountRequiredInitial; // The initial value of the exact input\output amountint256 amountCalculated; // The additive amount of total output\input calculated through the swapuint256 totalFeeGrowthInput; // The initial totalFeeGrowth + the fee growth during a swapuint256 totalFeeGrowthOutput; // The initial totalFeeGrowth for output token, should not change during swapbool exactInput; // Whether the exact input or output is specifieduint16 fee; // The current fee value in hundredths of a bip, i.e. 1e-6int24 prevInitializedTick; // The previous initialized tick in linked list
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.8.20;import '../libraries/TickManagement.sol';import '../libraries/TickTree.sol';import './AlgebraPoolBase.sol';/// @title Algebra tick structure abstract contract/// @notice Encapsulates the logic of interaction with the data structure with ticks/// @dev Ticks are stored as a doubly linked list. A three-level bitmap tree is used to search through the listabstract contract TickStructure is AlgebraPoolBase {using TickManagement for mapping(int24 => TickManagement.Tick);using TickTree for mapping(int16 => uint256);/// @inheritdoc IAlgebraPoolStateuint32 public override tickTreeRoot; // The root bitmap of search tree/// @inheritdoc IAlgebraPoolStatemapping(int16 => uint256) public override tickTreeSecondLayer; // The second layer of search tree// the leaves of the tree are stored in `tickTable`constructor() {ticks.initTickState();}/// @notice Used to add or remove a tick from a doubly linked list and search tree
12345678910111213141516// 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/interfacesinterface 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 callfunction algebraFlashCallback(uint256 fee0, uint256 fee1, bytes calldata data) external;}
12345678910111213141516// 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;}
12345678910111213141516171819// 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;pragma abicoder v2;import './plugin/IAlgebraPluginFactory.sol';import './vault/IAlgebraVaultFactory.sol';/// @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/interfacesinterface IAlgebraFactory {/// @notice Emitted when a process of ownership renounce is started/// @param timestamp The timestamp of event/// @param finishTimestamp The timestamp when ownership renounce will be possible to finishevent RenounceOwnershipStart(uint256 timestamp, uint256 finishTimestamp);/// @notice Emitted when a process of ownership renounce cancelled/// @param timestamp The timestamp of eventevent RenounceOwnershipStop(uint256 timestamp);/// @notice Emitted when a process of ownership renounce finished/// @param timestamp The timestamp of ownership renouncementevent RenounceOwnershipFinish(uint256 timestamp);/// @notice Emitted when a pool is created/// @param token0 The first token of the pool by address sort order
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.8.4;import './pool/IAlgebraPoolImmutables.sol';import './pool/IAlgebraPoolState.sol';import './pool/IAlgebraPoolActions.sol';import './pool/IAlgebraPoolPermissionedActions.sol';import './pool/IAlgebraPoolEvents.sol';import './pool/IAlgebraPoolErrors.sol';/// @title The interface for a Algebra Pool/// @dev The pool interface is broken up into many smaller pieces./// This interface includes custom error definitions and cannot be used in older versions of Solidity./// For older versions of Solidity use #IAlgebraPoolLegacy/// Credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/tree/main/contracts/interfacesinterface IAlgebraPool isIAlgebraPoolImmutables,IAlgebraPoolState,IAlgebraPoolActions,IAlgebraPoolPermissionedActions,IAlgebraPoolEvents,IAlgebraPoolErrors{// used only for combining interfaces}
12345678910111213141516171819202122232425// 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/interfacesinterface IAlgebraPoolDeployer {/// @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/// @return plugin The pool associated plugin (if any)/// @return factory The Algebra Factory address/// @return token0 The first token of the pool by address sort order/// @return token1 The second token of the pool by address sort orderfunction getDeployParameters() external view returns (address plugin, address factory, address token0, address token1);/// @dev Deploys a pool with the given parameters by transiently setting the parameters in cache./// @param plugin The pool associated plugin (if any)/// @param token0 The first token of the pool by address sort order/// @param token1 The second token of the pool by address sort order/// @return pool The deployed pool's addressfunction deploy(address plugin, address token0, address token1) external returns (address pool);}
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`
1234567891011// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title The interface for the Algebra plugin with dynamic fee logic/// @dev A plugin with a dynamic fee must implement this interface so that the current fee can be known through the pool/// If the dynamic fee logic does not allow the fee to be calculated without additional data, the method should revert with the appropriate messageinterface IAlgebraDynamicFeePlugin {/// @notice Returns fee from plugin/// @return fee The pool fee value in hundredths of a bip, i.e. 1e-6function getCurrentFee() external view returns (uint16 fee);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title The Algebra plugin interface/// @dev The plugin will be called by the pool using hook methods depending on the current pool settingsinterface IAlgebraPlugin {/// @notice Returns plugin config/// @return config Each bit of the config is responsible for enabling/disabling the hooks./// The last bit indicates whether the plugin contains dynamic fees logicfunction defaultPluginConfig() external view returns (uint8);/// @notice The hook called before the state of a pool is initialized/// @param sender The initial msg.sender for the initialize call/// @param sqrtPriceX96 The sqrt(price) of the pool as a Q64.96/// @return bytes4 The function selector for the hookfunction beforeInitialize(address sender, uint160 sqrtPriceX96) external returns (bytes4);/// @notice The hook called after the state of a pool is initialized/// @param sender The initial msg.sender for the initialize call/// @param sqrtPriceX96 The sqrt(price) of the pool as a Q64.96/// @param tick The current tick after the state of a pool is initialized/// @return bytes4 The function selector for the hookfunction afterInitialize(address sender, uint160 sqrtPriceX96, int24 tick) external returns (bytes4);/// @notice The hook called before a position is modified/// @param sender The initial msg.sender for the modify position call
12345678910111213// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title An interface for a contract that is capable of deploying Algebra plugins/// @dev Such a factory is needed if the plugin should be automatically created and connected to each new poolinterface IAlgebraPluginFactory {/// @notice Deploys new plugin contract for pool/// @param pool The address of the pool for which the new plugin will be created/// @param token0 First token of the pool/// @param token1 Second token of the pool/// @return New plugin addressfunction createPlugin(address pool, address token0, address token1) external returns (address);}
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/// @dev Initialization should be done in one transaction with pool creation to avoid front-running/// @param initialPrice The initial sqrt price of the pool as a Q64.96function initialize(uint160 initialPrice) 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 leftoversRecipient 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 liquidityDesired 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/// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback/// @return liquidityActual The actual minted amount of liquidity
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.8.4;/// @title Errors emitted by a pool/// @notice Contains custom errors emitted by the pool/// @dev Custom errors are separated from the common pool interface for compatibility with older versions of Solidityinterface IAlgebraPoolErrors {// #### pool errors ####/// @notice Emitted by the reentrancy guarderror locked();/// @notice Emitted if arithmetic error occurrederror arithmeticError();/// @notice Emitted if an attempt is made to initialize the pool twiceerror alreadyInitialized();/// @notice Emitted if an attempt is made to mint or swap in uninitialized poolerror notInitialized();/// @notice Emitted if 0 is passed as amountRequired to swap functionerror zeroAmountRequired();/// @notice Emitted if invalid amount is passed as amountRequired to swap functionerror invalidAmountRequired();
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/Swaps 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 poolevent 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 liquidityevent Mint(address sender,address indexed owner,int24 indexed bottomTick,int24 indexed topTick,
12345678910111213141516171819202122232425// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @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 Algebra factory contract, which must adhere to the IAlgebraFactory interface/// @return The contract addressfunction factory() external view returns (address);/// @notice The first of the two tokens of the pool, sorted by address/// @return The token contract addressfunction token0() external view returns (address);/// @notice The second of the two tokens of the pool, sorted by address/// @return The token contract addressfunction token1() external view returns (address);/// @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 tickfunction maxLiquidityPerTick() external view returns (uint128);}
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 permissioned addresses/// @dev Credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/tree/main/contracts/interfacesinterface IAlgebraPoolPermissionedActions {/// @notice Set the community's % share of the fees. Only factory owner or POOLS_ADMINISTRATOR_ROLE role/// @param newCommunityFee The new community fee percent in thousandths (1e-3)function setCommunityFee(uint16 newCommunityFee) external;/// @notice Set the new tick spacing values. Only factory owner or POOLS_ADMINISTRATOR_ROLE role/// @param newTickSpacing The new tick spacing valuefunction setTickSpacing(int24 newTickSpacing) external;/// @notice Set the new plugin address. Only factory owner or POOLS_ADMINISTRATOR_ROLE role/// @param newPluginAddress The new plugin addressfunction setPlugin(address newPluginAddress) external;/// @notice Set new plugin config. Only factory owner or POOLS_ADMINISTRATOR_ROLE role/// @param newConfig In the new configuration of the plugin,/// each bit of which is responsible for a particular hook.function setPluginConfig(uint8 newConfig) external;/// @notice Set new community fee vault address. Only factory owner or POOLS_ADMINISTRATOR_ROLE role
1234567891011121314151617181920212223// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Pool state that can change/// @dev Important security note: when using this data by external contracts, it is necessary to take into account the possibility/// of manipulation (including read-only reentrancy)./// This interface is based on the UniswapV3 interface, credit to Uniswap Labs under GPL-2.0-or-later license:/// https://github.com/Uniswap/v3-core/tree/main/contracts/interfacesinterface IAlgebraPoolState {/// @notice Safely get most important state values of Algebra Integral AMM/// @dev Several values exposed as a single method to save gas when accessed externally./// **Important security note: this method checks reentrancy lock and should be preferred in most cases**./// @return sqrtPrice The current price of the pool as a sqrt(dToken1/dToken0) Q64.96 value/// @return tick The current global tick of the pool. May not always be equal to SqrtTickMath.getTickAtSqrtRatio(price) if the price is on a tickboundary/// @return lastFee The current (last known) pool fee value in hundredths of a bip, i.e. 1e-6 (so '100' is '0.01%'). May be obsolete if usingdynamic fee plugin/// @return pluginConfig The current plugin config as bitmap. Each bit is responsible for enabling/disabling the hooks, the last bit turns on/offdynamic fees logic/// @return activeLiquidity The currently in-range liquidity available to the pool/// @return nextTick The next initialized tick after current global tick/// @return previousTick The previous initialized tick before (or at) current global tickfunction safelyGetStateOfAMM()externalviewreturns (uint160 sqrtPrice, int24 tick, uint16 lastFee, uint8 pluginConfig, uint128 activeLiquidity, int24 nextTick, int24 previousTick);
1234567891011121314151617// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title The interface for the Algebra Vault Factory/// @notice This contract can be used for automatic vaults creation/// @dev Version: Algebra Integralinterface IAlgebraVaultFactory {/// @notice returns address of the community fee vault for the pool/// @param pool the address of Algebra Integral pool/// @return communityFeeVault the address of community fee vaultfunction getVaultForPool(address pool) external view returns (address communityFeeVault);/// @notice creates the community fee vault for the pool if needed/// @param pool the address of Algebra Integral pool/// @return communityFeeVault the address of community fee vaultfunction createVaultForPool(address pool) external returns (address communityFeeVault);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0 <0.9.0;/// @title Contains common constants for Algebra contracts/// @dev Constants moved to the library, not the base contract, to further emphasize their constant naturelibrary Constants {uint8 internal constant RESOLUTION = 96;uint256 internal constant Q96 = 1 << 96;uint256 internal constant Q128 = 1 << 128;uint24 internal constant FEE_DENOMINATOR = 1e6;uint16 internal constant FLASH_FEE = 0.01e4; // fee for flash loan in hundredths of a bip (0.01%)uint16 internal constant INIT_DEFAULT_FEE = 0.05e4; // init default fee value in hundredths of a bip (0.05%)uint16 internal constant MAX_DEFAULT_FEE = 5e4; // max default fee value in hundredths of a bip (5%)int24 internal constant INIT_DEFAULT_TICK_SPACING = 60;int24 internal constant MAX_TICK_SPACING = 500;int24 internal constant MIN_TICK_SPACING = 1;// the frequency with which the accumulated community fees are sent to the vaultuint32 internal constant COMMUNITY_FEE_TRANSFER_FREQUENCY = 8 hours;// max(uint128) / (MAX_TICK - MIN_TICK)uint128 internal constant MAX_LIQUIDITY_PER_TICK = 191757638537527648490752896198553;uint16 internal constant MAX_COMMUNITY_FEE = 1e3; // 100%
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.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) {unchecked {// 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 {let mm := mulmod(a, b, not(0))prod1 := sub(sub(mm, prod0), lt(mm, prod0))}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.8.4 <0.9.0;import '../interfaces/pool/IAlgebraPoolErrors.sol';import './TickMath.sol';import './TokenDeltaMath.sol';/// @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) {unchecked {if (y < 0) {if ((z = x - uint128(-y)) >= x) revert IAlgebraPoolErrors.liquiditySub();} else {if ((z = x + uint128(y)) < x) revert IAlgebraPoolErrors.liquidityAdd();}}}function getAmountsForLiquidity(
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity ^0.8.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) {unchecked {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) {unchecked {require((z = x - y) <= x);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.8.4 <0.9.0;import '../interfaces/pool/IAlgebraPoolErrors.sol';/// @title Contains logic and constants for interacting with the plugin through hooks/// @dev Allows pool to check which hooks are enabled, as well as control the return selectorlibrary Plugins {function hasFlag(uint8 pluginConfig, uint256 flag) internal pure returns (bool res) {assembly {res := gt(and(pluginConfig, flag), 0)}}function shouldReturn(bytes4 selector, bytes4 expectedSelector) internal pure {if (selector != expectedSelector) revert IAlgebraPoolErrors.invalidHookResponse(expectedSelector);}uint256 internal constant BEFORE_SWAP_FLAG = 1;uint256 internal constant AFTER_SWAP_FLAG = 1 << 1;uint256 internal constant BEFORE_POSITION_MODIFY_FLAG = 1 << 2;uint256 internal constant AFTER_POSITION_MODIFY_FLAG = 1 << 3;uint256 internal constant BEFORE_FLASH_FLAG = 1 << 4;uint256 internal constant AFTER_FLASH_FLAG = 1 << 5;uint256 internal constant AFTER_INIT_FLAG = 1 << 6;uint256 internal constant DYNAMIC_FEE = 1 << 7;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.8.20;import '../interfaces/pool/IAlgebraPoolErrors.sol';import './FullMath.sol';import './LowGasSafeMath.sol';import './TokenDeltaMath.sol';import './Constants.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 <0.9.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 uint256 to a uint128, revert on overflow/// @param y The uint256 to be downcasted/// @return z The downcasted integer, now type uint128function toUint128(uint256 y) internal pure returns (uint128 z) {require((z = uint128(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) {
12345678910111213141516171819202122232425// SPDX-License-Identifier: MITpragma solidity >=0.8.4 <0.9.0;import '../interfaces/pool/IAlgebraPoolErrors.sol';/// @title SafeTransfer/// @notice Safe ERC20 transfer library that gracefully handles missing return values./// @dev Credit to Solmate under MIT license: https://github.com/transmissions11/solmate/blob/ed67feda67b24fdeff8ad1032360f0ee6047ba0a/src/utils/SafeTransferLib.sol/// @dev Please note that this library does not check if the token has a code! That responsibility is delegated to the caller.library SafeTransfer {/// @notice Transfers tokens to a recipient/// @dev Calls transfer on token contract, errors with transferFailed() if transfer fails/// @param token The contract address of the token which will be transferred/// @param to The recipient of the transfer/// @param amount The amount of the token to transferfunction safeTransfer(address token, address to, uint256 amount) internal {bool success;assembly {let freeMemoryPointer := mload(0x40) // we will need to restore 0x40 slotmstore(0x00, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) // "transfer(address,uint256)" selectormstore(0x04, and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // append cleaned "to" addressmstore(0x24, amount)// now we use 0x00 - 0x44 bytes (68), freeMemoryPointer is dirtysuccess := call(gas(), token, 0, 0, 0x44, 0, 0x20)success := and(
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.8.20;import '../interfaces/pool/IAlgebraPoolErrors.sol';import './TickMath.sol';import './LiquidityMath.sol';import './Constants.sol';/// @title Library for managing and interacting with ticks/// @notice Contains functions for managing tick processes and relevant calculations/// @dev Ticks are organized as a doubly linked listlibrary TickManagement {// info stored for each initialized individual tickstruct Tick {uint256 liquidityTotal; // the total position liquidity that references this tickint128 liquidityDelta; // amount of net liquidity added (subtracted) when tick is crossed left-right (right-left),int24 prevTick;int24 nextTick;// 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;}function checkTickRangeValidity(int24 bottomTick, int24 topTick) internal pure {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.8.4 <0.9.0;import '../interfaces/pool/IAlgebraPoolErrors.sol';/// @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 tick
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.8.20;import './TickMath.sol';/// @title Packed tick initialized state library/// @notice Stores a packed mapping of tick index to its initialized state and search tree/// @dev The leafs mapping uses int16 for keys since ticks are represented as int24 and there are 256 (2^8) values per word.library TickTree {int16 internal constant SECOND_LAYER_OFFSET = 3466; // ceil(-MIN_TICK / 256)/// @notice Toggles the initialized state for a given tick from false to true, or vice versa/// @param leafs The mapping of words with ticks/// @param secondLayer The mapping of words with leafs/// @param treeRoot The word with info about active subtrees/// @param tick The tick to togglefunction toggleTick(mapping(int16 => uint256) storage leafs,mapping(int16 => uint256) storage secondLayer,uint32 treeRoot,int24 tick) internal returns (uint32 newTreeRoot) {newTreeRoot = treeRoot;(bool toggledNode, int16 nodeIndex) = _toggleBitInNode(leafs, tick); // toggle in leafif (toggledNode) {unchecked {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BUSL-1.1pragma solidity =0.8.20;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 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, bool roundUp) internal pure returns (uint256 token0Delta) {unchecked {uint256 priceDelta = priceUpper - priceLower;require(priceDelta < priceUpper); // forbids underflow and 0 priceLoweruint256 liquidityShifted = uint256(liquidity) << Constants.RESOLUTION;token0Delta = roundUp
1234567891011121314151617181920212223{"evmVersion": "paris","optimizer": {"enabled": true,"runs": 2200},"metadata": {"bytecodeHash": "none"},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"]}},"libraries": {}}
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"alreadyInitialized","type":"error"},{"inputs":[],"name":"arithmeticError","type":"error"},{"inputs":[],"name":"bottomTickLowerThanMIN","type":"error"},{"inputs":[],"name":"dynamicFeeActive","type":"error"},{"inputs":[],"name":"dynamicFeeDisabled","type":"error"},{"inputs":[],"name":"flashInsufficientPaid0","type":"error"},{"inputs":[],"name":"flashInsufficientPaid1","type":"error"},{"inputs":[],"name":"insufficientInputAmount","type":"error"},{"inputs":[],"name":"invalidAmountRequired","type":"error"},{"inputs":[{"internalType":"bytes4","name":"expectedSelector","type":"bytes4"}],"name":"invalidHookResponse","type":"error"},{"inputs":[],"name":"invalidLimitSqrtPrice","type":"error"},{"inputs":[],"name":"invalidNewCommunityFee","type":"error"},{"inputs":[],"name":"invalidNewTickSpacing","type":"error"},{"inputs":[],"name":"liquidityAdd","type":"error"},{"inputs":[],"name":"liquidityOverflow","type":"error"},{"inputs":[],"name":"liquiditySub","type":"error"},{"inputs":[],"name":"locked","type":"error"},{"inputs":[],"name":"notAllowed","type":"error"},{"inputs":[],"name":"notInitialized","type":"error"},{"inputs":[],"name":"pluginIsNotConnected","type":"error"},{"inputs":[],"name":"priceOutOfRange","type":"error"},{"inputs":[],"name":"tickInvalidLinks","type":"error"},{"inputs":[],"name":"tickIsNotInitialized","type":"error"},{"inputs":[],"name":"tickIsNotSpaced","type":"error"},{"inputs":[],"name":"tickOutOfRange","type":"error"},{"inputs":[],"name":"topTickAboveMAX","type":"error"},{"inputs":[],"name":"topTickLowerOrEqBottomTick","type":"error"},{"inputs":[],"name":"transferFailed","type":"error"},{"inputs":[],"name":"zeroAmountRequired","type":"error"},{"inputs":[],"name":"zeroLiquidityActual","type":"error"},{"inputs":[],"name":"zeroLiquidityDesired","type":"error"},{"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":"uint16","name":"communityFeeNew","type":"uint16"}],"name":"CommunityFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newCommunityVault","type":"address"}],"name":"CommunityVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"fee","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":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":"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":false,"internalType":"address","name":"newPluginAddress","type":"address"}],"name":"Plugin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"newPluginConfig","type":"uint8"}],"name":"PluginConfig","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":[{"internalType":"int24","name":"bottomTick","type":"int24"},{"internalType":"int24","name":"topTick","type":"int24"},{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"bytes","name":"data","type":"bytes"}],"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":"communityFeeLastTimestamp","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint16","name":"currentFee","type":"uint16"}],"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":[],"name":"getCommunityFeePending","outputs":[{"internalType":"uint128","name":"","type":"uint128"},{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint128","name":"","type":"uint128"},{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"globalState","outputs":[{"internalType":"uint160","name":"price","type":"uint160"},{"internalType":"int24","name":"tick","type":"int24"},{"internalType":"uint16","name":"lastFee","type":"uint16"},{"internalType":"uint8","name":"pluginConfig","type":"uint8"},{"internalType":"uint16","name":"communityFee","type":"uint16"},{"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":"isUnlocked","outputs":[{"internalType":"bool","name":"unlocked","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidity","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLiquidityPerTick","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"leftoversRecipient","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":[],"name":"nextTickGlobal","outputs":[{"internalType":"int24","name":"","type":"int24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"plugin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"positions","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"},{"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":[],"name":"prevTickGlobal","outputs":[{"internalType":"int24","name":"","type":"int24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"safelyGetStateOfAMM","outputs":[{"internalType":"uint160","name":"sqrtPrice","type":"uint160"},{"internalType":"int24","name":"tick","type":"int24"},{"internalType":"uint16","name":"lastFee","type":"uint16"},{"internalType":"uint8","name":"pluginConfig","type":"uint8"},{"internalType":"uint128","name":"activeLiquidity","type":"uint128"},{"internalType":"int24","name":"nextTick","type":"int24"},{"internalType":"int24","name":"previousTick","type":"int24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"newCommunityFee","type":"uint16"}],"name":"setCommunityFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newCommunityVault","type":"address"}],"name":"setCommunityVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"newFee","type":"uint16"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPluginAddress","type":"address"}],"name":"setPlugin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"newConfig","type":"uint8"}],"name":"setPluginConfig","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":"leftoversRecipient","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bool","name":"zeroToOne","type":"bool"},{"internalType":"int256","name":"amountToSell","type":"int256"},{"internalType":"uint160","name":"limitSqrtPrice","type":"uint160"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swapWithPaymentInAdvance","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":[],"name":"tickTreeRoot","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int16","name":"","type":"int16"}],"name":"tickTreeSecondLayer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int24","name":"","type":"int24"}],"name":"ticks","outputs":[{"internalType":"uint256","name":"liquidityTotal","type":"uint256"},{"internalType":"int128","name":"liquidityDelta","type":"int128"},{"internalType":"int24","name":"prevTick","type":"int24"},{"internalType":"int24","name":"nextTick","type":"int24"},{"internalType":"uint256","name":"outerFeeGrowth0Token","type":"uint256"},{"internalType":"uint256","name":"outerFeeGrowth1Token","type":"uint256"}],"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
0x608060405234801561001057600080fd5b50600436106102775760003560e01c806397ce1c5111610160578063d5c35a7e116100d8578063ecdecf421161008c578063f085a61011610071578063f085a61014610b0c578063f30dba9314610b2c578063f637731d14610bc657600080fd5b8063ecdecf4214610af0578063ef01df4f14610af957600080fd5b8063d8619037116100bd578063d861903714610a0f578063ddca3f4314610a3c578063e76c01e414610a5b57600080fd5b8063d5c35a7e146109dc578063d8544cf3146109e957600080fd5b8063c45a01551161012f578063cc1f97cf11610114578063cc1f97cf1461097b578063d0c93a7c146109a1578063d21220a7146109b557600080fd5b8063c45a015514610927578063c677e3e01461094e57600080fd5b806397ce1c51146107335780639e4e022714610794578063aafe29c014610833578063bca57f811461090757600080fd5b80634f1eb3d8116101f35780636378ae44116101c25780637bd78025116101a75780637bd78025146106ba5780638380edb7146106f15780638e0055531461071257600080fd5b80636378ae441461068a57806370cf754a146106a557600080fd5b80634f1eb3d814610585578063514ea4bf146105d657806353e9786814610660578063578b9a361461067357600080fd5b8063128acb081161024a578063240a875a1161022f578063240a875a146104425780633b3bc70e14610465578063490e6cbc146104f957600080fd5b8063128acb081461035a5780631a6865021461040957600080fd5b8063050a4d211461027c5780630902f1ac146102a75780630dfe1681146102ee5780631131b11014610331575b600080fd5b600854610290906301000000900460020b81565b6040805160029290920b8252519081900360200190f35b600b546001600160801b0380821691600160801b9004165b60405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390f35b6103157f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d403889481565b604080516001600160a01b039092168252519081900360200190f35b6004546103419063ffffffff1681565b6040805163ffffffff9092168252519081900360200190f35b6103f0600480360360a081101561037057600080fd5b6001600160a01b0382358116926020810135151592604082013592606083013516919081019060a0810160808201356401000000008111156103b157600080fd5b8201836020820111156103c357600080fd5b803590602001918460018302840111640100000000831117156103e557600080fd5b509092509050610bec565b6040805192835260208301919091528051918290030190f35b60085461042690660100000000000090046001600160801b031681565b604080516001600160801b039092168252519081900360200190f35b6104636004803603602081101561045857600080fd5b503561ffff16610dfc565b005b6103f06004803603608081101561047b57600080fd5b8135600290810b92602081013590910b916001600160801b0360408301351691908101906080810160608201356401000000008111156104ba57600080fd5b8201836020820111156104cc57600080fd5b803590602001918460018302840111640100000000831117156104ee57600080fd5b509092509050610e94565b6104636004803603608081101561050f57600080fd5b6001600160a01b03823516916020810135916040820135919081019060808101606082013564010000000081111561054657600080fd5b82018360208201111561055857600080fd5b8035906020019184600183028401116401000000008311171561057a57600080fd5b509092509050611052565b6102bf600480360360a081101561059b57600080fd5b506001600160a01b03813516906020810135600290810b91604081013590910b906001600160801b0360608201358116916080013516611474565b610629600480360360208110156105ec57600080fd5b50600a60205235600090815260409020805460018201546002830154600390930154919290916001600160801b0380821691600160801b90041685565b604080519586526020860194909452848401929092526001600160801b039081166060850152166080830152519081900360a00190f35b600654610315906001600160a01b031681565b60085461034190600160c81b900463ffffffff1681565b61069360005481565b60408051918252519081900360200190f35b6104266d09745258e83de0d0f4e400fce79981565b6004546cffffffffffffffffffffffffff6401000000008204811691710100000000000000000000000000000000009004166102bf565b600254600160e01b900460ff16604080519115158252519081900360200190f35b6104636004803603602081101561072857600080fd5b503561ffff16611646565b61073b611718565b604080516001600160a01b039098168852600296870b602089015261ffff9095168786015260ff90931660608701526001600160801b039091166080860152830b60a085015290910b60c0830152519081900360e00190f35b6103f0600480360360c08110156107aa57600080fd5b6001600160a01b0382358116926020810135821692604082013515159260608301359260808101359091169181019060c0810160a08201356401000000008111156107f457600080fd5b82018360208201111561080657600080fd5b8035906020019184600183028401116401000000008311171561082857600080fd5b5090925090506117ae565b6108e0600480360360c081101561084957600080fd5b6001600160a01b0382358116926020810135909116916040820135600290810b92606081013590910b916001600160801b03608083013516919081019060c0810160a08201356401000000008111156108a157600080fd5b8201836020820111156108b357600080fd5b803590602001918460018302840111640100000000831117156108d557600080fd5b509092509050611ab4565b6040805193845260208401929092526001600160801b031682820152519081900360600190f35b6104636004803603602081101561091d57600080fd5b503560ff16611ec4565b6103157f0000000000000000000000008121a3f8c4176e9765deea0b95fa2bdfd301679481565b6106936004803603602081101561096457600080fd5b5060076020523560010b6000908152604090205481565b6104636004803603602081101561099157600080fd5b50356001600160a01b0316611f30565b60085461029090600160b01b900460020b81565b6103157f000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe395581565b6008546102909060020b81565b610463600480360360208110156109ff57600080fd5b50356001600160a01b0316611f53565b61069360048036036020811015610a2557600080fd5b5060096020523560010b6000908152604090205481565b610a44611f9e565b6040805161ffff9092168252519081900360200190f35b60028054610aa6916001600160a01b03821691600160a01b810490910b9061ffff600160b81b820481169160ff600160c81b8204811692600160d01b83041691600160e01b90041686565b604080516001600160a01b03909716875260029590950b602087015261ffff9384168686015260ff90921660608601529091166080840152151560a0830152519081900360c00190f35b61069360015481565b600554610315906001600160a01b031681565b61046360048036036020811015610b2257600080fd5b503560020b612042565b610b8a60048036036020811015610b4257600080fd5b50600360208190529035600290810b600090815260409020805460018201548284015492909401549093600f81900b93600160801b8204810b93600160981b909204900b9186565b60408051968752600f9590950b6020870152600293840b868601529190920b6060850152608084019190915260a0830152519081900360c00190f35b61046360048036036020811015610bdc57600080fd5b50356001600160a01b03166120c4565b600080610bff8888888860008989612395565b610c0761248d565b600080610c126124c6565b91509150600080600080610c278d8d8d6126c4565b949c50929a509096509450925090508c15610cc2576000871215610c7357610c737f000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe39558f89600003612d4d565b610c7f88888c8c612d5d565b610c87612dd7565b610c9189886156bb565b1115610cb057604051633ed6d50560e21b815260040160405180910390fd5b610cbd8888836000612e81565b610d43565b6000881215610cf957610cf97f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d40388948f8a600003612d4d565b610d0588888c8c612d5d565b610d0d6130e9565b610d1788876156bb565b1115610d3657604051633ed6d50560e21b815260040160405180910390fd5b610d438888600084612e81565b8d6001600160a01b0316336001600160a01b03167fc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca678a8a88878960405180868152602001858152602001846001600160a01b03168152602001836001600160801b031681526020018260020b81526020019550505050505060405180910390a3505050505050610de16002805460ff60e01b1916600160e01b179055565b610df18888888886868a8a613151565b965096945050505050565b610e0461324e565b610e0c61327a565b6103e861ffff82161180610e2f575060025461ffff828116600160d01b90920416145b80610e51575061ffff811615801590610e5157506006546001600160a01b0316155b15610e88576040517fa709b9af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e9181613372565b50565b6000808686610ea382826133e3565b6f7fffffffffffffffffffffffffffffff6001600160801b0388161115610ef6576040517f8995290f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610f01886156ce565b9050610f11338b8b848b8b6134b0565b610f1961248d565b610f216124c6565b50506000610f30338c8c6135a0565b9050610f3e818c8c856135cc565b909650945085851715610fb1576003810154610f649087906001600160801b031661570c565b6003820154610f84908790600160801b90046001600160801b031661570c565b6001600160801b039182169116600160801b026fffffffffffffffffffffffffffffffff19161760038201555b6001600160801b038916861785171561101c57604080516001600160801b038b16815260208101889052808201879052905160028c810b92908e900b9133917f0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c919081900360600190a45b6110346002805460ff60e01b1916600160e01b179055565b611044338c8c858a8a8e8e6136f1565b505050509550959350505050565b600254600160c81b900460101615611169576005546040517f8de0a8ee0000000000000000000000000000000000000000000000000000000080825233600483018181526001600160a01b038a81166024860152604485018a90526064850189905260a06084860190815260a486018890526111699694959190941693638de0a8ee93928c928c928c928c928c929060c401848480828437600081840152601f19601f8201169050808301925050509750505050505050506020604051808303816000875af1158015611129573d6000803e3d6000fd5b505050506040513d602081101561113f57600080fd5b50517fffffffff0000000000000000000000000000000000000000000000000000000016906137ed565b61117161248d565b60008060008061117f6124c6565b9092509050600088156111c85761119b896064620f4240613873565b90506111c87f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d40388948b8b612d4d565b6000881561120c576111df896064620f4240613873565b905061120c7f000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe39558c8b612d4d565b61121882828a8a6138f3565b611220612dd7565b95508561122d83866156bb565b1115611265576040517f6dbca1fe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61126d6130e9565b94508461127a82856156bb565b11156112b2576040517fc998149f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025495849003959483900394600160d01b900461ffff16801561130f57600087156112e8576112e588836103e8613935565b90505b60008715611300576112fd88846103e8613935565b90505b61130c82828484612e81565b50505b604080518c8152602081018c90528082018990526060810188905290516001600160a01b038e169133917fbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca6339181900360800190a350505050506113806002805460ff60e01b1916600160e01b179055565b600254600160c81b90046020161561146b5761146b63343d37ff60e01b600560009054906101000a90046001600160a01b03166001600160a01b031663343d37ff338b8b8b89898d8d6040518963ffffffff1660e01b815260040180896001600160a01b03168152602001886001600160a01b03168152602001878152602001868152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505099505050505050505050506020604051808303816000875af1158015611129573d6000803e3d6000fd5b50505050505050565b60008061147f61248d565b600061148c3388886135a0565b60038101549091506001600160801b0380821691600160801b900481169087168210156114b7578196505b806001600160801b0316866001600160801b031611156114d5578095505b6001600160801b038787171615611621576001600160801b0387830381168783038216600160801b026fffffffffffffffffffffffffffffffff1916176003850155879550869450851615611558576115587f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d40388948b876001600160801b0316612d4d565b6001600160801b0384161561159b5761159b7f000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe39558b866001600160801b0316612d4d565b6115c0856001600160801b0316600003856001600160801b0316600003600080612e81565b604080516001600160a01b038c1681526001600160801b038088166020830152861681830152905160028a810b92908c900b9133917f70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0919081900360600190a45b6116396002805460ff60e01b1916600160e01b179055565b5050509550959350505050565b600254600160c81b8104608016151590600160e01b900460ff1661167d57604051636798480960e11b815260040160405180910390fd5b6005546001600160a01b031633036116cb57806116c6576040517f3a4528ef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61170b565b8015611703576040517fd39b8e0e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61170b61327a565b611714826139ce565b5050565b600280546001600160a01b03811691600160a01b8204900b9061ffff600160b81b8204169060ff600160c81b820481169160009182918291600160e01b909104168061177757604051636798480960e11b815260040160405180910390fd5b505060085495969495939492936001600160801b03660100000000000082041693600282810b9450630100000090920490910b9150565b60008060008612156117d3576040516334cb3a0160e11b815260040160405180910390fd5b6117db61248d565b600087156118315760006117ed612dd7565b90506117fc8860008888612d5d565b6000611806612dd7565b905061181a6118158383615733565b613a38565b925061182a836000806000612e81565b5050611876565b600061183b6130e9565b905061184a6000898888612d5d565b60006118546130e9565b90506118636118158383615733565b9250611873600084600080612e81565b50505b868114611881578096505b50856000036118a357604051633ed6d50560e21b815260040160405180910390fd5b6118bb6002805460ff60e01b1916600160e01b179055565b6118cb8888888860018989612395565b6118d361248d565b6118db6124c6565b50506000806000806118ee8b8b8b6126c4565b949a509298509096509450925090508a1561198d57600085121561193a5761193a7f000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe39558d87600003612d4d565b858a038a871461196f5761196f7f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d40388948f83612d4d565b61198761197b82613a38565b60000387846000612e81565b50611a13565b60008612156119c4576119c47f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d40388948d88600003612d4d565b848a038a86146119f9576119f97f000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe39558f83612d4d565b611a1187611a0683613a38565b600003600085612e81565b505b60408051878152602081018790526001600160a01b03868116828401526001600160801b0385166060830152600286900b60808301529151918e169133917fc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67919081900360a00190a3611a946002805460ff60e01b1916600160e01b179055565b611aa48c8c8c8c8a8a8e8e613151565b5050505097509795505050505050565b60008060008787611ac582826133e3565b876001600160801b0316600003611b08576040517fe6ace6df00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b278b8b8b611b208c6001600160801b0316613a4c565b8b8b6134b0565b611b2f61248d565b60028054600160a01b810490910b906001600160a01b03166000819003611b82576040517f812eb65500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600854600160b01b9004600290810b9081908d900b81611ba457611ba4615746565b078160020b8e60020b81611bba57611bba615746565b071760020b15611bf6576040517f5f6e14f300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50611c158c8c611c0e8d6001600160801b0316613a4c565b8585613a5f565b50909750955060009150819050611c2a6124c6565b91509150611c3a87878b8b613b0e565b8615611c585781611c49612dd7565b611c539190615733565b611c5b565b60005b91508515611c7b5780611c6c6130e9565b611c769190615733565b611c7e565b60005b905086821015611ca357611c9c8a6001600160801b03168389613935565b9450611ca7565b8994505b85811015611ce7576000611cc58b6001600160801b03168389613935565b9050856001600160801b0316816001600160801b03161015611ce5578095505b505b846001600160801b0316600003611d2a576040517fbeba2a6c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611d378e8e8e6135a0565b9050611d56818e8e611d518a6001600160801b0316613a4c565b6135cc565b9098509650508615611dab5786821115611d9c57611d977f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d40388948f898503612d4d565b611dab565b868214611dab57611dab61575c565b8515611dfa5785811115611deb57611de67f000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe39558f888403612d4d565b611dfa565b858114611dfa57611dfa61575c565b611e078787600080612e81565b8a60020b8c60020b8e6001600160a01b03167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde33898c8c60405180856001600160a01b03168152602001846001600160801b0316815260200183815260200182815260200194505050505060405180910390a4611e926002805460ff60e01b1916600160e01b179055565b611eb38d8d8d611eaa896001600160801b0316613a4c565b8b8b8f8f6136f1565b505050509750975097945050505050565b611ecc61324e565b6005546001600160a01b031680611f0f576040517f9e727ce300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614611f2757611f2761327a565b61171482613b50565b611f3861324e565b611f4061327a565b611f4a6000613b50565b610e9181613bb9565b611f5b61324e565b611f6361327a565b6001600160a01b038116158015611f865750600254600160d01b900461ffff1615155b15611f9557611f956000613372565b610e9181613c14565b600254600160b81b810461ffff1690600160c81b900460ff8116906080161561203e57600560009054906101000a90046001600160a01b03166001600160a01b031663f70d93626040518163ffffffff1660e01b8152600401602060405180830381865afa158015612014573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120389190615784565b91505090565b5090565b61204a61324e565b61205261327a565b60008160020b13158061206a57506101f4600282900b135b806120845750600854600282810b600160b01b909204900b145b156120bb576040517fafe09f4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e9181613c6f565b60006120cf82613cd8565b6002549091506001600160a01b031615612115576040517f52669adc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038481169190911790915560055416156121c457600554604080517f636fd804000000000000000000000000000000000000000000000000000000008082523360048301526001600160a01b03868116602484015292516121c49491939091169163636fd80491604480830192602092919082900301816000875af1158015611129573d6000803e3d6000fd5b6000806000806121d2614031565b600280547fffffffff0000ffffff000000ffffffffffffffffffffffffffffffffffffffff8116600160a01b62ffffff8d16027fffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffff1617600160d01b61ffff881602178255604080516001600160a01b038e168152928c900b60208401528051969a50949850929650909450600160c81b90910460ff16927f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c95929181900390910190a161229d836139ce565b6122a684613c6f565b6122af82613c14565b61ffff8516158015906122c957506001600160a01b038216155b15612300576040517fa709b9af00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61230985613372565b604081161561146b57600554604080517f82dd6522000000000000000000000000000000000000000000000000000000008082523360048301526001600160a01b038b8116602484015260028b900b6044840152925161146b949193909116916382dd652291606480830192602092919082900301816000875af1158015611129573d6000803e3d6000fd5b600254600160c81b90046001161561146b5761146b63029c1cb760e01b600560009054906101000a90046001600160a01b03166001600160a01b031663029c1cb7338b8b8b8b8b8b8b6040518963ffffffff1660e01b815260040180896001600160a01b03168152602001886001600160a01b031681526020018715158152602001868152602001856001600160a01b031681526020018415158152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505099505050505050505050506020604051808303816000875af1158015611129573d6000803e3d6000fd5b600254600160e01b900460ff166124b757604051636798480960e11b815260040160405180910390fd5b6002805460ff60e01b19169055565b6000806124d1612dd7565b6124d96130e9565b90925090506001600160801b038211806124f957506001600160801b0381115b156125da576006546001600160a01b03166001600160801b03831115612571576125667f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d4038894827fffffffffffffffffffffffffffffffff000000000000000000000000000000018601612d4d565b6001600160801b0392505b6001600160801b038211156125d8576125cd7f000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe3955827fffffffffffffffffffffffffffffffff000000000000000000000000000000018501612d4d565b6001600160801b0391505b505b600854660100000000000090046001600160801b031660008190036125fe57509091565b600b546001600160801b0380821691600160801b90041681851181851181806126245750805b156126bb57811561265c57612652846001600160801b03168803600160801b876001600160801b0316613935565b6000805490910190555b801561268f57612685836001600160801b03168703600160801b876001600160801b0316613935565b6001805490910190555b6001600160801b03808816908716600160801b026fffffffffffffffffffffffffffffffff191617600b555b50505050509091565b60008060008060008087600003612707576040517f79db984000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f80000000000000000000000000000000000000000000000000000000000000008803612747576040516334cb3a0160e11b815260040160405180910390fd5b6040805161014081018252600060208201819052606082018190526080820181905260a08201819052808b1360c08301529181018a9052600854600281810b61012084015263010000008204810b610100840152805461ffff600160d01b820481168552600160b81b82041660e08501526001600160a01b0381169850600160a01b9004900b9550660100000000000090046001600160801b031693509085900361281e576040517f812eb65500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b891561289757846001600160a01b0316886001600160a01b031610158061285357506401000276a36001600160a01b03891611155b1561288a576040517f1662672300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000546080820152612915565b846001600160a01b0316886001600160a01b03161115806128d5575073fffd8963efd1fc6a506488495d951d5263988d266001600160a01b03891610155b1561290c576040517f1662672300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460808201525b6129476040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b60008b61295957826101200151612960565b8261010001515b6001600160a01b03881683529050612977816140e9565b6001600160a01b03908116602084018190526129b4918e918a918e1611821515146129a65784602001516129a8565b8c5b888f8860e001516143dd565b60808601526060850152604084015260c084015190975015612a0c576129e38260800151836040015101613a38565b8b039a50612a026129f78360600151613a38565b6060850151906145af565b6060840152612a44565b612a198260600151613a38565b8b019a50612a3e612a338360800151846040015101613a38565b6060850151906145cb565b60608401525b825115612a8657825160808301516000916103e891612a62916145e1565b81612a6f57612a6f615746565b608085018051929091049182900390529490940193505b6001600160801b03851615612abd57612ab18260800151600160801b876001600160801b0316613935565b60808401805190910190525b8160200151876001600160a01b031603612bd9578260200151612af857600160208401528b612aee57600054612af2565b6001545b60a08401525b60008c15612b675750608083015160a0840151600283810b600081815260036020819052604082209081018054828601805490980390975595909403909455600190920154600160801b810490910b61010087015261012086019190915260001983019750600f0b9003612bc7565b5060a08301516080840151600283810b60008181526003602081905260409091209081018054828501805490970390965594909303909355600190910154600160981b810490910b6101208601526101008501919091529095508590600f0b5b612bd1868261460b565b955050612bfb565b81516001600160a01b03881614612bfb57612bf387613cd8565b955050612c22565b508915801590612c1d5750886001600160a01b0316866001600160a01b031614155b612947575b60008a83604001510390508260c0015115158c151514612c4757826060015181612c4e565b8083606001515b600280547fffffffffffffffffff000000000000000000000000000000000000000000000016600160a01b62ffffff8b160273ffffffffffffffffffffffffffffffffffffffff1916176001600160a01b038b161790556020850151919a509850159050612d23576101008201516101208301516008805462ffffff92831665ffffffffffff199091161763010000009290931691909102919091177fffffffffffffffffffff00000000000000000000000000000000ffffffffffff1666010000000000006001600160801b038716021790555b8a15612d36576080820151600055612d3f565b60808201516001555b505093975093979195509350565b612d588383836146b7565b505050565b6040517f2c8958f60000000000000000000000000000000000000000000000000000000081523390632c8958f690612d9f9087908790879087906004016157e8565b600060405180830381600087803b158015612db957600080fd5b505af1158015612dcd573d6000803e3d6000fd5b5050505050505050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d40388946001600160a01b0316906370a08231906024015b602060405180830381865afa158015612e58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e7c9190615808565b905090565b81811715613056576004546cffffffffffffffffffffffffff640100000000820481168401917101000000000000000000000000000000000090041682016000612ec84290565b60045490915061708063ffffffff9182168303909116101580612ef757506cffffffffffffffffffffffffff83115b80612f0e57506cffffffffffffffffffffffffff82115b15612fd5576006546001600160a01b03168315612f5057612f507f00000000000000000000000029219dd400f2bf60e5a23d13be72b486d40388948286612d4d565b8215612f8157612f817f000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe39558285612d4d565b600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff8416179055612fba84613a38565b8803612fc584613a38565b9098509096039550600092508291505b50600480547fffff0000000000000000000000000000000000000000000000000000ffffffff16710100000000000000000000000000000000006cffffffffffffffffffffffffff938416027fffffffffffffffffffffffffffffff00000000000000000000000000ffffffff161764010000000093909216929092021790555b838317156130e357600b546001600160801b0380821691600160801b90041685156130995761308d6130888784615821565b61474d565b6001600160801b031691505b84156130b8576130ac6130888683615821565b6001600160801b031690505b6001600160801b039182169116600160801b026fffffffffffffffffffffffffffffffff191617600b555b50505050565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe39556001600160a01b0316906370a0823190602401612e3b565b60028054600160c81b90041615612dcd57612dcd639cb5a96360e01b600560009054906101000a90046001600160a01b03166001600160a01b0316639cb5a963338c8c8c8c8c8c8c8c6040518a63ffffffff1660e01b8152600401808a6001600160a01b03168152602001896001600160a01b031681526020018815158152602001878152602001866001600160a01b03168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509a50505050505050505050506020604051808303816000875af1158015611129573d6000803e3d6000fd5b600254600160e01b900460ff1661327857604051636798480960e11b815260040160405180910390fd5b565b604080517fe8ae2b690000000000000000000000000000000000000000000000000000000081527fb73ce166ead2f8e9add217713a7989e4edfba9625f71dfd2516204bb67ad3442600482015233602482015290516001600160a01b037f0000000000000000000000008121a3f8c4176e9765deea0b95fa2bdfd3016794169163e8ae2b699160448083019260209291908290030181865afa158015613324573d6000803e3d6000fd5b505050506040513d602081101561333a57600080fd5b5051613278576040517f932984d200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600280547fffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffff16600160d01b61ffff8416908102919091179091556040519081527f3647dccc990d4941b0b05b32527ef493a98d6187b20639ca2f9743f3b55ca5e1906020015b60405180910390a150565b6133f0620d89e719615849565b60020b8160020b131561342f576040517f1445443d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160020b8160020b1361346e576040517fd9a841a700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b620d89e719600283900b1215611714576040517f746b1fc400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254600160c81b900460041615613598576005546040517f5e2411b20000000000000000000000000000000000000000000000000000000080825233600483018181526001600160a01b038b8116602486015260028b810b60448701528a900b6064860152600f89900b608486015260c060a4860190815260c486018890526135989694959190941693635e2411b293928d928d928d928d928d928d929160e401848480828437600081840152601f19601f820116905080830192505050985050505050505050506020604051808303816000875af1158015611129573d6000803e3d6000fd5b505050505050565b62ffffff818116908316601885811b91909117901b176000908152600a602052604090205b9392505050565b6002805460008054600154919384936001600160a01b03811693600160a01b90910490910b918491829190600f89900b156136285761361260038c878c86866000614763565b935061362560038b878c86866001614763565b92505b60008061363a60038e8e8a8888614876565b9150915061364a8e8c8484614914565b5050505086600f0b6000146136e45781806136625750805b1561367b5761367b898984848760008d600f0b12614a12565b600061368a8a8a8a8789613a5f565b91985096509050600f81900b156136e2576008546136bb90660100000000000090046001600160801b03168961460b565b600860066101000a8154816001600160801b0302191690836001600160801b031602179055505b505b5050505094509492505050565b600254600160c81b900460081615612dcd57612dcd63d685201060e01b600560009054906101000a90046001600160a01b03166001600160a01b031663d6852010338c8c8c8c8c8c8c8c6040518a63ffffffff1660e01b8152600401808a6001600160a01b03168152602001896001600160a01b031681526020018860020b81526020018760020b815260200186600f0b8152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509a50505050505050505050506020604051808303816000875af1158015611129573d6000803e3d6000fd5b7fffffffff0000000000000000000000000000000000000000000000000000000082811690821614611714576040517fd3f5153b0000000000000000000000000000000000000000000000000000000081527fffffffff000000000000000000000000000000000000000000000000000000008216600482015260240160405180910390fd5b60008315806138945750508282028284828161389157613891615746565b04145b156138b557600082116138a657600080fd5b818104908290061515016135c5565b6138c0848484613935565b9050600082806138d2576138d2615746565b84860911156135c55760001981106138e957600080fd5b6001019392505050565b6040517fa60b0d3c000000000000000000000000000000000000000000000000000000008152339063a60b0d3c90612d9f9087908790879087906004016157e8565b6000838302816000198587098281108382030391505080841161395757600080fd5b8060000361396a575082900490506135c5565b8385870960008581038616958690049560026003880281188089028203028089028203028089028203028089028203028089028203028089029091030291819003819004600101858411909403939093029190930391909104170290509392505050565b600280547fffffffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffff16600160b81b61ffff8416908102919091179091556040519081527f598b9f043c813aa6be3426ca60d1c65d17256312890be5118dab55b0775ebe2a906020016133d8565b806000811215613a4757600080fd5b919050565b806000600f82900b1215613a4757600080fd5b600080600080613a6e896140e9565b90506000613a7b896140e9565b90506000808b60020b8960020b1215613aa057613a9984848c614b0b565b9150613ade565b8a60020b8960020b1215613ad057613ab988848c614b0b565b9150613ac684898c614b4b565b9050899450613ade565b613adb84848c614b4b565b90505b60008a600f0b12613af0578181613af9565b81600003816000035b909d909c50949a509398505050505050505050565b6040517f3dd657c50000000000000000000000000000000000000000000000000000000081523390633dd657c590612d9f9087908790879087906004016157e8565b600280547fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff16600160c81b60ff8416908102919091179091556040519081527f3a6271b36c1b44bd6a0a0d56230602dc6919b7c17af57254306fadf5fee69dc3906020016133d8565b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527f27a3944eff2135a57675f17e72501038982b73620d01f794c72e93d61a3932a2906020016133d8565b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fb0b573c1f636e1f8bd9b415ba6c04d6dd49100bc25493fc6305b65ec0e581df3906020016133d8565b600880547fffffffffffffff000000ffffffffffffffffffffffffffffffffffffffffffff16600160b01b62ffffff841602179055604051600282900b81527f01413b1d5d4c359e9a0daa7909ecda165f6e8c51fe2ff529d74b22a5a7c02645906020016133d8565b60006401000276a36001600160a01b0383161080613d13575073fffd8963efd1fc6a506488495d951d5263988d266001600160a01b03831610155b15613d4a576040517f55cf1e2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b77ffffffffffffffffffffffffffffffffffffffff00000000602083901b166001600160801b03811160071b81811c67ffffffffffffffff811160061b90811c63ffffffff811160051b90811c61ffff811160041b90811c60ff8111600390811b91821c600f811160021b90811c918211600190811b92831c97908811961790941790921717909117171760808110613deb57607f810383901c9150613df5565b80607f0383901b91505b908002607f81811c60ff83811c9190911c800280831c81831c1c800280841c81841c1c800280851c81851c1c800280861c81861c1c800280871c81871c1c800280881c81881c1c800280891c81891c1c8002808a1c818a1c1c8002808b1c818b1c1c8002808c1c818c1c1c8002808d1c818d1c1c8002808e1c9c81901c9c909c1c80029c8d901c9e9d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808f0160401b60c09190911c678000000000000000161760c19b909b1c674000000000000000169a909a1760c29990991c672000000000000000169890981760c39790971c671000000000000000169690961760c49590951c670800000000000000169490941760c59390931c670400000000000000169290921760c69190911c670200000000000000161760c79190911c670100000000000000161760c89190911c6680000000000000161760c99190911c6640000000000000161760ca9190911c6620000000000000161760cb9190911c6610000000000000161760cc9190911c6608000000000000161760cd9190911c66040000000000001617693627a301d71055774c8581027ffffffffffffffffffffffffffffffffffd709b7e5480fba5a50fed5e62ffc5568101608090811d906fdb2df09e81959a81455e260799a0632f8301901d600281810b9083900b1461402257886001600160a01b0316614007826140e9565b6001600160a01b0316111561401c5781614024565b80614024565b815b9998505050505050505050565b6040517f82b13d8d0000000000000000000000000000000000000000000000000000000081523060048201526000908190819081906001600160a01b037f0000000000000000000000008121a3f8c4176e9765deea0b95fa2bdfd301679416906382b13d8d90602401608060405180830381865afa1580156140b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140db919061587e565b935093509350935090919293565b6000600282900b60171d62ffffff818401821816620d89e881111561413a576040517f3c10250f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160801b600182161561415b57506ffffcb933bd6fad37aa2d162d1a5940015b600282161561417a576ffff97272373d413259a46990580e213a0260801c5b6004821615614199576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b60088216156141b8576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b60108216156141d7576fffcb9843d60f6159c9db58835c9266440260801c5b60208216156141f6576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615614215576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615614234576ffe5dee046a99a2a811c461f1969c30530260801c5b610100821615614254576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b610200821615614274576ff987a7253ac413176f2b074cf7815e540260801c5b610400821615614294576ff3392b0822b70005940c7a398e4b70f30260801c5b6108008216156142b4576fe7159475a2c29b7443b29c7fa6e889d90260801c5b6110008216156142d4576fd097f3bdfd2022b8845ad8f792aa58250260801c5b6120008216156142f4576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615614314576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615614334576f31be135f97d08fd981231505542fcfa60260801c5b62010000821615614355576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b62020000821615614375576e5d6af8dedb81196699c329225ee6040260801c5b6204000082106143bb576204000082161561439e576d2216e584f5fa1ea926041bedfe980260801c5b620800008216156143bb576b048a170391f7dc42444e8fa20260801c5b60008560020b13156143cc57600019045b63ffffffff0160201c949350505050565b60008060008061569d8a6143f357614b7b6143f7565b614b8a5b9050600087126144cf576000614424888861ffff16620f42400362ffffff16620f424062ffffff16613935565b90506144358a8c8b8563ffffffff16565b94508481106144625789955061445b8561ffff891662ffffff620f424082900316613873565b92506144a8565b61446e8b8a838f614b99565b9550856001600160a01b03168a6001600160a01b0316036144915761449161575c565b6144a0868c8b8563ffffffff16565b945084880392505b6144c7868c8b8f6144bb57614bb26144bf565b614bc15b63ffffffff16565b9350506145a1565b61569d8b6144df57614bb26144e3565b614bc15b90506144f48a8c8b8463ffffffff16565b9350876000039750600088121561451e576040516334cb3a0160e11b815260040160405180910390fd5b83881061452d57899550614572565b6145398b8a8a8f614bd0565b9550856001600160a01b03168a6001600160a01b03161461456657614563868c8b8463ffffffff16565b93505b87841115614572578793505b614581868c8b8563ffffffff16565b945061459d8561ffff891662ffffff620f424082900316613873565b9250505b509650965096509692505050565b808203828113156000831215146145c557600080fd5b92915050565b818101828112156000831215146145c557600080fd5b6000821580614602575050818102818382816145ff576145ff615746565b04145b6145c557600080fd5b60008082600f0b121561466657508082016001600160801b0380841690821610614661576040517f1301f74800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6145c5565b826001600160801b03168284019150816001600160801b031610156145c5576040517f997402f200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006040517fa9059cbb000000000000000000000000000000000000000000000000000000006000526001600160a01b03841660045282602452602060006044600080895af19150813d1560203d1460016000511416171691508060405250806130e3576040517fe465903e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806001600160801b0381168114613a4757600080fd5b600286900b6000908152602088905260408120805482614783828961460b565b6001600160801b031690506d09745258e83de0d0f4e400fce7998111156147d6576040517f25b8364a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001830154600f0b856147fa5788600f0b81600f0b6147f59190615821565b61480c565b88600f0b81600f0b61480c91906158e8565b6001850180546fffffffffffffffffffffffffffffffff19166001600160801b039290921691909117905581845581159450600083900361486757841594508960020b8b60020b136148675760038401879055600284018890555b50505050979650505050505050565b600285810b60009081526020889052604080822087840b8084529183209293849391929088900b12156148ec578860020b8760020b126148c7578160020154860393508160030154850392506148d6565b81600201549350816003015492505b6002810154600382015494039390920391614907565b81600201548160020154039350816003015481600301540392505b5050965096945050505050565b8354600f84900b60000361493e57806001600160801b031660000361493957506130e3565b614954565b614948818561460b565b6001600160801b031685555b60018501546002860154600085831461498b57600188018690556149888387036001600160801b038616600160801b613935565b90505b60008583146149b857600289018690556149b58387036001600160801b038716600160801b613935565b90505b6001600160801b038282171615614a0757600389018054600160801b6001600160801b03808316860181166fffffffffffffffffffffffffffffffff1990931683178290048116850116021790555b505050505050505050565b60085463010000008104600290810b919081900b90600160c81b900463ffffffff168282828915614a5357614a4b8c898386868c614be0565b919450925090505b8815614a6f57614a678b898386868c614be0565b919450925090505b8260020b8660020b141580614a8a57508160020b8560020b14155b80614aa157508363ffffffff168163ffffffff1614155b15614afd576008805462ffffff80861663010000000265ffffffffffff1963ffffffff8616600160c81b02167fffffff00000000ffffffffffffffffffffffffffffffffffffff00000000000090931692909217908516171790555b505050505050505050505050565b60008082600f0b1215614b3357614b2b6118158585856000036000614cd5565b600003614b43565b614b436118158585856001614cd5565b949350505050565b60008082600f0b1215614b6b57614b2b6118158585856000036000614d82565b614b436118158585856001614d82565b6000614b438385846001614d82565b6000614b438484846001614cd5565b6000614ba9858585856001614e05565b95945050505050565b6000614b438385846000614cd5565b6000614b438484846000614d82565b6000614ba9858585856000614e05565b60008060008315614c2a57600080614bf960038c615047565b915091508a60020b8860020b03614c1257819750614c23565b8a60020b8760020b03614c23578096505b5050614cb3565b6000808a60020b8860020b128015614c4757508a60020b8760020b135b15614c7057508690508560028a810b908c900b1315614c68578a9650614ca3565b8a9750614ca3565b614c7e600760098b8e615217565b600281810b600090815260036020526040902060010154600160801b9004900b925090505b614cb060038c84846152e9565b50505b6000614cc3600760098a8d615434565b969a9599509597509395505050505050565b60006001600160a01b0385850381169085168110614cf257600080fd5b7bffffffffffffffffffffffffffffffff000000000000000000000000606085901b1683614d4b57866001600160a01b0316614d388383896001600160a01b0316613935565b81614d4557614d45615746565b04614d77565b614d77614d628383896001600160a01b0316613873565b886001600160a01b0316808204910615150190565b979650505050505050565b6000846001600160a01b0316846001600160a01b03161015614da357600080fd5b6001600160a01b038585031682614dda57614dd581856001600160801b03166c01000000000000000000000000613935565b614dfb565b614dfb81856001600160801b03166c01000000000000000000000000613873565b9695505050505050565b6000856001600160a01b0316600003614e1d57600080fd5b846001600160801b0316600003614e3357600080fd5b83600003614e42575084614ba9565b81151583151503614f50577bffffffffffffffffffffffffffffffff000000000000000000000000606086901b168215614efe576001600160a01b03871685810290868281614e9357614e93615746565b0403614ec357818101828110614ec157614eb7838a6001600160a01b031683613873565b9350505050614ba9565b505b614ef582614eea888b6001600160a01b03168681614ee357614ee3615746565b04906154cc565b808204910615150190565b92505050614ba9565b6001600160a01b03871685810290868281614f1b57614f1b615746565b0414614f2657600080fd5b808211614f3257600080fd5b614ef5614f4b838a6001600160a01b0316848603613873565b6154dc565b8115614fc657614fbf614f4b6001600160a01b03861115614f9157614f8c866c01000000000000000000000000896001600160801b0316613935565b614faf565b6001600160801b038716606087901b81614fad57614fad615746565b045b6001600160a01b038916906154cc565b9050614ba9565b60006001600160a01b03851115614ffd57614ff8856c01000000000000000000000000886001600160801b0316613873565b61501a565b61501a606086901b6001600160801b038816808204910615150190565b905080876001600160a01b03161161503157600080fd5b6001600160a01b03871603905095945050505050565b600281810b60008181526020859052604081206001810180548383557fffffffffffffffffffff000000000000000000000000000000000000000000008116909155818501839055600390910191909155600160801b8104830b92600160981b909104900b90620d89e71914806150cf57506150c6620d89e719615849565b60020b8360020b145b1561514b57600283900b6000908152602085905260409020600101805462ffffff808516600160801b0272ffffff0000000000000000000000000000000019918516600160981b02919091167fffffffffffffffffffff000000000000ffffffffffffffffffffffffffffffff90921691909117179055615210565b8060020b8260020b0361518a576040517f0d6e094900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282810b6000908152602086905260408082206001908101805462ffffff808816600160981b027fffffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffff909216919091179091559385900b83529120018054918416600160801b0272ffffff00000000000000000000000000000000199092169190911790555b9250929050565b600190810190600090600883811d610d8a01901c90829061ffff83161b851663ffffffff161561527a5761524b87856154f2565b90945090925090508015615260575050614b43565b61527186610d8b840160010b6154f2565b90945090925090505b806152bd576152988563ffffffff168360010193508360010b615523565b9093509050806152b05750620d89e89150614b439050565b6152ba8684615671565b92505b614d77877ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2768501615671565b600283900b620d89e71914806153105750615307620d89e719615849565b60020b8360020b145b6130e3578260020b8260020b12801561532e57508260020b8160020b135b615364576040517fe45ac17d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600283810b60009081526020959095526040808620600190810180547fffffffffffffffffffff000000000000ffffffffffffffffffffffffffffffff16600160981b62ffffff878116820272ffffff000000000000000000000000000000001990811693909317600160801b8a831681029190911790945597860b8a52848a20840180547fffffffffffffffffffff000000ffffffffffffffffffffffffffffffffffffff1698909916908102979097179097559390920b865290942090930180549092169202919091179055565b816000806154718785600881901d600181810b60009081526020949094526040909320805460ff9093169390931b80831890935591811490151891565b9150915081156154c257610d8a01600181810b60081d80820b6000908152602089905260409020805460ff9094169290921b8084189092558215919092148181189350146154c2576001811b831892505b5050949350505050565b808201828110156145c557600080fd5b806001600160a01b0381168114613a4757600080fd5b600881901d600181900b60009081526020849052604081205481906155179085615523565b93969095509293505050565b60008060ff831684811c80830361553f578460ff179350615668565b7f555555555555555555555555555555555555555555555555555555555555555560008290038216908116156001600160801b0382161560071b1777ffffffffffffffff0000000000000000ffffffffffffffff82161560061b177bffffffff00000000ffffffff00000000ffffffff00000000ffffffff82161560051b177dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff82161560041b177eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff82161560031b177f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f82161560021b177f33333333333333333333333333333333333333333333333333333333333333339091161560011b1760ff1685019350600192505b50509250929050565b600181900b600090815260208390526040902054600882901b906156959082615523565b509392505050565b613278615908565b634e487b7160e01b600052601160045260246000fd5b808201808211156145c5576145c56156a5565b600081600f0b7fffffffffffffffffffffffffffffffff800000000000000000000000000000008103615703576157036156a5565b60000392915050565b6001600160801b0381811683821601908082111561572c5761572c6156a5565b5092915050565b818103818111156145c5576145c56156a5565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052600160045260246000fd5b805161ffff81168114613a4757600080fd5b60006020828403121561579657600080fd5b6135c582615772565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b848152836020820152606060408201526000614dfb60608301848661579f565b60006020828403121561581a57600080fd5b5051919050565b8082018281126000831280158216821582161715615841576158416156a5565b505092915050565b60008160020b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8000008103615703576157036156a5565b6000806000806080858703121561589457600080fd5b61589d85615772565b935060208501518060020b81146158b357600080fd5b92506158c160408601615772565b915060608501516001600160a01b03811681146158dd57600080fd5b939692955090935050565b818103600083128015838313168383128216171561572c5761572c6156a5565b634e487b7160e01b600052605160045260246000fdfea164736f6c6343000814000a
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.