@sentio/sdk-bundle 2.40.2-rc.2 → 2.41.0-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/builtin/0x1.js +1 -1
- package/lib/aptos/builtin/0x3.js +1 -1
- package/lib/aptos/builtin/index.js +1 -1
- package/lib/aptos/codegen/index.js +1 -1
- package/lib/aptos/ext/index.js +1 -1
- package/lib/aptos/index.js +1 -1
- package/lib/{chunk-YSIRZN5R.js → chunk-2B7T7ZQC.js} +2 -2
- package/lib/{chunk-3SIHUEOL.js → chunk-2MPTHBNK.js} +2 -2
- package/lib/{chunk-XTCOAXZ5.js → chunk-BEPQ76K7.js} +2 -2
- package/lib/{chunk-RVQ3CWCA.js → chunk-DJTFWVND.js} +2 -2
- package/lib/{chunk-FIKV2W35.js → chunk-DYYBLGB6.js} +2 -2
- package/lib/{chunk-HGQB674R.js → chunk-HUWVEJAW.js} +2 -2
- package/lib/{chunk-3PL7HVAM.js → chunk-JATD5IYX.js} +2 -2
- package/lib/{chunk-3U3ONZCE.js → chunk-JHUZNSX5.js} +2 -2
- package/lib/chunk-MU5GNHEP.js +3 -0
- package/lib/chunk-MU5GNHEP.js.map +1 -0
- package/lib/{chunk-UIJIPDZR.js → chunk-OJNBQE6P.js} +2 -2
- package/lib/{chunk-P4TSAHPX.js → chunk-PTVGF3KH.js} +2 -2
- package/lib/{chunk-OJQ3RVC4.js → chunk-RNPQHMMK.js} +2 -2
- package/lib/{chunk-G6LDP4TH.js → chunk-TI7EPCKS.js} +2 -2
- package/lib/{chunk-NJEZLW52.js → chunk-UAXO6AAE.js} +2 -2
- package/lib/{chunk-7ZTSTQEQ.js → chunk-W2ZUZZ6P.js} +2 -2
- package/lib/{chunk-NV2T3INF.js → chunk-XFEQ4ICE.js} +2 -2
- package/lib/{chunk-QQUKR766.js → chunk-XTURBU3W.js} +2 -2
- package/lib/{chunk-O2CR53AR.js → chunk-YDN4Y3SM.js} +2 -2
- 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/codegen/index.js +1 -1
- package/lib/eth/index.js +1 -1
- package/lib/fuel/index.js +1 -1
- package/lib/solana/builtin/index.js +1 -1
- package/lib/solana/index.js +1 -1
- package/lib/stark/codegen/index.js +1 -1
- package/lib/stark/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/codegen/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/package.json +2 -2
- package/lib/chunk-GAETTSNN.js +0 -3
- package/lib/chunk-GAETTSNN.js.map +0 -1
- /package/lib/{chunk-YSIRZN5R.js.map → chunk-2B7T7ZQC.js.map} +0 -0
- /package/lib/{chunk-3SIHUEOL.js.map → chunk-2MPTHBNK.js.map} +0 -0
- /package/lib/{chunk-XTCOAXZ5.js.map → chunk-BEPQ76K7.js.map} +0 -0
- /package/lib/{chunk-RVQ3CWCA.js.map → chunk-DJTFWVND.js.map} +0 -0
- /package/lib/{chunk-FIKV2W35.js.map → chunk-DYYBLGB6.js.map} +0 -0
- /package/lib/{chunk-HGQB674R.js.map → chunk-HUWVEJAW.js.map} +0 -0
- /package/lib/{chunk-3PL7HVAM.js.map → chunk-JATD5IYX.js.map} +0 -0
- /package/lib/{chunk-3U3ONZCE.js.map → chunk-JHUZNSX5.js.map} +0 -0
- /package/lib/{chunk-UIJIPDZR.js.map → chunk-OJNBQE6P.js.map} +0 -0
- /package/lib/{chunk-P4TSAHPX.js.map → chunk-PTVGF3KH.js.map} +0 -0
- /package/lib/{chunk-OJQ3RVC4.js.map → chunk-RNPQHMMK.js.map} +0 -0
- /package/lib/{chunk-G6LDP4TH.js.map → chunk-TI7EPCKS.js.map} +0 -0
- /package/lib/{chunk-NJEZLW52.js.map → chunk-UAXO6AAE.js.map} +0 -0
- /package/lib/{chunk-7ZTSTQEQ.js.map → chunk-W2ZUZZ6P.js.map} +0 -0
- /package/lib/{chunk-NV2T3INF.js.map → chunk-XFEQ4ICE.js.map} +0 -0
- /package/lib/{chunk-QQUKR766.js.map → chunk-XTURBU3W.js.map} +0 -0
- /package/lib/{chunk-O2CR53AR.js.map → chunk-YDN4Y3SM.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{a as te}from"./chunk-
|
|
2
|
+
import{a as te}from"./chunk-MU5GNHEP.js";import{D as k,Hb as W,Ib as v,Ic as q,Jb as N,Kb as z,Lb as L,Mb as G,Nc as ee,Pb as U,Qb as K,Rb as Q,Sb as y,Tb as X,Ub as Y,Vb as Z,W as J,Xb as $,nc as ce}from"./chunk-3VPV7RP4.js";import{g as C,l as D}from"./chunk-H5VPHIYT.js";import{e as B,g as j}from"./chunk-LLHU72AA.js";import{errorString as ge,GLOBAL_CONFIG as pe,mergeProcessResults as me,Plugin as he,PluginManager as Fe,USER_PROCESSOR as Ce}from"@sentio/runtime";var P=B(ce(),1);import{ListStateStorage as le}from"@sentio/runtime";var O=class extends le{},p=O;j(p,"INSTANCE",new O);var M=B(te(),1);var de={MAIN_NET:M.FuelChainId.FUEL_MAINNET,TEST_NET:M.FuelChainId.FUEL_TESTNET};function x(o){switch(o){case de.TEST_NET:return"https://testnet.fuel.network/v1/graphql"}return Z}var R=class extends X{constructor(t,s,n,r,a){super(t,s,n);this.args=r;this.logs=a}},m=class extends q{constructor(t,s,n,r){super({});this.chainId=t;this.contractAddress=s;this.contractName=n;this.transaction=r}logIndex=-1;getChainId(){return this.chainId}setLogIndex(t){this.logIndex=t}getMetaDataInternal(t,s){return{address:this.contractAddress,contractName:this.contractName,blockNumber:BigInt(this.transaction?.blockNumber||0),transactionIndex:0,transactionHash:this.transaction?.id||"",chainId:this.getChainId(),name:t,logIndex:this.logIndex,labels:$(s)}}};var w={includeFailed:!1};function se(o,e){for(let t of o||[])if(t.type==N.Coin&&t.assetId==e)return t.owner}function E(o,e){let t=D(o.rawPayload),s=o?.status.receipts?.map(U)||[],[n]=new G().decode(t,0),{gasCosts:r,feeParameters:a,txParameters:c,baseAssetId:g}=e.getChain().consensusParameters,u=o.status?.block?.header?.height,{gasPriceFactor:i,gasPerByte:l}=a,{maxInputs:d,maxGasPerTx:h}=c,f={type:o.status?.__typename,...o.status};return{...K({id:o.id,receipts:s,transaction:n,transactionBytes:t,gqlTransactionStatus:f,gasPerByte:C(l),gasPriceFactor:C(i),maxInputs:d,gasCosts:r,gasPrice:C(o.gasPrice),maxGasPerTx:h,baseAssetId:g}),blockNumber:u,sender:se(n.inputs,g)}}async function H(o,e,t){let s=D(o.rawPayload),[n]=new G().decode(s,0),r=o?.status.receipts?.map(U)||[],a={type:o.status?.__typename,...o.status},c=a?.block?.header?.height,g=Object.values(e)[0],u=[];r.forEach((d,h)=>{if(d.type===L.LogData||d.type===L.Log){let f=new v(g),F=d.type===L.Log?new W("u64").encode(d.val0):d.data,A=d.val1.toString(),[_]=f.decodeLog(F,A);u.push({logId:A,data:_,receiptIndex:h})}});let i=new Q(o.id,t,{main:Object.values(e)[0],otherContractsAbis:{}});return i.gqlTransaction={...o,status:a},{...await i.getTransactionSummary(),blockNumber:c,logs:u,sender:se(n.inputs,t.getChain().consensusParameters.baseAssetId)}}var T=class{constructor(e){this.config=e}callHandlers=[];provider;static bind(e){let t=new T(e);return p.INSTANCE.addValue(t),t}async configure(){let e=x(this.config.chainId);this.provider=await y.create(e)}onTransfer(e,t){let s=[],n=V(e.assetId),r=V(e.from),a=V(e.to);for(let g of n)for(let u of r)for(let i of a)s.push({assetId:g,fromAddress:u,toAddress:i});let c={handler:async g=>{let u=g.transaction,i=E(u,this.provider),l={from:[],to:[]};for(let f of i.transaction.inputs||[])f.type==N.Coin&&l.from.push({address:f.owner,assetId:f.assetId});for(let f of i.transaction.outputs||[])if(f.type==z.Coin){let F=f.amount.toString(10);l.to.push({address:f.to,amount:BigInt(F),assetId:f.assetId})}let d=l.from[0].assetId||"",h=new m(this.config.chainId,d,this.config.name??"",i);return await t(l,h),h.stopAndGetResult()},assetConfig:{filters:s}};return this.callHandlers.push(c),this}};function V(o){return o?Array.isArray(o)?o.length>0?o:[void 0]:[o]:[void 0]}import{mergeProcessResults as ue}from"@sentio/runtime";var I=class{constructor(e){this.config=e}callHandlers=[];provider;static bind(e){let t=new I(e);return p.INSTANCE.addValue(t),t}latestGasPrice;async configure(){let e=x(this.config.chainId);this.provider=await y.create(e),this.provider.getLatestGasPrice=async()=>{if(this.latestGasPrice)return C(this.latestGasPrice);let{latestGasPrice:t}=await this.provider.operations.getLatestGasPrice();return this.latestGasPrice=t?.gasPrice,C(t.gasPrice)}}onTransaction(e,t=w){let s={handler:async n=>{let r=this.config.abi?{[this.config.address]:this.config.abi}:{},a=await H(n.transaction,r,this.provider),c=new m(this.config.chainId,this.config.address,this.config.name??this.config.address,a);return await e(a,c),c.stopAndGetResult()},fetchConfig:{filters:[],...t}};return this.callHandlers.push(s),this}onCall(e,t,s=w){let n=new Set(Array.isArray(e)?e:[e]);if(!this.config.abi)throw new Error("ABI must be provided to use onCall");let r=this.config.abi,a={},c=new v(r);for(let u of n)try{let i=c.functions[u],l=C(i.selector,"hex").toString();a[i.name]={function:l,includeFailed:!!s.includeFailed}}catch(i){console.error(i)}let g={handler:async u=>{try{let i=new Y(this.config.address,r,this.provider),l=u.transaction,d=await H(l,{[this.config.address]:r},this.provider),h=new m(this.config.chainId,this.config.address,this.config.name??this.config.address,d);for(let f of d.operations)for(let F of f.calls||[])if(n.has(F.functionName)){let A=i.functions[F.functionName],_=Object.values(F.argumentsProvided||{}),ae=A(..._),ie=new R(ae,d,!1,F.argumentsProvided,d.logs);await t(ie,h)}return h.stopAndGetResult()}catch(i){return console.error(i),{gauges:[],counters:[],events:[],exports:[],states:{configUpdated:!1}}}},fetchConfig:{filters:Object.values(a)}};return this.callHandlers.push(g),this}onLog(e,t){let s=new Set(Array.isArray(e)?e:[e]),n={handler:async r=>{try{let a=r.transaction,c=await H(a,{[this.config.address]:this.config.abi},this.provider),g=[],u=(c.logs||[]).filter(i=>s.has(i.logId));for(let i of u){let l=new m(this.config.chainId,this.config.address,this.config.name??this.config.address,c);l.setLogIndex(i.receiptIndex),await t(i,l),g.push(l.stopAndGetResult())}return ue(g)}catch(a){return console.error(a),{gauges:[],counters:[],events:[],exports:[],states:{configUpdated:!1}}}},logConfig:{logIds:Array.from(s)}};return this.callHandlers.push(n),this}};import{mergeProcessResults as fe}from"@sentio/runtime";var b=class{constructor(e){this.config=e}callHandlers=[];provider;static bind(e){let t=new b(e);return p.INSTANCE.addValue(t),t}async configure(){let e=x(this.config.chainId);this.provider=await y.create(e)}onTransaction(e,t=w){let s={handler:async n=>{let r;try{r=E(n.transaction,this.provider)}catch(c){return console.error("error decoding transaction",c),fe([])}let a=new m(this.config.chainId,"*",this.config.name??"*",r);return await e(r,a),a.stopAndGetResult()},fetchConfig:{filters:[],...t}};return this.callHandlers.push(s),this}};var S=class extends he{name="FuelPlugin";handlers={callHandlers:[]};async configure(e){let t={callHandlers:[]};for(let s of p.INSTANCE.getValues()){await s.configure();let n=J.fromPartial({processorType:Ce,contract:{name:s.config.name,chainId:s.config.chainId.toString(),address:s.config.address||"*",abi:""},startBlock:s.config.startBlock,endBlock:s.config.endBlock});for(let r of s.callHandlers){let a=t.callHandlers.push(r.handler)-1;if(s instanceof I)if(r.logConfig?.logIds?.length)n.fuelLogConfigs.push({logIds:r.logConfig.logIds,handlerId:a});else{let c={handlerId:a,filters:r.fetchConfig?.filters||[]};n.fuelCallConfigs.push(c)}else if(s instanceof T){let c=r.assetConfig;n.assetConfigs.push({filters:c?.filters||[],handlerId:a})}else if(s instanceof b){let c={handlerId:a,filters:[]};n.fuelCallConfigs.push(c),n.contract.address="*"}}e.contractConfigs.push(n)}this.handlers=t}supportedHandlers=[k.FUEL_CALL];processBinding(e){switch(e.handlerType){case k.FUEL_CALL:return this.processTransaction(e);default:throw new P.ServerError(P.Status.INVALID_ARGUMENT,"No handle type registered "+e.handlerType)}}async start(e){}stateDiff(e){return ee.INSTANCE.getValues().length!==e.templateInstances.length}async processTransaction(e){if(!e.data?.fuelCall?.transaction)throw new P.ServerError(P.Status.INVALID_ARGUMENT,"transaction can't be null");let t=e.data.fuelCall,s=[];for(let n of e.handlerIds){let r=this.handlers.callHandlers[n](t).catch(a=>{throw new P.ServerError(P.Status.INTERNAL,"error processing transaction: "+JSON.stringify(t.transaction)+`
|
|
3
3
|
`+ge(a))});pe.execution.sequential&&await r,s.push(r)}return me(await Promise.all(s))}};Fe.INSTANCE.register(new S);var ne=B(te(),1);var oe=class extends I{constructor(e,t){t||(t={chainId:ne.FuelChainId.FUEL_MAINNET,address:"*"}),t.abi=e,super(t),p.INSTANCE.addValue(this)}},re=class{args;returnValue;argsObject;logs;constructor(e){this.args=e.functionScopes[0].getCallConfig().args,this.returnValue=e.value,this.argsObject=e.args,this.logs=e.logs}};export{p as a,de as b,x as c,R as d,m as e,w as f,E as g,H as h,T as i,I as j,b as k,S as l,oe as m,re as n};
|
|
4
|
-
//# sourceMappingURL=chunk-
|
|
4
|
+
//# sourceMappingURL=chunk-HUWVEJAW.js.map
|