@haven-fi/solauto-sdk 1.0.374 → 1.0.375
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.
@@ -171,14 +171,15 @@ class TransactionsManager {
|
|
171
171
|
let newSet = new TransactionSet(this.txHandler, this.lookupTables, [
|
172
172
|
item,
|
173
173
|
]);
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
174
|
+
for (let j = i; j >= 0; j--) {
|
175
|
+
if (await newSet.fitsWith(items[j])) {
|
176
|
+
newSet.prepend(items[j]);
|
177
|
+
i--;
|
178
|
+
}
|
179
|
+
else {
|
180
|
+
break;
|
181
|
+
}
|
182
|
+
}
|
182
183
|
transactionSets.unshift(newSet);
|
183
184
|
}
|
184
185
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"jitoUtils.d.ts","sourceRoot":"","sources":["../../src/utils/jitoUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAIV,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,MAAM,EACN,kBAAkB,EAClB,GAAG,EAEJ,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAIlE,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,SAAS,CAAC,CAa9D;
|
1
|
+
{"version":3,"file":"jitoUtils.d.ts","sourceRoot":"","sources":["../../src/utils/jitoUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAIV,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,MAAM,EACN,kBAAkB,EAClB,GAAG,EAEJ,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAIlE,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,SAAS,CAAC,CAa9D;AAmKD,wBAAsB,2BAA2B,CAC/C,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,kBAAkB,EAAE,EACzB,MAAM,CAAC,EAAE,kBAAkB,EAC3B,kBAAkB,GAAE,kBAA2C,EAC/D,cAAc,CAAC,EAAE,MAAM,IAAI,GAC1B,OAAO,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAuE/B"}
|
package/dist/utils/jitoUtils.js
CHANGED
@@ -61,7 +61,6 @@ async function simulateJitoBundle(umi, txs) {
|
|
61
61
|
(0, generalUtils_1.consoleLog)(y);
|
62
62
|
});
|
63
63
|
});
|
64
|
-
(0, generalUtils_1.consoleLog)(JSON.stringify(transactionResults, null, 2));
|
65
64
|
const txFailure = res.summary.failed.error.TransactionFailure;
|
66
65
|
throw new Error(txFailure ? txFailure[1] : res.summary.failed.toString());
|
67
66
|
}
|
@@ -140,7 +139,6 @@ async function sendJitoBundledTransactions(umi, signer, txs, txType, priorityFee
|
|
140
139
|
(0, generalUtils_1.consoleLog)("Sending Jito bundle...");
|
141
140
|
(0, generalUtils_1.consoleLog)("Transactions: ", txs.length);
|
142
141
|
(0, generalUtils_1.consoleLog)("Transaction sizes: ", txs.map((x) => x.getTransactionSize(umi)));
|
143
|
-
// consoleLog(txs.map((x) => x.getInstructions().map((x) => x.programId)));
|
144
142
|
txs[0] = txs[0].prepend(await getTipInstruction(signer, 150000));
|
145
143
|
const feeEstimates = priorityFeeSetting !== types_1.PriorityFeeSetting.None
|
146
144
|
? await Promise.all(txs.map(async (x) => (await (0, solanaUtils_1.getComputeUnitPriceEstimate)(umi, x, priorityFeeSetting)) ??
|
package/package.json
CHANGED
@@ -263,14 +263,14 @@ export class TransactionsManager {
|
|
263
263
|
let newSet = new TransactionSet(this.txHandler, this.lookupTables, [
|
264
264
|
item,
|
265
265
|
]);
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
266
|
+
for (let j = i; j >= 0; j--) {
|
267
|
+
if (await newSet.fitsWith(items[j])) {
|
268
|
+
newSet.prepend(items[j]);
|
269
|
+
i--;
|
270
|
+
} else {
|
271
|
+
break;
|
272
|
+
}
|
273
|
+
}
|
274
274
|
transactionSets.unshift(newSet);
|
275
275
|
}
|
276
276
|
}
|
package/src/utils/jitoUtils.ts
CHANGED
@@ -89,7 +89,6 @@ async function simulateJitoBundle(umi: Umi, txs: VersionedTransaction[]) {
|
|
89
89
|
});
|
90
90
|
});
|
91
91
|
|
92
|
-
consoleLog(JSON.stringify(transactionResults, null, 2));
|
93
92
|
const txFailure = res.summary.failed.error.TransactionFailure;
|
94
93
|
throw new Error(txFailure ? txFailure[1] : res.summary.failed.toString());
|
95
94
|
}
|
@@ -213,7 +212,6 @@ export async function sendJitoBundledTransactions(
|
|
213
212
|
"Transaction sizes: ",
|
214
213
|
txs.map((x) => x.getTransactionSize(umi))
|
215
214
|
);
|
216
|
-
// consoleLog(txs.map((x) => x.getInstructions().map((x) => x.programId)));
|
217
215
|
|
218
216
|
txs[0] = txs[0].prepend(await getTipInstruction(signer, 150_000));
|
219
217
|
const feeEstimates =
|