Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xCd03e2e276F6EEdD424d41314437531F665187b9
Balance 0 ETH
Nonce 1
Code Size 3956 bytes
Last Active
Indexed Transactions 10 (24,248,34924,323,642)
Gas Used (indexed) 1,408,914
External Etherscan · Sourcify

Contract Bytecode

3956 bytes
0x608060405234801561001057600080fd5b506004361061011b5760003560e01c80638da5cb5b116100b2578063cff8e7f711610081578063f2fde38b11610066578063f2fde38b146102b4578063f32a12ac146102c7578063f3cc660c146102da57600080fd5b8063cff8e7f714610283578063e30c39781461029657600080fd5b80638da5cb5b146101fb578063b0e21e8a14610219578063bc19a9e214610250578063c45a01551461026357600080fd5b80636e9821c2116100ee5780636e9821c2146101a5578063715018a6146101d857806372754262146101e057806379ba5097146101f357600080fd5b80634e91f8111461012057806350655d8c1461013557806354a0af171461017f57806358c0f72914610192575b600080fd5b61013361012e366004610bad565b6102ed565b005b6004546101559073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61013361018d366004610c2f565b61036d565b6101336101a0366004610d18565b6103f3565b6101c86101b3366004610d8d565b60026020526000908152604090205460ff1681565b6040519015158152602001610176565b6101336105be565b6101336101ee366004610d18565b6105d2565b61013361070d565b60005473ffffffffffffffffffffffffffffffffffffffff16610155565b60045461023e9074010000000000000000000000000000000000000000900460ff1681565b60405160ff9091168152602001610176565b61013361025e366004610d8d565b6107c7565b6003546101559073ffffffffffffffffffffffffffffffffffffffff1681565b610133610291366004610da8565b610816565b60015473ffffffffffffffffffffffffffffffffffffffff16610155565b6101336102c2366004610d8d565b6108b4565b6101336102d5366004610df0565b610964565b6101336102e8366004610d8d565b6109f6565b6102f5610afb565b60ff81161580610318575060048160ff16101580156103185750600a8160ff1611155b61032157600080fd5b6004805460ff90921674010000000000000000000000000000000000000000027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b610375610afb565b60008373ffffffffffffffffffffffffffffffffffffffff16838360405161039d9190610e21565b60006040518083038185875af1925050503d80600081146103da576040519150601f19603f3d011682016040523d82523d6000602084013e6103df565b606091505b50509050806103ed57600080fd5b50505050565b3360009081526002602052604090205460ff1661043c576040517fcf1119ab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156105b957600083838381811061045b5761045b610e5c565b90506020020160208101906104709190610d8d565b90506000808273ffffffffffffffffffffffffffffffffffffffff16631ad8b03b6040518163ffffffff1660e01b81526004016040805180830381865afa1580156104bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e39190610eab565b600480546040517f85b6672900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216928101929092526fffffffffffffffffffffffffffffffff808516602484015283166044830152929450909250908416906385b667299060640160408051808303816000875af115801561057d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a19190610eab565b505050505080806105b190610ede565b91505061043f565b505050565b6105c6610afb565b6105d06000610b7c565b565b3360009081526002602052604090205460ff1661061b576040517fcf1119ab00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156105b957600083838381811061063a5761063a610e5c565b905060200201602081019061064f9190610d8d565b600480546040517f8206a4d10000000000000000000000000000000000000000000000000000000081527401000000000000000000000000000000000000000090910460ff16918101829052602481019190915290915073ffffffffffffffffffffffffffffffffffffffff821690638206a4d190604401600060405180830381600087803b1580156106e157600080fd5b505af11580156106f5573d6000803e3d6000fd5b5050505050808061070590610ede565b91505061061e565b600154339073ffffffffffffffffffffffffffffffffffffffff1681146107bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e6572000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6107c481610b7c565b50565b6107cf610afb565b600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b61081e610afb565b6003546040517f8a7c195f00000000000000000000000000000000000000000000000000000000815262ffffff84166004820152600283900b602482015273ffffffffffffffffffffffffffffffffffffffff90911690638a7c195f90604401600060405180830381600087803b15801561089857600080fd5b505af11580156108ac573d6000803e3d6000fd5b505050505050565b6108bc610afb565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000909116811790915561091f60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b61096c610afb565b73ffffffffffffffffffffffffffffffffffffffff821660008181526002602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f878d105ed19c01e992a54459c2f04ba19432ac45600b42ce340d034272207436910160405180910390a25050565b6109fe610afb565b6003546040517f13af403500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8381166004830152909116906313af403590602401600060405180830381600087803b158015610a6b57600080fd5b505af1158015610a7f573d6000803e3d6000fd5b5050505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146105d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107b2565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556107c481610a86565b600060208284031215610bbf57600080fd5b813560ff81168114610bd057600080fd5b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610bfb57600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080600060608486031215610c4457600080fd5b610c4d84610bd7565b925060208401359150604084013567ffffffffffffffff80821115610c7157600080fd5b818601915086601f830112610c8557600080fd5b813581811115610c9757610c97610c00565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610cdd57610cdd610c00565b81604052828152896020848701011115610cf657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b60008060208385031215610d2b57600080fd5b823567ffffffffffffffff80821115610d4357600080fd5b818501915085601f830112610d5757600080fd5b813581811115610d6657600080fd5b8660208260051b8501011115610d7b57600080fd5b60209290920196919550909350505050565b600060208284031215610d9f57600080fd5b610bd082610bd7565b60008060408385031215610dbb57600080fd5b823562ffffff81168114610dce57600080fd5b91506020830135600281900b8114610de557600080fd5b809150509250929050565b60008060408385031215610e0357600080fd5b610e0c83610bd7565b915060208301358015158114610de557600080fd5b6000825160005b81811015610e425760208186018101518583015201610e28565b81811115610e51576000828501525b509190910192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80516fffffffffffffffffffffffffffffffff81168114610bfb57600080fd5b60008060408385031215610ebe57600080fd5b610ec783610e8b565b9150610ed560208401610e8b565b90509250929050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610f37577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea2646970667358221220114424c9378fd8a69f0c5cf9a4c8bfb01073dab0636fe6b18d65015675db28fc64736f6c634300080a0033

