@rabby-wallet/rabby-swap 0.0.30 → 0.0.32-alpha.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/dist/dexs/1inch.js +2 -1
- package/dist/dexs/paraswap.js +1 -1
- package/dist/list.d.ts +5 -0
- package/dist/list.js +25 -20
- package/dist/utils.d.ts +1 -1
- package/package.json +1 -1
package/dist/dexs/1inch.js
CHANGED
|
@@ -15,10 +15,11 @@ export const SUPPORT_CHAINS = [
|
|
|
15
15
|
CHAINS_ENUM.KLAY,
|
|
16
16
|
CHAINS_ENUM.GNOSIS,
|
|
17
17
|
CHAINS_ENUM.BASE,
|
|
18
|
+
CHAINS_ENUM.ERA,
|
|
18
19
|
];
|
|
19
20
|
export const getQuote = generateGetQuote({
|
|
20
21
|
SUPPORT_CHAINS,
|
|
21
|
-
id: "
|
|
22
|
+
id: "1inch_v6",
|
|
22
23
|
dex: DEX_ENUM.ONEINCH,
|
|
23
24
|
});
|
|
24
25
|
export const decodeCalldata = (tx) => {
|
package/dist/dexs/paraswap.js
CHANGED
package/dist/list.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare const WrapTokenAddressMap: {
|
|
|
15
15
|
BTT: string;
|
|
16
16
|
ROSE: string;
|
|
17
17
|
BASE: string;
|
|
18
|
+
ERA: string;
|
|
18
19
|
};
|
|
19
20
|
export declare const DEX_SUPPORT_CHAINS: {
|
|
20
21
|
WrapToken: CHAINS_ENUM[];
|
|
@@ -37,6 +38,8 @@ export declare const DEX_ROUTER_WHITELIST: {
|
|
|
37
38
|
KLAY: string;
|
|
38
39
|
GNOSIS: string;
|
|
39
40
|
CELO: string;
|
|
41
|
+
BASE: string;
|
|
42
|
+
ERA: string;
|
|
40
43
|
};
|
|
41
44
|
ParaSwap: {
|
|
42
45
|
ETH: string;
|
|
@@ -109,6 +112,8 @@ export declare const DEX_SPENDER_WHITELIST: {
|
|
|
109
112
|
KLAY: string;
|
|
110
113
|
GNOSIS: string;
|
|
111
114
|
CELO: string;
|
|
115
|
+
BASE: string;
|
|
116
|
+
ERA: string;
|
|
112
117
|
};
|
|
113
118
|
ParaSwap: {
|
|
114
119
|
ETH: string;
|
package/dist/list.js
CHANGED
|
@@ -23,6 +23,7 @@ export const WrapTokenAddressMap = {
|
|
|
23
23
|
[CHAINS_ENUM.BTT]: "0x23181f21dea5936e24163ffaba4ea3b316b57f3c",
|
|
24
24
|
[CHAINS_ENUM.ROSE]: "0x21c718c22d52d0f3a789b752d4c2fd5908a8a733",
|
|
25
25
|
[CHAINS_ENUM.BASE]: "0x4200000000000000000000000000000000000006",
|
|
26
|
+
[CHAINS_ENUM.ERA]: "0x5aea5775959fbc2557cc8789bc1bf90a239d9a91",
|
|
26
27
|
};
|
|
27
28
|
export const DEX_SUPPORT_CHAINS = {
|
|
28
29
|
[DEX_ENUM.WRAPTOKEN]: wrapTokenSupportChains,
|
|
@@ -35,16 +36,18 @@ export const DEX_SUPPORT_CHAINS = {
|
|
|
35
36
|
};
|
|
36
37
|
export const DEX_ROUTER_WHITELIST = {
|
|
37
38
|
[DEX_ENUM.ONEINCH]: {
|
|
38
|
-
[CHAINS_ENUM.ETH]: "
|
|
39
|
-
[CHAINS_ENUM.POLYGON]: "
|
|
40
|
-
[CHAINS_ENUM.BSC]: "
|
|
41
|
-
[CHAINS_ENUM.OP]: "
|
|
42
|
-
[CHAINS_ENUM.FTM]: "
|
|
43
|
-
[CHAINS_ENUM.AVAX]: "
|
|
44
|
-
[CHAINS_ENUM.ARBITRUM]: "
|
|
45
|
-
[CHAINS_ENUM.KLAY]: "
|
|
46
|
-
[CHAINS_ENUM.GNOSIS]: "
|
|
47
|
-
[CHAINS_ENUM.CELO]: "
|
|
39
|
+
[CHAINS_ENUM.ETH]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
40
|
+
[CHAINS_ENUM.POLYGON]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
41
|
+
[CHAINS_ENUM.BSC]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
42
|
+
[CHAINS_ENUM.OP]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
43
|
+
[CHAINS_ENUM.FTM]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
44
|
+
[CHAINS_ENUM.AVAX]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
45
|
+
[CHAINS_ENUM.ARBITRUM]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
46
|
+
[CHAINS_ENUM.KLAY]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
47
|
+
[CHAINS_ENUM.GNOSIS]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
48
|
+
[CHAINS_ENUM.CELO]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
49
|
+
[CHAINS_ENUM.BASE]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
50
|
+
[CHAINS_ENUM.ERA]: "0x6fd4383cb451173d5f9304f041c7bcbf27d561ff",
|
|
48
51
|
},
|
|
49
52
|
[DEX_ENUM.PARASWAP]: {
|
|
50
53
|
[CHAINS_ENUM.ETH]: "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
|
|
@@ -107,16 +110,18 @@ export const DEX_ROUTER_WHITELIST = {
|
|
|
107
110
|
};
|
|
108
111
|
export const DEX_SPENDER_WHITELIST = {
|
|
109
112
|
[DEX_ENUM.ONEINCH]: {
|
|
110
|
-
[CHAINS_ENUM.ETH]: "
|
|
111
|
-
[CHAINS_ENUM.POLYGON]: "
|
|
112
|
-
[CHAINS_ENUM.BSC]: "
|
|
113
|
-
[CHAINS_ENUM.OP]: "
|
|
114
|
-
[CHAINS_ENUM.FTM]: "
|
|
115
|
-
[CHAINS_ENUM.AVAX]: "
|
|
116
|
-
[CHAINS_ENUM.ARBITRUM]: "
|
|
117
|
-
[CHAINS_ENUM.KLAY]: "
|
|
118
|
-
[CHAINS_ENUM.GNOSIS]: "
|
|
119
|
-
[CHAINS_ENUM.CELO]: "
|
|
113
|
+
[CHAINS_ENUM.ETH]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
114
|
+
[CHAINS_ENUM.POLYGON]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
115
|
+
[CHAINS_ENUM.BSC]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
116
|
+
[CHAINS_ENUM.OP]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
117
|
+
[CHAINS_ENUM.FTM]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
118
|
+
[CHAINS_ENUM.AVAX]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
119
|
+
[CHAINS_ENUM.ARBITRUM]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
120
|
+
[CHAINS_ENUM.KLAY]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
121
|
+
[CHAINS_ENUM.GNOSIS]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
122
|
+
[CHAINS_ENUM.CELO]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
123
|
+
[CHAINS_ENUM.BASE]: "0x111111125421ca6dc452d289314280a0f8842a65",
|
|
124
|
+
[CHAINS_ENUM.ERA]: "0x6fd4383cb451173d5f9304f041c7bcbf27d561ff",
|
|
120
125
|
},
|
|
121
126
|
[DEX_ENUM.PARASWAP]: {
|
|
122
127
|
[CHAINS_ENUM.ETH]: "0x216b4b4ba9f3e719726886d34a177484278bfcae",
|
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: "uniswap3" | "matcha" | "openocean" | "
|
|
8
|
+
id: "uniswap3" | "matcha" | "openocean" | "1inch_v6" | "paraswap_v6" | "kyberswap";
|
|
9
9
|
dex: DEX_ENUM;
|
|
10
10
|
}) => (options: QuoteParams, api: OpenApiService) => Promise<QuoteResult>;
|