@rabby-wallet/rabby-swap 0.0.77-beta.0 → 0.0.77-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.
package/dist/abi.d.ts CHANGED
@@ -285,3 +285,53 @@ export declare const ZeroXABIV2: ({
285
285
  inputs?: undefined;
286
286
  name?: undefined;
287
287
  })[];
288
+ export declare const SushiABI: ({
289
+ inputs: never[];
290
+ stateMutability: string;
291
+ type: string;
292
+ name?: undefined;
293
+ outputs?: undefined;
294
+ } | {
295
+ inputs: {
296
+ internalType: string;
297
+ name: string;
298
+ type: string;
299
+ }[];
300
+ name: string;
301
+ type: string;
302
+ stateMutability?: undefined;
303
+ outputs?: undefined;
304
+ } | {
305
+ inputs: {
306
+ internalType: string;
307
+ name: string;
308
+ type: string;
309
+ }[];
310
+ name: string;
311
+ outputs: {
312
+ internalType: string;
313
+ name: string;
314
+ type: string;
315
+ }[];
316
+ stateMutability: string;
317
+ type: string;
318
+ } | {
319
+ inputs: {
320
+ components: {
321
+ internalType: string;
322
+ name: string;
323
+ type: string;
324
+ }[];
325
+ internalType: string;
326
+ name: string;
327
+ type: string;
328
+ }[];
329
+ name: string;
330
+ outputs: {
331
+ internalType: string;
332
+ name: string;
333
+ type: string;
334
+ }[];
335
+ stateMutability: string;
336
+ type: string;
337
+ })[];
package/dist/abi.js CHANGED
@@ -1651,3 +1651,4 @@ export const ZeroXABIV2 = [
1651
1651
  { inputs: [], name: "ConfusedDeputy", type: "error" },
1652
1652
  { stateMutability: "payable", type: "fallback" },
1653
1653
  ];
