Latest 25 from a total of 37,931 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| 0x2db7a7c5 | 38621247 | 6 mins ago | IN | 0 ETH | 0.00000699 | ||||
| 0x2db7a7c5 | 38621097 | 9 mins ago | IN | 0 ETH | 0.00000635 | ||||
| 0x2db7a7c5 | 38621089 | 9 mins ago | IN | 0 ETH | 0.00000704 | ||||
| 0x2db7a7c5 | 38620911 | 12 mins ago | IN | 0 ETH | 0.00000721 | ||||
| 0x2db7a7c5 | 38620903 | 12 mins ago | IN | 0 ETH | 0.00000712 | ||||
| 0x2db7a7c5 | 38620895 | 12 mins ago | IN | 0 ETH | 0.00000258 | ||||
| 0x2db7a7c5 | 38620859 | 13 mins ago | IN | 0 ETH | 0.0000079 | ||||
| 0x2db7a7c5 | 38620846 | 13 mins ago | IN | 0 ETH | 0.00000761 | ||||
| 0x2db7a7c5 | 38620555 | 18 mins ago | IN | 0 ETH | 0.00000661 | ||||
| 0x2db7a7c5 | 38620530 | 18 mins ago | IN | 0 ETH | 0.00000669 | ||||
| 0x2db7a7c5 | 38620335 | 22 mins ago | IN | 0 ETH | 0.00000737 | ||||
| 0x2db7a7c5 | 38619360 | 38 mins ago | IN | 0 ETH | 0.00000712 | ||||
| 0x2db7a7c5 | 38618368 | 54 mins ago | IN | 0 ETH | 0.00000708 | ||||
| 0x2db7a7c5 | 38618304 | 55 mins ago | IN | 0 ETH | 0.00000467 | ||||
| 0x2db7a7c5 | 38618064 | 1 hr ago | IN | 0 ETH | 0.0000067 | ||||
| 0x2db7a7c5 | 38617840 | 1 hr ago | IN | 0 ETH | 0.00000715 | ||||
| 0x2db7a7c5 | 38617747 | 1 hr ago | IN | 0 ETH | 0.00000676 | ||||
| 0x2db7a7c5 | 38617719 | 1 hr ago | IN | 0 ETH | 0.0000071 | ||||
| 0x2db7a7c5 | 38617710 | 1 hr ago | IN | 0 ETH | 0.00000713 | ||||
| 0x2db7a7c5 | 38617688 | 1 hr ago | IN | 0 ETH | 0.00000747 | ||||
| 0x2db7a7c5 | 38617673 | 1 hr ago | IN | 0 ETH | 0.00000261 | ||||
| 0x2db7a7c5 | 38617660 | 1 hr ago | IN | 0 ETH | 0.00000674 | ||||
| 0x2db7a7c5 | 38617652 | 1 hr ago | IN | 0 ETH | 0.00000245 | ||||
| 0x2db7a7c5 | 38617345 | 1 hr ago | IN | 0 ETH | 0.00000689 | ||||
| 0x2db7a7c5 | 38617337 | 1 hr ago | IN | 0 ETH | 0.00000248 |
View more zero value Internal Transactions in Advanced View mode
Cross-Chain Transactions
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.8.26;
import {IMultiPositionManager} from "./interfaces/IMultiPositionManager.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { IHooks } from "v4-core/interfaces/IHooks.sol";
interface IAccessControl {
function transferOwnership(address newOwner) external;
}
/// @title Admin
contract Admin {
using SafeERC20 for IERC20;
address public admin;
bool public ownerFixed = false;
mapping(address => address) public rebalancers;
mapping(address => address) public advisors;
mapping(address => address) public claimManagers;
modifier onlyAdmin {
require(msg.sender == admin, "only admin");
_;
}
modifier onlyAdvisor(address hypervisor) {
require(msg.sender == advisors[hypervisor], "only advisor");
_;
}
modifier onlyRebalancer(address hypervisor) {
require(msg.sender == rebalancers[hypervisor], "only rebalancer");
_;
}
modifier onlyClaimManager(address hypervisor) {
require(msg.sender == claimManagers[hypervisor], "only claim manager");
_;
}
constructor(address _admin) {
admin = _admin;
}
/// @param _hypervisor Hypervisor Address
function rebalance(
address _hypervisor,
IMultiPositionManager.Position[] memory baseRanges,
uint128[] memory liquidities,
int24 limitWidth,
uint256[2][] memory inMin,
uint256[2][] memory outMin,
int24 aimTick,
uint24 tickOffset
) external onlyRebalancer(_hypervisor) {
IMultiPositionManager(_hypervisor).rebalance(
baseRanges,
liquidities,
limitWidth,
inMin,
outMin,
aimTick,
tickOffset
);
}
function compound(
address _hypervisor,
uint128[] memory liquidities,
uint256[2][] memory inMin,
int24 aimTick,
uint24 tickOffset
)
external onlyAdvisor(_hypervisor) {
IMultiPositionManager(_hypervisor).compound(liquidities, inMin, aimTick, tickOffset);
}
function claimFee(address _hypervisor) external onlyClaimManager(_hypervisor) {
IMultiPositionManager(_hypervisor).claimFee();
}
/// @param _hypervisor Hypervisor Address
function setWhitelist(address _hypervisor, address newWhitelist) external onlyAdmin {
IMultiPositionManager(_hypervisor).setWhitelist(newWhitelist);
}
/// @param _hypervisor Hypervisor Address
function setFeeRecipient(address _hypervisor, address _feeRecipient) external onlyAdmin {
IMultiPositionManager(_hypervisor).setFeeRecipient(_feeRecipient);
}
/// @param _hypervisor Hypervisor Address
function removeWhitelisted(address _hypervisor) external onlyAdmin {
IMultiPositionManager(_hypervisor).setWhitelist(address(0));
}
/// @param newAdmin New Admin Address
function transferAdmin(address newAdmin) external onlyAdmin {
require(newAdmin != address(0), "newAdmin should be non-zero");
admin = newAdmin;
}
/// @param _hypervisor Hypervisor Address
/// @param newOwner New Owner Address
function transferHypervisorOwner(address _hypervisor, address newOwner) external onlyAdmin {
require(!ownerFixed, "permanent owner in place");
IAccessControl(_hypervisor).transferOwnership(newOwner);
}
// @dev permanently disable hypervisor ownership transfer
function fixOwnership() external onlyAdmin {
ownerFixed = false;
}
/// @param newAdvisor New Advisor Address
function setAdvisor(address _hypervisor, address newAdvisor) external onlyAdmin {
require(newAdvisor != address(0), "newAdvisor should be non-zero");
advisors[_hypervisor] = newAdvisor;
}
/// @param newRebalancer New Rebalancer Address
function setRebalancer(address _hypervisor, address newRebalancer) external onlyAdmin {
require(newRebalancer != address(0), "newRebalancer should be non-zero");
rebalancers[_hypervisor] = newRebalancer;
}
/// @param newClaimManager New Claim Manager Address
function setClaimManager(address _hypervisor, address newClaimManager) external onlyAdmin {
require(newClaimManager != address(0), "newClaimManager should be non-zero");
claimManagers[_hypervisor] = newClaimManager;
}
/// @notice Transfer tokens to the recipient from the contract
/// @param token Address of token
/// @param recipient Recipient Address
function rescueERC20(IERC20 token, address recipient) external onlyAdmin {
require(recipient != address(0), "recipient should be non-zero");
require(token.transfer(recipient, token.balanceOf(address(this))));
}
/// @param _hypervisor Hypervisor Address
/// @param newFee fee amount
function setFee(address _hypervisor, uint8 newFee) external onlyAdmin {
IMultiPositionManager(_hypervisor).setFee(newFee);
}
}/// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.26;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { IHooks } from "v4-core/interfaces/IHooks.sol";
import { PoolKey } from "v4-core/types/PoolKey.sol";
import {IImmutableState} from "v4-periphery/src/interfaces/IImmutableState.sol";
import { IPoolManager } from "v4-core/interfaces/IPoolManager.sol";
interface IMultiPositionManager is IERC20, IImmutableState {
struct Position {
PoolKey poolKey;
int24 lowerTick;
int24 upperTick;
}
struct PositionData {
uint128 liquidity;
uint256 amount0;
uint256 amount1;
}
function getPositions() external view returns (
Position[] memory,
PositionData[] memory
);
function basePositionsLength() external view returns (uint256);
function token0() external view returns (IERC20);
function token1() external view returns (IERC20);
function getTotalAmounts() external view returns (
uint256 total0,
uint256 total1,
uint256 totalFee0,
uint256 totalFee1
);
function currentTicks() external view returns (int24[] memory);
function rebalance(
Position[] memory baseRanges,
uint128[] memory liquidities,
int24 limitWidth,
uint256[2][] memory inMin,
uint256[2][] memory outMin,
int24 aimTick,
uint24 tickOffset
) external;
function compound(
uint128[] memory liquidities,
uint256[2][] memory inMin,
int24 aimTick,
uint24 tickOffset
) external;
function claimFee() external;
function setWhitelist(address _whitelist) external;
function setFeeRecipient(address _feeRecipient) external;
function setFee(uint16 fee) external;
// function setTickOffset(uint24 offset) external;
function deposit(
uint256 deposit0Desired,
uint256 deposit1Desired,
address to,
address from
) external payable returns (uint256, uint256, uint256);
function zeroBurnAll() external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
/**
* @dev An operation with an ERC20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data);
if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {PoolKey} from "../types/PoolKey.sol";
import {BalanceDelta} from "../types/BalanceDelta.sol";
import {IPoolManager} from "./IPoolManager.sol";
import {BeforeSwapDelta} from "../types/BeforeSwapDelta.sol";
/// @notice V4 decides whether to invoke specific hooks by inspecting the least significant bits
/// of the address that the hooks contract is deployed to.
/// For example, a hooks contract deployed to address: 0x0000000000000000000000000000000000002400
/// has the lowest bits '10 0100 0000 0000' which would cause the 'before initialize' and 'after add liquidity' hooks to be used.
/// See the Hooks library for the full spec.
/// @dev Should only be callable by the v4 PoolManager.
interface IHooks {
/// @notice The hook called before the state of a pool is initialized
/// @param sender The initial msg.sender for the initialize call
/// @param key The key for the pool being initialized
/// @param sqrtPriceX96 The sqrt(price) of the pool as a Q64.96
/// @return bytes4 The function selector for the hook
function beforeInitialize(address sender, PoolKey calldata key, uint160 sqrtPriceX96) external returns (bytes4);
/// @notice The hook called after the state of a pool is initialized
/// @param sender The initial msg.sender for the initialize call
/// @param key The key for the pool being initialized
/// @param sqrtPriceX96 The sqrt(price) of the pool as a Q64.96
/// @param tick The current tick after the state of a pool is initialized
/// @return bytes4 The function selector for the hook
function afterInitialize(address sender, PoolKey calldata key, uint160 sqrtPriceX96, int24 tick)
external
returns (bytes4);
/// @notice The hook called before liquidity is added
/// @param sender The initial msg.sender for the add liquidity call
/// @param key The key for the pool
/// @param params The parameters for adding liquidity
/// @param hookData Arbitrary data handed into the PoolManager by the liquidity provider to be passed on to the hook
/// @return bytes4 The function selector for the hook
function beforeAddLiquidity(
address sender,
PoolKey calldata key,
IPoolManager.ModifyLiquidityParams calldata params,
bytes calldata hookData
) external returns (bytes4);
/// @notice The hook called after liquidity is added
/// @param sender The initial msg.sender for the add liquidity call
/// @param key The key for the pool
/// @param params The parameters for adding liquidity
/// @param delta The caller's balance delta after adding liquidity; the sum of principal delta, fees accrued, and hook delta
/// @param feesAccrued The fees accrued since the last time fees were collected from this position
/// @param hookData Arbitrary data handed into the PoolManager by the liquidity provider to be passed on to the hook
/// @return bytes4 The function selector for the hook
/// @return BalanceDelta The hook's delta in token0 and token1. Positive: the hook is owed/took currency, negative: the hook owes/sent currency
function afterAddLiquidity(
address sender,
PoolKey calldata key,
IPoolManager.ModifyLiquidityParams calldata params,
BalanceDelta delta,
BalanceDelta feesAccrued,
bytes calldata hookData
) external returns (bytes4, BalanceDelta);
/// @notice The hook called before liquidity is removed
/// @param sender The initial msg.sender for the remove liquidity call
/// @param key The key for the pool
/// @param params The parameters for removing liquidity
/// @param hookData Arbitrary data handed into the PoolManager by the liquidity provider to be be passed on to the hook
/// @return bytes4 The function selector for the hook
function beforeRemoveLiquidity(
address sender,
PoolKey calldata key,
IPoolManager.ModifyLiquidityParams calldata params,
bytes calldata hookData
) external returns (bytes4);
/// @notice The hook called after liquidity is removed
/// @param sender The initial msg.sender for the remove liquidity call
/// @param key The key for the pool
/// @param params The parameters for removing liquidity
/// @param delta The caller's balance delta after removing liquidity; the sum of principal delta, fees accrued, and hook delta
/// @param feesAccrued The fees accrued since the last time fees were collected from this position
/// @param hookData Arbitrary data handed into the PoolManager by the liquidity provider to be be passed on to the hook
/// @return bytes4 The function selector for the hook
/// @return BalanceDelta The hook's delta in token0 and token1. Positive: the hook is owed/took currency, negative: the hook owes/sent currency
function afterRemoveLiquidity(
address sender,
PoolKey calldata key,
IPoolManager.ModifyLiquidityParams calldata params,
BalanceDelta delta,
BalanceDelta feesAccrued,
bytes calldata hookData
) external returns (bytes4, BalanceDelta);
/// @notice The hook called before a swap
/// @param sender The initial msg.sender for the swap call
/// @param key The key for the pool
/// @param params The parameters for the swap
/// @param hookData Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook
/// @return bytes4 The function selector for the hook
/// @return BeforeSwapDelta The hook's delta in specified and unspecified currencies. Positive: the hook is owed/took currency, negative: the hook owes/sent currency
/// @return uint24 Optionally override the lp fee, only used if three conditions are met: 1. the Pool has a dynamic fee, 2. the value's 2nd highest bit is set (23rd bit, 0x400000), and 3. the value is less than or equal to the maximum fee (1 million)
function beforeSwap(
address sender,
PoolKey calldata key,
IPoolManager.SwapParams calldata params,
bytes calldata hookData
) external returns (bytes4, BeforeSwapDelta, uint24);
/// @notice The hook called after a swap
/// @param sender The initial msg.sender for the swap call
/// @param key The key for the pool
/// @param params The parameters for the swap
/// @param delta The amount owed to the caller (positive) or owed to the pool (negative)
/// @param hookData Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook
/// @return bytes4 The function selector for the hook
/// @return int128 The hook's delta in unspecified currency. Positive: the hook is owed/took currency, negative: the hook owes/sent currency
function afterSwap(
address sender,
PoolKey calldata key,
IPoolManager.SwapParams calldata params,
BalanceDelta delta,
bytes calldata hookData
) external returns (bytes4, int128);
/// @notice The hook called before donate
/// @param sender The initial msg.sender for the donate call
/// @param key The key for the pool
/// @param amount0 The amount of token0 being donated
/// @param amount1 The amount of token1 being donated
/// @param hookData Arbitrary data handed into the PoolManager by the donor to be be passed on to the hook
/// @return bytes4 The function selector for the hook
function beforeDonate(
address sender,
PoolKey calldata key,
uint256 amount0,
uint256 amount1,
bytes calldata hookData
) external returns (bytes4);
/// @notice The hook called after donate
/// @param sender The initial msg.sender for the donate call
/// @param key The key for the pool
/// @param amount0 The amount of token0 being donated
/// @param amount1 The amount of token1 being donated
/// @param hookData Arbitrary data handed into the PoolManager by the donor to be be passed on to the hook
/// @return bytes4 The function selector for the hook
function afterDonate(
address sender,
PoolKey calldata key,
uint256 amount0,
uint256 amount1,
bytes calldata hookData
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Currency} from "./Currency.sol";
import {IHooks} from "../interfaces/IHooks.sol";
import {PoolIdLibrary} from "./PoolId.sol";
using PoolIdLibrary for PoolKey global;
/// @notice Returns the key for identifying a pool
struct PoolKey {
/// @notice The lower currency of the pool, sorted numerically
Currency currency0;
/// @notice The higher currency of the pool, sorted numerically
Currency currency1;
/// @notice The pool LP fee, capped at 1_000_000. If the highest bit is 1, the pool has a dynamic fee and must be exactly equal to 0x800000
uint24 fee;
/// @notice Ticks that involve positions must be a multiple of tick spacing
int24 tickSpacing;
/// @notice The hooks of the pool
IHooks hooks;
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import {IPoolManager} from "@uniswap/v4-core/src/interfaces/IPoolManager.sol";
/// @title Interface for ImmutableState
interface IImmutableState {
/// @notice The Uniswap v4 PoolManager contract
function poolManager() external view returns (IPoolManager);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {Currency} from "../types/Currency.sol";
import {PoolKey} from "../types/PoolKey.sol";
import {IHooks} from "./IHooks.sol";
import {IERC6909Claims} from "./external/IERC6909Claims.sol";
import {IProtocolFees} from "./IProtocolFees.sol";
import {BalanceDelta} from "../types/BalanceDelta.sol";
import {PoolId} from "../types/PoolId.sol";
import {IExtsload} from "./IExtsload.sol";
import {IExttload} from "./IExttload.sol";
/// @notice Interface for the PoolManager
interface IPoolManager is IProtocolFees, IERC6909Claims, IExtsload, IExttload {
/// @notice Thrown when a currency is not netted out after the contract is unlocked
error CurrencyNotSettled();
/// @notice Thrown when trying to interact with a non-initialized pool
error PoolNotInitialized();
/// @notice Thrown when unlock is called, but the contract is already unlocked
error AlreadyUnlocked();
/// @notice Thrown when a function is called that requires the contract to be unlocked, but it is not
error ManagerLocked();
/// @notice Pools are limited to type(int16).max tickSpacing in #initialize, to prevent overflow
error TickSpacingTooLarge(int24 tickSpacing);
/// @notice Pools must have a positive non-zero tickSpacing passed to #initialize
error TickSpacingTooSmall(int24 tickSpacing);
/// @notice PoolKey must have currencies where address(currency0) < address(currency1)
error CurrenciesOutOfOrderOrEqual(address currency0, address currency1);
/// @notice Thrown when a call to updateDynamicLPFee is made by an address that is not the hook,
/// or on a pool that does not have a dynamic swap fee.
error UnauthorizedDynamicLPFeeUpdate();
/// @notice Thrown when trying to swap amount of 0
error SwapAmountCannotBeZero();
///@notice Thrown when native currency is passed to a non native settlement
error NonzeroNativeValue();
/// @notice Thrown when `clear` is called with an amount that is not exactly equal to the open currency delta.
error MustClearExactPositiveDelta();
/// @notice Emitted when a new pool is initialized
/// @param id The abi encoded hash of the pool key struct for the new pool
/// @param currency0 The first currency of the pool by address sort order
/// @param currency1 The second currency of the pool by address sort order
/// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
/// @param tickSpacing The minimum number of ticks between initialized ticks
/// @param hooks The hooks contract address for the pool, or address(0) if none
/// @param sqrtPriceX96 The price of the pool on initialization
/// @param tick The initial tick of the pool corresponding to the initialized price
event Initialize(
PoolId indexed id,
Currency indexed currency0,
Currency indexed currency1,
uint24 fee,
int24 tickSpacing,
IHooks hooks,
uint160 sqrtPriceX96,
int24 tick
);
/// @notice Emitted when a liquidity position is modified
/// @param id The abi encoded hash of the pool key struct for the pool that was modified
/// @param sender The address that modified the pool
/// @param tickLower The lower tick of the position
/// @param tickUpper The upper tick of the position
/// @param liquidityDelta The amount of liquidity that was added or removed
/// @param salt The extra data to make positions unique
event ModifyLiquidity(
PoolId indexed id, address indexed sender, int24 tickLower, int24 tickUpper, int256 liquidityDelta, bytes32 salt
);
/// @notice Emitted for swaps between currency0 and currency1
/// @param id The abi encoded hash of the pool key struct for the pool that was modified
/// @param sender The address that initiated the swap call, and that received the callback
/// @param amount0 The delta of the currency0 balance of the pool
/// @param amount1 The delta of the currency1 balance of the pool
/// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96
/// @param liquidity The liquidity of the pool after the swap
/// @param tick The log base 1.0001 of the price of the pool after the swap
/// @param fee The swap fee in hundredths of a bip
event Swap(
PoolId indexed id,
address indexed sender,
int128 amount0,
int128 amount1,
uint160 sqrtPriceX96,
uint128 liquidity,
int24 tick,
uint24 fee
);
/// @notice Emitted for donations
/// @param id The abi encoded hash of the pool key struct for the pool that was donated to
/// @param sender The address that initiated the donate call
/// @param amount0 The amount donated in currency0
/// @param amount1 The amount donated in currency1
event Donate(PoolId indexed id, address indexed sender, uint256 amount0, uint256 amount1);
/// @notice All interactions on the contract that account deltas require unlocking. A caller that calls `unlock` must implement
/// `IUnlockCallback(msg.sender).unlockCallback(data)`, where they interact with the remaining functions on this contract.
/// @dev The only functions callable without an unlocking are `initialize` and `updateDynamicLPFee`
/// @param data Any data to pass to the callback, via `IUnlockCallback(msg.sender).unlockCallback(data)`
/// @return The data returned by the call to `IUnlockCallback(msg.sender).unlockCallback(data)`
function unlock(bytes calldata data) external returns (bytes memory);
/// @notice Initialize the state for a given pool ID
/// @dev A swap fee totaling MAX_SWAP_FEE (100%) makes exact output swaps impossible since the input is entirely consumed by the fee
/// @param key The pool key for the pool to initialize
/// @param sqrtPriceX96 The initial square root price
/// @return tick The initial tick of the pool
function initialize(PoolKey memory key, uint160 sqrtPriceX96) external returns (int24 tick);
struct ModifyLiquidityParams {
// the lower and upper tick of the position
int24 tickLower;
int24 tickUpper;
// how to modify the liquidity
int256 liquidityDelta;
// a value to set if you want unique liquidity positions at the same range
bytes32 salt;
}
/// @notice Modify the liquidity for the given pool
/// @dev Poke by calling with a zero liquidityDelta
/// @param key The pool to modify liquidity in
/// @param params The parameters for modifying the liquidity
/// @param hookData The data to pass through to the add/removeLiquidity hooks
/// @return callerDelta The balance delta of the caller of modifyLiquidity. This is the total of both principal, fee deltas, and hook deltas if applicable
/// @return feesAccrued The balance delta of the fees generated in the liquidity range. Returned for informational purposes
function modifyLiquidity(PoolKey memory key, ModifyLiquidityParams memory params, bytes calldata hookData)
external
returns (BalanceDelta callerDelta, BalanceDelta feesAccrued);
struct SwapParams {
/// Whether to swap token0 for token1 or vice versa
bool zeroForOne;
/// The desired input amount if negative (exactIn), or the desired output amount if positive (exactOut)
int256 amountSpecified;
/// The sqrt price at which, if reached, the swap will stop executing
uint160 sqrtPriceLimitX96;
}
/// @notice Swap against the given pool
/// @param key The pool to swap in
/// @param params The parameters for swapping
/// @param hookData The data to pass through to the swap hooks
/// @return swapDelta The balance delta of the address swapping
/// @dev Swapping on low liquidity pools may cause unexpected swap amounts when liquidity available is less than amountSpecified.
/// Additionally note that if interacting with hooks that have the BEFORE_SWAP_RETURNS_DELTA_FLAG or AFTER_SWAP_RETURNS_DELTA_FLAG
/// the hook may alter the swap input/output. Integrators should perform checks on the returned swapDelta.
function swap(PoolKey memory key, SwapParams memory params, bytes calldata hookData)
external
returns (BalanceDelta swapDelta);
/// @notice Donate the given currency amounts to the in-range liquidity providers of a pool
/// @dev Calls to donate can be frontrun adding just-in-time liquidity, with the aim of receiving a portion donated funds.
/// Donors should keep this in mind when designing donation mechanisms.
/// @dev This function donates to in-range LPs at slot0.tick. In certain edge-cases of the swap algorithm, the `sqrtPrice` of
/// a pool can be at the lower boundary of tick `n`, but the `slot0.tick` of the pool is already `n - 1`. In this case a call to
/// `donate` would donate to tick `n - 1` (slot0.tick) not tick `n` (getTickAtSqrtPrice(slot0.sqrtPriceX96)).
/// Read the comments in `Pool.swap()` for more information about this.
/// @param key The key of the pool to donate to
/// @param amount0 The amount of currency0 to donate
/// @param amount1 The amount of currency1 to donate
/// @param hookData The data to pass through to the donate hooks
/// @return BalanceDelta The delta of the caller after the donate
function donate(PoolKey memory key, uint256 amount0, uint256 amount1, bytes calldata hookData)
external
returns (BalanceDelta);
/// @notice Writes the current ERC20 balance of the specified currency to transient storage
/// This is used to checkpoint balances for the manager and derive deltas for the caller.
/// @dev This MUST be called before any ERC20 tokens are sent into the contract, but can be skipped
/// for native tokens because the amount to settle is determined by the sent value.
/// However, if an ERC20 token has been synced and not settled, and the caller instead wants to settle
/// native funds, this function can be called with the native currency to then be able to settle the native currency
function sync(Currency currency) external;
/// @notice Called by the user to net out some value owed to the user
/// @dev Will revert if the requested amount is not available, consider using `mint` instead
/// @dev Can also be used as a mechanism for free flash loans
/// @param currency The currency to withdraw from the pool manager
/// @param to The address to withdraw to
/// @param amount The amount of currency to withdraw
function take(Currency currency, address to, uint256 amount) external;
/// @notice Called by the user to pay what is owed
/// @return paid The amount of currency settled
function settle() external payable returns (uint256 paid);
/// @notice Called by the user to pay on behalf of another address
/// @param recipient The address to credit for the payment
/// @return paid The amount of currency settled
function settleFor(address recipient) external payable returns (uint256 paid);
/// @notice WARNING - Any currency that is cleared, will be non-retrievable, and locked in the contract permanently.
/// A call to clear will zero out a positive balance WITHOUT a corresponding transfer.
/// @dev This could be used to clear a balance that is considered dust.
/// Additionally, the amount must be the exact positive balance. This is to enforce that the caller is aware of the amount being cleared.
function clear(Currency currency, uint256 amount) external;
/// @notice Called by the user to move value into ERC6909 balance
/// @param to The address to mint the tokens to
/// @param id The currency address to mint to ERC6909s, as a uint256
/// @param amount The amount of currency to mint
/// @dev The id is converted to a uint160 to correspond to a currency address
/// If the upper 12 bytes are not 0, they will be 0-ed out
function mint(address to, uint256 id, uint256 amount) external;
/// @notice Called by the user to move value from ERC6909 balance
/// @param from The address to burn the tokens from
/// @param id The currency address to burn from ERC6909s, as a uint256
/// @param amount The amount of currency to burn
/// @dev The id is converted to a uint160 to correspond to a currency address
/// If the upper 12 bytes are not 0, they will be 0-ed out
function burn(address from, uint256 id, uint256 amount) external;
/// @notice Updates the pools lp fees for the a pool that has enabled dynamic lp fees.
/// @dev A swap fee totaling MAX_SWAP_FEE (100%) makes exact output swaps impossible since the input is entirely consumed by the fee
/// @param key The key of the pool to update dynamic LP fees for
/// @param newDynamicLPFee The new dynamic pool LP fee
function updateDynamicLPFee(PoolKey memory key, uint24 newDynamicLPFee) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*
* CAUTION: See Security Considerations above.
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {FailedInnerCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
* unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {FailedInnerCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert FailedInnerCall();
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {SafeCast} from "../libraries/SafeCast.sol";
/// @dev Two `int128` values packed into a single `int256` where the upper 128 bits represent the amount0
/// and the lower 128 bits represent the amount1.
type BalanceDelta is int256;
using {add as +, sub as -, eq as ==, neq as !=} for BalanceDelta global;
using BalanceDeltaLibrary for BalanceDelta global;
using SafeCast for int256;
function toBalanceDelta(int128 _amount0, int128 _amount1) pure returns (BalanceDelta balanceDelta) {
assembly ("memory-safe") {
balanceDelta := or(shl(128, _amount0), and(sub(shl(128, 1), 1), _amount1))
}
}
function add(BalanceDelta a, BalanceDelta b) pure returns (BalanceDelta) {
int256 res0;
int256 res1;
assembly ("memory-safe") {
let a0 := sar(128, a)
let a1 := signextend(15, a)
let b0 := sar(128, b)
let b1 := signextend(15, b)
res0 := add(a0, b0)
res1 := add(a1, b1)
}
return toBalanceDelta(res0.toInt128(), res1.toInt128());
}
function sub(BalanceDelta a, BalanceDelta b) pure returns (BalanceDelta) {
int256 res0;
int256 res1;
assembly ("memory-safe") {
let a0 := sar(128, a)
let a1 := signextend(15, a)
let b0 := sar(128, b)
let b1 := signextend(15, b)
res0 := sub(a0, b0)
res1 := sub(a1, b1)
}
return toBalanceDelta(res0.toInt128(), res1.toInt128());
}
function eq(BalanceDelta a, BalanceDelta b) pure returns (bool) {
return BalanceDelta.unwrap(a) == BalanceDelta.unwrap(b);
}
function neq(BalanceDelta a, BalanceDelta b) pure returns (bool) {
return BalanceDelta.unwrap(a) != BalanceDelta.unwrap(b);
}
/// @notice Library for getting the amount0 and amount1 deltas from the BalanceDelta type
library BalanceDeltaLibrary {
/// @notice A BalanceDelta of 0
BalanceDelta public constant ZERO_DELTA = BalanceDelta.wrap(0);
function amount0(BalanceDelta balanceDelta) internal pure returns (int128 _amount0) {
assembly ("memory-safe") {
_amount0 := sar(128, balanceDelta)
}
}
function amount1(BalanceDelta balanceDelta) internal pure returns (int128 _amount1) {
assembly ("memory-safe") {
_amount1 := signextend(15, balanceDelta)
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// Return type of the beforeSwap hook.
// Upper 128 bits is the delta in specified tokens. Lower 128 bits is delta in unspecified tokens (to match the afterSwap hook)
type BeforeSwapDelta is int256;
// Creates a BeforeSwapDelta from specified and unspecified
function toBeforeSwapDelta(int128 deltaSpecified, int128 deltaUnspecified)
pure
returns (BeforeSwapDelta beforeSwapDelta)
{
assembly ("memory-safe") {
beforeSwapDelta := or(shl(128, deltaSpecified), and(sub(shl(128, 1), 1), deltaUnspecified))
}
}
/// @notice Library for getting the specified and unspecified deltas from the BeforeSwapDelta type
library BeforeSwapDeltaLibrary {
/// @notice A BeforeSwapDelta of 0
BeforeSwapDelta public constant ZERO_DELTA = BeforeSwapDelta.wrap(0);
/// extracts int128 from the upper 128 bits of the BeforeSwapDelta
/// returned by beforeSwap
function getSpecifiedDelta(BeforeSwapDelta delta) internal pure returns (int128 deltaSpecified) {
assembly ("memory-safe") {
deltaSpecified := sar(128, delta)
}
}
/// extracts int128 from the lower 128 bits of the BeforeSwapDelta
/// returned by beforeSwap and afterSwap
function getUnspecifiedDelta(BeforeSwapDelta delta) internal pure returns (int128 deltaUnspecified) {
assembly ("memory-safe") {
deltaUnspecified := signextend(15, delta)
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {IERC20Minimal} from "../interfaces/external/IERC20Minimal.sol";
import {CustomRevert} from "../libraries/CustomRevert.sol";
type Currency is address;
using {greaterThan as >, lessThan as <, greaterThanOrEqualTo as >=, equals as ==} for Currency global;
using CurrencyLibrary for Currency global;
function equals(Currency currency, Currency other) pure returns (bool) {
return Currency.unwrap(currency) == Currency.unwrap(other);
}
function greaterThan(Currency currency, Currency other) pure returns (bool) {
return Currency.unwrap(currency) > Currency.unwrap(other);
}
function lessThan(Currency currency, Currency other) pure returns (bool) {
return Currency.unwrap(currency) < Currency.unwrap(other);
}
function greaterThanOrEqualTo(Currency currency, Currency other) pure returns (bool) {
return Currency.unwrap(currency) >= Currency.unwrap(other);
}
/// @title CurrencyLibrary
/// @dev This library allows for transferring and holding native tokens and ERC20 tokens
library CurrencyLibrary {
/// @notice Additional context for ERC-7751 wrapped error when a native transfer fails
error NativeTransferFailed();
/// @notice Additional context for ERC-7751 wrapped error when an ERC20 transfer fails
error ERC20TransferFailed();
/// @notice A constant to represent the native currency
Currency public constant ADDRESS_ZERO = Currency.wrap(address(0));
function transfer(Currency currency, address to, uint256 amount) internal {
// altered from https://github.com/transmissions11/solmate/blob/44a9963d4c78111f77caa0e65d677b8b46d6f2e6/src/utils/SafeTransferLib.sol
// modified custom error selectors
bool success;
if (currency.isAddressZero()) {
assembly ("memory-safe") {
// Transfer the ETH and revert if it fails.
success := call(gas(), to, amount, 0, 0, 0, 0)
}
// revert with NativeTransferFailed, containing the bubbled up error as an argument
if (!success) {
CustomRevert.bubbleUpAndRevertWith(to, bytes4(0), NativeTransferFailed.selector);
}
} else {
assembly ("memory-safe") {
// Get a pointer to some free memory.
let fmp := mload(0x40)
// Write the abi-encoded calldata into memory, beginning with the function selector.
mstore(fmp, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
mstore(add(fmp, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
mstore(add(fmp, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.
success :=
and(
// Set success to whether the call reverted, if not we check it either
// returned exactly 1 (can't just be non-zero data), or had no return data.
or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
// We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
// We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
// Counterintuitively, this call must be positioned second to the or() call in the
// surrounding and() call or else returndatasize() will be zero during the computation.
call(gas(), currency, 0, fmp, 68, 0, 32)
)
// Now clean the memory we used
mstore(fmp, 0) // 4 byte `selector` and 28 bytes of `to` were stored here
mstore(add(fmp, 0x20), 0) // 4 bytes of `to` and 28 bytes of `amount` were stored here
mstore(add(fmp, 0x40), 0) // 4 bytes of `amount` were stored here
}
// revert with ERC20TransferFailed, containing the bubbled up error as an argument
if (!success) {
CustomRevert.bubbleUpAndRevertWith(
Currency.unwrap(currency), IERC20Minimal.transfer.selector, ERC20TransferFailed.selector
);
}
}
}
function balanceOfSelf(Currency currency) internal view returns (uint256) {
if (currency.isAddressZero()) {
return address(this).balance;
} else {
return IERC20Minimal(Currency.unwrap(currency)).balanceOf(address(this));
}
}
function balanceOf(Currency currency, address owner) internal view returns (uint256) {
if (currency.isAddressZero()) {
return owner.balance;
} else {
return IERC20Minimal(Currency.unwrap(currency)).balanceOf(owner);
}
}
function isAddressZero(Currency currency) internal pure returns (bool) {
return Currency.unwrap(currency) == Currency.unwrap(ADDRESS_ZERO);
}
function toId(Currency currency) internal pure returns (uint256) {
return uint160(Currency.unwrap(currency));
}
// If the upper 12 bytes are non-zero, they will be zero-ed out
// Therefore, fromId() and toId() are not inverses of each other
function fromId(uint256 id) internal pure returns (Currency) {
return Currency.wrap(address(uint160(id)));
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {PoolKey} from "./PoolKey.sol";
type PoolId is bytes32;
/// @notice Library for computing the ID of a pool
library PoolIdLibrary {
/// @notice Returns value equal to keccak256(abi.encode(poolKey))
function toId(PoolKey memory poolKey) internal pure returns (PoolId poolId) {
assembly ("memory-safe") {
// 0xa0 represents the total size of the poolKey struct (5 slots of 32 bytes)
poolId := keccak256(poolKey, 0xa0)
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @notice Interface for claims over a contract balance, wrapped as a ERC6909
interface IERC6909Claims {
/*//////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/
event OperatorSet(address indexed owner, address indexed operator, bool approved);
event Approval(address indexed owner, address indexed spender, uint256 indexed id, uint256 amount);
event Transfer(address caller, address indexed from, address indexed to, uint256 indexed id, uint256 amount);
/*//////////////////////////////////////////////////////////////
FUNCTIONS
//////////////////////////////////////////////////////////////*/
/// @notice Owner balance of an id.
/// @param owner The address of the owner.
/// @param id The id of the token.
/// @return amount The balance of the token.
function balanceOf(address owner, uint256 id) external view returns (uint256 amount);
/// @notice Spender allowance of an id.
/// @param owner The address of the owner.
/// @param spender The address of the spender.
/// @param id The id of the token.
/// @return amount The allowance of the token.
function allowance(address owner, address spender, uint256 id) external view returns (uint256 amount);
/// @notice Checks if a spender is approved by an owner as an operator
/// @param owner The address of the owner.
/// @param spender The address of the spender.
/// @return approved The approval status.
function isOperator(address owner, address spender) external view returns (bool approved);
/// @notice Transfers an amount of an id from the caller to a receiver.
/// @param receiver The address of the receiver.
/// @param id The id of the token.
/// @param amount The amount of the token.
/// @return bool True, always, unless the function reverts
function transfer(address receiver, uint256 id, uint256 amount) external returns (bool);
/// @notice Transfers an amount of an id from a sender to a receiver.
/// @param sender The address of the sender.
/// @param receiver The address of the receiver.
/// @param id The id of the token.
/// @param amount The amount of the token.
/// @return bool True, always, unless the function reverts
function transferFrom(address sender, address receiver, uint256 id, uint256 amount) external returns (bool);
/// @notice Approves an amount of an id to a spender.
/// @param spender The address of the spender.
/// @param id The id of the token.
/// @param amount The amount of the token.
/// @return bool True, always
function approve(address spender, uint256 id, uint256 amount) external returns (bool);
/// @notice Sets or removes an operator for the caller.
/// @param operator The address of the operator.
/// @param approved The approval status.
/// @return bool True, always
function setOperator(address operator, bool approved) external returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Currency} from "../types/Currency.sol";
import {PoolId} from "../types/PoolId.sol";
import {PoolKey} from "../types/PoolKey.sol";
/// @notice Interface for all protocol-fee related functions in the pool manager
interface IProtocolFees {
/// @notice Thrown when protocol fee is set too high
error ProtocolFeeTooLarge(uint24 fee);
/// @notice Thrown when collectProtocolFees or setProtocolFee is not called by the controller.
error InvalidCaller();
/// @notice Thrown when collectProtocolFees is attempted on a token that is synced.
error ProtocolFeeCurrencySynced();
/// @notice Emitted when the protocol fee controller address is updated in setProtocolFeeController.
event ProtocolFeeControllerUpdated(address indexed protocolFeeController);
/// @notice Emitted when the protocol fee is updated for a pool.
event ProtocolFeeUpdated(PoolId indexed id, uint24 protocolFee);
/// @notice Given a currency address, returns the protocol fees accrued in that currency
/// @param currency The currency to check
/// @return amount The amount of protocol fees accrued in the currency
function protocolFeesAccrued(Currency currency) external view returns (uint256 amount);
/// @notice Sets the protocol fee for the given pool
/// @param key The key of the pool to set a protocol fee for
/// @param newProtocolFee The fee to set
function setProtocolFee(PoolKey memory key, uint24 newProtocolFee) external;
/// @notice Sets the protocol fee controller
/// @param controller The new protocol fee controller
function setProtocolFeeController(address controller) external;
/// @notice Collects the protocol fees for a given recipient and currency, returning the amount collected
/// @dev This will revert if the contract is unlocked
/// @param recipient The address to receive the protocol fees
/// @param currency The currency to withdraw
/// @param amount The amount of currency to withdraw
/// @return amountCollected The amount of currency successfully withdrawn
function collectProtocolFees(address recipient, Currency currency, uint256 amount)
external
returns (uint256 amountCollected);
/// @notice Returns the current protocol fee controller address
/// @return address The current protocol fee controller address
function protocolFeeController() external view returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @notice Interface for functions to access any storage slot in a contract
interface IExtsload {
/// @notice Called by external contracts to access granular pool state
/// @param slot Key of slot to sload
/// @return value The value of the slot as bytes32
function extsload(bytes32 slot) external view returns (bytes32 value);
/// @notice Called by external contracts to access granular pool state
/// @param startSlot Key of slot to start sloading from
/// @param nSlots Number of slots to load into return value
/// @return values List of loaded values.
function extsload(bytes32 startSlot, uint256 nSlots) external view returns (bytes32[] memory values);
/// @notice Called by external contracts to access sparse pool state
/// @param slots List of slots to SLOAD from.
/// @return values List of loaded values.
function extsload(bytes32[] calldata slots) external view returns (bytes32[] memory values);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
/// @notice Interface for functions to access any transient storage slot in a contract
interface IExttload {
/// @notice Called by external contracts to access transient storage of the contract
/// @param slot Key of slot to tload
/// @return value The value of the slot as bytes32
function exttload(bytes32 slot) external view returns (bytes32 value);
/// @notice Called by external contracts to access sparse transient pool state
/// @param slots List of slots to tload
/// @return values List of loaded values
function exttload(bytes32[] calldata slots) external view returns (bytes32[] memory values);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {CustomRevert} from "./CustomRevert.sol";
/// @title Safe casting methods
/// @notice Contains methods for safely casting between types
library SafeCast {
using CustomRevert for bytes4;
error SafeCastOverflow();
/// @notice Cast a uint256 to a uint160, revert on overflow
/// @param x The uint256 to be downcasted
/// @return y The downcasted integer, now type uint160
function toUint160(uint256 x) internal pure returns (uint160 y) {
y = uint160(x);
if (y != x) SafeCastOverflow.selector.revertWith();
}
/// @notice Cast a uint256 to a uint128, revert on overflow
/// @param x The uint256 to be downcasted
/// @return y The downcasted integer, now type uint128
function toUint128(uint256 x) internal pure returns (uint128 y) {
y = uint128(x);
if (x != y) SafeCastOverflow.selector.revertWith();
}
/// @notice Cast a int128 to a uint128, revert on overflow or underflow
/// @param x The int128 to be casted
/// @return y The casted integer, now type uint128
function toUint128(int128 x) internal pure returns (uint128 y) {
if (x < 0) SafeCastOverflow.selector.revertWith();
y = uint128(x);
}
/// @notice Cast a int256 to a int128, revert on overflow or underflow
/// @param x The int256 to be downcasted
/// @return y The downcasted integer, now type int128
function toInt128(int256 x) internal pure returns (int128 y) {
y = int128(x);
if (y != x) SafeCastOverflow.selector.revertWith();
}
/// @notice Cast a uint256 to a int256, revert on overflow
/// @param x The uint256 to be casted
/// @return y The casted integer, now type int256
function toInt256(uint256 x) internal pure returns (int256 y) {
y = int256(x);
if (y < 0) SafeCastOverflow.selector.revertWith();
}
/// @notice Cast a uint256 to a int128, revert on overflow
/// @param x The uint256 to be downcasted
/// @return The downcasted integer, now type int128
function toInt128(uint256 x) internal pure returns (int128) {
if (x >= 1 << 127) SafeCastOverflow.selector.revertWith();
return int128(int256(x));
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @title Minimal ERC20 interface for Uniswap
/// @notice Contains a subset of the full ERC20 interface that is used in Uniswap V3
interface IERC20Minimal {
/// @notice Returns an account's balance in the token
/// @param account The account for which to look up the number of tokens it has, i.e. its balance
/// @return The number of tokens held by the account
function balanceOf(address account) external view returns (uint256);
/// @notice Transfers the amount of token from the `msg.sender` to the recipient
/// @param recipient The account that will receive the amount transferred
/// @param amount The number of tokens to send from the sender to the recipient
/// @return Returns true for a successful transfer, false for an unsuccessful transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/// @notice Returns the current allowance given to a spender by an owner
/// @param owner The account of the token owner
/// @param spender The account of the token spender
/// @return The current allowance granted by `owner` to `spender`
function allowance(address owner, address spender) external view returns (uint256);
/// @notice Sets the allowance of a spender from the `msg.sender` to the value `amount`
/// @param spender The account which will be allowed to spend a given amount of the owners tokens
/// @param amount The amount of tokens allowed to be used by `spender`
/// @return Returns true for a successful approval, false for unsuccessful
function approve(address spender, uint256 amount) external returns (bool);
/// @notice Transfers `amount` tokens from `sender` to `recipient` up to the allowance given to the `msg.sender`
/// @param sender The account from which the transfer will be initiated
/// @param recipient The recipient of the transfer
/// @param amount The amount of the transfer
/// @return Returns true for a successful transfer, false for unsuccessful
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/// @notice Event emitted when tokens are transferred from one address to another, either via `#transfer` or `#transferFrom`.
/// @param from The account from which the tokens were sent, i.e. the balance decreased
/// @param to The account to which the tokens were sent, i.e. the balance increased
/// @param value The amount of tokens that were transferred
event Transfer(address indexed from, address indexed to, uint256 value);
/// @notice Event emitted when the approval amount for the spender of a given owner's tokens changes.
/// @param owner The account that approved spending of its tokens
/// @param spender The account for which the spending allowance was modified
/// @param value The new allowance from the owner to the spender
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @title Library for reverting with custom errors efficiently
/// @notice Contains functions for reverting with custom errors with different argument types efficiently
/// @dev To use this library, declare `using CustomRevert for bytes4;` and replace `revert CustomError()` with
/// `CustomError.selector.revertWith()`
/// @dev The functions may tamper with the free memory pointer but it is fine since the call context is exited immediately
library CustomRevert {
/// @dev ERC-7751 error for wrapping bubbled up reverts
error WrappedError(address target, bytes4 selector, bytes reason, bytes details);
/// @dev Reverts with the selector of a custom error in the scratch space
function revertWith(bytes4 selector) internal pure {
assembly ("memory-safe") {
mstore(0, selector)
revert(0, 0x04)
}
}
/// @dev Reverts with a custom error with an address argument in the scratch space
function revertWith(bytes4 selector, address addr) internal pure {
assembly ("memory-safe") {
mstore(0, selector)
mstore(0x04, and(addr, 0xffffffffffffffffffffffffffffffffffffffff))
revert(0, 0x24)
}
}
/// @dev Reverts with a custom error with an int24 argument in the scratch space
function revertWith(bytes4 selector, int24 value) internal pure {
assembly ("memory-safe") {
mstore(0, selector)
mstore(0x04, signextend(2, value))
revert(0, 0x24)
}
}
/// @dev Reverts with a custom error with a uint160 argument in the scratch space
function revertWith(bytes4 selector, uint160 value) internal pure {
assembly ("memory-safe") {
mstore(0, selector)
mstore(0x04, and(value, 0xffffffffffffffffffffffffffffffffffffffff))
revert(0, 0x24)
}
}
/// @dev Reverts with a custom error with two int24 arguments
function revertWith(bytes4 selector, int24 value1, int24 value2) internal pure {
assembly ("memory-safe") {
let fmp := mload(0x40)
mstore(fmp, selector)
mstore(add(fmp, 0x04), signextend(2, value1))
mstore(add(fmp, 0x24), signextend(2, value2))
revert(fmp, 0x44)
}
}
/// @dev Reverts with a custom error with two uint160 arguments
function revertWith(bytes4 selector, uint160 value1, uint160 value2) internal pure {
assembly ("memory-safe") {
let fmp := mload(0x40)
mstore(fmp, selector)
mstore(add(fmp, 0x04), and(value1, 0xffffffffffffffffffffffffffffffffffffffff))
mstore(add(fmp, 0x24), and(value2, 0xffffffffffffffffffffffffffffffffffffffff))
revert(fmp, 0x44)
}
}
/// @dev Reverts with a custom error with two address arguments
function revertWith(bytes4 selector, address value1, address value2) internal pure {
assembly ("memory-safe") {
let fmp := mload(0x40)
mstore(fmp, selector)
mstore(add(fmp, 0x04), and(value1, 0xffffffffffffffffffffffffffffffffffffffff))
mstore(add(fmp, 0x24), and(value2, 0xffffffffffffffffffffffffffffffffffffffff))
revert(fmp, 0x44)
}
}
/// @notice bubble up the revert message returned by a call and revert with a wrapped ERC-7751 error
/// @dev this method can be vulnerable to revert data bombs
function bubbleUpAndRevertWith(
address revertingContract,
bytes4 revertingFunctionSelector,
bytes4 additionalContext
) internal pure {
bytes4 wrappedErrorSelector = WrappedError.selector;
assembly ("memory-safe") {
// Ensure the size of the revert data is a multiple of 32 bytes
let encodedDataSize := mul(div(add(returndatasize(), 31), 32), 32)
let fmp := mload(0x40)
// Encode wrapped error selector, address, function selector, offset, additional context, size, revert reason
mstore(fmp, wrappedErrorSelector)
mstore(add(fmp, 0x04), and(revertingContract, 0xffffffffffffffffffffffffffffffffffffffff))
mstore(
add(fmp, 0x24),
and(revertingFunctionSelector, 0xffffffff00000000000000000000000000000000000000000000000000000000)
)
// offset revert reason
mstore(add(fmp, 0x44), 0x80)
// offset additional context
mstore(add(fmp, 0x64), add(0xa0, encodedDataSize))
// size revert reason
mstore(add(fmp, 0x84), returndatasize())
// revert reason
returndatacopy(add(fmp, 0xa4), 0, returndatasize())
// size additional context
mstore(add(fmp, add(0xa4, encodedDataSize)), 0x04)
// additional context
mstore(
add(fmp, add(0xc4, encodedDataSize)),
and(additionalContext, 0xffffffff00000000000000000000000000000000000000000000000000000000)
)
revert(fmp, add(0xe4, encodedDataSize))
}
}
}{
"remappings": [
"@ensdomains/=lib/v4-periphery/lib/v4-core/node_modules/@ensdomains/",
"@openzeppelin/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/",
"@openzeppelin/contracts/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/contracts/",
"@uniswap/v4-core/=lib/v4-periphery/lib/v4-core/",
"ds-test/=lib/v4-periphery/lib/v4-core/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-gas-snapshot/=lib/v4-periphery/lib/forge-gas-snapshot/src/",
"forge-std/=lib/forge-std/src/",
"hardhat/=lib/v4-periphery/lib/v4-core/node_modules/hardhat/",
"openzeppelin-contracts/=lib/v4-periphery/lib/v4-core/lib/openzeppelin-contracts/",
"permit2/=lib/v4-periphery/lib/permit2/",
"solmate/=lib/v4-periphery/lib/v4-core/lib/solmate/",
"v4-core/=lib/v4-periphery/lib/v4-core/src/",
"v4-periphery/=lib/v4-periphery/",
"halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/"
],
"optimizer": {
"enabled": true,
"runs": 800
},
"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":[{"internalType":"address","name":"_admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"advisors","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_hypervisor","type":"address"}],"name":"claimFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimManagers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_hypervisor","type":"address"},{"internalType":"uint128[]","name":"liquidities","type":"uint128[]"},{"internalType":"uint256[2][]","name":"inMin","type":"uint256[2][]"},{"internalType":"int24","name":"aimTick","type":"int24"},{"internalType":"uint24","name":"tickOffset","type":"uint24"}],"name":"compound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fixOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ownerFixed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_hypervisor","type":"address"},{"components":[{"components":[{"internalType":"Currency","name":"currency0","type":"address"},{"internalType":"Currency","name":"currency1","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"int24","name":"tickSpacing","type":"int24"},{"internalType":"contract IHooks","name":"hooks","type":"address"}],"internalType":"struct PoolKey","name":"poolKey","type":"tuple"},{"internalType":"int24","name":"lowerTick","type":"int24"},{"internalType":"int24","name":"upperTick","type":"int24"}],"internalType":"struct IMultiPositionManager.Position[]","name":"baseRanges","type":"tuple[]"},{"internalType":"uint128[]","name":"liquidities","type":"uint128[]"},{"internalType":"int24","name":"limitWidth","type":"int24"},{"internalType":"uint256[2][]","name":"inMin","type":"uint256[2][]"},{"internalType":"uint256[2][]","name":"outMin","type":"uint256[2][]"},{"internalType":"int24","name":"aimTick","type":"int24"},{"internalType":"uint24","name":"tickOffset","type":"uint24"}],"name":"rebalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rebalancers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_hypervisor","type":"address"}],"name":"removeWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_hypervisor","type":"address"},{"internalType":"address","name":"newAdvisor","type":"address"}],"name":"setAdvisor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_hypervisor","type":"address"},{"internalType":"address","name":"newClaimManager","type":"address"}],"name":"setClaimManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_hypervisor","type":"address"},{"internalType":"uint8","name":"newFee","type":"uint8"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_hypervisor","type":"address"},{"internalType":"address","name":"_feeRecipient","type":"address"}],"name":"setFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_hypervisor","type":"address"},{"internalType":"address","name":"newRebalancer","type":"address"}],"name":"setRebalancer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_hypervisor","type":"address"},{"internalType":"address","name":"newWhitelist","type":"address"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"transferAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_hypervisor","type":"address"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferHypervisorOwner","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040525f805460ff60a01b19169055348015601a575f80fd5b50604051611604380380611604833981016040819052603791605a565b5f80546001600160a01b0319166001600160a01b03929092169190911790556085565b5f602082840312156069575f80fd5b81516001600160a01b0381168114607e575f80fd5b9392505050565b611572806100925f395ff3fe608060405234801561000f575f80fd5b5060043610610149575f3560e01c80635d799f87116100c7578063ba181ac61161007d578063f82c90e211610063578063f82c90e2146102e0578063f851a440146102f3578063fcafbbcf14610305575f80fd5b8063ba181ac6146102ba578063bc2ff23d146102cd575f80fd5b806375829def116100ad57806375829def1461026c57806380fafbfb1461027f578063a44d57a014610292575f80fd5b80635d799f87146102465780636ebc51e114610259575f80fd5b8063291d95491161011c5780632db7a7c5116101025780632db7a7c5146102035780633cb2251e14610216578063461d5ddf1461023e575f80fd5b8063291d9549146101cd5780632a3dc004146101e0575f80fd5b806303ca0f6c1461014d578063080f2a55146101925780630fdf7a4c146101a7578063270401cb146101ba575b5f80fd5b61017561015b366004610db3565b60026020525f90815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101a56101a0366004610dd5565b610318565b005b6101a56101b5366004610e11565b6103bf565b6101a56101c8366004610e11565b61048c565b6101a56101db366004610db3565b610500565b5f546101f390600160a01b900460ff1681565b6040519015158152602001610189565b6101a5610211366004611162565b61059d565b610175610224366004610db3565b60036020525f90815260409020546001600160a01b031681565b6101a5610677565b6101a5610254366004610e11565b6106e6565b6101a5610267366004610db3565b610882565b6101a561027a366004610db3565b610924565b6101a561028d36600461125c565b6109e1565b6101756102a0366004610db3565b60016020525f90815260409020546001600160a01b031681565b6101a56102c8366004610e11565b610ab2565b6101a56102db366004610e11565b610b26565b6101a56102ee366004610e11565b610bef565b5f54610175906001600160a01b031681565b6101a5610313366004610e11565b610cb8565b5f546001600160a01b031633146103635760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b60448201526064015b60405180910390fd5b604051638e00555360e01b815260ff821660048201526001600160a01b03831690638e005553906024015b5f604051808303815f87803b1580156103a5575f80fd5b505af11580156103b7573d5f803e3d5ffd5b505050505050565b5f546001600160a01b031633146104055760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b5f54600160a01b900460ff161561045e5760405162461bcd60e51b815260206004820152601860248201527f7065726d616e656e74206f776e657220696e20706c6163650000000000000000604482015260640161035a565b60405163f2fde38b60e01b81526001600160a01b03828116600483015283169063f2fde38b9060240161038e565b5f546001600160a01b031633146104d25760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b60405163e74b981b60e01b81526001600160a01b03828116600483015283169063e74b981b9060240161038e565b5f546001600160a01b031633146105465760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b60405163854cff2f60e01b81525f60048201526001600160a01b0382169063854cff2f906024015f604051808303815f87803b158015610584575f80fd5b505af1158015610596573d5f803e3d5ffd5b5050505050565b6001600160a01b038881165f9081526001602052604090205489911633146106075760405162461bcd60e51b815260206004820152600f60248201527f6f6e6c7920726562616c616e6365720000000000000000000000000000000000604482015260640161035a565b60405163117b3bb760e31b81526001600160a01b038a1690638bd9ddb89061063f908b908b908b908b908b908b908b90600401611396565b5f604051808303815f87803b158015610656575f80fd5b505af1158015610668573d5f803e3d5ffd5b50505050505050505050505050565b5f546001600160a01b031633146106bd5760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b5f546001600160a01b0316331461072c5760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b6001600160a01b0381166107825760405162461bcd60e51b815260206004820152601c60248201527f726563697069656e742073686f756c64206265206e6f6e2d7a65726f00000000604482015260640161035a565b6040516370a0823160e01b81523060048201526001600160a01b0383169063a9059cbb90839083906370a0823190602401602060405180830381865afa1580156107ce573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107f291906114c2565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015610852573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061087691906114d9565b61087e575f80fd5b5050565b6001600160a01b038181165f9081526003602052604090205482911633146108ec5760405162461bcd60e51b815260206004820152601260248201527f6f6e6c7920636c61696d206d616e616765720000000000000000000000000000604482015260640161035a565b816001600160a01b03166399d32fc46040518163ffffffff1660e01b81526004015f604051808303815f87803b1580156103a5575f80fd5b5f546001600160a01b0316331461096a5760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b6001600160a01b0381166109c05760405162461bcd60e51b815260206004820152601b60248201527f6e657741646d696e2073686f756c64206265206e6f6e2d7a65726f0000000000604482015260640161035a565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038581165f908152600260205260409020548691163314610a4b5760405162461bcd60e51b815260206004820152600c60248201527f6f6e6c792061647669736f720000000000000000000000000000000000000000604482015260640161035a565b604051635d08858560e01b81526001600160a01b03871690635d08858590610a7d9088908890889088906004016114f8565b5f604051808303815f87803b158015610a94575f80fd5b505af1158015610aa6573d5f803e3d5ffd5b50505050505050505050565b5f546001600160a01b03163314610af85760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b60405163854cff2f60e01b81526001600160a01b03828116600483015283169063854cff2f9060240161038e565b5f546001600160a01b03163314610b6c5760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b6001600160a01b038116610bc25760405162461bcd60e51b815260206004820152601d60248201527f6e657741647669736f722073686f756c64206265206e6f6e2d7a65726f000000604482015260640161035a565b6001600160a01b039182165f90815260026020526040902080546001600160a01b03191691909216179055565b5f546001600160a01b03163314610c355760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b6001600160a01b038116610c8b5760405162461bcd60e51b815260206004820181905260248201527f6e6577526562616c616e6365722073686f756c64206265206e6f6e2d7a65726f604482015260640161035a565b6001600160a01b039182165f90815260016020526040902080546001600160a01b03191691909216179055565b5f546001600160a01b03163314610cfe5760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b6001600160a01b038116610d5f5760405162461bcd60e51b815260206004820152602260248201527f6e6577436c61696d4d616e616765722073686f756c64206265206e6f6e2d7a65604482015261726f60f01b606482015260840161035a565b6001600160a01b039182165f90815260036020526040902080546001600160a01b03191691909216179055565b6001600160a01b0381168114610da0575f80fd5b50565b8035610dae81610d8c565b919050565b5f60208284031215610dc3575f80fd5b8135610dce81610d8c565b9392505050565b5f8060408385031215610de6575f80fd5b8235610df181610d8c565b9150602083013560ff81168114610e06575f80fd5b809150509250929050565b5f8060408385031215610e22575f80fd5b8235610e2d81610d8c565b91506020830135610e0681610d8c565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff81118282101715610e7457610e74610e3d565b60405290565b60405160a0810167ffffffffffffffff81118282101715610e7457610e74610e3d565b6040805190810167ffffffffffffffff81118282101715610e7457610e74610e3d565b604051601f8201601f1916810167ffffffffffffffff81118282101715610ee957610ee9610e3d565b604052919050565b5f67ffffffffffffffff821115610f0a57610f0a610e3d565b5060051b60200190565b803562ffffff81168114610dae575f80fd5b8035600281900b8114610dae575f80fd5b5f82601f830112610f46575f80fd5b8135610f59610f5482610ef1565b610ec0565b80828252602082019150602060e08402860101925085831115610f7a575f80fd5b602085015b838110156110415780870360e0811215610f97575f80fd5b610f9f610e51565b60a0821215610fac575f80fd5b610fb4610e7a565b91508235610fc181610d8c565b82526020830135610fd181610d8c565b6020830152610fe260408401610f14565b6040830152610ff360608401610f26565b6060830152608083013561100681610d8c565b608083015281815261101a60a08401610f26565b602082015261102b60c08401610f26565b604082015284525060209092019160e001610f7f565b5095945050505050565b5f82601f83011261105a575f80fd5b8135611068610f5482610ef1565b8082825260208201915060208360051b860101925085831115611089575f80fd5b602085015b838110156110415780356fffffffffffffffffffffffffffffffff811681146110b5575f80fd5b83526020928301920161108e565b5f82601f8301126110d2575f80fd5b81356110e0610f5482610ef1565b8082825260208201915060208360061b860101925085831115611101575f80fd5b602085015b838110156110415786601f82011261111c575f80fd5b611124610e9d565b806040830189811115611135575f80fd5b835b8181101561114f578035845260209384019301611137565b5050845250602090920191604001611106565b5f805f805f805f80610100898b03121561117a575f80fd5b61118389610da3565b9750602089013567ffffffffffffffff81111561119e575f80fd5b6111aa8b828c01610f37565b975050604089013567ffffffffffffffff8111156111c6575f80fd5b6111d28b828c0161104b565b9650506111e160608a01610f26565b9450608089013567ffffffffffffffff8111156111fc575f80fd5b6112088b828c016110c3565b94505060a089013567ffffffffffffffff811115611224575f80fd5b6112308b828c016110c3565b93505061123f60c08a01610f26565b915061124d60e08a01610f14565b90509295985092959890939650565b5f805f805f60a08688031215611270575f80fd5b853561127b81610d8c565b9450602086013567ffffffffffffffff811115611296575f80fd5b6112a28882890161104b565b945050604086013567ffffffffffffffff8111156112be575f80fd5b6112ca888289016110c3565b9350506112d960608701610f26565b91506112e760808701610f14565b90509295509295909350565b5f8151808452602084019350602083015f5b828110156113355781516fffffffffffffffffffffffffffffffff16865260209586019590910190600101611305565b5093949350505050565b5f8151808452602084019350602083015f5b82811015611335578151865f5b600281101561137d57825182526020928301929091019060010161135e565b5050506040959095019460209190910190600101611351565b60e080825288519082018190525f9060208a0190610100840190835b8181101561144d57835180516001600160a01b0381511685526001600160a01b03602082015116602086015262ffffff6040820151166040860152606081015160020b60608601526001600160a01b03608082015116608086015250602081015161142260a086018260020b9052565b506040015161143660c085018260020b9052565b506020939093019260e092909201916001016113b2565b50508381036020850152611461818b6112f3565b915050611473604084018960020b9052565b8281036060840152611485818861133f565b90508281036080840152611499818761133f565b9150506114ab60a083018560020b9052565b62ffffff831660c083015298975050505050505050565b5f602082840312156114d2575f80fd5b5051919050565b5f602082840312156114e9575f80fd5b81518015158114610dce575f80fd5b608081525f61150a60808301876112f3565b828103602084015261151c818761133f565b9150508360020b604083015262ffffff831660608301529594505050505056fea2646970667358221220775b8a9d32893e70e5ca5c6eec5083e14b577b499df915ff2d33b48d2a3732ed64736f6c634300081a0033000000000000000000000000846e79175c78371dafe6598f57b503b66c03ef9c
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610149575f3560e01c80635d799f87116100c7578063ba181ac61161007d578063f82c90e211610063578063f82c90e2146102e0578063f851a440146102f3578063fcafbbcf14610305575f80fd5b8063ba181ac6146102ba578063bc2ff23d146102cd575f80fd5b806375829def116100ad57806375829def1461026c57806380fafbfb1461027f578063a44d57a014610292575f80fd5b80635d799f87146102465780636ebc51e114610259575f80fd5b8063291d95491161011c5780632db7a7c5116101025780632db7a7c5146102035780633cb2251e14610216578063461d5ddf1461023e575f80fd5b8063291d9549146101cd5780632a3dc004146101e0575f80fd5b806303ca0f6c1461014d578063080f2a55146101925780630fdf7a4c146101a7578063270401cb146101ba575b5f80fd5b61017561015b366004610db3565b60026020525f90815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101a56101a0366004610dd5565b610318565b005b6101a56101b5366004610e11565b6103bf565b6101a56101c8366004610e11565b61048c565b6101a56101db366004610db3565b610500565b5f546101f390600160a01b900460ff1681565b6040519015158152602001610189565b6101a5610211366004611162565b61059d565b610175610224366004610db3565b60036020525f90815260409020546001600160a01b031681565b6101a5610677565b6101a5610254366004610e11565b6106e6565b6101a5610267366004610db3565b610882565b6101a561027a366004610db3565b610924565b6101a561028d36600461125c565b6109e1565b6101756102a0366004610db3565b60016020525f90815260409020546001600160a01b031681565b6101a56102c8366004610e11565b610ab2565b6101a56102db366004610e11565b610b26565b6101a56102ee366004610e11565b610bef565b5f54610175906001600160a01b031681565b6101a5610313366004610e11565b610cb8565b5f546001600160a01b031633146103635760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b60448201526064015b60405180910390fd5b604051638e00555360e01b815260ff821660048201526001600160a01b03831690638e005553906024015b5f604051808303815f87803b1580156103a5575f80fd5b505af11580156103b7573d5f803e3d5ffd5b505050505050565b5f546001600160a01b031633146104055760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b5f54600160a01b900460ff161561045e5760405162461bcd60e51b815260206004820152601860248201527f7065726d616e656e74206f776e657220696e20706c6163650000000000000000604482015260640161035a565b60405163f2fde38b60e01b81526001600160a01b03828116600483015283169063f2fde38b9060240161038e565b5f546001600160a01b031633146104d25760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b60405163e74b981b60e01b81526001600160a01b03828116600483015283169063e74b981b9060240161038e565b5f546001600160a01b031633146105465760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b60405163854cff2f60e01b81525f60048201526001600160a01b0382169063854cff2f906024015f604051808303815f87803b158015610584575f80fd5b505af1158015610596573d5f803e3d5ffd5b5050505050565b6001600160a01b038881165f9081526001602052604090205489911633146106075760405162461bcd60e51b815260206004820152600f60248201527f6f6e6c7920726562616c616e6365720000000000000000000000000000000000604482015260640161035a565b60405163117b3bb760e31b81526001600160a01b038a1690638bd9ddb89061063f908b908b908b908b908b908b908b90600401611396565b5f604051808303815f87803b158015610656575f80fd5b505af1158015610668573d5f803e3d5ffd5b50505050505050505050505050565b5f546001600160a01b031633146106bd5760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b5f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b5f546001600160a01b0316331461072c5760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b6001600160a01b0381166107825760405162461bcd60e51b815260206004820152601c60248201527f726563697069656e742073686f756c64206265206e6f6e2d7a65726f00000000604482015260640161035a565b6040516370a0823160e01b81523060048201526001600160a01b0383169063a9059cbb90839083906370a0823190602401602060405180830381865afa1580156107ce573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107f291906114c2565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015610852573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061087691906114d9565b61087e575f80fd5b5050565b6001600160a01b038181165f9081526003602052604090205482911633146108ec5760405162461bcd60e51b815260206004820152601260248201527f6f6e6c7920636c61696d206d616e616765720000000000000000000000000000604482015260640161035a565b816001600160a01b03166399d32fc46040518163ffffffff1660e01b81526004015f604051808303815f87803b1580156103a5575f80fd5b5f546001600160a01b0316331461096a5760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b6001600160a01b0381166109c05760405162461bcd60e51b815260206004820152601b60248201527f6e657741646d696e2073686f756c64206265206e6f6e2d7a65726f0000000000604482015260640161035a565b5f80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038581165f908152600260205260409020548691163314610a4b5760405162461bcd60e51b815260206004820152600c60248201527f6f6e6c792061647669736f720000000000000000000000000000000000000000604482015260640161035a565b604051635d08858560e01b81526001600160a01b03871690635d08858590610a7d9088908890889088906004016114f8565b5f604051808303815f87803b158015610a94575f80fd5b505af1158015610aa6573d5f803e3d5ffd5b50505050505050505050565b5f546001600160a01b03163314610af85760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b60405163854cff2f60e01b81526001600160a01b03828116600483015283169063854cff2f9060240161038e565b5f546001600160a01b03163314610b6c5760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b6001600160a01b038116610bc25760405162461bcd60e51b815260206004820152601d60248201527f6e657741647669736f722073686f756c64206265206e6f6e2d7a65726f000000604482015260640161035a565b6001600160a01b039182165f90815260026020526040902080546001600160a01b03191691909216179055565b5f546001600160a01b03163314610c355760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b6001600160a01b038116610c8b5760405162461bcd60e51b815260206004820181905260248201527f6e6577526562616c616e6365722073686f756c64206265206e6f6e2d7a65726f604482015260640161035a565b6001600160a01b039182165f90815260016020526040902080546001600160a01b03191691909216179055565b5f546001600160a01b03163314610cfe5760405162461bcd60e51b815260206004820152600a60248201526937b7363c9030b236b4b760b11b604482015260640161035a565b6001600160a01b038116610d5f5760405162461bcd60e51b815260206004820152602260248201527f6e6577436c61696d4d616e616765722073686f756c64206265206e6f6e2d7a65604482015261726f60f01b606482015260840161035a565b6001600160a01b039182165f90815260036020526040902080546001600160a01b03191691909216179055565b6001600160a01b0381168114610da0575f80fd5b50565b8035610dae81610d8c565b919050565b5f60208284031215610dc3575f80fd5b8135610dce81610d8c565b9392505050565b5f8060408385031215610de6575f80fd5b8235610df181610d8c565b9150602083013560ff81168114610e06575f80fd5b809150509250929050565b5f8060408385031215610e22575f80fd5b8235610e2d81610d8c565b91506020830135610e0681610d8c565b634e487b7160e01b5f52604160045260245ffd5b6040516060810167ffffffffffffffff81118282101715610e7457610e74610e3d565b60405290565b60405160a0810167ffffffffffffffff81118282101715610e7457610e74610e3d565b6040805190810167ffffffffffffffff81118282101715610e7457610e74610e3d565b604051601f8201601f1916810167ffffffffffffffff81118282101715610ee957610ee9610e3d565b604052919050565b5f67ffffffffffffffff821115610f0a57610f0a610e3d565b5060051b60200190565b803562ffffff81168114610dae575f80fd5b8035600281900b8114610dae575f80fd5b5f82601f830112610f46575f80fd5b8135610f59610f5482610ef1565b610ec0565b80828252602082019150602060e08402860101925085831115610f7a575f80fd5b602085015b838110156110415780870360e0811215610f97575f80fd5b610f9f610e51565b60a0821215610fac575f80fd5b610fb4610e7a565b91508235610fc181610d8c565b82526020830135610fd181610d8c565b6020830152610fe260408401610f14565b6040830152610ff360608401610f26565b6060830152608083013561100681610d8c565b608083015281815261101a60a08401610f26565b602082015261102b60c08401610f26565b604082015284525060209092019160e001610f7f565b5095945050505050565b5f82601f83011261105a575f80fd5b8135611068610f5482610ef1565b8082825260208201915060208360051b860101925085831115611089575f80fd5b602085015b838110156110415780356fffffffffffffffffffffffffffffffff811681146110b5575f80fd5b83526020928301920161108e565b5f82601f8301126110d2575f80fd5b81356110e0610f5482610ef1565b8082825260208201915060208360061b860101925085831115611101575f80fd5b602085015b838110156110415786601f82011261111c575f80fd5b611124610e9d565b806040830189811115611135575f80fd5b835b8181101561114f578035845260209384019301611137565b5050845250602090920191604001611106565b5f805f805f805f80610100898b03121561117a575f80fd5b61118389610da3565b9750602089013567ffffffffffffffff81111561119e575f80fd5b6111aa8b828c01610f37565b975050604089013567ffffffffffffffff8111156111c6575f80fd5b6111d28b828c0161104b565b9650506111e160608a01610f26565b9450608089013567ffffffffffffffff8111156111fc575f80fd5b6112088b828c016110c3565b94505060a089013567ffffffffffffffff811115611224575f80fd5b6112308b828c016110c3565b93505061123f60c08a01610f26565b915061124d60e08a01610f14565b90509295985092959890939650565b5f805f805f60a08688031215611270575f80fd5b853561127b81610d8c565b9450602086013567ffffffffffffffff811115611296575f80fd5b6112a28882890161104b565b945050604086013567ffffffffffffffff8111156112be575f80fd5b6112ca888289016110c3565b9350506112d960608701610f26565b91506112e760808701610f14565b90509295509295909350565b5f8151808452602084019350602083015f5b828110156113355781516fffffffffffffffffffffffffffffffff16865260209586019590910190600101611305565b5093949350505050565b5f8151808452602084019350602083015f5b82811015611335578151865f5b600281101561137d57825182526020928301929091019060010161135e565b5050506040959095019460209190910190600101611351565b60e080825288519082018190525f9060208a0190610100840190835b8181101561144d57835180516001600160a01b0381511685526001600160a01b03602082015116602086015262ffffff6040820151166040860152606081015160020b60608601526001600160a01b03608082015116608086015250602081015161142260a086018260020b9052565b506040015161143660c085018260020b9052565b506020939093019260e092909201916001016113b2565b50508381036020850152611461818b6112f3565b915050611473604084018960020b9052565b8281036060840152611485818861133f565b90508281036080840152611499818761133f565b9150506114ab60a083018560020b9052565b62ffffff831660c083015298975050505050505050565b5f602082840312156114d2575f80fd5b5051919050565b5f602082840312156114e9575f80fd5b81518015158114610dce575f80fd5b608081525f61150a60808301876112f3565b828103602084015261151c818761133f565b9150508360020b604083015262ffffff831660608301529594505050505056fea2646970667358221220775b8a9d32893e70e5ca5c6eec5083e14b577b499df915ff2d33b48d2a3732ed64736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000846E79175c78371DafE6598F57b503B66C03Ef9C
-----Decoded View---------------
Arg [0] : _admin (address): 0x846E79175c78371DafE6598F57b503B66C03Ef9C
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000846E79175c78371DafE6598F57b503B66C03Ef9C
Net Worth in USD
Net Worth in ETH
Multichain Portfolio | 35 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.