-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update position manager skeleton with liquidity management file
- Loading branch information
1 parent
3166045
commit ad34755
Showing
4 changed files
with
45 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.19; | ||
|
||
import {BalanceDelta} from "@uniswap/v4-core/contracts/types/BalanceDelta.sol"; | ||
import {ILockCallback} from "@uniswap/v4-core/contracts/interfaces/callback//ILockCallback.sol"; | ||
import {IPeripheryPayments} from "../interfaces/IPeripheryPayments.sol"; | ||
import {ILiquidityManagement} from "../interfaces/ILiquidityManagement.sol"; | ||
import {PeripheryImmutableState} from "./PeripheryImmutableState.sol"; | ||
|
||
abstract contract LiquidityManagement is ILockCallback, ILiquidityManagement, PeripheryImmutableState { | ||
function mintEntry(MintParams memory params) | ||
internal | ||
returns (uint256 tokenId, uint128 liquidity, BalanceDelta delta) | ||
{ | ||
// poolManager.lock call here | ||
} | ||
|
||
function lockAcquired(bytes calldata rawData) external override returns (bytes memory) { | ||
// TODO: handle mint/add liquidity here | ||
return abi.encode(0); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.19; | ||
|
||
import {ILockCallback} from "@uniswap/v4-core/contracts/interfaces/callback//ILockCallback.sol"; | ||
import {PoolKey} from "@uniswap/v4-core/contracts/types/PoolKey.sol"; | ||
|
||
interface ILiquidityManagement is ILockCallback { | ||
struct MintParams { | ||
PoolKey poolKey; | ||
int24 tickLower; | ||
int24 tickUpper; | ||
uint256 amount0Desired; | ||
uint256 amount1Desired; | ||
uint256 amount0Min; | ||
uint256 amount1Min; | ||
address recipient; | ||
uint256 deadline; | ||
bytes hookData; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters