@clonegod/ttd-core 2.0.89 → 2.0.91

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.
@@ -18,6 +18,7 @@ const axios_1 = __importDefault(require("axios"));
18
18
  const index_1 = require("../../index");
19
19
  const gecko_terminal_1 = require("./gecko_terminal");
20
20
  const price_cache_1 = require("./price_cache");
21
+ const defi_llama_1 = require("./defi_llama");
21
22
  function get_eth_token_price_info(evm_chain_info, addresses) {
22
23
  return __awaiter(this, void 0, void 0, function* () {
23
24
  addresses = addresses.map(addr => addr.toLowerCase());
@@ -30,8 +31,8 @@ function get_eth_token_price_info(evm_chain_info, addresses) {
30
31
  batchDelay: 1000,
31
32
  },
32
33
  {
33
- name: 'Uniswap',
34
- fetchFn: (address_list) => fetchPriceFromUniSwap(evm_chain_info.chain_full_name, address_list),
34
+ name: 'DefiLlama',
35
+ fetchFn: (address_list) => (0, defi_llama_1.fetchPriceFromDefiLlama)(evm_chain_info.chain_short_name, address_list),
35
36
  batchSize: 10,
36
37
  batchDelay: 1000,
37
38
  },
@@ -39,7 +40,13 @@ function get_eth_token_price_info(evm_chain_info, addresses) {
39
40
  name: 'GeckoTerminal',
40
41
  fetchFn: (address_list) => (0, gecko_terminal_1.fetchPriceFromGeckoTerminal)(evm_chain_info.chain_short_name, address_list),
41
42
  batchSize: 10,
42
- batchDelay: 2000,
43
+ batchDelay: 1000,
44
+ },
45
+ {
46
+ name: 'Uniswap',
47
+ fetchFn: (address_list) => fetchPriceFromUniSwap(evm_chain_info.chain_full_name, address_list),
48
+ batchSize: 10,
49
+ batchDelay: 1000,
43
50
  },
44
51
  ];
45
52
  try {
@@ -43,7 +43,7 @@ function get_sui_token_price_info(addresses) {
43
43
  for (const channel of PRICE_CHANNELS) {
44
44
  if (addresses.length === 0)
45
45
  break;
46
- (0, index_1.log_debug)(`[get_token_price_info] Processing ${addresses.length} tokens using ${channel.name}`);
46
+ (0, index_1.log_info)(`[get_token_price_info] Processing ${addresses.length} tokens using ${channel.name}`);
47
47
  const batches = (0, index_1.chunkArray)(addresses, channel.batchSize);
48
48
  (0, index_1.log_debug)(`[get_token_price_info] Split into ${batches.length} batches of size ${channel.batchSize}`);
49
49
  let remainingAddresses = [...addresses];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-core",
3
- "version": "2.0.89",
3
+ "version": "2.0.91",
4
4
  "description": "Common types and utilities for trading systems - use `npm run push` to publish",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",