Skip to content

Commit 536f60f

Browse files
committed
feat: update readme with removeLiquidity & update package version
1 parent bb01259 commit 536f60f

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Full API documentation with TypeDoc: [https://bootnodedev.github.io/uni-dev-kit]
7575
- [`buildSwapCallData`](#buildswapcalldata)
7676
- [`buildAddLiquidityCallData`](#buildaddliquiditycalldata)
7777
- [`preparePermit2BatchCallData`](#preparepermit2batchcalldata)
78+
- [`buildRemoveLiquidityCallData`](#buildremoveliquiditycalldata)
7879
- [Basis Points Reference](#basis-points-reference)
7980
- [Useful Links](#useful-links)
8081
- [Development](#development)
@@ -214,6 +215,22 @@ const permitData = await uniDevKit.preparePermit2BatchCallData({
214215
});
215216
```
216217

218+
### `buildRemoveLiquidityCallData`
219+
Build calldata to remove liquidity from a pool.
220+
```ts
221+
const { calldata, value } = await uniDevKit.buildRemoveLiquidityCallData({
222+
liquidityPercentage: 10_000, // 100%
223+
tokenId: '123',
224+
slippageTolerance: 50, // 0.5%
225+
});
226+
227+
const tx = await sendTransaction({
228+
to: uniDevKit.getContractAddress('positionManager'),
229+
data: calldata,
230+
value
231+
});
232+
```
233+
217234
#### Basis Points Reference
218235

219236
Throughout the library, percentages are represented in basis points (bps). For example, when setting a slippage tolerance of 0.5%, you would use `50` bps. Here's a quick reference:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uniswap-dev-kit",
3-
"version": "1.0.11",
3+
"version": "1.0.12",
44
"description": "A modern TypeScript library for integrating Uniswap into your dapp.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)