Overview
S Balance
0 S
S Value
-More Info
Private Name Tags
ContractCreator
Loading...
Loading
This contract contains unverified libraries: NFTDescriptor
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xceD0d471...4ACa526f0 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
QuoterV2
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 100 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity ^0.8.26;pragma abicoder v2;import '../../core/libraries/SafeCast.sol';import '../../core/libraries/TickMath.sol';import '../../core/libraries/TickBitmap.sol';import '../../core/interfaces/IRamsesV3Pool.sol';import '../../core/interfaces/callback/IUniswapV3SwapCallback.sol';import '../interfaces/IQuoterV2.sol';import '../base/PeripheryImmutableState.sol';import '../libraries/Path.sol';import '../libraries/PoolAddress.sol';import '../libraries/CallbackValidation.sol';import '../libraries/PoolTicksCounter.sol';/// @title Provides quotes for swaps/// @notice Allows getting the expected amount out or amount in for a given swap without executing the swap/// @dev These functions are not gas efficient and should _not_ be called on chain. Instead, optimistically execute/// the swap and check the amounts in the callback.contract QuoterV2 is IQuoterV2, IUniswapV3SwapCallback, PeripheryImmutableState {using Path for bytes;using SafeCast for uint256;using PoolTicksCounter for IRamsesV3Pool;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Safe casting methods/// @notice Contains methods for safely casting between typeslibrary SafeCast {/// @notice Cast a uint256 to a uint160, revert on overflow/// @param y The uint256 to be downcasted/// @return z The downcasted integer, now type uint160function toUint160(uint256 y) internal pure returns (uint160 z) {require((z = uint160(y)) == y);}/// @notice Cast a int256 to a int128, revert on overflow or underflow/// @param y The int256 to be downcasted/// @return z The downcasted integer, now type int128function toInt128(int256 y) internal pure returns (int128 z) {require((z = int128(y)) == y);}/// @notice Cast a uint256 to a int256, revert on overflow/// @param y The uint256 to be casted/// @return z The casted integer, now type int256function toInt256(uint256 y) internal pure returns (int256 z) {require(y < 2 ** 255);z = int256(y);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity ^0.8.26;/// @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**128library TickMath {error T();error R();/// @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 sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0)/// at the given tickfunction getSqrtRatioAtTick(int24 tick) internal pure returns (uint160 sqrtPriceX96) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity ^0.8.26;import {BitMath} from './BitMath.sol';/// @title Packed tick initialized state library/// @notice Stores a packed mapping of tick index to its initialized state/// @dev The mapping uses int16 for keys since ticks are represented as int24 and there are 256 (2^8) values per word.library TickBitmap {/// @notice Computes the position in the mapping where the initialized bit for a tick lives/// @param tick The tick for which to compute the position/// @return wordPos The key in the mapping containing the word in which the bit is stored/// @return bitPos The bit position in the word where the flag is storedfunction position(int24 tick) private pure returns (int16 wordPos, uint8 bitPos) {unchecked {wordPos = int16(tick >> 8);bitPos = uint8(int8(tick % 256));}}/// @notice Flips the initialized state for a given tick from false to true, or vice versa/// @param self The mapping in which to flip the tick/// @param tick The tick to flip/// @param tickSpacing The spacing between usable ticksfunction flipTick(mapping(int16 => uint256) storage self, int24 tick, int24 tickSpacing) internal {unchecked {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;import {IRamsesV3PoolImmutables} from './pool/IRamsesV3PoolImmutables.sol';import {IRamsesV3PoolState} from './pool/IRamsesV3PoolState.sol';import {IRamsesV3PoolDerivedState} from './pool/IRamsesV3PoolDerivedState.sol';import {IRamsesV3PoolActions} from './pool/IRamsesV3PoolActions.sol';import {IRamsesV3PoolOwnerActions} from './pool/IRamsesV3PoolOwnerActions.sol';import {IRamsesV3PoolErrors} from './pool/IRamsesV3PoolErrors.sol';import {IRamsesV3PoolEvents} from './pool/IRamsesV3PoolEvents.sol';/// @title The interface for a Ramses V3 Pool/// @notice A Ramses pool facilitates swapping and automated market making between any two assets that strictly conform/// to the ERC20 specification/// @dev The pool interface is broken up into many smaller piecesinterface IRamsesV3Pool isIRamsesV3PoolImmutables,IRamsesV3PoolState,IRamsesV3PoolDerivedState,IRamsesV3PoolActions,IRamsesV3PoolOwnerActions,IRamsesV3PoolErrors,IRamsesV3PoolEvents{/// @notice if a new period, advance on interactionfunction _advancePeriod() external;
12345678910111213141516171819// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @dev original UniswapV3 callbacks maintained to ensure seamless integrations/// @title Callback for IUniswapV3PoolActions#swap/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interfaceinterface IUniswapV3SwapCallback {/// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#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 UniswapV3Pool deployed by the canonical UniswapV3Factory./// 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 IUniswapV3PoolActions#swap callfunction uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) external;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.7.5;pragma abicoder v2;/// @title QuoterV2 Interface/// @notice Supports quoting the calculated amounts from exact input or exact output swaps./// @notice For each pool also tells you the number of initialized ticks crossed and the sqrt price of the pool after the swap./// @dev These functions are not marked view because they rely on calling non-view functions and reverting/// to compute the result. They are also not gas efficient and should not be called on-chain.interface IQuoterV2 {/// @notice Returns the amount out received for a given exact input swap without executing the swap/// @param path The path of the swap, i.e. each token pair and the pool fee/// @param amountIn The amount of the first token to swap/// @return amountOut The amount of the last token that would be received/// @return sqrtPriceX96AfterList List of the sqrt price after the swap for each pool in the path/// @return initializedTicksCrossedList List of the initialized ticks that the swap crossed for each pool in the path/// @return gasEstimate The estimate of the gas that the swap consumesfunction quoteExactInput(bytes memory path, uint256 amountIn)externalreturns (uint256 amountOut,uint160[] memory sqrtPriceX96AfterList,uint32[] memory initializedTicksCrossedList,uint256 gasEstimate);
123456789101112131415161718// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity ^0.8.26;import '../interfaces/IPeripheryImmutableState.sol';/// @title Immutable state/// @notice Immutable state used by periphery contractsabstract contract PeripheryImmutableState is IPeripheryImmutableState {/// @inheritdoc IPeripheryImmutableStateaddress public immutable override deployer;/// @inheritdoc IPeripheryImmutableStateaddress public immutable override WETH9;constructor(address _deployer, address _WETH9) {deployer = _deployer;WETH9 = _WETH9;}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.6.0;import './BytesLib.sol';/// @title Functions for manipulating path data for multihop swapslibrary Path {using BytesLib for bytes;/// @dev The length of the bytes encoded addressuint256 private constant ADDR_SIZE = 20;/// @dev The length of the bytes encoded feeuint256 private constant FEE_SIZE = 3;/// @dev The offset of a single token address and pool feeuint256 private constant NEXT_OFFSET = ADDR_SIZE + FEE_SIZE;/// @dev The offset of an encoded pool keyuint256 private constant POP_OFFSET = NEXT_OFFSET + ADDR_SIZE;/// @dev The minimum length of an encoding that contains 2 or more poolsuint256 private constant MULTIPLE_POOLS_MIN_LENGTH = POP_OFFSET + NEXT_OFFSET;/// @notice Returns true iff the path contains two or more pools/// @param path The encoded swap path/// @return True if path contains two or more pools, otherwise falsefunction hasMultiplePools(bytes memory path) internal pure returns (bool) {return path.length >= MULTIPLE_POOLS_MIN_LENGTH;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Provides functions for deriving a pool address from the deployer, tokens, and the feelibrary PoolAddress {bytes32 internal constant POOL_INIT_CODE_HASH = 0x27c3e2ae1bcb368a6736910a5545ee0e77b18926879503a168ca167c0861fe56;error TokenOrder();/// @notice The identifying key of the poolstruct PoolKey {address token0;address token1;int24 tickSpacing;}/// @notice Returns PoolKey: the ordered tokens with the matched fee levels/// @param tokenA The first token of a pool, unsorted/// @param tokenB The second token of a pool, unsorted/// @param tickSpacing The tickSpacing of the pool/// @return Poolkey The pool details with ordered token0 and token1 assignmentsfunction getPoolKey(address tokenA, address tokenB, int24 tickSpacing) internal pure returns (PoolKey memory) {if (tokenA > tokenB) (tokenA, tokenB) = (tokenB, tokenA);return PoolKey({token0: tokenA, token1: tokenB, tickSpacing: tickSpacing});}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity ^0.8.0;import '../../core/interfaces/IRamsesV3Pool.sol';import './PoolAddress.sol';/// @notice Provides validation for callbacks from Ramses V3 Poolslibrary CallbackValidation {/// @notice Returns the address of a valid Ramses V3 Pool/// @param deployer The contract address of the Ramses V3 deployer/// @param tokenA The contract address of either token0 or token1/// @param tokenB The contract address of the other token/// @param tickSpacing The tickSpacing of the pool/// @return pool The V3 pool contract addressfunction verifyCallback(address deployer,address tokenA,address tokenB,int24 tickSpacing) internal view returns (IRamsesV3Pool pool) {return verifyCallback(deployer, PoolAddress.getPoolKey(tokenA, tokenB, tickSpacing));}/// @notice Returns the address of a valid Ramses V3 Pool/// @param deployer The contract address of the Ramses V3 deployer/// @param poolKey The identifying key of the V3 pool
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.6.0;import '../../core/interfaces/IRamsesV3Pool.sol';library PoolTicksCounter {/// @dev This function counts the number of initialized ticks that would incur a gas cost between tickBefore and tickAfter./// When tickBefore and/or tickAfter themselves are initialized, the logic over whether we should count them depends on the/// direction of the swap. If we are swapping upwards (tickAfter > tickBefore) we don't want to count tickBefore but we do/// want to count tickAfter. The opposite is true if we are swapping downwards.function countInitializedTicksCrossed(IRamsesV3Pool self,int24 tickBefore,int24 tickAfter) internal view returns (uint32 initializedTicksCrossed) {int16 wordPosLower;int16 wordPosHigher;uint8 bitPosLower;uint8 bitPosHigher;bool tickBeforeInitialized;bool tickAfterInitialized;{/// @dev Get the key and offset in the tick bitmap of the active tick before and after the swap.int16 wordPos = int16((tickBefore / self.tickSpacing()) >> 8);uint8 bitPos = uint8(int8((tickBefore / self.tickSpacing()) % 256));
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity ^0.8.26;/// @title BitMath/// @dev This library provides functionality for computing bit properties of an unsigned integerlibrary BitMath {/// @notice Returns the index of the most significant bit of the number,/// where the least significant bit is at index 0 and the most significant bit is at index 255/// @dev The function satisfies the property:/// x >= 2**mostSignificantBit(x) and x < 2**(mostSignificantBit(x)+1)/// @param x the value for which to compute the most significant bit, must be greater than 0/// @return r the index of the most significant bitfunction mostSignificantBit(uint256 x) internal pure returns (uint8 r) {require(x > 0);unchecked {if (x >= 0x100000000000000000000000000000000) {x >>= 128;r += 128;}if (x >= 0x10000000000000000) {x >>= 64;r += 64;}if (x >= 0x100000000) {x >>= 32;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Pool state that never changes/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same valuesinterface IRamsesV3PoolImmutables {/// @notice The contract that deployed the pool, which must adhere to the IRamsesV3Factory 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 pool's fee in hundredths of a bip, i.e. 1e-6/// @return The feefunction fee() external view returns (uint24);/// @notice The pool tick spacing/// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive/// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, .../// This value is an int24 to avoid casting even though it is always positive.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Pool state that can change/// @notice These methods compose the pool's state, and can change with any frequency including multiple times/// per transactioninterface IRamsesV3PoolState {/// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas/// when accessed externally./// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value/// @return tick The current tick of the pool, i.e. according to the last tick transition that was run./// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick/// boundary./// @return observationIndex The index of the last oracle observation that was written,/// @return observationCardinality The current maximum number of observations stored in the pool,/// @return observationCardinalityNext The next maximum number of observations, to be updated when the observation./// @return feeProtocol The protocol fee for both tokens of the pool./// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0/// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee./// unlocked Whether the pool is currently locked to reentrancyfunction slot0()externalviewreturns (uint160 sqrtPriceX96,int24 tick,
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Pool state that is not stored/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the/// blockchain. The functions here may have variable gas costs.interface IRamsesV3PoolDerivedState {/// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp/// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing/// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,/// you must call it with secondsAgos = [3600, 0]./// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in/// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio./// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned/// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp/// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block/// timestampfunction observe(uint32[] calldata secondsAgos) external view returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);/// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range/// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed./// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first/// snapshot is taken and the second snapshot is taken./// @param tickLower The lower tick of the range
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Permissionless pool actions/// @notice Contains pool methods that can be called by anyoneinterface IRamsesV3PoolActions {/// @notice Sets the initial price for the pool/// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value/// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96function initialize(uint160 sqrtPriceX96) external;/// @notice Adds liquidity for the given recipient/tickLower/tickUpper position/// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback/// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends/// on tickLower, tickUpper, the amount of liquidity, and the current price./// @param recipient The address for which the liquidity will be created/// @param index The index for which the liquidity will be created/// @param tickLower The lower tick of the position in which to add liquidity/// @param tickUpper The upper tick of the position in which to add liquidity/// @param amount The amount of liquidity to mint/// @param data Any data that should be passed through to the callback/// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback/// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callbackfunction mint(address recipient,uint256 index,
1234567891011121314151617181920212223// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Permissioned pool actions/// @notice Contains pool methods that may only be called by the factory ownerinterface IRamsesV3PoolOwnerActions {/// @notice Set the denominator of the protocol's % share of the feesfunction setFeeProtocol() external;/// @notice Collect the protocol fee accrued to the pool/// @param recipient The address to which collected protocol fees should be sent/// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1/// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0/// @return amount0 The protocol fee collected in token0/// @return amount1 The protocol fee collected in token1function collectProtocol(address recipient,uint128 amount0Requested,uint128 amount1Requested) external returns (uint128 amount0, uint128 amount1);function setFee(uint24 _fee) external;}
1234567891011121314151617181920// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Errors emitted by a pool/// @notice Contains all events emitted by the poolinterface IRamsesV3PoolErrors {error LOK();error TLU();error TLM();error TUM();error AI();error M0();error M1();error AS();error IIA();error L();error F0();error F1();error SPL();}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Events emitted by a pool/// @notice Contains all events emitted by the poolinterface IRamsesV3PoolEvents {/// @notice Emitted exactly once by a pool when #initialize is first called on the pool/// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize/// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96/// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the poolevent Initialize(uint160 sqrtPriceX96, int24 tick);/// @notice Emitted when liquidity is minted for a given position/// @param sender The address that minted the liquidity/// @param owner The owner of the position and recipient of any minted liquidity/// @param tickLower The lower tick of the position/// @param tickUpper The upper tick of the position/// @param amount The amount of liquidity minted to the position range/// @param amount0 How much token0 was required for the minted liquidity/// @param amount1 How much token1 was required for the minted liquidityevent Mint(address sender,address indexed owner,int24 indexed tickLower,int24 indexed tickUpper,uint128 amount,
123456789101112// SPDX-License-Identifier: GPL-2.0-or-laterpragma solidity >=0.5.0;/// @title Immutable state/// @notice Functions that return immutable state of the routerinterface IPeripheryImmutableState {/// @return Returns the address of the Uniswap V3 deployerfunction deployer() external view returns (address);/// @return Returns the address of WETH9function WETH9() external view returns (address);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: GPL-2.0-or-later/** @title Solidity Bytes Arrays Utils* @author Gonçalo Sá <goncalo.sa@consensys.net>** @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.* The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.*/pragma solidity >=0.8.0 <0.9.0;library BytesLib {/// @notice merging errors between functions, might changeerror Overflow();error OutOfBounds();function slice(bytes memory _bytes, uint256 _start, uint256 _length) internal pure returns (bytes memory) {if (_length + 31 < _length) revert Overflow();if (_bytes.length < _start + _length) revert OutOfBounds();bytes memory tempBytes;assembly {switch iszero(_length)case 0 {// Get a location of some free memory and store it in tempBytes as// Solidity does for memory variables.
1234567891011121314151617181920212223242526{"remappings": ["@openzeppelin-contracts-upgradeable-5.1.0/=dependencies/@openzeppelin-contracts-upgradeable-5.1.0/","@openzeppelin/contracts/=dependencies/@openzeppelin-contracts-5.1.0/","forge-std/=dependencies/forge-std-1.9.4/src/","permit2/=lib/permit2/","@openzeppelin-3.4.2/=node_modules/@openzeppelin-3.4.2/","@openzeppelin-contracts-5.1.0/=dependencies/@openzeppelin-contracts-5.1.0/","@uniswap/=node_modules/@uniswap/","base64-sol/=node_modules/base64-sol/","eth-gas-reporter/=node_modules/eth-gas-reporter/","forge-std-1.9.4/=dependencies/forge-std-1.9.4/src/","hardhat/=node_modules/hardhat/","solmate/=node_modules/solmate/"],"optimizer": {"enabled": true,"runs": 100},"metadata": {"useLiteralContent": false,"bytecodeHash": "ipfs","appendCBOR": true},"outputSelection": {"*": {
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_deployer","type":"address"},{"internalType":"address","name":"_WETH9","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"OutOfBounds","type":"error"},{"inputs":[],"name":"Overflow","type":"error"},{"inputs":[],"name":"TokenOrder","type":"error"},{"inputs":[],"name":"WETH9","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deployer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"quoteExactInput","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint160[]","name":"sqrtPriceX96AfterList","type":"uint160[]"},{"internalType":"uint32[]","name":"initializedTicksCrossedList","type":"uint32[]"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"int24","name":"tickSpacing","type":"int24"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct IQuoterV2.QuoteExactInputSingleParams","name":"params","type":"tuple"}],"name":"quoteExactInputSingle","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceX96After","type":"uint160"},{"internalType":"uint32","name":"initializedTicksCrossed","type":"uint32"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"path","type":"bytes"},{"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"quoteExactOutput","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint160[]","name":"sqrtPriceX96AfterList","type":"uint160[]"},{"internalType":"uint32[]","name":"initializedTicksCrossedList","type":"uint32[]"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"int24","name":"tickSpacing","type":"int24"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"}],"internalType":"struct IQuoterV2.QuoteExactOutputSingleParams","name":"params","type":"tuple"}],"name":"quoteExactOutputSingle","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint160","name":"sqrtPriceX96After","type":"uint160"},{"internalType":"uint32","name":"initializedTicksCrossed","type":"uint32"},{"internalType":"uint256","name":"gasEstimate","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"path","type":"bytes"}],"name":"uniswapV3SwapCallback","outputs":[],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x60806040526004361015610011575f80fd5b5f3560e01c80632f80bb1d146100c75780634aa4a4fc1461007f5780639e7defe61461007a578063cdca175314610075578063d5f3948814610070578063fa461e331461006b5763fa6af90814610066575f80fd5b610565565b6103b5565b610371565b610357565b6102fd565b346100c3575f3660031901126100c3576040517f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad386001600160a01b03168152602090f35b5f80fd5b346100c3576100f16100e16100db366101ab565b9061063d565b90604094929451948594856101dc565b0390f35b634e487b7160e01b5f52604160045260245ffd5b606081019081106001600160401b0382111761012457604052565b6100f5565b90601f801991011681019081106001600160401b0382111761012457604052565b6001600160401b03811161012457601f01601f191660200190565b81601f820112156100c35780359061017c8261014a565b9261018a6040519485610129565b828452602083830101116100c357815f926020809301838601378301015290565b60406003198201126100c357600435906001600160401b0382116100c3576101d591600401610165565b9060243590565b9493929060808601908652608060208701528251809152602060a087019301905f5b81811061024d575050508482036040860152602080825193848152019101915f5b81811061023157505060609150930152565b835163ffffffff1683526020938401939092019160010161021f565b82516001600160a01b03168552602094850194909201916001016101fe565b6001600160a01b038116036100c357565b8060020b036100c357565b60a09060031901126100c3576040519060a082018281106001600160401b0382111761012457604052816004356102be8161026c565b81526024356102cc8161026c565b602082015260443560408201526064356102e58161027d565b60608201526080608435916102f98361026c565b0152565b346100c35760a03660031901126100c3576100f161032261031d36610288565b610816565b604080519485526001600160a01b03909316602085015263ffffffff9091169183019190915260608201529081906080820190565b346100c3576100f16100e161036b366101ab565b906109e2565b346100c3575f3660031901126100c3576040517f000000000000000000000000f76950f0a263f7e0079f8638033fb9e5cf9ae98f6001600160a01b03168152602090f35b346100c35760603660031901126100c3576004356024356044356001600160401b0381116100c3576103eb903690600401610165565b6104085f84139182801561055c575b61040390610a90565b610c4e565b9193909261044061041a848688610e84565b7f000000000000000000000000f76950f0a263f7e0079f8638033fb9e5cf9ae98f6115da565b501561052d5761048061047460049361045a60e094610a97565b6001600160a01b0380881690891610989097909690610d34565b6001600160a01b031690565b60405192838092633850c7bd851b82525afa918215610528576060945f925f946104ec575b50156104be575060405192835260208301526040820152fd5b925f54806104db575b505060405192835260208301526040820152fd5b6104e59114610a90565b5f806104c7565b90935061051291925060e03d60e011610521575b61050a8183610129565b810190610ab6565b5050505050919091925f6104a5565b503d610500565b6107cf565b9361048061047460049361054260e094610a97565b6001600160a01b0388811690881610989097909690610d34565b505f84136103fa565b346100c35760a03660031901126100c3576100f161032261058536610288565b610b24565b6001600160401b0381116101245760051b60200190565b906105ab8261058a565b6105b86040519182610129565b82815280926105c9601f199161058a565b0190602036910137565b80518210156105e75760209160051b010190565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b90601f820180921161061d57565b6105fb565b9190820180921161061d57565b5f19811461061d5760010190565b9190916106c75f9261065661065184610c3a565b6105a1565b94859461066561065186610c3a565b946107036106fd6106d26106f68a6106e15f9a8b995b6106bc6106878a610c4e565b604051949092909161069a60a087610129565b6001600160a01b039081168652166020850152604084015260020b6060830152565b5f6080820152610b24565b9691929d90946105d3565b6001600160a01b039091169052565b6106eb888c6105d3565b9063ffffffff169052565b8794610622565b9361062f565b946107118260429051101590565b1561074f57506106d285936106f6610687996106e16106c7610703976106bc61073c6106fd99610c92565b9e505090839d979598969493929161067b565b9796509193505050565b91908260409103126100c3576020825192015190565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b6001600160a01b039182168152911515602083015260408201929092529116606082015260a0608082018190526107cc9291019061076f565b90565b6040513d5f823e3d90fd5b3d15610804573d906107eb8261014a565b916107f96040519384610129565b82523d5f602084013e565b606090565b9190820391821161061d57565b80516020820180516060840180515f969593946001600160a01b03938416931683811094889485948594929360409391926108559260020b5b91610d34565b9661092f5a9961091461086a86880151610d74565b60808801519095906001600160a01b03165b6001600160a01b0381166109cf575084156109a9576109066108c96108bb6108b36401000276a45b9b5b516001600160a01b031690565b935160020b90565b94516001600160a01b031690565b88519485936020850191602b93916001600160601b03199060601b16835260e81b60148301526001600160601b03199060601b1660178201520190565b03601f198101835282610129565b8451630251596160e31b815295869485943060048701610793565b03815f6001600160a01b038a165af1908161097b575b506109745750505061096c92935061096661095e6107da565b925a90610809565b91610d83565b929391929091565b9250925092565b61099c9060403d6040116109a2575b6109948183610129565b810190610759565b50610945565b503d61098a565b6109066108c96108bb6108b373fffd8963efd1fc6a506488495d951d5263988d256108a4565b6108c96108bb6108b3610906939b6108a6565b9190916106c75f926109f661065184610c3a565b948594610a0561065186610c3a565b94610a446106fd6106d26106f68a6106e15f9a8b995b610a39610a278a610c4e565b9193906040519461069a60a087610129565b5f6080820152610816565b94610a528260429051101590565b1561074f57506106d285936106f6610a27996106e16106c7610a4497610a39610a7d6106fd99610c92565b9e505090839d9795989694939291610a1b565b156100c357565b600160ff1b811461061d575f0390565b519061ffff821682036100c357565b908160e09103126100c3578051610acc8161026c565b916020820151610adb8161027d565b91610ae860408201610aa7565b91610af560608301610aa7565b91610b0260808201610aa7565b9160a082015160ff811681036100c35760c09092015180151581036100c35790565b80516020820180516060840180515f9695610bab956001600160a01b0394851694168481109593948994859485949193604093610b639260020b61084f565b608082018051909a91998b939092916001600160a01b031615610c1b575b6109145a9a61087c610b9d610b9889860151610d74565b610a97565b96516001600160a01b031690565b03815f6001600160a01b038b165af19081610bfd575b50610bf45750505061096c939450610be86104746108bb610be06107da565b935a90610809565b610d83575f8055610d83565b93509350939050565b610c159060403d6040116109a2576109948183610129565b50610bc1565b848101515f55610b81565b634e487b7160e01b5f52601260045260245ffd5b51601319810190811161061d576017900490565b906014825110610c8357602082015160601c916017815110610c8357601781015190602b815110610c83576037015160601c91565b632d0483c560e21b5f5260045ffd5b805190601782039180831161061d5782610cab8161060f565b10610d25578151610cbd846017610622565b11610c8357601703610cdb5750506040515f81526020810160405290565b60405191601f8116916017831560051b80858701019484860193010101905b808410610d125750508252601f01601f191660405290565b9092602080918551815201930190610cfa565b631a93c68960e11b5f5260045ffd5b6001600160a01b0392610d7092610d4a92610e84565b7f000000000000000000000000f76950f0a263f7e0079f8638033fb9e5cf9ae98f610ee5565b1690565b600160ff1b8110156100c35790565b604051633850c7bd60e01b815291939192919060e0846004816001600160a01b0389165afa938415610528575f94610e5c575b50805160608103610de85750610dd881602080610de194518301019101611073565b9195909661114f565b9293929190565b604411610e2457610e08816024806004610e209501518301019101611000565b60405162461bcd60e51b815291829160048301611062565b0390fd5b60405162461bcd60e51b815260206004820152601060248201526f2ab732bc3832b1ba32b21032b93937b960811b6044820152606490fd5b610e7691945060e03d60e0116105215761050a8183610129565b50505050509050925f610db6565b91905f60408051610e9481610109565b8281526020810183905201526001600160a01b0381811690841611610edf575b60405192610ec184610109565b6001600160a01b03908116845216602083015260020b604082015290565b91610eb4565b8151602083018051909392916001600160a01b0390811691161115610ff157610906610fe26107cc9484610f7f610f446040610f3b610f2d6104749a5160018060a01b031690565b95516001600160a01b031690565b93015160020b90565b6040516001600160601b0319606095861b8116602083019081529490951b909416603485015260e81b604884015290919081604b8101610906565b5190206040516001600160f81b03196020820190815260609590951b6001600160601b031916602182015260358101919091527f27c3e2ae1bcb368a6736910a5545ee0e77b18926879503a168ca167c0861fe5660558201529182906075820190565b5190206001600160a01b031690565b631c669ec760e11b5f5260045ffd5b6020818303126100c3578051906001600160401b0382116100c3570181601f820112156100c3578051906110338261014a565b926110416040519485610129565b828452602083830101116100c357815f9260208093018386015e8301015290565b9060206107cc92818152019061076f565b908160609103126100c357805191604060208301516110918161026c565b9201516107cc8161027d565b908160209103126100c357516107cc8161027d565b60020b9060020b9081156110d457627fffff1981145f1983141661061d570590565b610c26565b9060020b9081156110d45760020b0790565b908160209103126100c3575190565b60ff1660ff039060ff821161061d57565b9063ffffffff8091169116019063ffffffff821161061d57565b60010b617fff811461061d5760010190565b63ffffffff5f199116019063ffffffff821161061d57565b6040516334324e9f60e21b81526001600160a01b039091169391925f929091602081600481895afa8015610528576111966111a2916111a8935f916115bb575b50876110b2565b60020b60081d60020b90565b60010b90565b916040516334324e9f60e21b81526020816004818a5afa8015610528576111de6111e9916111ef935f9161159c575b50886110b2565b6101009060020b0790565b60ff1690565b946040516334324e9f60e21b81526020816004818b5afa8015610528576111966111a291611225935f9161157d575b50856110b2565b926040516334324e9f60e21b81526020816004818c5afa8015610528576111de6111e99161125b935f9161155e575b50866110b2565b60405163299ce14b60e11b8152600186900b60048201529095906020816024818d5afa908115610528575f9161153f575b50600160ff88161b16151592836114e5575b836114d4575b60405163299ce14b60e11b8152600183900b60048201526020816024818e5afa908115610528575f916114b5575b50600160ff8b161b161515948561144b575b85611439575b50508460010b8160010b90808212918215611419575b5050156114065790969095939493905f1960ff9091161b5b8560010b8760010b8181136113d657146113ba575b60405163299ce14b60e11b8152600188900b6004820152916020836024818d5afa80156105285761137161137e9361137892611384965f9161138c575b50166115f7565b61ffff1690565b9061110b565b95611125565b945f19611318565b6113ad915060203d81116113b3575b6113a58183610129565b8101906110eb565b5f61136a565b503d61139b565b6113d06113c6866110fa565b60ff5f1991161c90565b1661132d565b50505095965092509250506113f6575b6113ed5790565b6107cc90611137565b9061140090611137565b906113e6565b9096939590945f1960ff9091161b611318565b14905080611429575b5f80611300565b5060ff861660ff89161115611422565b600290810b91900b1293505f806112ea565b6040516334324e9f60e21b81529095506020816004818e5afa80156105285761147c915f91611486575b50826110d9565b60020b15946112e4565b6114a8915060203d6020116114ae575b6114a08183610129565b81019061109d565b5f611475565b503d611496565b6114ce915060203d6020116113b3576113a58183610129565b5f6112d2565b92508360020b8360020b13926112a4565b6040516334324e9f60e21b81529093506020816004818d5afa801561052857611516915f91611520575b50856110d9565b60020b159261129e565b611539915060203d6020116114ae576114a08183610129565b5f61150f565b611558915060203d6020116113b3576113a58183610129565b5f61128c565b611577915060203d6020116114ae576114a08183610129565b5f611254565b611596915060203d6020116114ae576114a08183610129565b5f61121e565b6115b5915060203d6020116114ae576114a08183610129565b5f6111d7565b6115d4915060203d6020116114ae576114a08183610129565b5f61118f565b6001600160a01b03916115ec91610ee5565b16908133036100c357565b805f915b611603575090565b9061ffff1661ffff811461061d57600101905f1981019080821161061d5716806115fb56fea2646970667358221220c5bb234b34c397933b4efa43bcf77d31faa0d7f976ea7074af0dc9f9f55103f164736f6c634300081c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.