@clonegod/ttd-sol-common 1.0.27 → 1.0.30
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.
|
@@ -408,6 +408,9 @@ class RpcClient {
|
|
|
408
408
|
}
|
|
409
409
|
}), 0);
|
|
410
410
|
let priorityFeeEstimate = solana_trade_runtime.cu_price;
|
|
411
|
+
if (solana_trade_runtime.settings.strategy.broadcast_type === 'jito') {
|
|
412
|
+
priorityFeeEstimate = 1;
|
|
413
|
+
}
|
|
411
414
|
const computeBudgetIx = web3_js_1.ComputeBudgetProgram.setComputeUnitPrice({
|
|
412
415
|
microLamports: priorityFeeEstimate,
|
|
413
416
|
});
|
|
@@ -420,8 +423,7 @@ class RpcClient {
|
|
|
420
423
|
throw new Error(`Error fetching compute units for the instructions provided`);
|
|
421
424
|
}
|
|
422
425
|
}), 0);
|
|
423
|
-
|
|
424
|
-
const customersCU = units < 1000 ? 1000 : Math.ceil(units * 1.1);
|
|
426
|
+
const customersCU = Math.ceil(solana_trade_runtime.cu_limit);
|
|
425
427
|
const computeUnitsIx = web3_js_1.ComputeBudgetProgram.setComputeUnitLimit({
|
|
426
428
|
units: customersCU,
|
|
427
429
|
});
|
package/dist/strategy_util.js
CHANGED