@sentio/sdk-bundle 2.42.0-rc.8 → 2.42.0

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 (79) 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 +1 -1
  5. package/lib/aptos/ext/index.js +1 -1
  6. package/lib/aptos/index.js +1 -1
  7. package/lib/btc/filter.d.ts +2 -2
  8. package/lib/btc/filter.d.ts.map +1 -1
  9. package/lib/btc/index.js +1 -1
  10. package/lib/btc/types.d.ts +28 -27
  11. package/lib/btc/types.d.ts.map +1 -1
  12. package/lib/{chunk-GTPT4243.js → chunk-2JLUHA3R.js} +2 -2
  13. package/lib/{chunk-OBDOES3B.js → chunk-3MJI3F52.js} +2 -2
  14. package/lib/{chunk-CXRGJJLA.js → chunk-7BEMS4NV.js} +2 -2
  15. package/lib/chunk-7H2MCYRO.js +3 -0
  16. package/lib/chunk-7H2MCYRO.js.map +1 -0
  17. package/lib/{chunk-6RIEVNHU.js → chunk-CG7IRNK3.js} +2 -2
  18. package/lib/chunk-DTZPQWAR.js +4 -0
  19. package/lib/chunk-DTZPQWAR.js.map +1 -0
  20. package/lib/{chunk-ZDHGKRIS.js → chunk-EKN4H4RV.js} +2 -2
  21. package/lib/{chunk-SPHRUUY6.js → chunk-EU2WV53M.js} +2 -2
  22. package/lib/{chunk-KJFE3KIS.js → chunk-HC2IIOHY.js} +2 -2
  23. package/lib/{chunk-GORIGKSL.js → chunk-HWTRE7ZA.js} +2 -2
  24. package/lib/{chunk-AROEEGR4.js → chunk-LW4OLSFS.js} +2 -2
  25. package/lib/{chunk-MTF5HTSO.js → chunk-M5LNOTPX.js} +2 -2
  26. package/lib/{chunk-7SE2IH73.js → chunk-MF5KGJWT.js} +2 -2
  27. package/lib/{chunk-BY3NP62H.js → chunk-O3IGCLZM.js} +2 -2
  28. package/lib/{chunk-ECTPH53D.js → chunk-QRX2UVZ3.js} +2 -2
  29. package/lib/{chunk-ZY643Q3A.js → chunk-QYIO43ZC.js} +2 -2
  30. package/lib/{chunk-JEAW5KKT.js → chunk-SWTOKXE3.js} +2 -2
  31. package/lib/{chunk-LDCEM6PZ.js → chunk-T4HXXSET.js} +2 -2
  32. package/lib/{chunk-MGWHCJHO.js → chunk-ZLEKYV7V.js} +2 -2
  33. package/lib/eth/builtin/eacaggregatorproxy.js +1 -1
  34. package/lib/eth/builtin/erc1155.js +1 -1
  35. package/lib/eth/builtin/erc20.js +1 -1
  36. package/lib/eth/builtin/erc721.js +1 -1
  37. package/lib/eth/builtin/index.js +1 -1
  38. package/lib/eth/builtin/weth9.js +1 -1
  39. package/lib/eth/codegen/index.js +1 -1
  40. package/lib/eth/index.js +1 -1
  41. package/lib/fuel/index.js +1 -1
  42. package/lib/solana/builtin/index.js +1 -1
  43. package/lib/solana/index.js +1 -1
  44. package/lib/stark/codegen/index.js +1 -1
  45. package/lib/stark/index.js +1 -1
  46. package/lib/sui/builtin/0x1.js +1 -1
  47. package/lib/sui/builtin/0x2.js +1 -1
  48. package/lib/sui/builtin/0x3.js +1 -1
  49. package/lib/sui/builtin/index.js +1 -1
  50. package/lib/sui/codegen/index.js +1 -1
  51. package/lib/sui/ext/index.js +1 -1
  52. package/lib/sui/index.js +1 -1
  53. package/lib/testing/index.js +1 -1
  54. package/lib/utils/index.js +1 -1
  55. package/package.json +2 -2
  56. package/src/btc/btc-processor.ts +1 -1
  57. package/src/btc/filter.ts +8 -3
  58. package/src/btc/types.ts +31 -30
  59. package/lib/chunk-3AEWKTHO.js +0 -4
  60. package/lib/chunk-3AEWKTHO.js.map +0 -1
  61. package/lib/chunk-7HVQTJAO.js +0 -3
  62. package/lib/chunk-7HVQTJAO.js.map +0 -1
  63. /package/lib/{chunk-GTPT4243.js.map → chunk-2JLUHA3R.js.map} +0 -0
  64. /package/lib/{chunk-OBDOES3B.js.map → chunk-3MJI3F52.js.map} +0 -0
  65. /package/lib/{chunk-CXRGJJLA.js.map → chunk-7BEMS4NV.js.map} +0 -0
  66. /package/lib/{chunk-6RIEVNHU.js.map → chunk-CG7IRNK3.js.map} +0 -0
  67. /package/lib/{chunk-ZDHGKRIS.js.map → chunk-EKN4H4RV.js.map} +0 -0
  68. /package/lib/{chunk-SPHRUUY6.js.map → chunk-EU2WV53M.js.map} +0 -0
  69. /package/lib/{chunk-KJFE3KIS.js.map → chunk-HC2IIOHY.js.map} +0 -0
  70. /package/lib/{chunk-GORIGKSL.js.map → chunk-HWTRE7ZA.js.map} +0 -0
  71. /package/lib/{chunk-AROEEGR4.js.map → chunk-LW4OLSFS.js.map} +0 -0
  72. /package/lib/{chunk-MTF5HTSO.js.map → chunk-M5LNOTPX.js.map} +0 -0
  73. /package/lib/{chunk-7SE2IH73.js.map → chunk-MF5KGJWT.js.map} +0 -0
  74. /package/lib/{chunk-BY3NP62H.js.map → chunk-O3IGCLZM.js.map} +0 -0
  75. /package/lib/{chunk-ECTPH53D.js.map → chunk-QRX2UVZ3.js.map} +0 -0
  76. /package/lib/{chunk-ZY643Q3A.js.map → chunk-QYIO43ZC.js.map} +0 -0
  77. /package/lib/{chunk-JEAW5KKT.js.map → chunk-SWTOKXE3.js.map} +0 -0
  78. /package/lib/{chunk-LDCEM6PZ.js.map → chunk-T4HXXSET.js.map} +0 -0
  79. /package/lib/{chunk-MGWHCJHO.js.map → chunk-ZLEKYV7V.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/sdk-bundle",
3
- "version": "2.42.0-rc.8",
3
+ "version": "2.42.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -48,7 +48,7 @@
48
48
  "!{lib,src}/*/tests"
49
49
  ],
50
50
  "dependencies": {
51
- "@sentio/runtime": "^2.42.0-rc.8"
51
+ "@sentio/runtime": "^2.42.0"
52
52
  },
53
53
  "peerDependencies": {},
54
54
  "devDependencies": {},
@@ -30,7 +30,7 @@ export class BTCProcessor {
30
30
  this.config.chainId,
31
31
  this.config.name ?? this.config.address ?? '',
32
32
  tx,
33
- this.config.address ?? tx.vout[0].script_address
33
+ this.config.address ?? tx.vout?.[0]?.scriptPubKey?.address
34
34
  )
35
35
  await handler(tx, ctx)
36
36
  return ctx.stopAndGetResult()
package/src/btc/filter.ts CHANGED
@@ -12,9 +12,14 @@ import { Transaction, Vin, Vout } from './types.js'
12
12
 
13
13
  export type TransactionFields = keyof Omit<Transaction, 'vin' | 'vout'>
14
14
 
15
- export type VinFields = keyof Omit<Vin, 'pre_vout' | 'pre_transaction'>
16
-
17
- export type VOutFields = keyof Vout
15
+ export type VinFields = keyof Omit<Vin, 'pre_vout' | 'pre_transaction' | 'scriptSig'> | 'script_asm' | 'script_hex'
16
+
17
+ export type VOutFields =
18
+ | keyof Omit<Vout, 'scriptPubKey'>
19
+ | 'script_asm'
20
+ | 'script_hex'
21
+ | 'script_type'
22
+ | 'script_address'
18
23
 
