@lifi/data-types 5.15.4 → 5.16.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/package.json +2 -2
  2. package/src/_cjs/chains/supportedChains.evm.int.spec.js +3 -3
  3. package/src/_cjs/chains/supportedChains.evm.int.spec.js.map +1 -1
  4. package/src/_cjs/chains/supportedChains.evm.js +102 -78
  5. package/src/_cjs/chains/supportedChains.evm.js.map +1 -1
  6. package/src/_cjs/chains/supportedChains.js +6 -6
  7. package/src/_cjs/chains/supportedChains.js.map +1 -1
  8. package/src/_cjs/chains/supportedChains.svm.int.spec.js +3 -3
  9. package/src/_cjs/chains/supportedChains.svm.int.spec.js.map +1 -1
  10. package/src/_cjs/chains/supportedChains.unit.spec.js +14 -14
  11. package/src/_cjs/chains/supportedChains.unit.spec.js.map +1 -1
  12. package/src/_cjs/chains/supportedChains.utxo.int.spec.js +3 -3
  13. package/src/_cjs/chains/supportedChains.utxo.int.spec.js.map +1 -1
  14. package/src/_cjs/coins/coins.int.spec.js +3 -3
  15. package/src/_cjs/coins/coins.int.spec.js.map +1 -1
  16. package/src/_cjs/coins/coins.js +43 -0
  17. package/src/_cjs/coins/coins.js.map +1 -1
  18. package/src/_cjs/multicall.js +1 -0
  19. package/src/_cjs/multicall.js.map +1 -1
  20. package/src/_esm/chains/supportedChains.evm.int.spec.js +1 -1
  21. package/src/_esm/chains/supportedChains.evm.int.spec.js.map +1 -1
  22. package/src/_esm/chains/supportedChains.evm.js +27 -2
  23. package/src/_esm/chains/supportedChains.evm.js.map +1 -1
  24. package/src/_esm/chains/supportedChains.js +3 -3
  25. package/src/_esm/chains/supportedChains.js.map +1 -1
  26. package/src/_esm/chains/supportedChains.svm.int.spec.js +1 -1
  27. package/src/_esm/chains/supportedChains.svm.int.spec.js.map +1 -1
  28. package/src/_esm/chains/supportedChains.unit.spec.js +4 -4
  29. package/src/_esm/chains/supportedChains.unit.spec.js.map +1 -1
  30. package/src/_esm/chains/supportedChains.utxo.int.spec.js +1 -1
  31. package/src/_esm/chains/supportedChains.utxo.int.spec.js.map +1 -1
  32. package/src/_esm/coins/coins.int.spec.js +1 -1
  33. package/src/_esm/coins/coins.int.spec.js.map +1 -1
  34. package/src/_esm/coins/coins.js +45 -0
  35. package/src/_esm/coins/coins.js.map +1 -1
  36. package/src/_esm/multicall.js +1 -0
  37. package/src/_esm/multicall.js.map +1 -1
  38. package/src/_types/chains/supportedChains.evm.d.ts.map +1 -1
  39. package/src/_types/coins/coins.d.ts.map +1 -1
  40. package/src/_types/multicall.d.ts.map +1 -1
  41. package/src/chains/supportedChains.evm.int.spec.ts +1 -1
  42. package/src/chains/supportedChains.evm.ts +30 -2
  43. package/src/chains/supportedChains.svm.int.spec.ts +1 -1
  44. package/src/chains/supportedChains.ts +3 -3
  45. package/src/chains/supportedChains.unit.spec.ts +8 -4
  46. package/src/chains/supportedChains.utxo.int.spec.ts +1 -1
  47. package/src/coins/coins.int.spec.ts +1 -1
  48. package/src/coins/coins.ts +48 -0
  49. package/src/multicall.ts +1 -0
@@ -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,7 @@
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 { supportedSolanaChains } from './supportedChains.svm.js'
4
+ import { supportedUXTOChains } from './supportedChains.utxo.js'
5
5
 
6
6
  // This assignment is required to avoid breaking
