@lifi/data-types 6.0.0-beta.0 → 6.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +1 -1
  2. package/package.json +3 -3
  3. package/src/_cjs/chains/index.js +25 -10
  4. package/src/_cjs/chains/index.js.map +1 -1
  5. package/src/_cjs/chains/supportedChains.evm.int.spec.js +3 -3
  6. package/src/_cjs/chains/supportedChains.evm.int.spec.js.map +1 -1
  7. package/src/_cjs/chains/supportedChains.evm.js +144 -79
  8. package/src/_cjs/chains/supportedChains.evm.js.map +1 -1
  9. package/src/_cjs/chains/supportedChains.js +8 -6
  10. package/src/_cjs/chains/supportedChains.js.map +1 -1
  11. package/src/_cjs/chains/supportedChains.mvm.int.spec.js +45 -0
  12. package/src/_cjs/chains/supportedChains.mvm.int.spec.js.map +1 -0
  13. package/src/_cjs/chains/supportedChains.mvm.js +28 -0
  14. package/src/_cjs/chains/supportedChains.mvm.js.map +1 -0
  15. package/src/_cjs/chains/supportedChains.svm.int.spec.js +3 -3
  16. package/src/_cjs/chains/supportedChains.svm.int.spec.js.map +1 -1
  17. package/src/_cjs/chains/supportedChains.unit.spec.js +14 -14
  18. package/src/_cjs/chains/supportedChains.unit.spec.js.map +1 -1
  19. package/src/_cjs/chains/supportedChains.utxo.int.spec.js +3 -3
  20. package/src/_cjs/chains/supportedChains.utxo.int.spec.js.map +1 -1
  21. package/src/_cjs/coins/coins.int.spec.js +3 -3
  22. package/src/_cjs/coins/coins.int.spec.js.map +1 -1
  23. package/src/_cjs/coins/coins.js +173 -1
  24. package/src/_cjs/coins/coins.js.map +1 -1
  25. package/src/_cjs/coins/index.js +15 -2
  26. package/src/_cjs/coins/index.js.map +1 -1
  27. package/src/_cjs/index.js +17 -4
  28. package/src/_cjs/index.js.map +1 -1
  29. package/src/_cjs/multicall.js +3 -0
  30. package/src/_cjs/multicall.js.map +1 -1
  31. package/src/_esm/chains/index.js +6 -5
  32. package/src/_esm/chains/index.js.map +1 -1
  33. package/src/_esm/chains/supportedChains.evm.int.spec.js +1 -1
  34. package/src/_esm/chains/supportedChains.evm.int.spec.js.map +1 -1
  35. package/src/_esm/chains/supportedChains.evm.js +71 -3
  36. package/src/_esm/chains/supportedChains.evm.js.map +1 -1
  37. package/src/_esm/chains/supportedChains.js +5 -3
  38. package/src/_esm/chains/supportedChains.js.map +1 -1
  39. package/src/_esm/chains/supportedChains.mvm.int.spec.js +43 -0
  40. package/src/_esm/chains/supportedChains.mvm.int.spec.js.map +1 -0
  41. package/src/_esm/chains/supportedChains.mvm.js +25 -0
  42. package/src/_esm/chains/supportedChains.mvm.js.map +1 -0
  43. package/src/_esm/chains/supportedChains.svm.int.spec.js +1 -1
  44. package/src/_esm/chains/supportedChains.svm.int.spec.js.map +1 -1
  45. package/src/_esm/chains/supportedChains.unit.spec.js +4 -4
  46. package/src/_esm/chains/supportedChains.unit.spec.js.map +1 -1
  47. package/src/_esm/chains/supportedChains.utxo.int.spec.js +1 -1
  48. package/src/_esm/chains/supportedChains.utxo.int.spec.js.map +1 -1
  49. package/src/_esm/coins/coins.int.spec.js +1 -1
  50. package/src/_esm/coins/coins.int.spec.js.map +1 -1
  51. package/src/_esm/coins/coins.js +179 -1
  52. package/src/_esm/coins/coins.js.map +1 -1
  53. package/src/_esm/coins/index.js +1 -1
  54. package/src/_esm/coins/index.js.map +1 -1
  55. package/src/_esm/index.js +3 -3
  56. package/src/_esm/index.js.map +1 -1
  57. package/src/_esm/multicall.js +4 -0
  58. package/src/_esm/multicall.js.map +1 -1
  59. package/src/_types/chains/index.d.ts +6 -5
  60. package/src/_types/chains/index.d.ts.map +1 -1
  61. package/src/_types/chains/supportedChains.d.ts +1 -1
  62. package/src/_types/chains/supportedChains.d.ts.map +1 -1
  63. package/src/_types/chains/supportedChains.evm.d.ts.map +1 -1
  64. package/src/_types/chains/supportedChains.mvm.d.ts +3 -0
  65. package/src/_types/chains/supportedChains.mvm.d.ts.map +1 -0
  66. package/src/_types/chains/supportedChains.mvm.int.spec.d.ts +2 -0
  67. package/src/_types/chains/supportedChains.mvm.int.spec.d.ts.map +1 -0
  68. package/src/_types/coins/coins.d.ts.map +1 -1
  69. package/src/_types/coins/index.d.ts +1 -1
  70. package/src/_types/coins/index.d.ts.map +1 -1
  71. package/src/_types/index.d.ts +3 -3
  72. package/src/_types/index.d.ts.map +1 -1
  73. package/src/_types/multicall.d.ts.map +1 -1
  74. package/src/chains/index.ts +6 -5
  75. package/src/chains/supportedChains.evm.int.spec.ts +1 -1
  76. package/src/chains/supportedChains.evm.ts +80 -3
  77. package/src/chains/supportedChains.mvm.int.spec.ts +71 -0
  78. package/src/chains/supportedChains.mvm.ts +27 -0
  79. package/src/chains/supportedChains.svm.int.spec.ts +1 -1
  80. package/src/chains/supportedChains.ts +5 -3
  81. package/src/chains/supportedChains.unit.spec.ts +8 -4
  82. package/src/chains/supportedChains.utxo.int.spec.ts +1 -1
  83. package/src/coins/coins.int.spec.ts +1 -1
  84. package/src/coins/coins.ts +193 -1
  85. package/src/coins/index.ts +1 -1
  86. package/src/index.ts +3 -3
  87. package/src/multicall.ts +4 -0
