@openocean.finance/widget 1.0.40 → 1.0.41

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/widget",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "description": "Openocean Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.",
5
5
  "type": "module",
6
6
  "main": "./dist/esm/index.js",
@@ -52,7 +52,7 @@
52
52
  "@mui/material": "^6.4.8",
53
53
  "@mui/system": "^6.4.8",
54
54
  "@openocean.finance/wallet-management": "^1.0.13",
55
- "@openocean.finance/widget-sdk": "^1.0.11",
55
+ "@openocean.finance/widget-sdk": "^1.0.12",
56
56
  "@near-wallet-selector/react-hook": "^9.0.0",
57
57
  "@reservoir0x/relay-sdk": "^2.4.0",
58
58
  "@reservoir0x/relay-solana-wallet-adapter": "^2.0.5",
@@ -38,4 +38,6 @@ export const DEFAULT_CHAIN_IDS = [
38
38
  1151111081099710, // Solana
39
39
  999, // HyperEvm
40
40
  9745, // Plasma
41
+ 98866, // Plume
42
+ 239, // Tac
41
43
  ];
@@ -1,2 +1,2 @@
1
1
  export const name = '@openocean.finance/widget'
2
- export const version = '1.0.40'
2
+ export const version = '1.0.41'
@@ -17,6 +17,7 @@ export enum NonEvmChain {
17
17
  Near = 'near',
18
18
  Bitcoin = 20000000000001,
19
19
  Solana = 1151111081099710,
20
+ Plasma = 9745,
20
21
  }
21
22
 
22
23
  export const BitcoinToken = {
@@ -48,6 +49,10 @@ export const NonEvmChainInfo: {
48
49
  name: 'Solana',
49
50
  icon: 'https://solana.com/favicon.png',
50
51
  },
52
+ [NonEvmChain.Plasma]: {
53
+ name: 'Plasma',
54
+ icon: 'https://storage.googleapis.com/ks-setting-1d682dca/285205e7-a16d-421c-a794-67439cd6b54f1751515894455.png',
55
+ },
51
56
  }
52
57
 
53
58
  export const NOT_SUPPORTED_CHAINS_PRICE_SERVICE = [
@@ -59,6 +64,7 @@ export const NOT_SUPPORTED_CHAINS_PRICE_SERVICE = [
59
64
  NonEvmChain.Solana,
60
65
  NonEvmChain.Bitcoin,
61
66
  NonEvmChain.Near,
67
+ NonEvmChain.Plasma,
62
68
  ]
63
69
 
64
70
  export interface QuoteParams {
@@ -38,6 +38,7 @@ const mappingChain: Record<string, ChainName> = {
38
38
  [ChainId.HYE]: 'hyperevm',
39
39
  [ChainId.SOL]: 'solana',
40
40
  [ChainId.SUI]: 'sui',
41
+ // [ChainId.PLA]: 'plasma',
41
42
  }
42
43
 
43
44
  export class MayanAdapter extends BaseSwapAdapter {
@@ -69,6 +69,35 @@ const hyperEvm = defineChain({
69
69
  },
70
70
  })
71
71
 
72
+ const plasma = defineChain({
73
+ id: 9745,
74
+ name: 'Plasma',
75
+ blockTime: 1000,
76
+ nativeCurrency: {
77
+ name: 'Plasma',
78
+ symbol: 'XPL',
79
+ decimals: 18,
80
+ },
81
+ rpcUrls: {
82
+ default: {
83
+ http: ['https://rpc.plasma.to'],
84
+ },
85
+ },
86
+ blockExplorers: {
87
+ default: {
88
+ name: 'PlasmaScan',
89
+ url: 'https://plasmascan.to',
90
+ },
91
+ },
92
+ contracts: {
93
+ multicall3: {
94
+ address: '0xcA11bde05977b3631167028862bE2a173976CA11',
95
+ blockCreated: 0,
96
+ },
97
+ },
98
+ })
99
+
100
+
72
101
  const SolanaChainId = 792703809
73
102
 
74
103
  const solanaChain = {
@@ -103,6 +132,7 @@ export class RelayAdapter extends BaseSwapAdapter {
103
132
  ronin,
104
133
  unichain,
105
134
  hyperEvm,
135
+ plasma
106
136
  ]
107
137
  .map(convertViemChainToRelayChain)
108
138
  .concat(solanaChain as any),
@@ -116,7 +146,7 @@ export class RelayAdapter extends BaseSwapAdapter {
116
146
  return 'https://storage.googleapis.com/ks-setting-1d682dca/84e906bb-eaeb-45d3-a64c-2aa9c84eb3ea1747759080942.png'
117
147
  }
118
148
  getSupportedChains(): Chain[] {
119
- return [NonEvmChain.Solana, ...MAINNET_NETWORKS]
149
+ return [NonEvmChain.Solana, NonEvmChain.Plasma, ...MAINNET_NETWORKS]
120
150
  // return [...MAINNET_NETWORKS]
121
151
  }
122
152
 
@@ -154,6 +184,7 @@ export class RelayAdapter extends BaseSwapAdapter {
154
184
  fee: params.feeBps.toString(),
155
185
  },
156
186
  ],
187
+ protocolVersion:'preferV2'
157
188
  // includedSwapSources: ['open-ocean'],
158
189
  },
159
190
  })