forgex-cli 1.0.31 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -24
- package/dist/bin/forgex.js +1 -1
- package/dist/bin/forgex.js.map +1 -1
- package/dist/src/adapters/jito-adapter.d.ts.map +1 -1
- package/dist/src/adapters/jito-adapter.js +5 -4
- package/dist/src/adapters/jito-adapter.js.map +1 -1
- package/dist/src/adapters/sdk-adapter.d.ts +0 -2
- package/dist/src/adapters/sdk-adapter.d.ts.map +1 -1
- package/dist/src/adapters/sdk-adapter.js +16 -13
- package/dist/src/adapters/sdk-adapter.js.map +1 -1
- package/dist/src/commands/sniper/index.js +1 -1
- package/dist/src/commands/sniper/index.js.map +1 -1
- package/dist/src/commands/token/index.d.ts.map +1 -1
- package/dist/src/commands/token/index.js +0 -4
- package/dist/src/commands/token/index.js.map +1 -1
- package/dist/src/commands/tools/index.d.ts.map +1 -1
- package/dist/src/commands/tools/index.js +2 -2
- package/dist/src/commands/tools/index.js.map +1 -1
- package/dist/src/config.d.ts +2 -14
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +0 -17
- package/dist/src/config.js.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/shims/store.d.ts +1 -13
- package/dist/src/shims/store.d.ts.map +1 -1
- package/dist/src/sol-sdk/batch/create.d.ts +1 -3
- package/dist/src/sol-sdk/batch/create.d.ts.map +1 -1
- package/dist/src/sol-sdk/batch/create.js +6 -16
- package/dist/src/sol-sdk/batch/create.js.map +1 -1
- package/dist/src/sol-sdk/batch/external-sniper.d.ts +2 -6
- package/dist/src/sol-sdk/batch/external-sniper.d.ts.map +1 -1
- package/dist/src/sol-sdk/batch/external-sniper.js +2 -8
- package/dist/src/sol-sdk/batch/external-sniper.js.map +1 -1
- package/dist/src/sol-sdk/batch/index.d.ts +7 -21
- package/dist/src/sol-sdk/batch/index.d.ts.map +1 -1
- package/dist/src/sol-sdk/batch/index.js +6 -47
- package/dist/src/sol-sdk/batch/index.js.map +1 -1
- package/dist/src/sol-sdk/transfer/index.d.ts +1 -2
- package/dist/src/sol-sdk/transfer/index.d.ts.map +1 -1
- package/dist/src/sol-sdk/transfer/index.js +0 -3
- package/dist/src/sol-sdk/transfer/index.js.map +1 -1
- package/dist/src/sol-sdk/turnover/index.d.ts +0 -4
- package/dist/src/sol-sdk/turnover/index.d.ts.map +1 -1
- package/dist/src/sol-sdk/turnover/index.js +17 -25
- package/dist/src/sol-sdk/turnover/index.js.map +1 -1
- package/dist/src/telemetry.d.ts.map +1 -1
- package/dist/src/telemetry.js +3 -1
- package/dist/src/telemetry.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ interface WalletAmount {
|
|
|
9
9
|
privateKey: string;
|
|
10
10
|
amount: string;
|
|
11
11
|
}
|
|
12
|
-
export declare const batchTrade: ({ connection, exchangeName, tokenAddress, poolId, tradeType, slippage, priorityFee, priceInSol, decimals, poolInfo, ammReverseInfo, launchlabReverseInfo, meteoraDLMMReverseInfo,
|
|
12
|
+
export declare const batchTrade: ({ connection, exchangeName, tokenAddress, poolId, tradeType, slippage, priorityFee, priceInSol, decimals, poolInfo, ammReverseInfo, launchlabReverseInfo, meteoraDLMMReverseInfo, creatorAddress, walletAmounts, pumpfunReverseInfo, raydiumV4Keys, raydiumCpmmKeys, volumeType, simulate, }: {
|
|
13
13
|
connection: Connection;
|
|
14
14
|
exchangeName: string;
|
|
15
15
|
tokenAddress: string;
|
|
@@ -24,8 +24,6 @@ export declare const batchTrade: ({ connection, exchangeName, tokenAddress, pool
|
|
|
24
24
|
pumpfunReverseInfo?: PumpfunReverseInfo;
|
|
25
25
|
launchlabReverseInfo?: LaunchlabReverseInfo;
|
|
26
26
|
meteoraDLMMReverseInfo?: MeteoraDLMMReverseInfo;
|
|
27
|
-
commissionWallet: string;
|
|
28
|
-
commissionAmount: string;
|
|
29
27
|
creatorAddress: string;
|
|
30
28
|
walletAmounts: WalletAmount[];
|
|
31
29
|
raydiumV4Keys?: AmmV4Keys;
|
|
@@ -33,7 +31,7 @@ export declare const batchTrade: ({ connection, exchangeName, tokenAddress, pool
|
|
|
33
31
|
volumeType?: VolumeType;
|
|
34
32
|
simulate?: boolean;
|
|
35
33
|
}) => Promise<string[] | undefined>;
|
|
36
|
-
export declare const launchlabBatchTrade: ({ connection, snipers, tokenAddress, poolId, tradeType, slippage, priorityFee, decimals, reverseInfo,
|
|
34
|
+
export declare const launchlabBatchTrade: ({ connection, snipers, tokenAddress, poolId, tradeType, slippage, priorityFee, decimals, reverseInfo, lutAccount, creator, walletAmounts, bundleBuyTime, volumeType, simulate, }: {
|
|
37
35
|
connection: Connection;
|
|
38
36
|
snipers?: Sniper[];
|
|
39
37
|
tokenAddress: string;
|
|
@@ -43,8 +41,6 @@ export declare const launchlabBatchTrade: ({ connection, snipers, tokenAddress,
|
|
|
43
41
|
priorityFee: number;
|
|
44
42
|
decimals: number;
|
|
45
43
|
reverseInfo?: LaunchlabReverseInfo;
|
|
46
|
-
commissionWallet: string;
|
|
47
|
-
commissionAmount: string;
|
|
48
44
|
lutAccount?: AddressLookupTableAccount;
|
|
49
45
|
creator: PublicKey;
|
|
50
46
|
walletAmounts: WalletAmount[];
|
|
@@ -52,7 +48,7 @@ export declare const launchlabBatchTrade: ({ connection, snipers, tokenAddress,
|
|
|
52
48
|
volumeType?: VolumeType;
|
|
53
49
|
simulate?: boolean;
|
|
54
50
|
}) => Promise<string[] | undefined>;
|
|
55
|
-
export declare const pumpswapBatchTrade: ({ connection, poolInfo, tradeType, slippage, priorityFee, decimals, reverseInfo,
|
|
51
|
+
export declare const pumpswapBatchTrade: ({ connection, poolInfo, tradeType, slippage, priorityFee, decimals, reverseInfo, creator, walletAmounts, volumeType, simulate, }: {
|
|
56
52
|
connection: Connection;
|
|
57
53
|
poolInfo: Pair;
|
|
58
54
|
tradeType: "buy" | "sell" | "sniperBuy" | "buyWithSell";
|
|
@@ -60,14 +56,12 @@ export declare const pumpswapBatchTrade: ({ connection, poolInfo, tradeType, sli
|
|
|
60
56
|
priorityFee: number;
|
|
61
57
|
decimals: number;
|
|
62
58
|
reverseInfo?: AmmReverseInfo;
|
|
63
|
-
commissionWallet: string;
|
|
64
|
-
commissionAmount: string;
|
|
65
59
|
creator: PublicKey;
|
|
66
60
|
walletAmounts: WalletAmount[];
|
|
67
61
|
volumeType?: VolumeType;
|
|
68
62
|
simulate?: boolean;
|
|
69
63
|
}) => Promise<any[]>;
|
|
70
|
-
export declare const pumpBatchTrade: ({ connection, walletAmounts, snipers, tokenAddress, poolId, tradeType, slippage, priorityFee, priceInSol, initialPoolData, lutAccount,
|
|
64
|
+
export declare const pumpBatchTrade: ({ connection, walletAmounts, snipers, tokenAddress, poolId, tradeType, slippage, priorityFee, priceInSol, initialPoolData, lutAccount, creator, bundleBuyTime, volumeType, simulate, }: {
|
|
71
65
|
connection: Connection;
|
|
72
66
|
walletAmounts: WalletAmount[];
|
|
73
67
|
snipers?: Sniper[];
|
|
@@ -79,14 +73,12 @@ export declare const pumpBatchTrade: ({ connection, walletAmounts, snipers, toke
|
|
|
79
73
|
priceInSol: string;
|
|
80
74
|
initialPoolData?: PumpfunReverseInfo;
|
|
81
75
|
lutAccount?: AddressLookupTableAccount;
|
|
82
|
-
commissionWallet: string;
|
|
83
|
-
commissionAmount: string;
|
|
84
76
|
creator: PublicKey;
|
|
85
77
|
bundleBuyTime?: BundleBuyTime;
|
|
86
78
|
volumeType?: VolumeType;
|
|
87
79
|
simulate?: boolean;
|
|
88
80
|
}) => Promise<string[] | undefined>;
|
|
89
|
-
export declare const raydiumBatchTrade: ({ connection, tokenAddress, poolId, tradeType, slippage, priorityFee, priceInSol,
|
|
81
|
+
export declare const raydiumBatchTrade: ({ connection, tokenAddress, poolId, tradeType, slippage, priorityFee, priceInSol, walletAmounts, reverseInfo, decimals, raydiumV4Keys, poolInfo, volumeType, simulate, }: {
|
|
90
82
|
connection: Connection;
|
|
91
83
|
tokenAddress: string;
|
|
92
84
|
poolId: string;
|
|
@@ -94,8 +86,6 @@ export declare const raydiumBatchTrade: ({ connection, tokenAddress, poolId, tra
|
|
|
94
86
|
slippage: number;
|
|
95
87
|
priorityFee: number;
|
|
96
88
|
priceInSol: string;
|
|
97
|
-
commissionWallet: string;
|
|
98
|
-
commissionAmount: string;
|
|
99
89
|
walletAmounts: WalletAmount[];
|
|
100
90
|
reverseInfo?: AmmReverseInfo;
|
|
101
91
|
decimals: number;
|
|
@@ -104,7 +94,7 @@ export declare const raydiumBatchTrade: ({ connection, tokenAddress, poolId, tra
|
|
|
104
94
|
volumeType?: VolumeType;
|
|
105
95
|
simulate?: boolean;
|
|
106
96
|
}) => Promise<any[]>;
|
|
107
|
-
export declare const raydiumCpmmBatchTrade: ({ connection, tokenAddress, poolId, tradeType, slippage, priorityFee, priceInSol,
|
|
97
|
+
export declare const raydiumCpmmBatchTrade: ({ connection, tokenAddress, poolId, tradeType, slippage, priorityFee, priceInSol, walletAmounts, reverseInfo, decimals, raydiumCpmmKeys, poolInfo, volumeType, simulate, }: {
|
|
108
98
|
connection: Connection;
|
|
109
99
|
tokenAddress: string;
|
|
110
100
|
poolId: string;
|
|
@@ -112,8 +102,6 @@ export declare const raydiumCpmmBatchTrade: ({ connection, tokenAddress, poolId,
|
|
|
112
102
|
slippage: number;
|
|
113
103
|
priorityFee: number;
|
|
114
104
|
priceInSol: string;
|
|
115
|
-
commissionWallet: string;
|
|
116
|
-
commissionAmount: string;
|
|
117
105
|
walletAmounts: WalletAmount[];
|
|
118
106
|
reverseInfo?: AmmReverseInfo;
|
|
119
107
|
decimals: number;
|
|
@@ -122,7 +110,7 @@ export declare const raydiumCpmmBatchTrade: ({ connection, tokenAddress, poolId,
|
|
|
122
110
|
volumeType?: VolumeType;
|
|
123
111
|
simulate?: boolean;
|
|
124
112
|
}) => Promise<any[]>;
|
|
125
|
-
export declare const meteoraDlmmBatchTrade: ({ connection, tokenAddress, poolId, tradeType, slippage, priorityFee, decimals, reverseInfo,
|
|
113
|
+
export declare const meteoraDlmmBatchTrade: ({ connection, tokenAddress, poolId, tradeType, slippage, priorityFee, decimals, reverseInfo, creator, walletAmounts, bundleBuyTime, volumeType, simulate, }: {
|
|
126
114
|
connection: Connection;
|
|
127
115
|
snipers?: Sniper[];
|
|
128
116
|
tokenAddress: string;
|
|
@@ -132,8 +120,6 @@ export declare const meteoraDlmmBatchTrade: ({ connection, tokenAddress, poolId,
|
|
|
132
120
|
priorityFee: number;
|
|
133
121
|
decimals: number;
|
|
134
122
|
reverseInfo?: MeteoraDLMMReverseInfo;
|
|
135
|
-
commissionWallet: string;
|
|
136
|
-
commissionAmount: string;
|
|
137
123
|
creator: PublicKey;
|
|
138
124
|
walletAmounts: WalletAmount[];
|
|
139
125
|
bundleBuyTime?: BundleBuyTime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sol-sdk/batch/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,SAAS,EAKT,yBAAyB,EAG1B,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sol-sdk/batch/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,SAAS,EAKT,yBAAyB,EAG1B,MAAM,iBAAiB,CAAC;AAgCzB,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AA2BpD,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,YAAY;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,UAAU,GAAU,8RAqB9B;IACD,UAAU,EAAE,UAAU,CAAC;IACvB,YAAY,EAAE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E,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,aAAa,CAAC;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,OAAO,EAAE,SAAS,CAAC;IACnB,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,KAAG,OAAO,CAAC,MAAM,EAAE,GAAG,SAAS,CAyR/B,CAAC"}
|
|
@@ -13,7 +13,6 @@ import { getCU } from '../rpc/index.js';
|
|
|
13
13
|
import { getJitoAdapter } from '../../adapters/jito-adapter.js';
|
|
14
14
|
import { NATIVE_MINT } from '@solana/spl-token';
|
|
15
15
|
import { getWalletAddress, getWalletKeypair } from '../../utils/index.js';
|
|
16
|
-
import { addCommission } from '../transfer/index.js';
|
|
17
16
|
import { BundleBuyTime, VolumeType } from '../../types/index.js';
|
|
18
17
|
import { METEORA_DLMM_PROGRAM } from '../../const/index.js';
|
|
19
18
|
let _MeteoraDLMM = null;
|
|
@@ -47,8 +46,6 @@ poolInfo, // 池子信息
|
|
|
47
46
|
ammReverseInfo = undefined, // 深度信息
|
|
48
47
|
launchlabReverseInfo = undefined, // 深度信息
|
|
49
48
|
meteoraDLMMReverseInfo = undefined, // meteora 池子信息
|
|
50
|
-
commissionWallet, // 佣金钱包
|
|
51
|
-
commissionAmount, // 佣金数量
|
|
52
49
|
creatorAddress, // 创建者地址
|
|
53
50
|
walletAmounts, pumpfunReverseInfo, raydiumV4Keys = undefined, raydiumCpmmKeys = undefined, volumeType = VolumeType.ONE_BUY_ONE_SELL, // 刷量方式
|
|
54
51
|
simulate = false, // 模拟交易
|
|
@@ -72,8 +69,6 @@ simulate = false, // 模拟交易
|
|
|
72
69
|
priorityFee,
|
|
73
70
|
decimals,
|
|
74
71
|
reverseInfo: ammReverseInfo,
|
|
75
|
-
commissionWallet,
|
|
76
|
-
commissionAmount,
|
|
77
72
|
creator: new PublicKey(creatorAddress),
|
|
78
73
|
walletAmounts,
|
|
79
74
|
volumeType,
|
|
@@ -89,8 +84,6 @@ simulate = false, // 模拟交易
|
|
|
89
84
|
slippage,
|
|
90
85
|
priorityFee,
|
|
91
86
|
priceInSol,
|
|
92
|
-
commissionWallet,
|
|
93
|
-
commissionAmount,
|
|
94
87
|
creator: new PublicKey(creatorAddress),
|
|
95
88
|
walletAmounts,
|
|
96
89
|
initialPoolData: pumpfunReverseInfo,
|
|
@@ -109,8 +102,6 @@ simulate = false, // 模拟交易
|
|
|
109
102
|
slippage,
|
|
110
103
|
priorityFee,
|
|
111
104
|
priceInSol,
|
|
112
|
-
commissionWallet,
|
|
113
|
-
commissionAmount,
|
|
114
105
|
walletAmounts,
|
|
115
106
|
decimals,
|
|
116
107
|
reverseInfo: ammReverseInfo,
|
|
@@ -133,8 +124,6 @@ simulate = false, // 模拟交易
|
|
|
133
124
|
slippage,
|
|
134
125
|
priorityFee,
|
|
135
126
|
priceInSol,
|
|
136
|
-
commissionWallet,
|
|
137
|
-
commissionAmount,
|
|
138
127
|
walletAmounts,
|
|
139
128
|
decimals,
|
|
140
129
|
raydiumCpmmKeys,
|
|
@@ -154,8 +143,6 @@ simulate = false, // 模拟交易
|
|
|
154
143
|
priorityFee,
|
|
155
144
|
decimals,
|
|
156
145
|
reverseInfo: launchlabReverseInfo,
|
|
157
|
-
commissionWallet,
|
|
158
|
-
commissionAmount,
|
|
159
146
|
creator: new PublicKey(creatorAddress),
|
|
160
147
|
walletAmounts,
|
|
161
148
|
volumeType,
|
|
@@ -172,8 +159,6 @@ simulate = false, // 模拟交易
|
|
|
172
159
|
priorityFee,
|
|
173
160
|
decimals,
|
|
174
161
|
reverseInfo: meteoraDLMMReverseInfo,
|
|
175
|
-
commissionWallet,
|
|
176
|
-
commissionAmount,
|
|
177
162
|
creator: new PublicKey(creatorAddress),
|
|
178
163
|
walletAmounts,
|
|
179
164
|
volumeType,
|
|
@@ -183,7 +168,7 @@ simulate = false, // 模拟交易
|
|
|
183
168
|
console.log('exchangeName', exchangeName);
|
|
184
169
|
return [];
|
|
185
170
|
};
|
|
186
|
-
export const launchlabBatchTrade = async ({ connection, snipers, tokenAddress, poolId, tradeType, slippage, priorityFee, decimals, reverseInfo,
|
|
171
|
+
export const launchlabBatchTrade = async ({ connection, snipers, tokenAddress, poolId, tradeType, slippage, priorityFee, decimals, reverseInfo, lutAccount, creator, walletAmounts, bundleBuyTime, volumeType = VolumeType.ONE_BUY_ONE_SELL, simulate = false, }) => {
|
|
187
172
|
const provider = new AnchorProvider(connection, {
|
|
188
173
|
publicKey: Keypair.generate().publicKey,
|
|
189
174
|
signTransaction: async () => {
|
|
@@ -249,7 +234,6 @@ export const launchlabBatchTrade = async ({ connection, snipers, tokenAddress, p
|
|
|
249
234
|
// launchlabBuyExactInInstruction already added compute budget and jito tip internally
|
|
250
235
|
const tx = getTx(buyTx, currentPayer, priorityFee);
|
|
251
236
|
// addPriorityFee(tx, cu);
|
|
252
|
-
addCommission(tx, currentPayer, commissionWallet, new BigNumber(currentAmount).times(commissionAmount).toFixed(0));
|
|
253
237
|
const base64Tx = await getBase64Tx({
|
|
254
238
|
tx,
|
|
255
239
|
payer: currentPayer,
|
|
@@ -287,7 +271,6 @@ export const launchlabBatchTrade = async ({ connection, snipers, tokenAddress, p
|
|
|
287
271
|
// launchlabSellExactInInstruction already added compute budget and jito tip internally
|
|
288
272
|
const tx = getTx(sellTx, currentPayer, priorityFee);
|
|
289
273
|
// addPriorityFee(tx, cu);
|
|
290
|
-
addCommission(tx, currentPayer, commissionWallet, new BigNumber(receiveAmount).times(commissionAmount).toFixed(0));
|
|
291
274
|
const base64Tx = await getBase64Tx({
|
|
292
275
|
tx,
|
|
293
276
|
payer: currentPayer,
|
|
@@ -385,7 +368,6 @@ export const launchlabBatchTrade = async ({ connection, snipers, tokenAddress, p
|
|
|
385
368
|
tx.add(sellTx);
|
|
386
369
|
}
|
|
387
370
|
const finalTx = getTx(tx, currentPayer, priorityFee, jito);
|
|
388
|
-
addCommission(finalTx, currentPayer, commissionWallet, new BigNumber(currentAmount).times(commissionAmount).toFixed(0));
|
|
389
371
|
const base64Tx = await getBase64Tx({
|
|
390
372
|
tx: finalTx,
|
|
391
373
|
payer: currentPayer,
|
|
@@ -443,7 +425,6 @@ export const launchlabBatchTrade = async ({ connection, snipers, tokenAddress, p
|
|
|
443
425
|
tipTx.add(jito.getTipInstruction(new PublicKey(getWalletAddress(snipers[0].wallet)), priorityFee));
|
|
444
426
|
txs.push(tipTx);
|
|
445
427
|
signers.push([getWalletKeypair(snipers[0].wallet)]);
|
|
446
|
-
addCommission(txs[txs.length - 1], getWalletKeypair(snipers[0].wallet), commissionWallet, new BigNumber(snipers.length).times(commissionAmount).times(LAMPORTS_PER_SOL).toString(10));
|
|
447
428
|
for (const [index, tx] of txs.entries()) {
|
|
448
429
|
const base64Tx = await getBase64Tx({
|
|
449
430
|
tx,
|
|
@@ -463,7 +444,7 @@ export const launchlabBatchTrade = async ({ connection, snipers, tokenAddress, p
|
|
|
463
444
|
}
|
|
464
445
|
}
|
|
465
446
|
};
|
|
466
|
-
export const pumpswapBatchTrade = async ({ connection, poolInfo, tradeType, slippage, priorityFee, decimals, reverseInfo,
|
|
447
|
+
export const pumpswapBatchTrade = async ({ connection, poolInfo, tradeType, slippage, priorityFee, decimals, reverseInfo, creator, walletAmounts, volumeType = VolumeType.ONE_BUY_ONE_SELL, simulate = false, }) => {
|
|
467
448
|
let info = reverseInfo;
|
|
468
449
|
if (!info) {
|
|
469
450
|
info = await pumpSwapGetPoolInfo(connection, poolInfo.pairAddress);
|
|
@@ -518,10 +499,8 @@ export const pumpswapBatchTrade = async ({ connection, poolInfo, tradeType, slip
|
|
|
518
499
|
}
|
|
519
500
|
let tx = getTx(buyTx, currentPayer, priorityFee, jito);
|
|
520
501
|
if (tradeType === 'sniperBuy' && index === 0) {
|
|
521
|
-
addCommission(tx, currentPayer, commissionWallet, new BigNumber(commissionAmount).times(LAMPORTS_PER_SOL).toFixed(0));
|
|
522
502
|
}
|
|
523
503
|
else {
|
|
524
|
-
addCommission(tx, currentPayer, commissionWallet, new BigNumber(currentAmount).times(commissionAmount).toFixed(0));
|
|
525
504
|
}
|
|
526
505
|
// console.log('tx: ', tx);
|
|
527
506
|
const base64Tx = await getBase64Tx({
|
|
@@ -565,7 +544,6 @@ export const pumpswapBatchTrade = async ({ connection, poolInfo, tradeType, slip
|
|
|
565
544
|
creator,
|
|
566
545
|
});
|
|
567
546
|
let tx = getTx(sellTx, currentPayer, priorityFee, jito);
|
|
568
|
-
addCommission(tx, currentPayer, commissionWallet, new BigNumber(receiveAmount).times(commissionAmount).toFixed(0));
|
|
569
547
|
const base64Tx = await getBase64Tx({
|
|
570
548
|
tx,
|
|
571
549
|
payer: currentPayer,
|
|
@@ -664,7 +642,6 @@ export const pumpswapBatchTrade = async ({ connection, poolInfo, tradeType, slip
|
|
|
664
642
|
tx.add(sellTx);
|
|
665
643
|
}
|
|
666
644
|
let finalTx = getTx(tx, currentPayer, priorityFee, jito, 400_000);
|
|
667
|
-
addCommission(finalTx, currentPayer, commissionWallet, commissionAmount);
|
|
668
645
|
const base64Tx = await getBase64Tx({
|
|
669
646
|
tx: finalTx,
|
|
670
647
|
payer: currentPayer,
|
|
@@ -683,7 +660,7 @@ export const pumpswapBatchTrade = async ({ connection, poolInfo, tradeType, slip
|
|
|
683
660
|
}
|
|
684
661
|
return base64Txs;
|
|
685
662
|
};
|
|
686
|
-
export const pumpBatchTrade = async ({ connection, walletAmounts, snipers, tokenAddress, poolId, tradeType, slippage, priorityFee, priceInSol, initialPoolData, lutAccount,
|
|
663
|
+
export const pumpBatchTrade = async ({ connection, walletAmounts, snipers, tokenAddress, poolId, tradeType, slippage, priorityFee, priceInSol, initialPoolData, lutAccount, creator, bundleBuyTime, volumeType = VolumeType.ONE_BUY_ONE_SELL, simulate = false, }) => {
|
|
687
664
|
const provider = new AnchorProvider(connection, {
|
|
688
665
|
publicKey: Keypair.generate().publicKey,
|
|
689
666
|
signTransaction: async () => {
|
|
@@ -731,8 +708,6 @@ export const pumpBatchTrade = async ({ connection, walletAmounts, snipers, token
|
|
|
731
708
|
continue;
|
|
732
709
|
}
|
|
733
710
|
const [_, buyTx] = await pumpBuySPLInstructions(provider, currentPayer.publicKey, tokenAddress, currentAmount, slippage, new BigNumber(priceInSol).toString(10), creator, receiveAmount.toString());
|
|
734
|
-
// pumpBuySPLInstructions already added everything including compute budget, just add commission
|
|
735
|
-
addCommission(buyTx, currentPayer, commissionWallet, new BigNumber(currentAmount).times(commissionAmount).toFixed(0));
|
|
736
711
|
// 添加 Jito tip(Jito Bundle 必需)
|
|
737
712
|
buyTx.add(jito.getTipInstruction(currentPayer.publicKey, priorityFee));
|
|
738
713
|
const base64Tx = await getBase64Tx({
|
|
@@ -767,8 +742,6 @@ export const pumpBatchTrade = async ({ connection, walletAmounts, snipers, token
|
|
|
767
742
|
continue;
|
|
768
743
|
}
|
|
769
744
|
const sellTx = await pumpSellSPLInstructions(provider, currentPayer, tokenAddress, new BigNumber(currentAmount).toString(10), slippage, receiveAmount, creator);
|
|
770
|
-
// pumpSellSPLInstructions already added everything including compute budget, just add commission
|
|
771
|
-
addCommission(sellTx, currentPayer, commissionWallet, new BigNumber(receiveAmount).times(commissionAmount).toFixed(0));
|
|
772
745
|
// 添加 Jito tip(Jito Bundle 必需)
|
|
773
746
|
sellTx.add(jito.getTipInstruction(currentPayer.publicKey, priorityFee));
|
|
774
747
|
const base64Tx = await getBase64Tx({
|
|
@@ -852,7 +825,6 @@ export const pumpBatchTrade = async ({ connection, walletAmounts, snipers, token
|
|
|
852
825
|
}
|
|
853
826
|
// All instructions already added compute budget and jito tip internally
|
|
854
827
|
const finalTx = getTx(tx, currentPayer, priorityFee);
|
|
855
|
-
addCommission(finalTx, currentPayer, commissionWallet, new BigNumber(currentAmount).times(commissionAmount).toFixed(0));
|
|
856
828
|
const base64Tx = await getBase64Tx({
|
|
857
829
|
tx: finalTx,
|
|
858
830
|
payer: currentPayer,
|
|
@@ -895,10 +867,6 @@ export const pumpBatchTrade = async ({ connection, walletAmounts, snipers, token
|
|
|
895
867
|
txs[txs.length - 1].add(buyTx);
|
|
896
868
|
if (bundleBuyTime === BundleBuyTime.T1_T5 && index === 0) {
|
|
897
869
|
// pumpBuySPLInstructions already added jito tip internally, don't add again
|
|
898
|
-
addCommission(txs[txs.length - 1], currentPayer, commissionWallet, new BigNumber(snipers.length)
|
|
899
|
-
.times(commissionAmount)
|
|
900
|
-
.times(LAMPORTS_PER_SOL)
|
|
901
|
-
.toString(10));
|
|
902
870
|
}
|
|
903
871
|
signers[signers.length - 1].push(currentPayer);
|
|
904
872
|
}
|
|
@@ -921,7 +889,7 @@ export const pumpBatchTrade = async ({ connection, walletAmounts, snipers, token
|
|
|
921
889
|
}
|
|
922
890
|
}
|
|
923
891
|
};
|
|
924
|
-
export const raydiumBatchTrade = async ({ connection, tokenAddress, poolId, tradeType, slippage, priorityFee, priceInSol,
|
|
892
|
+
export const raydiumBatchTrade = async ({ connection, tokenAddress, poolId, tradeType, slippage, priorityFee, priceInSol, walletAmounts, reverseInfo, decimals, raydiumV4Keys, poolInfo, volumeType = VolumeType.ONE_BUY_ONE_SELL, simulate = false, }) => {
|
|
925
893
|
let info = reverseInfo;
|
|
926
894
|
if (!info) {
|
|
927
895
|
const { poolBaseTokenInfo, poolQuoteTokenInfo } = await raydiumGetPoolInfo(connection, poolId);
|
|
@@ -973,7 +941,6 @@ export const raydiumBatchTrade = async ({ connection, tokenAddress, poolId, trad
|
|
|
973
941
|
minAmountOut: new BigNumber(receiveAmount).times(1 - slippage).toFixed(0),
|
|
974
942
|
});
|
|
975
943
|
let tx = getTx(buyTx, currentPayer, priorityFee, jito);
|
|
976
|
-
addCommission(tx, currentPayer, commissionWallet, new BigNumber(currentAmount).times(commissionAmount).toFixed(0));
|
|
977
944
|
// console.log('tx: ', tx);
|
|
978
945
|
const base64Tx = await getBase64Tx({
|
|
979
946
|
tx,
|
|
@@ -1010,7 +977,6 @@ export const raydiumBatchTrade = async ({ connection, tokenAddress, poolId, trad
|
|
|
1010
977
|
minAmountOut: new BigNumber(receiveAmount).times(1 - slippage).toFixed(0),
|
|
1011
978
|
});
|
|
1012
979
|
let tx = getTx(sellTx, currentPayer, priorityFee, jito);
|
|
1013
|
-
addCommission(tx, currentPayer, commissionWallet, new BigNumber(receiveAmount).times(commissionAmount).toFixed(0));
|
|
1014
980
|
const base64Tx = await getBase64Tx({
|
|
1015
981
|
tx,
|
|
1016
982
|
payer: currentPayer,
|
|
@@ -1099,7 +1065,6 @@ export const raydiumBatchTrade = async ({ connection, tokenAddress, poolId, trad
|
|
|
1099
1065
|
tx.add(sellTx);
|
|
1100
1066
|
}
|
|
1101
1067
|
let finalTx = getTx(tx, currentPayer, priorityFee, jito);
|
|
1102
|
-
addCommission(finalTx, currentPayer, commissionWallet, new BigNumber(currentAmount).times(commissionAmount).toFixed(0));
|
|
1103
1068
|
const base64Tx = await getBase64Tx({
|
|
1104
1069
|
tx: finalTx,
|
|
1105
1070
|
payer: currentPayer,
|
|
@@ -1118,7 +1083,7 @@ export const raydiumBatchTrade = async ({ connection, tokenAddress, poolId, trad
|
|
|
1118
1083
|
}
|
|
1119
1084
|
return base64Txs;
|
|
1120
1085
|
};
|
|
1121
|
-
export const raydiumCpmmBatchTrade = async ({ connection, tokenAddress, poolId, tradeType, slippage, priorityFee, priceInSol,
|
|
1086
|
+
export const raydiumCpmmBatchTrade = async ({ connection, tokenAddress, poolId, tradeType, slippage, priorityFee, priceInSol, walletAmounts, reverseInfo, decimals, raydiumCpmmKeys, poolInfo, volumeType = VolumeType.ONE_BUY_ONE_SELL, simulate = false, }) => {
|
|
1122
1087
|
let info = reverseInfo;
|
|
1123
1088
|
if (!info) {
|
|
1124
1089
|
const { poolBaseTokenInfo, poolQuoteTokenInfo } = await raydiumGetCpmmPoolInfo(connection, poolId);
|
|
@@ -1173,7 +1138,6 @@ export const raydiumCpmmBatchTrade = async ({ connection, tokenAddress, poolId,
|
|
|
1173
1138
|
needCloseTokenAccount: true,
|
|
1174
1139
|
});
|
|
1175
1140
|
let tx = getTx(buyTx, currentPayer, priorityFee, jito);
|
|
1176
|
-
addCommission(tx, currentPayer, commissionWallet, new BigNumber(currentAmount).times(commissionAmount).toFixed(0));
|
|
1177
1141
|
// console.log('tx: ', tx);
|
|
1178
1142
|
const base64Tx = await getBase64Tx({
|
|
1179
1143
|
tx,
|
|
@@ -1215,7 +1179,6 @@ export const raydiumCpmmBatchTrade = async ({ connection, tokenAddress, poolId,
|
|
|
1215
1179
|
needCloseWsolAccount: true,
|
|
1216
1180
|
});
|
|
1217
1181
|
let tx = getTx(sellTx, currentPayer, priorityFee, jito);
|
|
1218
|
-
addCommission(tx, currentPayer, commissionWallet, new BigNumber(receiveAmount).times(commissionAmount).toFixed(0));
|
|
1219
1182
|
const base64Tx = await getBase64Tx({
|
|
1220
1183
|
tx,
|
|
1221
1184
|
payer: currentPayer,
|
|
@@ -1306,7 +1269,6 @@ export const raydiumCpmmBatchTrade = async ({ connection, tokenAddress, poolId,
|
|
|
1306
1269
|
tx.add(sellTx);
|
|
1307
1270
|
}
|
|
1308
1271
|
let finalTx = getTx(tx, currentPayer, priorityFee, jito);
|
|
1309
|
-
addCommission(finalTx, currentPayer, commissionWallet, commissionAmount);
|
|
1310
1272
|
const base64Tx = await getBase64Tx({
|
|
1311
1273
|
tx: finalTx,
|
|
1312
1274
|
payer: currentPayer,
|
|
@@ -1342,7 +1304,7 @@ const getVolumeTypeConfig = (volumeType) => {
|
|
|
1342
1304
|
return { buyCount: 1, sellCount: 1 };
|
|
1343
1305
|
}
|
|
1344
1306
|
};
|
|
1345
|
-
export const meteoraDlmmBatchTrade = async ({ connection, tokenAddress, poolId, tradeType, slippage, priorityFee, decimals, reverseInfo,
|
|
1307
|
+
export const meteoraDlmmBatchTrade = async ({ connection, tokenAddress, poolId, tradeType, slippage, priorityFee, decimals, reverseInfo, creator, walletAmounts, bundleBuyTime, volumeType = VolumeType.ONE_BUY_ONE_SELL, simulate = false, }) => {
|
|
1346
1308
|
const provider = new AnchorProvider(connection, {
|
|
1347
1309
|
publicKey: Keypair.generate().publicKey,
|
|
1348
1310
|
signTransaction: async () => {
|
|
@@ -1398,7 +1360,6 @@ export const meteoraDlmmBatchTrade = async ({ connection, tokenAddress, poolId,
|
|
|
1398
1360
|
binArraysPubkey: swapQuote.binArraysPubkey,
|
|
1399
1361
|
});
|
|
1400
1362
|
const tx = getTx(buyTx, currentPayer, priorityFee, jito);
|
|
1401
|
-
addCommission(tx, currentPayer, commissionWallet, new BigNumber(currentAmount).times(commissionAmount).toFixed(0));
|
|
1402
1363
|
const base64Tx = await getBase64Tx({
|
|
1403
1364
|
tx,
|
|
1404
1365
|
payer: currentPayer,
|
|
@@ -1441,7 +1402,6 @@ export const meteoraDlmmBatchTrade = async ({ connection, tokenAddress, poolId,
|
|
|
1441
1402
|
binArraysPubkey: swapQuote.binArraysPubkey,
|
|
1442
1403
|
});
|
|
1443
1404
|
const tx = getTx(sellTx, currentPayer, priorityFee, jito);
|
|
1444
|
-
addCommission(tx, currentPayer, commissionWallet, new BigNumber(swapQuote2.minOutAmount.toString()).times(commissionAmount).toFixed(0));
|
|
1445
1405
|
const base64Tx = await getBase64Tx({
|
|
1446
1406
|
tx,
|
|
1447
1407
|
payer: currentPayer,
|
|
@@ -1549,7 +1509,6 @@ export const meteoraDlmmBatchTrade = async ({ connection, tokenAddress, poolId,
|
|
|
1549
1509
|
tx.add(...sellTx.instructions);
|
|
1550
1510
|
}
|
|
1551
1511
|
const finalTx = getTx(tx, currentPayer, priorityFee, jito);
|
|
1552
|
-
addCommission(finalTx, currentPayer, commissionWallet, new BigNumber(currentAmount).times(commissionAmount).toFixed(0));
|
|
1553
1512
|
const base64Tx = await getBase64Tx({
|
|
1554
1513
|
tx: finalTx,
|
|
1555
1514
|
payer: currentPayer,
|