@fileverse-dev/formulajs 4.4.11-mod-68-patch-3 → 4.4.11-mod-68-patch-5

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.
package/lib/cjs/index.cjs CHANGED
@@ -13252,6 +13252,7 @@ function getUrlAndHeaders({ url, serviceName, headers = {} }) {
13252
13252
  }
13253
13253
 
13254
13254
  const fromTimeStampToBlock = async (timestamp, chain, apiKey) => {
13255
+ console.log('fromTimeStampToBlock', timestamp, chain, apiKey);
13255
13256
  if (!timestamp || !chain || !apiKey) return
13256
13257
  const chainId = CHAIN_ID_MAP[chain];
13257
13258
  const url = `https://api.etherscan.io/v2/api?module=block&action=getblocknobytime&timestamp=${timestamp}&closest=before&apikey=${apiKey}&chainId=${chainId}`;
@@ -13260,6 +13261,7 @@ const fromTimeStampToBlock = async (timestamp, chain, apiKey) => {
13260
13261
  method: 'GET',
13261
13262
  headers: HEADERS,
13262
13263
  });
13264
+ console.log('res', res, finalUrl, HEADERS);
13263
13265
  const json = await res.json();
13264
13266
  return parseInt(json.result);
13265
13267
 
@@ -18279,10 +18281,14 @@ async function EOA() {
18279
18281
 
18280
18282
 
18281
18283
  for (const chain of CHAINS) {
18284
+ console.log('chain', chain);
18282
18285
  const chainId = CHAIN_ID_MAP[chain];
18283
18286
  if (!chainId) throw new ValidationError(`Invalid chain: ${chain}`)
18287
+ console.log('chain', chain);
18288
+
18284
18289
 
18285
18290
  if (category === 'balance') {
18291
+ console.log('balance');
18286
18292
  // chunk 20
18287
18293
  for (let i = 0; i < ADDRS.length; i += 20) {
18288
18294
  const slice = ADDRS.slice(i, i + 20).join(',');
@@ -18296,8 +18302,10 @@ async function EOA() {
18296
18302
  }
18297
18303
  } else {
18298
18304
  // txns
18305
+ console.log('startTime', startTime, 'endTime', endTime, chain, apiKey);
18299
18306
  const sb = await fromTimestampToBlock.fromTimeStampToBlock(toTimestamp(startTime), chain, apiKey);
18300
18307
  const eb = await fromTimestampToBlock.fromTimeStampToBlock(toTimestamp(endTime), chain, apiKey);
18308
+ console.log('sb', sb, 'eb', eb);
18301
18309
  if (!sb) throw new ValidationError(`Invalid startTime: ${startTime}`)
18302
18310
  if (!eb) throw new ValidationError(`Invalid endTime: ${endTime}`)
18303
18311
  for (const addr of ADDRS) {
package/lib/esm/index.mjs CHANGED
@@ -13250,6 +13250,7 @@ function getUrlAndHeaders({ url, serviceName, headers = {} }) {
13250
13250
  }
13251
13251
 
13252
13252
  const fromTimeStampToBlock = async (timestamp, chain, apiKey) => {
13253
+ console.log('fromTimeStampToBlock', timestamp, chain, apiKey);
13253
13254
  if (!timestamp || !chain || !apiKey) return
13254
13255
  const chainId = CHAIN_ID_MAP[chain];
13255
13256
  const url = `https://api.etherscan.io/v2/api?module=block&action=getblocknobytime&timestamp=${timestamp}&closest=before&apikey=${apiKey}&chainId=${chainId}`;
@@ -13258,6 +13259,7 @@ const fromTimeStampToBlock = async (timestamp, chain, apiKey) => {
13258
13259
  method: 'GET',
13259
13260
  headers: HEADERS,
13260
13261
  });
13262
+ console.log('res', res, finalUrl, HEADERS);
13261
13263
  const json = await res.json();
13262
13264
  return parseInt(json.result);
13263
13265
 
@@ -18277,10 +18279,14 @@ async function EOA() {
18277
18279
 
18278
18280
 
18279
18281
  for (const chain of CHAINS) {
18282
+ console.log('chain', chain);
18280
18283
  const chainId = CHAIN_ID_MAP[chain];
18281
18284
  if (!chainId) throw new ValidationError(`Invalid chain: ${chain}`)
18285
+ console.log('chain', chain);
18286
+
18282
18287
 
18283
18288
  if (category === 'balance') {
18289
+ console.log('balance');
18284
18290
  // chunk 20
18285
18291
  for (let i = 0; i < ADDRS.length; i += 20) {
18286
18292
  const slice = ADDRS.slice(i, i + 20).join(',');
@@ -18294,8 +18300,10 @@ async function EOA() {
18294
18300
  }
18295
18301
  } else {
18296
18302
  // txns
18303
+ console.log('startTime', startTime, 'endTime', endTime, chain, apiKey);
18297
18304
  const sb = await fromTimestampToBlock.fromTimeStampToBlock(toTimestamp(startTime), chain, apiKey);
18298
18305
  const eb = await fromTimestampToBlock.fromTimeStampToBlock(toTimestamp(endTime), chain, apiKey);
18306
+ console.log('sb', sb, 'eb', eb);
18299
18307
  if (!sb) throw new ValidationError(`Invalid startTime: ${startTime}`)
18300
18308
  if (!eb) throw new ValidationError(`Invalid endTime: ${endTime}`)
18301
18309
  for (const addr of ADDRS) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/formulajs",
3
- "version": "4.4.11-mod-68-patch-3",
3
+ "version": "4.4.11-mod-68-patch-5",
4
4
  "description": "JavaScript implementation of most Microsoft Excel formula functions",
5
5
  "author": "Formulajs",
6
6
  "publishConfig": {