Verified Source Code Partial Match

Compiler: v0.8.10+commit.fc410830 EVM: london Optimization: Yes (999999 runs)
V3Manager.sol 557 lines
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity >=0.8.0 ^0.8.0;

// lib/openzeppelin-contracts/contracts/utils/Context.sol

// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

// src/interfaces/IUniswapV3Factory.sol

/// @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;
}

// src/interfaces/IUniswapV3Pool.sol

interface IUniswapV3Pool {
  // IUniswapV3PoolActions
  function initialize(uint160 sqrtPriceX96) external;

  function mint(
    address recipient,
    int24 tickLower,
    int24 tickUpper,
    uint128 amount,
    bytes calldata data
  ) external returns (uint256 amount0, uint256 amount1);

  function collect(
    address recipient,
    int24 tickLower,
    int24 tickUpper,
    uint128 amount0Requested,
    uint128 amount1Requested
  ) external returns (uint128 amount0, uint128 amount1);

  function burn(
    int24 tickLower,
    int24 tickUpper,
    uint128 amount
  ) external returns (uint256 amount0, uint256 amount1);

  function swap(
    address recipient,
    bool zeroForOne,
    int256 amountSpecified,
    uint160 sqrtPriceLimitX96,
    bytes calldata data
  ) external returns (int256 amount0, int256 amount1);

  function flash(
    address recipient,
    uint256 amount0,
    uint256 amount1,
    bytes calldata data
  ) external;

  function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;

