@indexing/jiti 0.1.15 → 0.1.17
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/dist/main.js +23 -11
- package/dist/main.js.map +1 -1
- package/dist/module.js +22 -11
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/module.js
CHANGED
|
@@ -1158,7 +1158,10 @@ const $5ec62a2088d070a8$export$5beebc5708fabf3c = {
|
|
|
1158
1158
|
for (const tx of typedBlock.transactions || []){
|
|
1159
1159
|
if (!tx.receipt) continue;
|
|
1160
1160
|
const timestamp = new Date(typedBlock.timestamp * 1000).toISOString();
|
|
1161
|
-
|
|
1161
|
+
// Some EVM forks (e.g. Cronos / Ethermint) omit effectiveGasPrice on the receipt;
|
|
1162
|
+
// fall back to the tx's gasPrice so gas-fee math doesn't throw and drop the whole block.
|
|
1163
|
+
const effectiveGasPrice = tx.receipt.effectiveGasPrice ?? tx.gasPrice ?? 0;
|
|
1164
|
+
const transactionGasFee = BigInt(tx.receipt.gasUsed ?? 0) * BigInt(effectiveGasPrice);
|
|
1162
1165
|
// check if this tx has zkSync native ETH Transfer logs (used to skip unreliable traces)
|
|
1163
1166
|
const hasZkSyncEthLogs = tx.receipt.logs.some((log)=>log.address.toLowerCase() === $5ec62a2088d070a8$var$ZKSYNC_NATIVE_ETH);
|
|
1164
1167
|
// track direct ETH transfers
|
|
@@ -1548,19 +1551,25 @@ async function $692184cb0ed76c37$export$59c69e19e33761f6(storage, namespace, key
|
|
|
1548
1551
|
|
|
1549
1552
|
|
|
1550
1553
|
|
|
1554
|
+
// Per-network RPC host registry. A jiti consumer injects the hosts a resolver should use for a
|
|
1555
|
+
// given chain — e.g. the indexer points the TON jetton resolver at the same hosts oscar uses
|
|
1556
|
+
// (BlockPi/QuickNode from network_connections) so jiti avoids Orbs's per-IP rate limit on the
|
|
1557
|
+
// oscar box. Generic so future resolvers (other chains) reuse it. Empty for a network ⇒ the
|
|
1558
|
+
// resolver falls back to its built-in default (e.g. Orbs discovery for TON).
|
|
1559
|
+
const $fd51662490d4092f$var$rpcHostsByNetwork = new Map();
|
|
1560
|
+
function $fd51662490d4092f$export$7559df4097bd05d7(network, hosts) {
|
|
1561
|
+
$fd51662490d4092f$var$rpcHostsByNetwork.set(network.toUpperCase(), (hosts || []).filter(Boolean));
|
|
1562
|
+
}
|
|
1563
|
+
function $fd51662490d4092f$export$62908ad6afd56388(network) {
|
|
1564
|
+
return $fd51662490d4092f$var$rpcHostsByNetwork.get(network.toUpperCase()) ?? [];
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
|
|
1551
1568
|
const $cfe9a1176e32c0c3$export$a0a0f70252f1386f = "ton-jetton-wallet";
|
|
1552
1569
|
const $cfe9a1176e32c0c3$var$ORBS_MANAGER_URL = "https://ton.access.orbs.network/mngr/nodes";
|
|
1553
1570
|
const $cfe9a1176e32c0c3$var$ORBS_REFRESH_MS = 300000;
|
|
1554
1571
|
let $cfe9a1176e32c0c3$var$orbsHosts = [];
|
|
1555
1572
|
let $cfe9a1176e32c0c3$var$orbsRefreshedAt = 0;
|
|
1556
|
-
// Consumer-injected TON RPC hosts (toncenter v2 jsonRPC-compatible base hosts). When set, the
|
|
1557
|
-
// resolver uses THESE instead of Orbs discovery — e.g. the indexer injects oscar's configured
|
|
1558
|
-
// TON hosts (BlockPi/QuickNode from network_connections) so jiti hits the same hosts oscar uses
|
|
1559
|
-
// and avoids Orbs's per-IP rate limit on the oscar box. Empty ⇒ fall back to Orbs discovery.
|
|
1560
|
-
let $cfe9a1176e32c0c3$var$configuredHosts = [];
|
|
1561
|
-
function $cfe9a1176e32c0c3$export$c9db54a59e1b6652(hosts) {
|
|
1562
|
-
$cfe9a1176e32c0c3$var$configuredHosts = (hosts || []).filter(Boolean);
|
|
1563
|
-
}
|
|
1564
1573
|
function $cfe9a1176e32c0c3$var$shuffled(hosts) {
|
|
1565
1574
|
const a = [
|
|
1566
1575
|
...hosts
|
|
@@ -1580,7 +1589,8 @@ function $cfe9a1176e32c0c3$var$buildUrl(host) {
|
|
|
1580
1589
|
return host.endsWith("/jsonRPC") ? host : `${host.replace(/\/$/, "")}/jsonRPC`;
|
|
1581
1590
|
}
|
|
1582
1591
|
async function $cfe9a1176e32c0c3$var$getHosts() {
|
|
1583
|
-
|
|
1592
|
+
const configured = (0, $fd51662490d4092f$export$62908ad6afd56388)("TON");
|
|
1593
|
+
if (configured.length) return $cfe9a1176e32c0c3$var$shuffled(configured).map($cfe9a1176e32c0c3$var$buildUrl);
|
|
1584
1594
|
if ($cfe9a1176e32c0c3$var$orbsHosts.length && Date.now() - $cfe9a1176e32c0c3$var$orbsRefreshedAt < $cfe9a1176e32c0c3$var$ORBS_REFRESH_MS) return $cfe9a1176e32c0c3$var$shuffled($cfe9a1176e32c0c3$var$orbsHosts);
|
|
1585
1595
|
try {
|
|
1586
1596
|
const resp = await fetch($cfe9a1176e32c0c3$var$ORBS_MANAGER_URL, {
|
|
@@ -11948,6 +11958,7 @@ $parcel$exportWildcard($a4e0e4b4a62175c4$exports, $e64a550a52a9d690$exports);
|
|
|
11948
11958
|
|
|
11949
11959
|
var $cP1H0 = parcelRequire("cP1H0");
|
|
11950
11960
|
|
|
11961
|
+
|
|
11951
11962
|
const $149c1bd638913645$export$eab97d15b1788b8d = {
|
|
11952
11963
|
...$fde9406d76ec24a9$exports
|
|
11953
11964
|
};
|
|
@@ -11963,5 +11974,5 @@ function $149c1bd638913645$export$a07bfd14bbc36e4b(key) {
|
|
|
11963
11974
|
|
|
11964
11975
|
|
|
11965
11976
|
var createPostgresCacheStorage = parcelRequire("cP1H0").createPostgresCacheStorage;
|
|
11966
|
-
export {$149c1bd638913645$export$eab97d15b1788b8d as utils, $149c1bd638913645$export$a8fc3402335b0b04 as templates, $149c1bd638913645$export$cceb5167b935aafb as getAllTemplates, $149c1bd638913645$export$a07bfd14bbc36e4b as getTemplateByKey, $692184cb0ed76c37$export$2aca74ef9665e35d as cacheGet, $692184cb0ed76c37$export$59c69e19e33761f6 as cacheSet, $caa0db003a346aa2$export$2b845901f37b4099 as registerCacheNamespace, createPostgresCacheStorage as createPostgresCacheStorage, $cfe9a1176e32c0c3$export$77ffdf974cb300ec as lookupJettonWallet, $cfe9a1176e32c0c3$export$cef9e9799d863462 as resolveJettonWalletData, $cfe9a1176e32c0c3$export$
|
|
11977
|
+
export {$149c1bd638913645$export$eab97d15b1788b8d as utils, $149c1bd638913645$export$a8fc3402335b0b04 as templates, $149c1bd638913645$export$cceb5167b935aafb as getAllTemplates, $149c1bd638913645$export$a07bfd14bbc36e4b as getTemplateByKey, $692184cb0ed76c37$export$2aca74ef9665e35d as cacheGet, $692184cb0ed76c37$export$59c69e19e33761f6 as cacheSet, $caa0db003a346aa2$export$2b845901f37b4099 as registerCacheNamespace, createPostgresCacheStorage as createPostgresCacheStorage, $cfe9a1176e32c0c3$export$77ffdf974cb300ec as lookupJettonWallet, $cfe9a1176e32c0c3$export$cef9e9799d863462 as resolveJettonWalletData, $cfe9a1176e32c0c3$export$a0a0f70252f1386f as TON_JETTON_NAMESPACE, $fd51662490d4092f$export$7559df4097bd05d7 as setRpcHosts, $fd51662490d4092f$export$62908ad6afd56388 as getRpcHosts};
|
|
11967
11978
|
//# sourceMappingURL=module.js.map
|