Skip to content

Commit

Permalink
change modifyPosition to modifyLiquidity (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
nishim3 authored Mar 14, 2024
1 parent b5b3614 commit f5674e4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/FEATURE_IMPROVEMENT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ body:
- Lock and Call
- Delta accounting
- 1155 Balances
- Pool Actions (swap, modifyPosition, donate, take, settle, mint)
- Pool Actions (swap, modifyLiquidity, donate, take, settle, mint)
- Gas Optimization
- General design optimization (improving efficiency, cleanliness, or developer experience)
- Documentation
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A more detailed description of Uniswap v4 Core can be found in the draft of the
`v4-core` uses a singleton-style architecture, where all pool state is managed in the `PoolManager.sol` contract. Pool actions can be taken by acquiring a lock on the contract and implementing the `lockAcquired` callback to then proceed with any of the following actions on the pools:

- `swap`
- `modifyPosition`
- `modifyLiquidity`
- `donate`
- `take`
- `settle`
Expand Down
2 changes: 1 addition & 1 deletion src/PoolManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ contract PoolManager is IPoolManager, ProtocolFees, NoDelegateCall, ERC6909Claim

key.hooks.beforeModifyLiquidity(key, params, hookData);

delta = pools[id].modifyPosition(
delta = pools[id].modifyLiquidity(
Pool.ModifyPositionParams({
owner: msg.sender,
tickLower: params.tickLower,
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Pool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ library Pool {
/// @dev PoolManager checks that the pool is initialized before calling
/// @param params the position details and the change to the position's liquidity to effect
/// @return result the deltas of the token balances of the pool
function modifyPosition(State storage self, ModifyPositionParams memory params)
function modifyLiquidity(State storage self, ModifyPositionParams memory params)
internal
returns (BalanceDelta result)
{
Expand Down
2 changes: 1 addition & 1 deletion test/Pool.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ contract PoolTest is Test {
}

params.owner = address(this);
state.modifyPosition(params);
state.modifyLiquidity(params);
}

function testSwap(uint160 sqrtPriceX96, uint24 swapFee, Pool.SwapParams memory params) public {
Expand Down

0 comments on commit f5674e4

Please sign in to comment.