@clonegod/ttd-sol-common 2.0.21 → 2.0.22
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/dist/trade/tx_builder.js
CHANGED
|
@@ -68,12 +68,18 @@ class SolTransactionBuilder {
|
|
|
68
68
|
tipPayer = this.keypair;
|
|
69
69
|
}
|
|
70
70
|
let tipAccount = (0, jito_1.getJitoTipAccount)();
|
|
71
|
-
let
|
|
71
|
+
let tip_lamports = context.trade_runtime.settings.strategy.sol_tip_fee;
|
|
72
|
+
if (tip_lamports < 5000) {
|
|
73
|
+
tip_lamports = 5000;
|
|
74
|
+
}
|
|
75
|
+
if (tip_lamports > 300000) {
|
|
76
|
+
tip_lamports = 300000;
|
|
77
|
+
}
|
|
72
78
|
const jitoTipTx = new web3_js_1.Transaction();
|
|
73
79
|
jitoTipTx.add(web3_js_1.SystemProgram.transfer({
|
|
74
80
|
fromPubkey: tipPayer.publicKey,
|
|
75
81
|
toPubkey: new web3_js_1.PublicKey(tipAccount),
|
|
76
|
-
lamports:
|
|
82
|
+
lamports: tip_lamports,
|
|
77
83
|
}));
|
|
78
84
|
jitoTipTx.recentBlockhash = this.recentBlockhash;
|
|
79
85
|
jitoTipTx.lastValidBlockHeight = this.recentBlockheight + max_block_offset;
|
package/package.json
CHANGED
package/src/trade/tx_builder.ts
CHANGED
|
@@ -120,14 +120,20 @@ export class SolTransactionBuilder {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
let tipAccount = getJitoTipAccount()
|
|
123
|
-
let
|
|
123
|
+
let tip_lamports = context.trade_runtime.settings.strategy.sol_tip_fee
|
|
124
|
+
if(tip_lamports < 5000) {
|
|
125
|
+
tip_lamports = 5000
|
|
126
|
+
}
|
|
127
|
+
if(tip_lamports > 300000) {
|
|
128
|
+
tip_lamports = 300000
|
|
129
|
+
}
|
|
124
130
|
|
|
125
131
|
const jitoTipTx = new Transaction();
|
|
126
132
|
jitoTipTx.add(
|
|
127
133
|
SystemProgram.transfer({
|
|
128
134
|
fromPubkey: tipPayer.publicKey,
|
|
129
135
|
toPubkey: new PublicKey(tipAccount),
|
|
130
|
-
lamports:
|
|
136
|
+
lamports: tip_lamports,
|
|
131
137
|
}),
|
|
132
138
|
);
|
|
133
139
|
jitoTipTx.recentBlockhash = this.recentBlockhash
|