19
24
  export type Filter<F extends string> = {
20
25
  [K in F]?: Condition | Comparable
package/src/btc/types.ts CHANGED
@@ -2,45 +2,46 @@ import { BaseContext, Labels, normalizeLabels } from '../core/index.js'
2
2
  import { RecordMetaData } from '@sentio/protos'
3
3
  import { ChainId } from '@sentio/chain'
4
4
 
5
+ export type Transaction = {
6
+ txid: string
7
+ hash: string
8
+ txindex: number
9
+ blockhash: string
10
+ blockheight: number
11
+ blocktime: number
12
+ size: number
13
+ vsize: number
14
+ version: number
15
+ locktime: number
16
+ vin: Vin[]
17
+ vout: Vout[]
18
+ }
19
+
5
20
  export type Vin = {
6
21
  vin_index: number
7
22
  coinbase?: string
8
- spent_transaction_hash?: string
9
- spent_output_index?: number
23
+ txid?: string
24
+ vout?: number
10
25
  sequence: number
11
26
  witness?: string[]
12
- script_asm: string
13
- script_hex: string
14
- value: number
15
- addresses?: string[]
27
+ scriptSig: {
28
+ asm: string
29
+ hex: string
30
+ }
16
31
  pre_vout?: Vout
17
32
  pre_transaction?: Transaction
18
33
  }
19
34
 
20
35
  export type Vout = {
21
36
  value: number
22
- vout_index: number
23
- script_asm: string
24
- script_hex: string
25
- script_type: string
26
- script_address: string
27
- script_reg_sigs: number
28
- }
29
-
30
- export type Transaction = {
31
- transaction_hash: string
32
- transaction_index: number
33
- block_hash: string
34
- block_number: number
35
- block_timestamp: Date
36
- size: number
37
- virtual_size: number
38
- version: number
39
- lock_time: number
40
- input_count: number
41
- output_count: number
42
- vin: Vin[]
43
- vout: Vout[]
37
+ n: number
38
+ scriptPubKey: {
39
+ asm: string
40
+ hex: string
41
+ reqSigs: number
42
+ type: string
43
+ address: string
44
+ }
44
45
  }
45
46
 
46
47
  export type Block = {
@@ -74,9 +75,9 @@ export class BTCContext extends BaseContext {
74
75
  return {
75
76
  address: this.address,
76
77
  contractName: this.name,
77
- blockNumber: BigInt(this.tx.block_number ?? 0),
78
+ blockNumber: BigInt(this.tx.blockheight ?? 0),
78
79
  transactionIndex: 0,
79
- transactionHash: this.tx.transaction_hash,
80
+ transactionHash: this.tx.txid,
80
81
  chainId: this.getChainId(),
81
82
  name: name,
82
83
  logIndex: 0,
@@ -1,4 +0,0 @@
1
- import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{D as m,Ka as _,La as y,Lc as N,Na as T,Oa as x,Pa as B,W as C,bd as o,fd as I,kd as k,tc as A}from"./chunk-TO35Z22E.js";import{a as V}from"./chunk-FC546GTB.js";import{e as P,g as F}from"./chunk-LLHU72AA.js";var p=class extends I{constructor(e,n,i,s){super({});this.chainId=e;this.name=n;this.tx=i;this.address=s}getMetaDataInternal(e,n){return{address:this.address,contractName:this.name,blockNumber:BigInt(this.tx.block_number??0),transactionIndex:0,transactionHash:this.tx.transaction_hash,chainId:this.getChainId(),name:e,logIndex:0,labels:A(n)}}getChainId(){return this.chainId}};import{ListStateStorage as R}from"@sentio/runtime";var g=class extends R{},l=g;F(l,"INSTANCE",new g);var d=class{constructor(t){this.config=t}callHandlers=[];static bind(t){let e=new d(t);return l.INSTANCE.addValue(e),e}onTransaction(t,e){let n={handler:async i=>{let s=i.transaction,a=new p(this.config.chainId,this.config.name??this.config.address??"",s,this.config.address??s.vout[0].script_address);return await t(s,a),a.stopAndGetResult()},filter:e};return this.callHandlers.push(n),this}};function w(r){if(r){let t=x.create(),e=[],n=[],i=[];for(let s of Array.isArray(r)?r:[r]){let{preVOut:a,preTransaction:b,...O}=s;e.push(O),a&&n.push(a),b&&i.push(b)}if(t.filters=T.create({filters:u(e)}),n.length>0){let s=u(n);s&&s.length>0&&(t.preVOut=s[0])}return i.length>0&&(t.preTransaction=f(i)?.[0]),t}}function D(r){if(r){let t=B.create(),e=Array.isArray(r)?r:[r];return t.filters=T.create({filters:u(e)}),t}}function f(r){return(Array.isArray(r)?r:[r]).map(e=>({filter:u(e.filter),inputFilter:w(e.inputFilter),outputFilter:D(e.outputFilter)}))}function S(r){let t=_.create();r instanceof Date&&(t.eq=o(r)),typeof r=="number"&&(t.eq=o(r)),typeof r=="string"&&(t.eq=o(r)),r instanceof V&&(t.eq=o(r)),typeof r=="bigint"&&(t.eq=o(r)),typeof r=="boolean"&&(t.eq=o(r)),Array.isArray(r)&&(t.in={values:r.map(e=>o(e))});for(let[e,n]of Object.entries(r))switch(e){case"prefix":case"contains":case"notContains":t[e]=n.toString();break;case"length":t.lengthEq=n;break;case"lengthGt":case"lengthLt":t[e]=n;break;case"hasAny":case"hasAll":case"in":t[e]={values:n.map(i=>o(i))};break;case"eq":case"gt":case"gte":case"lt":case"lte":case"ne":t[e]=o(n);break;default:throw new Error("Unknown condition op: "+e)}return t}function u(r){if(r&&r.length>0){let t=[];for(let e of r){let n=y.create();for(let[i,s]of Object.entries(e))n.conditions[i]=S(s);t.push(n)}return t}return[]}import{errorString as H,GLOBAL_CONFIG as E,mergeProcessResults as q,Plugin as v,PluginManager as L,USER_PROCESSOR as G}from"@sentio/runtime";var c=P(N(),1);var h=class extends v{name="BTCPlugin";handlers={txHandlers:[]};async configure(t){let e={txHandlers:[]};for(let n of l.INSTANCE.getValues()){let i=C.fromPartial({processorType:G,contract:{name:n.config.name,chainId:n.config.chainId.toString(),address:n.config.address||"*",abi:""},startBlock:n.config.startBlock,endBlock:n.config.endBlock});for(let s of n.callHandlers){let a=e.txHandlers.push(s.handler)-1;s.filter?i.btcTransactionConfigs.push({filters:f(s.filter),handlerId:a}):i.contract?.address!="*"&&i.btcTransactionConfigs.push({filters:f({outputFilter:{script_address:n.config.address}}),handlerId:a})}t.contractConfigs.push(i)}this.handlers=e}supportedHandlers=[m.BTC_TRANSACTION];processBinding(t){switch(t.handlerType){case m.BTC_TRANSACTION:return this.processTransaction(t);default:throw new c.ServerError(c.Status.INVALID_ARGUMENT,"No handle type registered "+t.handlerType)}}async start(t){}stateDiff(t){return k.INSTANCE.getValues().length!==t.templateInstances.length}async processTransaction(t){if(!t.data?.btcTransaction)throw new c.ServerError(c.Status.INVALID_ARGUMENT,"BTCEvents can't be null");let e=[],n=t.data?.btcTransaction;for(let i of t.handlerIds){let s=this.handlers.txHandlers[i](t.data?.btcTransaction).catch(a=>{throw new c.ServerError(c.Status.INTERNAL,"error processing transaction: "+JSON.stringify(n)+`
3
- `+H(a))});E.execution.sequential&&await s,e.push(s)}return q(await Promise.all(e))}};L.INSTANCE.register(new h);export{p as a,l as b,d as c,f as d,h as e};
4
- //# sourceMappingURL=chunk-3AEWKTHO.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/btc/types.ts","../src/btc/btc-processor.ts","../src/btc/filter.ts","../src/btc/btc-plugin.ts"],"sourcesContent":["import { BaseContext, Labels, normalizeLabels } from '../core/index.js'\nimport { RecordMetaData } from '@sentio/protos'\nimport { ChainId } from '@sentio/chain'\n\nexport type Vin = {\n vin_index: number\n coinbase?: string\n spent_transaction_hash?: string\n spent_output_index?: number\n sequence: number\n witness?: string[]\n script_asm: string\n script_hex: string\n value: number\n addresses?: string[]\n pre_vout?: Vout\n pre_transaction?: Transaction\n}\n\nexport type Vout = {\n value: number\n vout_index: number\n script_asm: string\n script_hex: string\n script_type: string\n script_address: string\n script_reg_sigs: number\n}\n\nexport type Transaction = {\n transaction_hash: string\n transaction_index: number\n block_hash: string\n block_number: number\n block_timestamp: Date\n size: number\n virtual_size: number\n version: number\n lock_time: number\n input_count: number\n output_count: number\n vin: Vin[]\n vout: Vout[]\n}\n\nexport type Block = {\n block_hash: string\n block_number: number\n block_timestamp: Date\n size: number\n stripped_size: number\n weight: number\n version: number\n merkle_root: string\n nonce: number\n bits: string\n difficulty: number\n previous_hash: string\n next_hash: string\n transaction_count: number\n}\n\nexport class BTCContext extends BaseContext {\n constructor(\n readonly chainId: string,\n readonly name: string,\n readonly tx: Transaction,\n readonly address: string\n ) {\n super({})\n }\n\n protected getMetaDataInternal(name: string, labels: Labels): RecordMetaData {\n return {\n address: this.address,\n contractName: this.name,\n blockNumber: BigInt(this.tx.block_number ?? 0),\n transactionIndex: 0,\n transactionHash: this.tx.transaction_hash,\n chainId: this.getChainId(),\n name: name,\n logIndex: 0,\n labels: normalizeLabels(labels)\n }\n }\n\n getChainId(): ChainId {\n return this.chainId as ChainId\n }\n}\n","import { ListStateStorage } from '@sentio/runtime'\nimport { BTCContext, Transaction } from './types.js'\nimport { Data_BTCTransaction, ProcessResult } from '@sentio/protos'\nimport { TransactionFilters } from './filter.js'\n\nexport class BTCProcessorState extends ListStateStorage<BTCProcessor> {\n static INSTANCE = new BTCProcessorState()\n}\n\nexport class BTCProcessor {\n callHandlers: CallHandler<Data_BTCTransaction>[] = []\n\n constructor(readonly config: BTCProcessorConfig) {}\n\n static bind(config: BTCProcessorConfig): BTCProcessor {\n const processor = new BTCProcessor(config)\n BTCProcessorState.INSTANCE.addValue(processor)\n return processor\n }\n\n public onTransaction(\n handler: (transaction: Transaction, ctx: BTCContext) => void | Promise<void>,\n filter?: TransactionFilters\n ) {\n const callHandler = {\n handler: async (call: Data_BTCTransaction) => {\n const tx = call.transaction as Transaction\n\n const ctx = new BTCContext(\n this.config.chainId,\n this.config.name ?? this.config.address ?? '',\n tx,\n this.config.address ?? tx.vout[0].script_address\n )\n await handler(tx, ctx)\n return ctx.stopAndGetResult()\n },\n filter\n }\n this.callHandlers.push(callHandler)\n return this\n }\n}\n\ninterface BTCProcessorConfig {\n chainId: string\n name?: string\n address?: string\n startBlock?: bigint\n endBlock?: bigint\n}\n\nexport type CallHandler<T> = {\n handler: (call: T) => Promise<ProcessResult>\n filter?: TransactionFilters\n}\n","import {\n BTCTransactionFilter,\n BTCTransactionFilter_Condition,\n BTCTransactionFilter_Filter,\n BTCTransactionFilter_Filters,\n BTCTransactionFilter_VinFilter,\n BTCTransactionFilter_VOutFilter\n} from '@sentio/protos'\nimport { serializeRichValue } from '../store/util.js'\nimport { BigDecimal } from '@sentio/bigdecimal'\nimport { Transaction, Vin, Vout } from './types.js'\n\nexport type TransactionFields = keyof Omit<Transaction, 'vin' | 'vout'>\n\nexport type VinFields = keyof Omit<Vin, 'pre_vout' | 'pre_transaction'>\n\nexport type VOutFields = keyof Vout\n\nexport type Filter<F extends string> = {\n [K in F]?: Condition | Comparable\n}\n\nexport type Condition = {\n eq?: Comparable\n gt?: Comparable\n gte?: Comparable\n lt?: Comparable\n lte?: Comparable\n ne?: Comparable\n // string has the prefix\n prefix?: string\n // string contains\n contains?: string\n notContains?: string\n length?: number\n lengthGt?: number\n lengthLt?: number\n // array contains any of the values\n hasAny?: Array<Comparable>\n // array contains all the values\n hasAll?: Array<Comparable>\n in?: Array<Comparable>\n}\n\nexport type Filters<T extends string> = Filter<T> | Filter<T>[]\n\nexport type VinFilter = Filter<VinFields> & {\n preVOut?: Filter<VOutFields>\n preTransaction?: {\n filter?: Array<Filter<TransactionFields>>\n outputFilter?: Filters<VOutFields>\n // can't have inputFilter here, we can only support one level of nesting\n }\n}\n\nexport type VOutFilter = Filter<VOutFields>\n\nexport type TransactionFilter = {\n inputFilter?: VinFilter | VinFilter[]\n outputFilter?: VOutFilter | VOutFilter[]\n filter?: Array<Filter<TransactionFields>>\n}\n\nexport type Comparable = number | BigDecimal | bigint | Date | string | boolean\n\nexport type TransactionFilters = TransactionFilter | TransactionFilter[]\n\nfunction toVinFilter(inputFilter?: VinFilter | VinFilter[]): BTCTransactionFilter_VinFilter | undefined {\n if (inputFilter) {\n const ret = BTCTransactionFilter_VinFilter.create()\n const filters = []\n const vouts: Filter<VOutFields>[] = []\n const txs: TransactionFilters = []\n\n for (const f of Array.isArray(inputFilter) ? inputFilter : [inputFilter]) {\n const { preVOut, preTransaction, ...rest } = f\n filters.push(rest)\n if (preVOut) {\n vouts.push(preVOut)\n }\n if (preTransaction) {\n txs.push(preTransaction)\n }\n }\n ret.filters = BTCTransactionFilter_Filters.create({\n filters: convertFilters(filters)\n })\n\n if (vouts.length > 0) {\n const voutFilters = convertFilters(vouts)\n if (voutFilters && voutFilters.length > 0) {\n ret.preVOut = voutFilters[0]\n }\n }\n if (txs.length > 0) {\n ret.preTransaction = filters2Proto(txs)?.[0]\n }\n\n return ret\n }\n\n return undefined\n}\n\nfunction toVOutFilter(outputFilter?: VOutFilter | VOutFilter[]): BTCTransactionFilter_VOutFilter | undefined {\n if (outputFilter) {\n const ret = BTCTransactionFilter_VOutFilter.create()\n const filters = Array.isArray(outputFilter) ? outputFilter : ([outputFilter] as Filter<VOutFields>[])\n ret.filters = BTCTransactionFilter_Filters.create({\n filters: convertFilters(filters)\n })\n\n return ret\n }\n return undefined\n}\n\nexport function filters2Proto(filter: TransactionFilters): BTCTransactionFilter[] {\n const filters = Array.isArray(filter) ? filter : [filter]\n return filters.map((f) => {\n return {\n filter: convertFilters(f.filter),\n inputFilter: toVinFilter(f.inputFilter),\n outputFilter: toVOutFilter(f.outputFilter)\n } as BTCTransactionFilter\n })\n}\n\nfunction toCondition(value: Condition | Comparable): BTCTransactionFilter_Condition {\n const ret: BTCTransactionFilter_Condition = BTCTransactionFilter_Condition.create()\n if (value instanceof Date) {\n ret.eq = serializeRichValue(value)\n }\n if (typeof value === 'number') {\n ret.eq = serializeRichValue(value)\n }\n if (typeof value === 'string') {\n ret.eq = serializeRichValue(value)\n }\n if (value instanceof BigDecimal) {\n ret.eq = serializeRichValue(value)\n }\n if (typeof value === 'bigint') {\n ret.eq = serializeRichValue(value)\n }\n if (typeof value === 'boolean') {\n ret.eq = serializeRichValue(value)\n }\n if (Array.isArray(value)) {\n ret.in = { values: value.map((v) => serializeRichValue(v)) }\n }\n\n for (const [k, v] of Object.entries(value)) {\n switch (k) {\n case 'prefix':\n case 'contains':\n case 'notContains':\n ret[k] = v.toString()\n break\n case 'length':\n ret['lengthEq'] = v\n break\n case 'lengthGt':\n case 'lengthLt':\n ret[k] = v\n break\n case 'hasAny':\n case 'hasAll':\n case 'in':\n ret[k] = { values: v.map((v: any) => serializeRichValue(v)) }\n break\n case 'eq':\n case 'gt':\n case 'gte':\n case 'lt':\n case 'lte':\n case 'ne':\n ret[k] = serializeRichValue(v)\n break\n default:\n throw new Error('Unknown condition op: ' + k)\n }\n }\n\n return ret\n}\n\nfunction convertFilters<T extends string>(filters?: Array<Filter<T>>): BTCTransactionFilter_Filter[] | undefined {\n if (filters && filters.length > 0) {\n const ret: BTCTransactionFilter_Filter[] = []\n for (const filter of filters) {\n const f: BTCTransactionFilter_Filter = BTCTransactionFilter_Filter.create()\n for (const [key, value] of Object.entries(filter)) {\n f.conditions[key] = toCondition(value as any)\n }\n ret.push(f)\n }\n return ret\n }\n return []\n}\n","import { errorString, GLOBAL_CONFIG, mergeProcessResults, Plugin, PluginManager, USER_PROCESSOR } from '@sentio/runtime'\nimport {\n ContractConfig,\n Data_BTCTransaction,\n DataBinding,\n HandlerType,\n ProcessConfigResponse,\n ProcessResult,\n StartRequest\n} from '@sentio/protos'\n\nimport { ServerError, Status } from 'nice-grpc'\nimport { TemplateInstanceState } from '../core/template.js'\nimport { BTCProcessorState } from './btc-processor.js'\nimport { filters2Proto, TransactionFilter } from './filter.js'\n\ninterface Handlers {\n txHandlers: ((trace: Data_BTCTransaction) => Promise<ProcessResult>)[]\n}\n\nexport class BTCPlugin extends Plugin {\n name: string = 'BTCPlugin'\n handlers: Handlers = {\n txHandlers: []\n }\n\n async configure(config: ProcessConfigResponse) {\n const handlers: Handlers = {\n txHandlers: []\n }\n\n for (const processor of BTCProcessorState.INSTANCE.getValues()) {\n const contractConfig = ContractConfig.fromPartial({\n processorType: USER_PROCESSOR,\n contract: {\n name: processor.config.name,\n chainId: processor.config.chainId.toString(),\n address: processor.config.address || '*',\n abi: ''\n },\n startBlock: processor.config.startBlock,\n endBlock: processor.config.endBlock\n })\n for (const callHandler of processor.callHandlers) {\n const handlerId = handlers.txHandlers.push(callHandler.handler) - 1\n\n if (callHandler.filter) {\n contractConfig.btcTransactionConfigs.push({\n filters: filters2Proto(callHandler.filter),\n handlerId\n })\n } else if (contractConfig.contract?.address != '*') {\n contractConfig.btcTransactionConfigs.push({\n filters: filters2Proto({\n outputFilter: {\n script_address: processor.config.address\n }\n } as TransactionFilter),\n handlerId\n })\n }\n }\n\n // Finish up a contract\n config.contractConfigs.push(contractConfig)\n }\n\n this.handlers = handlers\n }\n\n supportedHandlers = [HandlerType.BTC_TRANSACTION]\n\n processBinding(request: DataBinding): Promise<ProcessResult> {\n switch (request.handlerType) {\n case HandlerType.BTC_TRANSACTION:\n return this.processTransaction(request)\n default:\n throw new ServerError(Status.INVALID_ARGUMENT, 'No handle type registered ' + request.handlerType)\n }\n }\n\n async start(request: StartRequest) {}\n\n stateDiff(config: ProcessConfigResponse): boolean {\n return TemplateInstanceState.INSTANCE.getValues().length !== config.templateInstances.length\n }\n\n async processTransaction(binding: DataBinding): Promise<ProcessResult> {\n if (!binding.data?.btcTransaction) {\n throw new ServerError(Status.INVALID_ARGUMENT, \"BTCEvents can't be null\")\n }\n\n const promises: Promise<ProcessResult>[] = []\n\n const result = binding.data?.btcTransaction\n\n for (const handlerId of binding.handlerIds) {\n const promise = this.handlers.txHandlers[handlerId](binding.data?.btcTransaction).catch((e) => {\n throw new ServerError(\n Status.INTERNAL,\n 'error processing transaction: ' + JSON.stringify(result) + '\\n' + errorString(e)\n )\n })\n if (GLOBAL_CONFIG.execution.sequential) {\n await promise\n }\n promises.push(promise)\n }\n return mergeProcessResults(await Promise.all(promises))\n }\n}\n\nPluginManager.INSTANCE.register(new BTCPlugin())\n"],"mappings":";sNA8DO,IAAMA,EAAN,cAAyBC,CAAY,CAC1C,YACWC,EACAC,EACAC,EACAC,EACT,CACA,MAAM,CAAC,CAAC,EALC,aAAAH,EACA,UAAAC,EACA,QAAAC,EACA,aAAAC,CAGX,CAEU,oBAAoBF,EAAcG,EAAgC,CAC1E,MAAO,CACL,QAAS,KAAK,QACd,aAAc,KAAK,KACnB,YAAa,OAAO,KAAK,GAAG,cAAgB,CAAC,EAC7C,iBAAkB,EAClB,gBAAiB,KAAK,GAAG,iBACzB,QAAS,KAAK,WAAW,EACzB,KAAMH,EACN,SAAU,EACV,OAAQI,EAAgBD,CAAM,CAChC,CACF,CAEA,YAAsB,CACpB,OAAO,KAAK,OACd,CACF,ECzFA,OAAS,oBAAAE,MAAwB,kBAK1B,IAAMC,EAAN,cAAgCC,CAA+B,CAEtE,EAFaC,EAANF,EACLG,EADWD,EACJ,WAAW,IAAIF,GAGjB,IAAMI,EAAN,KAAmB,CAGxB,YAAqBC,EAA4B,CAA5B,YAAAA,CAA6B,CAFlD,aAAmD,CAAC,EAIpD,OAAO,KAAKA,EAA0C,CACpD,IAAMC,EAAY,IAAIF,EAAaC,CAAM,EACzC,OAAAH,EAAkB,SAAS,SAASI,CAAS,EACtCA,CACT,CAEO,cACLC,EACAC,EACA,CACA,IAAMC,EAAc,CAClB,QAAS,MAAOC,GAA8B,CAC5C,IAAMC,EAAKD,EAAK,YAEVE,EAAM,IAAIC,EACd,KAAK,OAAO,QACZ,KAAK,OAAO,MAAQ,KAAK,OAAO,SAAW,GAC3CF,EACA,KAAK,OAAO,SAAWA,EAAG,KAAK,CAAC,EAAE,cACpC,EACA,aAAMJ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AO,KAAK,mBAAmBC,CAAO,EACxC,QACE,MAAM,IAAI,cAAY,SAAO,iBAAkB,6BAA+BA,EAAQ,WAAW,CACrG,CACF,CAEA,MAAM,MAAMA,EAAuB,CAAC,CAEpC,UAAUX,EAAwC,CAChD,OAAOY,EAAsB,SAAS,UAAU,EAAE,SAAWZ,EAAO,kBAAkB,MACxF,CAEA,MAAM,mBAAmBa,EAA8C,CACrE,GAAI,CAACA,EAAQ,MAAM,eACjB,MAAM,IAAI,cAAY,SAAO,iBAAkB,yBAAyB,EAG1E,IAAMC,EAAqC,CAAC,EAEtCC,EAASF,EAAQ,MAAM,eAE7B,QAAWL,KAAaK,EAAQ,WAAY,CAC1C,IAAMG,EAAU,KAAK,SAAS,WAAWR,CAAS,EAAEK,EAAQ,MAAM,cAAc,EAAE,MAAOI,GAAM,CAC7F,MAAM,IAAI,cACR,SAAO,SACP,iCAAmC,KAAK,UAAUF,CAAM,EAAI;AAAA,EAAOG,EAAYD,CAAC,CAClF,CACF,CAAC,EACGE,EAAc,UAAU,YAC1B,MAAMH,EAERF,EAAS,KAAKE,CAAO,EAEvB,OAAOI,EAAoB,MAAM,QAAQ,IAAIN,CAAQ,CAAC,CACxD,CACF,EAEAO,EAAc,SAAS,SAAS,IAAIvB,CAAW","names":["BTCContext","BaseContext","chainId","name","tx","address","labels","normalizeLabels","ListStateStorage","_BTCProcessorState","ListStateStorage","BTCProcessorState","__publicField","BTCProcessor","config","processor","handler","filter","callHandler","call","tx","ctx","BTCContext","toVinFilter","inputFilter","ret","BTCTransactionFilter_VinFilter","filters","vouts","txs","f","preVOut","preTransaction","rest","BTCTransactionFilter_Filters","convertFilters","voutFilters","filters2Proto","toVOutFilter","outputFilter","BTCTransactionFilter_VOutFilter","filter","toCondition","value","BTCTransactionFilter_Condition","serializeRichValue","BigDecimal","v","k","BTCTransactionFilter_Filter","key","errorString","GLOBAL_CONFIG","mergeProcessResults","Plugin","PluginManager","USER_PROCESSOR","import_nice_grpc","BTCPlugin","Plugin","config","handlers","processor","BTCProcessorState","contractConfig","ContractConfig","USER_PROCESSOR","callHandler","handlerId","filters2Proto","HandlerType","request","TemplateInstanceState","binding","promises","result","promise","e","errorString","GLOBAL_CONFIG","mergeProcessResults","PluginManager"]}
@@ -1,3 +0,0 @@
1
- import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
- import{c as T}from"./chunk-LLHU72AA.js";var E=T(s=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});s.getChainType=s.ChainId=s.BTCChainId=s.StarknetChainId=s.CosmosChainId=s.FuelChainId=s.SolanaChainId=s.SuiChainId=s.AptosChainId=s.EthChainId=s.ChainType=void 0;var l;(function(e){e.SOLANA="solana",e.SUI="sui",e.APTOS="aptos",e.ETH="evm",e.BTC="btc"})(l||(s.ChainType=l={}));var h;(function(e){e.ETHEREUM="1",e.OPTIMISM="10",e.CRONOS="25",e.BINANCE="56",e.POLYGON="137",e.MANTA_PACIFIC="169",e.XLAYER_TESTNET="195",e.XLAYER_MAINNET="196",e.B2_MAINNET="223",e.FANTOM="250",e.FRAXTAL="252",e.KUCOIN="321",e.ZKSYNC_ERA="324",e.CRONOS_TESTNET="338",e.ASTAR="592",e.POLYGON_ZKEVM="1101",e.CONFLUX="1030",e.METIS="1088",e.MOONBEAM="1284",e.BEVM="11501",e.MERLIN_MAINNET="4200",e.MANTLE="5000",e.BASE="8453",e.LUMIO_TESTNET="9990",e.HOLESKY="17000",e.ASTAR_ZKEVM="3776",e.MOVEMENT_EVM_TESTNET="30732",e.MODE="34443",e.ARBITRUM="42161",e.AVALANCHE="43114",e.ZIRCUIT_TESTNET="48899",e.ZIRCUIT_MAINNET="48900",e.BOB="60808",e.LINEA="59144",e.SONIC_TESTNET="64165",e.BLAST="81457",e.CHILIZ="88888",e.TAIKO="167000",e.TAIKO_TESTNET="167008",e.BITLAYER="200901",e.SCROLL="534352",e.ZKLINK_NOVA="810180",e.SEPOLIA="11155111",e.AURORA="1313161554",e.BLAST_SEPOLIA="168587773"})(h||(s.EthChainId=h={}));var x;(function(e){e.APTOS_MAINNET="aptos_mainnet",e.APTOS_TESTNET="aptos_testnet",e.APTOS_MOVEMENT_TESTNET="aptos_m2_testnet",e.APTOS_MOVEMENT_MAINNET="aptos_m2_mainnet"})(x||(s.AptosChainId=x={}));var k;(function(e){e.SUI_MAINNET="sui_mainnet",e.SUI_TESTNET="sui_testnet",e.SUI_MOVEMENT_TESTNET="sui_m2_testnet",e.SUI_MOVEMENT_MAINNET="sui_m2_mainnet"})(k||(s.SuiChainId=k={}));var m;(function(e){e.SOLANA_MAINNET="sol_mainnet",e.SOLANA_DEVNET="sol_devnet",e.SOLANA_TESTNET="sol_testnet",e.SOLANA_PYTH="sol_pyth"})(m||(s.SolanaChainId=m={}));var C;(function(e){e.FUEL_MAINNET="fuel_mainnet",e.FUEL_TESTNET="fuel_testnet"})(C||(s.FuelChainId=C={}));var I;(function(e){e.INJECTIVE_MAINNET="injective_mainnet",e.INJECTIVE_TESTNET="injective_testnet"})(I||(s.CosmosChainId=I={}));var S;(function(e){e.STARKNET_MAINNET="starknet_mainnet",e.STARKNET_SEPOLIA="starknet_sepolia"})(S||(s.StarknetChainId=S={}));var N;(function(e){e.BTC_MAINNET="btc_mainnet",e.BTC_TESTNET="btc_testnet"})(N||(s.BTCChainId=N={}));s.ChainId={...h,...x,...k,...m,...C,...I,...S,...N};function O(e){let t=String(e).toLowerCase();return t.startsWith("sol")?l.SOLANA:t.startsWith("sui")?l.SUI:t.startsWith("apt")?l.APTOS:t.startsWith("btc")?l.BTC:l.ETH}s.getChainType=O});var f=T(p=>{"use strict";Object.defineProperty(p,"__esModule",{value:!0});p.getChainBlockscoutUrl=p.getChainExternalUrl=p.EthChainInfo=p.ExplorerApiType=void 0;var r=E(),n;(function(e){e.ETHERSCAN="etherscan",e.BLOCKSCOUT="blockscout",e.L2SCAN="l2scan",e.OKLINK="oklink"})(n||(p.ExplorerApiType=n={}));p.EthChainInfo={[r.EthChainId.ETHEREUM]:{name:"Ethereum",chainId:r.EthChainId.ETHEREUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:n.ETHERSCAN,explorerUrl:"https://etherscan.io",explorerApi:"https://api.etherscan.io",blockscoutUrl:"https://eth.blockscout.com"},[r.EthChainId.SEPOLIA]:{name:"Sepolia",chainId:r.EthChainId.SEPOLIA,mainnetChainId:r.EthChainId.ETHEREUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x1ef5f52bdbe11af2377c58ecc914a8c72ea807cf",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:n.ETHERSCAN,explorerUrl:"https://sepolia.etherscan.io",explorerApi:"https://api-sepolia.etherscan.io",blockscoutUrl:"https://eth-sepolia.blockscout.com"},[r.EthChainId.HOLESKY]:{name:"Holesky",chainId:r.EthChainId.HOLESKY,mainnetChainId:r.EthChainId.ETHEREUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x94373a4919B3240D86eA41593D5eBa789FEF3848",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:n.ETHERSCAN,explorerUrl:"https://holesky.etherscan.io",explorerApi:"https://api-holesky.etherscan.io",blockscoutUrl:"https://eth-holesky.blockscout.com"},[r.EthChainId.BINANCE]:{name:"Binance",chainId:r.EthChainId.BINANCE,priceTokenAddress:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",tokenSymbol:"BNB",tokenDecimals:18,explorerApiType:n.ETHERSCAN,explorerUrl:"https://bscscan.com",explorerApi:"https://api.bscscan.com"},[r.EthChainId.POLYGON]:{name:"Polygon",chainId:r.EthChainId.POLYGON,priceTokenAddress:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",tokenSymbol:"MATIC",tokenDecimals:18,explorerApiType:n.ETHERSCAN,explorerUrl:"https://polygonscan.com",explorerApi:"https://api.polygonscan.com"},[r.EthChainId.ARBITRUM]:{name:"Arbitrum",chainId:r.EthChainId.ARBITRUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:n.ETHERSCAN,explorerUrl:"https://arbiscan.io",explorerApi:"https://api.arbiscan.io"},[r.EthChainId.AVALANCHE]:{name:"Avalanche",chainId:r.EthChainId.AVALANCHE,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:n.ETHERSCAN,explorerUrl:"https://snowtrace.io",explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan"},[r.EthChainId.POLYGON_ZKEVM]:{name:"Polygon zkEVM",chainId:r.EthChainId.POLYGON_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:n.ETHERSCAN,explorerUrl:"https://zkevm.polygonscan.com",explorerApi:"https://api-zkevm.polygonscan.com"},[r.EthChainId.MOONBEAM]:{name:"Moonbeam",chainId:r.EthChainId.MOONBEAM,priceTokenAddress:"0xacc15dc74880c9944775448304b263d191c6077f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xacc15dc74880c9944775448304b263d191c6077f",tokenSymbol:"GLMR",tokenDecimals:18,explorerApiType:n.ETHERSCAN,explorerUrl:"https://moonscan.io",explorerApi:"https://api-moonbeam.moonscan.io"},[r.EthChainId.ASTAR]:{name:"Astar",chainId:r.EthChainId.ASTAR,priceTokenAddress:"0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",tokenSymbol:"ASTR",tokenDecimals:18,explorerApiType:n.BLOCKSCOUT,explorerUrl:"https://astar.blockscout.com",explorerApi:"https://astar.blockscout.com"},[r.EthChainId.ASTAR_ZKEVM]:{name:"Astar zkEVM",chainId:r.EthChainId.ASTAR_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xE9CC37904875B459Fa5D0FE37680d36F1ED55e38",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://astar-zkevm.explorer.startale.com",explorerApiType:n.BLOCKSCOUT,explorerApi:"https://astar-zkevm.explorer.startale.com"},[r.EthChainId.LINEA]:{name:"Linea",chainId:r.EthChainId.LINEA,priceTokenAddress:"0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://lineascan.build",explorerApiType:n.ETHERSCAN,explorerApi:"https://api.lineascan.build"},[r.EthChainId.SCROLL]:{name:"Scroll",chainId:r.EthChainId.SCROLL,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5300000000000000000000000000000000000004",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://scrollscan.com",explorerApiType:n.ETHERSCAN,explorerApi:"https://api.scrollscan.com"},[r.EthChainId.TAIKO]:{name:"Taiko Mainnet",chainId:r.EthChainId.TAIKO,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xA51894664A773981C6C112C43ce576f315d5b1B6",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://taikoscan.io",explorerApiType:n.ETHERSCAN,explorerApi:"https://api.taikoscan.io"},[r.EthChainId.TAIKO_TESTNET]:{name:"Taiko Testnet",chainId:r.EthChainId.TAIKO_TESTNET,mainnetChainId:r.EthChainId.TAIKO,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xae2C46ddb314B9Ba743C6dEE4878F151881333D9",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://hekla.taikoscan.io",explorerApiType:n.ETHERSCAN,explorerApi:"https://api-hekla.taikoscan.io"},[r.EthChainId.XLAYER_TESTNET]:{name:"X Layer Testnet",chainId:r.EthChainId.XLAYER_TESTNET,mainnetChainId:r.EthChainId.XLAYER_MAINNET,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xa749ad81913cdc19881ebeb64631df72be708335",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://www.oklink.com/xlayer-test",explorerApiType:n.OKLINK,explorerApi:"https://www.oklink.com/api/v5/explorer"},[r.EthChainId.XLAYER_MAINNET]:{name:"X Layer Mainnet",chainId:r.EthChainId.XLAYER_MAINNET,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5a77f1443d16ee5761d310e38b62f77f726bc71c",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://www.oklink.com/xlayer",explorerApiType:n.OKLINK,explorerApi:"https://www.oklink.com/api/v5/explorer"},[r.EthChainId.BLAST]:{name:"Blast Mainnet",chainId:r.EthChainId.BLAST,priceTokenAddress:"0x4300000000000000000000000000000000000004",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4300000000000000000000000000000000000004",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://blastscan.io",explorerApiType:n.ETHERSCAN,explorerApi:"https://api.blastscan.io"},[r.EthChainId.BLAST_SEPOLIA]:{name:"Blast Mainnet",chainId:r.EthChainId.BLAST_SEPOLIA,mainnetChainId:r.EthChainId.BLAST,priceTokenAddress:"0x4200000000000000000000000000000000000023",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000023",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://sepolia.blastscan.io",explorerApiType:n.ETHERSCAN,explorerApi:"https://api-sepolia.blastscan.io"},[r.EthChainId.BASE]:{name:"Base",chainId:r.EthChainId.BASE,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://basescan.org",explorerApiType:n.ETHERSCAN,explorerApi:"https://api.basescan.org"},[r.EthChainId.ZKSYNC_ERA]:{name:"zkSync Era",chainId:r.EthChainId.ZKSYNC_ERA,priceTokenAddress:"0x000000000000000000000000000000000000800A",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zksync.io",explorerApiType:n.ETHERSCAN,explorerApi:"https://block-explorer-api.mainnet.zksync.io"},[r.EthChainId.ZIRCUIT_TESTNET]:{name:"Zircuit Testnet",chainId:r.EthChainId.ZIRCUIT_TESTNET,mainnetChainId:r.EthChainId.ZIRCUIT_MAINNET,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.testnet.zircuit.com"},[r.EthChainId.ZIRCUIT_MAINNET]:{name:"Zircuit Mainnet",chainId:r.EthChainId.ZIRCUIT_MAINNET,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zircuit.com"},[r.EthChainId.FANTOM]:{name:"Fantom Opera",chainId:r.EthChainId.FANTOM,priceTokenAddress:"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",tokenSymbol:"WFTM",tokenDecimals:18,explorerUrl:"https://ftmscan.com",explorerApiType:n.ETHERSCAN,explorerApi:"https://api.ftmscan.com"},[r.EthChainId.OPTIMISM]:{name:"Optimism Mainnet",chainId:r.EthChainId.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://optimistic.etherscan.io",explorerApiType:n.ETHERSCAN,explorerApi:"https://api-optimistic.etherscan.io"},[r.EthChainId.CRONOS]:{name:"Cronos Mainnet",chainId:r.EthChainId.CRONOS,priceTokenAddress:"0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",tokenSymbol:"CRO",tokenDecimals:18,explorerUrl:"https://cronoscan.com",explorerApiType:n.ETHERSCAN,explorerApi:"https://api.cronoscan.com"},[r.EthChainId.CRONOS_TESTNET]:{name:"Cronos Testnet",chainId:r.EthChainId.CRONOS_TESTNET,mainnetChainId:r.EthChainId.CRONOS,priceTokenAddress:"0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4",tokenSymbol:"CRO",tokenDecimals:18,explorerUrl:"https://explorer.cronos.org/testnet"},[r.EthChainId.BITLAYER]:{name:"Bitlayer Mainnet",chainId:r.EthChainId.BITLAYER,priceTokenAddress:"0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://www.btrscan.com",explorerApiType:n.ETHERSCAN,explorerApi:"https://api.btrscan.com/scan"},[r.EthChainId.MANTA_PACIFIC]:{name:"Manta Pacific",chainId:r.EthChainId.MANTA_PACIFIC,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0Dc808adcE2099A9F62AA87D9670745AbA741746",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://pacific-explorer.manta.network",explorerApiType:n.BLOCKSCOUT,explorerApi:"https://pacific-explorer.manta.network"},[r.EthChainId.MANTLE]:{name:"Mantle",chainId:r.EthChainId.MANTLE,priceTokenAddress:"0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",tokenSymbol:"MNT",tokenDecimals:18,explorerUrl:"https://mantlescan.xyz",explorerApiType:n.ETHERSCAN,explorerApi:"https://api.mantlescan.xyz"},[r.EthChainId.B2_MAINNET]:{name:"B2 Mainnet",chainId:r.EthChainId.B2_MAINNET,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://explorer.bsquared.network",explorerApiType:n.L2SCAN,explorerApi:"https://explorer.bsquared.network/api"},[r.EthChainId.MODE]:{name:"Mode Mainnet",chainId:r.EthChainId.MODE,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://modescan.io",explorerApiType:n.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan"},[r.EthChainId.BOB]:{name:"Bob Mainnet",chainId:r.EthChainId.BOB,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.gobob.xyz",explorerApiType:n.BLOCKSCOUT,explorerApi:"https://explorer.gobob.xyz"},[r.EthChainId.FRAXTAL]:{name:"Fraxtal Mainnet",chainId:r.EthChainId.FRAXTAL,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xFC00000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://fraxscan.com",explorerApiType:n.ETHERSCAN,explorerApi:"https://api.fraxscan.com"},[r.EthChainId.KUCOIN]:{name:"KCC Mainnet",chainId:r.EthChainId.KUCOIN,priceTokenAddress:"0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521",tokenSymbol:"KCS",tokenDecimals:18,explorerUrl:"https://scan.kcc.io",explorerApiType:n.ETHERSCAN,explorerApi:"https://scan.kcc.io"},[r.EthChainId.CONFLUX]:{name:"Conflux eSpace",chainId:r.EthChainId.CONFLUX,priceTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b",tokenSymbol:"CFX",tokenDecimals:18,explorerUrl:"https://evm.confluxscan.io",explorerApiType:n.ETHERSCAN,explorerApi:"https://evmapi.confluxscan.io"},[r.EthChainId.METIS]:{name:"Metis",chainId:r.EthChainId.METIS,priceTokenAddress:"0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481",tokenSymbol:"METIS",tokenDecimals:18,explorerUrl:"https://explorer.metis.io",explorerApiType:n.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/"},[r.EthChainId.BEVM]:{name:"BEVM",chainId:r.EthChainId.BEVM,priceTokenAddress:"0xB5136FEba197f5fF4B765E5b50c74db717796dcD",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xB5136FEba197f5fF4B765E5b50c74db717796dcD",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://scan.bevm.io",explorerApiType:n.BLOCKSCOUT,explorerApi:"https://scan.bevm.io"},[r.EthChainId.MERLIN_MAINNET]:{name:"Merlin Mainnet",chainId:r.EthChainId.MERLIN_MAINNET,priceTokenAddress:"0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://scan.merlinchain.io",explorerApiType:n.L2SCAN,explorerApi:"https://scan.merlinchain.io/api"},[r.EthChainId.LUMIO_TESTNET]:{name:"Lumio Testnet",chainId:r.EthChainId.LUMIO_TESTNET,priceTokenAddress:"0x1F3dBeBA2513E87642750a278649dc828d054971",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x1F3dBeBA2513E87642750a278649dc828d054971",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.testnet.imola.movementlabs.xyz",explorerApiType:n.BLOCKSCOUT,explorerApi:"https://explorer.testnet.imola.movementlabs.xyz"},[r.EthChainId.MOVEMENT_EVM_TESTNET]:{name:"Movement EVM Testnet",chainId:r.EthChainId.MOVEMENT_EVM_TESTNET,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"MOVE",tokenDecimals:18,explorerUrl:"https://explorer.testnet.imola.movementlabs.xyz"},[r.EthChainId.CHILIZ]:{name:"Chiliz",chainId:r.EthChainId.CHILIZ,priceTokenAddress:"0x721EF6871f1c4Efe730Dce047D40D1743B886946",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x721EF6871f1c4Efe730Dce047D40D1743B886946",tokenSymbol:"CHZ",tokenDecimals:18,explorerUrl:"https://chiliscan.com",explorerApiType:n.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/88888/etherscan"},[r.EthChainId.ZKLINK_NOVA]:{name:"zkLink Nova",chainId:r.EthChainId.ZKLINK_NOVA,priceTokenAddress:"0x000000000000000000000000000000000000800A",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zklink.io",explorerApiType:n.ETHERSCAN,explorerApi:"https://explorer-api.zklink.io"},[r.EthChainId.AURORA]:{name:"Auroa",chainId:r.EthChainId.AURORA,priceTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.aurora.dev",explorerApiType:n.BLOCKSCOUT,explorerApi:"https://explorer.aurora.dev"},[r.EthChainId.SONIC_TESTNET]:{name:"Sonic Testnet",chainId:r.EthChainId.SONIC_TESTNET,priceTokenAddress:"0x000000000000000000000000000000000000800A",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"FTM",tokenDecimals:18,explorerUrl:"https://public-sonic.fantom.network",explorerApiType:n.L2SCAN,explorerApi:"https://public-sonic.fantom.network"}};function u(e,t,o){if(!e||!t||!o)return;let a=o,i=p.EthChainInfo[e];if(i)return i.explorerApiType===n.L2SCAN&&o==="block"&&(a="blocks"),`${i.explorerUrl}/${a}/${t}`}p.getChainExternalUrl=u;function y(e,t,o){if(!e||!t||!o)return;let a=p.EthChainInfo[e];if(a&&a.blockscoutUrl)return`${a.blockscoutUrl}/${o}/${t}`}p.getChainBlockscoutUrl=y});var _=T(d=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0});d.getChainScanUrl=d.getChainName=d.CHAIN_MAP=void 0;var A=E(),B=f();d.CHAIN_MAP={[A.ChainId.APTOS_MOVEMENT_MAINNET]:"Movement Mainnet Aptos",[A.ChainId.APTOS_MOVEMENT_TESTNET]:"Movement Testnet Aptos",[A.ChainId.SUI_MOVEMENT_MAINNET]:"Movement Mainnet Sui",[A.ChainId.SUI_MOVEMENT_TESTNET]:"Movement Testnet Sui"};for(let[e,t]of Object.entries(A.ChainId)){if(d.CHAIN_MAP[t])continue;let o=B.EthChainInfo[t];if(o){d.CHAIN_MAP[t]=o.name;continue}let a=e.split("_");d.CHAIN_MAP[t]=a.map((i,R)=>i[0]+i.slice(1).toLowerCase()).join(" ")}function M(e){if(typeof e=="number"&&(e=e.toString()),e){let t=d.CHAIN_MAP[e];if(t)return t}return e||""}d.getChainName=M;function U(e,t,o){let a=M(e);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 i="?network=mainnet";return a.includes("Testnet")?i="?network=testnet":a.includes("Devnet")&&(i="?network=devnet"),o==="block"?`https://explorer.aptoslabs.com/block/${t}/${i}`:o==="address"?`https://explorer.aptoslabs.com/account/${t}/${i}`:`https://explorer.aptoslabs.com/txn/${t}/${i}`}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=U});var D=T(c=>{"use strict";var L=c&&c.__createBinding||(Object.create?function(e,t,o,a){a===void 0&&(a=o);var i=Object.getOwnPropertyDescriptor(t,o);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,a,i)}:function(e,t,o,a){a===void 0&&(a=o),e[a]=t[o]}),b=c&&c.__exportStar||function(e,t){for(var o in e)o!=="default"&&!Object.prototype.hasOwnProperty.call(t,o)&&L(t,e,o)};Object.defineProperty(c,"__esModule",{value:!0});b(E(),c);b(f(),c);b(_(),c)});export{D as a};
3
- //# sourceMappingURL=chunk-7HVQTJAO.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/@sentio+chain@2.1.6/node_modules/@sentio/chain/src/chain-id.ts","../../../node_modules/.pnpm/@sentio+chain@2.1.6/node_modules/@sentio/chain/src/chain-info.ts","../../../node_modules/.pnpm/@sentio+chain@2.1.6/node_modules/@sentio/chain/src/chain-name.ts","../../../node_modules/.pnpm/@sentio+chain@2.1.6/node_modules/@sentio/chain/src/index.ts"],"sourcesContent":["// copy from https://github.com/DefiLlama/chainlist/blob/main/constants/chainIds.js\n// and https://besu.hyperledger.org/en/stable/Concepts/NetworkID-And-ChainID/\n\nexport enum ChainType {\n SOLANA = 'solana',\n SUI = 'sui',\n APTOS = 'aptos',\n ETH = 'evm',\n BTC = 'btc'\n}\n\nexport enum EthChainId { // Any modify to this must also be modify in EthChainName\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 ZKSYNC_ERA = '324',\n CRONOS_TESTNET = '338',\n ASTAR = '592',\n POLYGON_ZKEVM = '1101',\n CONFLUX = '1030',\n METIS = '1088',\n MOONBEAM = '1284',\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'\n}\n\nexport enum AptosChainId {\n APTOS_MAINNET = 'aptos_mainnet',\n APTOS_TESTNET = 'aptos_testnet',\n // APTOS_DEVNET = 'aptos_devnet',\n APTOS_MOVEMENT_TESTNET = 'aptos_m2_testnet',\n APTOS_MOVEMENT_MAINNET = 'aptos_m2_mainnet'\n}\n\nexport enum SuiChainId {\n SUI_MAINNET = 'sui_mainnet',\n SUI_TESTNET = 'sui_testnet',\n // SUI_DEVNET = 'sui_devnet',\n SUI_MOVEMENT_TESTNET = 'sui_m2_testnet',\n SUI_MOVEMENT_MAINNET = 'sui_m2_mainnet'\n}\n\nexport enum SolanaChainId {\n SOLANA_MAINNET = 'sol_mainnet',\n SOLANA_DEVNET = 'sol_devnet',\n SOLANA_TESTNET = 'sol_testnet',\n SOLANA_PYTH = 'sol_pyth'\n}\nexport enum FuelChainId {\n FUEL_MAINNET = 'fuel_mainnet',\n FUEL_TESTNET = 'fuel_testnet'\n}\n\nexport enum CosmosChainId {\n INJECTIVE_MAINNET = 'injective_mainnet',\n INJECTIVE_TESTNET = 'injective_testnet'\n}\n\nexport enum StarknetChainId {\n STARKNET_MAINNET = 'starknet_mainnet',\n STARKNET_SEPOLIA = 'starknet_sepolia'\n}\n\nexport enum BTCChainId {\n BTC_MAINNET = 'btc_mainnet',\n BTC_TESTNET = 'btc_testnet'\n}\n\nexport type ChainId =\n | EthChainId\n | AptosChainId\n | SuiChainId\n | SolanaChainId\n | FuelChainId\n | CosmosChainId\n | StarknetChainId\n | BTCChainId\nexport const ChainId = {\n ...EthChainId,\n ...AptosChainId,\n ...SuiChainId,\n ...SolanaChainId,\n ...FuelChainId,\n ...CosmosChainId,\n ...StarknetChainId,\n ...BTCChainId\n}\n\nexport function getChainType(chainId?: string | number): ChainType {\n const id = String(chainId).toLowerCase()\n if (id.startsWith('sol')) {\n return ChainType.SOLANA\n }\n if (id.startsWith('sui')) {\n return ChainType.SUI\n }\n if (id.startsWith('apt')) {\n return ChainType.APTOS\n }\n if (id.startsWith('btc')) {\n return ChainType.BTC\n }\n return ChainType.ETH\n}\n","import { ChainId, EthChainId } from './chain-id'\n\nexport enum ExplorerApiType {\n ETHERSCAN = 'etherscan',\n BLOCKSCOUT = 'blockscout',\n L2SCAN = 'l2scan',\n OKLINK = 'oklink'\n}\n\nexport type EthChainInfo = {\n name: string\n chainId: EthChainId\n mainnetChainId?: EthChainId\n tokenAddress: string // native token address\n tokenSymbol: string // native token symbol\n tokenDecimals: number // native token decimals\n priceTokenAddress: string // token address for price\n wrappedTokenAddress: string // wrapped token address with contract, normally Wxxx (Wrapped xxx)\n\n explorerUrl: string\n explorerApiType?: string\n explorerApi?: string\n blockscoutUrl?: string\n}\n\nexport const EthChainInfo: Record<EthChainId | string, EthChainInfo> = {\n [EthChainId.ETHEREUM]: {\n name: 'Ethereum',\n chainId: EthChainId.ETHEREUM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://etherscan.io',\n explorerApi: 'https://api.etherscan.io',\n blockscoutUrl: 'https://eth.blockscout.com'\n },\n [EthChainId.SEPOLIA]: {\n name: 'Sepolia',\n chainId: EthChainId.SEPOLIA,\n mainnetChainId: EthChainId.ETHEREUM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x1ef5f52bdbe11af2377c58ecc914a8c72ea807cf',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://sepolia.etherscan.io',\n explorerApi: 'https://api-sepolia.etherscan.io',\n blockscoutUrl: 'https://eth-sepolia.blockscout.com'\n },\n [EthChainId.HOLESKY]: {\n name: 'Holesky',\n chainId: EthChainId.HOLESKY,\n mainnetChainId: EthChainId.ETHEREUM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x94373a4919B3240D86eA41593D5eBa789FEF3848',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://holesky.etherscan.io',\n explorerApi: 'https://api-holesky.etherscan.io',\n blockscoutUrl: 'https://eth-holesky.blockscout.com'\n },\n [EthChainId.BINANCE]: {\n name: 'Binance',\n chainId: EthChainId.BINANCE,\n priceTokenAddress: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',\n tokenSymbol: 'BNB',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://bscscan.com',\n explorerApi: 'https://api.bscscan.com'\n },\n [EthChainId.POLYGON]: {\n name: 'Polygon',\n chainId: EthChainId.POLYGON,\n priceTokenAddress: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', // WMATIC\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', // WMATIC\n tokenSymbol: 'MATIC',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://polygonscan.com',\n explorerApi: 'https://api.polygonscan.com'\n // blockscoutBlockPrefix: 'https://polygon.blockscout.com/block/',\n },\n [EthChainId.ARBITRUM]: {\n name: 'Arbitrum',\n chainId: EthChainId.ARBITRUM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://arbiscan.io',\n explorerApi: 'https://api.arbiscan.io'\n },\n [EthChainId.AVALANCHE]: {\n name: 'Avalanche',\n chainId: EthChainId.AVALANCHE,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://snowtrace.io',\n explorerApi: 'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan'\n },\n [EthChainId.POLYGON_ZKEVM]: {\n name: 'Polygon zkEVM',\n chainId: EthChainId.POLYGON_ZKEVM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://zkevm.polygonscan.com',\n explorerApi: 'https://api-zkevm.polygonscan.com'\n },\n [EthChainId.MOONBEAM]: {\n name: 'Moonbeam',\n chainId: EthChainId.MOONBEAM,\n priceTokenAddress: '0xacc15dc74880c9944775448304b263d191c6077f', // WGLMR\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xacc15dc74880c9944775448304b263d191c6077f',\n tokenSymbol: 'GLMR',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://moonscan.io',\n explorerApi: 'https://api-moonbeam.moonscan.io'\n },\n [EthChainId.ASTAR]: {\n name: 'Astar',\n chainId: EthChainId.ASTAR,\n priceTokenAddress: '0xaeaaf0e2c81af264101b9129c00f4440ccf0f720', // WASTR\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xaeaaf0e2c81af264101b9129c00f4440ccf0f720',\n tokenSymbol: 'ASTR',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerUrl: 'https://astar.blockscout.com',\n explorerApi: 'https://astar.blockscout.com'\n },\n [EthChainId.ASTAR_ZKEVM]: {\n name: 'Astar zkEVM',\n chainId: EthChainId.ASTAR_ZKEVM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xE9CC37904875B459Fa5D0FE37680d36F1ED55e38',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://astar-zkevm.explorer.startale.com',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://astar-zkevm.explorer.startale.com'\n },\n [EthChainId.LINEA]: {\n name: 'Linea',\n chainId: EthChainId.LINEA,\n priceTokenAddress: '0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f', // WETH\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://lineascan.build',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.lineascan.build'\n },\n [EthChainId.SCROLL]: {\n name: 'Scroll',\n chainId: EthChainId.SCROLL,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x5300000000000000000000000000000000000004', // TODO questionable\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://scrollscan.com',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.scrollscan.com'\n },\n [EthChainId.TAIKO]: {\n name: 'Taiko Mainnet',\n chainId: EthChainId.TAIKO,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xA51894664A773981C6C112C43ce576f315d5b1B6',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://taikoscan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.taikoscan.io'\n },\n [EthChainId.TAIKO_TESTNET]: {\n name: 'Taiko Testnet',\n chainId: EthChainId.TAIKO_TESTNET,\n mainnetChainId: EthChainId.TAIKO,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xae2C46ddb314B9Ba743C6dEE4878F151881333D9',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://hekla.taikoscan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api-hekla.taikoscan.io'\n },\n [EthChainId.XLAYER_TESTNET]: {\n name: 'X Layer Testnet',\n chainId: EthChainId.XLAYER_TESTNET,\n mainnetChainId: EthChainId.XLAYER_MAINNET,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xa749ad81913cdc19881ebeb64631df72be708335',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://www.oklink.com/xlayer-test',\n explorerApiType: ExplorerApiType.OKLINK,\n explorerApi: 'https://www.oklink.com/api/v5/explorer'\n },\n [EthChainId.XLAYER_MAINNET]: {\n name: 'X Layer Mainnet',\n chainId: EthChainId.XLAYER_MAINNET,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x5a77f1443d16ee5761d310e38b62f77f726bc71c',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://www.oklink.com/xlayer',\n explorerApiType: ExplorerApiType.OKLINK,\n explorerApi: 'https://www.oklink.com/api/v5/explorer'\n },\n [EthChainId.BLAST]: {\n name: 'Blast Mainnet',\n chainId: EthChainId.BLAST,\n priceTokenAddress: '0x4300000000000000000000000000000000000004',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4300000000000000000000000000000000000004',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://blastscan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.blastscan.io'\n },\n [EthChainId.BLAST_SEPOLIA]: {\n name: 'Blast Mainnet',\n chainId: EthChainId.BLAST_SEPOLIA,\n mainnetChainId: EthChainId.BLAST,\n priceTokenAddress: '0x4200000000000000000000000000000000000023',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000023',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://sepolia.blastscan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api-sepolia.blastscan.io'\n },\n [EthChainId.BASE]: {\n name: 'Base',\n chainId: EthChainId.BASE,\n priceTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://basescan.org',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.basescan.org'\n },\n [EthChainId.ZKSYNC_ERA]: {\n name: 'zkSync Era',\n chainId: EthChainId.ZKSYNC_ERA,\n priceTokenAddress: '0x000000000000000000000000000000000000800A',\n tokenAddress: '0x000000000000000000000000000000000000800A',\n wrappedTokenAddress: '0x000000000000000000000000000000000000800A',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.zksync.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://block-explorer-api.mainnet.zksync.io'\n },\n [EthChainId.ZIRCUIT_TESTNET]: {\n name: 'Zircuit Testnet',\n chainId: EthChainId.ZIRCUIT_TESTNET,\n mainnetChainId: EthChainId.ZIRCUIT_MAINNET,\n priceTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.testnet.zircuit.com'\n },\n [EthChainId.ZIRCUIT_MAINNET]: {\n name: 'Zircuit Mainnet',\n chainId: EthChainId.ZIRCUIT_MAINNET,\n priceTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.zircuit.com'\n },\n [EthChainId.FANTOM]: {\n name: 'Fantom Opera',\n chainId: EthChainId.FANTOM,\n priceTokenAddress: '0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83', // WFTM\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83',\n tokenSymbol: 'WFTM',\n tokenDecimals: 18,\n explorerUrl: 'https://ftmscan.com',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.ftmscan.com'\n },\n [EthChainId.OPTIMISM]: {\n name: 'Optimism Mainnet',\n chainId: EthChainId.OPTIMISM,\n priceTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://optimistic.etherscan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api-optimistic.etherscan.io'\n },\n [EthChainId.CRONOS]: {\n name: 'Cronos Mainnet',\n chainId: EthChainId.CRONOS,\n priceTokenAddress: '0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23', // WCRO\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23',\n tokenSymbol: 'CRO',\n tokenDecimals: 18,\n explorerUrl: 'https://cronoscan.com',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.cronoscan.com'\n },\n [EthChainId.CRONOS_TESTNET]: {\n name: 'Cronos Testnet',\n chainId: EthChainId.CRONOS_TESTNET,\n mainnetChainId: EthChainId.CRONOS,\n priceTokenAddress: '0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4', // WCRO\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4',\n tokenSymbol: 'CRO',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.cronos.org/testnet'\n },\n [EthChainId.BITLAYER]: {\n name: 'Bitlayer Mainnet',\n chainId: EthChainId.BITLAYER,\n priceTokenAddress: '0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f', // WBTC\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f',\n tokenSymbol: 'BTC',\n tokenDecimals: 18,\n explorerUrl: 'https://www.btrscan.com',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.btrscan.com/scan'\n },\n [EthChainId.MANTA_PACIFIC]: {\n name: 'Manta Pacific',\n chainId: EthChainId.MANTA_PACIFIC,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x0Dc808adcE2099A9F62AA87D9670745AbA741746',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://pacific-explorer.manta.network',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://pacific-explorer.manta.network'\n },\n [EthChainId.MANTLE]: {\n name: 'Mantle',\n chainId: EthChainId.MANTLE,\n priceTokenAddress: '0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8', // WMNT\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8',\n tokenSymbol: 'MNT',\n tokenDecimals: 18,\n explorerUrl: 'https://mantlescan.xyz',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.mantlescan.xyz'\n },\n [EthChainId.B2_MAINNET]: {\n name: 'B2 Mainnet',\n chainId: EthChainId.B2_MAINNET,\n priceTokenAddress: '0x4200000000000000000000000000000000000006', // WBTC\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'BTC',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.bsquared.network',\n explorerApiType: ExplorerApiType.L2SCAN,\n explorerApi: 'https://explorer.bsquared.network/api'\n },\n [EthChainId.MODE]: {\n name: 'Mode Mainnet',\n chainId: EthChainId.MODE,\n priceTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://modescan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan'\n },\n [EthChainId.BOB]: {\n name: 'Bob Mainnet',\n chainId: EthChainId.BOB,\n priceTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.gobob.xyz',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://explorer.gobob.xyz'\n },\n [EthChainId.FRAXTAL]: {\n name: 'Fraxtal Mainnet',\n chainId: EthChainId.FRAXTAL,\n priceTokenAddress: '0x0000000000000000000000000000000000000000', // wfrxETH\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xFC00000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://fraxscan.com',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.fraxscan.com'\n },\n [EthChainId.KUCOIN]: {\n name: 'KCC Mainnet',\n chainId: EthChainId.KUCOIN,\n priceTokenAddress: '0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521', // WCCS\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521',\n tokenSymbol: 'KCS',\n tokenDecimals: 18,\n explorerUrl: 'https://scan.kcc.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://scan.kcc.io'\n },\n [EthChainId.CONFLUX]: {\n name: 'Conflux eSpace',\n chainId: EthChainId.CONFLUX,\n priceTokenAddress: '0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b', // WCFX\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b',\n tokenSymbol: 'CFX',\n tokenDecimals: 18,\n explorerUrl: 'https://evm.confluxscan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://evmapi.confluxscan.io'\n },\n [EthChainId.METIS]: {\n name: 'Metis',\n chainId: EthChainId.METIS,\n priceTokenAddress: '0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481', // WMETIS\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481',\n tokenSymbol: 'METIS',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.metis.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/'\n },\n [EthChainId.BEVM]: {\n name: 'BEVM',\n chainId: EthChainId.BEVM,\n priceTokenAddress: '0xB5136FEba197f5fF4B765E5b50c74db717796dcD', // WBTC\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xB5136FEba197f5fF4B765E5b50c74db717796dcD',\n tokenSymbol: 'BTC',\n tokenDecimals: 18,\n explorerUrl: 'https://scan.bevm.io',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://scan.bevm.io'\n },\n [EthChainId.MERLIN_MAINNET]: {\n name: 'Merlin Mainnet',\n chainId: EthChainId.MERLIN_MAINNET,\n priceTokenAddress: '0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA', // WBTC\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA',\n tokenSymbol: 'BTC',\n tokenDecimals: 18,\n explorerUrl: 'https://scan.merlinchain.io',\n explorerApiType: ExplorerApiType.L2SCAN,\n explorerApi: 'https://scan.merlinchain.io/api'\n },\n [EthChainId.LUMIO_TESTNET]: {\n name: 'Lumio Testnet',\n chainId: EthChainId.LUMIO_TESTNET,\n priceTokenAddress: '0x1F3dBeBA2513E87642750a278649dc828d054971',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x1F3dBeBA2513E87642750a278649dc828d054971',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.testnet.imola.movementlabs.xyz',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://explorer.testnet.imola.movementlabs.xyz'\n },\n [EthChainId.MOVEMENT_EVM_TESTNET]: {\n name: 'Movement EVM Testnet',\n chainId: EthChainId.MOVEMENT_EVM_TESTNET,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x0000000000000000000000000000000000000000', // TODO\n tokenSymbol: 'MOVE',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.testnet.imola.movementlabs.xyz'\n },\n [EthChainId.CHILIZ]: {\n name: 'Chiliz',\n chainId: EthChainId.CHILIZ,\n priceTokenAddress: '0x721EF6871f1c4Efe730Dce047D40D1743B886946',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x721EF6871f1c4Efe730Dce047D40D1743B886946', // WCHZ\n tokenSymbol: 'CHZ',\n tokenDecimals: 18,\n explorerUrl: 'https://chiliscan.com',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.routescan.io/v2/network/mainnet/evm/88888/etherscan'\n },\n [EthChainId.ZKLINK_NOVA]: {\n name: 'zkLink Nova',\n chainId: EthChainId.ZKLINK_NOVA,\n priceTokenAddress: '0x000000000000000000000000000000000000800A',\n tokenAddress: '0x000000000000000000000000000000000000800A', //special\n wrappedTokenAddress: '0x000000000000000000000000000000000000800A',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.zklink.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://explorer-api.zklink.io'\n },\n [EthChainId.AURORA]: {\n name: 'Auroa',\n chainId: EthChainId.AURORA,\n priceTokenAddress: '0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB',\n tokenAddress: '0x000000000000000000000000000000000000800A',\n wrappedTokenAddress: '0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.aurora.dev',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://explorer.aurora.dev'\n },\n [EthChainId.SONIC_TESTNET]: {\n name: 'Sonic Testnet',\n chainId: EthChainId.SONIC_TESTNET,\n priceTokenAddress: '0x000000000000000000000000000000000000800A',\n tokenAddress: '0x000000000000000000000000000000000000800A',\n wrappedTokenAddress: '0x000000000000000000000000000000000000800A',\n tokenSymbol: 'FTM',\n tokenDecimals: 18,\n explorerUrl: 'https://public-sonic.fantom.network',\n explorerApiType: ExplorerApiType.L2SCAN,\n explorerApi: 'https://public-sonic.fantom.network'\n }\n}\n\nexport function getChainExternalUrl( // TODO l2scan address might be different\n chainId?: string | number,\n hash?: string,\n subtype?: 'block' | 'address' | 'tx' | 'token'\n): string | undefined {\n if (!chainId || !hash || !subtype) {\n return\n }\n let subtypeStr: string = subtype\n const supportedChain = EthChainInfo[chainId as ChainId]\n if (!supportedChain) {\n return\n }\n if (supportedChain.explorerApiType === ExplorerApiType.L2SCAN) {\n if (subtype === 'block') {\n subtypeStr = 'blocks'\n }\n }\n return `${supportedChain.explorerUrl}/${subtypeStr}/${hash}`\n}\n\nexport function getChainBlockscoutUrl(\n chainId?: string | number,\n hash?: string,\n subtype?: 'block' | 'address' | 'tx' | 'token'\n): string | undefined {\n if (!chainId || !hash || !subtype) {\n return\n }\n const supportedChain = EthChainInfo[chainId as ChainId]\n if (!supportedChain) {\n return\n }\n if (!supportedChain.blockscoutUrl) {\n return\n }\n return `${supportedChain.blockscoutUrl}/${subtype}/${hash}`\n}\n","import { ChainId } from './chain-id'\nimport { EthChainInfo } from './chain-info'\n\nexport const CHAIN_MAP: Record<string, string> = {\n [ChainId.APTOS_MOVEMENT_MAINNET]: 'Movement Mainnet Aptos',\n [ChainId.APTOS_MOVEMENT_TESTNET]: 'Movement Testnet Aptos',\n [ChainId.SUI_MOVEMENT_MAINNET]: 'Movement Mainnet Sui',\n [ChainId.SUI_MOVEMENT_TESTNET]: 'Movement Testnet Sui'\n}\n\nfor (const [key, value] of Object.entries(ChainId)) {\n if (CHAIN_MAP[value]) {\n continue\n }\n\n const chainInfo = EthChainInfo[value]\n if (chainInfo) {\n CHAIN_MAP[value] = chainInfo.name\n continue\n }\n\n const parts = key.split('_')\n CHAIN_MAP[value] = parts\n .map((part, index) => {\n return part[0] + part.slice(1).toLowerCase()\n })\n .join(' ')\n}\n\nexport function getChainName(chainId: string | number | null | undefined): string {\n if (typeof chainId === 'number') {\n chainId = chainId.toString()\n }\n if (chainId) {\n const name = CHAIN_MAP[chainId]\n if (name) {\n return name\n }\n }\n return chainId || ''\n}\n\n/**\n * @deprecated use getChainExternalUrl instead TODO(dazhan) to clean up\n * @param chainId\n * @param hash\n * @param subtype\n * @returns\n */\nexport function getChainScanUrl(\n chainId?: string | number,\n hash?: string,\n subtype?: 'block' | 'address' | 'transaction'\n): string | undefined {\n const chainName = getChainName(chainId)\n if (chainName === 'Ethereum') {\n if (subtype === 'block') {\n return `https://etherscan.io/block/${hash}`\n } else if (subtype === 'address') {\n return `https://etherscan.io/address/${hash}`\n } else {\n return `https://etherscan.io/tx/${hash}`\n }\n }\n if (chainName === 'Polygon') {\n if (subtype === 'block') {\n return `https://polygonscan.com/block/${hash}`\n } else if (subtype === 'address') {\n return `https://polygonscan.com/address/${hash}`\n } else {\n return `https://polygonscan.com/tx/${hash}`\n }\n }\n if (chainName.startsWith('Aptos ')) {\n let suffix = '?network=mainnet'\n if (chainName.includes('Testnet')) {\n suffix = '?network=testnet'\n } else if (chainName.includes('Devnet')) {\n suffix = '?network=devnet'\n }\n\n if (subtype === 'block') {\n return `https://explorer.aptoslabs.com/block/${hash}/${suffix}`\n } else if (subtype === 'address') {\n return `https://explorer.aptoslabs.com/account/${hash}/${suffix}`\n } else {\n return `https://explorer.aptoslabs.com/txn/${hash}/${suffix}`\n }\n }\n if (chainName.startsWith('Solana ')) {\n if (subtype === 'block') {\n return `https://explorer.solana.com/block/${hash}`\n } else if (subtype === 'address') {\n return `https://explorer.solana.com/address/${hash}`\n } else {\n return `https://explorer.solana.io/tx/${hash}`\n }\n }\n if (chainName.startsWith('Sui ')) {\n if (subtype === 'block') {\n return `https://suivision.xyz/checkpoint/${hash}`\n } else if (subtype === 'address') {\n return `https://suivision.xyz/account/${hash}`\n } else {\n return `https://suivision.xyz/txblock/${hash}`\n }\n }\n return undefined\n}\n","export * from './chain-id'\nexport * from './chain-info'\nexport * from './chain-name'\n"],"mappings":";oRAGA,IAAYA,GAAZ,SAAYA,EAAS,CACnBA,EAAA,OAAA,SACAA,EAAA,IAAA,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AW,EACpB,CAXAR,EAAA,aAAAO,EAoBA,SAAgBG,EACdF,EACAG,EACAC,EAA6C,CAE7C,IAAMC,EAAYN,EAAaC,CAAO,EACtC,GAAIK,IAAc,WAChB,OAAID,IAAY,QACP,8BAA8BD,IAC5BC,IAAY,UACd,gCAAgCD,IAEhC,2BAA2BA,IAGtC,GAAIE,IAAc,UAChB,OAAID,IAAY,QACP,iCAAiCD,IAC/BC,IAAY,UACd,mCAAmCD,IAEnC,8BAA8BA,IAGzC,GAAIE,EAAU,WAAW,QAAQ,EAAG,CAClC,IAAIC,EAAS,mBAOb,OANID,EAAU,SAAS,SAAS,EAC9BC,EAAS,mBACAD,EAAU,SAAS,QAAQ,IACpCC,EAAS,mBAGPF,IAAY,QACP,wCAAwCD,KAAQG,IAC9CF,IAAY,UACd,0CAA0CD,KAAQG,IAElD,sCAAsCH,KAAQG,IAGzD,GAAID,EAAU,WAAW,SAAS,EAChC,OAAID,IAAY,QACP,qCAAqCD,IACnCC,IAAY,UACd,uCAAuCD,IAEvC,iCAAiCA,IAG5C,GAAIE,EAAU,WAAW,MAAM,EAC7B,OAAID,IAAY,QACP,oCAAoCD,IAClCC,IAAY,UACd,iCAAiCD,IAEjC,iCAAiCA,GAI9C,CA3DAX,EAAA,gBAAAU,yfCjDAK,EAAA,IAAAC,CAAA,EACAD,EAAA,IAAAC,CAAA,EACAD,EAAA,IAAAC,CAAA","names":["ChainType","exports","EthChainId","AptosChainId","SuiChainId","SolanaChainId","FuelChainId","CosmosChainId","StarknetChainId","BTCChainId","getChainType","chainId","id","chain_id_1","ExplorerApiType","exports","getChainExternalUrl","chainId","hash","subtype","subtypeStr","supportedChain","getChainBlockscoutUrl","chain_id_1","chain_info_1","exports","key","value","chainInfo","parts","part","index","getChainName","chainId","name","getChainScanUrl","hash","subtype","chainName","suffix","__exportStar","exports"]}