1654
+ export const SushiABI = [{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [{ "internalType": "address", "name": "tokenOut", "type": "address" }, { "internalType": "uint256", "name": "amountOut", "type": "uint256" }], "name": "MinimalOutputBalanceViolation", "type": "error" }, { "inputs": [], "name": "safeExecutor", "outputs": [{ "internalType": "contract SafeExecutor", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "contract IERC20", "name": "tokenIn", "type": "address" }, { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "contract IERC20", "name": "tokenOut", "type": "address" }, { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }, { "internalType": "address", "name": "executor", "type": "address" }, { "internalType": "bytes", "name": "executorData", "type": "bytes" }], "name": "snwap", "outputs": [{ "internalType": "uint256", "name": "amountOut", "type": "uint256" }], "stateMutability": "payable", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "contract IERC20", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "amountIn", "type": "uint256" }, { "internalType": "address", "name": "transferTo", "type": "address" }], "internalType": "struct InputToken[]", "name": "inputTokens", "type": "tuple[]" }, { "components": [{ "internalType": "contract IERC20", "name": "token", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amountOutMin", "type": "uint256" }], "internalType": "struct OutputToken[]", "name": "outputTokens", "type": "tuple[]" }, { "components": [{ "internalType": "address", "name": "executor", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "internalType": "struct Executor[]", "name": "executors", "type": "tuple[]" }], "name": "snwapMultiple", "outputs": [{ "internalType": "uint256[]", "name": "amountOut", "type": "uint256[]" }], "stateMutability": "payable", "type": "function" }];
package/dist/consts.d.ts CHANGED
@@ -10,5 +10,6 @@ export declare enum DEX_ENUM {
10
10
  ZEROXAPIV2 = "0xAPIV2",
11
11
  MAGPIE = "Magpie",
12
12
  RABBY = "Rabby",
13
+ SUSHI = "Sushi",
13
14
  UNI = "Uniswap"
14
15
  }
package/dist/consts.js CHANGED
@@ -11,5 +11,6 @@ export var DEX_ENUM;
11
11
  DEX_ENUM["ZEROXAPIV2"] = "0xAPIV2";
12
12
  DEX_ENUM["MAGPIE"] = "Magpie";
13
13
  DEX_ENUM["RABBY"] = "Rabby";
14
+ DEX_ENUM["SUSHI"] = "Sushi";
14
15
  DEX_ENUM["UNI"] = "Uniswap";
15
16
  })(DEX_ENUM || (DEX_ENUM = {}));
@@ -28,6 +28,8 @@ export const SUPPORT_CHAINS = [
28
28
  "MONAD",
29
29
  "STABLE",
30
30
  "MEGAETH",
31
+ "KATANA",
32
+ "TEMPO",
31
33
  ];
32
34
  export const getQuote = generateGetQuote({
33
35
  SUPPORT_CHAINS,
@@ -16,6 +16,7 @@ const NATIVE_TOKENS = {
16
16
  [CHAINS_ENUM.AURORA]: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
17
17
  [CHAINS_ENUM.BOBA]: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
18
18
  [CHAINS_ENUM.KAVA]: "0x0000000000000000000000000000000000000000",
19
+ [CHAINS_ENUM.CELO]: "0x471EcE3750Da237f93B8E339c536989b8978a438",
19
20
  [CHAINS_ENUM.METIS]: "0x0000000000000000000000000000000000000000",
20
21
  [CHAINS_ENUM.BASE]: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
21
22
  ["SONIC"]: "0x0000000000000000000000000000000000000000",
@@ -65,6 +66,7 @@ export const SUPPORT_CHAINS = [
65
66
  "MONAD",
66
67
  CHAINS_ENUM.RSK,
67
68
  CHAINS_ENUM.KAVA,
69
+ CHAINS_ENUM.CELO,
68
70
  /**
69
71
  * 接口返回 swap error
70
72
  */
@@ -0,0 +1,5 @@
1
+ import { CHAINS_ENUM } from "@debank/common";
2
+ import { TxWithChainId, DecodeCalldataResult } from "../quote";
3
+ export declare const SUPPORT_CHAINS: CHAINS_ENUM[];
4
+ export declare const getQuote: (options: import("../quote").QuoteParams, api: import("@rabby-wallet/rabby-api").OpenApiService) => Promise<import("../quote").QuoteResult>;
5
+ export declare const decodeCalldata: (tx: TxWithChainId) => DecodeCalldataResult | null;
@@ -0,0 +1,72 @@
1
+ import { CHAINS, CHAINS_ENUM } from "@debank/common";
2
+ import { generateGetQuote, isSameAddress } from "../utils";
3
+ import { DEX_ENUM } from "../consts";
4
+ import { Interface } from "@ethersproject/abi";
5
+ import { SushiABI } from "../abi";
6
+ const NATIVE_TOKEN = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
7
+ export const SUPPORT_CHAINS = [
8
+ CHAINS_ENUM.ETH,
9
+ CHAINS_ENUM.OP,
10
+ CHAINS_ENUM.CRO,
11
+ CHAINS_ENUM.RSK,
12
+ CHAINS_ENUM.BSC,
13
+ CHAINS_ENUM.GNOSIS,
14
+ CHAINS_ENUM.FUSE,
15
+ CHAINS_ENUM.POLYGON,
16
+ CHAINS_ENUM.MANTA,
17
+ CHAINS_ENUM.FTM,
18
+ CHAINS_ENUM.ERA,
19
+ CHAINS_ENUM.METIS,
20
+ CHAINS_ENUM.CORE,
21
+ CHAINS_ENUM.KAVA,
22
+ CHAINS_ENUM.MANTLE,
23
+ CHAINS_ENUM.ZETA,
24
+ CHAINS_ENUM.BASE,
25
+ CHAINS_ENUM.MODE,
26
+ CHAINS_ENUM.ARBITRUM,
27
+ CHAINS_ENUM.CELO,
28
+ CHAINS_ENUM.AVAX,
29
+ CHAINS_ENUM.LINEA,
30
+ CHAINS_ENUM.BLAST,
31
+ CHAINS_ENUM.SCRL,
32
+ "MONAD",
33
+ "SONIC",
34
+ "XLAYER",
35
+ "HYPER",
36
+ "MEGAETH",
37
+ "PLASMA",
38
+ "APE",
39
+ "HEMI",
40
+ "BERA",
41
+ "TAIKO",
42
+ "KATANA",
43
+ ];
44
+ export const getQuote = generateGetQuote({
45
+ SUPPORT_CHAINS,
46
+ id: "sushi",
47
+ dex: DEX_ENUM.SUSHI,
48
+ });
49
+ export const decodeCalldata = (tx) => {
50
+ const chain = Object.values(CHAINS).find((item) => item.id === tx.chainId);
51
+ if (!chain)
52
+ return null;
53
+ const contractInterface = new Interface(SushiABI);
54
+ const result = contractInterface.parseTransaction({ data: tx.data });
55
+ if (result.name !== "snwap") {
56
+ return null;
57
+ }
58
+ const [tokenIn, amountIn, recipient, tokenOut, amountOutMin, executor, executorData,] = result.args;
59
+ if (!tokenIn || !amountIn || !recipient || !tokenOut || !amountOutMin)
60
+ return null;
61
+ return {
62
+ fromToken: isSameAddress(tokenIn, NATIVE_TOKEN)
63
+ ? chain.nativeTokenAddress
64
+ : tokenIn,
65
+ fromTokenAmount: amountIn.toString(),
66
+ toToken: isSameAddress(tokenOut, NATIVE_TOKEN)
67
+ ? chain.nativeTokenAddress
68
+ : tokenOut,
69
+ minReceiveToTokenAmount: amountOutMin.toString(),
70
+ toTokenReceiver: recipient,
71
+ };
72
+ };
@@ -21,7 +21,7 @@ export const SUPPORT_CHAINS = [
21
21
  CHAINS_ENUM.ARBITRUM,
22
22
  CHAINS_ENUM.KLAY,
23
23
  CHAINS_ENUM.GNOSIS,
24
- // CHAINS_ENUM.CELO,
24
+ CHAINS_ENUM.CELO,
25
25
  CHAINS_ENUM.CRO,
26
26
  CHAINS_ENUM.AURORA,
27
27
  CHAINS_ENUM.LINEA,
package/dist/list.d.ts CHANGED
@@ -24,9 +24,11 @@ export declare const WrapTokenAddressMap: {
24
24
  MANTA: string;
25
25
  RSK: string;
26
26
  KAVA: string;
27
+ ZETA: string;
27
28
  };
28
29
  export declare const DEX_SUPPORT_CHAINS: {
29
30
  WrapToken: CHAINS_ENUM[];
31
+ Sushi: CHAINS_ENUM[];
30
32
  "1inch": CHAINS_ENUM[];
31
33
  ParaSwap: CHAINS_ENUM[];
32
34
  "0xAPI": CHAINS_ENUM[];
@@ -40,6 +42,33 @@ export declare const DEX_SUPPORT_CHAINS: {
40
42
  Uniswap: CHAINS_ENUM[];
41
43
  };
42
44
  export declare const DEX_ROUTER_WHITELIST: {
45
+ Sushi: {
46
+ [x: string]: string;
47
+ ETH: string;
48
+ OP: string;
49
+ CRO: string;
50
+ RSK: string;
51
+ BSC: string;
52
+ GNOSIS: string;
53
+ FUSE: string;
54
+ POLYGON: string;
55
+ MANTA: string;
56
+ FTM: string;
57
+ ERA: string;
58
+ METIS: string;
59
+ CORE: string;
60
+ KAVA: string;
61
+ MANTLE: string;
62
+ ZETA: string;
63
+ BASE: string;
64
+ MODE: string;
65
+ ARBITRUM: string;
66
+ CELO: string;
67
+ AVAX: string;
68
+ LINEA: string;
69
+ BLAST: string;
70
+ SCRL: string;
71
+ };
43
72
  "1inch": {
44
73
  ETH: string;
45
74
  POLYGON: string;
@@ -86,6 +115,7 @@ export declare const DEX_ROUTER_WHITELIST: {
86
115
  AURORA: string;
87
116
  BOBA: string;
88
117
  KAVA: string;
118
+ CELO: string;
89
119
  METIS: string;
90
120
  BASE: string;
91
121
  MANTLE: string;
@@ -192,6 +222,33 @@ export declare const DEX_ROUTER_WHITELIST: {
192
222
  };
193
223
  };
194
224
  export declare const DEX_SPENDER_WHITELIST: {
225
+ Sushi: {
226
+ [x: string]: string;
227
+ ETH: string;
228
+ OP: string;
229
+ CRO: string;
230
+ RSK: string;
231
+ BSC: string;
232
+ GNOSIS: string;
233
+ FUSE: string;
234
+ POLYGON: string;
235
+ MANTA: string;
236
+ FTM: string;
237
+ ERA: string;
238
+ METIS: string;
239
+ CORE: string;
240
+ KAVA: string;
241
+ MANTLE: string;
242
+ ZETA: string;
243
+ BASE: string;
244
+ MODE: string;
245
+ ARBITRUM: string;
246
+ CELO: string;
247
+ AVAX: string;
248
+ LINEA: string;
249
+ BLAST: string;
250
+ SCRL: string;
251
+ };
195
252
  "1inch": {
196
253
  ETH: string;
197
254
  POLYGON: string;
@@ -239,6 +296,7 @@ export declare const DEX_SPENDER_WHITELIST: {
239
296
  AURORA: string;
240
297
  BOBA: string;
241
298
  KAVA: string;
299
+ CELO: string;
242
300
  METIS: string;
243
301
  BASE: string;
244
302
  MANTLE: string;
package/dist/list.js CHANGED
@@ -10,6 +10,7 @@ import { SUPPORT_CHAINS as odosSupportChains } from "./dexs/odos";
10
10
  import { SUPPORT_CHAINS as zeroXV2SupportChains } from "./dexs/0xapi_v2";
11
11
  import { SUPPORT_CHAINS as magpieSupportChains } from "./dexs/magpie";
12
12
  import { SUPPORT_CHAINS as rabbySupportChains } from "./dexs/rabby";
13
+ import { SUPPORT_CHAINS as sushiSupportChains } from "./dexs/sushi";
13
14
  import { SUPPORT_CHAINS as uniSupportChains } from "./dexs/uni";
14
15
  import { DEX_ENUM } from "./consts";
15
16
  export const WrapTokenAddressMap = {
@@ -50,11 +51,13 @@ export const WrapTokenAddressMap = {
50
51
  ["PLASMA"]: "0x6100e367285b01f48d07953803a2d8dca5d19873",
51
52
  ["MONAD"]: "0x3bd359c1119da7da1d913d1c4d2b7c461115433a",
52
53
  [CHAINS_ENUM.RSK]: "0x967f8799aF07DF1534d48A95a5C9FEBE92c53ae0",
54
+ [CHAINS_ENUM.KAVA]: "0xc86c7C0eFbd6A49B35E8714C5f59D99De09A225b",
55
+ [CHAINS_ENUM.ZETA]: "0x5f0b1a82749cb4e2278ec87f8bf6b618dc71a8bf",
53
56
  ["MEGAETH"]: "0x4200000000000000000000000000000000000006",
54
- [CHAINS_ENUM.KAVA]: "0xc86c7c0efbd6a49b35e8714c5f59d99de09a225b",
55
57
  };
56
58
  export const DEX_SUPPORT_CHAINS = {
57
59
  [DEX_ENUM.WRAPTOKEN]: wrapTokenSupportChains,
60
+ [DEX_ENUM.SUSHI]: sushiSupportChains,
58
61
  [DEX_ENUM.ONEINCH]: oneInchSupportChains,
59
62
  [DEX_ENUM.PARASWAP]: paraswapSupportChains,
60
63
  [DEX_ENUM.ZEROXAPI]: zeroXSupportChains,
@@ -68,6 +71,43 @@ export const DEX_SUPPORT_CHAINS = {
68
71
  [DEX_ENUM.UNI]: uniSupportChains,
69
72
  };
70
73
  export const DEX_ROUTER_WHITELIST = {
74
+ [DEX_ENUM.SUSHI]: {
75
+ [CHAINS_ENUM.ETH]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
76
+ [CHAINS_ENUM.OP]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
77
+ [CHAINS_ENUM.CRO]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
78
+ [CHAINS_ENUM.RSK]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
79
+ [CHAINS_ENUM.BSC]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
80
+ [CHAINS_ENUM.GNOSIS]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
81
+ [CHAINS_ENUM.FUSE]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
82
+ [CHAINS_ENUM.POLYGON]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
83
+ [CHAINS_ENUM.MANTA]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
84
+ [CHAINS_ENUM.FTM]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
85
+ [CHAINS_ENUM.ERA]: "0x35e98c2b3894d71d3d4d7edb8b30e4f36e2f9179",
86
+ [CHAINS_ENUM.METIS]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
87
+ [CHAINS_ENUM.CORE]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
88
+ [CHAINS_ENUM.KAVA]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
89
+ [CHAINS_ENUM.MANTLE]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
90
+ [CHAINS_ENUM.ZETA]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
91
+ [CHAINS_ENUM.BASE]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
92
+ [CHAINS_ENUM.MODE]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
93
+ [CHAINS_ENUM.ARBITRUM]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
94
+ [CHAINS_ENUM.CELO]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
95
+ [CHAINS_ENUM.AVAX]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
96
+ [CHAINS_ENUM.LINEA]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
97
+ [CHAINS_ENUM.BLAST]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
98
+ [CHAINS_ENUM.SCRL]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
99
+ ["MONAD"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
100
+ ["SONIC"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
101
+ ["XLAYER"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
102
+ ["HYPER"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
103
+ ["MEGAETH"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
104
+ ["PLASMA"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
105
+ ["APE"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
106
+ ["HEMI"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
107
+ ["BERA"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
108
+ ["TAIKO"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
109
+ ["KATANA"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
110
+ },
71
111
  [DEX_ENUM.ONEINCH]: {
72
112
  [CHAINS_ENUM.ETH]: "0x111111125421ca6dc452d289314280a0f8842a65",
73
113
  [CHAINS_ENUM.POLYGON]: "0x111111125421ca6dc452d289314280a0f8842a65",
@@ -113,6 +153,7 @@ export const DEX_ROUTER_WHITELIST = {
113
153
  [CHAINS_ENUM.AURORA]: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
114
154
  [CHAINS_ENUM.BOBA]: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
115
155
  [CHAINS_ENUM.KAVA]: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
156
+ [CHAINS_ENUM.CELO]: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
116
157
  [CHAINS_ENUM.METIS]: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
117
158
  [CHAINS_ENUM.BASE]: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
118
159
  ["SONIC"]: "0x6352a56caadc4f1e25cd6c75970fa768a3304e64",
@@ -229,6 +270,8 @@ export const DEX_ROUTER_WHITELIST = {
229
270
  ["MONAD"]: "0x20f6ee51340adeed01a59b0e65cb3703f3dc860c",
230
271
  ["STABLE"]: "0x20f6ee51340adeed01a59b0e65cb3703f3dc860c",
231
272
  ["MEGAETH"]: "0x20f6ee51340adeed01a59b0e65cb3703f3dc860c",
273
+ ["KATANA"]: "0x20f6ee51340adeed01a59b0e65cb3703f3dc860c",
274
+ ["TEMPO"]: "0x20f6ee51340adeed01a59b0e65cb3703f3dc860c",
232
275
  },
233
276
  [DEX_ENUM.RABBY]: {
234
277
  [CHAINS_ENUM.ETH]: "0x7fd9cfeef127451918c688c49e9905e47da3e985",
@@ -250,6 +293,43 @@ export const DEX_ROUTER_WHITELIST = {
250
293
  },
251
294
  };
252
295
  export const DEX_SPENDER_WHITELIST = {
296
+ [DEX_ENUM.SUSHI]: {
297
+ [CHAINS_ENUM.ETH]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
298
+ [CHAINS_ENUM.OP]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
299
+ [CHAINS_ENUM.CRO]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
300
+ [CHAINS_ENUM.RSK]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
301
+ [CHAINS_ENUM.BSC]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
302
+ [CHAINS_ENUM.GNOSIS]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
303
+ [CHAINS_ENUM.FUSE]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
304
+ [CHAINS_ENUM.POLYGON]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
305
+ [CHAINS_ENUM.MANTA]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
306
+ [CHAINS_ENUM.FTM]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
307
+ [CHAINS_ENUM.ERA]: "0x35e98c2b3894d71d3d4d7edb8b30e4f36e2f9179",
308
+ [CHAINS_ENUM.METIS]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
309
+ [CHAINS_ENUM.CORE]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
310
+ [CHAINS_ENUM.KAVA]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
311
+ [CHAINS_ENUM.MANTLE]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
312
+ [CHAINS_ENUM.ZETA]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
313
+ [CHAINS_ENUM.BASE]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
314
+ [CHAINS_ENUM.MODE]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
315
+ [CHAINS_ENUM.ARBITRUM]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
316
+ [CHAINS_ENUM.CELO]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
317
+ [CHAINS_ENUM.AVAX]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
318
+ [CHAINS_ENUM.LINEA]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
319
+ [CHAINS_ENUM.BLAST]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
320
+ [CHAINS_ENUM.SCRL]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
321
+ ["MONAD"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
322
+ ["SONIC"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
323
+ ["XLAYER"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
324
+ ["HYPER"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
325
+ ["MEGAETH"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
326
+ ["PLASMA"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
327
+ ["APE"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
328
+ ["HEMI"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
329
+ ["BERA"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
330
+ ["TAIKO"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
331
+ ["KATANA"]: "0xac4c6e212a361c968f1725b4d055b47e63f80b75",
332
+ },
253
333
  [DEX_ENUM.ONEINCH]: {
254
334
  [CHAINS_ENUM.ETH]: "0x111111125421ca6dc452d289314280a0f8842a65",
255
335
  [CHAINS_ENUM.POLYGON]: "0x111111125421ca6dc452d289314280a0f8842a65",
@@ -296,6 +376,7 @@ export const DEX_SPENDER_WHITELIST = {
296
376
  [CHAINS_ENUM.AURORA]: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
297
377
  [CHAINS_ENUM.BOBA]: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
298
378
  [CHAINS_ENUM.KAVA]: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
379
+ [CHAINS_ENUM.CELO]: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
299
380
  [CHAINS_ENUM.METIS]: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
300
381
  [CHAINS_ENUM.BASE]: "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
301
382
  ["SONIC"]: "0x6352a56caadc4f1e25cd6c75970fa768a3304e64",
@@ -412,6 +493,8 @@ export const DEX_SPENDER_WHITELIST = {
412
493
  ["MONAD"]: "0x20f6ee51340adeed01a59b0e65cb3703f3dc860c",
413
494
  ["STABLE"]: "0x20f6ee51340adeed01a59b0e65cb3703f3dc860c",
414
495
  ["MEGAETH"]: "0x20f6ee51340adeed01a59b0e65cb3703f3dc860c",
496
+ ["KATANA"]: "0x20f6ee51340adeed01a59b0e65cb3703f3dc860c",
497
+ ["TEMPO"]: "0x20f6ee51340adeed01a59b0e65cb3703f3dc860c",
415
498
  },
416
499
  [DEX_ENUM.RABBY]: {
417
500
  [CHAINS_ENUM.ETH]: "0x7fd9cfeef127451918c688c49e9905e47da3e985",
package/dist/quote.js CHANGED
@@ -20,6 +20,7 @@ import { getQuote as zeroXV2GetQuote, decodeCalldata as zeroXV2DecodeCalldata, }
20
20
  import { getQuote as magpieGetQuote, decodeCalldata as magpieDecodeCalldata, } from "./dexs/magpie";
21
21
  import { getQuote as rabbyGetQuote, decodeCalldata as rabbyDecodeCalldata, } from "./dexs/rabby";
22
22
  import { getQuote as uniGetQuote, decodeCalldata as uniDecodeCalldata, } from "./dexs/uni";
23
+ import { getQuote as sushiGetQuote, decodeCalldata as sushiDecodeCalldata, } from "./dexs/sushi";
23
24
  export const getQuote = (id, params, api) => __awaiter(void 0, void 0, void 0, function* () {
24
25
  switch (id) {
25
26
  case DEX_ENUM.WRAPTOKEN:
@@ -44,6 +45,8 @@ export const getQuote = (id, params, api) => __awaiter(void 0, void 0, void 0, f
44
45
  return yield magpieGetQuote(params, api);
45
46
  case DEX_ENUM.RABBY:
46
47
  return yield rabbyGetQuote(params, api);
48
+ case DEX_ENUM.SUSHI:
49
+ return yield sushiGetQuote(params, api);
47
50
  case DEX_ENUM.UNI:
48
51
  return yield uniGetQuote(params, api);
49
52
  default:
@@ -72,6 +75,8 @@ export const decodeCalldata = (id, tx) => {
72
75
  return magpieDecodeCalldata(tx);
73
76
  case DEX_ENUM.RABBY:
74
77
  return rabbyDecodeCalldata(tx);
78
+ case DEX_ENUM.SUSHI:
79
+ return sushiDecodeCalldata(tx);
75
80
  case DEX_ENUM.UNI:
76
81
  return uniDecodeCalldata(tx);
77
82
  default:
package/dist/utils.d.ts CHANGED
@@ -5,6 +5,6 @@ import { DEX_ENUM } from "./consts";
5
5
  export declare const isSameAddress: (addr1: string, addr2: string) => boolean;
6
6
  export declare const generateGetQuote: ({ SUPPORT_CHAINS, id, dex, }: {
7
7
  SUPPORT_CHAINS: CHAINS_ENUM[];
8
- id: "matcha" | "matcha_v2" | "openocean" | "1inch_v6" | "paraswap" | "kyberswap" | "odos" | "paraswap_v6" | "magpie" | "rabby" | "uni";
8
+ id: "matcha" | "matcha_v2" | "openocean" | "1inch_v6" | "paraswap" | "kyberswap" | "odos" | "paraswap_v6" | "magpie" | "sushi" | "rabby" | "uni";
9
9
  dex: DEX_ENUM;
10
10
  }) => (options: QuoteParams, api: OpenApiService) => Promise<QuoteResult>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-swap",
3
- "version": "0.0.77-beta.0",
3
+ "version": "0.0.77-beta.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {