@sentio/sdk-bundle 2.44.3 → 2.44.4-rc.2

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.
Files changed (69) hide show
  1. package/lib/aptos/builtin/0x1.js +1 -1
  2. package/lib/aptos/builtin/0x3.js +1 -1
  3. package/lib/aptos/builtin/index.js +1 -1
  4. package/lib/aptos/codegen/index.js +9 -9
  5. package/lib/aptos/codegen/index.js.map +1 -1
  6. package/lib/aptos/ext/index.js +1 -1
  7. package/lib/aptos/index.js +1 -1
  8. package/lib/aptos/network.d.ts.map +1 -1
  9. package/lib/{chunk-JSAYWFRM.js → chunk-6VELGYNR.js} +2 -2
  10. package/lib/{chunk-Z46LGJE2.js → chunk-ABLESLV7.js} +2 -2
  11. package/lib/{chunk-LWWZZ3VD.js → chunk-B7YDBLBV.js} +2 -2
  12. package/lib/{chunk-AZTU3RH7.js → chunk-CPSB2UZQ.js} +2 -2
  13. package/lib/{chunk-Y6QA2AK2.js → chunk-F7Q5QB6Q.js} +2 -2
  14. package/lib/{chunk-Z3BDII4O.js → chunk-G3ZGY3OS.js} +2 -2
  15. package/lib/{chunk-4XUN2MHT.js → chunk-HDNVG6V3.js} +2 -2
  16. package/lib/{chunk-BTKJOALH.js → chunk-IOV7WAT6.js} +2 -2
  17. package/lib/{chunk-RCUUZHUG.js → chunk-MAXAKVBP.js} +12 -12
  18. package/lib/{chunk-RCUUZHUG.js.map → chunk-MAXAKVBP.js.map} +1 -1
  19. package/lib/{chunk-LTVKTBHO.js → chunk-MB75AKO3.js} +2 -2
  20. package/lib/{chunk-CNL6UJ7C.js → chunk-QUNXEV6Z.js} +2 -2
  21. package/lib/{chunk-AQU5WWON.js → chunk-QW2MPHP5.js} +2 -2
  22. package/lib/{chunk-AQU5WWON.js.map → chunk-QW2MPHP5.js.map} +1 -1
  23. package/lib/{chunk-YW7MDOGO.js → chunk-RVQBDYQ2.js} +2 -2
  24. package/lib/{chunk-V7BXBDG7.js → chunk-VO57HTCG.js} +2 -2
  25. package/lib/{chunk-E333Q3OG.js → chunk-WQV3TSRA.js} +2 -2
  26. package/lib/{chunk-GR3GN3NC.js → chunk-YVDAQU2U.js} +2 -2
  27. package/lib/{chunk-TIOVAWYM.js → chunk-YX4LDK5Y.js} +2 -2
  28. package/lib/{chunk-4ADBI657.js → chunk-ZI5N3H3K.js} +2 -2
  29. package/lib/eth/builtin/eacaggregatorproxy.js +1 -1
  30. package/lib/eth/builtin/erc1155.js +1 -1
  31. package/lib/eth/builtin/erc20.js +1 -1
  32. package/lib/eth/builtin/erc721.js +1 -1
  33. package/lib/eth/builtin/index.js +1 -1
  34. package/lib/eth/builtin/weth9.js +1 -1
  35. package/lib/eth/codegen/index.js +1 -1
  36. package/lib/eth/index.js +1 -1
  37. package/lib/fuel/index.js +1 -1
  38. package/lib/solana/builtin/index.js +1 -1
  39. package/lib/solana/index.js +1 -1
  40. package/lib/stark/codegen/index.js +1 -1
  41. package/lib/stark/index.js +1 -1
  42. package/lib/sui/builtin/0x1.js +1 -1
  43. package/lib/sui/builtin/0x2.js +1 -1
  44. package/lib/sui/builtin/0x3.js +1 -1
  45. package/lib/sui/builtin/index.js +1 -1
  46. package/lib/sui/codegen/index.js +1 -1
  47. package/lib/sui/ext/index.js +1 -1
  48. package/lib/sui/index.js +1 -1
  49. package/lib/testing/index.js +1 -1
  50. package/lib/utils/index.js +1 -1
  51. package/package.json +2 -2
  52. package/src/aptos/codegen/codegen.ts +11 -5
  53. package/src/aptos/network.ts +5 -2
  54. /package/lib/{chunk-JSAYWFRM.js.map → chunk-6VELGYNR.js.map} +0 -0
  55. /package/lib/{chunk-Z46LGJE2.js.map → chunk-ABLESLV7.js.map} +0 -0
  56. /package/lib/{chunk-LWWZZ3VD.js.map → chunk-B7YDBLBV.js.map} +0 -0
  57. /package/lib/{chunk-AZTU3RH7.js.map → chunk-CPSB2UZQ.js.map} +0 -0
  58. /package/lib/{chunk-Y6QA2AK2.js.map → chunk-F7Q5QB6Q.js.map} +0 -0
  59. /package/lib/{chunk-Z3BDII4O.js.map → chunk-G3ZGY3OS.js.map} +0 -0
  60. /package/lib/{chunk-4XUN2MHT.js.map → chunk-HDNVG6V3.js.map} +0 -0
  61. /package/lib/{chunk-BTKJOALH.js.map → chunk-IOV7WAT6.js.map} +0 -0
  62. /package/lib/{chunk-LTVKTBHO.js.map → chunk-MB75AKO3.js.map} +0 -0
  63. /package/lib/{chunk-CNL6UJ7C.js.map → chunk-QUNXEV6Z.js.map} +0 -0
  64. /package/lib/{chunk-YW7MDOGO.js.map → chunk-RVQBDYQ2.js.map} +0 -0
  65. /package/lib/{chunk-V7BXBDG7.js.map → chunk-VO57HTCG.js.map} +0 -0
  66. /package/lib/{chunk-E333Q3OG.js.map → chunk-WQV3TSRA.js.map} +0 -0
  67. /package/lib/{chunk-GR3GN3NC.js.map → chunk-YVDAQU2U.js.map} +0 -0
  68. /package/lib/{chunk-TIOVAWYM.js.map → chunk-YX4LDK5Y.js.map} +0 -0
  69. /package/lib/{chunk-4ADBI657.js.map → chunk-ZI5N3H3K.js.map} +0 -0
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{B as C,S,T as I,U as u,b as d,g as y,h as A,j as c,r as w,u as T,v as m,w as R,x as P,z as O}from"./chunk-Y6QA2AK2.js";import{d as N,g as B}from"./chunk-6GD6B22G.js";var W={};N(W,{ERC1155BoundContractView:()=>f,ERC1155ContractView:()=>x,ERC1155Processor:()=>g,ERC1155ProcessorTemplate:()=>F,ERC1155__factory:()=>C,getERC1155Contract:()=>p,getERC1155ContractOnContext:()=>U,mockApprovalForAllLog:()=>D,mockTransferBatchLog:()=>j,mockTransferSingleLog:()=>L,mockURILog:()=>V});var l=C.connect("0x0",I),tt=new d(["function balanceOf(address account, uint256 id) view returns (uint256)","function balanceOfBatch(address[] accounts, uint256[] ids) view returns (uint256[])","function isApprovedForAll(address account, address operator) view returns (bool)","function safeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] amounts, bytes data) returns ()","function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes data) returns ()","function setApprovalForAll(address operator, bool approved) returns ()","function supportsInterface(bytes4 interfaceId) view returns (bool)","function uri(uint256 id) view returns (string)"]),x=class extends y{constructor(t){super(t),this.callStatic.contract=t}async balanceOf(t,e,r,n,a){try{return await this.contract.getFunction("balanceOf(address,uint256)")(t,e,r||{})}catch(o){let i=new Error().stack;throw c(o,void 0,i)}}async balanceOfBatch(t,e,r,n,a){try{return await this.contract.getFunction("balanceOfBatch(address[],uint256[])")(t,e,r||{})}catch(o){let i=new Error().stack;throw c(o,void 0,i)}}async isApprovedForAll(t,e,r,n,a){try{return await this.contract.getFunction("isApprovedForAll(address,address)")(t,e,r||{})}catch(o){let i=new Error().stack;throw c(o,void 0,i)}}async supportsInterface(t,e,r,n){try{return await this.contract.getFunction("supportsInterface(bytes4)")(t,e||{})}catch(a){let o=new Error().stack;throw c(a,void 0,o)}}async uri(t,e,r,n){try{return await this.contract.getFunction("uri(uint256)")(t,e||{})}catch(a){let o=new Error().stack;throw c(a,void 0,o)}}callStatic={contract:this.contract,async safeBatchTransferFrom(t,e,r,n,a,o,i,h){try{return await this.contract.getFunction("safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)").staticCall(t,e,r,n,a,o||{})}catch(E){let v=new Error().stack;throw c(E,void 0,v)}},async safeTransferFrom(t,e,r,n,a,o,i,h){try{return await this.contract.getFunction("safeTransferFrom(address,address,uint256,uint256,bytes)").staticCall(t,e,r,n,a,o||{})}catch(E){let v=new Error().stack;throw c(E,void 0,v)}},async setApprovalForAll(t,e,r,n,a){try{return await this.contract.getFunction("setApprovalForAll(address,bool)").staticCall(t,e,r||{})}catch(o){let i=new Error().stack;throw c(o,void 0,i)}}};encodeCall={balanceOf(t,e,r){try{let a=new d(["function balanceOf(address,uint256)"]).encodeFunctionData("balanceOf",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw c(n,void 0,a)}},balanceOfBatch(t,e,r){try{let a=new d(["function balanceOfBatch(address[],uint256[])"]).encodeFunctionData("balanceOfBatch",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw c(n,void 0,a)}},isApprovedForAll(t,e,r){try{let a=new d(["function isApprovedForAll(address,address)"]).encodeFunctionData("isApprovedForAll",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw c(n,void 0,a)}},safeBatchTransferFrom(t,e,r,n,a,o){try{let h=new d(["function safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)"]).encodeFunctionData("safeBatchTransferFrom",[t,e,r,n,a]);return{context:o,calldata:h}}catch(i){let h=new Error().stack;throw c(i,void 0,h)}},safeTransferFrom(t,e,r,n,a,o){try{let h=new d(["function safeTransferFrom(address,address,uint256,uint256,bytes)"]).encodeFunctionData("safeTransferFrom",[t,e,r,n,a]);return{context:o,calldata:h}}catch(i){let h=new Error().stack;throw c(i,void 0,h)}},setApprovalForAll(t,e,r){try{let a=new d(["function setApprovalForAll(address,bool)"]).encodeFunctionData("setApprovalForAll",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw c(n,void 0,a)}},supportsInterface(t,e){try{let n=new d(["function supportsInterface(bytes4)"]).encodeFunctionData("supportsInterface",[t]);return{context:e,calldata:n}}catch(r){let n=new Error().stack;throw c(r,void 0,n)}},uri(t,e){try{let n=new d(["function uri(uint256)"]).encodeFunctionData("uri",[t]);return{context:e,calldata:n}}catch(r){let n=new Error().stack;throw c(r,void 0,n)}}}},f=class extends A{async balanceOf(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.balanceOf(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}async balanceOfBatch(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.balanceOfBatch(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}async isApprovedForAll(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.isApprovedForAll(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}async supportsInterface(t,e){let r={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.supportsInterface(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,r)}async uri(t,e){let r={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.uri(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,r)}callStatic={view:this.view,context:this.context,async safeBatchTransferFrom(t,e,r,n,a,o){let i={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.safeBatchTransferFrom(t,e,r,n,a,{blockTag:this.context.blockNumber,...o},this.context.preparedData,i)},async safeTransferFrom(t,e,r,n,a,o){let i={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.safeTransferFrom(t,e,r,n,a,{blockTag:this.context.blockNumber,...o},this.context.preparedData,i)},async setApprovalForAll(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.setApprovalForAll(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}};encodeCall={view:this.view,context:this.context,balanceOf(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.balanceOf(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},balanceOfBatch(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.balanceOfBatch(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},isApprovedForAll(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.isApprovedForAll(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},safeBatchTransferFrom(t,e,r,n,a,o){let i="0x"+this.context.blockNumber.toString(16);return o?.blockTag&&(i=typeof o.blockTag=="string"?o.blockTag:"0x"+o.blockTag.toString(16)),this.view.encodeCall.safeBatchTransferFrom(t,e,r,n,a,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:i})},safeTransferFrom(t,e,r,n,a,o){let i="0x"+this.context.blockNumber.toString(16);return o?.blockTag&&(i=typeof o.blockTag=="string"?o.blockTag:"0x"+o.blockTag.toString(16)),this.view.encodeCall.safeTransferFrom(t,e,r,n,a,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:i})},setApprovalForAll(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.setApprovalForAll(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},supportsInterface(t,e){let r="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(r=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.supportsInterface(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:r})},uri(t,e){let r="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(r=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.uri(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:r})}}},k=class extends w{onEventApprovalForAll(t,e,r,n){return e||(e=l.filters["ApprovalForAll(address,address,bool)"](null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferBatch(t,e,r,n){return e||(e=l.filters["TransferBatch(address,address,address,uint256[],uint256[])"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferSingle(t,e,r,n){return e||(e=l.filters["TransferSingle(address,address,address,uint256,uint256)"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventURI(t,e,r,n){return e||(e=l.filters["URI(string,uint256)"](null,null)),super.onEthEvent(t,e,r,n)}onCallBalanceOf(t,e,r){return super.onEthTrace("0x00fdd58e",t,e,r)}onCallBalanceOfBatch(t,e,r){return super.onEthTrace("0x4e1273f4",t,e,r)}onCallIsApprovedForAll(t,e,r){return super.onEthTrace("0xe985e9c5",t,e,r)}onCallSafeBatchTransferFrom(t,e,r){return super.onEthTrace("0x2eb2c2d6",t,e,r)}onCallSafeTransferFrom(t,e,r){return super.onEthTrace("0xf242432a",t,e,r)}onCallSetApprovalForAll(t,e,r){return super.onEthTrace("0xa22cb465",t,e,r)}onCallSupportsInterface(t,e,r){return super.onEthTrace("0x01ffc9a7",t,e,r)}onCallUri(t,e,r){return super.onEthTrace("0x0e89341c",t,e,r)}CreateBoundContractView(){let t=p(this.config.network,this.config.address);return new f(this.config.address,t)}static bind(t){t.name||(t.name="ERC1155");let e=T(t);return e||(e=new k(t),m(t,e)),e}},g=k;B(g,"filters",{ApprovalForAll(t,e,r){return l.filters["ApprovalForAll(address,address,bool)"](t,e,r)},TransferBatch(t,e,r,n,a){return l.filters["TransferBatch(address,address,address,uint256[],uint256[])"](t,e,r,n,a)},TransferSingle(t,e,r,n,a){return l.filters["TransferSingle(address,address,address,uint256,uint256)"](t,e,r,n,a)},URI(t,e){return l.filters["URI(string,uint256)"](t,e)}});var F=class extends O{bindInternal(t){t.name||(t.name="ERC1155");let e=T(t);return e||(e=new g(t),m(t,e)),e}onEventApprovalForAll(t,e,r,n){return e||(e=l.filters["ApprovalForAll(address,address,bool)"](null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferBatch(t,e,r,n){return e||(e=l.filters["TransferBatch(address,address,address,uint256[],uint256[])"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferSingle(t,e,r,n){return e||(e=l.filters["TransferSingle(address,address,address,uint256,uint256)"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventURI(t,e,r,n){return e||(e=l.filters["URI(string,uint256)"](null,null)),super.onEthEvent(t,e,r,n)}};function p(s,t){let e=R("ERC1155",t,s);if(!e){let r=C.connect(t,S(s));e=new x(r),P("ERC1155",t,s,e)}return e}function U(s,t){let e=p(s.getChainId(),t),r=new f(t,e);return r.context=s,r.callStatic&&(r.callStatic.context=s),r}import("process").then(s=>s.stdout.write(""));var b={blockHash:"0x0000000000000000000000000000000000000000000000000000000000000000",blockNumber:0,logIndex:0,removed:!1,transactionHash:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionIndex:0};function D(s,t){let r=p(u.EthChainId.ETHEREUM,s).rawContract.interface.encodeEventLog("ApprovalForAll(address,address,bool)",[t.account,t.operator,t.approved]);return{...b,index:0,address:s,data:r.data,topics:r.topics}}function j(s,t){let r=p(u.EthChainId.ETHEREUM,s).rawContract.interface.encodeEventLog("TransferBatch(address,address,address,uint256[],uint256[])",[t.operator,t.from,t.to,t.ids,t.values]);return{...b,index:0,address:s,data:r.data,topics:r.topics}}function L(s,t){let r=p(u.EthChainId.ETHEREUM,s).rawContract.interface.encodeEventLog("TransferSingle(address,address,address,uint256,uint256)",[t.operator,t.from,t.to,t.id,t.value]);return{...b,index:0,address:s,data:r.data,topics:r.topics}}function V(s,t){let r=p(u.EthChainId.ETHEREUM,s).rawContract.interface.encodeEventLog("URI(string,uint256)",[t.value,t.id]);return{...b,index:0,address:s,data:r.data,topics:r.topics}}import("process").then(s=>s.stdout.write(""));import("process").then(s=>s.stdout.write(""));import("process").then(s=>s.stdout.write(""));export{x as a,f as b,g as c,F as d,p as e,U as f,D as g,j as h,L as i,V as j,W as k};
3
- //# sourceMappingURL=chunk-LTVKTBHO.js.map
2
+ import{B as C,S,T as I,U as u,b as d,g as y,h as A,j as c,r as w,u as T,v as m,w as R,x as P,z as O}from"./chunk-F7Q5QB6Q.js";import{d as N,g as B}from"./chunk-6GD6B22G.js";var W={};N(W,{ERC1155BoundContractView:()=>f,ERC1155ContractView:()=>x,ERC1155Processor:()=>g,ERC1155ProcessorTemplate:()=>F,ERC1155__factory:()=>C,getERC1155Contract:()=>p,getERC1155ContractOnContext:()=>U,mockApprovalForAllLog:()=>D,mockTransferBatchLog:()=>j,mockTransferSingleLog:()=>L,mockURILog:()=>V});var l=C.connect("0x0",I),tt=new d(["function balanceOf(address account, uint256 id) view returns (uint256)","function balanceOfBatch(address[] accounts, uint256[] ids) view returns (uint256[])","function isApprovedForAll(address account, address operator) view returns (bool)","function safeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] amounts, bytes data) returns ()","function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes data) returns ()","function setApprovalForAll(address operator, bool approved) returns ()","function supportsInterface(bytes4 interfaceId) view returns (bool)","function uri(uint256 id) view returns (string)"]),x=class extends y{constructor(t){super(t),this.callStatic.contract=t}async balanceOf(t,e,r,n,a){try{return await this.contract.getFunction("balanceOf(address,uint256)")(t,e,r||{})}catch(o){let i=new Error().stack;throw c(o,void 0,i)}}async balanceOfBatch(t,e,r,n,a){try{return await this.contract.getFunction("balanceOfBatch(address[],uint256[])")(t,e,r||{})}catch(o){let i=new Error().stack;throw c(o,void 0,i)}}async isApprovedForAll(t,e,r,n,a){try{return await this.contract.getFunction("isApprovedForAll(address,address)")(t,e,r||{})}catch(o){let i=new Error().stack;throw c(o,void 0,i)}}async supportsInterface(t,e,r,n){try{return await this.contract.getFunction("supportsInterface(bytes4)")(t,e||{})}catch(a){let o=new Error().stack;throw c(a,void 0,o)}}async uri(t,e,r,n){try{return await this.contract.getFunction("uri(uint256)")(t,e||{})}catch(a){let o=new Error().stack;throw c(a,void 0,o)}}callStatic={contract:this.contract,async safeBatchTransferFrom(t,e,r,n,a,o,i,h){try{return await this.contract.getFunction("safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)").staticCall(t,e,r,n,a,o||{})}catch(E){let v=new Error().stack;throw c(E,void 0,v)}},async safeTransferFrom(t,e,r,n,a,o,i,h){try{return await this.contract.getFunction("safeTransferFrom(address,address,uint256,uint256,bytes)").staticCall(t,e,r,n,a,o||{})}catch(E){let v=new Error().stack;throw c(E,void 0,v)}},async setApprovalForAll(t,e,r,n,a){try{return await this.contract.getFunction("setApprovalForAll(address,bool)").staticCall(t,e,r||{})}catch(o){let i=new Error().stack;throw c(o,void 0,i)}}};encodeCall={balanceOf(t,e,r){try{let a=new d(["function balanceOf(address,uint256)"]).encodeFunctionData("balanceOf",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw c(n,void 0,a)}},balanceOfBatch(t,e,r){try{let a=new d(["function balanceOfBatch(address[],uint256[])"]).encodeFunctionData("balanceOfBatch",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw c(n,void 0,a)}},isApprovedForAll(t,e,r){try{let a=new d(["function isApprovedForAll(address,address)"]).encodeFunctionData("isApprovedForAll",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw c(n,void 0,a)}},safeBatchTransferFrom(t,e,r,n,a,o){try{let h=new d(["function safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)"]).encodeFunctionData("safeBatchTransferFrom",[t,e,r,n,a]);return{context:o,calldata:h}}catch(i){let h=new Error().stack;throw c(i,void 0,h)}},safeTransferFrom(t,e,r,n,a,o){try{let h=new d(["function safeTransferFrom(address,address,uint256,uint256,bytes)"]).encodeFunctionData("safeTransferFrom",[t,e,r,n,a]);return{context:o,calldata:h}}catch(i){let h=new Error().stack;throw c(i,void 0,h)}},setApprovalForAll(t,e,r){try{let a=new d(["function setApprovalForAll(address,bool)"]).encodeFunctionData("setApprovalForAll",[t,e]);return{context:r,calldata:a}}catch(n){let a=new Error().stack;throw c(n,void 0,a)}},supportsInterface(t,e){try{let n=new d(["function supportsInterface(bytes4)"]).encodeFunctionData("supportsInterface",[t]);return{context:e,calldata:n}}catch(r){let n=new Error().stack;throw c(r,void 0,n)}},uri(t,e){try{let n=new d(["function uri(uint256)"]).encodeFunctionData("uri",[t]);return{context:e,calldata:n}}catch(r){let n=new Error().stack;throw c(r,void 0,n)}}}},f=class extends A{async balanceOf(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.balanceOf(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}async balanceOfBatch(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.balanceOfBatch(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}async isApprovedForAll(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.isApprovedForAll(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}async supportsInterface(t,e){let r={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.supportsInterface(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,r)}async uri(t,e){let r={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.uri(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,r)}callStatic={view:this.view,context:this.context,async safeBatchTransferFrom(t,e,r,n,a,o){let i={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.safeBatchTransferFrom(t,e,r,n,a,{blockTag:this.context.blockNumber,...o},this.context.preparedData,i)},async safeTransferFrom(t,e,r,n,a,o){let i={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.safeTransferFrom(t,e,r,n,a,{blockTag:this.context.blockNumber,...o},this.context.preparedData,i)},async setApprovalForAll(t,e,r){let n={chainId:this.context.chainId,blockTag:"0x"+this.context.blockNumber.toString(16),address:this.context.address};return await this.view.callStatic.setApprovalForAll(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,n)}};encodeCall={view:this.view,context:this.context,balanceOf(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.balanceOf(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},balanceOfBatch(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.balanceOfBatch(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},isApprovedForAll(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.isApprovedForAll(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},safeBatchTransferFrom(t,e,r,n,a,o){let i="0x"+this.context.blockNumber.toString(16);return o?.blockTag&&(i=typeof o.blockTag=="string"?o.blockTag:"0x"+o.blockTag.toString(16)),this.view.encodeCall.safeBatchTransferFrom(t,e,r,n,a,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:i})},safeTransferFrom(t,e,r,n,a,o){let i="0x"+this.context.blockNumber.toString(16);return o?.blockTag&&(i=typeof o.blockTag=="string"?o.blockTag:"0x"+o.blockTag.toString(16)),this.view.encodeCall.safeTransferFrom(t,e,r,n,a,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:i})},setApprovalForAll(t,e,r){let n="0x"+this.context.blockNumber.toString(16);return r?.blockTag&&(n=typeof r.blockTag=="string"?r.blockTag:"0x"+r.blockTag.toString(16)),this.view.encodeCall.setApprovalForAll(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:n})},supportsInterface(t,e){let r="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(r=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.supportsInterface(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:r})},uri(t,e){let r="0x"+this.context.blockNumber.toString(16);return e?.blockTag&&(r=typeof e.blockTag=="string"?e.blockTag:"0x"+e.blockTag.toString(16)),this.view.encodeCall.uri(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:r})}}},k=class extends w{onEventApprovalForAll(t,e,r,n){return e||(e=l.filters["ApprovalForAll(address,address,bool)"](null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferBatch(t,e,r,n){return e||(e=l.filters["TransferBatch(address,address,address,uint256[],uint256[])"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferSingle(t,e,r,n){return e||(e=l.filters["TransferSingle(address,address,address,uint256,uint256)"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventURI(t,e,r,n){return e||(e=l.filters["URI(string,uint256)"](null,null)),super.onEthEvent(t,e,r,n)}onCallBalanceOf(t,e,r){return super.onEthTrace("0x00fdd58e",t,e,r)}onCallBalanceOfBatch(t,e,r){return super.onEthTrace("0x4e1273f4",t,e,r)}onCallIsApprovedForAll(t,e,r){return super.onEthTrace("0xe985e9c5",t,e,r)}onCallSafeBatchTransferFrom(t,e,r){return super.onEthTrace("0x2eb2c2d6",t,e,r)}onCallSafeTransferFrom(t,e,r){return super.onEthTrace("0xf242432a",t,e,r)}onCallSetApprovalForAll(t,e,r){return super.onEthTrace("0xa22cb465",t,e,r)}onCallSupportsInterface(t,e,r){return super.onEthTrace("0x01ffc9a7",t,e,r)}onCallUri(t,e,r){return super.onEthTrace("0x0e89341c",t,e,r)}CreateBoundContractView(){let t=p(this.config.network,this.config.address);return new f(this.config.address,t)}static bind(t){t.name||(t.name="ERC1155");let e=T(t);return e||(e=new k(t),m(t,e)),e}},g=k;B(g,"filters",{ApprovalForAll(t,e,r){return l.filters["ApprovalForAll(address,address,bool)"](t,e,r)},TransferBatch(t,e,r,n,a){return l.filters["TransferBatch(address,address,address,uint256[],uint256[])"](t,e,r,n,a)},TransferSingle(t,e,r,n,a){return l.filters["TransferSingle(address,address,address,uint256,uint256)"](t,e,r,n,a)},URI(t,e){return l.filters["URI(string,uint256)"](t,e)}});var F=class extends O{bindInternal(t){t.name||(t.name="ERC1155");let e=T(t);return e||(e=new g(t),m(t,e)),e}onEventApprovalForAll(t,e,r,n){return e||(e=l.filters["ApprovalForAll(address,address,bool)"](null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferBatch(t,e,r,n){return e||(e=l.filters["TransferBatch(address,address,address,uint256[],uint256[])"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventTransferSingle(t,e,r,n){return e||(e=l.filters["TransferSingle(address,address,address,uint256,uint256)"](null,null,null,null,null)),super.onEthEvent(t,e,r,n)}onEventURI(t,e,r,n){return e||(e=l.filters["URI(string,uint256)"](null,null)),super.onEthEvent(t,e,r,n)}};function p(s,t){let e=R("ERC1155",t,s);if(!e){let r=C.connect(t,S(s));e=new x(r),P("ERC1155",t,s,e)}return e}function U(s,t){let e=p(s.getChainId(),t),r=new f(t,e);return r.context=s,r.callStatic&&(r.callStatic.context=s),r}import("process").then(s=>s.stdout.write(""));var b={blockHash:"0x0000000000000000000000000000000000000000000000000000000000000000",blockNumber:0,logIndex:0,removed:!1,transactionHash:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionIndex:0};function D(s,t){let r=p(u.EthChainId.ETHEREUM,s).rawContract.interface.encodeEventLog("ApprovalForAll(address,address,bool)",[t.account,t.operator,t.approved]);return{...b,index:0,address:s,data:r.data,topics:r.topics}}function j(s,t){let r=p(u.EthChainId.ETHEREUM,s).rawContract.interface.encodeEventLog("TransferBatch(address,address,address,uint256[],uint256[])",[t.operator,t.from,t.to,t.ids,t.values]);return{...b,index:0,address:s,data:r.data,topics:r.topics}}function L(s,t){let r=p(u.EthChainId.ETHEREUM,s).rawContract.interface.encodeEventLog("TransferSingle(address,address,address,uint256,uint256)",[t.operator,t.from,t.to,t.id,t.value]);return{...b,index:0,address:s,data:r.data,topics:r.topics}}function V(s,t){let r=p(u.EthChainId.ETHEREUM,s).rawContract.interface.encodeEventLog("URI(string,uint256)",[t.value,t.id]);return{...b,index:0,address:s,data:r.data,topics:r.topics}}import("process").then(s=>s.stdout.write(""));import("process").then(s=>s.stdout.write(""));import("process").then(s=>s.stdout.write(""));export{x as a,f as b,g as c,F as d,p as e,U as f,D as g,j as h,L as i,V as j,W as k};
3
+ //# sourceMappingURL=chunk-MB75AKO3.js.map
@@ -1,7 +1,7 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{a as Oe}from"./chunk-Z46LGJE2.js";import{a as Ie,b as we}from"./chunk-MOVK3WB7.js";import{a as Se,b as ve,c as H,e as S,f as x}from"./chunk-LWWZZ3VD.js";import{e as te,f as be}from"./chunk-W4OBSPHA.js";import{a as y,d as me,f as E,m as ge,n as D,o as ee,x as Ce}from"./chunk-M7BSUAPO.js";import{a as je}from"./chunk-AQU5WWON.js";import{D as g,W as fe,Xc as J,ec as z,fa as he,wc as $,x as G,za as T}from"./chunk-24SCJPBI.js";import{e as P,g as O}from"./chunk-6GD6B22G.js";import{ListStateStorage as Ae,mergeProcessResults as Ne}from"@sentio/runtime";var u=P($(),1);var j=class extends Ce{constructor(e){super(new we(e))}load(e,t){let n=this.moduleMapping.get(e.address+"::"+e.name),r=this.moduleMapping.get(t+"::"+e.name);return n&&r||(n=Ie(e),this.loadInternal(n,t)),n}async decode(e,t){switch(t.qname){case"0x1::ascii::Char":if(e!==void 0&&typeof e!="string"){let r=(await super.decode(e,t)).byte;return String.fromCharCode(r)}case"0x1::ascii::String":if(e!==void 0&&typeof e!="string"){let r=(await super.decode(e,t)).bytes;return new TextDecoder().decode(new Uint8Array(r))}case"0x2::object::ID":if(e!==void 0&&typeof e!="string"){let r=(await super.decode(e,t)).bytes;return ve(r)}case"0x2::url::Url":if(e!==void 0&&typeof e!="string")return(await super.decode(e,t)).url;case"0x2::coin::Coin":if(e!==void 0&&typeof e!="string"){let r=(await super.decode(e,t)).id.id.bytes;return new TextDecoder().decode(new Uint8Array(r))}return e;case"0x2::balance::Balance":return e.value?(await super.decode(e,t)).value:BigInt(e);case"0x1::option::Option":if(e===null)return e;if(e.vec){let r=await super.decode(e,t);return r=r.vec,r.length===0?null:r[0]}return this.decode(e,t.typeArgs[0]);case"Address":return Se(e);case"0x1::string::String":if(typeof e!="string")return new TextDecoder().decode(new Uint8Array(e.bytes));default:return super.decode(e,t)}}decodeEvent(e){return this.decodedStruct(e)}filterAndDecodeEvents(e,t){return typeof e=="string"&&(e=D(e)),this.filterAndDecodeStruct(e,t)}async getDynamicFields(e,t=ee,n=ee){let r=new ge("0x2::dynamic_field::Field");return r.typeArgs=[t,n],(await this.filterAndDecodeObjects(r,e)).map(s=>s.data_decoded)}filterAndDecodeObjects(e,t){return this.filterAndDecodeStruct(e,t)}async decodeFunctionPayload(e,t){let n=[e.package,e.module,e.function].join(y),r=await this.getMoveFunction(n),o=this.adapter.getMeaningfulFunctionParams(r.params),s=[];for(let i of e.arguments||[]){let d=i;if("Input"in d){let m=d.Input,p=t[m];p.type==="pure"?s.push(p.value):(p.type==="object"||console.error("unexpected function arg value"),s.push(void 0))}else s.push(void 0)}let c=await this.decodeArray(s,o,!1);return{...e,arguments_decoded:c}}bcsRegistered=new Set;bcsRegistry=new Map;async getBCSTypeWithArgs(e,t=[]){let n=e.qname,r=e.getNormalizedSignature(),o=this.bcsRegistry.get(r);if(o)return o;let s=n.toLowerCase();switch(s){case"u8":case"u16":case"u32":case"u64":case"u128":case"u256":case"bool":return H[s]();case"address":return H.Address;case"vector":return H.vector(t[0]);default:if(!n.includes("::"))throw`Unimplemented builtin type ${n}`}let c;try{c=await this.getMoveStruct(n)}catch(d){throw console.error("Invalid move address",n),d}let i={};for(let d of c.fields)if(d.type.qname.startsWith("T")&&t.length){let m=+d.type.qname.slice(1);i[d.name]=t[m]}else d.type.typeArgs.length&&t.length?i[d.name]=await this.getBCSTypeWithArgs(d.type,t):i[d.name]=await this.getBCSType(d.type);return H.struct(n,i)}async getBCSType(e){let t=await Promise.all(e.typeArgs.map(r=>this.getBCSType(r))),n=await this.getBCSTypeWithArgs(e,t);return this.bcsRegistry.set(e.getNormalizedSignature(),n),n}async registerBCSTypes(e){let t=e.getNormalizedSignature();if(this.bcsRegistered.has(t))return;this.bcsRegistered.add(t);let n=await this.getBCSType(e);this.bcsRegistry.set(e.getNormalizedSignature(),n)}async decodeBCS(e,t,n){if(await this.registerBCSTypes(e),typeof t=="string"){let o=Buffer.from(t,n);t=new Uint8Array(o,o.byteOffset,o.byteLength)}return this.bcsRegistry.get(e.getNormalizedSignature())?.parse(t)}async decodeDevInspectResult(e){let t=[];if(e.results!=null)for(let n of e.results)if(n.returnValues)for(let r of n.returnValues){let o=D(r[1]),s=await this.decodeBCS(o,new Uint8Array(r[0])),c=await this.decodedType(s,o);t.push(c)}else t.push(null);return{...e,results_decoded:t}}};var Te=new Map;function A(a=S.MAIN_NET){let e=Te.get(a);return e||(e=new j(x(a)),Te.set(a,e)),e}import("process").then(a=>a.stdout.write(""));var f=class extends te{moduleName;timestamp;checkpoint;transaction;eventIndex;coder;constructor(e,t,n,r,o,s,c,i){super(i),this.address=n.toLowerCase(),this.network=t,this.moduleName=e,this.timestamp=r,this.checkpoint=o,this.eventIndex=c,this.coder=A(t),s&&(this.transaction=s)}getChainId(){return this.network}getTimestamp(){return this.timestamp.getDate()}getMetaDataInternal(e,t){return{address:this.address,contractName:this.moduleName,blockNumber:this.checkpoint,transactionIndex:0,transactionHash:this.transaction?.digest||"",logIndex:this.eventIndex,chainId:this.getChainId(),name:e,labels:z(t)}}get client(){return x(this.network)}},W=class extends te{timestamp;checkpoint;coder;txDigest;constructor(e,t,n,r,o,s){super(s),this.address=t,this.network=e,this.timestamp=n,this.checkpoint=r,this.txDigest=o,this.coder=A(e)}getChainId(){return this.network}getTimestamp(){return this.timestamp.getDate()}getMetaDataInternal(e,t){return{address:this.address,contractName:"*",blockNumber:this.checkpoint,transactionIndex:-1,transactionHash:this.txDigest,logIndex:0,chainId:this.getChainId(),name:e,labels:z(t)}}get client(){return x(this.network)}},ne=class extends be{address;network;checkpoint;timestamp;coder;contractName="address";constructor(e,t,n,r,o){super(o),this.address=t,this.network=e,this.checkpoint=n,this.timestamp=r,this.coder=A(e)}getChainId(){return this.network}getMetaDataInternal(e,t){return{address:this.address,contractName:this.contractName,blockNumber:this.checkpoint,transactionIndex:0,transactionHash:"",logIndex:0,chainId:this.getChainId(),name:e,labels:z(t)}}get client(){return x(this.network)}getTimestamp(){return this.timestamp.getDate()}},K=class extends ne{contractName="object";objectId;constructor(e,t,n,r,o){super(e,t,n,r,o),this.objectId=t}};import("process").then(a=>a.stdout.write(""));function ye(a){let e=a.transaction?.data.transaction;if(!e)return[];let t=e.kind==="ProgrammableTransaction"?e:void 0;return t?t.transactions.flatMap(n=>{if("MoveCall"in n){let r=n.MoveCall;return r.package=me(r.package),[r]}return[]}):[]}import("process").then(a=>a.stdout.write(""));var R={resourceChanges:!1,allEvents:!1,inputs:!1};function re(a){return{startCheckpoint:a.startCheckpoint||0n,address:a.address==="*"?"*":E(a.address),network:a.network||S.MAIN_NET,baseLabels:a.baseLabels}}var oe=class extends Ae{},N=oe;O(N,"INSTANCE",new oe);var B=class{moduleName;config;eventHandlers=[];callHandlers=[];objectChangeHandlers=[];coder;constructor(e,t){this.moduleName=e,this.config=re(t),N.INSTANCE.addValue(this),this.coder=A(this.config.network)}getChainId(){return this.config.network}onMoveEvent(e,t,n){let r=[],o=T.fromPartial({...R,...n});Array.isArray(t)?r=t:r.push(t);let s=this,c=new Set(r.map(i=>i.type));return this.eventHandlers.push({handler:async function(i){if(!i.transaction)throw new u.ServerError(u.Status.INVALID_ARGUMENT,"event is null");let d=i.transaction;if(!d.events||!d.events.length)throw new u.ServerError(u.Status.INVALID_ARGUMENT,"no event in the transactions");let m=[];for(let p of d.events){let M=Number(p.id.eventSeq)||0,[pe,k,X]=D(p.type).qname.split(y);if(!c.has([k,X].join(y)))continue;let U=new f(s.moduleName,s.config.network,s.config.address,i.timestamp||new Date(0),i.slot,d,M,s.config.baseLabels),xe=await s.coder.decodeEvent(p);await e(xe||p,U),m.push(U.stopAndGetResult())}return Ne(m)},filters:r,fetchConfig:o}),this}onEntryFunctionCall(e,t,n){let r=[],o=T.fromPartial({...R,...n});Array.isArray(t)?r=t:r.push(t);let s=this,c=new Set(r.map(i=>i.function));return this.callHandlers.push({handler:async function(i){if(!i.transaction)throw new u.ServerError(u.Status.INVALID_ARGUMENT,"call is null");let d=i.transaction,m=new f(s.moduleName,s.config.network,s.config.address,i.timestamp||new Date(0),i.slot,d,0,s.config.baseLabels);if(d){let p=ye(d),M=d.transaction?.data?.transaction;if(!M)throw new u.ServerError(u.Status.INVALID_ARGUMENT,"Unexpected getTransactionKind get empty");let pe=M.kind==="ProgrammableTransaction"?M:void 0;for(let k of p){let X=[k.module,k.function].join(y);if(!c.has(X))continue;let U=await s.coder.decodeFunctionPayload(k,pe?.inputs||[]);await e(U,m)}}return m.stopAndGetResult()},filters:r,fetchConfig:o}),this}onEvent(e,t){return this.onMoveEvent(e,{type:""},t),this}onTransactionBlock(e,t,n){let r=T.fromPartial({...R,...n}),o=this;return this.callHandlers.push({handler:async function(s){if(!s.transaction)throw new u.ServerError(u.Status.INVALID_ARGUMENT,"transaction is null");let c=s.transaction,i=new f(o.moduleName,o.config.network,o.config.address,s.timestamp||new Date(0),s.slot,c,0,o.config.baseLabels);return c&&await e(c,i),i.stopAndGetResult()},filters:[{...t,function:""}],fetchConfig:r}),this}onObjectChange(e,t){if(this.config.network===S.TEST_NET)throw new u.ServerError(u.Status.INVALID_ARGUMENT,"object change not supported in testnet");let n=this;return this.objectChangeHandlers.push({handler:async function(r){let o=new W(n.config.network,n.config.address,r.timestamp||new Date(0),r.slot,r.txDigest,n.config.baseLabels);return await e(r.changes,o),o.stopAndGetResult()},type:t}),this}},_=class extends B{static bind(e){return new _("*",e)}},F=class extends B{static bind(e){return new F("*",{...e,address:"*"})}onTransactionBlock(e,t,n){return super.onTransactionBlock(e,t,n)}onObjectChange(e,t){return super.onObjectChange(e,t)}};import("process").then(a=>a.stdout.write(""));import{ListStateStorage as Me}from"@sentio/runtime";var q=P($(),1);var se={owned:!1},ie=class extends Me{},C=ie;O(C,"INSTANCE",new ie);var L=class{config;ownerType;templateId;objectHandlers=[];constructor(e){this.config=re(e),this.ownerType=e.ownerType,C.INSTANCE.addValue(this)}getChainId(){return this.config.network}onInterval(e,t,n,r,o){let s=this;return this.objectHandlers.push({handler:async function(c){let i=new K(s.config.network,s.config.address,c.slot,c.timestamp||new Date(0),s.config.baseLabels);return await s.doHandle(e,c,i),i.stopAndGetResult()},timeIntervalInMinutes:t,checkPointInterval:n,type:r,fetchConfig:{...se,...o}}),this}onTimeInterval(e,t=60,n=240,r,o){return this.onInterval(e,{recentInterval:t,backfillInterval:n},void 0,r,o)}onCheckpointInterval(e,t=1e5,n=4e5,r,o){return this.onInterval(e,void 0,{recentInterval:t,backfillInterval:n},r,o)}},b=class extends L{callHandlers=[];static bind(e){return new b({...e,ownerType:G.ADDRESS})}doHandle(e,t,n){return e(t.objects,n)}onTransactionBlock(e,t,n){let r=T.fromPartial({...R,...n}),o={fromAndToAddress:{from:"",to:this.config.address},...t},s=this;return this.callHandlers.push({handler:async function(c){if(!c.transaction)throw new q.ServerError(q.Status.INVALID_ARGUMENT,"transaction is null");let i=c.transaction,d=new f("object",s.config.network,s.config.address,c.timestamp||new Date(0),c.slot,i,0,s.config.baseLabels);return i&&await e(i,d),d.stopAndGetResult()},filters:[{...o,function:""}],fetchConfig:r}),this}},v=class extends L{static bind(e){return new v({address:e.objectId,network:e.network,startCheckpoint:e.startCheckpoint,ownerType:G.OBJECT,baseLabels:e.baseLabels})}doHandle(e,t,n){if(!t.self){console.log(`Sui object not existed in ${n.checkpoint}, please specific a start time`);return}return e(t.self,t.objects,n)}},I=class extends L{static bind(e){return new I({address:e.objectId,network:e.network,startCheckpoint:e.startCheckpoint,ownerType:G.WRAPPED_OBJECT,baseLabels:e.baseLabels})}doHandle(e,t,n){return e(t.objects,n)}};import("process").then(a=>a.stdout.write(""));import{ListStateStorage as ke}from"@sentio/runtime";var h=P($(),1);var le=class extends ke{},w=le;O(w,"INSTANCE",new le);var V=class{id;objectHandlers=[];binds=new Set;constructor(){this.id=w.INSTANCE.getValues().length,w.INSTANCE.addValue(this)}bind(e,t){e.network=e.network||t.network,e.startCheckpoint=e.startCheckpoint||t.checkpoint;let n=e.objectId||e.address;if(n==="*")throw new h.ServerError(h.Status.INVALID_ARGUMENT,"can't bind template instance with *");n=E(n);let r=[e.network,n].join("_");if(this.binds.has(r)){console.log(`Same object id can be bind to one template only once, ignore duplicate bind: ${r}`);return}this.binds.add(r);let o=this.createProcessor(e);for(let c of this.objectHandlers)o.onInterval(c.handler,c.timeIntervalInMinutes,c.checkpointInterval,c.type,c.fetchConfig);let s=o.config;t.update({states:{configUpdated:!0}}),J.INSTANCE.addValue({templateId:this.id,contract:{name:"",chainId:s.network,address:s.address,abi:""},startBlock:s.startCheckpoint,endBlock:0n,baseLabels:s.baseLabels}),console.log(`successfully bind template ${r}`)}unbind(e,t){e.network=e.network||t.network,e.startCheckpoint=e.startCheckpoint||t.checkpoint;let n=e.objectId||e.address;if(n==="*")throw new h.ServerError(h.Status.INVALID_ARGUMENT,"can't delete template instance bind with *");n=E(n);let r=[e.network,n].join("_");if(!this.binds.has(r)){console.log(`the template instance ${r} not existed or already unbind`);return}this.binds.delete(r);let o=0,s=J.INSTANCE.unregister();for(let i of s){if(i.contract?.chainId===e.network&&i.contract.address==n){o++;continue}J.INSTANCE.addValue(i)}if(o!==1)throw new h.ServerError(h.Status.INVALID_ARGUMENT,`Failed to delete template instance ${r}, deleted ${o} times`);let c=C.INSTANCE.unregister();o=0;for(let i of c){if(i.templateId===this.id&&i.config.network==e.network&&i.config.address===n){o++;continue}C.INSTANCE.addValue(i)}if(o!==1)throw new h.ServerError(h.Status.INVALID_ARGUMENT,`Failed to delete processor for template ${this.id}, ${r}. deleted ${o} times`);console.log(`successfully unbind template ${r}`),t.update({states:{configUpdated:!0}})}onInterval(e,t,n,r,o){return this.objectHandlers.push({handler:e,timeIntervalInMinutes:t,checkpointInterval:n,type:r,fetchConfig:{...se,...o}}),this}onTimeInterval(e,t=60,n=240,r,o){return this.onInterval(e,{recentInterval:t,backfillInterval:n},void 0,r,o)}onCheckpointInterval(e,t=1e5,n=4e5,r,o){return this.onInterval(e,void 0,{recentInterval:t,backfillInterval:n},r,o)}};var ae=class extends V{handlers=[];createProcessor(e){let t=b.bind(e);for(let n of this.handlers)t.onTransactionBlock(n.handler,n.filter,n.fetchConfig);return t.templateId=this.id,t}onTransactionBlock(e,t,n){return this.handlers.push({handler:e,filter:t,fetchConfig:n}),this}},ce=class extends V{createProcessor(e){let t=v.bind(e);return t.templateId=this.id,t}},de=class extends V{createProcessor(e){let t=I.bind(e);return t.templateId=this.id,t}};import("process").then(a=>a.stdout.write(""));import("process").then(a=>a.stdout.write(""));import{errorString as Y,mergeProcessResults as Q,Plugin as Pe,PluginManager as Ee,USER_PROCESSOR as De}from"@sentio/runtime";var l=P($(),1);var ue=P(je(),1);var Z=class extends Pe{name="SuiPlugin";handlers={suiCallHandlers:[],suiEventHandlers:[],suiObjectHandlers:[],suiObjectChangeHandlers:[]};async start(e){await Oe(),console.log("total instances:",e.templateInstances.length);let t=new Set(Object.values(ue.SuiChainId));for(let n of e.templateInstances){if(!t.has(n.contract?.chainId||""))continue;console.log("start template instance",n.templateId),w.INSTANCE.getValues()[n.templateId].bind({address:n.contract?.address||"",objectId:n.contract?.address||"",network:n.contract?.chainId||S.MAIN_NET,startCheckpoint:n.startBlock||0n,baseLabels:n.baseLabels},He)}}async configure(e){let t={suiCallHandlers:[],suiEventHandlers:[],suiObjectHandlers:[],suiObjectChangeHandlers:[]};for(let n of N.INSTANCE.getValues()){let r=fe.fromPartial({transactionConfig:[],processorType:De,contract:{name:n.moduleName,chainId:n.config.network,address:n.config.address,abi:""},startBlock:n.config.startCheckpoint});for(let o of n.eventHandlers){let s=t.suiEventHandlers.push(o.handler)-1,c={filters:o.filters.map(i=>({type:i.type,account:i.account||""})),fetchConfig:o.fetchConfig,handlerId:s};r.moveEventConfigs.push(c)}for(let o of n.callHandlers){let s=t.suiCallHandlers.push(o.handler)-1,c={filters:o.filters.map(i=>({function:i.function,typeArguments:i.typeArguments||[],withTypeArguments:!!i.typeArguments,includeFailed:i.includeFailed||!1,publicKeyPrefix:i.publicKeyPrefix||"",fromAndToAddress:i.fromAndToAddress})),fetchConfig:o.fetchConfig,handlerId:s};r.moveCallConfigs.push(c)}for(let o of n.objectChangeHandlers){let s=t.suiObjectChangeHandlers.push(o.handler)-1,c={type:o.type,handlerId:s};r.moveResourceChangeConfigs.push(c)}e.contractConfigs.push(r)}for(let n of C.INSTANCE.getValues()){let r=he.fromPartial({address:n.config.address,chainId:n.getChainId(),startBlock:n.config.startCheckpoint});for(let o of n.objectHandlers){let s=t.suiObjectHandlers.push(o.handler)-1;r.moveIntervalConfigs.push({intervalConfig:{handlerId:s,minutes:0,minutesInterval:o.timeIntervalInMinutes,slot:0,slotInterval:o.checkPointInterval,fetchConfig:void 0},type:o.type||"",ownerType:n.ownerType,fetchConfig:o.fetchConfig})}if(n instanceof b)for(let o of n.callHandlers){let s=t.suiCallHandlers.push(o.handler)-1,c={filters:o.filters.map(i=>({function:i.function,typeArguments:i.typeArguments||[],withTypeArguments:!!i.typeArguments,includeFailed:i.includeFailed||!1,publicKeyPrefix:i.publicKeyPrefix||"",fromAndToAddress:i.fromAndToAddress})),fetchConfig:o.fetchConfig,handlerId:s};r.moveCallConfigs.push(c)}e.accountConfigs.push(r)}this.handlers=t}async processSuiEvent(e){if(!e.data?.suiEvent)throw new l.ServerError(l.Status.INVALID_ARGUMENT,"Event can't be empty");let t=[],n=e.data.suiEvent;for(let r of e.handlerIds)t.push(this.handlers.suiEventHandlers[r](n).catch(o=>{throw new l.ServerError(l.Status.INTERNAL,"error processing event: "+JSON.stringify(n)+`
2
+ import{a as Oe}from"./chunk-ABLESLV7.js";import{a as Ie,b as we}from"./chunk-MOVK3WB7.js";import{a as Se,b as ve,c as H,e as S,f as x}from"./chunk-B7YDBLBV.js";import{e as te,f as be}from"./chunk-W4OBSPHA.js";import{a as y,d as me,f as E,m as ge,n as D,o as ee,x as Ce}from"./chunk-M7BSUAPO.js";import{a as je}from"./chunk-QW2MPHP5.js";import{D as g,W as fe,Xc as J,ec as z,fa as he,wc as $,x as G,za as T}from"./chunk-24SCJPBI.js";import{e as P,g as O}from"./chunk-6GD6B22G.js";import{ListStateStorage as Ae,mergeProcessResults as Ne}from"@sentio/runtime";var u=P($(),1);var j=class extends Ce{constructor(e){super(new we(e))}load(e,t){let n=this.moduleMapping.get(e.address+"::"+e.name),r=this.moduleMapping.get(t+"::"+e.name);return n&&r||(n=Ie(e),this.loadInternal(n,t)),n}async decode(e,t){switch(t.qname){case"0x1::ascii::Char":if(e!==void 0&&typeof e!="string"){let r=(await super.decode(e,t)).byte;return String.fromCharCode(r)}case"0x1::ascii::String":if(e!==void 0&&typeof e!="string"){let r=(await super.decode(e,t)).bytes;return new TextDecoder().decode(new Uint8Array(r))}case"0x2::object::ID":if(e!==void 0&&typeof e!="string"){let r=(await super.decode(e,t)).bytes;return ve(r)}case"0x2::url::Url":if(e!==void 0&&typeof e!="string")return(await super.decode(e,t)).url;case"0x2::coin::Coin":if(e!==void 0&&typeof e!="string"){let r=(await super.decode(e,t)).id.id.bytes;return new TextDecoder().decode(new Uint8Array(r))}return e;case"0x2::balance::Balance":return e.value?(await super.decode(e,t)).value:BigInt(e);case"0x1::option::Option":if(e===null)return e;if(e.vec){let r=await super.decode(e,t);return r=r.vec,r.length===0?null:r[0]}return this.decode(e,t.typeArgs[0]);case"Address":return Se(e);case"0x1::string::String":if(typeof e!="string")return new TextDecoder().decode(new Uint8Array(e.bytes));default:return super.decode(e,t)}}decodeEvent(e){return this.decodedStruct(e)}filterAndDecodeEvents(e,t){return typeof e=="string"&&(e=D(e)),this.filterAndDecodeStruct(e,t)}async getDynamicFields(e,t=ee,n=ee){let r=new ge("0x2::dynamic_field::Field");return r.typeArgs=[t,n],(await this.filterAndDecodeObjects(r,e)).map(s=>s.data_decoded)}filterAndDecodeObjects(e,t){return this.filterAndDecodeStruct(e,t)}async decodeFunctionPayload(e,t){let n=[e.package,e.module,e.function].join(y),r=await this.getMoveFunction(n),o=this.adapter.getMeaningfulFunctionParams(r.params),s=[];for(let i of e.arguments||[]){let d=i;if("Input"in d){let m=d.Input,p=t[m];p.type==="pure"?s.push(p.value):(p.type==="object"||console.error("unexpected function arg value"),s.push(void 0))}else s.push(void 0)}let c=await this.decodeArray(s,o,!1);return{...e,arguments_decoded:c}}bcsRegistered=new Set;bcsRegistry=new Map;async getBCSTypeWithArgs(e,t=[]){let n=e.qname,r=e.getNormalizedSignature(),o=this.bcsRegistry.get(r);if(o)return o;let s=n.toLowerCase();switch(s){case"u8":case"u16":case"u32":case"u64":case"u128":case"u256":case"bool":return H[s]();case"address":return H.Address;case"vector":return H.vector(t[0]);default:if(!n.includes("::"))throw`Unimplemented builtin type ${n}`}let c;try{c=await this.getMoveStruct(n)}catch(d){throw console.error("Invalid move address",n),d}let i={};for(let d of c.fields)if(d.type.qname.startsWith("T")&&t.length){let m=+d.type.qname.slice(1);i[d.name]=t[m]}else d.type.typeArgs.length&&t.length?i[d.name]=await this.getBCSTypeWithArgs(d.type,t):i[d.name]=await this.getBCSType(d.type);return H.struct(n,i)}async getBCSType(e){let t=await Promise.all(e.typeArgs.map(r=>this.getBCSType(r))),n=await this.getBCSTypeWithArgs(e,t);return this.bcsRegistry.set(e.getNormalizedSignature(),n),n}async registerBCSTypes(e){let t=e.getNormalizedSignature();if(this.bcsRegistered.has(t))return;this.bcsRegistered.add(t);let n=await this.getBCSType(e);this.bcsRegistry.set(e.getNormalizedSignature(),n)}async decodeBCS(e,t,n){if(await this.registerBCSTypes(e),typeof t=="string"){let o=Buffer.from(t,n);t=new Uint8Array(o,o.byteOffset,o.byteLength)}return this.bcsRegistry.get(e.getNormalizedSignature())?.parse(t)}async decodeDevInspectResult(e){let t=[];if(e.results!=null)for(let n of e.results)if(n.returnValues)for(let r of n.returnValues){let o=D(r[1]),s=await this.decodeBCS(o,new Uint8Array(r[0])),c=await this.decodedType(s,o);t.push(c)}else t.push(null);return{...e,results_decoded:t}}};var Te=new Map;function A(a=S.MAIN_NET){let e=Te.get(a);return e||(e=new j(x(a)),Te.set(a,e)),e}import("process").then(a=>a.stdout.write(""));var f=class extends te{moduleName;timestamp;checkpoint;transaction;eventIndex;coder;constructor(e,t,n,r,o,s,c,i){super(i),this.address=n.toLowerCase(),this.network=t,this.moduleName=e,this.timestamp=r,this.checkpoint=o,this.eventIndex=c,this.coder=A(t),s&&(this.transaction=s)}getChainId(){return this.network}getTimestamp(){return this.timestamp.getDate()}getMetaDataInternal(e,t){return{address:this.address,contractName:this.moduleName,blockNumber:this.checkpoint,transactionIndex:0,transactionHash:this.transaction?.digest||"",logIndex:this.eventIndex,chainId:this.getChainId(),name:e,labels:z(t)}}get client(){return x(this.network)}},W=class extends te{timestamp;checkpoint;coder;txDigest;constructor(e,t,n,r,o,s){super(s),this.address=t,this.network=e,this.timestamp=n,this.checkpoint=r,this.txDigest=o,this.coder=A(e)}getChainId(){return this.network}getTimestamp(){return this.timestamp.getDate()}getMetaDataInternal(e,t){return{address:this.address,contractName:"*",blockNumber:this.checkpoint,transactionIndex:-1,transactionHash:this.txDigest,logIndex:0,chainId:this.getChainId(),name:e,labels:z(t)}}get client(){return x(this.network)}},ne=class extends be{address;network;checkpoint;timestamp;coder;contractName="address";constructor(e,t,n,r,o){super(o),this.address=t,this.network=e,this.checkpoint=n,this.timestamp=r,this.coder=A(e)}getChainId(){return this.network}getMetaDataInternal(e,t){return{address:this.address,contractName:this.contractName,blockNumber:this.checkpoint,transactionIndex:0,transactionHash:"",logIndex:0,chainId:this.getChainId(),name:e,labels:z(t)}}get client(){return x(this.network)}getTimestamp(){return this.timestamp.getDate()}},K=class extends ne{contractName="object";objectId;constructor(e,t,n,r,o){super(e,t,n,r,o),this.objectId=t}};import("process").then(a=>a.stdout.write(""));function ye(a){let e=a.transaction?.data.transaction;if(!e)return[];let t=e.kind==="ProgrammableTransaction"?e:void 0;return t?t.transactions.flatMap(n=>{if("MoveCall"in n){let r=n.MoveCall;return r.package=me(r.package),[r]}return[]}):[]}import("process").then(a=>a.stdout.write(""));var R={resourceChanges:!1,allEvents:!1,inputs:!1};function re(a){return{startCheckpoint:a.startCheckpoint||0n,address:a.address==="*"?"*":E(a.address),network:a.network||S.MAIN_NET,baseLabels:a.baseLabels}}var oe=class extends Ae{},N=oe;O(N,"INSTANCE",new oe);var B=class{moduleName;config;eventHandlers=[];callHandlers=[];objectChangeHandlers=[];coder;constructor(e,t){this.moduleName=e,this.config=re(t),N.INSTANCE.addValue(this),this.coder=A(this.config.network)}getChainId(){return this.config.network}onMoveEvent(e,t,n){let r=[],o=T.fromPartial({...R,...n});Array.isArray(t)?r=t:r.push(t);let s=this,c=new Set(r.map(i=>i.type));return this.eventHandlers.push({handler:async function(i){if(!i.transaction)throw new u.ServerError(u.Status.INVALID_ARGUMENT,"event is null");let d=i.transaction;if(!d.events||!d.events.length)throw new u.ServerError(u.Status.INVALID_ARGUMENT,"no event in the transactions");let m=[];for(let p of d.events){let M=Number(p.id.eventSeq)||0,[pe,k,X]=D(p.type).qname.split(y);if(!c.has([k,X].join(y)))continue;let U=new f(s.moduleName,s.config.network,s.config.address,i.timestamp||new Date(0),i.slot,d,M,s.config.baseLabels),xe=await s.coder.decodeEvent(p);await e(xe||p,U),m.push(U.stopAndGetResult())}return Ne(m)},filters:r,fetchConfig:o}),this}onEntryFunctionCall(e,t,n){let r=[],o=T.fromPartial({...R,...n});Array.isArray(t)?r=t:r.push(t);let s=this,c=new Set(r.map(i=>i.function));return this.callHandlers.push({handler:async function(i){if(!i.transaction)throw new u.ServerError(u.Status.INVALID_ARGUMENT,"call is null");let d=i.transaction,m=new f(s.moduleName,s.config.network,s.config.address,i.timestamp||new Date(0),i.slot,d,0,s.config.baseLabels);if(d){let p=ye(d),M=d.transaction?.data?.transaction;if(!M)throw new u.ServerError(u.Status.INVALID_ARGUMENT,"Unexpected getTransactionKind get empty");let pe=M.kind==="ProgrammableTransaction"?M:void 0;for(let k of p){let X=[k.module,k.function].join(y);if(!c.has(X))continue;let U=await s.coder.decodeFunctionPayload(k,pe?.inputs||[]);await e(U,m)}}return m.stopAndGetResult()},filters:r,fetchConfig:o}),this}onEvent(e,t){return this.onMoveEvent(e,{type:""},t),this}onTransactionBlock(e,t,n){let r=T.fromPartial({...R,...n}),o=this;return this.callHandlers.push({handler:async function(s){if(!s.transaction)throw new u.ServerError(u.Status.INVALID_ARGUMENT,"transaction is null");let c=s.transaction,i=new f(o.moduleName,o.config.network,o.config.address,s.timestamp||new Date(0),s.slot,c,0,o.config.baseLabels);return c&&await e(c,i),i.stopAndGetResult()},filters:[{...t,function:""}],fetchConfig:r}),this}onObjectChange(e,t){if(this.config.network===S.TEST_NET)throw new u.ServerError(u.Status.INVALID_ARGUMENT,"object change not supported in testnet");let n=this;return this.objectChangeHandlers.push({handler:async function(r){let o=new W(n.config.network,n.config.address,r.timestamp||new Date(0),r.slot,r.txDigest,n.config.baseLabels);return await e(r.changes,o),o.stopAndGetResult()},type:t}),this}},_=class extends B{static bind(e){return new _("*",e)}},F=class extends B{static bind(e){return new F("*",{...e,address:"*"})}onTransactionBlock(e,t,n){return super.onTransactionBlock(e,t,n)}onObjectChange(e,t){return super.onObjectChange(e,t)}};import("process").then(a=>a.stdout.write(""));import{ListStateStorage as Me}from"@sentio/runtime";var q=P($(),1);var se={owned:!1},ie=class extends Me{},C=ie;O(C,"INSTANCE",new ie);var L=class{config;ownerType;templateId;objectHandlers=[];constructor(e){this.config=re(e),this.ownerType=e.ownerType,C.INSTANCE.addValue(this)}getChainId(){return this.config.network}onInterval(e,t,n,r,o){let s=this;return this.objectHandlers.push({handler:async function(c){let i=new K(s.config.network,s.config.address,c.slot,c.timestamp||new Date(0),s.config.baseLabels);return await s.doHandle(e,c,i),i.stopAndGetResult()},timeIntervalInMinutes:t,checkPointInterval:n,type:r,fetchConfig:{...se,...o}}),this}onTimeInterval(e,t=60,n=240,r,o){return this.onInterval(e,{recentInterval:t,backfillInterval:n},void 0,r,o)}onCheckpointInterval(e,t=1e5,n=4e5,r,o){return this.onInterval(e,void 0,{recentInterval:t,backfillInterval:n},r,o)}},b=class extends L{callHandlers=[];static bind(e){return new b({...e,ownerType:G.ADDRESS})}doHandle(e,t,n){return e(t.objects,n)}onTransactionBlock(e,t,n){let r=T.fromPartial({...R,...n}),o={fromAndToAddress:{from:"",to:this.config.address},...t},s=this;return this.callHandlers.push({handler:async function(c){if(!c.transaction)throw new q.ServerError(q.Status.INVALID_ARGUMENT,"transaction is null");let i=c.transaction,d=new f("object",s.config.network,s.config.address,c.timestamp||new Date(0),c.slot,i,0,s.config.baseLabels);return i&&await e(i,d),d.stopAndGetResult()},filters:[{...o,function:""}],fetchConfig:r}),this}},v=class extends L{static bind(e){return new v({address:e.objectId,network:e.network,startCheckpoint:e.startCheckpoint,ownerType:G.OBJECT,baseLabels:e.baseLabels})}doHandle(e,t,n){if(!t.self){console.log(`Sui object not existed in ${n.checkpoint}, please specific a start time`);return}return e(t.self,t.objects,n)}},I=class extends L{static bind(e){return new I({address:e.objectId,network:e.network,startCheckpoint:e.startCheckpoint,ownerType:G.WRAPPED_OBJECT,baseLabels:e.baseLabels})}doHandle(e,t,n){return e(t.objects,n)}};import("process").then(a=>a.stdout.write(""));import{ListStateStorage as ke}from"@sentio/runtime";var h=P($(),1);var le=class extends ke{},w=le;O(w,"INSTANCE",new le);var V=class{id;objectHandlers=[];binds=new Set;constructor(){this.id=w.INSTANCE.getValues().length,w.INSTANCE.addValue(this)}bind(e,t){e.network=e.network||t.network,e.startCheckpoint=e.startCheckpoint||t.checkpoint;let n=e.objectId||e.address;if(n==="*")throw new h.ServerError(h.Status.INVALID_ARGUMENT,"can't bind template instance with *");n=E(n);let r=[e.network,n].join("_");if(this.binds.has(r)){console.log(`Same object id can be bind to one template only once, ignore duplicate bind: ${r}`);return}this.binds.add(r);let o=this.createProcessor(e);for(let c of this.objectHandlers)o.onInterval(c.handler,c.timeIntervalInMinutes,c.checkpointInterval,c.type,c.fetchConfig);let s=o.config;t.update({states:{configUpdated:!0}}),J.INSTANCE.addValue({templateId:this.id,contract:{name:"",chainId:s.network,address:s.address,abi:""},startBlock:s.startCheckpoint,endBlock:0n,baseLabels:s.baseLabels}),console.log(`successfully bind template ${r}`)}unbind(e,t){e.network=e.network||t.network,e.startCheckpoint=e.startCheckpoint||t.checkpoint;let n=e.objectId||e.address;if(n==="*")throw new h.ServerError(h.Status.INVALID_ARGUMENT,"can't delete template instance bind with *");n=E(n);let r=[e.network,n].join("_");if(!this.binds.has(r)){console.log(`the template instance ${r} not existed or already unbind`);return}this.binds.delete(r);let o=0,s=J.INSTANCE.unregister();for(let i of s){if(i.contract?.chainId===e.network&&i.contract.address==n){o++;continue}J.INSTANCE.addValue(i)}if(o!==1)throw new h.ServerError(h.Status.INVALID_ARGUMENT,`Failed to delete template instance ${r}, deleted ${o} times`);let c=C.INSTANCE.unregister();o=0;for(let i of c){if(i.templateId===this.id&&i.config.network==e.network&&i.config.address===n){o++;continue}C.INSTANCE.addValue(i)}if(o!==1)throw new h.ServerError(h.Status.INVALID_ARGUMENT,`Failed to delete processor for template ${this.id}, ${r}. deleted ${o} times`);console.log(`successfully unbind template ${r}`),t.update({states:{configUpdated:!0}})}onInterval(e,t,n,r,o){return this.objectHandlers.push({handler:e,timeIntervalInMinutes:t,checkpointInterval:n,type:r,fetchConfig:{...se,...o}}),this}onTimeInterval(e,t=60,n=240,r,o){return this.onInterval(e,{recentInterval:t,backfillInterval:n},void 0,r,o)}onCheckpointInterval(e,t=1e5,n=4e5,r,o){return this.onInterval(e,void 0,{recentInterval:t,backfillInterval:n},r,o)}};var ae=class extends V{handlers=[];createProcessor(e){let t=b.bind(e);for(let n of this.handlers)t.onTransactionBlock(n.handler,n.filter,n.fetchConfig);return t.templateId=this.id,t}onTransactionBlock(e,t,n){return this.handlers.push({handler:e,filter:t,fetchConfig:n}),this}},ce=class extends V{createProcessor(e){let t=v.bind(e);return t.templateId=this.id,t}},de=class extends V{createProcessor(e){let t=I.bind(e);return t.templateId=this.id,t}};import("process").then(a=>a.stdout.write(""));import("process").then(a=>a.stdout.write(""));import{errorString as Y,mergeProcessResults as Q,Plugin as Pe,PluginManager as Ee,USER_PROCESSOR as De}from"@sentio/runtime";var l=P($(),1);var ue=P(je(),1);var Z=class extends Pe{name="SuiPlugin";handlers={suiCallHandlers:[],suiEventHandlers:[],suiObjectHandlers:[],suiObjectChangeHandlers:[]};async start(e){await Oe(),console.log("total instances:",e.templateInstances.length);let t=new Set(Object.values(ue.SuiChainId));for(let n of e.templateInstances){if(!t.has(n.contract?.chainId||""))continue;console.log("start template instance",n.templateId),w.INSTANCE.getValues()[n.templateId].bind({address:n.contract?.address||"",objectId:n.contract?.address||"",network:n.contract?.chainId||S.MAIN_NET,startCheckpoint:n.startBlock||0n,baseLabels:n.baseLabels},He)}}async configure(e){let t={suiCallHandlers:[],suiEventHandlers:[],suiObjectHandlers:[],suiObjectChangeHandlers:[]};for(let n of N.INSTANCE.getValues()){let r=fe.fromPartial({transactionConfig:[],processorType:De,contract:{name:n.moduleName,chainId:n.config.network,address:n.config.address,abi:""},startBlock:n.config.startCheckpoint});for(let o of n.eventHandlers){let s=t.suiEventHandlers.push(o.handler)-1,c={filters:o.filters.map(i=>({type:i.type,account:i.account||""})),fetchConfig:o.fetchConfig,handlerId:s};r.moveEventConfigs.push(c)}for(let o of n.callHandlers){let s=t.suiCallHandlers.push(o.handler)-1,c={filters:o.filters.map(i=>({function:i.function,typeArguments:i.typeArguments||[],withTypeArguments:!!i.typeArguments,includeFailed:i.includeFailed||!1,publicKeyPrefix:i.publicKeyPrefix||"",fromAndToAddress:i.fromAndToAddress})),fetchConfig:o.fetchConfig,handlerId:s};r.moveCallConfigs.push(c)}for(let o of n.objectChangeHandlers){let s=t.suiObjectChangeHandlers.push(o.handler)-1,c={type:o.type,handlerId:s};r.moveResourceChangeConfigs.push(c)}e.contractConfigs.push(r)}for(let n of C.INSTANCE.getValues()){let r=he.fromPartial({address:n.config.address,chainId:n.getChainId(),startBlock:n.config.startCheckpoint});for(let o of n.objectHandlers){let s=t.suiObjectHandlers.push(o.handler)-1;r.moveIntervalConfigs.push({intervalConfig:{handlerId:s,minutes:0,minutesInterval:o.timeIntervalInMinutes,slot:0,slotInterval:o.checkPointInterval,fetchConfig:void 0},type:o.type||"",ownerType:n.ownerType,fetchConfig:o.fetchConfig})}if(n instanceof b)for(let o of n.callHandlers){let s=t.suiCallHandlers.push(o.handler)-1,c={filters:o.filters.map(i=>({function:i.function,typeArguments:i.typeArguments||[],withTypeArguments:!!i.typeArguments,includeFailed:i.includeFailed||!1,publicKeyPrefix:i.publicKeyPrefix||"",fromAndToAddress:i.fromAndToAddress})),fetchConfig:o.fetchConfig,handlerId:s};r.moveCallConfigs.push(c)}e.accountConfigs.push(r)}this.handlers=t}async processSuiEvent(e){if(!e.data?.suiEvent)throw new l.ServerError(l.Status.INVALID_ARGUMENT,"Event can't be empty");let t=[],n=e.data.suiEvent;for(let r of e.handlerIds)t.push(this.handlers.suiEventHandlers[r](n).catch(o=>{throw new l.ServerError(l.Status.INTERNAL,"error processing event: "+JSON.stringify(n)+`
3
3
  `+Y(o))}));return Q(await Promise.all(t))}async processSuiFunctionCall(e){if(!e.data?.suiCall)throw new l.ServerError(l.Status.INVALID_ARGUMENT,"Call can't be empty");let t=e.data.suiCall,n=[];for(let r of e.handlerIds){let o=this.handlers.suiCallHandlers[r](t).catch(s=>{throw new l.ServerError(l.Status.INTERNAL,"error processing call: "+JSON.stringify(t)+`
4
4
  `+Y(s))});n.push(o)}return Q(await Promise.all(n))}async processSuiObject(e){if(!e.data?.suiObject)throw new l.ServerError(l.Status.INVALID_ARGUMENT,"Object can't be empty");let t=e.data.suiObject,n=[];for(let r of e.handlerIds)n.push(this.handlers.suiObjectHandlers[r](t).catch(o=>{throw new l.ServerError(l.Status.INTERNAL,"error processing object: "+JSON.stringify(t)+`
5
5
  `+Y(o))}));return Q(await Promise.all(n))}async processSuiObjectChange(e){if(!e.data?.suiObjectChange)throw new l.ServerError(l.Status.INVALID_ARGUMENT,"Object change can't be empty");let t=e.data.suiObjectChange,n=[];for(let r of e.handlerIds)n.push(this.handlers.suiObjectChangeHandlers[r](t).catch(o=>{throw new l.ServerError(l.Status.INTERNAL,"error processing object change: "+JSON.stringify(t)+`
6
6
  `+Y(o))}));return Q(await Promise.all(n))}supportedHandlers=[g.SUI_EVENT,g.SUI_CALL,g.SUI_OBJECT,g.SUI_OBJECT_CHANGE];processBinding(e){switch(e.handlerType){case g.SUI_EVENT:return this.processSuiEvent(e);case g.SUI_CALL:return this.processSuiFunctionCall(e);case g.SUI_OBJECT:return this.processSuiObject(e);case g.SUI_OBJECT_CHANGE:return this.processSuiObjectChange(e);default:throw new l.ServerError(l.Status.INVALID_ARGUMENT,"No handle type registered "+e.handlerType)}}};Ee.INSTANCE.register(new Z);var He=new f("",ue.SuiChainId.SUI_MAINNET,"",new Date,0n,{},0,{});import("process").then(a=>a.stdout.write(""));import("process").then(a=>a.stdout.write(""));export{j as a,A as b,f as c,W as d,ne as e,K as f,ye as g,B as h,_ as i,F as j,b as k,v as l,I as m,ae as n,ce as o,de as p,Z as q};
7
- //# sourceMappingURL=chunk-CNL6UJ7C.js.map
7
+ //# sourceMappingURL=chunk-QUNXEV6Z.js.map
@@ -1,3 +1,3 @@
1
1
  import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{c as E}from"./chunk-6GD6B22G.js";var h=E(p=>{"use strict";Object.defineProperty(p,"__esModule",{value:!0});p.getChainType=p.ChainId=p.BTCChainId=p.StarknetChainId=p.CosmosChainId=p.FuelChainId=p.SolanaChainId=p.SuiChainId=p.AptosChainId=p.EthChainId=p.ChainType=void 0;var T;(function(n){n.SOLANA="solana",n.SUI="sui",n.APTOS="aptos",n.ETH="evm",n.BTC="btc"})(T||(p.ChainType=T={}));var x;(function(n){n.ETHEREUM="1",n.OPTIMISM="10",n.CRONOS="25",n.BINANCE="56",n.POLYGON="137",n.MANTA_PACIFIC="169",n.XLAYER_TESTNET="195",n.XLAYER_MAINNET="196",n.B2_MAINNET="223",n.FANTOM="250",n.FRAXTAL="252",n.KUCOIN="321",n.CRONOS_ZKEVM="388",n.ZKSYNC_ERA="324",n.CRONOS_TESTNET="338",n.ASTAR="592",n.LYRA="957",n.POLYGON_ZKEVM="1101",n.CONFLUX="1030",n.METIS="1088",n.MOONBEAM="1284",n.UNCHAIN_SEPOLIA="1301",n.SONEIUM_TESTNET="1946",n.BEVM="11501",n.MERLIN_MAINNET="4200",n.MANTLE="5000",n.BASE="8453",n.LUMIO_TESTNET="9990",n.HOLESKY="17000",n.ASTAR_ZKEVM="3776",n.MOVEMENT_EVM_TESTNET="30732",n.MODE="34443",n.ARBITRUM="42161",n.AVALANCHE="43114",n.ZIRCUIT_TESTNET="48899",n.ZIRCUIT_MAINNET="48900",n.BOB="60808",n.LINEA="59144",n.SONIC_TESTNET="64165",n.BLAST="81457",n.CHILIZ="88888",n.TAIKO="167000",n.TAIKO_TESTNET="167008",n.BITLAYER="200901",n.SCROLL="534352",n.ZKLINK_NOVA="810180",n.SEPOLIA="11155111",n.AURORA="1313161554",n.BLAST_SEPOLIA="168587773"})(x||(p.EthChainId=x={}));var k;(function(n){n.APTOS_MAINNET="aptos_mainnet",n.APTOS_TESTNET="aptos_testnet",n.APTOS_MOVEMENT_TESTNET="aptos_m2_testnet",n.APTOS_MOVEMENT_PORTO="aptos_movement_porto",n.APTOS_MOVEMENT_MAINNET="aptos_movement_mainnet"})(k||(p.AptosChainId=k={}));var C;(function(n){n.SUI_MAINNET="sui_mainnet",n.SUI_TESTNET="sui_testnet",n.SUI_MOVEMENT_TESTNET="sui_m2_testnet",n.SUI_MOVEMENT_MAINNET="sui_m2_mainnet"})(C||(p.SuiChainId=C={}));var I;(function(n){n.SOLANA_MAINNET="sol_mainnet",n.SOLANA_DEVNET="sol_devnet",n.SOLANA_TESTNET="sol_testnet",n.SOLANA_PYTH="sol_pyth"})(I||(p.SolanaChainId=I={}));var m;(function(n){n.FUEL_MAINNET="fuel_mainnet",n.FUEL_TESTNET="fuel_testnet"})(m||(p.FuelChainId=m={}));var S;(function(n){n.INJECTIVE_MAINNET="injective_mainnet",n.INJECTIVE_TESTNET="injective_testnet"})(S||(p.CosmosChainId=S={}));var N;(function(n){n.STARKNET_MAINNET="starknet_mainnet",n.STARKNET_SEPOLIA="starknet_sepolia"})(N||(p.StarknetChainId=N={}));var f;(function(n){n.BTC_MAINNET="btc_mainnet",n.BTC_TESTNET="btc_testnet"})(f||(p.BTCChainId=f={}));p.ChainId={...x,...k,...C,...I,...m,...S,...N,...f};function U(n){let t=String(n).toLowerCase();return t.startsWith("sol")?T.SOLANA:t.startsWith("sui")?T.SUI:t.startsWith("apt")?T.APTOS:t.startsWith("btc")?T.BTC:T.ETH}p.getChainType=U});var b=E(i=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});i.getChainBlockscoutUrl=i.getChainExternalUrl=i.SolanaChainInfo=i.AptosChainInfo=i.BTCChainInfo=i.EthChainInfo=i.ExplorerApiType=void 0;var e=h(),r;(function(n){n.ETHERSCAN="etherscan",n.BLOCKSCOUT="blockscout",n.L2SCAN="l2scan",n.OKLINK="oklink"})(r||(i.ExplorerApiType=r={}));i.EthChainInfo={[e.EthChainId.ETHEREUM]:{name:"Ethereum",chainId:e.EthChainId.ETHEREUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://etherscan.io",explorerApi:"https://api.etherscan.io",blockscoutUrl:"https://eth.blockscout.com"},[e.EthChainId.SEPOLIA]:{name:"Sepolia",chainId:e.EthChainId.SEPOLIA,mainnetChainId:e.EthChainId.ETHEREUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x1ef5f52bdbe11af2377c58ecc914a8c72ea807cf",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://sepolia.etherscan.io",explorerApi:"https://api-sepolia.etherscan.io",blockscoutUrl:"https://eth-sepolia.blockscout.com"},[e.EthChainId.HOLESKY]:{name:"Holesky",chainId:e.EthChainId.HOLESKY,mainnetChainId:e.EthChainId.ETHEREUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x94373a4919B3240D86eA41593D5eBa789FEF3848",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://holesky.etherscan.io",explorerApi:"https://api-holesky.etherscan.io",blockscoutUrl:"https://eth-holesky.blockscout.com"},[e.EthChainId.BINANCE]:{name:"Binance",chainId:e.EthChainId.BINANCE,priceTokenAddress:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",tokenSymbol:"BNB",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://bscscan.com",explorerApi:"https://api.bscscan.com"},[e.EthChainId.POLYGON]:{name:"Polygon",chainId:e.EthChainId.POLYGON,priceTokenAddress:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",tokenSymbol:"MATIC",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://polygonscan.com",explorerApi:"https://api.polygonscan.com"},[e.EthChainId.ARBITRUM]:{name:"Arbitrum",chainId:e.EthChainId.ARBITRUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://arbiscan.io",explorerApi:"https://api.arbiscan.io"},[e.EthChainId.AVALANCHE]:{name:"Avalanche",chainId:e.EthChainId.AVALANCHE,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://snowtrace.io",explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan"},[e.EthChainId.POLYGON_ZKEVM]:{name:"Polygon zkEVM",chainId:e.EthChainId.POLYGON_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://zkevm.polygonscan.com",explorerApi:"https://api-zkevm.polygonscan.com"},[e.EthChainId.MOONBEAM]:{name:"Moonbeam",chainId:e.EthChainId.MOONBEAM,priceTokenAddress:"0xacc15dc74880c9944775448304b263d191c6077f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xacc15dc74880c9944775448304b263d191c6077f",tokenSymbol:"GLMR",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://moonscan.io",explorerApi:"https://api-moonbeam.moonscan.io"},[e.EthChainId.ASTAR]:{name:"Astar",chainId:e.EthChainId.ASTAR,priceTokenAddress:"0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",tokenSymbol:"ASTR",tokenDecimals:18,explorerApiType:r.BLOCKSCOUT,explorerUrl:"https://astar.blockscout.com",explorerApi:"https://astar.blockscout.com"},[e.EthChainId.ASTAR_ZKEVM]:{name:"Astar zkEVM",chainId:e.EthChainId.ASTAR_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xE9CC37904875B459Fa5D0FE37680d36F1ED55e38",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://astar-zkevm.explorer.startale.com",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://astar-zkevm.explorer.startale.com"},[e.EthChainId.LINEA]:{name:"Linea",chainId:e.EthChainId.LINEA,priceTokenAddress:"0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://lineascan.build",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.lineascan.build"},[e.EthChainId.SCROLL]:{name:"Scroll",chainId:e.EthChainId.SCROLL,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5300000000000000000000000000000000000004",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://scrollscan.com",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.scrollscan.com"},[e.EthChainId.TAIKO]:{name:"Taiko Mainnet",chainId:e.EthChainId.TAIKO,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xA51894664A773981C6C112C43ce576f315d5b1B6",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://taikoscan.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.taikoscan.io"},[e.EthChainId.TAIKO_TESTNET]:{name:"Taiko Testnet",chainId:e.EthChainId.TAIKO_TESTNET,mainnetChainId:e.EthChainId.TAIKO,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xae2C46ddb314B9Ba743C6dEE4878F151881333D9",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://hekla.taikoscan.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://api-hekla.taikoscan.io"},[e.EthChainId.XLAYER_TESTNET]:{name:"X Layer Testnet",chainId:e.EthChainId.XLAYER_TESTNET,mainnetChainId:e.EthChainId.XLAYER_MAINNET,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xa749ad81913cdc19881ebeb64631df72be708335",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://www.oklink.com/xlayer-test",explorerApiType:r.OKLINK,explorerApi:"https://www.oklink.com/api/v5/explorer"},[e.EthChainId.XLAYER_MAINNET]:{name:"X Layer Mainnet",chainId:e.EthChainId.XLAYER_MAINNET,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5a77f1443d16ee5761d310e38b62f77f726bc71c",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://www.oklink.com/xlayer",explorerApiType:r.OKLINK,explorerApi:"https://www.oklink.com/api/v5/explorer"},[e.EthChainId.BLAST]:{name:"Blast Mainnet",chainId:e.EthChainId.BLAST,priceTokenAddress:"0x4300000000000000000000000000000000000004",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4300000000000000000000000000000000000004",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://blastscan.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.blastscan.io"},[e.EthChainId.BLAST_SEPOLIA]:{name:"Blast Mainnet",chainId:e.EthChainId.BLAST_SEPOLIA,mainnetChainId:e.EthChainId.BLAST,priceTokenAddress:"0x4200000000000000000000000000000000000023",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000023",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://sepolia.blastscan.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://api-sepolia.blastscan.io"},[e.EthChainId.BASE]:{name:"Base",chainId:e.EthChainId.BASE,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://basescan.org",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.basescan.org"},[e.EthChainId.ZKSYNC_ERA]:{name:"zkSync Era",chainId:e.EthChainId.ZKSYNC_ERA,priceTokenAddress:"0x000000000000000000000000000000000000800A",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zksync.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://block-explorer-api.mainnet.zksync.io"},[e.EthChainId.ZIRCUIT_TESTNET]:{name:"Zircuit Testnet",chainId:e.EthChainId.ZIRCUIT_TESTNET,mainnetChainId:e.EthChainId.ZIRCUIT_MAINNET,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.testnet.zircuit.com"},[e.EthChainId.ZIRCUIT_MAINNET]:{name:"Zircuit Mainnet",chainId:e.EthChainId.ZIRCUIT_MAINNET,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zircuit.com"},[e.EthChainId.FANTOM]:{name:"Fantom Opera",chainId:e.EthChainId.FANTOM,priceTokenAddress:"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",tokenSymbol:"WFTM",tokenDecimals:18,explorerUrl:"https://ftmscan.com",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.ftmscan.com"},[e.EthChainId.OPTIMISM]:{name:"Optimism Mainnet",chainId:e.EthChainId.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://optimistic.etherscan.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://api-optimistic.etherscan.io"},[e.EthChainId.CRONOS]:{name:"Cronos Mainnet",chainId:e.EthChainId.CRONOS,priceTokenAddress:"0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",tokenSymbol:"CRO",tokenDecimals:18,explorerUrl:"https://cronoscan.com",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.cronoscan.com"},[e.EthChainId.CRONOS_TESTNET]:{name:"Cronos Testnet",chainId:e.EthChainId.CRONOS_TESTNET,mainnetChainId:e.EthChainId.CRONOS,priceTokenAddress:"0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4",tokenSymbol:"CRO",tokenDecimals:18,explorerUrl:"https://explorer.cronos.org/testnet"},[e.EthChainId.BITLAYER]:{name:"Bitlayer Mainnet",chainId:e.EthChainId.BITLAYER,priceTokenAddress:"0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://www.btrscan.com",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.btrscan.com/scan"},[e.EthChainId.MANTA_PACIFIC]:{name:"Manta Pacific",chainId:e.EthChainId.MANTA_PACIFIC,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0Dc808adcE2099A9F62AA87D9670745AbA741746",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://pacific-explorer.manta.network",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://pacific-explorer.manta.network"},[e.EthChainId.MANTLE]:{name:"Mantle",chainId:e.EthChainId.MANTLE,priceTokenAddress:"0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",tokenSymbol:"MNT",tokenDecimals:18,explorerUrl:"https://mantlescan.xyz",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.mantlescan.xyz"},[e.EthChainId.B2_MAINNET]:{name:"B2 Mainnet",chainId:e.EthChainId.B2_MAINNET,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://explorer.bsquared.network",explorerApiType:r.L2SCAN,explorerApi:"https://explorer.bsquared.network/api"},[e.EthChainId.MODE]:{name:"Mode Mainnet",chainId:e.EthChainId.MODE,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://modescan.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan"},[e.EthChainId.BOB]:{name:"Bob Mainnet",chainId:e.EthChainId.BOB,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.gobob.xyz",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://explorer.gobob.xyz"},[e.EthChainId.FRAXTAL]:{name:"Fraxtal Mainnet",chainId:e.EthChainId.FRAXTAL,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xFC00000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://fraxscan.com",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.fraxscan.com"},[e.EthChainId.KUCOIN]:{name:"KCC Mainnet",chainId:e.EthChainId.KUCOIN,priceTokenAddress:"0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521",tokenSymbol:"KCS",tokenDecimals:18,explorerUrl:"https://scan.kcc.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://scan.kcc.io"},[e.EthChainId.CONFLUX]:{name:"Conflux eSpace",chainId:e.EthChainId.CONFLUX,priceTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b",tokenSymbol:"CFX",tokenDecimals:18,explorerUrl:"https://evm.confluxscan.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://evmapi.confluxscan.io"},[e.EthChainId.METIS]:{name:"Metis",chainId:e.EthChainId.METIS,priceTokenAddress:"0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481",tokenSymbol:"METIS",tokenDecimals:18,explorerUrl:"https://explorer.metis.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/"},[e.EthChainId.BEVM]:{name:"BEVM",chainId:e.EthChainId.BEVM,priceTokenAddress:"0xB5136FEba197f5fF4B765E5b50c74db717796dcD",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xB5136FEba197f5fF4B765E5b50c74db717796dcD",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://scan.bevm.io",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://scan.bevm.io"},[e.EthChainId.MERLIN_MAINNET]:{name:"Merlin Mainnet",chainId:e.EthChainId.MERLIN_MAINNET,priceTokenAddress:"0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://scan.merlinchain.io",explorerApiType:r.L2SCAN,explorerApi:"https://scan.merlinchain.io/api"},[e.EthChainId.LUMIO_TESTNET]:{name:"Lumio Testnet",chainId:e.EthChainId.LUMIO_TESTNET,priceTokenAddress:"0x1F3dBeBA2513E87642750a278649dc828d054971",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x1F3dBeBA2513E87642750a278649dc828d054971",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.testnet.imola.movementlabs.xyz",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://explorer.testnet.imola.movementlabs.xyz"},[e.EthChainId.MOVEMENT_EVM_TESTNET]:{name:"Movement EVM Testnet",chainId:e.EthChainId.MOVEMENT_EVM_TESTNET,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"MOVE",tokenDecimals:18,explorerUrl:"https://explorer.testnet.imola.movementlabs.xyz"},[e.EthChainId.CHILIZ]:{name:"Chiliz",chainId:e.EthChainId.CHILIZ,priceTokenAddress:"0x721EF6871f1c4Efe730Dce047D40D1743B886946",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x721EF6871f1c4Efe730Dce047D40D1743B886946",tokenSymbol:"CHZ",tokenDecimals:18,explorerUrl:"https://chiliscan.com",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/88888/etherscan"},[e.EthChainId.ZKLINK_NOVA]:{name:"zkLink Nova",chainId:e.EthChainId.ZKLINK_NOVA,priceTokenAddress:"0x000000000000000000000000000000000000800A",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zklink.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://explorer-api.zklink.io"},[e.EthChainId.AURORA]:{name:"Auroa",chainId:e.EthChainId.AURORA,priceTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.aurora.dev",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://explorer.aurora.dev"},[e.EthChainId.SONIC_TESTNET]:{name:"Sonic Testnet",chainId:e.EthChainId.SONIC_TESTNET,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"FTM",tokenDecimals:18,explorerUrl:"https://testnet.soniclabs.com",explorerApiType:r.L2SCAN,explorerApi:"https://testnet.soniclabs.com"},[e.EthChainId.SONEIUM_TESTNET]:{name:"Soneium Testnet",chainId:e.EthChainId.SONEIUM_TESTNET,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x728F2745410A56620B50a6E0592743450e08Cac6",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer-testnet.soneium.org",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://explorer-testnet.soneium.org"},[e.EthChainId.CRONOS_ZKEVM]:{name:"Cronos zkEVM",chainId:e.EthChainId.CRONOS_ZKEVM,priceTokenAddress:"0x000000000000000000000000000000000000800a",tokenAddress:"0x000000000000000000000000000000000000800a",wrappedTokenAddress:"0xc1bf55ee54e16229d9b369a5502bfe5fc9f20b6d",tokenSymbol:"zkCRO",tokenDecimals:18,explorerUrl:"https://explorer.zkevm.cronos.org",explorerApiType:r.ETHERSCAN,explorerApi:"https://explorer.zkevm.cronos.org"},[e.EthChainId.LYRA]:{name:"Lyra",chainId:e.EthChainId.LYRA,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x15CEcd5190A43C7798dD2058308781D0662e678E",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.lyra.finance",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://explorer.lyra.finance"},[e.EthChainId.UNCHAIN_SEPOLIA]:{name:"Unchain Sepolia",chainId:e.EthChainId.UNCHAIN_SEPOLIA,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://unichain-sepolia.blockscout.com",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://unichain-sepolia.blockscout.com"}};function y(n,t,o){let a=o,s=i.EthChainInfo[n];if(s)return s.explorerApiType===r.L2SCAN&&o==="block"&&(a="blocks"),`${s.explorerUrl}/${a}/${t}`}i.BTCChainInfo={[e.BTCChainId.BTC_MAINNET]:{name:"Bitcoin Mainnet",chainId:e.BTCChainId.BTC_MAINNET,explorerUrl:"https://mempool.space"},[e.BTCChainId.BTC_TESTNET]:{name:"Bitcoin Mainnet",chainId:e.BTCChainId.BTC_TESTNET,explorerUrl:"https://mempool.space/testnet4"}};var B={block:"block",address:"address",tx:"tx",token:void 0};function L(n,t,o){let a=i.BTCChainInfo[n]?.explorerUrl,s=B[o];if(!(!a||!s))return`${a}/${s}/${t}`}i.AptosChainInfo={[e.AptosChainId.APTOS_MAINNET]:{name:"Aptos Mainnet",chainId:e.AptosChainId.APTOS_MAINNET,explorerUrl:"https://explorer.aptoslabs.com",suffix:"?network=mainnet"},[e.AptosChainId.APTOS_TESTNET]:{name:"Aptos Testenet",chainId:e.AptosChainId.APTOS_TESTNET,explorerUrl:"https://explorer.aptoslabs.com",suffix:"?network=mainnet"},[e.AptosChainId.APTOS_MOVEMENT_MAINNET]:{name:"Movement Mainnet Aptos",chainId:e.AptosChainId.APTOS_MOVEMENT_MAINNET,explorerUrl:"https://explorer.movementnetwork.xyz",suffix:"?network=mainnet"},[e.AptosChainId.APTOS_MOVEMENT_TESTNET]:{name:"Movement Testnet Aptos",chainId:e.AptosChainId.APTOS_MOVEMENT_TESTNET,explorerUrl:"https://explorer.movementnetwork.xyz",suffix:"?network=testnet"},[e.AptosChainId.APTOS_MOVEMENT_PORTO]:{name:"Movement Porto Aptos",chainId:e.AptosChainId.APTOS_MOVEMENT_PORTO,explorerUrl:"https://explorer.movementnetwork.xyz",suffix:"?porto+testnet"}};var R={block:"block",address:"account",tx:"txn",token:void 0};function D(n,t,o){let{explorerUrl:a,suffix:s}=i.AptosChainInfo[n],A=R[o];if(A)return`${a}/${A}/${t}${s}`}i.SolanaChainInfo={[e.SolanaChainId.SOLANA_MAINNET]:{name:"Solana Mainnet",chainId:e.SolanaChainId.SOLANA_MAINNET,explorerUrl:"https://solscan.io/",suffix:""},[e.SolanaChainId.SOLANA_TESTNET]:{name:"Solana Testnet",chainId:e.SolanaChainId.SOLANA_MAINNET,explorerUrl:"https://solscan.io/",suffix:"?cluster=testnet"}};var H={block:"block",address:"address",tx:"tx",token:"token"};function w(n,t,o){let{explorerUrl:a,suffix:s}=i.SolanaChainInfo[n],A=H[o];if(A)return`${a}${A}/${t}${s}`}var M={[e.SuiChainId.SUI_MAINNET]:{name:"Sui Mainnet",chainId:e.SuiChainId.SUI_MAINNET,explorerUrl:"https://suivision.xyz"},[e.SuiChainId.SUI_TESTNET]:{name:"Sui Testnet",chainId:e.SuiChainId.SUI_TESTNET,explorerUrl:"https://testnet.suivision.xyz"}},v={block:"checkpoint",address:"account",tx:"txblock",token:void 0};function P(n,t,o){let{explorerUrl:a}=M[n],s=v[o];if(s)return`${a}/${s}/${t}`}function F(n,t,o){if(!n||!t||!o)return;let a=n.toString();if(Object.keys(i.EthChainInfo).includes(a))return y(a,t,o);if(Object.keys(i.BTCChainInfo).includes(a))return L(a,t,o);if(Object.keys(i.AptosChainInfo).includes(a))return D(a,t,o);if(Object.keys(i.SolanaChainInfo).includes(a))return w(a,t,o);if(Object.keys(M).includes(a))return P(a,t,o)}i.getChainExternalUrl=F;function K(n,t,o){if(!n||!t||!o)return;let a=i.EthChainInfo[n];if(a&&a.blockscoutUrl)return`${a.blockscoutUrl}/${o}/${t}`}i.getChainBlockscoutUrl=K});var _=E(d=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0});d.getChainScanUrl=d.getChainName=d.CHAIN_MAP=void 0;var l=h(),V=b();d.CHAIN_MAP={[l.ChainId.APTOS_MOVEMENT_MAINNET]:"Movement Mainnet Aptos",[l.ChainId.APTOS_MOVEMENT_TESTNET]:"Movement Testnet Aptos",[l.ChainId.APTOS_MOVEMENT_PORTO]:"Movement Porto Aptos",[l.ChainId.SUI_MOVEMENT_MAINNET]:"Movement Mainnet Sui",[l.ChainId.SUI_MOVEMENT_TESTNET]:"Movement Testnet Sui",[l.ChainId.BTC_MAINNET]:"Bitcoin Mainnet",[l.ChainId.BTC_TESTNET]:"Bitcoin Testnet"};for(let[n,t]of Object.entries(l.ChainId)){if(d.CHAIN_MAP[t])continue;let o=V.EthChainInfo[t];if(o){d.CHAIN_MAP[t]=o.name;continue}let a=n.split("_");d.CHAIN_MAP[t]=a.map((s,A)=>s[0]+s.slice(1).toLowerCase()).join(" ")}function u(n){if(typeof n=="number"&&(n=n.toString()),n){let t=d.CHAIN_MAP[n];if(t)return t}return n||""}d.getChainName=u;function g(n,t,o){let a=u(n);if(a==="Ethereum")return o==="block"?`https://etherscan.io/block/${t}`:o==="address"?`https://etherscan.io/address/${t}`:`https://etherscan.io/tx/${t}`;if(a==="Polygon")return o==="block"?`https://polygonscan.com/block/${t}`:o==="address"?`https://polygonscan.com/address/${t}`:`https://polygonscan.com/tx/${t}`;if(a.startsWith("Aptos ")){let s="?network=mainnet";return a.includes("Testnet")?s="?network=testnet":a.includes("Devnet")&&(s="?network=devnet"),o==="block"?`https://explorer.aptoslabs.com/block/${t}/${s}`:o==="address"?`https://explorer.aptoslabs.com/account/${t}/${s}`:`https://explorer.aptoslabs.com/txn/${t}/${s}`}if(a.startsWith("Solana "))return o==="block"?`https://explorer.solana.com/block/${t}`:o==="address"?`https://explorer.solana.com/address/${t}`:`https://explorer.solana.io/tx/${t}`;if(a.startsWith("Sui "))return o==="block"?`https://suivision.xyz/checkpoint/${t}`:o==="address"?`https://suivision.xyz/account/${t}`:`https://suivision.xyz/txblock/${t}`}d.getChainScanUrl=g});var z=E(c=>{"use strict";var $=c&&c.__createBinding||(Object.create?function(n,t,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(t,o);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(n,a,s)}:function(n,t,o,a){a===void 0&&(a=o),n[a]=t[o]}),O=c&&c.__exportStar||function(n,t){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(t,o)&&$(t,n,o)};Object.defineProperty(c,"__esModule",{value:!0});O(h(),c);O(b(),c);O(_(),c)});export{z as a};
3
- //# sourceMappingURL=chunk-AQU5WWON.js.map
2
+ import{c as E}from"./chunk-6GD6B22G.js";var h=E(p=>{"use strict";Object.defineProperty(p,"__esModule",{value:!0});p.getChainType=p.ChainId=p.BTCChainId=p.StarknetChainId=p.CosmosChainId=p.FuelChainId=p.SolanaChainId=p.SuiChainId=p.AptosChainId=p.EthChainId=p.ChainType=void 0;var T;(function(n){n.SOLANA="solana",n.SUI="sui",n.APTOS="aptos",n.ETH="evm",n.BTC="btc"})(T||(p.ChainType=T={}));var x;(function(n){n.ETHEREUM="1",n.OPTIMISM="10",n.CRONOS="25",n.BINANCE="56",n.POLYGON="137",n.MANTA_PACIFIC="169",n.XLAYER_TESTNET="195",n.XLAYER_MAINNET="196",n.B2_MAINNET="223",n.FANTOM="250",n.FRAXTAL="252",n.KUCOIN="321",n.CRONOS_ZKEVM="388",n.ZKSYNC_ERA="324",n.CRONOS_TESTNET="338",n.ASTAR="592",n.LYRA="957",n.POLYGON_ZKEVM="1101",n.CONFLUX="1030",n.METIS="1088",n.MOONBEAM="1284",n.UNCHAIN_SEPOLIA="1301",n.SONEIUM_TESTNET="1946",n.BEVM="11501",n.MERLIN_MAINNET="4200",n.MANTLE="5000",n.BASE="8453",n.LUMIO_TESTNET="9990",n.HOLESKY="17000",n.ASTAR_ZKEVM="3776",n.MOVEMENT_EVM_TESTNET="30732",n.MODE="34443",n.ARBITRUM="42161",n.AVALANCHE="43114",n.ZIRCUIT_TESTNET="48899",n.ZIRCUIT_MAINNET="48900",n.BOB="60808",n.LINEA="59144",n.SONIC_TESTNET="64165",n.BLAST="81457",n.CHILIZ="88888",n.TAIKO="167000",n.TAIKO_TESTNET="167008",n.BITLAYER="200901",n.SCROLL="534352",n.ZKLINK_NOVA="810180",n.SEPOLIA="11155111",n.AURORA="1313161554",n.BLAST_SEPOLIA="168587773"})(x||(p.EthChainId=x={}));var k;(function(n){n.APTOS_MAINNET="aptos_mainnet",n.APTOS_TESTNET="aptos_testnet",n.APTOS_MOVEMENT_TESTNET="aptos_m2_testnet",n.APTOS_MOVEMENT_PORTO="aptos_movement_porto",n.APTOS_MOVEMENT_MAINNET="aptos_movement_mainnet"})(k||(p.AptosChainId=k={}));var C;(function(n){n.SUI_MAINNET="sui_mainnet",n.SUI_TESTNET="sui_testnet",n.SUI_MOVEMENT_TESTNET="sui_m2_testnet",n.SUI_MOVEMENT_MAINNET="sui_m2_mainnet"})(C||(p.SuiChainId=C={}));var I;(function(n){n.SOLANA_MAINNET="sol_mainnet",n.SOLANA_DEVNET="sol_devnet",n.SOLANA_TESTNET="sol_testnet",n.SOLANA_PYTH="sol_pyth"})(I||(p.SolanaChainId=I={}));var m;(function(n){n.FUEL_MAINNET="fuel_mainnet",n.FUEL_TESTNET="fuel_testnet"})(m||(p.FuelChainId=m={}));var S;(function(n){n.INJECTIVE_MAINNET="injective_mainnet",n.INJECTIVE_TESTNET="injective_testnet"})(S||(p.CosmosChainId=S={}));var N;(function(n){n.STARKNET_MAINNET="starknet_mainnet",n.STARKNET_SEPOLIA="starknet_sepolia"})(N||(p.StarknetChainId=N={}));var f;(function(n){n.BTC_MAINNET="btc_mainnet",n.BTC_TESTNET="btc_testnet"})(f||(p.BTCChainId=f={}));p.ChainId={...x,...k,...C,...I,...m,...S,...N,...f};function U(n){let t=String(n).toLowerCase();return t.startsWith("sol")?T.SOLANA:t.startsWith("sui")?T.SUI:t.startsWith("apt")?T.APTOS:t.startsWith("btc")?T.BTC:T.ETH}p.getChainType=U});var b=E(i=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});i.getChainBlockscoutUrl=i.getChainExternalUrl=i.SolanaChainInfo=i.AptosChainInfo=i.BTCChainInfo=i.EthChainInfo=i.ExplorerApiType=void 0;var e=h(),r;(function(n){n.ETHERSCAN="etherscan",n.BLOCKSCOUT="blockscout",n.L2SCAN="l2scan",n.OKLINK="oklink"})(r||(i.ExplorerApiType=r={}));i.EthChainInfo={[e.EthChainId.ETHEREUM]:{name:"Ethereum",chainId:e.EthChainId.ETHEREUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://etherscan.io",explorerApi:"https://api.etherscan.io",blockscoutUrl:"https://eth.blockscout.com"},[e.EthChainId.SEPOLIA]:{name:"Sepolia",chainId:e.EthChainId.SEPOLIA,mainnetChainId:e.EthChainId.ETHEREUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x1ef5f52bdbe11af2377c58ecc914a8c72ea807cf",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://sepolia.etherscan.io",explorerApi:"https://api-sepolia.etherscan.io",blockscoutUrl:"https://eth-sepolia.blockscout.com"},[e.EthChainId.HOLESKY]:{name:"Holesky",chainId:e.EthChainId.HOLESKY,mainnetChainId:e.EthChainId.ETHEREUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x94373a4919B3240D86eA41593D5eBa789FEF3848",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://holesky.etherscan.io",explorerApi:"https://api-holesky.etherscan.io",blockscoutUrl:"https://eth-holesky.blockscout.com"},[e.EthChainId.BINANCE]:{name:"Binance",chainId:e.EthChainId.BINANCE,priceTokenAddress:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",tokenSymbol:"BNB",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://bscscan.com",explorerApi:"https://api.bscscan.com"},[e.EthChainId.POLYGON]:{name:"Polygon",chainId:e.EthChainId.POLYGON,priceTokenAddress:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",tokenSymbol:"MATIC",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://polygonscan.com",explorerApi:"https://api.polygonscan.com"},[e.EthChainId.ARBITRUM]:{name:"Arbitrum",chainId:e.EthChainId.ARBITRUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://arbiscan.io",explorerApi:"https://api.arbiscan.io"},[e.EthChainId.AVALANCHE]:{name:"Avalanche",chainId:e.EthChainId.AVALANCHE,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://snowtrace.io",explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan"},[e.EthChainId.POLYGON_ZKEVM]:{name:"Polygon zkEVM",chainId:e.EthChainId.POLYGON_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://zkevm.polygonscan.com",explorerApi:"https://api-zkevm.polygonscan.com"},[e.EthChainId.MOONBEAM]:{name:"Moonbeam",chainId:e.EthChainId.MOONBEAM,priceTokenAddress:"0xacc15dc74880c9944775448304b263d191c6077f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xacc15dc74880c9944775448304b263d191c6077f",tokenSymbol:"GLMR",tokenDecimals:18,explorerApiType:r.ETHERSCAN,explorerUrl:"https://moonscan.io",explorerApi:"https://api-moonbeam.moonscan.io"},[e.EthChainId.ASTAR]:{name:"Astar",chainId:e.EthChainId.ASTAR,priceTokenAddress:"0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",tokenSymbol:"ASTR",tokenDecimals:18,explorerApiType:r.BLOCKSCOUT,explorerUrl:"https://astar.blockscout.com",explorerApi:"https://astar.blockscout.com"},[e.EthChainId.ASTAR_ZKEVM]:{name:"Astar zkEVM",chainId:e.EthChainId.ASTAR_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xE9CC37904875B459Fa5D0FE37680d36F1ED55e38",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://astar-zkevm.explorer.startale.com",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://astar-zkevm.explorer.startale.com"},[e.EthChainId.LINEA]:{name:"Linea",chainId:e.EthChainId.LINEA,priceTokenAddress:"0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://lineascan.build",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.lineascan.build"},[e.EthChainId.SCROLL]:{name:"Scroll",chainId:e.EthChainId.SCROLL,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5300000000000000000000000000000000000004",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://scrollscan.com",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.scrollscan.com"},[e.EthChainId.TAIKO]:{name:"Taiko Mainnet",chainId:e.EthChainId.TAIKO,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xA51894664A773981C6C112C43ce576f315d5b1B6",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://taikoscan.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.taikoscan.io"},[e.EthChainId.TAIKO_TESTNET]:{name:"Taiko Testnet",chainId:e.EthChainId.TAIKO_TESTNET,mainnetChainId:e.EthChainId.TAIKO,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xae2C46ddb314B9Ba743C6dEE4878F151881333D9",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://hekla.taikoscan.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://api-hekla.taikoscan.io"},[e.EthChainId.XLAYER_TESTNET]:{name:"X Layer Testnet",chainId:e.EthChainId.XLAYER_TESTNET,mainnetChainId:e.EthChainId.XLAYER_MAINNET,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xa749ad81913cdc19881ebeb64631df72be708335",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://www.oklink.com/xlayer-test",explorerApiType:r.OKLINK,explorerApi:"https://www.oklink.com/api/v5/explorer"},[e.EthChainId.XLAYER_MAINNET]:{name:"X Layer Mainnet",chainId:e.EthChainId.XLAYER_MAINNET,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5a77f1443d16ee5761d310e38b62f77f726bc71c",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://www.oklink.com/xlayer",explorerApiType:r.OKLINK,explorerApi:"https://www.oklink.com/api/v5/explorer"},[e.EthChainId.BLAST]:{name:"Blast Mainnet",chainId:e.EthChainId.BLAST,priceTokenAddress:"0x4300000000000000000000000000000000000004",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4300000000000000000000000000000000000004",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://blastscan.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.blastscan.io"},[e.EthChainId.BLAST_SEPOLIA]:{name:"Blast Mainnet",chainId:e.EthChainId.BLAST_SEPOLIA,mainnetChainId:e.EthChainId.BLAST,priceTokenAddress:"0x4200000000000000000000000000000000000023",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000023",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://sepolia.blastscan.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://api-sepolia.blastscan.io"},[e.EthChainId.BASE]:{name:"Base",chainId:e.EthChainId.BASE,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://basescan.org",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.basescan.org"},[e.EthChainId.ZKSYNC_ERA]:{name:"zkSync Era",chainId:e.EthChainId.ZKSYNC_ERA,priceTokenAddress:"0x000000000000000000000000000000000000800A",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zksync.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://block-explorer-api.mainnet.zksync.io"},[e.EthChainId.ZIRCUIT_TESTNET]:{name:"Zircuit Testnet",chainId:e.EthChainId.ZIRCUIT_TESTNET,mainnetChainId:e.EthChainId.ZIRCUIT_MAINNET,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.testnet.zircuit.com"},[e.EthChainId.ZIRCUIT_MAINNET]:{name:"Zircuit Mainnet",chainId:e.EthChainId.ZIRCUIT_MAINNET,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zircuit.com"},[e.EthChainId.FANTOM]:{name:"Fantom Opera",chainId:e.EthChainId.FANTOM,priceTokenAddress:"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",tokenSymbol:"WFTM",tokenDecimals:18,explorerUrl:"https://ftmscan.com",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.ftmscan.com"},[e.EthChainId.OPTIMISM]:{name:"Optimism Mainnet",chainId:e.EthChainId.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://optimistic.etherscan.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://api-optimistic.etherscan.io"},[e.EthChainId.CRONOS]:{name:"Cronos Mainnet",chainId:e.EthChainId.CRONOS,priceTokenAddress:"0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",tokenSymbol:"CRO",tokenDecimals:18,explorerUrl:"https://cronoscan.com",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.cronoscan.com"},[e.EthChainId.CRONOS_TESTNET]:{name:"Cronos Testnet",chainId:e.EthChainId.CRONOS_TESTNET,mainnetChainId:e.EthChainId.CRONOS,priceTokenAddress:"0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4",tokenSymbol:"CRO",tokenDecimals:18,explorerUrl:"https://explorer.cronos.org/testnet"},[e.EthChainId.BITLAYER]:{name:"Bitlayer Mainnet",chainId:e.EthChainId.BITLAYER,priceTokenAddress:"0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://www.btrscan.com",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.btrscan.com/scan"},[e.EthChainId.MANTA_PACIFIC]:{name:"Manta Pacific",chainId:e.EthChainId.MANTA_PACIFIC,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0Dc808adcE2099A9F62AA87D9670745AbA741746",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://pacific-explorer.manta.network",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://pacific-explorer.manta.network"},[e.EthChainId.MANTLE]:{name:"Mantle",chainId:e.EthChainId.MANTLE,priceTokenAddress:"0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",tokenSymbol:"MNT",tokenDecimals:18,explorerUrl:"https://mantlescan.xyz",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.mantlescan.xyz"},[e.EthChainId.B2_MAINNET]:{name:"B2 Mainnet",chainId:e.EthChainId.B2_MAINNET,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://explorer.bsquared.network",explorerApiType:r.L2SCAN,explorerApi:"https://explorer.bsquared.network/api"},[e.EthChainId.MODE]:{name:"Mode Mainnet",chainId:e.EthChainId.MODE,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://modescan.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan"},[e.EthChainId.BOB]:{name:"Bob Mainnet",chainId:e.EthChainId.BOB,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.gobob.xyz",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://explorer.gobob.xyz"},[e.EthChainId.FRAXTAL]:{name:"Fraxtal Mainnet",chainId:e.EthChainId.FRAXTAL,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xFC00000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://fraxscan.com",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.fraxscan.com"},[e.EthChainId.KUCOIN]:{name:"KCC Mainnet",chainId:e.EthChainId.KUCOIN,priceTokenAddress:"0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521",tokenSymbol:"KCS",tokenDecimals:18,explorerUrl:"https://scan.kcc.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://scan.kcc.io"},[e.EthChainId.CONFLUX]:{name:"Conflux eSpace",chainId:e.EthChainId.CONFLUX,priceTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b",tokenSymbol:"CFX",tokenDecimals:18,explorerUrl:"https://evm.confluxscan.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://evmapi.confluxscan.io"},[e.EthChainId.METIS]:{name:"Metis",chainId:e.EthChainId.METIS,priceTokenAddress:"0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481",tokenSymbol:"METIS",tokenDecimals:18,explorerUrl:"https://explorer.metis.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/"},[e.EthChainId.BEVM]:{name:"BEVM",chainId:e.EthChainId.BEVM,priceTokenAddress:"0xB5136FEba197f5fF4B765E5b50c74db717796dcD",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xB5136FEba197f5fF4B765E5b50c74db717796dcD",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://scan.bevm.io",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://scan.bevm.io"},[e.EthChainId.MERLIN_MAINNET]:{name:"Merlin Mainnet",chainId:e.EthChainId.MERLIN_MAINNET,priceTokenAddress:"0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://scan.merlinchain.io",explorerApiType:r.L2SCAN,explorerApi:"https://scan.merlinchain.io/api"},[e.EthChainId.LUMIO_TESTNET]:{name:"Lumio Testnet",chainId:e.EthChainId.LUMIO_TESTNET,priceTokenAddress:"0x1F3dBeBA2513E87642750a278649dc828d054971",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x1F3dBeBA2513E87642750a278649dc828d054971",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.testnet.imola.movementlabs.xyz",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://explorer.testnet.imola.movementlabs.xyz"},[e.EthChainId.MOVEMENT_EVM_TESTNET]:{name:"Movement EVM Testnet",chainId:e.EthChainId.MOVEMENT_EVM_TESTNET,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"MOVE",tokenDecimals:18,explorerUrl:"https://explorer.testnet.imola.movementlabs.xyz"},[e.EthChainId.CHILIZ]:{name:"Chiliz",chainId:e.EthChainId.CHILIZ,priceTokenAddress:"0x721EF6871f1c4Efe730Dce047D40D1743B886946",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x721EF6871f1c4Efe730Dce047D40D1743B886946",tokenSymbol:"CHZ",tokenDecimals:18,explorerUrl:"https://chiliscan.com",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/88888/etherscan"},[e.EthChainId.ZKLINK_NOVA]:{name:"zkLink Nova",chainId:e.EthChainId.ZKLINK_NOVA,priceTokenAddress:"0x000000000000000000000000000000000000800A",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zklink.io",explorerApiType:r.ETHERSCAN,explorerApi:"https://explorer-api.zklink.io"},[e.EthChainId.AURORA]:{name:"Auroa",chainId:e.EthChainId.AURORA,priceTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.aurora.dev",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://explorer.aurora.dev"},[e.EthChainId.SONIC_TESTNET]:{name:"Sonic Testnet",chainId:e.EthChainId.SONIC_TESTNET,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"S",tokenDecimals:18,explorerUrl:"https://scan.soniclabs.com",explorerApiType:r.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/testnet/evm/64165/etherscan"},[e.EthChainId.SONEIUM_TESTNET]:{name:"Soneium Testnet",chainId:e.EthChainId.SONEIUM_TESTNET,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x728F2745410A56620B50a6E0592743450e08Cac6",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer-testnet.soneium.org",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://explorer-testnet.soneium.org"},[e.EthChainId.CRONOS_ZKEVM]:{name:"Cronos zkEVM",chainId:e.EthChainId.CRONOS_ZKEVM,priceTokenAddress:"0x000000000000000000000000000000000000800a",tokenAddress:"0x000000000000000000000000000000000000800a",wrappedTokenAddress:"0xc1bf55ee54e16229d9b369a5502bfe5fc9f20b6d",tokenSymbol:"zkCRO",tokenDecimals:18,explorerUrl:"https://explorer.zkevm.cronos.org",explorerApiType:r.ETHERSCAN,explorerApi:"https://explorer.zkevm.cronos.org"},[e.EthChainId.LYRA]:{name:"Lyra",chainId:e.EthChainId.LYRA,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x15CEcd5190A43C7798dD2058308781D0662e678E",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.lyra.finance",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://explorer.lyra.finance"},[e.EthChainId.UNCHAIN_SEPOLIA]:{name:"Unchain Sepolia",chainId:e.EthChainId.UNCHAIN_SEPOLIA,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://unichain-sepolia.blockscout.com",explorerApiType:r.BLOCKSCOUT,explorerApi:"https://unichain-sepolia.blockscout.com"}};function y(n,t,o){let a=o,s=i.EthChainInfo[n];if(s)return s.explorerApiType===r.L2SCAN&&o==="block"&&(a="blocks"),`${s.explorerUrl}/${a}/${t}`}i.BTCChainInfo={[e.BTCChainId.BTC_MAINNET]:{name:"Bitcoin Mainnet",chainId:e.BTCChainId.BTC_MAINNET,explorerUrl:"https://mempool.space"},[e.BTCChainId.BTC_TESTNET]:{name:"Bitcoin Mainnet",chainId:e.BTCChainId.BTC_TESTNET,explorerUrl:"https://mempool.space/testnet4"}};var B={block:"block",address:"address",tx:"tx",token:void 0};function L(n,t,o){let a=i.BTCChainInfo[n]?.explorerUrl,s=B[o];if(!(!a||!s))return`${a}/${s}/${t}`}i.AptosChainInfo={[e.AptosChainId.APTOS_MAINNET]:{name:"Aptos Mainnet",chainId:e.AptosChainId.APTOS_MAINNET,explorerUrl:"https://explorer.aptoslabs.com",suffix:"?network=mainnet"},[e.AptosChainId.APTOS_TESTNET]:{name:"Aptos Testenet",chainId:e.AptosChainId.APTOS_TESTNET,explorerUrl:"https://explorer.aptoslabs.com",suffix:"?network=mainnet"},[e.AptosChainId.APTOS_MOVEMENT_MAINNET]:{name:"Movement Mainnet Aptos",chainId:e.AptosChainId.APTOS_MOVEMENT_MAINNET,explorerUrl:"https://explorer.movementnetwork.xyz",suffix:"?network=mainnet"},[e.AptosChainId.APTOS_MOVEMENT_TESTNET]:{name:"Movement Testnet Aptos",chainId:e.AptosChainId.APTOS_MOVEMENT_TESTNET,explorerUrl:"https://explorer.movementnetwork.xyz",suffix:"?network=testnet"},[e.AptosChainId.APTOS_MOVEMENT_PORTO]:{name:"Movement Porto Aptos",chainId:e.AptosChainId.APTOS_MOVEMENT_PORTO,explorerUrl:"https://explorer.movementnetwork.xyz",suffix:"?porto+testnet"}};var R={block:"block",address:"account",tx:"txn",token:void 0};function D(n,t,o){let{explorerUrl:a,suffix:s}=i.AptosChainInfo[n],A=R[o];if(A)return`${a}/${A}/${t}${s}`}i.SolanaChainInfo={[e.SolanaChainId.SOLANA_MAINNET]:{name:"Solana Mainnet",chainId:e.SolanaChainId.SOLANA_MAINNET,explorerUrl:"https://solscan.io/",suffix:""},[e.SolanaChainId.SOLANA_TESTNET]:{name:"Solana Testnet",chainId:e.SolanaChainId.SOLANA_MAINNET,explorerUrl:"https://solscan.io/",suffix:"?cluster=testnet"}};var H={block:"block",address:"address",tx:"tx",token:"token"};function w(n,t,o){let{explorerUrl:a,suffix:s}=i.SolanaChainInfo[n],A=H[o];if(A)return`${a}${A}/${t}${s}`}var u={[e.SuiChainId.SUI_MAINNET]:{name:"Sui Mainnet",chainId:e.SuiChainId.SUI_MAINNET,explorerUrl:"https://suivision.xyz"},[e.SuiChainId.SUI_TESTNET]:{name:"Sui Testnet",chainId:e.SuiChainId.SUI_TESTNET,explorerUrl:"https://testnet.suivision.xyz"}},v={block:"checkpoint",address:"account",tx:"txblock",token:void 0};function P(n,t,o){let{explorerUrl:a}=u[n],s=v[o];if(s)return`${a}/${s}/${t}`}function F(n,t,o){if(!n||!t||!o)return;let a=n.toString();if(Object.keys(i.EthChainInfo).includes(a))return y(a,t,o);if(Object.keys(i.BTCChainInfo).includes(a))return L(a,t,o);if(Object.keys(i.AptosChainInfo).includes(a))return D(a,t,o);if(Object.keys(i.SolanaChainInfo).includes(a))return w(a,t,o);if(Object.keys(u).includes(a))return P(a,t,o)}i.getChainExternalUrl=F;function K(n,t,o){if(!n||!t||!o)return;let a=i.EthChainInfo[n];if(a&&a.blockscoutUrl)return`${a.blockscoutUrl}/${o}/${t}`}i.getChainBlockscoutUrl=K});var _=E(d=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0});d.getChainScanUrl=d.getChainName=d.CHAIN_MAP=void 0;var l=h(),V=b();d.CHAIN_MAP={[l.ChainId.APTOS_MOVEMENT_MAINNET]:"Movement Mainnet Aptos",[l.ChainId.APTOS_MOVEMENT_TESTNET]:"Movement Testnet Aptos",[l.ChainId.APTOS_MOVEMENT_PORTO]:"Movement Porto Aptos",[l.ChainId.SUI_MOVEMENT_MAINNET]:"Movement Mainnet Sui",[l.ChainId.SUI_MOVEMENT_TESTNET]:"Movement Testnet Sui",[l.ChainId.BTC_MAINNET]:"Bitcoin Mainnet",[l.ChainId.BTC_TESTNET]:"Bitcoin Testnet"};for(let[n,t]of Object.entries(l.ChainId)){if(d.CHAIN_MAP[t])continue;let o=V.EthChainInfo[t];if(o){d.CHAIN_MAP[t]=o.name;continue}let a=n.split("_");d.CHAIN_MAP[t]=a.map((s,A)=>s[0]+s.slice(1).toLowerCase()).join(" ")}function M(n){if(typeof n=="number"&&(n=n.toString()),n){let t=d.CHAIN_MAP[n];if(t)return t}return n||""}d.getChainName=M;function g(n,t,o){let a=M(n);if(a==="Ethereum")return o==="block"?`https://etherscan.io/block/${t}`:o==="address"?`https://etherscan.io/address/${t}`:`https://etherscan.io/tx/${t}`;if(a==="Polygon")return o==="block"?`https://polygonscan.com/block/${t}`:o==="address"?`https://polygonscan.com/address/${t}`:`https://polygonscan.com/tx/${t}`;if(a.startsWith("Aptos ")){let s="?network=mainnet";return a.includes("Testnet")?s="?network=testnet":a.includes("Devnet")&&(s="?network=devnet"),o==="block"?`https://explorer.aptoslabs.com/block/${t}/${s}`:o==="address"?`https://explorer.aptoslabs.com/account/${t}/${s}`:`https://explorer.aptoslabs.com/txn/${t}/${s}`}if(a.startsWith("Solana "))return o==="block"?`https://explorer.solana.com/block/${t}`:o==="address"?`https://explorer.solana.com/address/${t}`:`https://explorer.solana.io/tx/${t}`;if(a.startsWith("Sui "))return o==="block"?`https://suivision.xyz/checkpoint/${t}`:o==="address"?`https://suivision.xyz/account/${t}`:`https://suivision.xyz/txblock/${t}`}d.getChainScanUrl=g});var z=E(c=>{"use strict";var $=c&&c.__createBinding||(Object.create?function(n,t,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(t,o);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(n,a,s)}:function(n,t,o,a){a===void 0&&(a=o),n[a]=t[o]}),O=c&&c.__exportStar||function(n,t){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(t,o)&&$(t,n,o)};Object.defineProperty(c,"__esModule",{value:!0});O(h(),c);O(b(),c);O(_(),c)});export{z as a};
3
+ //# sourceMappingURL=chunk-QW2MPHP5.js.map