Skip to content

Commit

Permalink
add cpmm close wsol option
Browse files Browse the repository at this point in the history
  • Loading branch information
rudy5348 committed Feb 12, 2025
1 parent 4d47dc3 commit b331cfb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Raydium SDK V2 demo.",
"license": "GPL-3.0",
"dependencies": {
"@raydium-io/raydium-sdk-v2": "0.1.111-alpha",
"@raydium-io/raydium-sdk-v2": "0.1.113-alpha",
"@solana/spl-token": "^0.4.6",
"@solana/web3.js": "^1.95.3",
"@triton-one/yellowstone-grpc": "^1.2.0",
Expand Down
3 changes: 3 additions & 0 deletions src/cpmm/harvestLockLiquidity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export const harvestLockLiquidity = async () => {
nftMint: new PublicKey('CgkdQL6eRN1nxG2AmC8NFG5iboXuKtSjT4pShnspomZy'), // locked nft mint
lpFeeAmount: new BN(99999999),
txVersion,

// closeWsol: false, // default if true, if you want use wsol, you need set false

// optional: add transfer sol to tip account instruction. e.g sent tip to jito
// txTipConfig: {
// address: new PublicKey('96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5'),
Expand Down
3 changes: 3 additions & 0 deletions src/cpmm/withdraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export const withdraw = async () => {
lpAmount,
txVersion,
slippage,

// closeWsol: false, // default if true, if you want use wsol, you need set false

// optional: set up priority fee here
// computeBudgetConfig: {
// units: 600000,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,10 @@
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==

"@raydium-io/[email protected].111-alpha":
version "0.1.111-alpha"
resolved "https://registry.yarnpkg.com/@raydium-io/raydium-sdk-v2/-/raydium-sdk-v2-0.1.111-alpha.tgz#622fd832ffacdc0dc9b6c4b9f70b7412ca986753"
integrity sha512-mIvwClYgiBgKsYWgM6sFWXpwxYeWhXvZpSOPA6+o0xuRSEBo2hmpuy98DdWOkSZwoUUg1oTKSdRGepBwtpZqQw==
"@raydium-io/[email protected].113-alpha":
version "0.1.113-alpha"
resolved "https://registry.yarnpkg.com/@raydium-io/raydium-sdk-v2/-/raydium-sdk-v2-0.1.113-alpha.tgz#c7f7afd5bc8653b2023b6bd4689a19a918cca9b1"
integrity sha512-IS41t4gar6NXva7EMw4q0QmPHhWg1hxNRffYd49YdVYeDcfPEyyG7RYkpWm6fp0FdkdyAfYo0XjV8DcFlgXVDw==
dependencies:
"@solana/buffer-layout" "^4.0.1"
"@solana/spl-token" "^0.4.8"
Expand Down

0 comments on commit b331cfb

Please sign in to comment.