Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x81734f304FF2Cf53F962415b4306e601Ffef9195
Balance 0 ETH
Nonce 1
Code Size 1345 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

1345 bytes
0x608060405234801561001057600080fd5b50600436106100625760003560e01c80636405ebae14610067578063715018a61461009f5780638da5cb5b146100a9578063b7148d08146100ba578063d299b443146100e2578063f2fde38b146100f5575b600080fd5b61008273c36442b4a4522e871399cd717abdd847ab11fe8881565b6040516001600160a01b0390911681526020015b60405180910390f35b6100a7610108565b005b6000546001600160a01b0316610082565b6100cd6100c8366004610438565b61011c565b60408051928352602083019190915201610096565b6100a76100f0366004610438565b61020d565b6100a7610103366004610474565b6102f4565b610110610372565b61011a60006103cc565b565b600080610127610372565b604080516080810182528681526001600160a01b037f000000000000000000000000e9b230da91fe0f451d9b92fd5213bde058567cd11660208201526001600160801b038087168284015285166060820152905163fc6f786560e01b815273c36442b4a4522e871399cd717abdd847ab11fe889063fc6f7865906101af9084906004016104a4565b6040805180830381600087803b1580156101c857600080fd5b505af11580156101dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061020091906104e7565b9097909650945050505050565b610215610372565b604080516080810182528481527f000000000000000000000000e9b230da91fe0f451d9b92fd5213bde058567cd16001600160a01b031660208201526001600160801b038085168284015283166060820152905163fc6f786560e01b815273c36442b4a4522e871399cd717abdd847ab11fe889163fc6f78659161029c91906004016104a4565b6040805180830381600087803b1580156102b557600080fd5b505af11580156102c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ed91906104e7565b5050505050565b6102fc610372565b6001600160a01b0381166103665760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61036f816103cc565b50565b6000546001600160a01b0316331461011a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161035d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160801b038116811461043357600080fd5b919050565b60008060006060848603121561044d57600080fd5b8335925061045d6020850161041c565b915061046b6040850161041c565b90509250925092565b60006020828403121561048657600080fd5b81356001600160a01b038116811461049d57600080fd5b9392505050565b815181526020808301516001600160a01b0316908201526040808301516001600160801b0390811691830191909152606092830151169181019190915260800190565b600080604083850312156104fa57600080fd5b50508051602090910151909290915056fea2646970667358221220a8d17c8bda53abd12b8105f1488a2a11ae6b827e120c204fd0c578394a893eb764736f6c63430008090033

Verified Source Code Partial Match

Compiler: v0.8.9+commit.e5eed63a EVM: istanbul Optimization: Yes (200 runs)
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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) {
        return msg.data;
    }
}
Ownable.sol 83 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "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() {
        _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);
    }
}
UniswapV3FeeCollector.sol 64 lines
// SPDX-License-Identifier: GPL-3.0-only

/* ========== Requirements and Imports ========== 
================================================
*/

pragma solidity 0.8.9;

import "Ownable.sol";
import "INonfungiblePositionManager.sol";

contract LPFeeCollector is Ownable {
    // Addresses //

    address private immutable _EEFI_FURNACE =
        0xe9B230DA91FE0f451d9b92Fd5213Bde058567Cd1;

    address private constant _POSITION_MANAGER =
        0xC36442b4a4522E871399CD717aBDD847Ab11FE88;

    //Interface //
    INonfungiblePositionManager public constant position_manager =
        INonfungiblePositionManager(_POSITION_MANAGER);

    /**
     * @notice Returns data about fee balances from a Uniswap V3 position
     * @dev Reverts if caller is not owner and the contract is not authorized to call 'collect' on the position manager.
     */

    function getCurrentReward(
        uint256 _tokenId,
        uint128 _amount0Max,
        uint128 _amount1Max
    ) public onlyOwner returns (uint256 amount0, uint256 amount1) {
        CollectParams memory params = CollectParams({
            tokenId: _tokenId,
            recipient: _EEFI_FURNACE,
            amount0Max: _amount0Max,
            amount1Max: _amount1Max
        });

        (amount0, amount1) = position_manager.collect(params);
    }

    /**
     * @notice Collects fees from a Uniswap V3 position and sends assets to EEFI Furnace.
     * @dev Reverts if the caller is not the Owner. Contract must be authorized to manage position.
     */

    function collectUniswapV3Fees(
        uint256 _tokenId,
        uint128 _amount0Max,
        uint128 _amount1Max
    ) external onlyOwner {
        position_manager.collect(
            CollectParams({
                tokenId: _tokenId,
                recipient: _EEFI_FURNACE,
                amount0Max: _amount0Max,
                amount1Max: _amount1Max
            })
        );
    }
}
INonfungiblePositionManager.sol 23 lines
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.23 <0.9.0;

struct CollectParams {
    uint256 tokenId;
    address recipient;
    uint128 amount0Max;
    uint128 amount1Max;
}

/// tokenId The ID of the NFT for which tokens are being collected,
/// recipient The account that should receive the tokens,
/// amount0Max The maximum amount of token0 to collect,
/// amount1Max The maximum amount of token1 to collect
/// amount0 The amount of fees collected in token0
/// amount1 The amount of fees collected in token1

interface INonfungiblePositionManager {
    function collect(
        CollectParams calldata params
    ) external payable returns (uint256 amount0, uint256 amount1);
}

Read Contract

owner 0x8da5cb5b → address
position_manager 0x6405ebae → address

Write Contract 4 functions

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

collectUniswapV3Fees 0xd299b443
uint256 _tokenId
uint128 _amount0Max
uint128 _amount1Max
getCurrentReward 0xb7148d08
uint256 _tokenId
uint128 _amount0Max
uint128 _amount1Max
returns: uint256, uint256
renounceOwnership 0x715018a6
No parameters
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address