@sentio/sdk-bundle 2.45.0 → 2.45.1-rc.1
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/aptos-resource-processor-template.d.ts.map +1 -1
- package/lib/aptos/builtin/0x1.js +1 -1
- package/lib/aptos/builtin/0x3.js +1 -1
- package/lib/aptos/builtin/index.js +1 -1
- package/lib/aptos/ext/index.js +1 -1
- package/lib/aptos/index.js +1 -1
- package/lib/{chunk-G2KR5VKV.js → chunk-5YDRHPYU.js} +2 -2
- package/lib/{chunk-67L6M26C.js → chunk-6GPS6ANL.js} +8 -8
- package/lib/{chunk-67L6M26C.js.map → chunk-6GPS6ANL.js.map} +1 -1
- package/lib/{chunk-DOTKHTBG.js → chunk-APPRWKZN.js} +2 -2
- package/lib/{chunk-VO57HTCG.js → chunk-DRUSMUSA.js} +2 -2
- package/lib/{chunk-RVQBDYQ2.js → chunk-EMGLFW2R.js} +2 -2
- package/lib/{chunk-YX4LDK5Y.js → chunk-HKWSZOP2.js} +2 -2
- package/lib/{chunk-MB75AKO3.js → chunk-L45ZF5PY.js} +2 -2
- package/lib/{chunk-F7Q5QB6Q.js → chunk-MB4EAYM4.js} +11 -11
- package/lib/chunk-MB4EAYM4.js.map +1 -0
- package/lib/{chunk-6VELGYNR.js → chunk-QNAN3L7E.js} +2 -2
- package/lib/{chunk-SU5LVIL5.js → chunk-S2IIMG4D.js} +2 -2
- package/lib/{chunk-DR4NZAPM.js → chunk-S36NUXJS.js} +2 -2
- package/lib/{chunk-JCUSXGHB.js → chunk-WILVLA7S.js} +2 -2
- package/lib/{chunk-5VBGX3LN.js → chunk-WZMWULE7.js} +2 -2
- package/lib/eth/base-processor-template.d.ts.map +1 -1
- package/lib/eth/base-processor.d.ts.map +1 -1
- package/lib/eth/base-processor.test.d.ts +2 -0
- package/lib/eth/base-processor.test.d.ts.map +1 -0
- package/lib/eth/builtin/eacaggregatorproxy.js +1 -1
- package/lib/eth/builtin/erc1155.js +1 -1
- package/lib/eth/builtin/erc20.js +1 -1
- package/lib/eth/builtin/erc721.js +1 -1
- package/lib/eth/builtin/index.js +1 -1
- package/lib/eth/builtin/weth9.js +1 -1
- package/lib/eth/index.js +1 -1
- package/lib/sui/builtin/0x1.js +1 -1
- package/lib/sui/builtin/0x2.js +1 -1
- package/lib/sui/builtin/0x3.js +1 -1
- package/lib/sui/builtin/index.js +1 -1
- package/lib/sui/ext/index.js +1 -1
- package/lib/sui/index.js +1 -1
- package/lib/testing/index.js +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/metrics.d.ts +4 -0
- package/lib/utils/metrics.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/aptos/aptos-resource-processor-template.ts +2 -1
- package/src/eth/base-processor-template.ts +2 -1
- package/src/eth/base-processor.ts +18 -0
- package/src/utils/metrics.ts +22 -0
- package/lib/chunk-F7Q5QB6Q.js.map +0 -1
- /package/lib/{chunk-G2KR5VKV.js.map → chunk-5YDRHPYU.js.map} +0 -0
- /package/lib/{chunk-DOTKHTBG.js.map → chunk-APPRWKZN.js.map} +0 -0
- /package/lib/{chunk-VO57HTCG.js.map → chunk-DRUSMUSA.js.map} +0 -0
- /package/lib/{chunk-RVQBDYQ2.js.map → chunk-EMGLFW2R.js.map} +0 -0
- /package/lib/{chunk-YX4LDK5Y.js.map → chunk-HKWSZOP2.js.map} +0 -0
- /package/lib/{chunk-MB75AKO3.js.map → chunk-L45ZF5PY.js.map} +0 -0
- /package/lib/{chunk-6VELGYNR.js.map → chunk-QNAN3L7E.js.map} +0 -0
- /package/lib/{chunk-SU5LVIL5.js.map → chunk-S2IIMG4D.js.map} +0 -0
- /package/lib/{chunk-DR4NZAPM.js.map → chunk-S36NUXJS.js.map} +0 -0
- /package/lib/{chunk-JCUSXGHB.js.map → chunk-WILVLA7S.js.map} +0 -0
- /package/lib/{chunk-5VBGX3LN.js.map → chunk-WZMWULE7.js.map} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k}from"../../chunk-
|
|
2
|
+
import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k}from"../../chunk-L45ZF5PY.js";import{B as a}from"../../chunk-MB4EAYM4.js";import"../../chunk-OUOSDGWD.js";import"../../chunk-QW2MPHP5.js";import"../../chunk-24SCJPBI.js";import"../../chunk-GU4UN43Q.js";import"../../chunk-CA6DKOT2.js";import"../../chunk-NDC6HDQD.js";import"../../chunk-WZLM66YL.js";import"../../chunk-2BO4GGPL.js";import"../../chunk-FC546GTB.js";import"../../chunk-6GD6B22G.js";export{c as ERC1155BoundContractView,b as ERC1155ContractView,d as ERC1155Processor,e as ERC1155ProcessorTemplate,a as ERC1155__factory,f as getERC1155Contract,g as getERC1155ContractOnContext,h as mockApprovalForAllLog,i as mockTransferBatchLog,j as mockTransferSingleLog,k as mockURILog};
|
|
3
3
|
//# sourceMappingURL=erc1155.js.map
|
package/lib/eth/builtin/erc20.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{$ as g,C as a,W as b,X as c,Y as d,Z as e,_ as f,aa as h,ba as i,ca as j}from"../../chunk-
|
|
2
|
+
import{$ as g,C as a,W as b,X as c,Y as d,Z as e,_ as f,aa as h,ba as i,ca as j}from"../../chunk-MB4EAYM4.js";import"../../chunk-OUOSDGWD.js";import"../../chunk-QW2MPHP5.js";import"../../chunk-24SCJPBI.js";import"../../chunk-GU4UN43Q.js";import"../../chunk-CA6DKOT2.js";import"../../chunk-NDC6HDQD.js";import"../../chunk-WZLM66YL.js";import"../../chunk-2BO4GGPL.js";import"../../chunk-FC546GTB.js";import"../../chunk-6GD6B22G.js";export{c as ERC20BoundContractView,b as ERC20ContractView,d as ERC20Processor,e as ERC20ProcessorTemplate,a as ERC20__factory,f as getERC20Contract,g as getERC20ContractOnContext,h as mockApprovalLog,i as mockOwnershipTransferredLog,j as mockTransferLog};
|
|
3
3
|
//# sourceMappingURL=erc20.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{E as a,G as b,H as c,I as d,J as e,K as f,L as g,M as h,N as i,O as j}from"../../chunk-
|
|
2
|
+
import{E as a,G as b,H as c,I as d,J as e,K as f,L as g,M as h,N as i,O as j}from"../../chunk-MB4EAYM4.js";import"../../chunk-OUOSDGWD.js";import"../../chunk-QW2MPHP5.js";import"../../chunk-24SCJPBI.js";import"../../chunk-GU4UN43Q.js";import"../../chunk-CA6DKOT2.js";import"../../chunk-NDC6HDQD.js";import"../../chunk-WZLM66YL.js";import"../../chunk-2BO4GGPL.js";import"../../chunk-FC546GTB.js";import"../../chunk-6GD6B22G.js";export{c as ERC721BoundContractView,b as ERC721ContractView,d as ERC721Processor,e as ERC721ProcessorTemplate,a as ERC721__factory,f as getERC721Contract,g as getERC721ContractOnContext,i as mockApprovalForAllLog,h as mockApprovalLog,j as mockTransferLog};
|
|
3
3
|
//# sourceMappingURL=erc721.js.map
|
package/lib/eth/builtin/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{c as C,d as g,k as R}from"../../chunk-
|
|
2
|
+
import{c as C,d as g,k as R}from"../../chunk-L45ZF5PY.js";import{c as T,d as l,k as y}from"../../chunk-DRUSMUSA.js";import{a,b as c,d as x}from"../../chunk-QNAN3L7E.js";import{c as P,d as f,k as E}from"../../chunk-HKWSZOP2.js";import{I as o,J as e,P as s,Y as t,Z as p,da as m}from"../../chunk-MB4EAYM4.js";import"../../chunk-OUOSDGWD.js";import"../../chunk-QW2MPHP5.js";import"../../chunk-24SCJPBI.js";import"../../chunk-GU4UN43Q.js";import"../../chunk-CA6DKOT2.js";import"../../chunk-NDC6HDQD.js";import"../../chunk-WZLM66YL.js";import"../../chunk-2BO4GGPL.js";import"../../chunk-FC546GTB.js";import"../../chunk-6GD6B22G.js";import("process").then(r=>r.stdout.write(""));export{P as EACAggregatorProxyProcessor,f as EACAggregatorProxyProcessorTemplate,C as ERC1155Processor,g as ERC1155ProcessorTemplate,a as ERC20BytesProcessor,c as ERC20BytesProcessorTemplate,t as ERC20Processor,p as ERC20ProcessorTemplate,o as ERC721Processor,e as ERC721ProcessorTemplate,T as WETH9Processor,l as WETH9ProcessorTemplate,E as eacaggregatorproxy,R as erc1155,m as erc20,x as erc20bytes,s as erc721,y as weth9};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/lib/eth/builtin/weth9.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k}from"../../chunk-
|
|
2
|
+
import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k}from"../../chunk-DRUSMUSA.js";import{F as a}from"../../chunk-MB4EAYM4.js";import"../../chunk-OUOSDGWD.js";import"../../chunk-QW2MPHP5.js";import"../../chunk-24SCJPBI.js";import"../../chunk-GU4UN43Q.js";import"../../chunk-CA6DKOT2.js";import"../../chunk-NDC6HDQD.js";import"../../chunk-WZLM66YL.js";import"../../chunk-2BO4GGPL.js";import"../../chunk-FC546GTB.js";import"../../chunk-6GD6B22G.js";export{c as WETH9BoundContractView,b as WETH9ContractView,d as WETH9Processor,e as WETH9ProcessorTemplate,a as WETH9__factory,f as getWETH9Contract,g as getWETH9ContractOnContext,h as mockApprovalLog,j as mockDepositLog,i as mockTransferLog,k as mockWithdrawalLog};
|
|
3
3
|
//# sourceMappingURL=weth9.js.map
|
package/lib/eth/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{Q as A,R as B,S as C,T as D,U as E,V as F,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-
|
|
2
|
+
import{Q as A,R as B,S as C,T as D,U as E,V as F,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-MB4EAYM4.js";import"../chunk-OUOSDGWD.js";import"../chunk-QW2MPHP5.js";import{Gb as b,oa as a}from"../chunk-24SCJPBI.js";import"../chunk-GU4UN43Q.js";import"../chunk-CA6DKOT2.js";import"../chunk-NDC6HDQD.js";import"../chunk-WZLM66YL.js";import"../chunk-2BO4GGPL.js";import"../chunk-FC546GTB.js";import"../chunk-6GD6B22G.js";var export_EthChainId=E.EthChainId;export{t as AccountBindOptions,d as AccountContext,A as AccountProcessor,r as BaseProcessor,z as BaseProcessorTemplate,s as BindOptions,h as BoundContractView,f as ContractContext,g as ContractView,D as DummyProvider,export_EthChainId as EthChainId,c as EthContext,a as EthFetchConfig,B as EthPlugin,y as GenericProcessor,e as GlobalContext,q as GlobalProcessor,b as PreprocessResult,i as SimpleEthersError,x as addContractByABI,v as addProcessor,p as defaultPreprocessHandler,k as fixEmptyKey,l as formatEthData,m as formatRichBlock,w as getContractByABI,u as getProcessor,C as getProvider,n as isNullAddress,F as makeEthCallKey,j as transformEtherError,o as validateAndNormalizeAddress};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/lib/sui/builtin/0x1.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h}from"../../chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h}from"../../chunk-WILVLA7S.js";import"../../chunk-S36NUXJS.js";import"../../chunk-WZMWULE7.js";import"../../chunk-KRL7DRXT.js";import"../../chunk-B7YDBLBV.js";import"../../chunk-44SAPBRK.js";import"../../chunk-P73GOPCF.js";import"../../chunk-6GMS6XU7.js";import"../../chunk-EMGLFW2R.js";import"../../chunk-W4OBSPHA.js";import"../../chunk-RVK3H6V4.js";import"../../chunk-QNAN3L7E.js";import"../../chunk-HKWSZOP2.js";import"../../chunk-MB4EAYM4.js";import"../../chunk-OUOSDGWD.js";import"../../chunk-QW2MPHP5.js";import"../../chunk-24SCJPBI.js";import"../../chunk-GU4UN43Q.js";import"../../chunk-CA6DKOT2.js";import"../../chunk-NDC6HDQD.js";import"../../chunk-WZLM66YL.js";import"../../chunk-2BO4GGPL.js";import"../../chunk-FC546GTB.js";import"../../chunk-6GD6B22G.js";export{a as ascii,b as bit_vector,c as fixed_point32,h as loadAllTypes,d as option,e as string_,f as type_name,g as uq32_32};
|
|
3
3
|
//# sourceMappingURL=0x1.js.map
|
package/lib/sui/builtin/0x2.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{A,B,C,D,E,F,G,H,I,J,K,L,M,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../../chunk-
|
|
2
|
+
import{A,B,C,D,E,F,G,H,I,J,K,L,M,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../../chunk-APPRWKZN.js";import"../../chunk-WILVLA7S.js";import"../../chunk-S36NUXJS.js";import"../../chunk-WZMWULE7.js";import"../../chunk-KRL7DRXT.js";import"../../chunk-B7YDBLBV.js";import"../../chunk-44SAPBRK.js";import"../../chunk-P73GOPCF.js";import"../../chunk-6GMS6XU7.js";import"../../chunk-EMGLFW2R.js";import"../../chunk-W4OBSPHA.js";import"../../chunk-RVK3H6V4.js";import"../../chunk-QNAN3L7E.js";import"../../chunk-HKWSZOP2.js";import"../../chunk-MB4EAYM4.js";import"../../chunk-OUOSDGWD.js";import"../../chunk-QW2MPHP5.js";import"../../chunk-24SCJPBI.js";import"../../chunk-GU4UN43Q.js";import"../../chunk-CA6DKOT2.js";import"../../chunk-NDC6HDQD.js";import"../../chunk-WZLM66YL.js";import"../../chunk-2BO4GGPL.js";import"../../chunk-FC546GTB.js";import"../../chunk-6GD6B22G.js";export{a as authenticator_state,b as bag,c as balance,d as bcs,e as bls12381,f as borrow,g as clock,h as coin,i as config,j as deny_list,k as display,l as dynamic_field,m as dynamic_object_field,n as groth16,o as group_ops,p as kiosk,q as kiosk_extension,r as linked_table,M as loadAllTypes,s as object_,t as object_bag,u as object_table,v as package_,w as pay,x as priority_queue,y as random,z as sui,A as table,B as table_vec,C as token,D as transfer,E as transfer_policy,F as tx_context,G as url,H as vec_map,I as vec_set,J as versioned,K as zklogin_verified_id,L as zklogin_verified_issuer};
|
|
3
3
|
//# sourceMappingURL=0x2.js.map
|
package/lib/sui/builtin/0x3.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l}from"../../chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l}from"../../chunk-5YDRHPYU.js";import"../../chunk-APPRWKZN.js";import"../../chunk-WILVLA7S.js";import"../../chunk-S36NUXJS.js";import"../../chunk-WZMWULE7.js";import"../../chunk-KRL7DRXT.js";import"../../chunk-B7YDBLBV.js";import"../../chunk-44SAPBRK.js";import"../../chunk-P73GOPCF.js";import"../../chunk-6GMS6XU7.js";import"../../chunk-EMGLFW2R.js";import"../../chunk-W4OBSPHA.js";import"../../chunk-RVK3H6V4.js";import"../../chunk-QNAN3L7E.js";import"../../chunk-HKWSZOP2.js";import"../../chunk-MB4EAYM4.js";import"../../chunk-OUOSDGWD.js";import"../../chunk-QW2MPHP5.js";import"../../chunk-24SCJPBI.js";import"../../chunk-GU4UN43Q.js";import"../../chunk-CA6DKOT2.js";import"../../chunk-NDC6HDQD.js";import"../../chunk-WZLM66YL.js";import"../../chunk-2BO4GGPL.js";import"../../chunk-FC546GTB.js";import"../../chunk-6GD6B22G.js";export{a as genesis,l as loadAllTypes,b as stake_subsidy,c as staking_pool,d as storage_fund,e as sui_system,f as sui_system_state_inner,g as validator,h as validator_cap,i as validator_set,j as validator_wrapper,k as voting_power};
|
|
3
3
|
//# sourceMappingURL=0x3.js.map
|
package/lib/sui/builtin/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{m as x}from"../../chunk-
|
|
2
|
+
import{m as x}from"../../chunk-5YDRHPYU.js";import{N as t}from"../../chunk-APPRWKZN.js";import{i as r}from"../../chunk-WILVLA7S.js";import"../../chunk-S36NUXJS.js";import"../../chunk-WZMWULE7.js";import"../../chunk-KRL7DRXT.js";import"../../chunk-B7YDBLBV.js";import"../../chunk-44SAPBRK.js";import"../../chunk-P73GOPCF.js";import"../../chunk-6GMS6XU7.js";import"../../chunk-EMGLFW2R.js";import"../../chunk-W4OBSPHA.js";import"../../chunk-RVK3H6V4.js";import"../../chunk-QNAN3L7E.js";import"../../chunk-HKWSZOP2.js";import"../../chunk-MB4EAYM4.js";import"../../chunk-OUOSDGWD.js";import"../../chunk-QW2MPHP5.js";import"../../chunk-24SCJPBI.js";import"../../chunk-GU4UN43Q.js";import"../../chunk-CA6DKOT2.js";import"../../chunk-NDC6HDQD.js";import"../../chunk-WZLM66YL.js";import"../../chunk-2BO4GGPL.js";import"../../chunk-FC546GTB.js";import"../../chunk-6GD6B22G.js";import("process").then(o=>o.stdout.write(""));export{r as _0x1,t as _0x2,x as _0x3};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/lib/sui/ext/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{a as l,b as m}from"../../chunk-VJEZ2ZJ5.js";import{a as f,b as n,c as s,d as a,e as C,f as S,g as u}from"../../chunk-
|
|
2
|
+
import{a as l,b as m}from"../../chunk-VJEZ2ZJ5.js";import{a as f,b as n,c as s,d as a,e as C,f as S,g as u}from"../../chunk-WZMWULE7.js";import"../../chunk-B7YDBLBV.js";import"../../chunk-44SAPBRK.js";import"../../chunk-P73GOPCF.js";import"../../chunk-EMGLFW2R.js";import"../../chunk-W4OBSPHA.js";import"../../chunk-RVK3H6V4.js";import"../../chunk-QNAN3L7E.js";import"../../chunk-HKWSZOP2.js";import"../../chunk-MB4EAYM4.js";import"../../chunk-OUOSDGWD.js";import"../../chunk-QW2MPHP5.js";import"../../chunk-24SCJPBI.js";import"../../chunk-GU4UN43Q.js";import"../../chunk-CA6DKOT2.js";import"../../chunk-NDC6HDQD.js";import"../../chunk-WZLM66YL.js";import"../../chunk-2BO4GGPL.js";import"../../chunk-FC546GTB.js";import"../../chunk-6GD6B22G.js";var r=class{calculateValueInUsd(t,e,i){return u(t,e,i)}async getCoinInfo(t){return a(t)}whiteListed(t){return s(t)}whitelistCoins(){return n()}},c=new r,p=class extends l{coinList=c};async function w(o,t,e,i,d){return m(c,o,t,e,i,d)}import("process").then(o=>o.stdout.write(""));import("process").then(o=>o.stdout.write(""));export{r as CoinList,c as SuiCoinList,p as SuiDex,u as calculateValueInUsd,a as getCoinInfo,C as getCoinInfoWithFallback,w as getPairValue,S as getPrice,f as initCoinList,s as whiteListed,n as whitelistCoins};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/lib/sui/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{a as e,b as f,c as g,d as h,e as i,f as j,h as k,i as l,j as m,k as n,l as o,m as p,n as q,o as r,p as s,q as t}from"../chunk-
|
|
2
|
+
import{a as e,b as f,c as g,d as h,e as i,f as j,h as k,i as l,j as m,k as n,l as o,m as p,n as q,o as r,p as s,q as t}from"../chunk-S36NUXJS.js";import"../chunk-WZMWULE7.js";import"../chunk-KRL7DRXT.js";import{e as b,f as c,g as d}from"../chunk-B7YDBLBV.js";import"../chunk-44SAPBRK.js";import"../chunk-P73GOPCF.js";import"../chunk-6GMS6XU7.js";import"../chunk-EMGLFW2R.js";import"../chunk-W4OBSPHA.js";import{q as a}from"../chunk-RVK3H6V4.js";import"../chunk-QNAN3L7E.js";import"../chunk-HKWSZOP2.js";import"../chunk-MB4EAYM4.js";import"../chunk-OUOSDGWD.js";import"../chunk-QW2MPHP5.js";import"../chunk-24SCJPBI.js";import"../chunk-GU4UN43Q.js";import"../chunk-CA6DKOT2.js";import"../chunk-NDC6HDQD.js";import"../chunk-WZLM66YL.js";import"../chunk-2BO4GGPL.js";import"../chunk-FC546GTB.js";import"../chunk-6GD6B22G.js";export{a as BUILTIN_TYPES,e as MoveCoder,i as SuiAddressContext,n as SuiAddressProcessor,q as SuiAddressProcessorTemplate,k as SuiBaseProcessor,g as SuiContext,m as SuiGlobalProcessor,l as SuiModulesProcessor,b as SuiNetwork,h as SuiObjectChangeContext,j as SuiObjectContext,o as SuiObjectProcessor,r as SuiObjectProcessorTemplate,t as SuiPlugin,p as SuiWrappedObjectProcessor,s as SuiWrappedObjectProcessorTemplate,f as defaultMoveCoder,c as getClient,d as getRpcEndpoint};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/lib/testing/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{b as F}from"../chunk-HDNVG6V3.js";import"../chunk-E2QT6K2E.js";import{g as _}from"../chunk-DR4NZAPM.js";import"../chunk-5VBGX3LN.js";import"../chunk-KRL7DRXT.js";import{e as g}from"../chunk-B7YDBLBV.js";import"../chunk-67L6M26C.js";import{c as T}from"../chunk-CVQ72H2U.js";import"../chunk-7K2CQ73Y.js";import"../chunk-KUHMQRSY.js";import"../chunk-JLRCAHLL.js";import"../chunk-44SAPBRK.js";import"../chunk-P73GOPCF.js";import"../chunk-6GMS6XU7.js";import{b as M}from"../chunk-RVQBDYQ2.js";import"../chunk-WQ7UQGQE.js";import"../chunk-W4OBSPHA.js";import{a as D,d as u,n as E}from"../chunk-RVK3H6V4.js";import"../chunk-6VELGYNR.js";import"../chunk-YX4LDK5Y.js";import"../chunk-F7Q5QB6Q.js";import"../chunk-OUOSDGWD.js";import{a as m}from"../chunk-QW2MPHP5.js";import{D as a}from"../chunk-24SCJPBI.js";import"../chunk-GU4UN43Q.js";import"../chunk-CA6DKOT2.js";import"../chunk-NDC6HDQD.js";import"../chunk-WZLM66YL.js";import"../chunk-2BO4GGPL.js";import{a as L}from"../chunk-FC546GTB.js";import{e as h}from"../chunk-6GD6B22G.js";var U=h(m(),1);import{Endpoints as q,ProcessorServiceImpl as G,State as j}from"@sentio/runtime";var I=class{server;constructor(t){this.server=t}testEntryFunctionCall(t,e=T.MAIN_NET){return this.testEntryFunctionCalls([t],e)}testEntryFunctionCalls(t,e=T.MAIN_NET){let n=[];for(let r of t){let o=this.buildEntryFunctionCallBinding(r,e);if(!o)throw Error("Invalid test transaction: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildEntryFunctionCallBinding(t,e=T.MAIN_NET){let n=t.payload;for(let r of this.server.contractConfigs)if(r.contract?.chainId===e){for(let o of r.moveCallConfigs)for(let i of o.filters)if(u(r.contract.address)+"::"+i.function===n.function)return{data:{aptCall:{transaction:t}},handlerIds:[o.handlerId],handlerType:a.APT_CALL}}}testEvent(t,e=T.MAIN_NET){let n=this.buildEventBinding(t,e);if(!n)throw Error("Invalid test event: "+JSON.stringify(t));return this.server.processBinding(n)}buildEventBinding(t,e=T.MAIN_NET){for(let n of this.server.contractConfigs)if(n.contract?.chainId===e){for(let r of n.moveEventConfigs)for(let o of r.filters)for(let i of t.events)if(u(n.contract.address)+"::"+o.type===E(i.type).qname)return{data:{aptEvent:{transaction:t}},handlerIds:[r.handlerId],handlerType:a.APT_EVENT}}}};import("process").then(s=>s.stdout.write(""));var v=class{server;constructor(t){this.server=t}testInstructions(t){return this.server.processBindings({bindings:t.map(e=>({data:{raw:new Uint8Array,solInstruction:e},handlerIds:[],handlerType:a.SOL_INSTRUCTION}))})}};import("process").then(s=>s.stdout.write(""));var f=h(m(),1),B=class{server;constructor(t){this.server=t}testTrace(t,e=f.EthChainId.ETHEREUM){return this.testTraces([t],e)}testTraces(t,e=f.EthChainId.ETHEREUM){let n=[];for(let r of t){let o=this.buildTraceBinding(r,e);if(!o)throw Error("Invalid test trace: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildTraceBinding(t,e=f.EthChainId.ETHEREUM){if(t.type!=="call"||!t.action.input)throw Error("Invalid test trace: "+JSON.stringify(t));let n=t.action.input.slice(0,10);for(let r of this.server.contractConfigs)if(r.contract?.chainId===e&&!(t.action.to?.toLowerCase()!==r.contract?.address.toLowerCase()&&r.contract?.address!=="*")){for(let o of r.traceConfigs)if(o.signature==n)return{data:{ethTrace:{trace:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:a.ETH_TRACE}}}testLog(t,e=f.EthChainId.ETHEREUM){return this.testLogs([t],e)}testLogs(t,e=f.EthChainId.ETHEREUM){let n=[];for(let r of t){let o=this.buildLogBinding(r,e);if(!o)throw Error("Invalid test log: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildLogBinding(t,e=f.EthChainId.ETHEREUM){for(let n of this.server.contractConfigs)if(n.contract?.chainId===e&&!(t.address.toLowerCase()!==n.contract?.address.toLowerCase()&&n.contract?.address!=="*"))for(let r of n.logConfigs)for(let o of r.filters){let i=!0;for(let c in o.topics){let d=t.topics[c],l=o.topics[c].hashes;if(l.length!==0&&!l.find(p=>p.toLowerCase()===d.toLowerCase())){i=!1;break}}if(i)return{data:{ethLog:{log:t,timestamp:new Date}},handlerIds:[r.handlerId],handlerType:a.ETH_LOG}}}testAccountLog(t,e,n=f.EthChainId.ETHEREUM){return this.testAccountLogs(t,[e],n)}testAccountLogs(t,e,n=f.EthChainId.ETHEREUM){let r=[];for(let o of e){let i=this.buildAccountLogBinding(t,o,n);if(!i)throw Error("Invalid test log: "+JSON.stringify(o));r.push(i)}return this.server.processBindings({bindings:r})}buildAccountLogBinding(t,e,n=f.EthChainId.ETHEREUM){for(let r of this.server.accountConfigs)if(r.chainId===n&&t.toLowerCase()===r.address.toLowerCase())for(let o of r.logConfigs)for(let i of o.filters){let c=!0;for(let d in i.topics){let l=e.topics[d],p=i.topics[d].hashes;if(p.length!==0&&!p.find(w=>w.toLowerCase()===l.toLowerCase())){c=!1;break}}if(c)return{data:{ethLog:{log:e,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:a.ETH_LOG}}}testBlock(t,e=f.EthChainId.ETHEREUM){return this.testBlocks([t],e)}testBlocks(t,e=f.EthChainId.ETHEREUM){let n=[];for(let r of t){let o=this.buildBlockBinding(r,e);if(!o)throw Error("Invalid test block: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildBlockBinding(t,e=f.EthChainId.ETHEREUM){let n={data:{ethBlock:{block:t}},handlerType:a.ETH_BLOCK,handlerIds:[]};for(let r of this.server.contractConfigs){if(r.contract?.chainId!==e)continue;let o=t.number;if(!(o<r.startBlock)&&!(r.endBlock!==0n&&o>=r.endBlock))for(let i of r.intervalConfigs)n.handlerIds.push(i.handlerId)}return n}};import("process").then(s=>s.stdout.write(""));var S=class{server;constructor(t){this.server=t}testEntryFunctionCall(t,e=g.MAIN_NET){return this.testEntryFunctionCalls([t],e)}testEntryFunctionCalls(t,e=g.MAIN_NET){let n=[];for(let r of t){let o=this.buildEntryFunctionCallBinding(r,e);if(!o)throw Error("Invalid test transaction: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildEntryFunctionCallBinding(t,e=g.MAIN_NET){let n=_(t);for(let r of n){let o=[u(r.package),r.module,r.function].join(D);for(let i of this.server.contractConfigs)if(i.contract?.chainId===e){for(let c of i.moveCallConfigs)for(let d of c.filters)if(u(i.contract.address)+"::"+d.function===o)return{data:{suiCall:{transaction:t,timestamp:new Date,slot:10000n}},handlerIds:[c.handlerId],handlerType:a.SUI_CALL}}}}testEvent(t,e=g.MAIN_NET){let n=this.buildEventBinding(t,e);if(!n)throw Error("Invalid test event: "+JSON.stringify(t));return this.server.processBinding(n)}testGlobalTransaction(t,e=g.MAIN_NET){let n=[];for(let o of this.server.contractConfigs)if(o.contract?.address==="*")for(let i of o.moveCallConfigs)i.filters.length===1&&i.filters[0].function===""&&n.push(i.handlerId);if(n.length===0)throw Error("Invalid test global transaction: "+JSON.stringify(t));let r={handlerIds:n,handlerType:a.SUI_CALL,data:{suiCall:{transaction:t,timestamp:t.timestampMs?new Date(t.timestampMs):new Date,slot:BigInt(t.checkpoint||0)}}};return this.server.processBinding(r)}buildEventBinding(t,e=g.MAIN_NET){for(let n of this.server.contractConfigs)if(n.contract?.chainId===e){for(let r of n.moveEventConfigs)for(let o of r.filters)for(let i of t.events||[])if(u(n.contract.address)+"::"+o.type===E(i.type).qname)return{data:{suiEvent:{transaction:t,timestamp:new Date(t.timestampMs||0),slot:10000n}},handlerIds:[r.handlerId],handlerType:a.SUI_EVENT}}}};import("process").then(s=>s.stdout.write(""));var N=class{server;constructor(t){this.server=t}testOnTransaction(t,e=F.TEST_NET){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test transaction: "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===e){for(let o of r.fuelCallConfigs){let i={data:{fuelCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:a.FUEL_CALL},c=o.filters[0]?.function;if(c)for(let d of t.status.receipts||[])d.receiptType=="CALL"&&d.param1==c&&n.push(i);else n.push(i)}for(let o of r.fuelLogConfigs){let i={data:{fuelCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:a.FUEL_CALL},c=o.logIds;for(let d of t.status.receipts||[])if((d.receiptType=="LOG"||d.receiptType=="LOG_DATA")&&c.includes(d.rb)){n.push(i);break}}for(let o of r.assetConfigs){let i={data:{fuelCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:a.FUEL_CALL};n.push(i)}}return n}};import("process").then(s=>s.stdout.write(""));var R=h(m(),1),x={INJECTIVE_MAINNET:R.CosmosChainId.INJECTIVE_MAINNET,INJECTIVE_TESTNET:R.CosmosChainId.INJECTIVE_TESTNET};import("process").then(s=>s.stdout.write(""));var P=class{server;constructor(t){this.server=t}testOnTransaction(t,e=x.INJECTIVE_TESTNET){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test transaction: "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===e)for(let o of r.cosmosLogConfigs){let i={data:{cosmosCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:a.COSMOS_CALL},c=o.logFilters;for(let d of t.logs||[])if(d.events.find(l=>c.includes(l.type))){n.push(i);break}}return n}};import("process").then(s=>s.stdout.write(""));var O=h(m(),1),y=class{server;constructor(t){this.server=t}testOnEvents(t,e=O.StarknetChainId.STARKNET_SEPOLIA){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test : "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[],r=Array.isArray(t)?t:[t];for(let o of r)for(let i of this.server.contractConfigs)if(i.contract?.chainId===e)for(let c of i.starknetEventConfigs){let d={data:{starknetEvents:{result:o,timestamp:new Date}},handlerIds:[c.handlerId],handlerType:a.STARKNET_EVENT},l=c.filters,p=o.keys;for(let w of p)for(let J of l)if(J.keys.includes(w))return n.push(d),n}return n}};import("process").then(s=>s.stdout.write(""));var H=h(m(),1);var b=class{server;constructor(t){this.server=t}testOnTransactions(t,e=H.BTCChainId.BTC_TESTNET){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test : "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===e)for(let o of r.btcTransactionConfigs){let i={data:{btcTransaction:t},handlerIds:[o.handlerId],handlerType:a.BTC_TRANSACTION};n.push(i)}return n}};import("process").then(s=>s.stdout.write(""));var C={};function K(){j.reset()}var k=class{service;contractConfigs;accountConfigs;aptos;eth;solana;sui;fuel;cosmos;starknet;btc;constructor(t,e={}){K(),this.service=new G(t),this.aptos=new I(this),this.solana=new v(this),this.eth=new B(this),this.sui=new S(this),this.fuel=new N(this),this.cosmos=new P(this),this.starknet=new y(this),this.btc=new b(this);for(let n in U.CHAIN_MAP){let r=e[n]||"";q.INSTANCE.chainServer.set(n,r)}}async start(t={templateInstances:[]},e=C){let n=await this.service.start(t,e),r=await this.getConfig({});return this.contractConfigs=r.contractConfigs,this.accountConfigs=r.accountConfigs,n}stop(t,e=C){return this.service.stop(t,e)}getConfig(t,e=C){return this.service.getConfig(t,e)}processBindings(t,e=C){return this.service.processBindings(t,e)}processBinding(t,e=C){return this.service.processBindings({bindings:[t]},e)}processBindingsStream(t,e){throw new Error("Method not implemented.")}preprocessBindingsStream(t,e){throw new Error("Method not implemented.")}};import("process").then(s=>s.stdout.write(""));function A(s){if(s!==void 0){if(s.doubleValue!==void 0)return s.doubleValue;if(s.bigInteger!==void 0){let t=M(s.bigInteger.data);return s.bigInteger.negative&&(t=-t),t}if(s.bigDecimal!==void 0)return new L(s.bigDecimal)}}function X(s,t){if(s){for(let e of s.counters)if(e.metadata?.name===t)return A(e.metricValue)}}function z(s,t){if(s){for(let e of s.gauges)if(e.metadata?.name===t)return A(e.metricValue)}}import("process").then(s=>s.stdout.write(""));var V=h(m(),1);import{Endpoints as Q}from"@sentio/runtime";function W(s){let t=[];Array.isArray(s)||(s=[s]);for(let e of Object.keys(V.CHAIN_MAP)){let n="TEST_ENDPOINT_"+e,r=process.env[n];r&&(t.push(e),Q.INSTANCE.chainServer.set(e,r))}for(let e of s)if(!t.includes(e))return!1;return!0}import("process").then(s=>s.stdout.write(""));import("process").then(s=>s.stdout.write(""));export{A as MetricValueToNumber,k as TestProcessorServer,X as firstCounterValue,z as firstGaugeValue,W as loadTestProvidersFromEnv};
|
|
2
|
+
import{b as F}from"../chunk-HDNVG6V3.js";import"../chunk-E2QT6K2E.js";import{g as _}from"../chunk-S36NUXJS.js";import"../chunk-WZMWULE7.js";import"../chunk-KRL7DRXT.js";import{e as g}from"../chunk-B7YDBLBV.js";import"../chunk-6GPS6ANL.js";import{c as T}from"../chunk-CVQ72H2U.js";import"../chunk-7K2CQ73Y.js";import"../chunk-KUHMQRSY.js";import"../chunk-JLRCAHLL.js";import"../chunk-44SAPBRK.js";import"../chunk-P73GOPCF.js";import"../chunk-6GMS6XU7.js";import{b as M}from"../chunk-EMGLFW2R.js";import"../chunk-WQ7UQGQE.js";import"../chunk-W4OBSPHA.js";import{a as D,d as u,n as E}from"../chunk-RVK3H6V4.js";import"../chunk-QNAN3L7E.js";import"../chunk-HKWSZOP2.js";import"../chunk-MB4EAYM4.js";import"../chunk-OUOSDGWD.js";import{a as m}from"../chunk-QW2MPHP5.js";import{D as a}from"../chunk-24SCJPBI.js";import"../chunk-GU4UN43Q.js";import"../chunk-CA6DKOT2.js";import"../chunk-NDC6HDQD.js";import"../chunk-WZLM66YL.js";import"../chunk-2BO4GGPL.js";import{a as L}from"../chunk-FC546GTB.js";import{e as h}from"../chunk-6GD6B22G.js";var U=h(m(),1);import{Endpoints as q,ProcessorServiceImpl as G,State as j}from"@sentio/runtime";var I=class{server;constructor(t){this.server=t}testEntryFunctionCall(t,e=T.MAIN_NET){return this.testEntryFunctionCalls([t],e)}testEntryFunctionCalls(t,e=T.MAIN_NET){let n=[];for(let r of t){let o=this.buildEntryFunctionCallBinding(r,e);if(!o)throw Error("Invalid test transaction: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildEntryFunctionCallBinding(t,e=T.MAIN_NET){let n=t.payload;for(let r of this.server.contractConfigs)if(r.contract?.chainId===e){for(let o of r.moveCallConfigs)for(let i of o.filters)if(u(r.contract.address)+"::"+i.function===n.function)return{data:{aptCall:{transaction:t}},handlerIds:[o.handlerId],handlerType:a.APT_CALL}}}testEvent(t,e=T.MAIN_NET){let n=this.buildEventBinding(t,e);if(!n)throw Error("Invalid test event: "+JSON.stringify(t));return this.server.processBinding(n)}buildEventBinding(t,e=T.MAIN_NET){for(let n of this.server.contractConfigs)if(n.contract?.chainId===e){for(let r of n.moveEventConfigs)for(let o of r.filters)for(let i of t.events)if(u(n.contract.address)+"::"+o.type===E(i.type).qname)return{data:{aptEvent:{transaction:t}},handlerIds:[r.handlerId],handlerType:a.APT_EVENT}}}};import("process").then(s=>s.stdout.write(""));var v=class{server;constructor(t){this.server=t}testInstructions(t){return this.server.processBindings({bindings:t.map(e=>({data:{raw:new Uint8Array,solInstruction:e},handlerIds:[],handlerType:a.SOL_INSTRUCTION}))})}};import("process").then(s=>s.stdout.write(""));var f=h(m(),1),B=class{server;constructor(t){this.server=t}testTrace(t,e=f.EthChainId.ETHEREUM){return this.testTraces([t],e)}testTraces(t,e=f.EthChainId.ETHEREUM){let n=[];for(let r of t){let o=this.buildTraceBinding(r,e);if(!o)throw Error("Invalid test trace: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildTraceBinding(t,e=f.EthChainId.ETHEREUM){if(t.type!=="call"||!t.action.input)throw Error("Invalid test trace: "+JSON.stringify(t));let n=t.action.input.slice(0,10);for(let r of this.server.contractConfigs)if(r.contract?.chainId===e&&!(t.action.to?.toLowerCase()!==r.contract?.address.toLowerCase()&&r.contract?.address!=="*")){for(let o of r.traceConfigs)if(o.signature==n)return{data:{ethTrace:{trace:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:a.ETH_TRACE}}}testLog(t,e=f.EthChainId.ETHEREUM){return this.testLogs([t],e)}testLogs(t,e=f.EthChainId.ETHEREUM){let n=[];for(let r of t){let o=this.buildLogBinding(r,e);if(!o)throw Error("Invalid test log: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildLogBinding(t,e=f.EthChainId.ETHEREUM){for(let n of this.server.contractConfigs)if(n.contract?.chainId===e&&!(t.address.toLowerCase()!==n.contract?.address.toLowerCase()&&n.contract?.address!=="*"))for(let r of n.logConfigs)for(let o of r.filters){let i=!0;for(let c in o.topics){let d=t.topics[c],l=o.topics[c].hashes;if(l.length!==0&&!l.find(p=>p.toLowerCase()===d.toLowerCase())){i=!1;break}}if(i)return{data:{ethLog:{log:t,timestamp:new Date}},handlerIds:[r.handlerId],handlerType:a.ETH_LOG}}}testAccountLog(t,e,n=f.EthChainId.ETHEREUM){return this.testAccountLogs(t,[e],n)}testAccountLogs(t,e,n=f.EthChainId.ETHEREUM){let r=[];for(let o of e){let i=this.buildAccountLogBinding(t,o,n);if(!i)throw Error("Invalid test log: "+JSON.stringify(o));r.push(i)}return this.server.processBindings({bindings:r})}buildAccountLogBinding(t,e,n=f.EthChainId.ETHEREUM){for(let r of this.server.accountConfigs)if(r.chainId===n&&t.toLowerCase()===r.address.toLowerCase())for(let o of r.logConfigs)for(let i of o.filters){let c=!0;for(let d in i.topics){let l=e.topics[d],p=i.topics[d].hashes;if(p.length!==0&&!p.find(w=>w.toLowerCase()===l.toLowerCase())){c=!1;break}}if(c)return{data:{ethLog:{log:e,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:a.ETH_LOG}}}testBlock(t,e=f.EthChainId.ETHEREUM){return this.testBlocks([t],e)}testBlocks(t,e=f.EthChainId.ETHEREUM){let n=[];for(let r of t){let o=this.buildBlockBinding(r,e);if(!o)throw Error("Invalid test block: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildBlockBinding(t,e=f.EthChainId.ETHEREUM){let n={data:{ethBlock:{block:t}},handlerType:a.ETH_BLOCK,handlerIds:[]};for(let r of this.server.contractConfigs){if(r.contract?.chainId!==e)continue;let o=t.number;if(!(o<r.startBlock)&&!(r.endBlock!==0n&&o>=r.endBlock))for(let i of r.intervalConfigs)n.handlerIds.push(i.handlerId)}return n}};import("process").then(s=>s.stdout.write(""));var S=class{server;constructor(t){this.server=t}testEntryFunctionCall(t,e=g.MAIN_NET){return this.testEntryFunctionCalls([t],e)}testEntryFunctionCalls(t,e=g.MAIN_NET){let n=[];for(let r of t){let o=this.buildEntryFunctionCallBinding(r,e);if(!o)throw Error("Invalid test transaction: "+JSON.stringify(r));n.push(o)}return this.server.processBindings({bindings:n})}buildEntryFunctionCallBinding(t,e=g.MAIN_NET){let n=_(t);for(let r of n){let o=[u(r.package),r.module,r.function].join(D);for(let i of this.server.contractConfigs)if(i.contract?.chainId===e){for(let c of i.moveCallConfigs)for(let d of c.filters)if(u(i.contract.address)+"::"+d.function===o)return{data:{suiCall:{transaction:t,timestamp:new Date,slot:10000n}},handlerIds:[c.handlerId],handlerType:a.SUI_CALL}}}}testEvent(t,e=g.MAIN_NET){let n=this.buildEventBinding(t,e);if(!n)throw Error("Invalid test event: "+JSON.stringify(t));return this.server.processBinding(n)}testGlobalTransaction(t,e=g.MAIN_NET){let n=[];for(let o of this.server.contractConfigs)if(o.contract?.address==="*")for(let i of o.moveCallConfigs)i.filters.length===1&&i.filters[0].function===""&&n.push(i.handlerId);if(n.length===0)throw Error("Invalid test global transaction: "+JSON.stringify(t));let r={handlerIds:n,handlerType:a.SUI_CALL,data:{suiCall:{transaction:t,timestamp:t.timestampMs?new Date(t.timestampMs):new Date,slot:BigInt(t.checkpoint||0)}}};return this.server.processBinding(r)}buildEventBinding(t,e=g.MAIN_NET){for(let n of this.server.contractConfigs)if(n.contract?.chainId===e){for(let r of n.moveEventConfigs)for(let o of r.filters)for(let i of t.events||[])if(u(n.contract.address)+"::"+o.type===E(i.type).qname)return{data:{suiEvent:{transaction:t,timestamp:new Date(t.timestampMs||0),slot:10000n}},handlerIds:[r.handlerId],handlerType:a.SUI_EVENT}}}};import("process").then(s=>s.stdout.write(""));var N=class{server;constructor(t){this.server=t}testOnTransaction(t,e=F.TEST_NET){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test transaction: "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===e){for(let o of r.fuelCallConfigs){let i={data:{fuelCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:a.FUEL_CALL},c=o.filters[0]?.function;if(c)for(let d of t.status.receipts||[])d.receiptType=="CALL"&&d.param1==c&&n.push(i);else n.push(i)}for(let o of r.fuelLogConfigs){let i={data:{fuelCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:a.FUEL_CALL},c=o.logIds;for(let d of t.status.receipts||[])if((d.receiptType=="LOG"||d.receiptType=="LOG_DATA")&&c.includes(d.rb)){n.push(i);break}}for(let o of r.assetConfigs){let i={data:{fuelCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:a.FUEL_CALL};n.push(i)}}return n}};import("process").then(s=>s.stdout.write(""));var R=h(m(),1),x={INJECTIVE_MAINNET:R.CosmosChainId.INJECTIVE_MAINNET,INJECTIVE_TESTNET:R.CosmosChainId.INJECTIVE_TESTNET};import("process").then(s=>s.stdout.write(""));var P=class{server;constructor(t){this.server=t}testOnTransaction(t,e=x.INJECTIVE_TESTNET){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test transaction: "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===e)for(let o of r.cosmosLogConfigs){let i={data:{cosmosCall:{transaction:t,timestamp:new Date}},handlerIds:[o.handlerId],handlerType:a.COSMOS_CALL},c=o.logFilters;for(let d of t.logs||[])if(d.events.find(l=>c.includes(l.type))){n.push(i);break}}return n}};import("process").then(s=>s.stdout.write(""));var O=h(m(),1),y=class{server;constructor(t){this.server=t}testOnEvents(t,e=O.StarknetChainId.STARKNET_SEPOLIA){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test : "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[],r=Array.isArray(t)?t:[t];for(let o of r)for(let i of this.server.contractConfigs)if(i.contract?.chainId===e)for(let c of i.starknetEventConfigs){let d={data:{starknetEvents:{result:o,timestamp:new Date}},handlerIds:[c.handlerId],handlerType:a.STARKNET_EVENT},l=c.filters,p=o.keys;for(let w of p)for(let J of l)if(J.keys.includes(w))return n.push(d),n}return n}};import("process").then(s=>s.stdout.write(""));var H=h(m(),1);var b=class{server;constructor(t){this.server=t}testOnTransactions(t,e=H.BTCChainId.BTC_TESTNET){let n=this.buildBinding(t,e);if(!n)throw Error("Invalid test : "+JSON.stringify(t));return this.server.processBindings({bindings:n})}buildBinding(t,e){let n=[];for(let r of this.server.contractConfigs)if(r.contract?.chainId===e)for(let o of r.btcTransactionConfigs){let i={data:{btcTransaction:t},handlerIds:[o.handlerId],handlerType:a.BTC_TRANSACTION};n.push(i)}return n}};import("process").then(s=>s.stdout.write(""));var C={};function K(){j.reset()}var k=class{service;contractConfigs;accountConfigs;aptos;eth;solana;sui;fuel;cosmos;starknet;btc;constructor(t,e={}){K(),this.service=new G(t),this.aptos=new I(this),this.solana=new v(this),this.eth=new B(this),this.sui=new S(this),this.fuel=new N(this),this.cosmos=new P(this),this.starknet=new y(this),this.btc=new b(this);for(let n in U.CHAIN_MAP){let r=e[n]||"";q.INSTANCE.chainServer.set(n,r)}}async start(t={templateInstances:[]},e=C){let n=await this.service.start(t,e),r=await this.getConfig({});return this.contractConfigs=r.contractConfigs,this.accountConfigs=r.accountConfigs,n}stop(t,e=C){return this.service.stop(t,e)}getConfig(t,e=C){return this.service.getConfig(t,e)}processBindings(t,e=C){return this.service.processBindings(t,e)}processBinding(t,e=C){return this.service.processBindings({bindings:[t]},e)}processBindingsStream(t,e){throw new Error("Method not implemented.")}preprocessBindingsStream(t,e){throw new Error("Method not implemented.")}};import("process").then(s=>s.stdout.write(""));function A(s){if(s!==void 0){if(s.doubleValue!==void 0)return s.doubleValue;if(s.bigInteger!==void 0){let t=M(s.bigInteger.data);return s.bigInteger.negative&&(t=-t),t}if(s.bigDecimal!==void 0)return new L(s.bigDecimal)}}function X(s,t){if(s){for(let e of s.counters)if(e.metadata?.name===t)return A(e.metricValue)}}function z(s,t){if(s){for(let e of s.gauges)if(e.metadata?.name===t)return A(e.metricValue)}}import("process").then(s=>s.stdout.write(""));var V=h(m(),1);import{Endpoints as Q}from"@sentio/runtime";function W(s){let t=[];Array.isArray(s)||(s=[s]);for(let e of Object.keys(V.CHAIN_MAP)){let n="TEST_ENDPOINT_"+e,r=process.env[n];r&&(t.push(e),Q.INSTANCE.chainServer.set(e,r))}for(let e of s)if(!t.includes(e))return!1;return!0}import("process").then(s=>s.stdout.write(""));import("process").then(s=>s.stdout.write(""));export{A as MetricValueToNumber,k as TestProcessorServer,X as firstCounterValue,z as firstGaugeValue,W as loadTestProvidersFromEnv};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/lib/utils/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l}from"../chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l}from"../chunk-EMGLFW2R.js";import"../chunk-QNAN3L7E.js";import"../chunk-HKWSZOP2.js";import"../chunk-MB4EAYM4.js";import"../chunk-OUOSDGWD.js";import"../chunk-QW2MPHP5.js";import"../chunk-24SCJPBI.js";import"../chunk-GU4UN43Q.js";import"../chunk-CA6DKOT2.js";import"../chunk-NDC6HDQD.js";import"../chunk-WZLM66YL.js";import"../chunk-2BO4GGPL.js";import"../chunk-FC546GTB.js";import"../chunk-6GD6B22G.js";export{f as EthereumDexPrice,d as PriceUnit,g as SepoliaDexPrice,b as bytesToBigInt,a as estimateBlockNumberAtDate,k as getCoinsThatHasPrice,e as getPackageRoot,j as getPriceBySymbol,i as getPriceByType,h as getPriceClient,l as ignoreEthCallException,c as token};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../src/utils/metrics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAGpD,eAAO,MAAM,cAAc,2BAAkC,CAAA;AAE7D,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,KAAK,YAAY,CAAC,CAAC,CAAC,CAgBjE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentio/sdk-bundle",
|
|
3
|
-
"version": "2.45.
|
|
3
|
+
"version": "2.45.1-rc.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"!{lib,src}/*/tests"
|
|
49
49
|
],
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@sentio/runtime": "^2.45.
|
|
51
|
+
"@sentio/runtime": "^2.45.1-rc.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {},
|
|
54
54
|
"devDependencies": {},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ListStateStorage } from '@sentio/runtime'
|
|
1
|
+
import { ListStateStorage, processMetrics } from '@sentio/runtime'
|
|
2
2
|
import { TemplateInstanceState } from '../core/template.js'
|
|
3
3
|
import { AptosResourcesContext } from './context.js'
|
|
4
4
|
import { AptosBindOptions } from './network.js'
|
|
@@ -27,6 +27,7 @@ export class AptosResourceProcessorTemplate {
|
|
|
27
27
|
constructor() {
|
|
28
28
|
this.id = AptosResourceProcessorTemplateState.INSTANCE.getValues().length
|
|
29
29
|
AptosResourceProcessorTemplateState.INSTANCE.addValue(this)
|
|
30
|
+
processMetrics.process_template_count.add(1)
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
createProcessor(options: AptosBindOptions): AptosResourcesProcessor {
|
|
@@ -4,7 +4,7 @@ import { BaseProcessor, defaultPreprocessHandler } from './base-processor.js'
|
|
|
4
4
|
import { BindOptions, getOptionsSignature } from './bind-options.js'
|
|
5
5
|
import { EthFetchConfig, HandleInterval, TemplateInstance, PreprocessResult } from '@sentio/protos'
|
|
6
6
|
import { PromiseOrVoid } from '../core/promises.js'
|
|
7
|
-
import { ListStateStorage } from '@sentio/runtime'
|
|
7
|
+
import { ListStateStorage, processMetrics } from '@sentio/runtime'
|
|
8
8
|
import { BlockParams } from 'ethers/providers'
|
|
9
9
|
import { DeferredTopicFilter } from 'ethers/contract'
|
|
10
10
|
import { TypedEvent, TypedCallTrace } from './eth.js'
|
|
@@ -57,6 +57,7 @@ export abstract class BaseProcessorTemplate<
|
|
|
57
57
|
constructor() {
|
|
58
58
|
this.id = ProcessorTemplateProcessorState.INSTANCE.getValues().length
|
|
59
59
|
ProcessorTemplateProcessorState.INSTANCE.addValue(this)
|
|
60
|
+
processMetrics.process_template_count.add(1)
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from 'node:async_hooks'
|
|
1
2
|
import { BaseContract, DeferredTopicFilter, LogDescription, TransactionResponseParams } from 'ethers'
|
|
2
3
|
|
|
3
4
|
import { BoundContractView, ContractContext, ContractView, GlobalContext } from './context.js'
|
|
@@ -20,6 +21,7 @@ import { fixEmptyKey, formatEthData, RichBlock, Trace, TypedCallTrace, TypedEven
|
|
|
20
21
|
import sha3 from 'js-sha3'
|
|
21
22
|
import { ListStateStorage } from '@sentio/runtime'
|
|
22
23
|
import { EthChainId } from '@sentio/chain'
|
|
24
|
+
import { metricsStorage, handlersProxy } from '../utils/metrics.js'
|
|
23
25
|
|
|
24
26
|
export interface AddressOrTypeEventFilter extends DeferredTopicFilter {
|
|
25
27
|
addressType?: AddressType
|
|
@@ -379,6 +381,22 @@ export abstract class BaseProcessor<
|
|
|
379
381
|
if (config.endBlock) {
|
|
380
382
|
this.config.endBlock = BigInt(config.endBlock)
|
|
381
383
|
}
|
|
384
|
+
|
|
385
|
+
this.blockHandlers = new Proxy(this.blockHandlers, handlersProxy())
|
|
386
|
+
this.eventHandlers = new Proxy(this.eventHandlers, handlersProxy())
|
|
387
|
+
this.traceHandlers = new Proxy(this.traceHandlers, handlersProxy())
|
|
388
|
+
|
|
389
|
+
return new Proxy(this, {
|
|
390
|
+
get: (target, prop, receiver) => {
|
|
391
|
+
return metricsStorage.run(metricsStorage.getStore() || prop.toString(), () => {
|
|
392
|
+
const fn = (target as any)[prop]
|
|
393
|
+
if (typeof fn == 'function') {
|
|
394
|
+
return AsyncLocalStorage.bind((...args: any) => fn.apply(receiver, args))
|
|
395
|
+
}
|
|
396
|
+
return Reflect.get(target, prop, receiver)
|
|
397
|
+
})
|
|
398
|
+
}
|
|
399
|
+
})
|
|
382
400
|
}
|
|
383
401
|
|
|
384
402
|
protected abstract CreateBoundContractView(): TBoundContractView
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from 'node:async_hooks'
|
|
2
|
+
import { processMetrics } from '@sentio/runtime'
|
|
3
|
+
|
|
4
|
+
export const metricsStorage = new AsyncLocalStorage<string>()
|
|
5
|
+
|
|
6
|
+
export function handlersProxy<T extends object>(): ProxyHandler<T> {
|
|
7
|
+
return {
|
|
8
|
+
set: (target, prop, value, receiver) => {
|
|
9
|
+
if (value.handler) {
|
|
10
|
+
const handlerName = metricsStorage.getStore()
|
|
11
|
+
const handler = value.handler
|
|
12
|
+
value.handler = async (...args: any) => {
|
|
13
|
+
const startTs = Date.now()
|
|
14
|
+
const res = await handler(...args)
|
|
15
|
+
processMetrics.process_handler_duration.record(Date.now() - startTs, { handler: handlerName })
|
|
16
|
+
return res
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return Reflect.set(target, prop, value, receiver)
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|