@swapkit/core 1.0.0-rc.17 → 1.0.0-rc.170
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/index.js +3 -0
- package/dist/index.js.map +37 -0
- package/package.json +26 -49
- package/src/__tests__/helpers.test.ts +65 -0
- package/src/aggregator/contracts/avaxGeneric.ts +50 -50
- package/src/aggregator/contracts/avaxWoofi.ts +80 -80
- package/src/aggregator/contracts/bscGeneric.ts +59 -59
- package/src/aggregator/contracts/ethGeneric.ts +50 -50
- package/src/aggregator/contracts/index.ts +30 -28
- package/src/aggregator/contracts/pancakeV2.ts +80 -80
- package/src/aggregator/contracts/pangolin.ts +65 -65
- package/src/aggregator/contracts/routers/index.ts +58 -0
- package/src/aggregator/contracts/routers/kyber.ts +402 -0
- package/src/aggregator/contracts/routers/oneinch.ts +2188 -0
- package/src/aggregator/contracts/routers/pancakeswap.ts +340 -0
- package/src/aggregator/contracts/routers/pangolin.ts +340 -0
- package/src/aggregator/contracts/routers/sushiswap.ts +340 -0
- package/src/aggregator/contracts/routers/traderJoe.ts +340 -0
- package/src/aggregator/contracts/routers/uniswapv2.ts +340 -0
- package/src/aggregator/contracts/routers/uniswapv3.ts +254 -0
- package/src/aggregator/contracts/routers/woofi.ts +171 -0
- package/src/aggregator/contracts/sushiswap.ts +65 -65
- package/src/aggregator/contracts/traderJoe.ts +65 -65
- package/src/aggregator/contracts/uniswapV2.ts +65 -65
- package/src/aggregator/contracts/uniswapV2Leg.ts +70 -70
- package/src/aggregator/contracts/uniswapV3_100.ts +70 -70
- package/src/aggregator/contracts/uniswapV3_10000.ts +70 -70
- package/src/aggregator/contracts/uniswapV3_3000.ts +70 -70
- package/src/aggregator/contracts/uniswapV3_500.ts +70 -70
- package/src/aggregator/getSwapParams.ts +12 -12
- package/src/client.ts +438 -0
- package/src/helpers/explorerUrls.ts +45 -0
- package/src/index.ts +6 -4
- package/src/types.ts +44 -0
- package/LICENSE +0 -201
- package/dist/index-9e36735e.cjs +0 -1
- package/dist/index-cf1865cd.js +0 -649
- package/dist/index.cjs +0 -2
- package/dist/index.d.ts +0 -216
- package/dist/index.es.js +0 -4181
- package/src/client/__tests__/helpers.test.ts +0 -69
- package/src/client/explorerUrls.ts +0 -62
- package/src/client/index.ts +0 -699
- package/src/client/thornode.ts +0 -31
- package/src/client/types.ts +0 -103
|
@@ -1,145 +1,145 @@
|
|
|
1
1
|
export const pancakeV2 = [
|
|
2
2
|
{
|
|
3
3
|
inputs: [
|
|
4
|
-
{ internalType:
|
|
5
|
-
{ internalType:
|
|
6
|
-
{ internalType:
|
|
4
|
+
{ internalType: "address", name: "_ttp", type: "address" },
|
|
5
|
+
{ internalType: "address", name: "_wbnb", type: "address" },
|
|
6
|
+
{ internalType: "address", name: "_swapRouter", type: "address" },
|
|
7
7
|
],
|
|
8
|
-
stateMutability:
|
|
9
|
-
type:
|
|
8
|
+
stateMutability: "nonpayable",
|
|
9
|
+
type: "constructor",
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
anonymous: false,
|
|
13
13
|
inputs: [
|
|
14
|
-
{ indexed: false, internalType:
|
|
15
|
-
{ indexed: false, internalType:
|
|
14
|
+
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
15
|
+
{ indexed: false, internalType: "address", name: "feeRecipient", type: "address" },
|
|
16
16
|
],
|
|
17
|
-
name:
|
|
18
|
-
type:
|
|
17
|
+
name: "FeeSet",
|
|
18
|
+
type: "event",
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
anonymous: false,
|
|
22
22
|
inputs: [
|
|
23
|
-
{ indexed: true, internalType:
|
|
24
|
-
{ indexed: false, internalType:
|
|
23
|
+
{ indexed: true, internalType: "address", name: "owner", type: "address" },
|
|
24
|
+
{ indexed: false, internalType: "bool", name: "active", type: "bool" },
|
|
25
25
|
],
|
|
26
|
-
name:
|
|
27
|
-
type:
|
|
26
|
+
name: "OwnerSet",
|
|
27
|
+
type: "event",
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
anonymous: false,
|
|
31
31
|
inputs: [
|
|
32
|
-
{ indexed: false, internalType:
|
|
33
|
-
{ indexed: false, internalType:
|
|
34
|
-
{ indexed: false, internalType:
|
|
35
|
-
{ indexed: false, internalType:
|
|
36
|
-
{ indexed: false, internalType:
|
|
37
|
-
{ indexed: false, internalType:
|
|
38
|
-
{ indexed: false, internalType:
|
|
32
|
+
{ indexed: false, internalType: "address", name: "from", type: "address" },
|
|
33
|
+
{ indexed: false, internalType: "address", name: "token", type: "address" },
|
|
34
|
+
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
|
|
35
|
+
{ indexed: false, internalType: "uint256", name: "out", type: "uint256" },
|
|
36
|
+
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
37
|
+
{ indexed: false, internalType: "address", name: "vault", type: "address" },
|
|
38
|
+
{ indexed: false, internalType: "string", name: "memo", type: "string" },
|
|
39
39
|
],
|
|
40
|
-
name:
|
|
41
|
-
type:
|
|
40
|
+
name: "SwapIn",
|
|
41
|
+
type: "event",
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
anonymous: false,
|
|
45
45
|
inputs: [
|
|
46
|
-
{ indexed: false, internalType:
|
|
47
|
-
{ indexed: false, internalType:
|
|
48
|
-
{ indexed: false, internalType:
|
|
49
|
-
{ indexed: false, internalType:
|
|
46
|
+
{ indexed: false, internalType: "address", name: "to", type: "address" },
|
|
47
|
+
{ indexed: false, internalType: "address", name: "token", type: "address" },
|
|
48
|
+
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
|
|
49
|
+
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
50
50
|
],
|
|
51
|
-
name:
|
|
52
|
-
type:
|
|
51
|
+
name: "SwapOut",
|
|
52
|
+
type: "event",
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
inputs: [],
|
|
56
|
-
name:
|
|
57
|
-
outputs: [{ internalType:
|
|
58
|
-
stateMutability:
|
|
59
|
-
type:
|
|
56
|
+
name: "fee",
|
|
57
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
58
|
+
stateMutability: "view",
|
|
59
|
+
type: "function",
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
inputs: [],
|
|
63
|
-
name:
|
|
64
|
-
outputs: [{ internalType:
|
|
65
|
-
stateMutability:
|
|
66
|
-
type:
|
|
63
|
+
name: "feeRecipient",
|
|
64
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
65
|
+
stateMutability: "view",
|
|
66
|
+
type: "function",
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
|
-
inputs: [{ internalType:
|
|
70
|
-
name:
|
|
71
|
-
outputs: [{ internalType:
|
|
72
|
-
stateMutability:
|
|
73
|
-
type:
|
|
69
|
+
inputs: [{ internalType: "address", name: "", type: "address" }],
|
|
70
|
+
name: "owners",
|
|
71
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
72
|
+
stateMutability: "view",
|
|
73
|
+
type: "function",
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
inputs: [
|
|
77
|
-
{ internalType:
|
|
78
|
-
{ internalType:
|
|
77
|
+
{ internalType: "uint256", name: "_fee", type: "uint256" },
|
|
78
|
+
{ internalType: "address", name: "_feeRecipient", type: "address" },
|
|
79
79
|
],
|
|
80
|
-
name:
|
|
80
|
+
name: "setFee",
|
|
81
81
|
outputs: [],
|
|
82
|
-
stateMutability:
|
|
83
|
-
type:
|
|
82
|
+
stateMutability: "nonpayable",
|
|
83
|
+
type: "function",
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
inputs: [
|
|
87
|
-
{ internalType:
|
|
88
|
-
{ internalType:
|
|
87
|
+
{ internalType: "address", name: "owner", type: "address" },
|
|
88
|
+
{ internalType: "bool", name: "active", type: "bool" },
|
|
89
89
|
],
|
|
90
|
-
name:
|
|
90
|
+
name: "setOwner",
|
|
91
91
|
outputs: [],
|
|
92
|
-
stateMutability:
|
|
93
|
-
type:
|
|
92
|
+
stateMutability: "nonpayable",
|
|
93
|
+
type: "function",
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
inputs: [
|
|
97
|
-
{ internalType:
|
|
98
|
-
{ internalType:
|
|
99
|
-
{ internalType:
|
|
100
|
-
{ internalType:
|
|
101
|
-
{ internalType:
|
|
102
|
-
{ internalType:
|
|
103
|
-
{ internalType:
|
|
97
|
+
{ internalType: "address", name: "router", type: "address" },
|
|
98
|
+
{ internalType: "address", name: "vault", type: "address" },
|
|
99
|
+
{ internalType: "string", name: "memo", type: "string" },
|
|
100
|
+
{ internalType: "address", name: "token", type: "address" },
|
|
101
|
+
{ internalType: "uint256", name: "amount", type: "uint256" },
|
|
102
|
+
{ internalType: "uint256", name: "amountOutMin", type: "uint256" },
|
|
103
|
+
{ internalType: "uint256", name: "deadline", type: "uint256" },
|
|
104
104
|
],
|
|
105
|
-
name:
|
|
105
|
+
name: "swapIn",
|
|
106
106
|
outputs: [],
|
|
107
|
-
stateMutability:
|
|
108
|
-
type:
|
|
107
|
+
stateMutability: "nonpayable",
|
|
108
|
+
type: "function",
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
inputs: [
|
|
112
|
-
{ internalType:
|
|
113
|
-
{ internalType:
|
|
114
|
-
{ internalType:
|
|
112
|
+
{ internalType: "address", name: "token", type: "address" },
|
|
113
|
+
{ internalType: "address", name: "to", type: "address" },
|
|
114
|
+
{ internalType: "uint256", name: "amountOutMin", type: "uint256" },
|
|
115
115
|
],
|
|
116
|
-
name:
|
|
116
|
+
name: "swapOut",
|
|
117
117
|
outputs: [],
|
|
118
|
-
stateMutability:
|
|
119
|
-
type:
|
|
118
|
+
stateMutability: "payable",
|
|
119
|
+
type: "function",
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
inputs: [],
|
|
123
|
-
name:
|
|
124
|
-
outputs: [{ internalType:
|
|
125
|
-
stateMutability:
|
|
126
|
-
type:
|
|
123
|
+
name: "swapRouter",
|
|
124
|
+
outputs: [{ internalType: "contract IPancakeRouterV2", name: "", type: "address" }],
|
|
125
|
+
stateMutability: "view",
|
|
126
|
+
type: "function",
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
inputs: [],
|
|
130
|
-
name:
|
|
130
|
+
name: "tokenTransferProxy",
|
|
131
131
|
outputs: [
|
|
132
|
-
{ internalType:
|
|
132
|
+
{ internalType: "contract TSAggregatorTokenTransferProxy", name: "", type: "address" },
|
|
133
133
|
],
|
|
134
|
-
stateMutability:
|
|
135
|
-
type:
|
|
134
|
+
stateMutability: "view",
|
|
135
|
+
type: "function",
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
inputs: [],
|
|
139
|
-
name:
|
|
140
|
-
outputs: [{ internalType:
|
|
141
|
-
stateMutability:
|
|
142
|
-
type:
|
|
139
|
+
name: "wbnb",
|
|
140
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
141
|
+
stateMutability: "view",
|
|
142
|
+
type: "function",
|
|
143
143
|
},
|
|
144
|
-
{ stateMutability:
|
|
144
|
+
{ stateMutability: "payable", type: "receive" },
|
|
145
145
|
];
|
|
@@ -1,120 +1,120 @@
|
|
|
1
1
|
export const pangolin = [
|
|
2
2
|
{
|
|
3
3
|
inputs: [
|
|
4
|
-
{ internalType:
|
|
5
|
-
{ internalType:
|
|
6
|
-
{ internalType:
|
|
4
|
+
{ internalType: "address", name: "_ttp", type: "address" },
|
|
5
|
+
{ internalType: "address", name: "_weth", type: "address" },
|
|
6
|
+
{ internalType: "address", name: "_swapRouter", type: "address" },
|
|
7
7
|
],
|
|
8
|
-
stateMutability:
|
|
9
|
-
type:
|
|
8
|
+
stateMutability: "nonpayable",
|
|
9
|
+
type: "constructor",
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
anonymous: false,
|
|
13
13
|
inputs: [
|
|
14
|
-
{ indexed: false, internalType:
|
|
15
|
-
{ indexed: false, internalType:
|
|
14
|
+
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
15
|
+
{ indexed: false, internalType: "address", name: "feeRecipient", type: "address" },
|
|
16
16
|
],
|
|
17
|
-
name:
|
|
18
|
-
type:
|
|
17
|
+
name: "FeeSet",
|
|
18
|
+
type: "event",
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
anonymous: false,
|
|
22
22
|
inputs: [
|
|
23
|
-
{ indexed: true, internalType:
|
|
24
|
-
{ indexed: false, internalType:
|
|
23
|
+
{ indexed: true, internalType: "address", name: "owner", type: "address" },
|
|
24
|
+
{ indexed: false, internalType: "bool", name: "active", type: "bool" },
|
|
25
25
|
],
|
|
26
|
-
name:
|
|
27
|
-
type:
|
|
26
|
+
name: "OwnerSet",
|
|
27
|
+
type: "event",
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
inputs: [],
|
|
31
|
-
name:
|
|
32
|
-
outputs: [{ internalType:
|
|
33
|
-
stateMutability:
|
|
34
|
-
type:
|
|
31
|
+
name: "fee",
|
|
32
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
33
|
+
stateMutability: "view",
|
|
34
|
+
type: "function",
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
inputs: [],
|
|
38
|
-
name:
|
|
39
|
-
outputs: [{ internalType:
|
|
40
|
-
stateMutability:
|
|
41
|
-
type:
|
|
38
|
+
name: "feeRecipient",
|
|
39
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
40
|
+
stateMutability: "view",
|
|
41
|
+
type: "function",
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
|
-
inputs: [{ internalType:
|
|
45
|
-
name:
|
|
46
|
-
outputs: [{ internalType:
|
|
47
|
-
stateMutability:
|
|
48
|
-
type:
|
|
44
|
+
inputs: [{ internalType: "address", name: "", type: "address" }],
|
|
45
|
+
name: "owners",
|
|
46
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
47
|
+
stateMutability: "view",
|
|
48
|
+
type: "function",
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
inputs: [
|
|
52
|
-
{ internalType:
|
|
53
|
-
{ internalType:
|
|
52
|
+
{ internalType: "uint256", name: "_fee", type: "uint256" },
|
|
53
|
+
{ internalType: "address", name: "_feeRecipient", type: "address" },
|
|
54
54
|
],
|
|
55
|
-
name:
|
|
55
|
+
name: "setFee",
|
|
56
56
|
outputs: [],
|
|
57
|
-
stateMutability:
|
|
58
|
-
type:
|
|
57
|
+
stateMutability: "nonpayable",
|
|
58
|
+
type: "function",
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
inputs: [
|
|
62
|
-
{ internalType:
|
|
63
|
-
{ internalType:
|
|
62
|
+
{ internalType: "address", name: "owner", type: "address" },
|
|
63
|
+
{ internalType: "bool", name: "active", type: "bool" },
|
|
64
64
|
],
|
|
65
|
-
name:
|
|
65
|
+
name: "setOwner",
|
|
66
66
|
outputs: [],
|
|
67
|
-
stateMutability:
|
|
68
|
-
type:
|
|
67
|
+
stateMutability: "nonpayable",
|
|
68
|
+
type: "function",
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
inputs: [
|
|
72
|
-
{ internalType:
|
|
73
|
-
{ internalType:
|
|
74
|
-
{ internalType:
|
|
75
|
-
{ internalType:
|
|
76
|
-
{ internalType:
|
|
77
|
-
{ internalType:
|
|
78
|
-
{ internalType:
|
|
72
|
+
{ internalType: "address", name: "tcRouter", type: "address" },
|
|
73
|
+
{ internalType: "address", name: "tcVault", type: "address" },
|
|
74
|
+
{ internalType: "string", name: "tcMemo", type: "string" },
|
|
75
|
+
{ internalType: "address", name: "token", type: "address" },
|
|
76
|
+
{ internalType: "uint256", name: "amount", type: "uint256" },
|
|
77
|
+
{ internalType: "uint256", name: "amountOutMin", type: "uint256" },
|
|
78
|
+
{ internalType: "uint256", name: "deadline", type: "uint256" },
|
|
79
79
|
],
|
|
80
|
-
name:
|
|
80
|
+
name: "swapIn",
|
|
81
81
|
outputs: [],
|
|
82
|
-
stateMutability:
|
|
83
|
-
type:
|
|
82
|
+
stateMutability: "nonpayable",
|
|
83
|
+
type: "function",
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
inputs: [
|
|
87
|
-
{ internalType:
|
|
88
|
-
{ internalType:
|
|
89
|
-
{ internalType:
|
|
87
|
+
{ internalType: "address", name: "token", type: "address" },
|
|
88
|
+
{ internalType: "address", name: "to", type: "address" },
|
|
89
|
+
{ internalType: "uint256", name: "amountOutMin", type: "uint256" },
|
|
90
90
|
],
|
|
91
|
-
name:
|
|
91
|
+
name: "swapOut",
|
|
92
92
|
outputs: [],
|
|
93
|
-
stateMutability:
|
|
94
|
-
type:
|
|
93
|
+
stateMutability: "payable",
|
|
94
|
+
type: "function",
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
97
|
inputs: [],
|
|
98
|
-
name:
|
|
99
|
-
outputs: [{ internalType:
|
|
100
|
-
stateMutability:
|
|
101
|
-
type:
|
|
98
|
+
name: "swapRouter",
|
|
99
|
+
outputs: [{ internalType: "contract IUniswapRouterV2AVAX", name: "", type: "address" }],
|
|
100
|
+
stateMutability: "view",
|
|
101
|
+
type: "function",
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
inputs: [],
|
|
105
|
-
name:
|
|
105
|
+
name: "tokenTransferProxy",
|
|
106
106
|
outputs: [
|
|
107
|
-
{ internalType:
|
|
107
|
+
{ internalType: "contract TSAggregatorTokenTransferProxy", name: "", type: "address" },
|
|
108
108
|
],
|
|
109
|
-
stateMutability:
|
|
110
|
-
type:
|
|
109
|
+
stateMutability: "view",
|
|
110
|
+
type: "function",
|
|
111
111
|
},
|
|
112
112
|
{
|
|
113
113
|
inputs: [],
|
|
114
|
-
name:
|
|
115
|
-
outputs: [{ internalType:
|
|
116
|
-
stateMutability:
|
|
117
|
-
type:
|
|
114
|
+
name: "weth",
|
|
115
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
116
|
+
stateMutability: "view",
|
|
117
|
+
type: "function",
|
|
118
118
|
},
|
|
119
|
-
{ stateMutability:
|
|
119
|
+
{ stateMutability: "payable", type: "receive" },
|
|
120
120
|
];
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { kyberRouter } from "./kyber.ts";
|
|
2
|
+
import { oneInchRouter } from "./oneinch.ts";
|
|
3
|
+
import { pancakeSwapRouter } from "./pancakeswap.ts";
|
|
4
|
+
import { pangolinRouter } from "./pangolin.ts";
|
|
5
|
+
import { sushiswapRouter } from "./sushiswap.ts";
|
|
6
|
+
import { traderJoeRouter } from "./traderJoe.ts";
|
|
7
|
+
import { uniswapv2Router } from "./uniswapv2.ts";
|
|
8
|
+
import { uniswapv3Router } from "./uniswapv3.ts";
|
|
9
|
+
import { woofiRouter } from "./woofi.ts";
|
|
10
|
+
|
|
11
|
+
type AbiTypes =
|
|
12
|
+
| typeof kyberRouter
|
|
13
|
+
| typeof oneInchRouter
|
|
14
|
+
| typeof pancakeSwapRouter
|
|
15
|
+
| typeof pangolinRouter
|
|
16
|
+
| typeof sushiswapRouter
|
|
17
|
+
| typeof traderJoeRouter
|
|
18
|
+
| typeof uniswapv2Router
|
|
19
|
+
| typeof uniswapv3Router
|
|
20
|
+
| typeof woofiRouter;
|
|
21
|
+
|
|
22
|
+
export enum DEX_CONTRACT_ADDRESS {
|
|
23
|
+
// AVAX
|
|
24
|
+
TRADERJOE = "0x60aE616a2155Ee3d9A68541Ba4544862310933d4",
|
|
25
|
+
PANGOLIN = "0xE54Ca86531e17Ef3616d22Ca28b0D458b6C89106",
|
|
26
|
+
WOOFI = "0xC22FBb3133dF781E6C25ea6acebe2D2Bb8CeA2f9",
|
|
27
|
+
ONEINCH_AVAX = "0x1111111254fb6c44bAC0beD2854e76F90643097d",
|
|
28
|
+
KYBER_AVAX = "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",
|
|
29
|
+
|
|
30
|
+
// BSC
|
|
31
|
+
PANCAKESWAP_BSC = "0x10ED43C718714eb63d5aA57B78B54704E256024E",
|
|
32
|
+
|
|
33
|
+
// ETH
|
|
34
|
+
ONEINCH_ETH = "0x1111111254fb6c44bac0bed2854e76f90643097d",
|
|
35
|
+
PANCAKESWAP_ETH = "0xEfF92A263d31888d860bD50809A8D171709b7b1c",
|
|
36
|
+
KYBER_ETH = "0x6131B5fae19EA4f9D964eAc0408E4408b66337b5",
|
|
37
|
+
SUSHISWAP = "0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f",
|
|
38
|
+
UNISWAP_V2 = "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",
|
|
39
|
+
UNISWAP_V3 = "0xE592427A0AEce92De3Edee1F18E0157C05861564",
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const lowercasedRouterAbiMapping = {
|
|
43
|
+
// AVAX
|
|
44
|
+
[DEX_CONTRACT_ADDRESS.PANGOLIN.toLowerCase()]: pangolinRouter,
|
|
45
|
+
[DEX_CONTRACT_ADDRESS.WOOFI.toLowerCase()]: woofiRouter,
|
|
46
|
+
[DEX_CONTRACT_ADDRESS.TRADERJOE.toLowerCase()]: traderJoeRouter,
|
|
47
|
+
[DEX_CONTRACT_ADDRESS.ONEINCH_AVAX.toLowerCase()]: oneInchRouter,
|
|
48
|
+
[DEX_CONTRACT_ADDRESS.KYBER_AVAX.toLowerCase()]: kyberRouter,
|
|
49
|
+
// BSC
|
|
50
|
+
[DEX_CONTRACT_ADDRESS.PANCAKESWAP_BSC.toLowerCase()]: pancakeSwapRouter,
|
|
51
|
+
// ETH
|
|
52
|
+
[DEX_CONTRACT_ADDRESS.KYBER_ETH.toLowerCase()]: kyberRouter,
|
|
53
|
+
[DEX_CONTRACT_ADDRESS.SUSHISWAP.toLowerCase()]: sushiswapRouter,
|
|
54
|
+
[DEX_CONTRACT_ADDRESS.PANCAKESWAP_ETH.toLowerCase()]: pancakeSwapRouter,
|
|
55
|
+
[DEX_CONTRACT_ADDRESS.UNISWAP_V2.toLowerCase()]: uniswapv2Router,
|
|
56
|
+
[DEX_CONTRACT_ADDRESS.UNISWAP_V3.toLowerCase()]: uniswapv3Router,
|
|
57
|
+
[DEX_CONTRACT_ADDRESS.ONEINCH_ETH.toLowerCase()]: oneInchRouter,
|
|
58
|
+
} as Record<string, AbiTypes>;
|