Source Code
Overview
S Balance
S Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Transfer Ownersh... | 14877094 | 316 days ago | IN | 0 S | 0.00143215 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
V3TwapShadowUtilities
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.28;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@uniswap/v3-core/contracts/libraries/FixedPoint96.sol";
import "../interfaces/IERC20Metadata.sol";
import "../interfaces/IUniswapV3Pool.sol";
import "../interfaces/IV3TwapUtilities.sol";
import "../libraries/FullMath.sol";
import "../libraries/PoolAddressShadow.sol";
import "../libraries/TickMath.sol";
contract V3TwapShadowUtilities is IV3TwapUtilities, Ownable {
uint32 constant INTERVAL = 10 minutes;
constructor() Ownable(_msgSender()) {}
function getV3Pool(address, address, address, uint24) external pure override returns (address) {
require(false, "I0");
return address(0);
}
function getV3Pool(address _v3Factory, address _t0, address _t1, int24 _tickSpacing)
external
pure
override
returns (address)
{
(address _token0, address _token1) = _t0 < _t1 ? (_t0, _t1) : (_t1, _t0);
PoolAddressShadow.PoolKey memory _key =
PoolAddressShadow.PoolKey({token0: _token0, token1: _token1, tickSpacing: _tickSpacing});
return PoolAddressShadow.computeAddress(_v3Factory, _key);
}
function getV3Pool(address, address, address) external pure override returns (address) {
require(false, "I1");
return address(0);
}
function getPoolPriceUSDX96(address _pricePool, address _nativeStablePool, address _WETH9)
public
view
override
returns (uint256)
{
address _token0 = IUniswapV3Pool(_nativeStablePool).token0();
uint256 _priceStableWETH9X96 = _adjustedPriceX96(
IUniswapV3Pool(_nativeStablePool), _token0 == _WETH9 ? IUniswapV3Pool(_nativeStablePool).token1() : _token0
);
if (_pricePool == _nativeStablePool) {
return _priceStableWETH9X96;
}
uint256 _priceMainX96 = _adjustedPriceX96(IUniswapV3Pool(_pricePool), _WETH9);
return (_priceStableWETH9X96 * _priceMainX96) / FixedPoint96.Q96;
}
function sqrtPriceX96FromPoolAndInterval(address _poolAddress)
public
view
override
returns (uint160 sqrtPriceX96)
{
sqrtPriceX96 = _sqrtPriceX96FromPoolAndInterval(_poolAddress, INTERVAL);
}
function sqrtPriceX96FromPoolAndPassedInterval(address _poolAddress, uint32 _interval)
external
view
override
returns (uint160 sqrtPriceX96)
{
sqrtPriceX96 = _sqrtPriceX96FromPoolAndInterval(_poolAddress, _interval);
}
function _sqrtPriceX96FromPoolAndInterval(address _poolAddress, uint32 _interval)
internal
view
returns (uint160 _sqrtPriceX96)
{
IUniswapV3Pool _pool = IUniswapV3Pool(_poolAddress);
if (_interval == 0) {
(_sqrtPriceX96,,,,,,) = _pool.slot0();
} else {
uint32[] memory secondsAgo = new uint32[](2);
secondsAgo[0] = _interval;
secondsAgo[1] = 0;
(int56[] memory tickCumulatives,) = _pool.observe(secondsAgo);
int56 tickCumulativesDelta = tickCumulatives[1] - tickCumulatives[0];
int24 arithmeticMeanTick = int24(tickCumulativesDelta / int32(_interval));
// Always round to negative infinity
if (tickCumulativesDelta < 0 && (tickCumulativesDelta % int32(_interval) != 0)) arithmeticMeanTick--;
_sqrtPriceX96 = TickMath.getSqrtRatioAtTick(arithmeticMeanTick);
}
}
function priceX96FromSqrtPriceX96(uint160 sqrtPriceX96) public pure override returns (uint256 priceX96) {
return FullMath.mulDiv(sqrtPriceX96, sqrtPriceX96, FixedPoint96.Q96);
}
function _adjustedPriceX96(IUniswapV3Pool _pool, address _numeratorToken) internal view returns (uint256) {
address _token1 = _pool.token1();
uint8 _decimals0 = IERC20Metadata(_pool.token0()).decimals();
uint8 _decimals1 = IERC20Metadata(_token1).decimals();
uint160 _sqrtPriceX96 = sqrtPriceX96FromPoolAndInterval(address(_pool));
uint256 _priceX96 = priceX96FromSqrtPriceX96(_sqrtPriceX96);
uint256 _ratioPriceX96 = _token1 == _numeratorToken ? _priceX96 : FixedPoint96.Q96 ** 2 / _priceX96;
return _token1 == _numeratorToken
? (_ratioPriceX96 * 10 ** _decimals0) / 10 ** _decimals1
: (_ratioPriceX96 * 10 ** _decimals1) / 10 ** _decimals0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.4.0;
/// @title FixedPoint96
/// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)
/// @dev Used in SqrtPriceMath.sol
library FixedPoint96 {
uint8 internal constant RESOLUTION = 96;
uint256 internal constant Q96 = 0x1000000000000000000000000;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
interface IERC20Metadata {
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
interface IUniswapV3Pool {
/// @notice The first of the two tokens of the pool, sorted by address
/// @return The token contract address
function token0() external view returns (address);
/// @notice The second of the two tokens of the pool, sorted by address
/// @return The token contract address
function token1() external view returns (address);
/// @notice The pool's fee in hundredths of a bip, i.e. 1e-6
/// @return The fee
function fee() external view returns (uint24);
/// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp
/// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing
/// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,
/// you must call it with secondsAgos = [3600, 0].
/// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in
/// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.
/// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned
/// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp
/// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block
/// timestamp
function observe(uint32[] calldata secondsAgos)
external
view
returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);
/// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas
/// when accessed externally.
/// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value
/// tick The current tick of the pool, i.e. according to the last tick transition that was run.
/// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick
/// boundary.
/// observationIndex The index of the last oracle observation that was written,
/// observationCardinality The current maximum number of observations stored in the pool,
/// observationCardinalityNext The next maximum number of observations, to be updated when the observation.
/// feeProtocol The protocol fee for both tokens of the pool.
/// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0
/// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.
/// unlocked Whether the pool is currently locked to reentrancy
function slot0()
external
view
returns (
uint160 sqrtPriceX96,
int24 tick,
uint16 observationIndex,
uint16 observationCardinality,
uint16 observationCardinalityNext,
uint8 feeProtocol,
bool unlocked
);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
interface IV3TwapUtilities {
function getV3Pool(address v3Factory, address token0, address token1) external view returns (address);
function getV3Pool(address v3Factory, address token0, address token1, uint24 poolFee)
external
view
returns (address);
function getV3Pool(address v3Factory, address token0, address token1, int24 tickSpacing)
external
view
returns (address);
function getPoolPriceUSDX96(address pricePool, address nativeStablePool, address WETH9)
external
view
returns (uint256);
function sqrtPriceX96FromPoolAndInterval(address pool) external view returns (uint160);
function sqrtPriceX96FromPoolAndPassedInterval(address pool, uint32 interval) external view returns (uint160);
function priceX96FromSqrtPriceX96(uint160 sqrtPriceX96) external pure returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// https://github.com/Uniswap/v3-core/blob/0.8/contracts/libraries/FullMath.sol
/// @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 bits
library 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/muldiv
function 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 + prod0
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(a, b, not(0))
prod0 := mul(a, b)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division
if (prod1 == 0) {
require(denominator > 0);
assembly {
result := div(prod0, denominator)
}
return result;
}
// Make sure the result is less than 2**256.
// Also prevents denominator == 0
require(denominator > prod1);
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0]
// Compute remainder using mulmod
uint256 remainder;
assembly {
remainder := mulmod(a, b, denominator)
}
// Subtract 256 bit number from 512 bit number
assembly {
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator
// Compute largest power of two divisor of denominator.
// Always >= 1.
uint256 twos = (0 - denominator) & denominator;
// Divide denominator by power of two
assembly {
denominator := div(denominator, twos)
}
// Divide [prod1 prod0] by the factors of two
assembly {
prod0 := div(prod0, twos)
}
// Shift in bits from prod1 into prod0. For this we need
// to flip `twos` such that it is 2**256 / twos.
// If twos is zero, then it becomes one
assembly {
twos := add(div(sub(0, twos), twos), 1)
}
prod0 |= prod1 * twos;
// Invert denominator mod 2**256
// Now that denominator is an odd number, it has an inverse
// modulo 2**256 such that denominator * inv = 1 mod 2**256.
// Compute the inverse by starting with a seed that is correct
// correct for four bits. That is, denominator * inv = 1 mod 2**4
uint256 inv = (3 * denominator) ^ 2;
// Now use Newton-Raphson iteration to improve the precision.
// Thanks to Hensel's lifting lemma, this also works in modular
// arithmetic, doubling the correct bits in each step.
inv *= 2 - denominator * inv; // inverse mod 2**8
inv *= 2 - denominator * inv; // inverse mod 2**16
inv *= 2 - denominator * inv; // inverse mod 2**32
inv *= 2 - denominator * inv; // inverse mod 2**64
inv *= 2 - denominator * inv; // inverse mod 2**128
inv *= 2 - denominator * inv; // inverse mod 2**256
// Because the division is now exact we can divide by multiplying
// with the modular inverse of denominator. This will give us the
// correct result modulo 2**256. Since the precoditions guarantee
// that the outcome is less than 2**256, this is the final result.
// We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inv;
return result;
}
}
/// @notice Calculates ceil(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
function mulDivRoundingUp(uint256 a, uint256 b, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
result = mulDiv(a, b, denominator);
if (mulmod(a, b, denominator) > 0) {
require(result < type(uint256).max);
result++;
}
}
}
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;
/// @title Provides functions for deriving a pool address from the deployer, tokens, and the fee
library PoolAddressShadow {
bytes32 internal constant POOL_INIT_CODE_HASH = 0xc701ee63862761c31d620a4a083c61bdc1e81761e6b9c9267fd19afd22e0821d;
/// @notice The identifying key of the pool
struct 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 assignments
function 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});
}
/// @notice Deterministically computes the pool address given the deployer and PoolKey
/// @param deployer The Uniswap V3 deployer contract address
/// @param key The PoolKey
/// @return pool The contract address of the V3 pool
function computeAddress(address deployer, PoolKey memory key) internal pure returns (address pool) {
require(key.token0 < key.token1, "!TokenOrder");
pool = address(
uint160(
uint256(
keccak256(
abi.encodePacked(
hex"ff",
deployer,
keccak256(abi.encode(key.token0, key.token1, key.tickSpacing)),
POOL_INIT_CODE_HASH
)
)
)
)
);
}
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.0;
// https://github.com/Uniswap/v3-core/blob/0.8/contracts/libraries/TickMath.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
library TickMath {
error T();
error R();
/// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128
int24 internal constant MIN_TICK = -887272;
/// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128
int24 internal constant MAX_TICK = -MIN_TICK;
/// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)
uint160 internal constant MIN_SQRT_RATIO = 4295128739;
/// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)
uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;
/// @notice Calculates sqrt(1.0001^tick) * 2^96
/// @dev Throws if |tick| > max tick
/// @param tick The input tick for the above formula
/// @return sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0)
/// at the given tick
function getSqrtRatioAtTick(int24 tick) internal pure returns (uint160 sqrtPriceX96) {
unchecked {
uint256 absTick = tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick));
if (absTick > uint256(int256(MAX_TICK))) revert T();
uint256 ratio =
absTick & 0x1 != 0 ? 0xfffcb933bd6fad37aa2d162d1a594001 : 0x100000000000000000000000000000000;
if (absTick & 0x2 != 0) {
ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128;
}
if (absTick & 0x4 != 0) {
ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128;
}
if (absTick & 0x8 != 0) {
ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128;
}
if (absTick & 0x10 != 0) {
ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128;
}
if (absTick & 0x20 != 0) {
ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128;
}
if (absTick & 0x40 != 0) {
ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128;
}
if (absTick & 0x80 != 0) {
ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128;
}
if (absTick & 0x100 != 0) {
ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128;
}
if (absTick & 0x200 != 0) {
ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128;
}
if (absTick & 0x400 != 0) {
ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128;
}
if (absTick & 0x800 != 0) {
ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128;
}
if (absTick & 0x1000 != 0) {
ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128;
}
if (absTick & 0x2000 != 0) {
ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128;
}
if (absTick & 0x4000 != 0) {
ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128;
}
if (absTick & 0x8000 != 0) {
ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128;
}
if (absTick & 0x10000 != 0) {
ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128;
}
if (absTick & 0x20000 != 0) {
ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128;
}
if (absTick & 0x40000 != 0) {
ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128;
}
if (absTick & 0x80000 != 0) {
ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128;
}
if (tick > 0) ratio = type(uint256).max / ratio;
// this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96.
// we then downcast because we know the result always fits within 160 bits due to our tick input constraint
// we round up in the division so getTickAtSqrtRatio of the output price is always consistent
sqrtPriceX96 = uint160((ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1));
}
}
/// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio
/// @dev Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may
/// ever return.
/// @param sqrtPriceX96 The sqrt ratio for which to compute the tick as a Q64.96
/// @return tick The greatest tick for which the ratio is less than or equal to the input ratio
function getTickAtSqrtRatio(uint160 sqrtPriceX96) internal pure returns (int24 tick) {
unchecked {
// second inequality must be < because the price can never reach the price at the max tick
if (!(sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO)) {
revert R();
}
uint256 ratio = uint256(sqrtPriceX96) << 32;
uint256 r = ratio;
uint256 msb = 0;
assembly {
let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))
msb := or(msb, f)
r := shr(f, r)
}
assembly {
let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF))
msb := or(msb, f)
r := shr(f, r)
}
assembly {
let f := shl(5, gt(r, 0xFFFFFFFF))
msb := or(msb, f)
r := shr(f, r)
}
assembly {
let f := shl(4, gt(r, 0xFFFF))
msb := or(msb, f)
r := shr(f, r)
}
assembly {
let f := shl(3, gt(r, 0xFF))
msb := or(msb, f)
r := shr(f, r)
}
assembly {
let f := shl(2, gt(r, 0xF))
msb := or(msb, f)
r := shr(f, r)
}
assembly {
let f := shl(1, gt(r, 0x3))
msb := or(msb, f)
r := shr(f, r)
}
assembly {
let f := gt(r, 0x1)
msb := or(msb, f)
}
if (msb >= 128) r = ratio >> (msb - 127);
else r = ratio << (127 - msb);
int256 log_2 = (int256(msb) - 128) << 64;
assembly {
r := shr(127, mul(r, r))
let f := shr(128, r)
log_2 := or(log_2, shl(63, f))
r := shr(f, r)
}
assembly {
r := shr(127, mul(r, r))
let f := shr(128, r)
log_2 := or(log_2, shl(62, f))
r := shr(f, r)
}
assembly {
r := shr(127, mul(r, r))
let f := shr(128, r)
log_2 := or(log_2, shl(61, f))
r := shr(f, r)
}
assembly {
r := shr(127, mul(r, r))
let f := shr(128, r)
log_2 := or(log_2, shl(60, f))
r := shr(f, r)
}
assembly {
r := shr(127, mul(r, r))
let f := shr(128, r)
log_2 := or(log_2, shl(59, f))
r := shr(f, r)
}
assembly {
r := shr(127, mul(r, r))
let f := shr(128, r)
log_2 := or(log_2, shl(58, f))
r := shr(f, r)
}
assembly {
r := shr(127, mul(r, r))
let f := shr(128, r)
log_2 := or(log_2, shl(57, f))
r := shr(f, r)
}
assembly {
r := shr(127, mul(r, r))
let f := shr(128, r)
log_2 := or(log_2, shl(56, f))
r := shr(f, r)
}
assembly {
r := shr(127, mul(r, r))
let f := shr(128, r)
log_2 := or(log_2, shl(55, f))
r := shr(f, r)
}
assembly {
r := shr(127, mul(r, r))
let f := shr(128, r)
log_2 := or(log_2, shl(54, f))
r := shr(f, r)
}
assembly {
r := shr(127, mul(r, r))
let f := shr(128, r)
log_2 := or(log_2, shl(53, f))
r := shr(f, r)
}
assembly {
r := shr(127, mul(r, r))
let f := shr(128, r)
log_2 := or(log_2, shl(52, f))
r := shr(f, r)
}
assembly {
r := shr(127, mul(r, r))
let f := shr(128, r)
log_2 := or(log_2, shl(51, f))
r := shr(f, r)
}
assembly {
r := shr(127, mul(r, r))
let f := shr(128, r)
log_2 := or(log_2, shl(50, f))
}
int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number
int24 tickLow = int24((log_sqrt10001 - 3402992956809132418596140100660247210) >> 128);
int24 tickHi = int24((log_sqrt10001 + 291339464771989622907027621153398088495) >> 128);
tick = tickLow == tickHi ? tickLow : getSqrtRatioAtTick(tickHi) <= sqrtPriceX96 ? tickHi : tickLow;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}{
"remappings": [
"@chainlink/=node_modules/@chainlink/",
"@fraxlend/=test/invariant/modules/fraxlend/",
"fuzzlib/=lib/fuzzlib/src/",
"swap-router/=test/invariant/modules/v3-periphery/swapRouter/",
"v3-core/=test/invariant/modules/v3-core/",
"v3-periphery/=test/invariant/modules/v3-periphery/",
"v2-core/=test/invariant/modules/uniswap-v2/v2-core/contracts/",
"v2-periphery/=test/invariant/modules/uniswap-v2/v2-periphery/contracts/",
"uniswap-v2/=test/invariant/modules/uniswap-v2/",
"solidity-bytes-utils/contracts/=test/invariant/modules/fraxlend/libraries/",
"@rari-capital/solmate/=node_modules/solmate/",
"@arbitrum/=node_modules/@arbitrum/",
"@ensdomains/=node_modules/@ensdomains/",
"@eth-optimism/=node_modules/@eth-optimism/",
"@ethereum-waffle/=node_modules/@ethereum-waffle/",
"@mean-finance/=node_modules/@mean-finance/",
"@offchainlabs/=node_modules/@offchainlabs/",
"@openzeppelin/=node_modules/@openzeppelin/",
"@scroll-tech/=node_modules/@scroll-tech/",
"@uniswap/=node_modules/@uniswap/",
"@zksync/=node_modules/@zksync/",
"base64-sol/=node_modules/base64-sol/",
"ds-test/=lib/fuzzlib/lib/forge-std/lib/ds-test/src/",
"erc721a/=node_modules/erc721a/",
"eth-gas-reporter/=node_modules/eth-gas-reporter/",
"forge-std/=lib/forge-std/src/",
"hardhat/=node_modules/hardhat/",
"solidity-code-metrics/=node_modules/solidity-code-metrics/",
"solmate/=node_modules/solmate/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "cancun",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"T","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"_pricePool","type":"address"},{"internalType":"address","name":"_nativeStablePool","type":"address"},{"internalType":"address","name":"_WETH9","type":"address"}],"name":"getPoolPriceUSDX96","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_v3Factory","type":"address"},{"internalType":"address","name":"_t0","type":"address"},{"internalType":"address","name":"_t1","type":"address"},{"internalType":"int24","name":"_tickSpacing","type":"int24"}],"name":"getV3Pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint24","name":"","type":"uint24"}],"name":"getV3Pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"getV3Pool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"}],"name":"priceX96FromSqrtPriceX96","outputs":[{"internalType":"uint256","name":"priceX96","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_poolAddress","type":"address"}],"name":"sqrtPriceX96FromPoolAndInterval","outputs":[{"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_poolAddress","type":"address"},{"internalType":"uint32","name":"_interval","type":"uint32"}],"name":"sqrtPriceX96FromPoolAndPassedInterval","outputs":[{"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
6080604052348015600e575f5ffd5b503380603357604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b603a81603f565b50608e565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61145b8061009b5f395ff3fe608060405234801561000f575f5ffd5b506004361061009b575f3560e01c80638da5cb5b116100635780638da5cb5b14610112578063b5ed446314610122578063d4bf133414610143578063ddca45b014610156578063f2fde38b14610169575f5ffd5b80630bbf9b681461009f5780632e33f332146100cf5780634556bd20146100e2578063715018a6146100f55780637fb4f79d146100ff575b5f5ffd5b6100b26100ad366004610dee565b61017c565b6040516001600160a01b0390911681526020015b60405180910390f35b6100b26100dd366004610e3b565b61018e565b6100b26100f0366004610e94565b610201565b6100fd610235565b005b6100b261010d366004610ee9565b610248565b5f546001600160a01b03166100b2565b610135610130366004610f04565b61025b565b6040519081526020016100c6565b610135610151366004610ee9565b61039d565b6100b2610164366004610f04565b6103b6565b6100fd610177366004610ee9565b6103e5565b5f6101878383610422565b9392505050565b5f5f5f846001600160a01b0316866001600160a01b0316106101b15784866101b4565b85855b915091505f6040518060600160405280846001600160a01b03168152602001836001600160a01b031681526020018660020b81525090506101f58882610626565b98975050505050505050565b60405162461bcd60e51b8152602060048201526002602482015261049360f41b60448201525f906064015b60405180910390fd5b61023d61073d565b6102465f610769565b565b5f61025582610258610422565b92915050565b5f5f836001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610299573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102bd9190610f4c565b90505f61034885856001600160a01b0316846001600160a01b0316146102e357836107b8565b866001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561031f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103439190610f4c565b6107b8565b9050846001600160a01b0316866001600160a01b03160361036c5791506101879050565b5f61037787866107b8565b9050600160601b6103888284610f7b565b6103929190610fa6565b979650505050505050565b5f6102556001600160a01b03831680600160601b610a15565b60405162461bcd60e51b8152602060048201526002602482015261493160f01b60448201525f9060640161022c565b6103ed61073d565b6001600160a01b03811661041657604051631e4fbdf760e01b81525f600482015260240161022c565b61041f81610769565b50565b5f8263ffffffff831682036104a057806001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa15801561046d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104919190610fdf565b5094965061061f945050505050565b6040805160028082526060820183525f9260208301908036833701905050905083815f815181106104d3576104d3611081565b602002602001019063ffffffff16908163ffffffff16815250505f8160018151811061050157610501611081565b63ffffffff9092166020928302919091019091015260405163883bdbfd60e01b81525f906001600160a01b0384169063883bdbfd90610544908590600401611095565b5f60405180830381865afa15801561055e573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261058591908101906111a4565b5090505f815f8151811061059b5761059b611081565b6020026020010151826001815181106105b6576105b6611081565b60200260200101516105c89190611270565b90505f6105d9600388900b8361129d565b90505f8260060b1280156105fc57506105f6600388900b836112d9565b60060b15155b1561060f578061060b816112fa565b9150505b61061881610abf565b9550505050505b5092915050565b5f81602001516001600160a01b0316825f01516001600160a01b03161061067d5760405162461bcd60e51b815260206004820152600b60248201526a10aa37b5b2b727b93232b960a91b604482015260640161022c565b815160208084015160408086015181516001600160a01b0395861681860152949092168482015260029190910b60608085019190915281518085038201815260808501909252815191909201206001600160f81b031960a08401529085901b6bffffffffffffffffffffffff191660a183015260b58201527fc701ee63862761c31d620a4a083c61bdc1e81761e6b9c9267fd19afd22e0821d60d582015260f50160408051601f1981840301815291905280516020909101209392505050565b5f546001600160a01b031633146102465760405163118cdaa760e01b815233600482015260240161022c565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f5f836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107f6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061081a9190610f4c565b90505f846001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610859573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061087d9190610f4c565b6001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108b8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108dc919061131b565b90505f826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561091b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061093f919061131b565b90505f61094b87610248565b90505f6109578261039d565b90505f876001600160a01b0316866001600160a01b03161461099257816109836002600160601b611417565b61098d9190610fa6565b610994565b815b9050876001600160a01b0316866001600160a01b0316146109de576109ba85600a611417565b6109c585600a611417565b6109cf9083610f7b565b6109d99190610fa6565b610a08565b6109e984600a611417565b6109f486600a611417565b6109fe9083610f7b565b610a089190610fa6565b9998505050505050505050565b5f80805f19858709858702925082811083820303915050805f03610a49575f8411610a3e575f5ffd5b508290049050610187565b808411610a54575f5ffd5b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f5f5f8360020b12610ad4578260020b610adb565b8260020b5f035b9050620d89e8811115610b01576040516315e4079d60e11b815260040160405180910390fd5b5f816001165f03610b1657600160801b610b28565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff1690506002821615610b5c576ffff97272373d413259a46990580e213a0260801c5b6004821615610b7b576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b6008821615610b9a576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b6010821615610bb9576fffcb9843d60f6159c9db58835c9266440260801c5b6020821615610bd8576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615610bf7576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615610c16576ffe5dee046a99a2a811c461f1969c30530260801c5b610100821615610c36576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b610200821615610c56576ff987a7253ac413176f2b074cf7815e540260801c5b610400821615610c76576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615610c96576fe7159475a2c29b7443b29c7fa6e889d90260801c5b611000821615610cb6576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615610cd6576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615610cf6576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615610d16576f31be135f97d08fd981231505542fcfa60260801c5b62010000821615610d37576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b62020000821615610d57576e5d6af8dedb81196699c329225ee6040260801c5b62040000821615610d76576d2216e584f5fa1ea926041bedfe980260801c5b62080000821615610d93576b048a170391f7dc42444e8fa20260801c5b5f8460020b1315610db257805f1981610dae57610dae610f92565b0490505b640100000000810615610dc6576001610dc8565b5f5b60ff16602082901c0192505050919050565b6001600160a01b038116811461041f575f5ffd5b5f5f60408385031215610dff575f5ffd5b8235610e0a81610dda565b9150602083013563ffffffff81168114610e22575f5ffd5b809150509250929050565b8060020b811461041f575f5ffd5b5f5f5f5f60808587031215610e4e575f5ffd5b8435610e5981610dda565b93506020850135610e6981610dda565b92506040850135610e7981610dda565b91506060850135610e8981610e2d565b939692955090935050565b5f5f5f5f60808587031215610ea7575f5ffd5b8435610eb281610dda565b93506020850135610ec281610dda565b92506040850135610ed281610dda565b9150606085013562ffffff81168114610e89575f5ffd5b5f60208284031215610ef9575f5ffd5b813561018781610dda565b5f5f5f60608486031215610f16575f5ffd5b8335610f2181610dda565b92506020840135610f3181610dda565b91506040840135610f4181610dda565b809150509250925092565b5f60208284031215610f5c575f5ffd5b815161018781610dda565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761025557610255610f67565b634e487b7160e01b5f52601260045260245ffd5b5f82610fb457610fb4610f92565b500490565b805161ffff81168114610fca575f5ffd5b919050565b805160ff81168114610fca575f5ffd5b5f5f5f5f5f5f5f60e0888a031215610ff5575f5ffd5b875161100081610dda565b602089015190975061101181610e2d565b955061101f60408901610fb9565b945061102d60608901610fb9565b935061103b60808901610fb9565b925061104960a08901610fcf565b915060c0880151801515811461105d575f5ffd5b8091505092959891949750929550565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b602080825282518282018190525f918401906040840190835b818110156110d257835163ffffffff168352602093840193909201916001016110ae565b509095945050505050565b604051601f8201601f1916810167ffffffffffffffff811182821017156111065761110661106d565b604052919050565b5f67ffffffffffffffff8211156111275761112761106d565b5060051b60200190565b5f82601f830112611140575f5ffd5b815161115361114e8261110e565b6110dd565b8082825260208201915060208360051b860101925085831115611174575f5ffd5b602085015b8381101561119a57805161118c81610dda565b835260209283019201611179565b5095945050505050565b5f5f604083850312156111b5575f5ffd5b825167ffffffffffffffff8111156111cb575f5ffd5b8301601f810185136111db575f5ffd5b80516111e961114e8261110e565b8082825260208201915060208360051b85010192508783111561120a575f5ffd5b6020840193505b8284101561123a5783518060060b8114611229575f5ffd5b825260209384019390910190611211565b80955050505050602083015167ffffffffffffffff81111561125a575f5ffd5b61126685828601611131565b9150509250929050565b600682810b9082900b03667fffffffffffff198112667fffffffffffff8213171561025557610255610f67565b5f8160060b8360060b806112b3576112b3610f92565b667fffffffffffff1982145f19821416156112d0576112d0610f67565b90059392505050565b5f8260060b806112eb576112eb610f92565b808360060b0791505092915050565b5f8160020b627fffff19810361131257611312610f67565b5f190192915050565b5f6020828403121561132b575f5ffd5b61018782610fcf565b6001815b600184111561136f5780850481111561135357611353610f67565b600184161561136157908102905b60019390931c928002611338565b935093915050565b5f8261138557506001610255565b8161139157505f610255565b81600181146113a757600281146113b1576113cd565b6001915050610255565b60ff8411156113c2576113c2610f67565b50506001821b610255565b5060208310610133831016604e8410600b84101617156113f0575081810a610255565b6113fc5f198484611334565b805f190482111561140f5761140f610f67565b029392505050565b5f61018760ff84168361137756fea264697066735822122032da7582cc58c7bb000cf4ae66f77dda7f98ed1c5f59bd4b636398f0259d8c7364736f6c634300081c0033
Deployed Bytecode
0x608060405234801561000f575f5ffd5b506004361061009b575f3560e01c80638da5cb5b116100635780638da5cb5b14610112578063b5ed446314610122578063d4bf133414610143578063ddca45b014610156578063f2fde38b14610169575f5ffd5b80630bbf9b681461009f5780632e33f332146100cf5780634556bd20146100e2578063715018a6146100f55780637fb4f79d146100ff575b5f5ffd5b6100b26100ad366004610dee565b61017c565b6040516001600160a01b0390911681526020015b60405180910390f35b6100b26100dd366004610e3b565b61018e565b6100b26100f0366004610e94565b610201565b6100fd610235565b005b6100b261010d366004610ee9565b610248565b5f546001600160a01b03166100b2565b610135610130366004610f04565b61025b565b6040519081526020016100c6565b610135610151366004610ee9565b61039d565b6100b2610164366004610f04565b6103b6565b6100fd610177366004610ee9565b6103e5565b5f6101878383610422565b9392505050565b5f5f5f846001600160a01b0316866001600160a01b0316106101b15784866101b4565b85855b915091505f6040518060600160405280846001600160a01b03168152602001836001600160a01b031681526020018660020b81525090506101f58882610626565b98975050505050505050565b60405162461bcd60e51b8152602060048201526002602482015261049360f41b60448201525f906064015b60405180910390fd5b61023d61073d565b6102465f610769565b565b5f61025582610258610422565b92915050565b5f5f836001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610299573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102bd9190610f4c565b90505f61034885856001600160a01b0316846001600160a01b0316146102e357836107b8565b866001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561031f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103439190610f4c565b6107b8565b9050846001600160a01b0316866001600160a01b03160361036c5791506101879050565b5f61037787866107b8565b9050600160601b6103888284610f7b565b6103929190610fa6565b979650505050505050565b5f6102556001600160a01b03831680600160601b610a15565b60405162461bcd60e51b8152602060048201526002602482015261493160f01b60448201525f9060640161022c565b6103ed61073d565b6001600160a01b03811661041657604051631e4fbdf760e01b81525f600482015260240161022c565b61041f81610769565b50565b5f8263ffffffff831682036104a057806001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa15801561046d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104919190610fdf565b5094965061061f945050505050565b6040805160028082526060820183525f9260208301908036833701905050905083815f815181106104d3576104d3611081565b602002602001019063ffffffff16908163ffffffff16815250505f8160018151811061050157610501611081565b63ffffffff9092166020928302919091019091015260405163883bdbfd60e01b81525f906001600160a01b0384169063883bdbfd90610544908590600401611095565b5f60405180830381865afa15801561055e573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261058591908101906111a4565b5090505f815f8151811061059b5761059b611081565b6020026020010151826001815181106105b6576105b6611081565b60200260200101516105c89190611270565b90505f6105d9600388900b8361129d565b90505f8260060b1280156105fc57506105f6600388900b836112d9565b60060b15155b1561060f578061060b816112fa565b9150505b61061881610abf565b9550505050505b5092915050565b5f81602001516001600160a01b0316825f01516001600160a01b03161061067d5760405162461bcd60e51b815260206004820152600b60248201526a10aa37b5b2b727b93232b960a91b604482015260640161022c565b815160208084015160408086015181516001600160a01b0395861681860152949092168482015260029190910b60608085019190915281518085038201815260808501909252815191909201206001600160f81b031960a08401529085901b6bffffffffffffffffffffffff191660a183015260b58201527fc701ee63862761c31d620a4a083c61bdc1e81761e6b9c9267fd19afd22e0821d60d582015260f50160408051601f1981840301815291905280516020909101209392505050565b5f546001600160a01b031633146102465760405163118cdaa760e01b815233600482015260240161022c565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f5f836001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107f6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061081a9190610f4c565b90505f846001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610859573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061087d9190610f4c565b6001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108b8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108dc919061131b565b90505f826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561091b573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061093f919061131b565b90505f61094b87610248565b90505f6109578261039d565b90505f876001600160a01b0316866001600160a01b03161461099257816109836002600160601b611417565b61098d9190610fa6565b610994565b815b9050876001600160a01b0316866001600160a01b0316146109de576109ba85600a611417565b6109c585600a611417565b6109cf9083610f7b565b6109d99190610fa6565b610a08565b6109e984600a611417565b6109f486600a611417565b6109fe9083610f7b565b610a089190610fa6565b9998505050505050505050565b5f80805f19858709858702925082811083820303915050805f03610a49575f8411610a3e575f5ffd5b508290049050610187565b808411610a54575f5ffd5b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f5f5f8360020b12610ad4578260020b610adb565b8260020b5f035b9050620d89e8811115610b01576040516315e4079d60e11b815260040160405180910390fd5b5f816001165f03610b1657600160801b610b28565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff1690506002821615610b5c576ffff97272373d413259a46990580e213a0260801c5b6004821615610b7b576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b6008821615610b9a576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b6010821615610bb9576fffcb9843d60f6159c9db58835c9266440260801c5b6020821615610bd8576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615610bf7576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615610c16576ffe5dee046a99a2a811c461f1969c30530260801c5b610100821615610c36576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b610200821615610c56576ff987a7253ac413176f2b074cf7815e540260801c5b610400821615610c76576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615610c96576fe7159475a2c29b7443b29c7fa6e889d90260801c5b611000821615610cb6576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615610cd6576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615610cf6576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615610d16576f31be135f97d08fd981231505542fcfa60260801c5b62010000821615610d37576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b62020000821615610d57576e5d6af8dedb81196699c329225ee6040260801c5b62040000821615610d76576d2216e584f5fa1ea926041bedfe980260801c5b62080000821615610d93576b048a170391f7dc42444e8fa20260801c5b5f8460020b1315610db257805f1981610dae57610dae610f92565b0490505b640100000000810615610dc6576001610dc8565b5f5b60ff16602082901c0192505050919050565b6001600160a01b038116811461041f575f5ffd5b5f5f60408385031215610dff575f5ffd5b8235610e0a81610dda565b9150602083013563ffffffff81168114610e22575f5ffd5b809150509250929050565b8060020b811461041f575f5ffd5b5f5f5f5f60808587031215610e4e575f5ffd5b8435610e5981610dda565b93506020850135610e6981610dda565b92506040850135610e7981610dda565b91506060850135610e8981610e2d565b939692955090935050565b5f5f5f5f60808587031215610ea7575f5ffd5b8435610eb281610dda565b93506020850135610ec281610dda565b92506040850135610ed281610dda565b9150606085013562ffffff81168114610e89575f5ffd5b5f60208284031215610ef9575f5ffd5b813561018781610dda565b5f5f5f60608486031215610f16575f5ffd5b8335610f2181610dda565b92506020840135610f3181610dda565b91506040840135610f4181610dda565b809150509250925092565b5f60208284031215610f5c575f5ffd5b815161018781610dda565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761025557610255610f67565b634e487b7160e01b5f52601260045260245ffd5b5f82610fb457610fb4610f92565b500490565b805161ffff81168114610fca575f5ffd5b919050565b805160ff81168114610fca575f5ffd5b5f5f5f5f5f5f5f60e0888a031215610ff5575f5ffd5b875161100081610dda565b602089015190975061101181610e2d565b955061101f60408901610fb9565b945061102d60608901610fb9565b935061103b60808901610fb9565b925061104960a08901610fcf565b915060c0880151801515811461105d575f5ffd5b8091505092959891949750929550565b634e487b7160e01b5f52604160045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b602080825282518282018190525f918401906040840190835b818110156110d257835163ffffffff168352602093840193909201916001016110ae565b509095945050505050565b604051601f8201601f1916810167ffffffffffffffff811182821017156111065761110661106d565b604052919050565b5f67ffffffffffffffff8211156111275761112761106d565b5060051b60200190565b5f82601f830112611140575f5ffd5b815161115361114e8261110e565b6110dd565b8082825260208201915060208360051b860101925085831115611174575f5ffd5b602085015b8381101561119a57805161118c81610dda565b835260209283019201611179565b5095945050505050565b5f5f604083850312156111b5575f5ffd5b825167ffffffffffffffff8111156111cb575f5ffd5b8301601f810185136111db575f5ffd5b80516111e961114e8261110e565b8082825260208201915060208360051b85010192508783111561120a575f5ffd5b6020840193505b8284101561123a5783518060060b8114611229575f5ffd5b825260209384019390910190611211565b80955050505050602083015167ffffffffffffffff81111561125a575f5ffd5b61126685828601611131565b9150509250929050565b600682810b9082900b03667fffffffffffff198112667fffffffffffff8213171561025557610255610f67565b5f8160060b8360060b806112b3576112b3610f92565b667fffffffffffff1982145f19821416156112d0576112d0610f67565b90059392505050565b5f8260060b806112eb576112eb610f92565b808360060b0791505092915050565b5f8160020b627fffff19810361131257611312610f67565b5f190192915050565b5f6020828403121561132b575f5ffd5b61018782610fcf565b6001815b600184111561136f5780850481111561135357611353610f67565b600184161561136157908102905b60019390931c928002611338565b935093915050565b5f8261138557506001610255565b8161139157505f610255565b81600181146113a757600281146113b1576113cd565b6001915050610255565b60ff8411156113c2576113c2610f67565b50506001821b610255565b5060208310610133831016604e8410600b84101617156113f0575081810a610255565b6113fc5f198484611334565b805f190482111561140f5761140f610f67565b029392505050565b5f61018760ff84168361137756fea264697066735822122032da7582cc58c7bb000cf4ae66f77dda7f98ed1c5f59bd4b636398f0259d8c7364736f6c634300081c0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in S
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
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.