7
7
  // changes with the new non EVM support types release
@@ -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,10 @@ export const basicCoins: BasicCoin[] = [
131
131
  address: '0xE7798f023fC62146e8Aa1b36Da45fb70855a77Ea',
132
132
  decimals: 18,
133
133
  },
134
+ [ChainId.WCC]: {
135
+ address: '0x0000000000000000000000000000000000000000',
136
+ decimals: 18,
137
+ },
134
138
  },
135
139
  },
136
140
  // > MATIC
@@ -842,6 +846,12 @@ export const basicCoins: BasicCoin[] = [
842
846
  name: 'Bridged USD Coin',
843
847
  symbol: 'USDC.e',
844
848
  },
849
+ [ChainId.WCC]: {
850
+ address: '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1',
851
+ decimals: 6,
852
+ name: 'Bridged USDC (world-chain-mainnet)',
853
+ symbol: 'USDC.e',
854
+ },
845
855
  },
846
856
  },
847
857
  // axlUSDC
@@ -1139,6 +1149,10 @@ export const basicCoins: BasicCoin[] = [
1139
1149
  address: '0xea034fb02eb1808c2cc3adbc15f447b93cbe08e1',
1140
1150
  decimals: 8,
1141
1151
  },
1152
+ [ChainId.WCC]: {
1153
+ address: '0x03C7054BCB39f7b2e5B2c7AcB37583e32D70Cfa3',
1154
+ decimals: 8,
1155
+ },
1142
1156
  },
1143
1157
  },
1144
1158
 
@@ -1801,6 +1815,29 @@ export const basicCoins: BasicCoin[] = [
1801
1815
  },
1802
1816
  },
1803
1817
 
1818
+ // WLD
1819
+ {
1820
+ key: CoinKey.WLD,
1821
+ name: CoinKey.WLD,
1822
+ logoURI:
1823
+ 'https://static.debank.com/image/eth_token/logo_url/0x163f8c2467924be0ae7b5347228cabf260318753/30ac094d49a4b6e7561810c16ddc8c69.png',
1824
+ verified: true,
1825
+ chains: {
1826
+ [ChainId.ETH]: {
1827
+ address: '0x163f8c2467924be0ae7b5347228cabf260318753',
1828
+ decimals: 18,
1829
+ },
1830
+ [ChainId.OPT]: {
1831
+ address: '0xdC6fF44d5d932Cbd77B52E5612Ba0529DC6226F1',
1832
+ decimals: 18,
1833
+ },
1834
+ [ChainId.WCC]: {
1835
+ address: '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1',
1836
+ decimals: 18,
1837
+ },
1838
+ },
1839
+ },
1840
+
1804
1841
  // > Bitcoin
1805
1842
  {
1806
1843
  key: CoinKey.BTC,
@@ -2275,6 +2312,17 @@ export const wrappedTokens: { [ChainId: string]: StaticToken } = {
2275
2312
  logoURI:
2276
2313
  'https://static.debank.com/image/bsc_token/logo_url/0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c/1177dec1b9b7f58a799c3f22d93b04e1.png',
2277
2314
  },
2315
+ [ChainId.WCC]: {
2316
+ // https://worldscan.org/token/0x4200000000000000000000000000000000000006
2317
+ address: '0x4200000000000000000000000000000000000006',
2318
+ symbol: 'WETH',
2319
+ decimals: 18,
2320
+ chainId: ChainId.WCC,
2321
+ coinKey: CoinKey.WETH,
2322
+ name: 'WETH',
2323
+ logoURI:
2324
+ 'https://static.debank.com/image/world_token/logo_url/world/48bfb74adddd170e936578aec422836d.png',
2325
+ },
2278
2326
  }
2279
2327
  export const findDefaultCoin = (coinKey: CoinKey): Coin => {
2280
2328
  const coin = defaultCoins.find((coin) => coin.key === coinKey)
package/src/multicall.ts CHANGED
@@ -47,6 +47,7 @@ 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',
50
51
 
51
52
  // TODO
52
53
  // [ChainId.EXP]: '', // TODO