@lifi/data-types 5.28.0 → 5.31.0-beta.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.
- package/package.json +2 -2
- package/src/_cjs/chains/supportedChains.evm.js +66 -0
- package/src/_cjs/chains/supportedChains.evm.js.map +1 -1
- package/src/_cjs/coins/coins.js +79 -0
- package/src/_cjs/coins/coins.js.map +1 -1
- package/src/_cjs/multicall.js +3 -0
- package/src/_cjs/multicall.js.map +1 -1
- package/src/_esm/chains/supportedChains.evm.js +70 -0
- package/src/_esm/chains/supportedChains.evm.js.map +1 -1
- package/src/_esm/coins/coins.js +84 -1
- package/src/_esm/coins/coins.js.map +1 -1
- package/src/_esm/multicall.js +3 -0
- package/src/_esm/multicall.js.map +1 -1
- package/src/_types/chains/supportedChains.evm.d.ts.map +1 -1
- package/src/_types/coins/coins.d.ts.map +1 -1
- package/src/_types/multicall.d.ts.map +1 -1
- package/src/chains/supportedChains.evm.ts +79 -0
- package/src/coins/coins.ts +90 -1
- package/src/multicall.ts +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coins.d.ts","sourceRoot":"","sources":["../../coins/coins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE9C,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;KAC1B,CAAA;CACF,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"coins.d.ts","sourceRoot":"","sources":["../../coins/coins.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE9C,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,OAAO,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE;QACN,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAA;KAC1B,CAAA;CACF,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,SAAS,EAimEjC,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,IAAI,CAsBnC,CAAA;AAGF,eAAO,MAAM,aAAa,EAAE;IAAE,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAAA;CA4d3D,CAAA;AACD,eAAO,MAAM,eAAe,YAAa,OAAO,KAAG,IAMlD,CAAA;AACD,eAAO,MAAM,gBAAgB,YAClB,OAAO,WACP,OAAO,KACf,WAOF,CAAA;AAED,eAAO,MAAM,qBAAqB,YAAa,OAAO,KAAG,WAMxD,CAAA;AAED,eAAO,MAAM,4BAA4B,YAC9B,MAAM,gBACD,MAAM,KACnB,WAAW,GAAG,IAUhB,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;
|
|
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;CAqE3D,CAAA"}
|
|
@@ -1146,6 +1146,7 @@ export const supportedEVMChains: EVMChain[] = [
|
|
|
1146
1146
|
},
|
|
1147
1147
|
},
|
|
1148
1148
|
|
|
1149
|
+
// 80094 - Berachain
|
|
1149
1150
|
// 80094 - Berachain
|
|
1150
1151
|
{
|
|
1151
1152
|
key: ChainKey.BER,
|
|
@@ -1198,4 +1199,82 @@ export const supportedEVMChains: EVMChain[] = [
|
|
|
1198
1199
|
rpcUrls: ['https://rpc.soniclabs.com', 'https://sonic.drpc.org'],
|
|
1199
1200
|
},
|
|
1200
1201
|
},
|
|
1202
|
+
|
|
1203
|
+
// 130 - Unichain
|
|
1204
|
+
{
|
|
1205
|
+
key: ChainKey.UNI,
|
|
1206
|
+
chainType: ChainType.EVM,
|
|
1207
|
+
name: 'ETH',
|
|
1208
|
+
coin: CoinKey.ETH,
|
|
1209
|
+
id: 130,
|
|
1210
|
+
mainnet: true,
|
|
1211
|
+
logoURI:
|
|
1212
|
+
'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/unichain.svg',
|
|
1213
|
+
multicallAddress: multicallAddresses[ChainId.UNI],
|
|
1214
|
+
|
|
1215
|
+
metamask: {
|
|
1216
|
+
chainId: prefixChainId(130),
|
|
1217
|
+
blockExplorerUrls: [
|
|
1218
|
+
'https://unichain.blockscout.com/',
|
|
1219
|
+
'https://uniscan.xyz/',
|
|
1220
|
+
],
|
|
1221
|
+
chainName: 'Unichain',
|
|
1222
|
+
nativeCurrency: {
|
|
1223
|
+
name: 'Ether',
|
|
1224
|
+
symbol: 'ETH',
|
|
1225
|
+
decimals: 18,
|
|
1226
|
+
},
|
|
1227
|
+
rpcUrls: ['https://mainnet.unichain.org'],
|
|
1228
|
+
},
|
|
1229
|
+
},
|
|
1230
|
+
|
|
1231
|
+
// 33139 - Apechain
|
|
1232
|
+
{
|
|
1233
|
+
key: ChainKey.APE,
|
|
1234
|
+
chainType: ChainType.EVM,
|
|
1235
|
+
name: 'Apechain',
|
|
1236
|
+
coin: CoinKey.APE,
|
|
1237
|
+
id: 33139,
|
|
1238
|
+
mainnet: true,
|
|
1239
|
+
logoURI:
|
|
1240
|
+
'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/apechain.svg',
|
|
1241
|
+
multicallAddress: multicallAddresses[ChainId.APE],
|
|
1242
|
+
|
|
1243
|
+
metamask: {
|
|
1244
|
+
chainId: prefixChainId(33139),
|
|
1245
|
+
blockExplorerUrls: ['https://apescan.io/'],
|
|
1246
|
+
chainName: 'ApeChain',
|
|
1247
|
+
nativeCurrency: {
|
|
1248
|
+
name: 'ApeCoin',
|
|
1249
|
+
symbol: 'APE',
|
|
1250
|
+
decimals: 18,
|
|
1251
|
+
},
|
|
1252
|
+
rpcUrls: ['https://rpc.apechain.com'],
|
|
1253
|
+
},
|
|
1254
|
+
},
|
|
1255
|
+
|
|
1256
|
+
// 1868 - Soneium
|
|
1257
|
+
{
|
|
1258
|
+
key: ChainKey.SOE,
|
|
1259
|
+
chainType: ChainType.EVM,
|
|
1260
|
+
name: 'Soneium',
|
|
1261
|
+
coin: CoinKey.ETH,
|
|
1262
|
+
id: 1868,
|
|
1263
|
+
mainnet: true,
|
|
1264
|
+
logoURI:
|
|
1265
|
+
'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/soneium.svg',
|
|
1266
|
+
multicallAddress: multicallAddresses[ChainId.SOE],
|
|
1267
|
+
|
|
1268
|
+
metamask: {
|
|
1269
|
+
chainId: prefixChainId(1868),
|
|
1270
|
+
blockExplorerUrls: ['https://soneium.blockscout.com/'],
|
|
1271
|
+
chainName: 'Soneium',
|
|
1272
|
+
nativeCurrency: {
|
|
1273
|
+
name: 'Ether',
|
|
1274
|
+
symbol: 'ETH',
|
|
1275
|
+
decimals: 18,
|
|
1276
|
+
},
|
|
1277
|
+
rpcUrls: ['https://rpc.soneium.org/'],
|
|
1278
|
+
},
|
|
1279
|
+
},
|
|
1201
1280
|
]
|
package/src/coins/coins.ts
CHANGED
|
@@ -143,6 +143,14 @@ export const basicCoins: BasicCoin[] = [
|
|
|
143
143
|
address: '0x0000000000000000000000000000000000000000',
|
|
144
144
|
decimals: 18,
|
|
145
145
|
},
|
|
146
|
+
[ChainId.UNI]: {
|
|
147
|
+
address: '0x0000000000000000000000000000000000000000',
|
|
148
|
+
decimals: 18,
|
|
149
|
+
},
|
|
150
|
+
[ChainId.SOE]: {
|
|
151
|
+
address: '0x0000000000000000000000000000000000000000',
|
|
152
|
+
decimals: 18,
|
|
153
|
+
},
|
|
146
154
|
},
|
|
147
155
|
},
|
|
148
156
|
// > MATIC
|
|
@@ -359,6 +367,10 @@ export const basicCoins: BasicCoin[] = [
|
|
|
359
367
|
address: '0xc5015b9d9161dca7e18e32f6f25c4ad850731fd4',
|
|
360
368
|
decimals: 18,
|
|
361
369
|
},
|
|
370
|
+
[ChainId.UNI]: {
|
|
371
|
+
address: '0x20CAb320A855b39F724131C69424240519573f81',
|
|
372
|
+
decimals: 18,
|
|
373
|
+
},
|
|
362
374
|
},
|
|
363
375
|
},
|
|
364
376
|
// > FTM
|
|
@@ -676,6 +688,12 @@ export const basicCoins: BasicCoin[] = [
|
|
|
676
688
|
address: '0x6047828dc181963ba44974801FF68e538dA5eaF9',
|
|
677
689
|
decimals: 6,
|
|
678
690
|
},
|
|
691
|
+
[ChainId.SOE]: {
|
|
692
|
+
address: '0x3A337a6adA9d885b6Ad95ec48F9b75f197b5AE35',
|
|
693
|
+
decimals: 18,
|
|
694
|
+
name: 'Bridged USDT (Soneium)',
|
|
695
|
+
symbol: 'USDT',
|
|
696
|
+
},
|
|
679
697
|
},
|
|
680
698
|
},
|
|
681
699
|
|
|
@@ -828,6 +846,10 @@ export const basicCoins: BasicCoin[] = [
|
|
|
828
846
|
address: '0x74b7f16337b8972027f6196a17a631ac6de26d22',
|
|
829
847
|
decimals: 6,
|
|
830
848
|
},
|
|
849
|
+
[ChainId.UNI]: {
|
|
850
|
+
address: '0x078D782b760474a361dDA0AF3839290b0EF57AD6',
|
|
851
|
+
decimals: 6,
|
|
852
|
+
},
|
|
831
853
|
},
|
|
832
854
|
},
|
|
833
855
|
// USDC.e
|
|
@@ -929,6 +951,12 @@ export const basicCoins: BasicCoin[] = [
|
|
|
929
951
|
name: 'Bridged USDC (Sonic Labs)',
|
|
930
952
|
symbol: 'USDC.e',
|
|
931
953
|
},
|
|
954
|
+
[ChainId.SOE]: {
|
|
955
|
+
address: '0xba9986d2381edf1da03b0b9c1f8b00dc4aacc369',
|
|
956
|
+
decimals: 6,
|
|
957
|
+
name: 'Bridged USDC (Soneium)',
|
|
958
|
+
symbol: 'USDC.e',
|
|
959
|
+
},
|
|
932
960
|
},
|
|
933
961
|
},
|
|
934
962
|
// axlUSDC
|
|
@@ -1252,6 +1280,10 @@ export const basicCoins: BasicCoin[] = [
|
|
|
1252
1280
|
address: '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c',
|
|
1253
1281
|
decimals: 8,
|
|
1254
1282
|
},
|
|
1283
|
+
[ChainId.SOE]: {
|
|
1284
|
+
address: '0x0555E30da8f98308EdB960aa94C0Db47230d2B9c',
|
|
1285
|
+
decimals: 8,
|
|
1286
|
+
},
|
|
1255
1287
|
},
|
|
1256
1288
|
},
|
|
1257
1289
|
|
|
@@ -1416,6 +1448,10 @@ export const basicCoins: BasicCoin[] = [
|
|
|
1416
1448
|
address: '0x50c42dEAcD8Fc9773493ED674b675bE577f2634b',
|
|
1417
1449
|
decimals: 18,
|
|
1418
1450
|
},
|
|
1451
|
+
[ChainId.UNI]: {
|
|
1452
|
+
address: '0x4200000000000000000000000000000000000006',
|
|
1453
|
+
decimals: 18,
|
|
1454
|
+
},
|
|
1419
1455
|
},
|
|
1420
1456
|
},
|
|
1421
1457
|
|
|
@@ -1738,6 +1774,26 @@ export const basicCoins: BasicCoin[] = [
|
|
|
1738
1774
|
},
|
|
1739
1775
|
},
|
|
1740
1776
|
},
|
|
1777
|
+
|
|
1778
|
+
// APE
|
|
1779
|
+
{
|
|
1780
|
+
key: CoinKey.APE,
|
|
1781
|
+
name: CoinKey.APE,
|
|
1782
|
+
logoURI:
|
|
1783
|
+
'https://static.debank.com/image/ape_token/logo_url/ape/2357165eac1453c46f526704b51a801b.png',
|
|
1784
|
+
verified: true,
|
|
1785
|
+
chains: {
|
|
1786
|
+
[ChainId.APE]: {
|
|
1787
|
+
address: '0x0000000000000000000000000000000000000000',
|
|
1788
|
+
decimals: 18,
|
|
1789
|
+
},
|
|
1790
|
+
[ChainId.ETH]: {
|
|
1791
|
+
address: '0x4d224452801aced8b2f0aebe155379bb5d594381',
|
|
1792
|
+
decimals: 18,
|
|
1793
|
+
},
|
|
1794
|
+
},
|
|
1795
|
+
},
|
|
1796
|
+
|
|
1741
1797
|
// > Solana
|
|
1742
1798
|
{
|
|
1743
1799
|
key: CoinKey.SOL,
|
|
@@ -2136,7 +2192,7 @@ export const defaultCoins: Array<Coin> = basicCoins.map((coin) => {
|
|
|
2136
2192
|
// Wrapped version of gas on chain
|
|
2137
2193
|
export const wrappedTokens: { [ChainId: string]: StaticToken } = {
|
|
2138
2194
|
[ChainId.ETH]: {
|
|
2139
|
-
// https://
|
|
2195
|
+
// https://etherscan.io/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
|
|
2140
2196
|
address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
|
2141
2197
|
symbol: 'WETH',
|
|
2142
2198
|
decimals: 18,
|
|
@@ -2577,6 +2633,39 @@ export const wrappedTokens: { [ChainId: string]: StaticToken } = {
|
|
|
2577
2633
|
logoURI:
|
|
2578
2634
|
'https://static.debank.com/image/sonic_token/logo_url/0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38/b4cc70d040518a88adac18d906fcbfff.png',
|
|
2579
2635
|
},
|
|
2636
|
+
[ChainId.UNI]: {
|
|
2637
|
+
// https://uniscan.xyz/token/0x4200000000000000000000000000000000000006
|
|
2638
|
+
address: '0x4200000000000000000000000000000000000006',
|
|
2639
|
+
symbol: 'WETH',
|
|
2640
|
+
decimals: 18,
|
|
2641
|
+
chainId: ChainId.UNI,
|
|
2642
|
+
coinKey: CoinKey.WETH,
|
|
2643
|
+
name: 'WETH',
|
|
2644
|
+
logoURI:
|
|
2645
|
+
'https://static.debank.com/image/eth_token/logo_url/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/61844453e63cf81301f845d7864236f6.png',
|
|
2646
|
+
},
|
|
2647
|
+
[ChainId.APE]: {
|
|
2648
|
+
// https://apescan.io/token/0x48b62137edfa95a428d35c09e44256a739f6b557
|
|
2649
|
+
address: '0x48b62137EdfA95a428D35C09E44256a739F6B557',
|
|
2650
|
+
symbol: 'WAPE',
|
|
2651
|
+
decimals: 18,
|
|
2652
|
+
chainId: ChainId.APE,
|
|
2653
|
+
coinKey: CoinKey.WAPE,
|
|
2654
|
+
name: 'WAPE',
|
|
2655
|
+
logoURI:
|
|
2656
|
+
'https://static.debank.com/image/ape_token/logo_url/ape/2357165eac1453c46f526704b51a801b.png',
|
|
2657
|
+
},
|
|
2658
|
+
[ChainId.SOE]: {
|
|
2659
|
+
// https://soneium.blockscout.com/address/0x4200000000000000000000000000000000000006
|
|
2660
|
+
address: '0x4200000000000000000000000000000000000006',
|
|
2661
|
+
symbol: 'WETH',
|
|
2662
|
+
decimals: 18,
|
|
2663
|
+
chainId: ChainId.SOE,
|
|
2664
|
+
coinKey: CoinKey.WETH,
|
|
2665
|
+
name: 'WETH',
|
|
2666
|
+
logoURI:
|
|
2667
|
+
'https://static.debank.com/image/eth_token/logo_url/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/61844453e63cf81301f845d7864236f6.png',
|
|
2668
|
+
},
|
|
2580
2669
|
}
|
|
2581
2670
|
export const findDefaultCoin = (coinKey: CoinKey): Coin => {
|
|
2582
2671
|
const coin = defaultCoins.find((coin) => coin.key === coinKey)
|
package/src/multicall.ts
CHANGED
|
@@ -52,6 +52,9 @@ export const multicallAddresses: { [ChainId: number]: string } = {
|
|
|
52
52
|
[ChainId.ABS]: '0xAa4De41dba0Ca5dCBb288b7cC6b708F3aaC759E7',
|
|
53
53
|
[ChainId.BER]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
54
54
|
[ChainId.SON]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
55
|
+
[ChainId.UNI]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
56
|
+
[ChainId.APE]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
57
|
+
[ChainId.SOE]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
55
58
|
|
|
56
59
|
// TODO
|
|
57
60
|
// [ChainId.EXP]: '', // TODO
|