@clonegod/ttd-sol-common 1.1.7 → 1.1.9
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.
|
@@ -490,32 +490,7 @@ class RpcClient {
|
|
|
490
490
|
const { transaction, blockhash, minContextSlot } = yield this.createSmartTransaction(solana_trade_runtime, instructions, signers, lookupTables, sendOptions.feePayer);
|
|
491
491
|
(0, dist_1.log_info)(`>>> createSmartTransaction, end`);
|
|
492
492
|
let txid = (0, get_signature_1.getSignature)(transaction);
|
|
493
|
-
|
|
494
|
-
const commitment = (sendOptions === null || sendOptions === void 0 ? void 0 : sendOptions.preflightCommitment) || 'confirmed';
|
|
495
|
-
const currentBlockHeight = yield solana_trade_runtime.connection.getBlockHeight();
|
|
496
|
-
const lastValidBlockHeight = Math.min(blockhash.lastValidBlockHeight, currentBlockHeight + lastValidBlockHeightOffset);
|
|
497
|
-
let error;
|
|
498
|
-
do {
|
|
499
|
-
try {
|
|
500
|
-
const signature = yield this.connection.sendRawTransaction(transaction.serialize({ verifySignatures: false }), Object.assign({ maxRetries: 3, preflightCommitment: 'confirmed', skipPreflight: sendOptions.skipPreflight, minContextSlot }, sendOptions));
|
|
501
|
-
const abortSignal = AbortSignal.timeout(15000);
|
|
502
|
-
yield this.connection.confirmTransaction({
|
|
503
|
-
abortSignal,
|
|
504
|
-
signature,
|
|
505
|
-
blockhash: blockhash.blockhash,
|
|
506
|
-
lastValidBlockHeight: lastValidBlockHeight,
|
|
507
|
-
}, commitment);
|
|
508
|
-
abortSignal.removeEventListener('abort', () => { });
|
|
509
|
-
return signature;
|
|
510
|
-
}
|
|
511
|
-
catch (_error) {
|
|
512
|
-
if (!(_error instanceof Error))
|
|
513
|
-
error = new Error();
|
|
514
|
-
error = _error;
|
|
515
|
-
}
|
|
516
|
-
} while (!(error instanceof web3_js_1.TransactionExpiredBlockheightExceededError));
|
|
517
|
-
throw new Error('Transaction failed to confirm within lastValidBlockHeight');
|
|
518
|
-
}), 0);
|
|
493
|
+
yield this.connection.sendRawTransaction(transaction.serialize({ verifySignatures: false }), Object.assign({ maxRetries: 3, preflightCommitment: 'confirmed', skipPreflight: sendOptions.skipPreflight, minContextSlot }, sendOptions));
|
|
519
494
|
return txid;
|
|
520
495
|
}
|
|
521
496
|
catch (error) {
|
|
@@ -70,7 +70,7 @@ class HeliusClient {
|
|
|
70
70
|
return __awaiter(this, arguments, void 0, function* (solana_trade_runtime, instructions, use_staked_endpint, addressLookupTableAccounts = []) {
|
|
71
71
|
(0, dist_1.log_info)(`send_smart_transaction, start`);
|
|
72
72
|
let start_time = Date.now();
|
|
73
|
-
let rpc =
|
|
73
|
+
let rpc = this.helius_mainnet.rpc;
|
|
74
74
|
let txid = yield rpc.sendSmartTransaction(solana_trade_runtime, instructions, this.signers, addressLookupTableAccounts, this.sendOptions);
|
|
75
75
|
(0, dist_1.log_info)(`send_smart_transaction, end`, {
|
|
76
76
|
txid,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clonegod/ttd-sol-common",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"push": "npm run build && npm publish"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@clonegod/ttd-common": "1.1.
|
|
16
|
+
"@clonegod/ttd-common": "1.1.49",
|
|
17
17
|
"@metaplex-foundation/mpl-token-metadata": "^2.5.2",
|
|
18
18
|
"@solana/web3.js": "1.91.6",
|
|
19
19
|
"rpc-websockets": "7.10.0",
|