@clonegod/ttd-sol-common 1.0.26 → 1.0.28
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
|
});
|
package/dist/strategy_util.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TradeRuntimeType, TradeStrategyType } from "@clonegod/ttd-common";
|
|
1
|
+
import { StandardPoolInfoType, TradeRuntimeType, TradeStrategyType } from "@clonegod/ttd-common";
|
|
2
2
|
import { JitoRegion } from "./helius_sdk_v1.4.0";
|
|
3
3
|
import { SolanaTradeRuntimeType } from "./context";
|
|
4
4
|
import { Connection } from "@solana/web3.js";
|
|
5
|
-
export declare function create_solana_trade_runtime(trade_runtime: TradeRuntimeType,
|
|
5
|
+
export declare function create_solana_trade_runtime(connection: Connection, trade_runtime: TradeRuntimeType, pool_info: StandardPoolInfoType): SolanaTradeRuntimeType;
|
|
6
6
|
export declare function calculate_gas_fee(trade_strategy: TradeStrategyType): number;
|
|
7
7
|
export declare function get_jito_region(): JitoRegion;
|
package/dist/strategy_util.js
CHANGED
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.get_jito_region = exports.calculate_gas_fee = exports.create_solana_trade_runtime = void 0;
|
|
4
4
|
const dist_1 = require("@clonegod/ttd-common/dist");
|
|
5
5
|
const constants_1 = require("./constants");
|
|
6
|
-
function create_solana_trade_runtime(trade_runtime,
|
|
6
|
+
function create_solana_trade_runtime(connection, trade_runtime, pool_info) {
|
|
7
7
|
let trade_strategy = trade_runtime.settings.strategy;
|
|
8
|
-
let { cu_limit } =
|
|
8
|
+
let { cu_limit } = pool_info;
|
|
9
9
|
if (isNaN(cu_limit) || cu_limit < 50000) {
|
|
10
10
|
cu_limit = 50000;
|
|
11
11
|
}
|