More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 50 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim Fees | 20282113 | 6 days ago | IN | 0 ETH | 0.000779 | ||||
Claim Fees | 20218495 | 15 days ago | IN | 0 ETH | 0.00061712 | ||||
Claim Fees | 20215247 | 16 days ago | IN | 0 ETH | 0.00033643 | ||||
Claim Fees | 20170727 | 22 days ago | IN | 0 ETH | 0.00138887 | ||||
Claim Fees | 20061897 | 37 days ago | IN | 0 ETH | 0.00250982 | ||||
Claim Fees | 19891152 | 61 days ago | IN | 0 ETH | 0.001018 | ||||
Claim Fees | 19861165 | 65 days ago | IN | 0 ETH | 0.00141208 | ||||
Claim Fees | 19826490 | 70 days ago | IN | 0 ETH | 0.0007971 | ||||
Claim Fees | 19774959 | 77 days ago | IN | 0 ETH | 0.00133448 | ||||
Claim Fees | 19738237 | 83 days ago | IN | 0 ETH | 0.00134388 | ||||
Claim Fees | 19669159 | 92 days ago | IN | 0 ETH | 0.00320401 | ||||
Claim Fees | 19646460 | 95 days ago | IN | 0 ETH | 0.00168246 | ||||
Claim Fees | 19616605 | 100 days ago | IN | 0 ETH | 0.00316873 | ||||
Claim Fees | 19607817 | 101 days ago | IN | 0 ETH | 0.001747 | ||||
Claim Fees | 19584032 | 104 days ago | IN | 0 ETH | 0.00617405 | ||||
Claim Fees | 19570473 | 106 days ago | IN | 0 ETH | 0.00722948 | ||||
Claim Fees | 19560374 | 107 days ago | IN | 0 ETH | 0.00300067 | ||||
Claim Fees | 19555446 | 108 days ago | IN | 0 ETH | 0.00304158 | ||||
Claim Fees | 19546136 | 109 days ago | IN | 0 ETH | 0.00265981 | ||||
Claim Fees | 19540476 | 110 days ago | IN | 0 ETH | 0.00816975 | ||||
Claim Fees | 19532031 | 111 days ago | IN | 0 ETH | 0.00388545 | ||||
Claim Fees | 19518332 | 113 days ago | IN | 0 ETH | 0.00349309 | ||||
Lock NFT | 19507557 | 115 days ago | IN | 0 ETH | 0.00157941 | ||||
Claim Fees | 19507539 | 115 days ago | IN | 0 ETH | 0.00332577 | ||||
Claim Fees | 19496084 | 117 days ago | IN | 0 ETH | 0.00273823 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
GnomeLockerV3
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; pragma solidity ^0.8.0; interface IMinimalNonfungiblePositionManager { function createAndInitializePoolIfNecessary( address token0, address token1, uint24 fee, uint160 sqrtPriceX96 ) external payable returns (address pool); function positions( uint256 tokenId ) external view returns ( uint96 nonce, address operator, address token0, address token1, uint24 fee, int24 tickLower, int24 tickUpper, uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1 ); function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; struct DecreaseLiquidityParams { uint256 tokenId; uint128 liquidity; uint256 amount0Min; uint256 amount1Min; uint256 deadline; } struct CollectParams { uint256 tokenId; address recipient; uint128 amount0Max; uint128 amount1Max; } struct MintParams { address token0; address token1; uint24 fee; int24 tickLower; int24 tickUpper; uint256 amount0Desired; uint256 amount1Desired; uint256 amount0Min; uint256 amount1Min; address recipient; uint256 deadline; } struct IncreaseLiquidityParams { uint256 tokenId; uint256 amount0Desired; uint256 amount1Desired; uint256 amount0Min; uint256 amount1Min; uint256 deadline; } function increaseLiquidity( IncreaseLiquidityParams calldata params ) external payable returns (uint128 liquidity, uint256 amount0, uint256 amount1); function decreaseLiquidity( DecreaseLiquidityParams calldata params ) external payable returns (uint256 amount0, uint256 amount1); function mint( MintParams calldata params ) external returns (uint256 tokenId, uint128 liquidity, uint256 amount0, uint256 amount1); function burn(uint256 tokenId) external; /// @notice Collects up to a maximum amount of fees owed to a specific position to the recipient /// @param params 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 /// @return amount0 The amount of fees collected in token0 /// @return amount1 The amount of fees collected in token1 function collect(CollectParams calldata params) external payable returns (uint256 amount0, uint256 amount1); } contract GnomeLockerV3 { address public uniswapV3NFTManager; // Uniswap V3 NFT Position Manager address IERC721 public nftToken; // NFT token representing the Uniswap V3 liquidity position struct LockedNFT { uint256 tokenId; uint256 lockTimestamp; } mapping(address => LockedNFT) public lockedNFTs; uint256 public constant lockDuration = 72 days; // 72 days lock duration address public owner; event NFTLocked(address indexed locker, uint256 tokenId, uint256 lockTimestamp); event NFTUnlocked(address indexed unlocker, uint256 tokenId); event FeesClaimed(address indexed claimer, uint fee1, uint fee2); modifier onlyOwner() { require(msg.sender == owner, "Caller is not the authorized"); _; } constructor(address _uniswapV3NFTManager) { uniswapV3NFTManager = _uniswapV3NFTManager; nftToken = IERC721(_uniswapV3NFTManager); owner = msg.sender; } function lockNFT(uint256 tokenId) external onlyOwner { require(nftToken.ownerOf(tokenId) == address(this), "NFT not owned by locker"); IERC721(uniswapV3NFTManager).transferFrom(address(this), address(this), tokenId); uint256 lockTimestamp = block.timestamp; lockedNFTs[msg.sender] = LockedNFT(tokenId, lockTimestamp); emit NFTLocked(msg.sender, tokenId, lockTimestamp); } function unlockNFT() external onlyOwner { LockedNFT storage lockedNFT = lockedNFTs[msg.sender]; require(lockedNFT.tokenId != 0, "No locked NFT found"); require(block.timestamp >= lockedNFT.lockTimestamp + lockDuration, "Lock duration not elapsed"); nftToken.transferFrom(address(this), msg.sender, lockedNFT.tokenId); emit NFTUnlocked(msg.sender, lockedNFT.tokenId); delete lockedNFTs[msg.sender]; } function claimFees() external onlyOwner { IMinimalNonfungiblePositionManager.CollectParams memory params = IMinimalNonfungiblePositionManager .CollectParams({ tokenId: lockedNFTs[msg.sender].tokenId, recipient: owner, amount0Max: type(uint128).max, amount1Max: type(uint128).max }); uint amount0; uint amount1; (amount0, amount1) = IMinimalNonfungiblePositionManager(uniswapV3NFTManager).collect(params); emit FeesClaimed(msg.sender, amount0, amount1); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or * {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the address zero. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_uniswapV3NFTManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee2","type":"uint256"}],"name":"FeesClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"locker","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockTimestamp","type":"uint256"}],"name":"NFTLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"unlocker","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NFTUnlocked","type":"event"},{"inputs":[],"name":"claimFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"lockNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lockedNFTs","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"lockTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftToken","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV3NFTManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockNFT","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516107de3803806107de83398101604081905261002f9161006a565b600080546001600160a01b039092166001600160a01b031992831681179091556001805483169091179055600380549091163317905561009a565b60006020828403121561007c57600080fd5b81516001600160a01b038116811461009357600080fd5b9392505050565b610735806100a96000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063c1859f421161005b578063c1859f42146100fd578063d06fcba814610139578063d294f0931461014c578063f9d2994b1461015457600080fd5b8063045544431461008d5780632b7170d0146100aa5780636ed23c7f146100bf5780638da5cb5b146100ea575b600080fd5b610097625eec0081565b6040519081526020015b60405180910390f35b6100bd6100b836600461060b565b61015c565b005b6000546100d2906001600160a01b031681565b6040516001600160a01b0390911681526020016100a1565b6003546100d2906001600160a01b031681565b61012461010b36600461063c565b6002602052600090815260409020805460019091015482565b604080519283526020830191909152016100a1565b6001546100d2906001600160a01b031681565b6100bd61032c565b6100bd61046c565b6003546001600160a01b0316331461018f5760405162461bcd60e51b815260040161018690610660565b60405180910390fd5b6001546040516331a9108f60e11b81526004810183905230916001600160a01b031690636352211e90602401602060405180830381865afa1580156101d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fc9190610697565b6001600160a01b0316146102525760405162461bcd60e51b815260206004820152601760248201527f4e4654206e6f74206f776e6564206279206c6f636b65720000000000000000006044820152606401610186565b6000546040516323b872dd60e01b815230600482018190526024820152604481018390526001600160a01b03909116906323b872dd90606401600060405180830381600087803b1580156102a557600080fd5b505af11580156102b9573d6000803e3d6000fd5b50506040805180820182528481524260208083018281523360008181526002845286902094518555905160019094019390935583518781529081018290529094509092507fc990f9830712a09e4e20c8af107da460d35928ba999d92ac2e161004658b0f83910160405180910390a25050565b6003546001600160a01b031633146103565760405162461bcd60e51b815260040161018690610660565b60408051608081018252336000908152600260209081528382205483526003546001600160a01b039081169184019182526fffffffffffffffffffffffffffffffff848601818152606086018281528554975163fc6f786560e01b81528751600482015294518416602486015290518216604485015251166064830152929391928392169063fc6f78659060840160408051808303816000875af1158015610402573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042691906106b4565b604080518381526020810183905292945090925033917f1ac537f0ad67b64ac68a04587ff3a4cb6977de22eb2c37ee560897a92c6d07c7910160405180910390a2505050565b6003546001600160a01b031633146104965760405162461bcd60e51b815260040161018690610660565b33600090815260026020526040812080549091036104ec5760405162461bcd60e51b8152602060048201526013602482015272139bc81b1bd8dad9590813919508199bdd5b99606a1b6044820152606401610186565b625eec0081600101546104ff91906106d8565b42101561054e5760405162461bcd60e51b815260206004820152601960248201527f4c6f636b206475726174696f6e206e6f7420656c6170736564000000000000006044820152606401610186565b60015481546040516323b872dd60e01b815230600482015233602482015260448101919091526001600160a01b03909116906323b872dd90606401600060405180830381600087803b1580156105a357600080fd5b505af11580156105b7573d6000803e3d6000fd5b505082546040519081523392507ff15274e1fe5043a963d7d1dfdb31b4c69407f0c6f0fc77ddf03f605961cfe284915060200160405180910390a25033600090815260026020526040812081815560010155565b60006020828403121561061d57600080fd5b5035919050565b6001600160a01b038116811461063957600080fd5b50565b60006020828403121561064e57600080fd5b813561065981610624565b9392505050565b6020808252601c908201527f43616c6c6572206973206e6f742074686520617574686f72697a656400000000604082015260600190565b6000602082840312156106a957600080fd5b815161065981610624565b600080604083850312156106c757600080fd5b505080516020909101519092909150565b808201808211156106f957634e487b7160e01b600052601160045260246000fd5b9291505056fea26469706673582212202e33488f17126e78a8f69a8abf1605e58447034a74af0b2769b529704dbcbc8464736f6c63430008150033000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063c1859f421161005b578063c1859f42146100fd578063d06fcba814610139578063d294f0931461014c578063f9d2994b1461015457600080fd5b8063045544431461008d5780632b7170d0146100aa5780636ed23c7f146100bf5780638da5cb5b146100ea575b600080fd5b610097625eec0081565b6040519081526020015b60405180910390f35b6100bd6100b836600461060b565b61015c565b005b6000546100d2906001600160a01b031681565b6040516001600160a01b0390911681526020016100a1565b6003546100d2906001600160a01b031681565b61012461010b36600461063c565b6002602052600090815260409020805460019091015482565b604080519283526020830191909152016100a1565b6001546100d2906001600160a01b031681565b6100bd61032c565b6100bd61046c565b6003546001600160a01b0316331461018f5760405162461bcd60e51b815260040161018690610660565b60405180910390fd5b6001546040516331a9108f60e11b81526004810183905230916001600160a01b031690636352211e90602401602060405180830381865afa1580156101d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101fc9190610697565b6001600160a01b0316146102525760405162461bcd60e51b815260206004820152601760248201527f4e4654206e6f74206f776e6564206279206c6f636b65720000000000000000006044820152606401610186565b6000546040516323b872dd60e01b815230600482018190526024820152604481018390526001600160a01b03909116906323b872dd90606401600060405180830381600087803b1580156102a557600080fd5b505af11580156102b9573d6000803e3d6000fd5b50506040805180820182528481524260208083018281523360008181526002845286902094518555905160019094019390935583518781529081018290529094509092507fc990f9830712a09e4e20c8af107da460d35928ba999d92ac2e161004658b0f83910160405180910390a25050565b6003546001600160a01b031633146103565760405162461bcd60e51b815260040161018690610660565b60408051608081018252336000908152600260209081528382205483526003546001600160a01b039081169184019182526fffffffffffffffffffffffffffffffff848601818152606086018281528554975163fc6f786560e01b81528751600482015294518416602486015290518216604485015251166064830152929391928392169063fc6f78659060840160408051808303816000875af1158015610402573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042691906106b4565b604080518381526020810183905292945090925033917f1ac537f0ad67b64ac68a04587ff3a4cb6977de22eb2c37ee560897a92c6d07c7910160405180910390a2505050565b6003546001600160a01b031633146104965760405162461bcd60e51b815260040161018690610660565b33600090815260026020526040812080549091036104ec5760405162461bcd60e51b8152602060048201526013602482015272139bc81b1bd8dad9590813919508199bdd5b99606a1b6044820152606401610186565b625eec0081600101546104ff91906106d8565b42101561054e5760405162461bcd60e51b815260206004820152601960248201527f4c6f636b206475726174696f6e206e6f7420656c6170736564000000000000006044820152606401610186565b60015481546040516323b872dd60e01b815230600482015233602482015260448101919091526001600160a01b03909116906323b872dd90606401600060405180830381600087803b1580156105a357600080fd5b505af11580156105b7573d6000803e3d6000fd5b505082546040519081523392507ff15274e1fe5043a963d7d1dfdb31b4c69407f0c6f0fc77ddf03f605961cfe284915060200160405180910390a25033600090815260026020526040812081815560010155565b60006020828403121561061d57600080fd5b5035919050565b6001600160a01b038116811461063957600080fd5b50565b60006020828403121561064e57600080fd5b813561065981610624565b9392505050565b6020808252601c908201527f43616c6c6572206973206e6f742074686520617574686f72697a656400000000604082015260600190565b6000602082840312156106a957600080fd5b815161065981610624565b600080604083850312156106c757600080fd5b505080516020909101519092909150565b808201808211156106f957634e487b7160e01b600052601160045260246000fd5b9291505056fea26469706673582212202e33488f17126e78a8f69a8abf1605e58447034a74af0b2769b529704dbcbc8464736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88
-----Decoded View---------------
Arg [0] : _uniswapV3NFTManager (address): 0xC36442b4a4522E871399CD717aBDD847Ab11FE88
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.