@rabby-wallet/rabby-swap 0.0.31 → 0.0.32-alpha.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/dexs/1inch.js +2 -1
- package/dist/dexs/paraswap.js +1 -1
- package/dist/dexs/wrapToken.js +1 -0
- package/dist/list.d.ts +3 -0
- package/dist/list.js +25 -22
- 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/dexs/wrapToken.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[];
|
|
@@ -38,6 +39,7 @@ export declare const DEX_ROUTER_WHITELIST: {
|
|
|
38
39
|
GNOSIS: string;
|
|
39
40
|
CELO: string;
|
|
40
41
|
BASE: string;
|
|
42
|
+
ERA: string;
|
|
41
43
|
};
|
|
42
44
|
ParaSwap: {
|
|
43
45
|
ETH: string;
|
|
@@ -111,6 +113,7 @@ export declare const DEX_SPENDER_WHITELIST: {
|
|
|
111
113
|
GNOSIS: string;
|
|
112
114
|
CELO: string;
|
|
113
115
|
BASE: string;
|
|
116
|
+
ERA: string;
|
|
114
117
|
};
|
|
115
118
|
ParaSwap: {
|
|
116
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,17 +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]: "
|
|
48
|
-
[CHAINS_ENUM.BASE]: "
|
|
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",
|
|
49
51
|
},
|
|
50
52
|
[DEX_ENUM.PARASWAP]: {
|
|
51
53
|
[CHAINS_ENUM.ETH]: "0xdef171fe48cf0115b1d80b88dc8eab59176fee57",
|
|
@@ -108,17 +110,18 @@ export const DEX_ROUTER_WHITELIST = {
|
|
|
108
110
|
};
|
|
109
111
|
export const DEX_SPENDER_WHITELIST = {
|
|
110
112
|
[DEX_ENUM.ONEINCH]: {
|
|
111
|
-
[CHAINS_ENUM.ETH]: "
|
|
112
|
-
[CHAINS_ENUM.POLYGON]: "
|
|
113
|
-
[CHAINS_ENUM.BSC]: "
|
|
114
|
-
[CHAINS_ENUM.OP]: "
|
|
115
|
-
[CHAINS_ENUM.FTM]: "
|
|
116
|
-
[CHAINS_ENUM.AVAX]: "
|
|
117
|
-
[CHAINS_ENUM.ARBITRUM]: "
|
|
118
|
-
[CHAINS_ENUM.KLAY]: "
|
|
119
|
-
[CHAINS_ENUM.GNOSIS]: "
|
|
120
|
-
[CHAINS_ENUM.CELO]: "
|
|
121
|
-
[CHAINS_ENUM.BASE]: "
|
|
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",
|
|
122
125
|
},
|
|
123
126
|
[DEX_ENUM.PARASWAP]: {
|
|
124
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>;
|