@lifi/data-types 6.36.0 → 6.37.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 +22 -0
- package/src/_cjs/chains/supportedChains.evm.js.map +1 -1
- package/src/_cjs/coins/coins.js +37 -0
- package/src/_cjs/coins/coins.js.map +1 -1
- package/src/_cjs/multicall.js +1 -0
- package/src/_cjs/multicall.js.map +1 -1
- package/src/_esm/chains/supportedChains.evm.js +22 -0
- package/src/_esm/chains/supportedChains.evm.js.map +1 -1
- package/src/_esm/coins/coins.js +38 -0
- package/src/_esm/coins/coins.js.map +1 -1
- package/src/_esm/multicall.js +1 -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 +24 -0
- package/src/coins/coins.ts +40 -0
- package/src/multicall.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supportedChains.evm.d.ts","sourceRoot":"","sources":["../../chains/supportedChains.evm.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,QAAQ,EACd,MAAM,aAAa,CAAA;AAIpB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"supportedChains.evm.d.ts","sourceRoot":"","sources":["../../chains/supportedChains.evm.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,QAAQ,EACd,MAAM,aAAa,CAAA;AAIpB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,EA2rDxC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coins.d.ts","sourceRoot":"","sources":["../../coins/coins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,KAAK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AE,MAAM,GAAG,WAAW,CAAA;CAkqB3D,CAAA;AACD,eAAO,MAAM,eAAe,GAAI,SAAS,OAAO,KAAG,IAMlD,CAAA;AACD,eAAO,MAAM,gBAAgB,GAC3B,SAAS,OAAO,EAChB,SAAS,OAAO,KACf,WAOF,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAI,SAAS,OAAO,KAAG,WAMxD,CAAA;AAED,eAAO,MAAM,4BAA4B,GACvC,SAAS,MAAM,EACf,cAAc,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;CAwF3D,CAAA"}
|
|
@@ -1713,4 +1713,28 @@ export const supportedEVMChains: EVMChain[] = [
|
|
|
1713
1713
|
rpcUrls: ['https://rpc.sophon.xyz'],
|
|
1714
1714
|
},
|
|
1715
1715
|
},
|
|
1716
|
+
|
|
1717
|
+
{
|
|
1718
|
+
key: ChainKey.PLA,
|
|
1719
|
+
chainType: ChainType.EVM,
|
|
1720
|
+
name: 'Plasma',
|
|
1721
|
+
coin: CoinKey.XPL,
|
|
1722
|
+
id: ChainId.PLA,
|
|
1723
|
+
mainnet: true,
|
|
1724
|
+
logoURI:
|
|
1725
|
+
'https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/plasma.svg',
|
|
1726
|
+
relayerSupported: false,
|
|
1727
|
+
multicallAddress: multicallAddresses[ChainId.PLA],
|
|
1728
|
+
metamask: {
|
|
1729
|
+
chainId: prefixChainId(ChainId.PLA),
|
|
1730
|
+
blockExplorerUrls: ['https://plasmascan.to/'],
|
|
1731
|
+
chainName: 'Plasma',
|
|
1732
|
+
nativeCurrency: {
|
|
1733
|
+
name: CoinKey.XPL,
|
|
1734
|
+
symbol: CoinKey.XPL,
|
|
1735
|
+
decimals: 18,
|
|
1736
|
+
},
|
|
1737
|
+
rpcUrls: ['https://rpc.plasma.to'],
|
|
1738
|
+
},
|
|
1739
|
+
},
|
|
1716
1740
|
]
|
package/src/coins/coins.ts
CHANGED
|
@@ -1848,6 +1848,10 @@ export const basicCoins: BasicCoin[] = [
|
|
|
1848
1848
|
address: '0xca59cA09E5602fAe8B629DeE83FfA819741f14be',
|
|
1849
1849
|
decimals: 18,
|
|
1850
1850
|
},
|
|
1851
|
+
[ChainId.PLA]: {
|
|
1852
|
+
address: '0x9895D81bB462A195b4922ED7De0e3ACD007c32CB',
|
|
1853
|
+
decimals: 18,
|
|
1854
|
+
},
|
|
1851
1855
|
},
|
|
1852
1856
|
},
|
|
1853
1857
|
|
|
@@ -2808,6 +2812,32 @@ export const basicCoins: BasicCoin[] = [
|
|
|
2808
2812
|
},
|
|
2809
2813
|
},
|
|
2810
2814
|
|
|
2815
|
+
{
|
|
2816
|
+
key: CoinKey.XPL,
|
|
2817
|
+
name: 'Plasma',
|
|
2818
|
+
logoURI: 'https://s2.coinmarketcap.com/static/img/coins/64x64/36645.png',
|
|
2819
|
+
verified: true,
|
|
2820
|
+
chains: {
|
|
2821
|
+
[ChainId.PLA]: {
|
|
2822
|
+
address: '0x0000000000000000000000000000000000000000',
|
|
2823
|
+
decimals: 18,
|
|
2824
|
+
},
|
|
2825
|
+
},
|
|
2826
|
+
},
|
|
2827
|
+
|
|
2828
|
+
{
|
|
2829
|
+
key: CoinKey.WXPL,
|
|
2830
|
+
name: 'Wrapped Plasma',
|
|
2831
|
+
logoURI: 'https://s2.coinmarketcap.com/static/img/coins/64x64/36645.png',
|
|
2832
|
+
verified: true,
|
|
2833
|
+
chains: {
|
|
2834
|
+
[ChainId.PLA]: {
|
|
2835
|
+
address: '0x6100E367285b01F48D07953803A2d8dCA5D19873',
|
|
2836
|
+
decimals: 18,
|
|
2837
|
+
},
|
|
2838
|
+
},
|
|
2839
|
+
},
|
|
2840
|
+
|
|
2811
2841
|
// > Bitcoin
|
|
2812
2842
|
{
|
|
2813
2843
|
key: CoinKey.BTC,
|
|
@@ -3558,6 +3588,16 @@ export const wrappedTokens: { [ChainId: string]: StaticToken } = {
|
|
|
3558
3588
|
logoURI:
|
|
3559
3589
|
'https://lifinance.github.io/types/src/assets/icons/chains/tron.svg',
|
|
3560
3590
|
},
|
|
3591
|
+
[ChainId.PLA]: {
|
|
3592
|
+
// https://plasmascan.to/address/0x6100E367285b01F48D07953803A2d8dCA5D19873
|
|
3593
|
+
address: '0x6100E367285b01F48D07953803A2d8dCA5D19873',
|
|
3594
|
+
name: 'Wrapped Plasma',
|
|
3595
|
+
symbol: CoinKey.WXPL,
|
|
3596
|
+
coinKey: CoinKey.WXPL,
|
|
3597
|
+
chainId: ChainId.PLA,
|
|
3598
|
+
decimals: 18,
|
|
3599
|
+
logoURI: 'https://s2.coinmarketcap.com/static/img/coins/64x64/36645.png',
|
|
3600
|
+
},
|
|
3561
3601
|
}
|
|
3562
3602
|
export const findDefaultCoin = (coinKey: CoinKey): Coin => {
|
|
3563
3603
|
const coin = defaultCoins.find((coin) => coin.key === coinKey)
|
package/src/multicall.ts
CHANGED
|
@@ -72,6 +72,7 @@ export const multicallAddresses: { [ChainId: number]: string } = {
|
|
|
72
72
|
[ChainId.RON]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
73
73
|
[ChainId.PLU]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
74
74
|
[ChainId.SOP]: '0x5f4867441d2416cA88B1b3fd38f21811680CD2C8',
|
|
75
|
+
[ChainId.PLA]: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
75
76
|
|
|
76
77
|
// TODO
|
|
77
78
|
// [ChainId.EXP]: '', // TODO
|