@ensnode/ensnode-sdk 0.0.0-next-20260512160721 → 0.0.0-next-20260513173423
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/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -4665,7 +4665,7 @@ declare const uniq: <T>(arr: T[]) => T[];
|
|
|
4665
4665
|
*
|
|
4666
4666
|
* Useful for presenting a clear view of the indexed blockranges across chains.
|
|
4667
4667
|
*/
|
|
4668
|
-
declare function buildIndexedBlockranges(namespace: ENSNamespaceId, pluginsDatasourceNames: Map<PluginName, DatasourceName[]>): Map<ChainId, BlockNumberRangeWithStartBlock>;
|
|
4668
|
+
declare function buildIndexedBlockranges(namespace: ENSNamespaceId, globalBlockrangeEndBlock: BlockNumberRange["endBlock"], pluginsDatasourceNames: Map<PluginName, DatasourceName[]>): Map<ChainId, BlockNumberRangeWithStartBlock>;
|
|
4669
4669
|
|
|
4670
4670
|
/**
|
|
4671
4671
|
* Gets the AccountId for the contract in the specified namespace, datasource, and
|
package/dist/index.d.ts
CHANGED
|
@@ -4665,7 +4665,7 @@ declare const uniq: <T>(arr: T[]) => T[];
|
|
|
4665
4665
|
*
|
|
4666
4666
|
* Useful for presenting a clear view of the indexed blockranges across chains.
|
|
4667
4667
|
*/
|
|
4668
|
-
declare function buildIndexedBlockranges(namespace: ENSNamespaceId, pluginsDatasourceNames: Map<PluginName, DatasourceName[]>): Map<ChainId, BlockNumberRangeWithStartBlock>;
|
|
4668
|
+
declare function buildIndexedBlockranges(namespace: ENSNamespaceId, globalBlockrangeEndBlock: BlockNumberRange["endBlock"], pluginsDatasourceNames: Map<PluginName, DatasourceName[]>): Map<ChainId, BlockNumberRangeWithStartBlock>;
|
|
4669
4669
|
|
|
4670
4670
|
/**
|
|
4671
4671
|
* Gets the AccountId for the contract in the specified namespace, datasource, and
|
package/dist/index.js
CHANGED
|
@@ -4507,7 +4507,7 @@ var TtlCache = class {
|
|
|
4507
4507
|
import {
|
|
4508
4508
|
maybeGetDatasource as maybeGetDatasource2
|
|
4509
4509
|
} from "@ensnode/datasources";
|
|
4510
|
-
function buildIndexedBlockranges(namespace, pluginsDatasourceNames) {
|
|
4510
|
+
function buildIndexedBlockranges(namespace, globalBlockrangeEndBlock, pluginsDatasourceNames) {
|
|
4511
4511
|
const indexedBlockranges = /* @__PURE__ */ new Map();
|
|
4512
4512
|
for (const [, datasourceNames] of pluginsDatasourceNames) {
|
|
4513
4513
|
for (const datasourceName of datasourceNames) {
|
|
@@ -4517,9 +4517,12 @@ function buildIndexedBlockranges(namespace, pluginsDatasourceNames) {
|
|
|
4517
4517
|
const datasourceContracts = Object.values(datasource.contracts);
|
|
4518
4518
|
for (const datasourceContract of datasourceContracts) {
|
|
4519
4519
|
const currentChainIndexedBlockrange = indexedBlockranges.get(datasourceChainId);
|
|
4520
|
+
if (typeof globalBlockrangeEndBlock === "number" && datasourceContract.startBlock > globalBlockrangeEndBlock) {
|
|
4521
|
+
continue;
|
|
4522
|
+
}
|
|
4520
4523
|
const contractIndexedBlockrange = buildBlockNumberRange(
|
|
4521
4524
|
datasourceContract.startBlock,
|
|
4522
|
-
datasourceContract.endBlock
|
|
4525
|
+
datasourceContract.endBlock ?? globalBlockrangeEndBlock
|
|
4523
4526
|
);
|
|
4524
4527
|
const indexedBlockrange = currentChainIndexedBlockrange ? mergeBlockNumberRanges(currentChainIndexedBlockrange, contractIndexedBlockrange) : contractIndexedBlockrange;
|
|
4525
4528
|
if (indexedBlockrange.rangeType !== RangeTypeIds.LeftBounded && indexedBlockrange.rangeType !== RangeTypeIds.Bounded) {
|