Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 12 from a total of 12 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Create Vault | 17413059 | 449 days ago | IN | 0 ETH | 0.00165714 | ||||
Transfer Ownersh... | 17313387 | 463 days ago | IN | 0 ETH | 0.0009769 | ||||
Create Vault | 17284292 | 467 days ago | IN | 0 ETH | 0.02273769 | ||||
Create Vault | 17277113 | 468 days ago | IN | 0 ETH | 0.02778985 | ||||
Create Vault | 17277066 | 468 days ago | IN | 0 ETH | 0.02903906 | ||||
Create Vault | 17277037 | 468 days ago | IN | 0 ETH | 0.02779051 | ||||
Create Vault | 17277018 | 468 days ago | IN | 0 ETH | 0.0289851 | ||||
Create Vault | 17277000 | 468 days ago | IN | 0 ETH | 0.02656714 | ||||
Create Vault | 17276953 | 468 days ago | IN | 0 ETH | 0.02560297 | ||||
Create Vault | 17276901 | 468 days ago | IN | 0 ETH | 0.02077222 | ||||
Create Vault | 17266986 | 470 days ago | IN | 0 ETH | 0.03134292 | ||||
0x60a06040 | 17266660 | 470 days ago | IN | 0 ETH | 0.09395097 |
Latest 22 internal transactions
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
19824007 | 111 days ago | Contract Creation | 0 ETH | |||
19209362 | 198 days ago | Contract Creation | 0 ETH | |||
19055337 | 219 days ago | Contract Creation | 0 ETH | |||
19037161 | 222 days ago | Contract Creation | 0 ETH | |||
18776375 | 258 days ago | Contract Creation | 0 ETH | |||
18776366 | 258 days ago | Contract Creation | 0 ETH | |||
18632650 | 278 days ago | Contract Creation | 0 ETH | |||
17593486 | 424 days ago | Contract Creation | 0 ETH | |||
17420320 | 448 days ago | Contract Creation | 0 ETH | |||
17341863 | 459 days ago | Contract Creation | 0 ETH | |||
17341863 | 459 days ago | Contract Creation | 0 ETH | |||
17341863 | 459 days ago | Contract Creation | 0 ETH | |||
17341863 | 459 days ago | Contract Creation | 0 ETH | |||
17284292 | 467 days ago | Contract Creation | 0 ETH | |||
17277113 | 468 days ago | Contract Creation | 0 ETH | |||
17277066 | 468 days ago | Contract Creation | 0 ETH | |||
17277037 | 468 days ago | Contract Creation | 0 ETH | |||
17277018 | 468 days ago | Contract Creation | 0 ETH | |||
17277000 | 468 days ago | Contract Creation | 0 ETH | |||
17276953 | 468 days ago | Contract Creation | 0 ETH | |||
17276901 | 468 days ago | Contract Creation | 0 ETH | |||
17266986 | 470 days ago | Contract Creation | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
RangeProtocolFactory
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity 0.8.4; import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {IUniswapV3Factory} from "@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol"; import {IUniswapV3PoolImmutables} from "@uniswap/v3-core/contracts/interfaces/pool/IUniswapV3PoolImmutables.sol"; import {IRangeProtocolFactory} from "./interfaces/IRangeProtocolFactory.sol"; import {FactoryErrors} from "./errors/FactoryErrors.sol"; /** * @dev Mars@RangeProtocol * @notice RangeProtocolFactory deploys and upgrades proxies for Range Protocol vault contracts. * Owner can deploy and upgrade vault contracts. */ contract RangeProtocolFactory is IRangeProtocolFactory, Ownable { bytes4 public constant INIT_SELECTOR = bytes4(keccak256(bytes("initialize(address,int24,bytes)"))); bytes4 public constant UPGRADE_SELECTOR = bytes4(keccak256(bytes("upgradeTo(address)"))); /// @notice Uniswap v3 factory address public immutable factory; /// @notice all deployed vault instances address[] private _vaultsList; constructor(address _uniswapV3Factory) Ownable() { factory = _uniswapV3Factory; } // @notice createVault creates a ERC1967 proxy instance for the given implementation of vault contract // @param tokenA one of the tokens in the uniswap pair // @param tokenB the other token in the uniswap pair // @param fee fee tier of the uniswap pair // @param implementation address of the implementation // @param configData additional data associated with the specific implementation of vault function createVault( address tokenA, address tokenB, uint24 fee, address implementation, bytes memory data ) external override onlyOwner { address pool = IUniswapV3Factory(factory).getPool(tokenA, tokenB, fee); if (pool == address(0x0)) revert FactoryErrors.ZeroPoolAddress(); address vault = _createVault(tokenA, tokenB, fee, pool, implementation, data); emit VaultCreated(pool, vault); } /** * @notice upgradeVaults it allows upgrading the implementation contracts for deployed vault proxies. * only owner of the factory contract can call it. Internally calls _upgradeVault. * @param _vaults list of vaults to upgrade * @param _impls new implementation contracts of corresponding vaults */ function upgradeVaults( address[] calldata _vaults, address[] calldata _impls ) external override onlyOwner { if (_vaults.length != _impls.length) revert FactoryErrors.MismatchedVaultsAndImplsLength(); for (uint256 i = 0; i < _vaults.length; i++) { _upgradeVault(_vaults[i], _impls[i]); } } /** * @notice upgradeVault it allows upgrading the implementation contract for deployed vault proxy. * only owner of the factory contract can call it. Internally calls _upgradeVault. * @param _vault a vault to upgrade * @param _impl new implementation contract of corresponding vault */ function upgradeVault(address _vault, address _impl) public override onlyOwner { _upgradeVault(_vault, _impl); } /** * @notice returns the vaults addresses based on the provided indexes * @param startIdx the index in vaults to start retrieval from. * @param endIdx the index in vaults to end retrieval from. * @return vaultList list of fetched vault addresses */ function getVaultAddresses( uint256 startIdx, uint256 endIdx ) external view returns (address[] memory vaultList) { vaultList = new address[](endIdx - startIdx + 1); for (uint256 i = startIdx; i <= endIdx; i++) { vaultList[i] = _vaultsList[i]; } } /// @notice vaultCount counts the total number of vaults in existence /// @return total count of vaults function vaultCount() public view returns (uint256) { return _vaultsList.length; } /** * @dev Internal function to create vault proxy. */ function _createVault( address tokenA, address tokenB, uint24 fee, address pool, address implementation, bytes memory data ) internal returns (address vault) { if (data.length == 0) revert FactoryErrors.NoVaultInitDataProvided(); if (tokenA == tokenB) revert(); address token0 = tokenA < tokenB ? tokenA : tokenB; if (token0 == address(0x0)) revert("token cannot be a zero address"); int24 tickSpacing = IUniswapV3Factory(factory).feeAmountTickSpacing(fee); vault = address( new ERC1967Proxy( implementation, abi.encodeWithSelector(INIT_SELECTOR, pool, tickSpacing, data) ) ); _vaultsList.push(vault); } /** * @dev Internal function to upgrade a vault's implementation. */ function _upgradeVault(address _vault, address _impl) internal { (bool success, ) = _vault.call(abi.encodeWithSelector(UPGRADE_SELECTOR, _impl)); if (!success) revert FactoryErrors.VaultUpgradeFailed(); emit VaultImplUpgraded(_vault, _impl); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../Proxy.sol"; import "./ERC1967Upgrade.sol"; /** * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an * implementation address that can be changed. This address is stored in storage in the location specified by * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the * implementation behind the proxy. */ contract ERC1967Proxy is Proxy, ERC1967Upgrade { /** * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`. * * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded * function call, and allows initializating the storage of the proxy like a Solidity constructor. */ constructor(address _logic, bytes memory _data) payable { assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1)); _upgradeToAndCall(_logic, _data, false); } /** * @dev Returns the current implementation address. */ function _implementation() internal view virtual override returns (address impl) { return ERC1967Upgrade._getImplementation(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "../beacon/IBeacon.sol"; import "../../utils/Address.sol"; import "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967Upgrade { // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallSecure(address newImplementation, bytes memory data, bool forceCall) internal { address oldImplementation = _getImplementation(); // Initial upgrade and setup call _setImplementation(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } // Perform rollback test if not already in progress StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT); if (!rollbackTesting.value) { // Trigger rollback using upgradeTo from the new implementation rollbackTesting.value = true; Address.functionDelegateCall( newImplementation, abi.encodeWithSignature( "upgradeTo(address)", oldImplementation ) ); rollbackTesting.value = false; // Check rollback was effective require(oldImplementation == _getImplementation(), "ERC1967Upgrade: upgrade breaks further upgrades"); // Finally reset to the new implementation and log the upgrade _setImplementation(newImplementation); emit Upgraded(newImplementation); } } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require( Address.isContract(newBeacon), "ERC1967: new beacon is not a contract" ); require( Address.isContract(IBeacon(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a * different contract through the {_delegate} function. * * The success and return data of the delegated call will be returned back to the caller of the proxy. */ abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { // solhint-disable-next-line no-inline-assembly assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function * and {_fallback} should delegate. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internall call site, it will return directly to the external caller. */ function _fallback() internal virtual { _beforeFallback(); _delegate(_implementation()); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */ fallback () external payable virtual { _fallback(); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data * is empty. */ receive () external payable virtual { _fallback(); } /** * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback` * call, or as part of the Solidity `fallback` or `receive` functions. * * If overriden should call `super._beforeFallback()`. */ function _beforeFallback() internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) 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 `amount` 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 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @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, it is bubbled up by this * function (like regular Solidity function calls). * * 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. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @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`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title The interface for the Uniswap V3 Factory /// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees interface IUniswapV3Factory { /// @notice Emitted when the owner of the factory is changed /// @param oldOwner The owner before the owner was changed /// @param newOwner The owner after the owner was changed event OwnerChanged(address indexed oldOwner, address indexed newOwner); /// @notice Emitted when a pool is created /// @param token0 The first token of the pool by address sort order /// @param token1 The second token 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 pool The address of the created pool event PoolCreated( address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address pool ); /// @notice Emitted when a new fee amount is enabled for pool creation via the factory /// @param fee The enabled fee, denominated in hundredths of a bip /// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing); /// @notice Returns the current owner of the factory /// @dev Can be changed by the current owner via setOwner /// @return The address of the factory owner function owner() external view returns (address); /// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled /// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context /// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee /// @return The tick spacing function feeAmountTickSpacing(uint24 fee) external view returns (int24); /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order /// @param tokenA The contract address of either token0 or token1 /// @param tokenB The contract address of the other token /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip /// @return pool The pool address function getPool( address tokenA, address tokenB, uint24 fee ) external view returns (address pool); /// @notice Creates a pool for the given two tokens and fee /// @param tokenA One of the two tokens in the desired pool /// @param tokenB The other of the two tokens in the desired pool /// @param fee The desired fee for the pool /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments /// are invalid. /// @return pool The address of the newly created pool function createPool( address tokenA, address tokenB, uint24 fee ) external returns (address pool); /// @notice Updates the owner of the factory /// @dev Must be called by the current owner /// @param _owner The new owner of the factory function setOwner(address _owner) external; /// @notice Enables a fee amount with the given tickSpacing /// @dev Fee amounts may never be removed once enabled /// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6) /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount function enableFeeAmount(uint24 fee, int24 tickSpacing) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Pool state that never changes /// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values interface IUniswapV3PoolImmutables { /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface /// @return The contract address function factory() external view returns (address); /// @notice The first of the two tokens of the pool, sorted by address /// @return The token contract address function token0() external view returns (address); /// @notice The second of the two tokens of the pool, sorted by address /// @return The token contract address function token1() external view returns (address); /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6 /// @return The fee function fee() external view returns (uint24); /// @notice The pool tick spacing /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ... /// This value is an int24 to avoid casting even though it is always positive. /// @return The tick spacing function tickSpacing() external view returns (int24); /// @notice The maximum amount of position liquidity that can use any tick in the range /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool /// @return The max amount of liquidity per tick function maxLiquidityPerTick() external view returns (uint128); }
//SPDX-License-Identifier: MIT pragma solidity 0.8.4; library FactoryErrors { error ZeroPoolAddress(); error NoVaultInitDataProvided(); error MismatchedVaultsAndImplsLength(); error VaultUpgradeFailed(); }
//SPDX-License-Identifier: MIT pragma solidity 0.8.4; interface IRangeProtocolFactory { event VaultCreated(address indexed uniPool, address indexed vault); event VaultImplUpgraded(address indexed uniPool, address indexed vault); function createVault( address tokenA, address tokenB, uint24 fee, address implementation, bytes memory configData ) external; function upgradeVaults(address[] calldata _vaults, address[] calldata _impls) external; function upgradeVault(address _vault, address _impl) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_uniswapV3Factory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"MismatchedVaultsAndImplsLength","type":"error"},{"inputs":[],"name":"NoVaultInitDataProvided","type":"error"},{"inputs":[],"name":"VaultUpgradeFailed","type":"error"},{"inputs":[],"name":"ZeroPoolAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"uniPool","type":"address"},{"indexed":true,"internalType":"address","name":"vault","type":"address"}],"name":"VaultCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"uniPool","type":"address"},{"indexed":true,"internalType":"address","name":"vault","type":"address"}],"name":"VaultImplUpgraded","type":"event"},{"inputs":[],"name":"INIT_SELECTOR","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_SELECTOR","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"createVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"startIdx","type":"uint256"},{"internalType":"uint256","name":"endIdx","type":"uint256"}],"name":"getVaultAddresses","outputs":[{"internalType":"address[]","name":"vaultList","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_impl","type":"address"}],"name":"upgradeVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_vaults","type":"address[]"},{"internalType":"address[]","name":"_impls","type":"address[]"}],"name":"upgradeVaults","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vaultCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b5060405161187738038061187783398101604081905261002f91610085565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060601b6001600160601b0319166080526100b3565b600060208284031215610096578081fd5b81516001600160a01b03811681146100ac578182fd5b9392505050565b60805160601c6117986100df6000396000818161024301528181610324015261099a01526117986000f3fe60806040523480156200001157600080fd5b5060043610620000b75760003560e01c8063715018a6116200007a578063715018a6146200019e5780638da5cb5b14620001a857806397fb879714620001ce578063a7c6a100146200022b578063c45a0155146200023d578063f2fde38b146200026557600080fd5b8063054bf17114620000bc5780632204d63e14620000d55780632bcef00814620000ec5780634ae232ba14620001035780636dbda2171462000132575b600080fd5b620000d3620000cd36600462000bf1565b6200027c565b005b620000d3620000e636600462000c2e565b620002c2565b620000d3620000fd36600462000d3d565b6200042b565b6200011a6200011436600462000dd0565b6200051b565b60405162000129919062000ea1565b60405180910390f35b60408051808201909152601281527175706772616465546f28616464726573732960701b602090910152620001847f3659cfe672549963da205df855ebfb8672cda4801e0255183bd6a6f536855df781565b6040516001600160e01b0319909116815260200162000129565b620000d362000629565b6000546001600160a01b03165b6040516001600160a01b03909116815260200162000129565b60408051808201909152601f81527f696e697469616c697a6528616464726573732c696e7432342c62797465732900602090910152620001847f3d048c271a2436dc9dbaf9f72bfa07b52d864af4693499c0eebeda112c60b8fa81565b60015460405190815260200162000129565b620001b57f000000000000000000000000000000000000000000000000000000000000000081565b620000d36200027636600462000bac565b620006a0565b6000546001600160a01b03163314620002b25760405162461bcd60e51b8152600401620002a99062000ef0565b60405180910390fd5b620002be82826200078f565b5050565b6000546001600160a01b03163314620002ef5760405162461bcd60e51b8152600401620002a99062000ef0565b604051630b4c774160e11b81526001600160a01b038681166004830152858116602483015262ffffff851660448301526000917f000000000000000000000000000000000000000000000000000000000000000090911690631698ee829060640160206040518083038186803b1580156200036957600080fd5b505afa1580156200037e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003a4919062000bd2565b90506001600160a01b038116620003ce5760405163037064f160e01b815260040160405180910390fd5b6000620003e0878787858888620008b8565b9050806001600160a01b0316826001600160a01b03167f5d9c31ffa0fecffd7cf379989a3c7af252f0335e0d2a1320b55245912c781f5360405160405180910390a350505050505050565b6000546001600160a01b03163314620004585760405162461bcd60e51b8152600401620002a99062000ef0565b8281146200047957604051632df0433360e21b815260040160405180910390fd5b60005b838110156200051457620004ff858583818110620004aa57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190620004c1919062000bac565b848484818110620004e257634e487b7160e01b600052603260045260246000fd5b9050602002016020810190620004f9919062000bac565b6200078f565b806200050b8162000f8d565b9150506200047c565b5050505050565b606062000529838362000f40565b6200053690600162000f25565b67ffffffffffffffff8111156200055d57634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801562000587578160200160208202803683370190505b509050825b828111620006225760018181548110620005b657634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b0316828281518110620005f557634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280620006198162000f8d565b9150506200058c565b5092915050565b6000546001600160a01b03163314620006565760405162461bcd60e51b8152600401620002a99062000ef0565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b03163314620006cd5760405162461bcd60e51b8152600401620002a99062000ef0565b6001600160a01b038116620007345760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620002a9565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b604080518082018252601281527175706772616465546f28616464726573732960701b60209182015281516001600160a01b03848116602480840191909152845180840390910181526044909201845291810180516001600160e01b0316631b2ce7f360e11b1790529151600092918516916200080c9162000e20565b6000604051808303816000865af19150503d80600081146200084b576040519150601f19603f3d011682016040523d82523d6000602084013e62000850565b606091505b5050905080620008735760405163e5ba34a360e01b815260040160405180910390fd5b816001600160a01b0316836001600160a01b03167ff1bca332ecac5836810b4626fa419227255b5d1ec952fc6b7bba5916ecf6808060405160405180910390a3505050565b6000815160001415620008de57604051631438a13160e01b815260040160405180910390fd5b856001600160a01b0316876001600160a01b03161415620008fe57600080fd5b6000866001600160a01b0316886001600160a01b03161062000921578662000923565b875b90506001600160a01b0381166200097d5760405162461bcd60e51b815260206004820152601e60248201527f746f6b656e2063616e6e6f742062652061207a65726f206164647265737300006044820152606401620002a9565b6040516322afcccb60e01b815262ffffff871660048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906322afcccb9060240160206040518083038186803b158015620009e557600080fd5b505afa158015620009fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a20919062000dad565b604080518082018252601f81527f696e697469616c697a6528616464726573732c696e7432342c627974657329006020909101525190915085907f3d048c271a2436dc9dbaf9f72bfa07b52d864af4693499c0eebeda112c60b8fa9062000a909089908590899060240162000e6c565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000acf9062000b51565b62000adc92919062000e3e565b604051809103906000f08015801562000af9573d6000803e3d6000fd5b506001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b0383161790559998505050505050505050565b6107728062000ff183390190565b60008083601f84011262000b71578081fd5b50813567ffffffffffffffff81111562000b89578182fd5b6020830191508360208260051b850101111562000ba557600080fd5b9250929050565b60006020828403121562000bbe578081fd5b813562000bcb8162000fd7565b9392505050565b60006020828403121562000be4578081fd5b815162000bcb8162000fd7565b6000806040838503121562000c04578081fd5b823562000c118162000fd7565b9150602083013562000c238162000fd7565b809150509250929050565b600080600080600060a0868803121562000c46578081fd5b853562000c538162000fd7565b9450602086013562000c658162000fd7565b9350604086013562ffffff8116811462000c7d578182fd5b9250606086013562000c8f8162000fd7565b9150608086013567ffffffffffffffff8082111562000cac578283fd5b818801915088601f83011262000cc0578283fd5b81358181111562000cd55762000cd562000fc1565b604051601f8201601f19908116603f0116810190838211818310171562000d005762000d0062000fc1565b816040528281528b602084870101111562000d19578586fd5b82602086016020830137856020848301015280955050505050509295509295909350565b6000806000806040858703121562000d53578384fd5b843567ffffffffffffffff8082111562000d6b578586fd5b62000d798883890162000b5f565b9096509450602087013591508082111562000d92578384fd5b5062000da18782880162000b5f565b95989497509550505050565b60006020828403121562000dbf578081fd5b81518060020b811462000bcb578182fd5b6000806040838503121562000de3578182fd5b50508035926020909101359150565b6000815180845262000e0c81602086016020860162000f5a565b601f01601f19169290920160200192915050565b6000825162000e3481846020870162000f5a565b9190910192915050565b6001600160a01b038316815260406020820181905260009062000e649083018462000df2565b949350505050565b60018060a01b03841681528260020b602082015260606040820152600062000e98606083018462000df2565b95945050505050565b6020808252825182820181905260009190848201906040850190845b8181101562000ee45783516001600160a01b03168352928401929184019160010162000ebd565b50909695505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111562000f3b5762000f3b62000fab565b500190565b60008282101562000f555762000f5562000fab565b500390565b60005b8381101562000f7757818101518382015260200162000f5d565b8381111562000f87576000848401525b50505050565b600060001982141562000fa45762000fa462000fab565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811462000fed57600080fd5b5056fe6080604052604051610772380380610772833981016040819052610022916102f7565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd61040f565b60008051602061072b8339815191521461007757634e487b7160e01b600052600160045260246000fd5b6100838282600061008a565b5050610474565b610093836100f4565b6040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a26000825111806100d45750805b156100ef576100ed83836101b460201b6100291760201c565b505b505050565b610107816101e060201b6100551760201c565b61016e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b8061019360008051602061072b83398151915260001b6101e660201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101d9838360405180606001604052806027815260200161074b602791396101e9565b9392505050565b3b151590565b90565b6060833b6102485760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610165565b600080856001600160a01b03168560405161026391906103c0565b600060405180830381855af49150503d806000811461029e576040519150601f19603f3d011682016040523d82523d6000602084013e6102a3565b606091505b5090925090506102b48282866102be565b9695505050505050565b606083156102cd5750816101d9565b8251156102dd5782518084602001fd5b8160405162461bcd60e51b815260040161016591906103dc565b60008060408385031215610309578182fd5b82516001600160a01b038116811461031f578283fd5b60208401519092506001600160401b038082111561033b578283fd5b818501915085601f83011261034e578283fd5b8151818111156103605761036061045e565b604051601f8201601f19908116603f011681019083821181831017156103885761038861045e565b816040528281528860208487010111156103a0578586fd5b6103b1836020830160208801610432565b80955050505050509250929050565b600082516103d2818460208701610432565b9190910192915050565b60208152600082518060208401526103fb816040850160208701610432565b601f01601f19169190910160400192915050565b60008282101561042d57634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561044d578181015183820152602001610435565b838111156100ed5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104836000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b602081526000825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122054e34d6f1553ea977a6db7f63f2d70e39f15aed6905186852b47bcba6771c8e964736f6c63430008040033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122097df9e431be63661861d02321e1ad86aa50e95994d0f45120d43a706f803a09c64736f6c634300080400330000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984
Deployed Bytecode
0x60806040523480156200001157600080fd5b5060043610620000b75760003560e01c8063715018a6116200007a578063715018a6146200019e5780638da5cb5b14620001a857806397fb879714620001ce578063a7c6a100146200022b578063c45a0155146200023d578063f2fde38b146200026557600080fd5b8063054bf17114620000bc5780632204d63e14620000d55780632bcef00814620000ec5780634ae232ba14620001035780636dbda2171462000132575b600080fd5b620000d3620000cd36600462000bf1565b6200027c565b005b620000d3620000e636600462000c2e565b620002c2565b620000d3620000fd36600462000d3d565b6200042b565b6200011a6200011436600462000dd0565b6200051b565b60405162000129919062000ea1565b60405180910390f35b60408051808201909152601281527175706772616465546f28616464726573732960701b602090910152620001847f3659cfe672549963da205df855ebfb8672cda4801e0255183bd6a6f536855df781565b6040516001600160e01b0319909116815260200162000129565b620000d362000629565b6000546001600160a01b03165b6040516001600160a01b03909116815260200162000129565b60408051808201909152601f81527f696e697469616c697a6528616464726573732c696e7432342c62797465732900602090910152620001847f3d048c271a2436dc9dbaf9f72bfa07b52d864af4693499c0eebeda112c60b8fa81565b60015460405190815260200162000129565b620001b57f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98481565b620000d36200027636600462000bac565b620006a0565b6000546001600160a01b03163314620002b25760405162461bcd60e51b8152600401620002a99062000ef0565b60405180910390fd5b620002be82826200078f565b5050565b6000546001600160a01b03163314620002ef5760405162461bcd60e51b8152600401620002a99062000ef0565b604051630b4c774160e11b81526001600160a01b038681166004830152858116602483015262ffffff851660448301526000917f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98490911690631698ee829060640160206040518083038186803b1580156200036957600080fd5b505afa1580156200037e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003a4919062000bd2565b90506001600160a01b038116620003ce5760405163037064f160e01b815260040160405180910390fd5b6000620003e0878787858888620008b8565b9050806001600160a01b0316826001600160a01b03167f5d9c31ffa0fecffd7cf379989a3c7af252f0335e0d2a1320b55245912c781f5360405160405180910390a350505050505050565b6000546001600160a01b03163314620004585760405162461bcd60e51b8152600401620002a99062000ef0565b8281146200047957604051632df0433360e21b815260040160405180910390fd5b60005b838110156200051457620004ff858583818110620004aa57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190620004c1919062000bac565b848484818110620004e257634e487b7160e01b600052603260045260246000fd5b9050602002016020810190620004f9919062000bac565b6200078f565b806200050b8162000f8d565b9150506200047c565b5050505050565b606062000529838362000f40565b6200053690600162000f25565b67ffffffffffffffff8111156200055d57634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801562000587578160200160208202803683370190505b509050825b828111620006225760018181548110620005b657634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b0316828281518110620005f557634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280620006198162000f8d565b9150506200058c565b5092915050565b6000546001600160a01b03163314620006565760405162461bcd60e51b8152600401620002a99062000ef0565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b03163314620006cd5760405162461bcd60e51b8152600401620002a99062000ef0565b6001600160a01b038116620007345760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620002a9565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b604080518082018252601281527175706772616465546f28616464726573732960701b60209182015281516001600160a01b03848116602480840191909152845180840390910181526044909201845291810180516001600160e01b0316631b2ce7f360e11b1790529151600092918516916200080c9162000e20565b6000604051808303816000865af19150503d80600081146200084b576040519150601f19603f3d011682016040523d82523d6000602084013e62000850565b606091505b5050905080620008735760405163e5ba34a360e01b815260040160405180910390fd5b816001600160a01b0316836001600160a01b03167ff1bca332ecac5836810b4626fa419227255b5d1ec952fc6b7bba5916ecf6808060405160405180910390a3505050565b6000815160001415620008de57604051631438a13160e01b815260040160405180910390fd5b856001600160a01b0316876001600160a01b03161415620008fe57600080fd5b6000866001600160a01b0316886001600160a01b03161062000921578662000923565b875b90506001600160a01b0381166200097d5760405162461bcd60e51b815260206004820152601e60248201527f746f6b656e2063616e6e6f742062652061207a65726f206164647265737300006044820152606401620002a9565b6040516322afcccb60e01b815262ffffff871660048201526000907f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f9846001600160a01b0316906322afcccb9060240160206040518083038186803b158015620009e557600080fd5b505afa158015620009fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a20919062000dad565b604080518082018252601f81527f696e697469616c697a6528616464726573732c696e7432342c627974657329006020909101525190915085907f3d048c271a2436dc9dbaf9f72bfa07b52d864af4693499c0eebeda112c60b8fa9062000a909089908590899060240162000e6c565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000acf9062000b51565b62000adc92919062000e3e565b604051809103906000f08015801562000af9573d6000803e3d6000fd5b506001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b0383161790559998505050505050505050565b6107728062000ff183390190565b60008083601f84011262000b71578081fd5b50813567ffffffffffffffff81111562000b89578182fd5b6020830191508360208260051b850101111562000ba557600080fd5b9250929050565b60006020828403121562000bbe578081fd5b813562000bcb8162000fd7565b9392505050565b60006020828403121562000be4578081fd5b815162000bcb8162000fd7565b6000806040838503121562000c04578081fd5b823562000c118162000fd7565b9150602083013562000c238162000fd7565b809150509250929050565b600080600080600060a0868803121562000c46578081fd5b853562000c538162000fd7565b9450602086013562000c658162000fd7565b9350604086013562ffffff8116811462000c7d578182fd5b9250606086013562000c8f8162000fd7565b9150608086013567ffffffffffffffff8082111562000cac578283fd5b818801915088601f83011262000cc0578283fd5b81358181111562000cd55762000cd562000fc1565b604051601f8201601f19908116603f0116810190838211818310171562000d005762000d0062000fc1565b816040528281528b602084870101111562000d19578586fd5b82602086016020830137856020848301015280955050505050509295509295909350565b6000806000806040858703121562000d53578384fd5b843567ffffffffffffffff8082111562000d6b578586fd5b62000d798883890162000b5f565b9096509450602087013591508082111562000d92578384fd5b5062000da18782880162000b5f565b95989497509550505050565b60006020828403121562000dbf578081fd5b81518060020b811462000bcb578182fd5b6000806040838503121562000de3578182fd5b50508035926020909101359150565b6000815180845262000e0c81602086016020860162000f5a565b601f01601f19169290920160200192915050565b6000825162000e3481846020870162000f5a565b9190910192915050565b6001600160a01b038316815260406020820181905260009062000e649083018462000df2565b949350505050565b60018060a01b03841681528260020b602082015260606040820152600062000e98606083018462000df2565b95945050505050565b6020808252825182820181905260009190848201906040850190845b8181101562000ee45783516001600160a01b03168352928401929184019160010162000ebd565b50909695505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111562000f3b5762000f3b62000fab565b500190565b60008282101562000f555762000f5562000fab565b500390565b60005b8381101562000f7757818101518382015260200162000f5d565b8381111562000f87576000848401525b50505050565b600060001982141562000fa45762000fa462000fab565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811462000fed57600080fd5b5056fe6080604052604051610772380380610772833981016040819052610022916102f7565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd61040f565b60008051602061072b8339815191521461007757634e487b7160e01b600052600160045260246000fd5b6100838282600061008a565b5050610474565b610093836100f4565b6040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a26000825111806100d45750805b156100ef576100ed83836101b460201b6100291760201c565b505b505050565b610107816101e060201b6100551760201c565b61016e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b8061019360008051602061072b83398151915260001b6101e660201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101d9838360405180606001604052806027815260200161074b602791396101e9565b9392505050565b3b151590565b90565b6060833b6102485760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610165565b600080856001600160a01b03168560405161026391906103c0565b600060405180830381855af49150503d806000811461029e576040519150601f19603f3d011682016040523d82523d6000602084013e6102a3565b606091505b5090925090506102b48282866102be565b9695505050505050565b606083156102cd5750816101d9565b8251156102dd5782518084602001fd5b8160405162461bcd60e51b815260040161016591906103dc565b60008060408385031215610309578182fd5b82516001600160a01b038116811461031f578283fd5b60208401519092506001600160401b038082111561033b578283fd5b818501915085601f83011261034e578283fd5b8151818111156103605761036061045e565b604051601f8201601f19908116603f011681019083821181831017156103885761038861045e565b816040528281528860208487010111156103a0578586fd5b6103b1836020830160208801610432565b80955050505050509250929050565b600082516103d2818460208701610432565b9190910192915050565b60208152600082518060208401526103fb816040850160208701610432565b601f01601f19169190910160400192915050565b60008282101561042d57634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561044d578181015183820152602001610435565b838111156100ed5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104836000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b602081526000825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122054e34d6f1553ea977a6db7f63f2d70e39f15aed6905186852b47bcba6771c8e964736f6c63430008040033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122097df9e431be63661861d02321e1ad86aa50e95994d0f45120d43a706f803a09c64736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984
-----Decoded View---------------
Arg [0] : _uniswapV3Factory (address): 0x1F98431c8aD98523631AE4a59f267346ea31F984
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.