@clonegod/ttd-sol-common 1.0.147 → 1.0.149
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.
|
@@ -368,7 +368,7 @@ class RpcClient {
|
|
|
368
368
|
}
|
|
369
369
|
(0, dist_1.log_info)(`>>> getLatestBlockhashAndContext, start`);
|
|
370
370
|
const payerKey = feePayer ? feePayer.publicKey : signers[0].publicKey;
|
|
371
|
-
let { context: { slot: minContextSlot }, value: blockhash, } = yield this.get_last_blockhash_slot([
|
|
371
|
+
let { context: { slot: minContextSlot }, value: blockhash, } = yield this.get_last_blockhash_slot([solana_trade_runtime.connection, this.connection]);
|
|
372
372
|
(0, dist_1.log_info)(`>>> getLatestBlockhashAndContext, end`);
|
|
373
373
|
const recentBlockhash = blockhash.blockhash;
|
|
374
374
|
const isVersioned = lookupTables.length > 0;
|
|
@@ -762,11 +762,15 @@ class RpcClient {
|
|
|
762
762
|
(0, dist_1.log_error)('get_last_blockhash_slot, from redis', err);
|
|
763
763
|
}
|
|
764
764
|
if (!last_blockhash_slot) {
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
765
|
+
for (let c of connections) {
|
|
766
|
+
try {
|
|
767
|
+
(0, dist_1.log_info)(`get_last_blockhash_slot, rpc_endpoint=${c.rpcEndpoint}`);
|
|
768
|
+
last_blockhash_slot = yield c.getLatestBlockhashAndContext();
|
|
769
|
+
break;
|
|
770
|
+
}
|
|
771
|
+
catch (err) {
|
|
772
|
+
(0, dist_1.log_error)('get_last_blockhash_slot, fetch by connection', err);
|
|
773
|
+
}
|
|
770
774
|
}
|
|
771
775
|
}
|
|
772
776
|
return last_blockhash_slot;
|
|
@@ -21,7 +21,7 @@ class HeliusClient {
|
|
|
21
21
|
skipPreflight: true,
|
|
22
22
|
maxRetries: 3
|
|
23
23
|
};
|
|
24
|
-
let helius_api_key = process.env.HELIUS_API_KEY;
|
|
24
|
+
let helius_api_key = process.env.HELIUS_API_KEY || '';
|
|
25
25
|
let helius_mainnet_endpoint = `https://mainnet.helius-rpc.com/?api-key=${helius_api_key}`;
|
|
26
26
|
let helius_staked_endpoint = `https://staked.helius-rpc.com?api-key=${helius_api_key}`;
|
|
27
27
|
this.helius_mainnet = new helius_sdk_v1_4_0_1.Helius('', this.cluster, 'helius-sdk', helius_mainnet_endpoint);
|
|
@@ -143,7 +143,3 @@ const get_token_price_info_from_coingecko = (mints) => __awaiter(void 0, void 0,
|
|
|
143
143
|
return price_map;
|
|
144
144
|
});
|
|
145
145
|
exports.get_token_price_info_from_coingecko = get_token_price_info_from_coingecko;
|
|
146
|
-
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
147
|
-
const price_data = yield (0, exports.get_token_price_info_from_coingecko)(['So11111111111111111111111111111111111111112', '61V8vBaqAGMpgDQi4JcAwo1dmBGHsyhzodcPqnEVpump']);
|
|
148
|
-
console.log('price_data', price_data);
|
|
149
|
-
}))();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clonegod/ttd-sol-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.149",
|
|
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.0.
|
|
16
|
+
"@clonegod/ttd-common": "^1.0.193",
|
|
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",
|