@@ -1,4 +1,4 @@
1
- export * from './chains';
2
- export * from './coins';
3
- export * from './multicall';
1
+ export * from './chains/index.js';
2
+ export * from './coins/index.js';
3
+ export * from './multicall.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"multicall.d.ts","sourceRoot":"","sources":["../multicall.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CA4D3D,CAAA"}
1
+ {"version":3,"file":"multicall.d.ts","sourceRoot":"","sources":["../multicall.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,kBAAkB,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAgE3D,CAAA"}
@@ -1,5 +1,6 @@
1
- export { supportedEVMChains } from './supportedChains.evm'
2
- export { supportedSolanaChains } from './supportedChains.svm'
3
- export { supportedUXTOChains } from './supportedChains.utxo'
4
- export * from './supportedChains'
5
- export * from './utils'
1
+ export { supportedEVMChains } from './supportedChains.evm.js'
2
+ export * from './supportedChains.js'
3
+ export { supportedMVMChains } from './supportedChains.mvm.js'
4
+ export { supportedSolanaChains } from './supportedChains.svm.js'
5
+ export { supportedUXTOChains } from './supportedChains.utxo.js'
6
+ export * from './utils.js'
@@ -1,6 +1,6 @@
1
1
  import { createPublicClient, http } from 'viem'
2
2
  import { describe, expect, test } from 'vitest'
3
- import { supportedEVMChains } from './supportedChains.evm'
3
+ import { supportedEVMChains } from './supportedChains.evm.js'
4
4
 
5
5
  describe.concurrent('EVM chains RPC check', () => {
6
6
  const rpcUrls = supportedEVMChains.flatMap((chain) =>
@@ -1,7 +1,7 @@
1
1
  import type { EVMChain } from '@lifi/types'
2
2
  import { ChainId, ChainKey, ChainType, CoinKey } from '@lifi/types'
3
- import { multicallAddresses } from '../multicall'
4
- import { prefixChainId } from './utils'
3
+ import { multicallAddresses } from '../multicall.js'
4
+ import { prefixChainId } from './utils.js'
5
5
 
6
6
  /**
7
7
  * ChainNames aligned with https://github.com/ethereum-lists/chains/tree/master/_data/chains
@@ -35,7 +35,6 @@ export const supportedEVMChains: EVMChain[] = [
35
35
  'https://ethereum-rpc.publicnode.com',
36
36
  'https://eth.drpc.org',
37
37
  'https://eth.public-rpc.com',
38
- 'https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161',
39
38
  'https://rpc.ankr.com/eth',
40
39
  ],
41
40
  },
@@ -1068,4 +1067,82 @@ export const supportedEVMChains: EVMChain[] = [
1068
1067
  ],
1069
1068
  },
1070
1069
  },
1070
+
1071
+ // 480 - WCC
1072
+ {
1073
+ key: ChainKey.WCC,
1074
+ chainType: ChainType.EVM,
1075
+ name: 'World Chain',
1076
+ coin: CoinKey.ETH,
1077
+ id: ChainId.WCC,
1078
+ mainnet: true,
1079
+ logoURI:
1080
+ 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/world.svg',
1081
+ multicallAddress: multicallAddresses[ChainId.WCC],
1082
+
1083
+ metamask: {
1084
+ chainId: prefixChainId(480),
1085
+ blockExplorerUrls: ['https://worldscan.org/'],
1086
+ chainName: 'Worldchain Mainnet',
1087
+ nativeCurrency: {
1088
+ name: 'Ethereum',
1089
+ symbol: 'ETH',
1090
+ decimals: 18,
1091
+ },
1092
+ rpcUrls: [
1093
+ 'https://worldchain-mainnet.g.alchemy.com/public',
1094
+ 'https://worldchain-mainnet.gateway.tenderly.co',
1095
+ ],
1096
+ },
1097
+ },
1098
+
1099
+ // 1135 - LSK
1100
+ {
1101
+ key: ChainKey.LSK,
1102
+ chainType: ChainType.EVM,
1103
+ name: 'Lisk',
1104
+ coin: CoinKey.ETH,
1105
+ id: ChainId.LSK,
1106
+ mainnet: true,
1107
+ logoURI:
1108
+ 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/lisk.svg',
1109
+ multicallAddress: multicallAddresses[ChainId.LSK],
1110
+
1111
+ metamask: {
1112
+ chainId: prefixChainId(1135),
1113
+ blockExplorerUrls: ['https://blockscout.lisk.com/'],
1114
+ chainName: 'Lisk',
1115
+ nativeCurrency: {
1116
+ name: 'Ethereum',
1117
+ symbol: 'ETH',
1118
+ decimals: 18,
1119
+ },
1120
+ rpcUrls: ['https://rpc.api.lisk.com', 'https://lisk.drpc.org'],
1121
+ },
1122
+ },
1123
+
1124
+ // 2741 - Abstract
1125
+ {
1126
+ key: ChainKey.ABS,
1127
+ chainType: ChainType.EVM,
1128
+ name: 'Abstract',
1129
+ coin: CoinKey.ETH,
1130
+ id: ChainId.ABS,
1131
+ mainnet: true,
1132
+ logoURI:
1133
+ 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/abstract.svg',
1134
+ multicallAddress: multicallAddresses[ChainId.ABS],
1135
+
1136
+ metamask: {
1137
+ chainId: prefixChainId(2741),
1138
+ blockExplorerUrls: ['https://abscan.org/'],
1139
+ chainName: 'Abstract',
1140
+ nativeCurrency: {
1141
+ name: 'Ethereum',
1142
+ symbol: 'ETH',
1143
+ decimals: 18,
1144
+ },
1145
+ rpcUrls: ['https://rpc.fsd.adfasd32442ds.com'],
1146
+ },
1147
+ },
1071
1148
  ]
@@ -0,0 +1,71 @@
1
+ import type { CoinSupply } from '@mysten/sui/client'
2
+ import { SuiClient } from '@mysten/sui/client'
3
+ import { describe, expect, test } from 'vitest'
4
+
5
+ import { supportedMVMChains } from './supportedChains.mvm.js'
6
+
7
+ const WalletAddress =
8
+ '0xcc2bd176a478baea9a0de7a24cd927661cc6e860d5bacecb9a138ef20dbab231'
9
+
10
+ const SuiTypeName =
11
+ '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI'
12
+
13
+ const SuiTotalSupply = '10000000000000000000' // 1B tokens
14
+
15
+ describe.concurrent('MVM chains RPC check', () => {
16
+ const rpcUrls = supportedMVMChains.flatMap((chain) =>
17
+ chain.metamask.rpcUrls.map((rpcUrl) => ({
18
+ rpcUrl: rpcUrl,
19
+ chainId: chain.id,
20
+ chainName: chain.name,
21
+ }))
22
+ )
23
+
24
+ test.for(rpcUrls)(
25
+ `should successfully get chain ID from $chainName - $chainId RPC: $rpcUrl`,
26
+ { timeout: 10_000, retry: 3 },
27
+ async ({ rpcUrl }) => {
28
+ const client = new SuiClient({ url: rpcUrl })
29
+
30
+ const [coins, balance, ownedObjects, suiSupply] =
31
+ await Promise.allSettled([
32
+ client.getCoins({
33
+ owner: WalletAddress,
34
+ }),
35
+ client.getBalance({ owner: WalletAddress }),
36
+ client.getOwnedObjects({ owner: WalletAddress }),
37
+ client.getTotalSupply({ coinType: SuiTypeName }),
38
+ ])
39
+
40
+ expect(coins.status).toBe('fulfilled')
41
+ expect(balance.status).toBe('fulfilled')
42
+ expect(ownedObjects.status).toBe('fulfilled')
43
+ expect(suiSupply.status).toBe('fulfilled')
44
+
45
+ expect(
46
+ (suiSupply as PromiseFulfilledResult<CoinSupply>).value.value
47
+ ).toBe(SuiTotalSupply)
48
+ }
49
+ )
50
+ })
51
+
52
+ describe.concurrent('MVM chains block explorer check', () => {
53
+ const blockExplorerUrls = supportedMVMChains.flatMap((chain) =>
54
+ chain.metamask.blockExplorerUrls.map((blockExplorerUrl) => ({
55
+ blockExplorerUrl: blockExplorerUrl,
56
+ chainId: chain.id,
57
+ chainName: chain.name,
58
+ }))
59
+ )
60
+
61
+ test.for(blockExplorerUrls)(
62
+ `block explorer should be alive $chainName - $chainId - $blockExplorerUrl`,
63
+ { timeout: 10_000, retry: 3 },
64
+ async ({ blockExplorerUrl }) => {
65
+ const response = await fetch(blockExplorerUrl)
66
+ expect(response.url).toBe(blockExplorerUrl)
67
+ expect(response.ok).toBe(true)
68
+ expect(response.status).toBe(200)
69
+ }
70
+ )
71
+ })
@@ -0,0 +1,27 @@
1
+ import type { MVMChain } from '@lifi/types'
2
+ import { ChainId, ChainKey, ChainType, CoinKey } from '@lifi/types'
3
+
4
+ export const supportedMVMChains: MVMChain[] = [
5
+ {
6
+ key: ChainKey.SUI,
7
+ chainType: ChainType.MVM,
8
+ name: 'SUI',
9
+ coin: CoinKey.SUI,
10
+ id: ChainId.SUI,
11
+ mainnet: true,
12
+ logoURI:
13
+ 'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/sui.svg',
14
+ faucetUrls: ['https://stakely.io/faucet/sui-sui'],
15
+ metamask: {
16
+ chainId: ChainId.SUI.toString(),
17
+ blockExplorerUrls: ['https://www.suiscan.xyz/', 'https://suivision.xyz/'],
18
+ chainName: 'SUI',
19
+ nativeCurrency: {
20
+ name: 'SUI',
21
+ symbol: 'SUI',
22
+ decimals: 9,
23
+ },
24
+ rpcUrls: ['https://fullnode.mainnet.sui.io:443'],
25
+ },
26
+ },
27
+ ]
@@ -1,6 +1,6 @@
1
1
  import { Connection, PublicKey } from '@solana/web3.js'
2
2
  import { describe, expect, test } from 'vitest'
3
- import { supportedSolanaChains } from './supportedChains.svm'
3
+ import { supportedSolanaChains } from './supportedChains.svm.js'
4
4
 
5
5
  const TokenProgramAddress = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'
6
6
  const WalletAddress = '6AUWsSCRFSCbrHKH9s84wfzJXtD6mNzAHs11x6pGEcmJ'
@@ -1,7 +1,8 @@
1
1
  import type { Chain, ChainKey } from '@lifi/types'
2
- import { supportedEVMChains } from './supportedChains.evm'
3
- import { supportedSolanaChains } from './supportedChains.svm'
4
- import { supportedUXTOChains } from './supportedChains.utxo'
2
+ import { supportedEVMChains } from './supportedChains.evm.js'
3
+ import { supportedMVMChains } from './supportedChains.mvm.js'
4
+ import { supportedSolanaChains } from './supportedChains.svm.js'
5
+ import { supportedUXTOChains } from './supportedChains.utxo.js'
5
6
 
6
7
  // This assignment is required to avoid breaking
7
8
  // changes with the new non EVM support types release
@@ -9,6 +10,7 @@ import { supportedUXTOChains } from './supportedChains.utxo'
9
10
  export const supportedChains = [
10
11
  ...supportedEVMChains,
11
12
  ...supportedSolanaChains,
13
+ ...supportedMVMChains,
12
14
  ...supportedUXTOChains,
13
15
  ]
14
16
 
@@ -4,10 +4,14 @@ import {
4
4
  findDefaultToken,
5
5
  findTokenByChainIdAndAddress,
6
6
  findWrappedGasOnChain,
7
- } from '../coins'
8
- import { getChainById, getChainByKey, supportedChains } from './supportedChains'
9
- import { supportedEVMChains } from './supportedChains.evm'
10
- import { prefixChainId } from './utils'
7
+ } from '../coins/index.js'
8
+ import {
9
+ getChainById,
10
+ getChainByKey,
11
+ supportedChains,
12
+ } from './supportedChains.js'
13
+ import { supportedEVMChains } from './supportedChains.evm.js'
14
+ import { prefixChainId } from './utils.js'
11
15
 
12
16
  test('getChainById', () => {
13
17
  expect(getChainById(ChainId.ETH)).toBeDefined()
@@ -1,5 +1,5 @@
1
1
  import { describe, expect, test } from 'vitest'
2
- import { supportedUXTOChains } from './supportedChains.utxo'
2
+ import { supportedUXTOChains } from './supportedChains.utxo.js'
3
3
 
4
4
  describe.concurrent('UTXO chains RPC check', () => {
5
5
  const rpcUrls = supportedUXTOChains.flatMap((chain) =>
@@ -1,6 +1,6 @@
1
1
  import type { StaticToken } from '@lifi/types'
2
2
  import { describe, expect, test } from 'vitest'
3
- import { defaultCoins, wrappedTokens } from './coins'
3
+ import { defaultCoins, wrappedTokens } from './coins.js'
4
4
 
5
5
  describe.concurrent('Coin logo test', { timeout: 30_000 }, () => {
6
6
  const allImages: string[] = []
@@ -131,6 +131,18 @@ export const basicCoins: BasicCoin[] = [
131
131
  address: '0xE7798f023fC62146e8Aa1b36Da45fb70855a77Ea',
132
132
  decimals: 18,
133
133
  },
134
+ [ChainId.WCC]: {
135
+ address: '0x0000000000000000000000000000000000000000',
136
+ decimals: 18,
137
+ },
138
+ [ChainId.LSK]: {
139
+ address: '0x0000000000000000000000000000000000000000',
140
+ decimals: 18,
141
+ },
142
+ [ChainId.ABS]: {
143
+ address: '0x0000000000000000000000000000000000000000',
144
+ decimals: 18,
145
+ },
134
146
  },
135
147
  },
136
148
  // > MATIC
@@ -474,6 +486,21 @@ export const basicCoins: BasicCoin[] = [
474
486
  },
475
487
  },
476
488
 
489
+ // > SUI
490
+ {
491
+ key: CoinKey.SUI,
492
+ name: CoinKey.SUI,
493
+ logoURI: 'https://s2.coinmarketcap.com/static/img/coins/64x64/20947.png',
494
+ verified: true,
495
+ chains: {
496
+ [ChainId.SUI]: {
497
+ address:
498
+ '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI',
499
+ decimals: 9,
500
+ },
501
+ },
502
+ },
503
+
477
504
  // OTHER STABLECOINS
478
505
  // USDT
479
506
  {
@@ -492,6 +519,12 @@ export const basicCoins: BasicCoin[] = [
492
519
  decimals: 6,
493
520
  name: 'USDT',
494
521
  },
522
+ [ChainId.SUI]: {
523
+ address:
524
+ '0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN',
525
+ decimals: 6,
526
+ name: 'Tether USD',
527
+ },
495
528
  [ChainId.BSC]: {
496
529
  address: '0x55d398326f99059ff775485246999027b3197955',
497
530
  decimals: 18,
@@ -631,6 +664,14 @@ export const basicCoins: BasicCoin[] = [
631
664
  address: '0x9e5aac1ba1a2e6aed6b32689dfcf62a509ca96f3',
632
665
  decimals: 18,
633
666
  },
667
+ [ChainId.LSK]: {
668
+ address: '0x05d032ac25d322df992303dca074ee7392c117b9',
669
+ decimals: 6,
670
+ },
671
+ [ChainId.ABS]: {
672
+ address: '0x0709F39376dEEe2A2dfC94A58EdEb2Eb9DF012bD',
673
+ decimals: 6,
674
+ },
634
675
  },
635
676
  },
636
677
 
@@ -651,6 +692,12 @@ export const basicCoins: BasicCoin[] = [
651
692
  decimals: 6,
652
693
  name: 'USD Coin',
653
694
  },
695
+ [ChainId.SUI]: {
696
+ address:
697
+ '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC',
698
+ decimals: 6,
699
+ name: 'USDC',
700
+ },
654
701
  [ChainId.BSC]: {
655
702
  address: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d',
656
703
  decimals: 18,
@@ -672,7 +719,7 @@ export const basicCoins: BasicCoin[] = [
672
719
  decimals: 6,
673
720
  },
674
721
  [ChainId.ERA]: {
675
- address: '0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4',
722
+ address: '0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4',
676
723
  decimals: 6,
677
724
  },
678
725
  [ChainId.PZE]: {
@@ -842,6 +889,30 @@ export const basicCoins: BasicCoin[] = [
842
889
  name: 'Bridged USD Coin',
843
890
  symbol: 'USDC.e',
844
891
  },
892
+ [ChainId.WCC]: {
893
+ address: '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1',
894
+ decimals: 6,
895
+ name: 'Bridged USDC (world-chain-mainnet)',
896
+ symbol: 'USDC.e',
897
+ },
898
+ [ChainId.LSK]: {
899
+ address: '0xf242275d3a6527d877f2c927a82d9b057609cc71',
900
+ decimals: 6,
901
+ name: 'Bridged USDC (Lisk)',
902
+ symbol: 'USDC.e',
903
+ },
904
+ [ChainId.ERA]: {
905
+ address: '0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4',
906
+ decimals: 6,
907
+ name: 'Bridged USD Coin',
908
+ symbol: 'USDC.e',
909
+ },
910
+ [ChainId.ABS]: {
911
+ address: '0x84A71ccD554Cc1b02749b35d22F684CC8ec987e1',
912
+ decimals: 6,
913
+ name: 'Bridged USD (Stargate)',
914
+ symbol: 'USDC.e',
915
+ },
845
916
  },
846
917
  },
847
918
  // axlUSDC
@@ -1063,6 +1134,12 @@ export const basicCoins: BasicCoin[] = [
1063
1134
  decimals: 8,
1064
1135
  name: 'Wrapped BTC (Wormhole)',
1065
1136
  },
1137
+ [ChainId.SUI]: {
1138
+ address:
1139
+ '0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881::coin::COIN',
1140
+ decimals: 8,
1141
+ name: 'Wrapped BTC (Wormhole)',
1142
+ },
1066
1143
  [ChainId.POL]: {
1067
1144
  address: '0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6',
1068
1145
  decimals: 8,
@@ -1139,6 +1216,18 @@ export const basicCoins: BasicCoin[] = [
1139
1216
  address: '0xea034fb02eb1808c2cc3adbc15f447b93cbe08e1',
1140
1217
  decimals: 8,
1141
1218
  },
1219
+ [ChainId.WCC]: {
1220
+ address: '0x03C7054BCB39f7b2e5B2c7AcB37583e32D70Cfa3',
1221
+ decimals: 8,
1222
+ },
1223
+ [ChainId.SEI]: {
1224
+ address: '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c',
1225
+ decimals: 8,
1226
+ },
1227
+ [ChainId.LSK]: {
1228
+ address: '0x03c7054bcb39f7b2e5b2c7acb37583e32d70cfa3',
1229
+ decimals: 8,
1230
+ },
1142
1231
  },
1143
1232
  },
1144
1233
 
@@ -1159,6 +1248,12 @@ export const basicCoins: BasicCoin[] = [
1159
1248
  decimals: 9,
1160
1249
  name: 'Wrapped ETH (Allbridge from Ethereum)',
1161
1250
  },
1251
+ [ChainId.SUI]: {
1252
+ address:
1253
+ '0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5::coin::COIN',
1254
+ decimals: 8,
1255
+ name: 'Wrapped ETH (Wormhole)',
1256
+ },
1162
1257
  [ChainId.BSC]: {
1163
1258
  address: '0x2170ed0880ac9a755fd29b2688956bd959f933f8',
1164
1259
  decimals: 18,
@@ -1273,6 +1368,22 @@ export const basicCoins: BasicCoin[] = [
1273
1368
  address: '0x5a77f1443d16ee5761d310e38b62f77f726bc71c',
1274
1369
  decimals: 18,
1275
1370
  },
1371
+ [ChainId.TAI]: {
1372
+ address: '0xA51894664A773981C6C112C43ce576f315d5b1B6',
1373
+ decimals: 18,
1374
+ },
1375
+ [ChainId.WCC]: {
1376
+ address: '0x4200000000000000000000000000000000000006',
1377
+ decimals: 18,
1378
+ },
1379
+ [ChainId.LSK]: {
1380
+ address: '0x4200000000000000000000000000000000000006',
1381
+ decimals: 18,
1382
+ },
1383
+ [ChainId.ABS]: {
1384
+ address: '0x3439153EB7AF838Ad19d56E1571FBD09333C2809',
1385
+ decimals: 18,
1386
+ },
1276
1387
  },
1277
1388
  },
1278
1389
 
@@ -1612,6 +1723,12 @@ export const basicCoins: BasicCoin[] = [
1612
1723
  decimals: 9,
1613
1724
  name: 'Wrapped SOL (Wormhole)',
1614
1725
  },
1726
+ [ChainId.SUI]: {
1727
+ address:
1728
+ '0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8::coin::COIN',
1729
+ decimals: 8,
1730
+ name: 'Wrapped SOL (Wormhole)',
1731
+ },
1615
1732
  [ChainId.POL]: {
1616
1733
  address: '0xd93f7E271cB87c23AaA73edC008A79646d1F9912',
1617
1734
  decimals: 9,
@@ -1797,6 +1914,48 @@ export const basicCoins: BasicCoin[] = [
1797
1914
  },
1798
1915
  },
1799
1916
 
1917
+ // WLD
1918
+ {
1919
+ key: CoinKey.WLD,
1920
+ name: CoinKey.WLD,
1921
+ logoURI:
1922
+ 'https://static.debank.com/image/eth_token/logo_url/0x163f8c2467924be0ae7b5347228cabf260318753/30ac094d49a4b6e7561810c16ddc8c69.png',
1923
+ verified: true,
1924
+ chains: {
1925
+ [ChainId.ETH]: {
1926
+ address: '0x163f8c2467924be0ae7b5347228cabf260318753',
1927
+ decimals: 18,
1928
+ },
1929
+ [ChainId.OPT]: {
1930
+ address: '0xdC6fF44d5d932Cbd77B52E5612Ba0529DC6226F1',
1931
+ decimals: 18,
1932
+ },
1933
+ [ChainId.WCC]: {
1934
+ address: '0x2cFc85d8E48F8EAB294be644d9E25C3030863003',
1935
+ decimals: 18,
1936
+ },
1937
+ },
1938
+ },
1939
+
1940
+ // LSK
1941
+ {
1942
+ key: CoinKey.LSK,
1943
+ name: CoinKey.LSK,
1944
+ logoURI:
1945
+ 'https://static.debank.com/image/lisk_token/logo_url/0xac485391eb2d7d88253a7f1ef18c37f4242d1a24/b8f1b2ca1cb34102fe9118b5670c07e2.png',
1946
+ verified: true,
1947
+ chains: {
1948
+ [ChainId.LSK]: {
1949
+ address: '0xac485391EB2d7D88253a7F1eF18C37f4242D1A24',
1950
+ decimals: 18,
1951
+ },
1952
+ [ChainId.ETH]: {
1953
+ address: '0x6033F7f88332B8db6ad452B7C6D5bB643990aE3f',
1954
+ decimals: 18,
1955
+ },
1956
+ },
1957
+ },
1958
+
1800
1959
  // > Bitcoin
1801
1960
  {
1802
1961
  key: CoinKey.BTC,
@@ -2271,6 +2430,39 @@ export const wrappedTokens: { [ChainId: string]: StaticToken } = {
2271
2430
  logoURI:
2272
2431
  'https://static.debank.com/image/bsc_token/logo_url/0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c/1177dec1b9b7f58a799c3f22d93b04e1.png',
2273
2432
  },
2433
+ [ChainId.WCC]: {
2434
+ // https://worldscan.org/token/0x4200000000000000000000000000000000000006
2435
+ address: '0x4200000000000000000000000000000000000006',
2436
+ symbol: 'WETH',
2437
+ decimals: 18,
2438
+ chainId: ChainId.WCC,
2439
+ coinKey: CoinKey.WETH,
2440
+ name: 'WETH',
2441
+ logoURI:
2442
+ 'https://static.debank.com/image/world_token/logo_url/world/48bfb74adddd170e936578aec422836d.png',
2443
+ },
2444
+ [ChainId.LSK]: {
2445
+ // https://blockscout.lisk.com/token/0x4200000000000000000000000000000000000006
2446
+ address: '0x4200000000000000000000000000000000000006',
2447
+ symbol: 'WETH',
2448
+ decimals: 18,
2449
+ chainId: ChainId.LSK,
2450
+ coinKey: CoinKey.WETH,
2451
+ name: 'WETH',
2452
+ logoURI:
2453
+ 'https://static.debank.com/image/lyra_token/logo_url/lyra/48bfb74adddd170e936578aec422836d.png',
2454
+ },
2455
+ [ChainId.ABS]: {
2456
+ // https://explorer.mainnet.abs.xyz/address/0x3439153EB7AF838Ad19d56E1571FBD09333C2809
2457
+ address: '0x3439153EB7AF838Ad19d56E1571FBD09333C2809',
2458
+ symbol: 'WETH',
2459
+ decimals: 18,
2460
+ chainId: ChainId.ABS,
2461
+ coinKey: CoinKey.WETH,
2462
+ name: 'WETH',
2463
+ logoURI:
2464
+ 'https://static.debank.com/image/lyra_token/logo_url/lyra/48bfb74adddd170e936578aec422836d.png',
2465
+ },
2274
2466
  }
2275
2467
  export const findDefaultCoin = (coinKey: CoinKey): Coin => {
2276
2468
  const coin = defaultCoins.find((coin) => coin.key === coinKey)
@@ -1 +1 @@
1
- export * from './coins'
1
+ export * from './coins.js'
package/src/index.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './chains'
2
- export * from './coins'
3
- export * from './multicall'
1
+ export * from './chains/index.js'
2
+ export * from './coins/index.js'
3
+ export * from './multicall.js'
package/src/multicall.ts CHANGED
@@ -47,6 +47,9 @@ export const multicallAddresses: { [ChainId: number]: string } = {
47
47
  [ChainId.KAI]: '0xcA11bde05977b3631167028862bE2a173976CA11',
48
48
  [ChainId.XLY]: '0xcA11bde05977b3631167028862bE2a173976CA11',
49
49
  [ChainId.OPB]: '0xcA11bde05977b3631167028862bE2a173976CA11',
50
+ [ChainId.WCC]: '0xcA11bde05977b3631167028862bE2a173976CA11',
51
+ [ChainId.LSK]: '0xcA11bde05977b3631167028862bE2a173976CA11',
52
+ [ChainId.ABS]: '0xAa4De41dba0Ca5dCBb288b7cC6b708F3aaC759E7',
50
53
 
51
54
  // TODO
52
55
  // [ChainId.EXP]: '', // TODO
@@ -67,4 +70,5 @@ export const multicallAddresses: { [ChainId: number]: string } = {
67
70
  // [ChainId.SOLT]: '', // NOT NEEDED
68
71
  // [ChainId.TERT]: '', // NOT NEEDED
69
72
  // [ChainId.OAST]: '', // NOT NEEDED
73
+ // [ChainId.SUI]: '', // NOT NEEDED
70
74
  }