ETH Price: $3,302.79 (+1.74%)
Gas: 1 Gwei

Contract

0xDE07a0D5C9CA371E41a869451141AcE84BCAd119
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...186758562023-11-29 7:44:11242 days ago1701243851IN
0xDE07a0D5...84BCAd119
0 ETH0.0009033431.38680672
Upgrade Vault184337462023-10-26 10:17:35276 days ago1698315455IN
0xDE07a0D5...84BCAd119
0 ETH0.0009431819.94220929
Create Vault183756152023-10-18 7:00:11284 days ago1697612411IN
0xDE07a0D5...84BCAd119
0 ETH0.005451758.28114349
0x60a06040183755482023-10-18 6:46:47284 days ago1697611607IN
 Create: RangeProtocolFactory
0 ETH0.014140729.99276411

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
187326362023-12-07 6:29:11234 days ago1701930551
0xDE07a0D5...84BCAd119
 Contract Creation0 ETH
183756152023-10-18 7:00:11284 days ago1697612411
0xDE07a0D5...84BCAd119
 Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RangeProtocolFactory

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 15 : RangeProtocolFactory.sol
//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 {Address} from "@openzeppelin/contracts/utils/Address.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;

    address public constant GHO = 0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f;

    constructor(address _uniswapV3Factory) Ownable() {
        factory = _uniswapV3Factory;
    }

    // @notice createVault creates a ERC1967 proxy instance for the given implementation of vault contract
    // @param token address of the token in GHO-token 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 token,
        uint24 fee,
        address implementation,
        bytes memory data
    ) external override onlyOwner {
        address pool = IUniswapV3Factory(factory).getPool(token, GHO, fee);
        if (pool == address(0x0)) revert FactoryErrors.ZeroPoolAddress();
        address vault = _createVault(token, GHO, 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 - startIdx] = _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 FactoryErrors.SameTokensAddresses();
        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 {
        if (!Address.isContract(_impl)) revert FactoryErrors.ImplIsNotAContract();
        (bool success, ) = _vault.call(abi.encodeWithSelector(UPGRADE_SELECTOR, _impl));

        if (!success) revert FactoryErrors.VaultUpgradeFailed();
        emit VaultImplUpgraded(_vault, _impl);
    }
}

File 2 of 15 : Ownable.sol
// 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;
    }
}

File 3 of 15 : IBeacon.sol
// 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);
}

File 4 of 15 : ERC1967Proxy.sol
// 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();
    }
}

File 5 of 15 : ERC1967Upgrade.sol
// 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;
    }
}

File 6 of 15 : Proxy.sol
// 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 {
    }
}

File 7 of 15 : IERC20Metadata.sol
// 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);
}

File 8 of 15 : IERC20.sol
// 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);
}

File 9 of 15 : Address.sol
// 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);
            }
        }
    }
}

File 10 of 15 : Context.sol
// 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;
    }
}

File 11 of 15 : StorageSlot.sol
// 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
        }
    }
}

File 12 of 15 : IUniswapV3Factory.sol
// 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;
}

File 13 of 15 : IUniswapV3PoolImmutables.sol
// 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);
}

File 14 of 15 : FactoryErrors.sol
//SPDX-License-Identifier: MIT
pragma solidity 0.8.4;

library FactoryErrors {
    error ZeroPoolAddress();
    error NoVaultInitDataProvided();
    error MismatchedVaultsAndImplsLength();
    error VaultUpgradeFailed();
    error ImplIsNotAContract();
    error SameTokensAddresses();
}

File 15 of 15 : IRangeProtocolFactory.sol
//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 token, uint24 fee, address implementation, bytes memory configData) external;

    function upgradeVaults(address[] calldata _vaults, address[] calldata _impls) external;

    function upgradeVault(address _vault, address _impl) external;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 100
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_uniswapV3Factory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ImplIsNotAContract","type":"error"},{"inputs":[],"name":"MismatchedVaultsAndImplsLength","type":"error"},{"inputs":[],"name":"NoVaultInitDataProvided","type":"error"},{"inputs":[],"name":"SameTokensAddresses","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":"GHO","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"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":"token","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"}]

