Skip to content

Commit

Permalink
move custom errors inside contract + inherit from ILockCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
tinaszheng committed Nov 28, 2023
1 parent 05c9543 commit ca01507
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
14 changes: 9 additions & 5 deletions contracts/NonfungiblePositionManagerV4.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ import {PeripheryPayments} from "./base/PeripheryPayments.sol";
import {SelfPermit} from "./base/SelfPermit.sol";
import {Multicall} from "./base/Multicall.sol";

error InvalidTokenID();
error NotApproved();
error NotCleared();
error NonexistentToken();

contract NonfungiblePositionManagerV4 is
INonfungiblePositionManagerV4,
ERC721,
Expand All @@ -30,6 +25,11 @@ contract NonfungiblePositionManagerV4 is
{
IPoolManager public immutable poolManager;

error InvalidTokenID();
error NotApproved();
error NotCleared();
error NonexistentToken();

// details about the Uniswap position
struct Position {
// the nonce for permits
Expand Down Expand Up @@ -111,6 +111,10 @@ contract NonfungiblePositionManagerV4 is
);
}

function lockAcquired(bytes calldata rawData) external returns (bytes memory) {
// TODO: implement this
}

/// @inheritdoc INonfungiblePositionManagerV4
function createAndInitializePoolIfNecessary(PoolKey memory poolkey, uint160 sqrtPriceX96, bytes memory initData)
external
Expand Down
3 changes: 2 additions & 1 deletion contracts/interfaces/INonfungiblePositionManagerV4.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pragma solidity ^0.8.19;

import {IERC721Metadata} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import {IERC721Enumerable} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import {ILockCallback} from "@uniswap/v4-core/contracts/interfaces/callback//ILockCallback.sol";
import {PoolKey} from "@uniswap/v4-core/contracts/types/PoolKey.sol";
import {Currency} from "@uniswap/v4-core/contracts/types/Currency.sol";

Expand All @@ -11,7 +12,7 @@ import {IPeripheryPayments} from "./IPeripheryPayments.sol";
/// @title Non-fungible token for positions
/// @notice Wraps Uniswap V4 positions in a non-fungible token interface which allows for them to be transferred
/// and authorized.
interface INonfungiblePositionManagerV4 is IPeripheryPayments, IERC721Metadata, IERC721Enumerable {
interface INonfungiblePositionManagerV4 is ILockCallback, IPeripheryPayments, IERC721Metadata, IERC721Enumerable {
/// @notice Emitted when liquidity is increased for a position NFT
/// @dev Also emitted when a token is minted
/// @param tokenId The ID of the token for which liquidity was increased
Expand Down

0 comments on commit ca01507

Please sign in to comment.