  // IUniswapV3PoolDerivedState
  function observe(uint32[] calldata secondsAgos)
    external
    view
    returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);

  function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)
    external
    view
    returns (
      int56 tickCumulativeInside,
      uint160 secondsPerLiquidityInsideX128,
      uint32 secondsInside
    );
  
  // IUniswapV3PoolErrors
  error LOK();
  error TLU();
  error TLM();
  error TUM();
  error AI();
  error M0();
  error M1();
  error AS();
  error IIA();
  error L();
  error F0();
  error F1();

  // IUniswapV3PoolEvents
  event Initialize(uint160 sqrtPriceX96, int24 tick);
  event Mint(
    address sender,
    address indexed owner,
    int24 indexed tickLower,
    int24 indexed tickUpper,
    uint128 amount,
    uint256 amount0,
    uint256 amount1
  );

  event Collect(
    address indexed owner,
    address recipient,
    int24 indexed tickLower,
    int24 indexed tickUpper,
    uint128 amount0,
    uint128 amount1
  );

  event Burn(
    address indexed owner,
    int24 indexed tickLower,
    int24 indexed tickUpper,
    uint128 amount,
    uint256 amount0,
    uint256 amount1
  );

  event Swap(
    address indexed sender,
    address indexed recipient,
    int256 amount0,
    int256 amount1,
    uint160 sqrtPriceX96,
    uint128 liquidity,
    int24 tick
  );

  event Flash(
    address indexed sender,
    address indexed recipient,
    uint256 amount0,
    uint256 amount1,
    uint256 paid0,
    uint256 paid1
  );

  event IncreaseObservationCardinalityNext(
    uint16 observationCardinalityNextOld,
    uint16 observationCardinalityNextNew
  );

  event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);

  event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);

  // IUniswapV3PoolImmutables
  function factory() external view returns (address);
  function token0() external view returns (address);
  function token1() external view returns (address);
  function fee() external view returns (uint24);
  function tickSpacing() external view returns (int24);
  function maxLiquidityPerTick() external view returns (uint128);

  // IUniswapV3PoolOwnerActions
  function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;
  function collectProtocol(
    address recipient,
    uint128 amount0Requested,
    uint128 amount1Requested
  ) external returns (uint128 amount0, uint128 amount1);

  // IUniswapV3PoolState
  function slot0()
    external
    view
    returns (
      uint160 sqrtPriceX96,
      int24 tick,
      uint16 observationIndex,
      uint16 observationCardinality,
      uint16 observationCardinalityNext,
      uint8 feeProtocol,
      bool unlocked
    );

  function feeGrowthGlobal0X128() external view returns (uint256);
  function feeGrowthGlobal1X128() external view returns (uint256);
  function protocolFees() external view returns (uint128 token0, uint128 token1);
  function liquidity() external view returns (uint128);

  function ticks(int24 tick)
    external
    view
    returns (
      uint128 liquidityGross,
      int128 liquidityNet,
      uint256 feeGrowthOutside0X128,
      uint256 feeGrowthOutside1X128,
      int56 tickCumulativeOutside,
      uint160 secondsPerLiquidityOutsideX128,
      uint32 secondsOutside,
      bool initialized
    );

  function tickBitmap(int16 wordPosition) external view returns (uint256);

  function positions(bytes32 key)
    external
    view
    returns (
      uint128 liquidity,
      uint256 feeGrowthInside0LastX128,
      uint256 feeGrowthInside1LastX128,
      uint128 tokensOwed0,
      uint128 tokensOwed1
    );

  function observations(uint256 index)
    external
    view
    returns (
      uint32 blockTimestamp,
      int56 tickCumulative,
      uint160 secondsPerLiquidityCumulativeX128,
      bool initialized
    );
}

// lib/openzeppelin-contracts/contracts/access/Ownable.sol

// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// lib/openzeppelin-contracts/contracts/access/Ownable2Step.sol

// OpenZeppelin Contracts (last updated v4.8.0) (access/Ownable2Step.sol)

/**
 * @dev Contract module which provides 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} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

    event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Returns the address of the pending owner.
     */
    function pendingOwner() public view virtual returns (address) {
        return _pendingOwner;
    }

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() external {
        address sender = _msgSender();
        require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner");
        _transferOwnership(sender);
    }
}

// src/Auth.sol

abstract contract Auth is Ownable2Step {

    event SetTrusted(address indexed user, bool isTrusted);

    mapping(address => bool) public trusted;

    error OnlyTrusted();

    modifier onlyTrusted() {
        if (!trusted[msg.sender]) revert OnlyTrusted();
        _;
    }

    constructor(address trustedUser) {
        trusted[trustedUser] = true;
        emit SetTrusted(trustedUser, true);
    }

    function setTrusted(address user, bool isTrusted) external onlyOwner {
        trusted[user] = isTrusted;
        emit SetTrusted(user, isTrusted);
    }

}

// src/V3Manager.sol