60a060405234801561001057600080fd5b5060405161191238038061191283398101604081905261002f91610085565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060601b6001600160601b0319166080526100b3565b600060208284031215610096578081fd5b81516001600160a01b03811681146100ac578182fd5b9392505050565b60805160601c6118336100df60003960008181610268015281816105fd0152610a4c01526118336000f3fe60806040523480156200001157600080fd5b5060043610620000c35760003560e01c806397fb8797116200007a57806397fb879714620001c0578063a7c6a100146200021d578063b8d008f3146200022f578063babb91bd146200024b578063c45a01551462000262578063f2fde38b146200028a57600080fd5b8063054bf17114620000c85780632bcef00814620000e15780634ae232ba14620000f85780636dbda2171462000127578063715018a614620001935780638da5cb5b146200019d575b600080fd5b620000df620000d936600462000ca3565b620002a1565b005b620000df620000f236600462000dd8565b620002ee565b6200010f6200010936600462000e6b565b620003e5565b6040516200011e919062000f3c565b60405180910390f35b60408051808201909152601281527175706772616465546f28616464726573732960701b602090910152620001797f3659cfe672549963da205df855ebfb8672cda4801e0255183bd6a6f536855df781565b6040516001600160e01b031990911681526020016200011e565b620000df620004f5565b620001a762000573565b6040516001600160a01b0390911681526020016200011e565b60408051808201909152601f81527f696e697469616c697a6528616464726573732c696e7432342c62797465732900602090910152620001797f3d048c271a2436dc9dbaf9f72bfa07b52d864af4693499c0eebeda112c60b8fa81565b6001546040519081526020016200011e565b620001a77340d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f81565b620000df6200025c36600462000ce0565b62000582565b620001a77f000000000000000000000000000000000000000000000000000000000000000081565b620000df6200029b36600462000c5e565b62000717565b33620002ac62000573565b6001600160a01b031614620002de5760405162461bcd60e51b8152600401620002d59062000f8b565b60405180910390fd5b620002ea82826200080d565b5050565b33620002f962000573565b6001600160a01b031614620003225760405162461bcd60e51b8152600401620002d59062000f8b565b8281146200034357604051632df0433360e21b815260040160405180910390fd5b60005b83811015620003de57620003c98585838181106200037457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906200038b919062000c5e565b848484818110620003ac57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190620003c3919062000c5e565b6200080d565b80620003d58162001028565b91505062000346565b5050505050565b6060620003f3838362000fdb565b6200040090600162000fc0565b67ffffffffffffffff8111156200042757634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801562000451578160200160208202803683370190505b509050825b828111620004ee57600181815481106200048057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031682620004a2868462000fdb565b81518110620004c157634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280620004e58162001028565b91505062000456565b5092915050565b336200050062000573565b6001600160a01b031614620005295760405162461bcd60e51b8152600401620002d59062000f8b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b336200058d62000573565b6001600160a01b031614620005b65760405162461bcd60e51b8152600401620002d59062000f8b565b604051630b4c774160e11b81526001600160a01b0385811660048301527340d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f602483015262ffffff851660448301526000917f000000000000000000000000000000000000000000000000000000000000000090911690631698ee829060640160206040518083038186803b1580156200064257600080fd5b505afa15801562000657573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200067d919062000c84565b90506001600160a01b038116620006a75760405163037064f160e01b815260040160405180910390fd5b6000620006cd867340d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f8785888862000956565b9050806001600160a01b0316826001600160a01b03167f5d9c31ffa0fecffd7cf379989a3c7af252f0335e0d2a1320b55245912c781f5360405160405180910390a3505050505050565b336200072262000573565b6001600160a01b0316146200074b5760405162461bcd60e51b8152600401620002d59062000f8b565b6001600160a01b038116620007b25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620002d5565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b803b6200082d57604051632c917c6d60e11b815260040160405180910390fd5b604080518082018252601281527175706772616465546f28616464726573732960701b60209182015281516001600160a01b03848116602480840191909152845180840390910181526044909201845291810180516001600160e01b0316631b2ce7f360e11b179052915160009291851691620008aa9162000ebb565b6000604051808303816000865af19150503d8060008114620008e9576040519150601f19603f3d011682016040523d82523d6000602084013e620008ee565b606091505b5050905080620009115760405163e5ba34a360e01b815260040160405180910390fd5b816001600160a01b0316836001600160a01b03167ff1bca332ecac5836810b4626fa419227255b5d1ec952fc6b7bba5916ecf6808060405160405180910390a3505050565b60008151600014156200097c57604051631438a13160e01b815260040160405180910390fd5b856001600160a01b0316876001600160a01b03161415620009b05760405163015c805760e71b815260040160405180910390fd5b6000866001600160a01b0316886001600160a01b031610620009d35786620009d5565b875b90506001600160a01b03811662000a2f5760405162461bcd60e51b815260206004820152601e60248201527f746f6b656e2063616e6e6f742062652061207a65726f206164647265737300006044820152606401620002d5565b6040516322afcccb60e01b815262ffffff871660048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906322afcccb9060240160206040518083038186803b15801562000a9757600080fd5b505afa15801562000aac573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ad2919062000e48565b604080518082018252601f81527f696e697469616c697a6528616464726573732c696e7432342c627974657329006020909101525190915085907f3d048c271a2436dc9dbaf9f72bfa07b52d864af4693499c0eebeda112c60b8fa9062000b429089908590899060240162000f07565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000b819062000c03565b62000b8e92919062000ed9565b604051809103906000f08015801562000bab573d6000803e3d6000fd5b506001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b0383161790559998505050505050505050565b610772806200108c83390190565b60008083601f84011262000c23578081fd5b50813567ffffffffffffffff81111562000c3b578182fd5b6020830191508360208260051b850101111562000c5757600080fd5b9250929050565b60006020828403121562000c70578081fd5b813562000c7d8162001072565b9392505050565b60006020828403121562000c96578081fd5b815162000c7d8162001072565b6000806040838503121562000cb6578081fd5b823562000cc38162001072565b9150602083013562000cd58162001072565b809150509250929050565b6000806000806080858703121562000cf6578182fd5b843562000d038162001072565b9350602085013562ffffff8116811462000d1b578283fd5b9250604085013562000d2d8162001072565b9150606085013567ffffffffffffffff8082111562000d4a578283fd5b818701915087601f83011262000d5e578283fd5b81358181111562000d735762000d736200105c565b604051601f8201601f19908116603f0116810190838211818310171562000d9e5762000d9e6200105c565b816040528281528a602084870101111562000db7578586fd5b82602086016020830137918201602001949094529598949750929550505050565b6000806000806040858703121562000dee578384fd5b843567ffffffffffffffff8082111562000e06578586fd5b62000e148883890162000c11565b9096509450602087013591508082111562000e2d578384fd5b5062000e3c8782880162000c11565b95989497509550505050565b60006020828403121562000e5a578081fd5b81518060020b811462000c7d578182fd5b6000806040838503121562000e7e578182fd5b50508035926020909101359150565b6000815180845262000ea781602086016020860162000ff5565b601f01601f19169290920160200192915050565b6000825162000ecf81846020870162000ff5565b9190910192915050565b6001600160a01b038316815260406020820181905260009062000eff9083018462000e8d565b949350505050565b60018060a01b03841681528260020b602082015260606040820152600062000f33606083018462000e8d565b95945050505050565b6020808252825182820181905260009190848201906040850190845b8181101562000f7f5783516001600160a01b03168352928401929184019160010162000f58565b50909695505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111562000fd65762000fd662001046565b500190565b60008282101562000ff05762000ff062001046565b500390565b60005b838110156200101257818101518382015260200162000ff8565b8381111562001022576000848401525b50505050565b60006000198214156200103f576200103f62001046565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146200108857600080fd5b5056fe6080604052604051610772380380610772833981016040819052610022916102f7565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd61040f565b60008051602061072b8339815191521461007757634e487b7160e01b600052600160045260246000fd5b6100838282600061008a565b5050610474565b610093836100f4565b6040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a26000825111806100d45750805b156100ef576100ed83836101b460201b6100291760201c565b505b505050565b610107816101e060201b6100551760201c565b61016e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b8061019360008051602061072b83398151915260001b6101e660201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101d9838360405180606001604052806027815260200161074b602791396101e9565b9392505050565b3b151590565b90565b6060833b6102485760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610165565b600080856001600160a01b03168560405161026391906103c0565b600060405180830381855af49150503d806000811461029e576040519150601f19603f3d011682016040523d82523d6000602084013e6102a3565b606091505b5090925090506102b48282866102be565b9695505050505050565b606083156102cd5750816101d9565b8251156102dd5782518084602001fd5b8160405162461bcd60e51b815260040161016591906103dc565b60008060408385031215610309578182fd5b82516001600160a01b038116811461031f578283fd5b60208401519092506001600160401b038082111561033b578283fd5b818501915085601f83011261034e578283fd5b8151818111156103605761036061045e565b604051601f8201601f19908116603f011681019083821181831017156103885761038861045e565b816040528281528860208487010111156103a0578586fd5b6103b1836020830160208801610432565b80955050505050509250929050565b600082516103d2818460208701610432565b9190910192915050565b60208152600082518060208401526103fb816040850160208701610432565b601f01601f19169190910160400192915050565b60008282101561042d57634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561044d578181015183820152602001610435565b838111156100ed5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104836000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b602081526000825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212204f6a2d157be6acb5080e3238964250ebc6ec88ae6a60961a5917d6a1dcd499ce64736f6c63430008040033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122000fa2dd2f61b9074f9f15ddce904df1468e0cfd951de0b112d6cf05c80f8965064736f6c634300080400330000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984

