@sentio/sdk-bundle 3.0.0-rc.8 → 3.0.0-rc.9
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/aptos/builtin/0x1.js +7 -7
- package/lib/aptos/builtin/0x3.js +8 -8
- package/lib/aptos/builtin/0x4.js +8 -8
- package/lib/aptos/builtin/index.js +9 -9
- package/lib/aptos/ext/index.js +7 -7
- package/lib/aptos/index.js +8 -8
- package/lib/{chunk-FT7S2CGD.js → chunk-2STWNSTL.js} +6 -6
- package/lib/{chunk-74VTUWN5.js → chunk-3ITGIG2T.js} +2 -2
- package/lib/{chunk-5SQBZ4LR.js → chunk-6LNXUEZ2.js} +4 -4
- package/lib/{chunk-WO6QPFGW.js → chunk-A5XHFKLN.js} +3 -3
- package/lib/{chunk-DQNREDX5.js → chunk-A66R5WXL.js} +5 -5
- package/lib/{chunk-OCXO3PBF.js → chunk-A74JLBVG.js} +6 -6
- package/lib/{chunk-N35JDDYB.js → chunk-BSJMBZ47.js} +120 -95
- package/lib/chunk-BSJMBZ47.js.map +1 -0
- package/lib/{chunk-OJINQKTV.js → chunk-F6XB3TYA.js} +2 -2
- package/lib/{chunk-H5JBH4LJ.js → chunk-FEELEM4F.js} +30 -28
- package/lib/chunk-FEELEM4F.js.map +1 -0
- package/lib/{chunk-T5ZH3BWD.js → chunk-IJ2DRUCB.js} +5 -5
- package/lib/{chunk-RWJIGDIS.js → chunk-LC6AHMNQ.js} +4 -4
- package/lib/{chunk-6SG2I5XX.js → chunk-NXC6YEPV.js} +30 -11
- package/lib/chunk-NXC6YEPV.js.map +1 -0
- package/lib/{chunk-SHNNOF36.js → chunk-OZUIEBIK.js} +5 -5
- package/lib/{chunk-J4VTG7YT.js → chunk-PCOINDOU.js} +3 -3
- package/lib/{chunk-XPRPNWPT.js → chunk-QZHJK3ZR.js} +3 -3
- package/lib/{chunk-4XHQG44H.js → chunk-RORSIMFS.js} +61 -58
- package/lib/{chunk-4XHQG44H.js.map → chunk-RORSIMFS.js.map} +1 -1
- package/lib/{chunk-4GJF7CRE.js → chunk-WXR4GY67.js} +29 -30
- package/lib/chunk-WXR4GY67.js.map +1 -0
- package/lib/{chunk-DBR2IYO3.js → chunk-Y55RCY7T.js} +2 -2
- package/lib/{chunk-2KHS7L34.js → chunk-YAIMQUJB.js} +3 -3
- package/lib/core/index.js +1 -1
- package/lib/eth/builtin/eacaggregatorproxy.js +2 -2
- package/lib/eth/builtin/erc1155.js +3 -3
- package/lib/eth/builtin/erc20.js +2 -2
- package/lib/eth/builtin/erc721.js +2 -2
- package/lib/eth/builtin/index.js +4 -4
- package/lib/eth/builtin/weth9.js +3 -3
- package/lib/eth/index.js +2 -2
- package/lib/fuel/index.js +2 -2
- package/lib/index.js +1 -1
- package/lib/iota/builtin/0x1.js +9 -9
- package/lib/iota/builtin/0x2.js +10 -10
- package/lib/iota/builtin/0x3.js +11 -11
- package/lib/iota/builtin/index.js +11 -11
- package/lib/iota/ext/index.js +5 -5
- package/lib/iota/index.js +9 -9
- package/lib/move/index.js +2 -2
- package/lib/solana/builtin/index.js +3 -3
- package/lib/solana/index.js +3 -3
- package/lib/stark/index.js +5 -9
- package/lib/stark/index.js.map +1 -1
- package/lib/store/index.js +1 -1
- package/lib/sui/builtin/0x1.js +9 -9
- package/lib/sui/builtin/0x2.js +10 -10
- package/lib/sui/builtin/0x3.js +11 -11
- package/lib/sui/builtin/index.js +11 -11
- package/lib/sui/ext/index.js +5 -5
- package/lib/sui/index.js +9 -9
- package/lib/testing/index.js +67 -20
- package/lib/testing/index.js.map +1 -1
- package/lib/utils/index.js +2 -2
- package/package.json +2 -2
- package/lib/chunk-4GJF7CRE.js.map +0 -1
- package/lib/chunk-6SG2I5XX.js.map +0 -1
- package/lib/chunk-H5JBH4LJ.js.map +0 -1
- package/lib/chunk-N35JDDYB.js.map +0 -1
- /package/lib/{chunk-FT7S2CGD.js.map → chunk-2STWNSTL.js.map} +0 -0
- /package/lib/{chunk-74VTUWN5.js.map → chunk-3ITGIG2T.js.map} +0 -0
- /package/lib/{chunk-5SQBZ4LR.js.map → chunk-6LNXUEZ2.js.map} +0 -0
- /package/lib/{chunk-WO6QPFGW.js.map → chunk-A5XHFKLN.js.map} +0 -0
- /package/lib/{chunk-DQNREDX5.js.map → chunk-A66R5WXL.js.map} +0 -0
- /package/lib/{chunk-OCXO3PBF.js.map → chunk-A74JLBVG.js.map} +0 -0
- /package/lib/{chunk-OJINQKTV.js.map → chunk-F6XB3TYA.js.map} +0 -0
- /package/lib/{chunk-T5ZH3BWD.js.map → chunk-IJ2DRUCB.js.map} +0 -0
- /package/lib/{chunk-RWJIGDIS.js.map → chunk-LC6AHMNQ.js.map} +0 -0
- /package/lib/{chunk-SHNNOF36.js.map → chunk-OZUIEBIK.js.map} +0 -0
- /package/lib/{chunk-J4VTG7YT.js.map → chunk-PCOINDOU.js.map} +0 -0
- /package/lib/{chunk-XPRPNWPT.js.map → chunk-QZHJK3ZR.js.map} +0 -0
- /package/lib/{chunk-DBR2IYO3.js.map → chunk-Y55RCY7T.js.map} +0 -0
- /package/lib/{chunk-2KHS7L34.js.map → chunk-YAIMQUJB.js.map} +0 -0
|
@@ -36,10 +36,9 @@ import {
|
|
|
36
36
|
PartitionHandlerManager,
|
|
37
37
|
PreprocessResult,
|
|
38
38
|
ProcessResult,
|
|
39
|
-
TemplateInstanceState,
|
|
40
39
|
normalizeLabels,
|
|
41
40
|
scaleDown
|
|
42
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-NXC6YEPV.js";
|
|
43
42
|
import {
|
|
44
43
|
require_lib
|
|
45
44
|
} from "./chunk-6B74I6XD.js";
|
|
@@ -3909,10 +3908,10 @@ var BaseProcessorTemplate = class {
|
|
|
3909
3908
|
__name(this, "BaseProcessorTemplate");
|
|
3910
3909
|
}
|
|
3911
3910
|
id;
|
|
3912
|
-
binds = /* @__PURE__ */ new Set();
|
|
3913
3911
|
blockHandlers = [];
|
|
3914
3912
|
traceHandlers = [];
|
|
3915
3913
|
eventHandlers = [];
|
|
3914
|
+
instances = /* @__PURE__ */ new Set();
|
|
3916
3915
|
constructor() {
|
|
3917
3916
|
this.id = ProcessorTemplateProcessorState.INSTANCE.getValues().length;
|
|
3918
3917
|
ProcessorTemplateProcessorState.INSTANCE.addValue(this);
|
|
@@ -3924,16 +3923,37 @@ var BaseProcessorTemplate = class {
|
|
|
3924
3923
|
* @param ctx
|
|
3925
3924
|
*/
|
|
3926
3925
|
bind(options, ctx) {
|
|
3926
|
+
options = { ...options, address: validateAndNormalizeAddress(options.address) };
|
|
3927
|
+
const instance = {
|
|
3928
|
+
templateId: this.id,
|
|
3929
|
+
contract: {
|
|
3930
|
+
address: options.address,
|
|
3931
|
+
name: options.name || "",
|
|
3932
|
+
chainId: ctx.chainId,
|
|
3933
|
+
abi: ""
|
|
3934
|
+
},
|
|
3935
|
+
startBlock: BigInt(options.startBlock || 0),
|
|
3936
|
+
endBlock: BigInt(options.endBlock || 0),
|
|
3937
|
+
baseLabels: options.baseLabels
|
|
3938
|
+
};
|
|
3939
|
+
ctx.sendTemplateInstance(instance);
|
|
3940
|
+
ctx.update({
|
|
3941
|
+
states: {
|
|
3942
|
+
configUpdated: true
|
|
3943
|
+
}
|
|
3944
|
+
});
|
|
3945
|
+
processMetrics2.processor_template_instance_count.add(1, { chain_id: ctx.chainId, template: this.constructor.name });
|
|
3946
|
+
}
|
|
3947
|
+
startInstance(options, ctx) {
|
|
3927
3948
|
options = { ...options, address: validateAndNormalizeAddress(options.address) };
|
|
3928
3949
|
const sig = getOptionsSignature({
|
|
3929
3950
|
address: options.address,
|
|
3930
3951
|
network: ctx.chainId
|
|
3931
3952
|
});
|
|
3932
|
-
if (this.
|
|
3933
|
-
console.
|
|
3953
|
+
if (this.instances.has(sig)) {
|
|
3954
|
+
console.debug(`Same address can be bind to one template only once, ignore duplicate bind: ${sig}`);
|
|
3934
3955
|
return;
|
|
3935
3956
|
}
|
|
3936
|
-
this.binds.add(sig);
|
|
3937
3957
|
const processor = this.bindInternal({ ...options, network: ctx.chainId });
|
|
3938
3958
|
for (const eh of this.eventHandlers) {
|
|
3939
3959
|
processor.onEthEvent(eh.handler, eh.filter, eh.fetchConfig, eh.preprocessHandler, eh.handlerName);
|
|
@@ -3951,25 +3971,7 @@ var BaseProcessorTemplate = class {
|
|
|
3951
3971
|
bh.handlerName
|
|
3952
3972
|
);
|
|
3953
3973
|
}
|
|
3954
|
-
|
|
3955
|
-
templateId: this.id,
|
|
3956
|
-
contract: {
|
|
3957
|
-
address: options.address,
|
|
3958
|
-
name: options.name || "",
|
|
3959
|
-
chainId: ctx.chainId,
|
|
3960
|
-
abi: ""
|
|
3961
|
-
},
|
|
3962
|
-
startBlock: BigInt(options.startBlock || 0),
|
|
3963
|
-
endBlock: BigInt(options.endBlock || 0),
|
|
3964
|
-
baseLabels: options.baseLabels
|
|
3965
|
-
};
|
|
3966
|
-
TemplateInstanceState.INSTANCE.addValue(instance);
|
|
3967
|
-
ctx.update({
|
|
3968
|
-
states: {
|
|
3969
|
-
configUpdated: true
|
|
3970
|
-
}
|
|
3971
|
-
});
|
|
3972
|
-
processMetrics2.processor_template_instance_count.add(1, { chain_id: ctx.chainId, template: this.constructor.name });
|
|
3974
|
+
this.instances.add(sig);
|
|
3973
3975
|
}
|
|
3974
3976
|
onEthEvent(handler, filter, fetchConfig, preprocessHandler = defaultPreprocessHandler) {
|
|
3975
3977
|
this.eventHandlers.push({
|
|
@@ -12957,7 +12959,7 @@ var EthPlugin = class extends Plugin {
|
|
|
12957
12959
|
throw new import_nice_grpc3.ServerError(import_nice_grpc3.Status.INVALID_ARGUMENT, "Contract Empty from:" + instance);
|
|
12958
12960
|
}
|
|
12959
12961
|
const ctx = new NoopContext(instance.contract.chainId);
|
|
12960
|
-
template.
|
|
12962
|
+
template.startInstance(
|
|
12961
12963
|
{
|
|
12962
12964
|
name: instance.contract.name,
|
|
12963
12965
|
address: validateAndNormalizeAddress(instance.contract.address),
|
|
@@ -12969,9 +12971,6 @@ var EthPlugin = class extends Plugin {
|
|
|
12969
12971
|
);
|
|
12970
12972
|
}
|
|
12971
12973
|
}
|
|
12972
|
-
stateDiff(config) {
|
|
12973
|
-
return TemplateInstanceState.INSTANCE.getValues().length !== config.templateInstances.length;
|
|
12974
|
-
}
|
|
12975
12974
|
async processLog(request, preparedData) {
|
|
12976
12975
|
if (!request.data?.ethLog?.log) {
|
|
12977
12976
|
throw new import_nice_grpc3.ServerError(import_nice_grpc3.Status.INVALID_ARGUMENT, "Log can't be null");
|
|
@@ -14055,4 +14054,4 @@ js-sha3/src/sha3.js:
|
|
|
14055
14054
|
* @license MIT
|
|
14056
14055
|
*)
|
|
14057
14056
|
*/
|
|
14058
|
-
//# sourceMappingURL=chunk-
|
|
14057
|
+
//# sourceMappingURL=chunk-WXR4GY67.js.map
|