/// @title V3Manager for UniswapV3Factory
/// @notice This contract is used to create fee tiers, set protocol fee on pools, and collect fees from pools
/// @dev Uses Auth contract for owner and trusted operators to guard functions
contract V3Manager is Auth {
  IUniswapV3Factory public factory;
  address public maker;
  uint8 public protocolFee;

  constructor(
    address _operator,
    address _factory,
    address _maker,
    uint8 _protocolFee
  ) Auth(_operator) {
    // initial owner is msg.sender
    factory = IUniswapV3Factory(_factory);
    maker = _maker;
    protocolFee = _protocolFee;
  }

  /// @notice Creates a new fee tier with passed tickSpacing
  /// @dev will revert on factory contract if inputs invalid
  /// @param fee The fee amount to enable, denominated in hundreths of a bip
  /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount
  function createFeeTier(uint24 fee, int24 tickSpacing) external onlyOwner {
    IUniswapV3Factory(factory).enableFeeAmount(fee, tickSpacing);
  }

  /// @notice transfer ownership of the factory contract
  /// @param newOwner The newOwner address to set on the factory contract
  function setFactoryOwner(address newOwner) external onlyOwner {
    IUniswapV3Factory(factory).setOwner(newOwner);
  }

  /// @notice Sets the protocol fee to be used for all pools
  /// @dev must be between 4 and 10, or 0 to disable - must apply to each pool everytime it's changed
  /// @param _protocolFee The protocol fee to be used for all pools
  function setProtocolFee(uint8 _protocolFee) external onlyOwner {
    require(
      _protocolFee == 0 || (_protocolFee >= 4 && _protocolFee <= 10)
    );
    protocolFee = _protocolFee;
  }

  /// @notice Sets the maker contract to be used for collecting fees
  /// @dev Where all fees will be sent to when collected
  /// @param _maker The address of the maker contract
  function setMaker(address _maker) external onlyOwner {
    maker = _maker;
  }

  /// @notice Applies the protocol fee to all pools passed
  /// @dev must be called for each pool, after protocolFee is updated
  /// @param pools The addresses of the pools to apply the protocol fee to
  function applyProtocolFee(address[] calldata pools) external onlyTrusted {
    for (uint256 i = 0; i < pools.length; i++) {
      IUniswapV3Pool pool = IUniswapV3Pool(pools[i]);
      pool.setFeeProtocol(protocolFee, protocolFee);
    }
  } 

  /// @notice Collects fees from pools passed
  /// @dev Will call collectProtocol on each pool address, sending fees to maker contract that is set
  /// @param pools The addresses of the pools to collect fees from
  function collectFees(address[] calldata pools) external onlyTrusted {
    for (uint256 i = 0; i < pools.length; i++) {
      IUniswapV3Pool pool = IUniswapV3Pool(pools[i]);
      (uint128 amount0, uint128 amount1) = pool.protocolFees();
      pool.collectProtocol(maker, amount0, amount1);
    }
  }

  /// @notice Available function in case we need to do any calls that aren't supported by the contract (unwinding lp positions, etc.)
  /// @dev can only be called by owner
  /// @param to The address to send the call to
  /// @param _value The amount of eth to send with the call
  /// @param data The data to be sent with the call
  function doAction(address to, uint256 _value, bytes memory data) onlyOwner external {
    (bool success, ) = to.call{value: _value}(data);
    require(success);
  }
}

Read Contract

factory 0xc45a0155 → address
maker 0x50655d8c → address
owner 0x8da5cb5b → address
pendingOwner 0xe30c3978 → address
protocolFee 0xb0e21e8a → uint8
trusted 0x6e9821c2 → bool

Write Contract 11 functions

These functions modify contract state and require a wallet transaction to execute.

acceptOwnership 0x79ba5097
No parameters
applyProtocolFee 0x72754262
address[] pools
collectFees 0x58c0f729
address[] pools
createFeeTier 0xcff8e7f7
uint24 fee
int24 tickSpacing
doAction 0x54a0af17
address to
uint256 _value
bytes data
renounceOwnership 0x715018a6
No parameters
setFactoryOwner 0xf3cc660c
address newOwner
setMaker 0xbc19a9e2
address _maker
setProtocolFee 0x4e91f811
uint8 _protocolFee
setTrusted 0xf32a12ac
address user
bool isTrusted
transferOwnership 0xf2fde38b
address newOwner

Top Interactions

AddressTxnsSentReceived
0xb6B1581b...65B1 10 10

Recent Transactions

CSV
|
Hash Method Block Age From/To Value Txn Fee Type
0x4cf4f626...591319 0x58c0f729 24,323,642 IN 0xb6B1581b...65B1 0 ETH 0.000008346396 ETH EIP-1559
0xfe43c654...c7417c 0x58c0f729 24,320,059 IN 0xb6B1581b...65B1 0 ETH 0.000052583223 ETH EIP-1559
0x211df28c...ef0303 0x58c0f729 24,316,481 IN 0xb6B1581b...65B1 0 ETH 0.000004587605 ETH EIP-1559
0x33293a3b...3d0b66 0x58c0f729 24,309,300 IN 0xb6B1581b...65B1 0 ETH 0.000003598720 ETH EIP-1559
0xdc7cf450...c89e23 0x58c0f729 24,291,382 IN 0xb6B1581b...65B1 0 ETH 0.000036042414 ETH EIP-1559
0xc01c33e2...1fe5b2 0x58c0f729 24,287,803 IN 0xb6B1581b...65B1 0 ETH 0.000008611250 ETH EIP-1559
0x5c8024e2...0d1816 0x58c0f729 24,284,229 IN 0xb6B1581b...65B1 0 ETH 0.000024866189 ETH EIP-1559
0xba29d7c4...9357a3 0x58c0f729 24,255,523 IN 0xb6B1581b...65B1 0 ETH 0.000008766024 ETH EIP-1559
0x710af0df...ea90b1 0x58c0f729 24,251,937 IN 0xb6B1581b...65B1 0 ETH 0.000003020099 ETH EIP-1559
0x624014ac...0c5e4b 0x58c0f729 24,248,349 IN 0xb6B1581b...65B1 0 ETH 0.000022029143 ETH EIP-1559