Deployed Bytecode

0x60806040523480156200001157600080fd5b5060043610620000c35760003560e01c806397fb8797116200007a57806397fb879714620001c0578063a7c6a100146200021d578063b8d008f3146200022f578063babb91bd146200024b578063c45a01551462000262578063f2fde38b146200028a57600080fd5b8063054bf17114620000c85780632bcef00814620000e15780634ae232ba14620000f85780636dbda2171462000127578063715018a614620001935780638da5cb5b146200019d575b600080fd5b620000df620000d936600462000ca3565b620002a1565b005b620000df620000f236600462000dd8565b620002ee565b6200010f6200010936600462000e6b565b620003e5565b6040516200011e919062000f3c565b60405180910390f35b60408051808201909152601281527175706772616465546f28616464726573732960701b602090910152620001797f3659cfe672549963da205df855ebfb8672cda4801e0255183bd6a6f536855df781565b6040516001600160e01b031990911681526020016200011e565b620000df620004f5565b620001a762000573565b6040516001600160a01b0390911681526020016200011e565b60408051808201909152601f81527f696e697469616c697a6528616464726573732c696e7432342c62797465732900602090910152620001797f3d048c271a2436dc9dbaf9f72bfa07b52d864af4693499c0eebeda112c60b8fa81565b6001546040519081526020016200011e565b620001a77340d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f81565b620000df6200025c36600462000ce0565b62000582565b620001a77f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98481565b620000df6200029b36600462000c5e565b62000717565b33620002ac62000573565b6001600160a01b031614620002de5760405162461bcd60e51b8152600401620002d59062000f8b565b60405180910390fd5b620002ea82826200080d565b5050565b33620002f962000573565b6001600160a01b031614620003225760405162461bcd60e51b8152600401620002d59062000f8b565b8281146200034357604051632df0433360e21b815260040160405180910390fd5b60005b83811015620003de57620003c98585838181106200037457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906200038b919062000c5e565b848484818110620003ac57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190620003c3919062000c5e565b6200080d565b80620003d58162001028565b91505062000346565b5050505050565b6060620003f3838362000fdb565b6200040090600162000fc0565b67ffffffffffffffff8111156200042757634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801562000451578160200160208202803683370190505b509050825b828111620004ee57600181815481106200048057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031682620004a2868462000fdb565b81518110620004c157634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280620004e58162001028565b91505062000456565b5092915050565b336200050062000573565b6001600160a01b031614620005295760405162461bcd60e51b8152600401620002d59062000f8b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b336200058d62000573565b6001600160a01b031614620005b65760405162461bcd60e51b8152600401620002d59062000f8b565b604051630b4c774160e11b81526001600160a01b0385811660048301527340d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f602483015262ffffff851660448301526000917f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98490911690631698ee829060640160206040518083038186803b1580156200064257600080fd5b505afa15801562000657573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200067d919062000c84565b90506001600160a01b038116620006a75760405163037064f160e01b815260040160405180910390fd5b6000620006cd867340d16fc0246ad3160ccc09b8d0d3a2cd28ae6c2f8785888862000956565b9050806001600160a01b0316826001600160a01b03167f5d9c31ffa0fecffd7cf379989a3c7af252f0335e0d2a1320b55245912c781f5360405160405180910390a3505050505050565b336200072262000573565b6001600160a01b0316146200074b5760405162461bcd60e51b8152600401620002d59062000f8b565b6001600160a01b038116620007b25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620002d5565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b803b6200082d57604051632c917c6d60e11b815260040160405180910390fd5b604080518082018252601281527175706772616465546f28616464726573732960701b60209182015281516001600160a01b03848116602480840191909152845180840390910181526044909201845291810180516001600160e01b0316631b2ce7f360e11b179052915160009291851691620008aa9162000ebb565b6000604051808303816000865af19150503d8060008114620008e9576040519150601f19603f3d011682016040523d82523d6000602084013e620008ee565b606091505b5050905080620009115760405163e5ba34a360e01b815260040160405180910390fd5b816001600160a01b0316836001600160a01b03167ff1bca332ecac5836810b4626fa419227255b5d1ec952fc6b7bba5916ecf6808060405160405180910390a3505050565b60008151600014156200097c57604051631438a13160e01b815260040160405180910390fd5b856001600160a01b0316876001600160a01b03161415620009b05760405163015c805760e71b815260040160405180910390fd5b6000866001600160a01b0316886001600160a01b031610620009d35786620009d5565b875b90506001600160a01b03811662000a2f5760405162461bcd60e51b815260206004820152601e60248201527f746f6b656e2063616e6e6f742062652061207a65726f206164647265737300006044820152606401620002d5565b6040516322afcccb60e01b815262ffffff871660048201526000907f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f9846001600160a01b0316906322afcccb9060240160206040518083038186803b15801562000a9757600080fd5b505afa15801562000aac573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ad2919062000e48565b604080518082018252601f81527f696e697469616c697a6528616464726573732c696e7432342c627974657329006020909101525190915085907f3d048c271a2436dc9dbaf9f72bfa07b52d864af4693499c0eebeda112c60b8fa9062000b429089908590899060240162000f07565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b031990941693909317909252905162000b819062000c03565b62000b8e92919062000ed9565b604051809103906000f08015801562000bab573d6000803e3d6000fd5b506001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b0383161790559998505050505050505050565b610772806200108c83390190565b60008083601f84011262000c23578081fd5b50813567ffffffffffffffff81111562000c3b578182fd5b6020830191508360208260051b850101111562000c5757600080fd5b9250929050565b60006020828403121562000c70578081fd5b813562000c7d8162001072565b9392505050565b60006020828403121562000c96578081fd5b815162000c7d8162001072565b6000806040838503121562000cb6578081fd5b823562000cc38162001072565b9150602083013562000cd58162001072565b809150509250929050565b6000806000806080858703121562000cf6578182fd5b843562000d038162001072565b9350602085013562ffffff8116811462000d1b578283fd5b9250604085013562000d2d8162001072565b9150606085013567ffffffffffffffff8082111562000d4a578283fd5b818701915087601f83011262000d5e578283fd5b81358181111562000d735762000d736200105c565b604051601f8201601f19908116603f0116810190838211818310171562000d9e5762000d9e6200105c565b816040528281528a602084870101111562000db7578586fd5b82602086016020830137918201602001949094529598949750929550505050565b6000806000806040858703121562000dee578384fd5b843567ffffffffffffffff8082111562000e06578586fd5b62000e148883890162000c11565b9096509450602087013591508082111562000e2d578384fd5b5062000e3c8782880162000c11565b95989497509550505050565b60006020828403121562000e5a578081fd5b81518060020b811462000c7d578182fd5b6000806040838503121562000e7e578182fd5b50508035926020909101359150565b6000815180845262000ea781602086016020860162000ff5565b601f01601f19169290920160200192915050565b6000825162000ecf81846020870162000ff5565b9190910192915050565b6001600160a01b038316815260406020820181905260009062000eff9083018462000e8d565b949350505050565b60018060a01b03841681528260020b602082015260606040820152600062000f33606083018462000e8d565b95945050505050565b6020808252825182820181905260009190848201906040850190845b8181101562000f7f5783516001600160a01b03168352928401929184019160010162000f58565b50909695505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111562000fd65762000fd662001046565b500190565b60008282101562000ff05762000ff062001046565b500390565b60005b838110156200101257818101518382015260200162000ff8565b8381111562001022576000848401525b50505050565b60006000198214156200103f576200103f62001046565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146200108857600080fd5b5056fe6080604052604051610772380380610772833981016040819052610022916102f7565b61004d60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd61040f565b60008051602061072b8339815191521461007757634e487b7160e01b600052600160045260246000fd5b6100838282600061008a565b5050610474565b610093836100f4565b6040516001600160a01b038416907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a26000825111806100d45750805b156100ef576100ed83836101b460201b6100291760201c565b505b505050565b610107816101e060201b6100551760201c565b61016e5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084015b60405180910390fd5b8061019360008051602061072b83398151915260001b6101e660201b61005b1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b60606101d9838360405180606001604052806027815260200161074b602791396101e9565b9392505050565b3b151590565b90565b6060833b6102485760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610165565b600080856001600160a01b03168560405161026391906103c0565b600060405180830381855af49150503d806000811461029e576040519150601f19603f3d011682016040523d82523d6000602084013e6102a3565b606091505b5090925090506102b48282866102be565b9695505050505050565b606083156102cd5750816101d9565b8251156102dd5782518084602001fd5b8160405162461bcd60e51b815260040161016591906103dc565b60008060408385031215610309578182fd5b82516001600160a01b038116811461031f578283fd5b60208401519092506001600160401b038082111561033b578283fd5b818501915085601f83011261034e578283fd5b8151818111156103605761036061045e565b604051601f8201601f19908116603f011681019083821181831017156103885761038861045e565b816040528281528860208487010111156103a0578586fd5b6103b1836020830160208801610432565b80955050505050509250929050565b600082516103d2818460208701610432565b9190910192915050565b60208152600082518060208401526103fb816040850160208701610432565b601f01601f19169190910160400192915050565b60008282101561042d57634e487b7160e01b81526011600452602481fd5b500390565b60005b8381101561044d578181015183820152602001610435565b838111156100ed5750506000910152565b634e487b7160e01b600052604160045260246000fd5b6102a8806104836000396000f3fe60806040523661001357610011610017565b005b6100115b61002761002261005e565b610096565b565b606061004e838360405180606001604052806027815260200161024c602791396100ba565b9392505050565b3b151590565b90565b60006100917f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905090565b3660008037600080366000845af43d6000803e8080156100b5573d6000f35b3d6000fd5b6060833b61011e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b600080856001600160a01b03168560405161013991906101cc565b600060405180830381855af49150503d8060008114610174576040519150601f19603f3d011682016040523d82523d6000602084013e610179565b606091505b5091509150610189828286610193565b9695505050505050565b606083156101a257508161004e565b8251156101b25782518084602001fd5b8160405162461bcd60e51b815260040161011591906101e8565b600082516101de81846020870161021b565b9190910192915050565b602081526000825180602084015261020781604085016020870161021b565b601f01601f19169190910160400192915050565b60005b8381101561023657818101518382015260200161021e565b83811115610245576000848401525b5050505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212204f6a2d157be6acb5080e3238964250ebc6ec88ae6a60961a5917d6a1dcd499ce64736f6c63430008040033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122000fa2dd2f61b9074f9f15ddce904df1468e0cfd951de0b112d6cf05c80f8965064736f6c63430008040033

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


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.