hermes-swap 0.0.13 → 0.0.15
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/cjs/abis/aggregator.js +427 -427
- package/dist/cjs/abis/quoter.js +305 -305
- package/dist/cjs/index.js +64 -2
- package/dist/cjs/types.d.ts +5 -5
- package/dist/esm/abis/aggregator.js +436 -436
- package/dist/esm/abis/quoter.js +296 -296
- package/dist/esm/index.js +138 -4
- package/dist/esm/types.d.ts +5 -5
- package/package.json +1 -1
|
@@ -1,541 +1,541 @@
|
|
|
1
1
|
var AggregatorAbi = [{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
type: 'constructor',
|
|
3
|
+
inputs: [{
|
|
4
|
+
name: '_owner',
|
|
5
|
+
type: 'address',
|
|
6
|
+
internalType: 'address'
|
|
7
7
|
}, {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
name: '_executor',
|
|
9
|
+
type: 'address',
|
|
10
|
+
internalType: 'address'
|
|
11
11
|
}, {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
name: '_quoter',
|
|
13
|
+
type: 'address',
|
|
14
|
+
internalType: 'address'
|
|
15
15
|
}],
|
|
16
|
-
|
|
16
|
+
stateMutability: 'nonpayable'
|
|
17
17
|
}, {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
type: 'event',
|
|
19
|
+
name: 'Approved',
|
|
20
|
+
inputs: [{
|
|
21
|
+
name: 'tokenList',
|
|
22
|
+
type: 'address[]',
|
|
23
|
+
indexed: false,
|
|
24
|
+
internalType: 'address[]'
|
|
25
25
|
}, {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
name: 'spenderList',
|
|
27
|
+
type: 'address[]',
|
|
28
|
+
indexed: false,
|
|
29
|
+
internalType: 'address[]'
|
|
30
30
|
}],
|
|
31
|
-
|
|
31
|
+
anonymous: false
|
|
32
32
|
}, {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
type: 'event',
|
|
34
|
+
name: 'ContractAdded',
|
|
35
|
+
inputs: [{
|
|
36
|
+
name: 'contractType',
|
|
37
|
+
type: 'string',
|
|
38
|
+
indexed: false,
|
|
39
|
+
internalType: 'string'
|
|
40
40
|
}, {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
name: 'contractAddress',
|
|
42
|
+
type: 'address',
|
|
43
|
+
indexed: false,
|
|
44
|
+
internalType: 'address'
|
|
45
45
|
}],
|
|
46
|
-
|
|
46
|
+
anonymous: false
|
|
47
47
|
}, {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}],
|
|
56
|
-
|
|
48
|
+
type: 'event',
|
|
49
|
+
name: 'ContractRemoved',
|
|
50
|
+
inputs: [{
|
|
51
|
+
name: 'contractType',
|
|
52
|
+
type: 'string',
|
|
53
|
+
indexed: false,
|
|
54
|
+
internalType: 'string'
|
|
55
|
+
}],
|
|
56
|
+
anonymous: false
|
|
57
57
|
}, {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
type: 'event',
|
|
59
|
+
name: 'ContractUpdated',
|
|
60
|
+
inputs: [{
|
|
61
|
+
name: 'contractType',
|
|
62
|
+
type: 'string',
|
|
63
|
+
indexed: false,
|
|
64
|
+
internalType: 'string'
|
|
65
65
|
}, {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
name: 'contractAddress',
|
|
67
|
+
type: 'address',
|
|
68
|
+
indexed: false,
|
|
69
|
+
internalType: 'address'
|
|
70
70
|
}],
|
|
71
|
-
|
|
71
|
+
anonymous: false
|
|
72
72
|
}, {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}],
|
|
81
|
-
|
|
73
|
+
type: 'event',
|
|
74
|
+
name: 'ExecutorUpdated',
|
|
75
|
+
inputs: [{
|
|
76
|
+
name: 'executor',
|
|
77
|
+
type: 'address',
|
|
78
|
+
indexed: false,
|
|
79
|
+
internalType: 'address'
|
|
80
|
+
}],
|
|
81
|
+
anonymous: false
|
|
82
82
|
}, {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
type: 'event',
|
|
84
|
+
name: 'MultiSwapped',
|
|
85
|
+
inputs: [{
|
|
86
|
+
name: 'userList',
|
|
87
|
+
type: 'address[]',
|
|
88
|
+
indexed: false,
|
|
89
|
+
internalType: 'address[]'
|
|
90
90
|
}, {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
name: 'amountInList',
|
|
92
|
+
type: 'uint256[]',
|
|
93
|
+
indexed: false,
|
|
94
|
+
internalType: 'uint256[]'
|
|
95
95
|
}, {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
name: 'amountOutList',
|
|
97
|
+
type: 'uint256[]',
|
|
98
|
+
indexed: false,
|
|
99
|
+
internalType: 'uint256[]'
|
|
100
100
|
}],
|
|
101
|
-
|
|
101
|
+
anonymous: false
|
|
102
102
|
}, {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
103
|
+
type: 'event',
|
|
104
|
+
name: 'SwapAndBridge',
|
|
105
|
+
inputs: [{
|
|
106
|
+
name: 'user',
|
|
107
|
+
type: 'address',
|
|
108
|
+
indexed: false,
|
|
109
|
+
internalType: 'address'
|
|
110
110
|
}, {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
name: 'amountIn',
|
|
112
|
+
type: 'uint256',
|
|
113
|
+
indexed: false,
|
|
114
|
+
internalType: 'uint256'
|
|
115
115
|
}, {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
name: 'amountOut',
|
|
117
|
+
type: 'uint256',
|
|
118
|
+
indexed: false,
|
|
119
|
+
internalType: 'uint256'
|
|
120
120
|
}, {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
name: 'bridge',
|
|
122
|
+
type: 'string',
|
|
123
|
+
indexed: false,
|
|
124
|
+
internalType: 'string'
|
|
125
125
|
}],
|
|
126
|
-
|
|
126
|
+
anonymous: false
|
|
127
127
|
}, {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
128
|
+
type: 'event',
|
|
129
|
+
name: 'Swapped',
|
|
130
|
+
inputs: [{
|
|
131
|
+
name: 'user',
|
|
132
|
+
type: 'address',
|
|
133
|
+
indexed: false,
|
|
134
|
+
internalType: 'address'
|
|
135
135
|
}, {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
name: 'amountIn',
|
|
137
|
+
type: 'uint256',
|
|
138
|
+
indexed: false,
|
|
139
|
+
internalType: 'uint256'
|
|
140
140
|
}, {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
name: 'amountOut',
|
|
142
|
+
type: 'uint256',
|
|
143
|
+
indexed: false,
|
|
144
|
+
internalType: 'uint256'
|
|
145
145
|
}],
|
|
146
|
-
|
|
146
|
+
anonymous: false
|
|
147
147
|
}, {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
type: 'function',
|
|
149
|
+
name: 'addContract',
|
|
150
|
+
inputs: [{
|
|
151
|
+
name: 'contractType',
|
|
152
|
+
type: 'string',
|
|
153
|
+
internalType: 'string'
|
|
154
154
|
}, {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
name: 'contractAddress',
|
|
156
|
+
type: 'address',
|
|
157
|
+
internalType: 'address'
|
|
158
158
|
}],
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
outputs: [],
|
|
160
|
+
stateMutability: 'nonpayable'
|
|
161
161
|
}, {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
162
|
+
type: 'function',
|
|
163
|
+
name: 'approve',
|
|
164
|
+
inputs: [{
|
|
165
|
+
name: 'tokenList',
|
|
166
|
+
type: 'address[]',
|
|
167
|
+
internalType: 'address[]'
|
|
168
168
|
}, {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
name: 'spenderList',
|
|
170
|
+
type: 'address[]',
|
|
171
|
+
internalType: 'address[]'
|
|
172
172
|
}],
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
outputs: [],
|
|
174
|
+
stateMutability: 'nonpayable'
|
|
175
175
|
}, {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
176
|
+
type: 'function',
|
|
177
|
+
name: 'bridge',
|
|
178
|
+
inputs: [{
|
|
179
|
+
name: 'user',
|
|
180
|
+
type: 'address',
|
|
181
|
+
internalType: 'address'
|
|
182
182
|
}, {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
183
|
+
name: 'bridgeParam',
|
|
184
|
+
type: 'tuple',
|
|
185
|
+
internalType: 'struct BridgeParams',
|
|
186
|
+
components: [{
|
|
187
|
+
name: 'bridge',
|
|
188
|
+
type: 'string',
|
|
189
|
+
internalType: 'string'
|
|
190
190
|
}, {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
191
|
+
name: 'bridgeParam',
|
|
192
|
+
type: 'tuple',
|
|
193
|
+
internalType: 'struct BridgeParam',
|
|
194
|
+
components: [{
|
|
195
|
+
name: 'token',
|
|
196
|
+
type: 'address',
|
|
197
|
+
internalType: 'address'
|
|
198
198
|
}, {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
name: 'amount',
|
|
200
|
+
type: 'uint256',
|
|
201
|
+
internalType: 'uint256'
|
|
202
202
|
}, {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
name: 'bridgeAddress',
|
|
204
|
+
type: 'address',
|
|
205
|
+
internalType: 'address'
|
|
206
206
|
}, {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
name: 'refundAddress',
|
|
208
|
+
type: 'address',
|
|
209
|
+
internalType: 'address'
|
|
210
210
|
}, {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
211
|
+
name: 'destinationChain',
|
|
212
|
+
type: 'string',
|
|
213
|
+
internalType: 'string'
|
|
214
214
|
}, {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
name: 'adapterParams',
|
|
216
|
+
type: 'bytes',
|
|
217
|
+
internalType: 'bytes'
|
|
218
218
|
}]
|
|
219
219
|
}]
|
|
220
220
|
}],
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
221
|
+
outputs: [{
|
|
222
|
+
name: 'success',
|
|
223
|
+
type: 'bool',
|
|
224
|
+
internalType: 'bool'
|
|
225
225
|
}],
|
|
226
|
-
|
|
226
|
+
stateMutability: 'nonpayable'
|
|
227
227
|
}, {
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}],
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
228
|
+
type: 'function',
|
|
229
|
+
name: 'contractList',
|
|
230
|
+
inputs: [{
|
|
231
|
+
name: '',
|
|
232
|
+
type: 'uint256',
|
|
233
|
+
internalType: 'uint256'
|
|
234
|
+
}],
|
|
235
|
+
outputs: [{
|
|
236
|
+
name: 'contractType',
|
|
237
|
+
type: 'string',
|
|
238
|
+
internalType: 'string'
|
|
239
239
|
}, {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
240
|
+
name: 'contractAddress',
|
|
241
|
+
type: 'address',
|
|
242
|
+
internalType: 'address'
|
|
243
243
|
}],
|
|
244
|
-
|
|
244
|
+
stateMutability: 'view'
|
|
245
245
|
}, {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}],
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}],
|
|
258
|
-
|
|
246
|
+
type: 'function',
|
|
247
|
+
name: 'contractMap',
|
|
248
|
+
inputs: [{
|
|
249
|
+
name: '',
|
|
250
|
+
type: 'string',
|
|
251
|
+
internalType: 'string'
|
|
252
|
+
}],
|
|
253
|
+
outputs: [{
|
|
254
|
+
name: '',
|
|
255
|
+
type: 'address',
|
|
256
|
+
internalType: 'address'
|
|
257
|
+
}],
|
|
258
|
+
stateMutability: 'view'
|
|
259
259
|
}, {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}],
|
|
268
|
-
|
|
260
|
+
type: 'function',
|
|
261
|
+
name: 'executor',
|
|
262
|
+
inputs: [],
|
|
263
|
+
outputs: [{
|
|
264
|
+
name: '',
|
|
265
|
+
type: 'address',
|
|
266
|
+
internalType: 'address'
|
|
267
|
+
}],
|
|
268
|
+
stateMutability: 'view'
|
|
269
269
|
}, {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
}],
|
|
278
|
-
|
|
270
|
+
type: 'function',
|
|
271
|
+
name: 'getAddressList',
|
|
272
|
+
inputs: [],
|
|
273
|
+
outputs: [{
|
|
274
|
+
name: '',
|
|
275
|
+
type: 'address[]',
|
|
276
|
+
internalType: 'address[]'
|
|
277
|
+
}],
|
|
278
|
+
stateMutability: 'view'
|
|
279
279
|
}, {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}],
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
}],
|
|
292
|
-
|
|
280
|
+
type: 'function',
|
|
281
|
+
name: 'isWhitelist',
|
|
282
|
+
inputs: [{
|
|
283
|
+
name: '_address',
|
|
284
|
+
type: 'address',
|
|
285
|
+
internalType: 'address'
|
|
286
|
+
}],
|
|
287
|
+
outputs: [{
|
|
288
|
+
name: '',
|
|
289
|
+
type: 'bool',
|
|
290
|
+
internalType: 'bool'
|
|
291
|
+
}],
|
|
292
|
+
stateMutability: 'view'
|
|
293
293
|
}, {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
294
|
+
type: 'function',
|
|
295
|
+
name: 'multiSwap',
|
|
296
|
+
inputs: [{
|
|
297
|
+
name: 'userList',
|
|
298
|
+
type: 'address[]',
|
|
299
|
+
internalType: 'address[]'
|
|
300
300
|
}, {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
301
|
+
name: 'amountInList',
|
|
302
|
+
type: 'uint256[]',
|
|
303
|
+
internalType: 'uint256[]'
|
|
304
304
|
}, {
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
305
|
+
name: 'swapParamsList',
|
|
306
|
+
type: 'tuple[][]',
|
|
307
|
+
internalType: 'struct SwapParams[][]',
|
|
308
|
+
components: [{
|
|
309
|
+
name: 'dexType',
|
|
310
|
+
type: 'string',
|
|
311
|
+
internalType: 'string'
|
|
312
312
|
}, {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
313
|
+
name: 'pool',
|
|
314
|
+
type: 'address',
|
|
315
|
+
internalType: 'address'
|
|
316
316
|
}, {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
317
|
+
name: 'fromCoin',
|
|
318
|
+
type: 'address',
|
|
319
|
+
internalType: 'address'
|
|
320
320
|
}, {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
321
|
+
name: 'toCoin',
|
|
322
|
+
type: 'address',
|
|
323
|
+
internalType: 'address'
|
|
324
324
|
}, {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
325
|
+
name: 'extra',
|
|
326
|
+
type: 'bytes',
|
|
327
|
+
internalType: 'bytes'
|
|
328
328
|
}]
|
|
329
329
|
}, {
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
330
|
+
name: 'minAmountOutList',
|
|
331
|
+
type: 'uint256[][]',
|
|
332
|
+
internalType: 'uint256[][]'
|
|
333
333
|
}],
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
334
|
+
outputs: [{
|
|
335
|
+
name: 'amountOutList',
|
|
336
|
+
type: 'uint256[]',
|
|
337
|
+
internalType: 'uint256[]'
|
|
338
338
|
}],
|
|
339
|
-
|
|
339
|
+
stateMutability: 'nonpayable'
|
|
340
340
|
}, {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
}],
|
|
349
|
-
|
|
341
|
+
type: 'function',
|
|
342
|
+
name: 'owner',
|
|
343
|
+
inputs: [],
|
|
344
|
+
outputs: [{
|
|
345
|
+
name: '',
|
|
346
|
+
type: 'address',
|
|
347
|
+
internalType: 'address'
|
|
348
|
+
}],
|
|
349
|
+
stateMutability: 'view'
|
|
350
350
|
}, {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
}],
|
|
359
|
-
|
|
351
|
+
type: 'function',
|
|
352
|
+
name: 'quoter',
|
|
353
|
+
inputs: [],
|
|
354
|
+
outputs: [{
|
|
355
|
+
name: '',
|
|
356
|
+
type: 'address',
|
|
357
|
+
internalType: 'address'
|
|
358
|
+
}],
|
|
359
|
+
stateMutability: 'view'
|
|
360
360
|
}, {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}],
|
|
368
|
-
|
|
369
|
-
|
|
361
|
+
type: 'function',
|
|
362
|
+
name: 'removeContract',
|
|
363
|
+
inputs: [{
|
|
364
|
+
name: 'contractType',
|
|
365
|
+
type: 'string',
|
|
366
|
+
internalType: 'string'
|
|
367
|
+
}],
|
|
368
|
+
outputs: [],
|
|
369
|
+
stateMutability: 'nonpayable'
|
|
370
370
|
}, {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}],
|
|
378
|
-
|
|
379
|
-
|
|
371
|
+
type: 'function',
|
|
372
|
+
name: 'setExecutor',
|
|
373
|
+
inputs: [{
|
|
374
|
+
name: '_executor',
|
|
375
|
+
type: 'address',
|
|
376
|
+
internalType: 'address'
|
|
377
|
+
}],
|
|
378
|
+
outputs: [],
|
|
379
|
+
stateMutability: 'nonpayable'
|
|
380
380
|
}, {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
381
|
+
type: 'function',
|
|
382
|
+
name: 'swap',
|
|
383
|
+
inputs: [{
|
|
384
|
+
name: 'user',
|
|
385
|
+
type: 'address',
|
|
386
|
+
internalType: 'address'
|
|
387
387
|
}, {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
388
|
+
name: 'amountIn',
|
|
389
|
+
type: 'uint256',
|
|
390
|
+
internalType: 'uint256'
|
|
391
391
|
}, {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
392
|
+
name: 'swapParams',
|
|
393
|
+
type: 'tuple[]',
|
|
394
|
+
internalType: 'struct SwapParams[]',
|
|
395
|
+
components: [{
|
|
396
|
+
name: 'dexType',
|
|
397
|
+
type: 'string',
|
|
398
|
+
internalType: 'string'
|
|
399
399
|
}, {
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
400
|
+
name: 'pool',
|
|
401
|
+
type: 'address',
|
|
402
|
+
internalType: 'address'
|
|
403
403
|
}, {
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
404
|
+
name: 'fromCoin',
|
|
405
|
+
type: 'address',
|
|
406
|
+
internalType: 'address'
|
|
407
407
|
}, {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
408
|
+
name: 'toCoin',
|
|
409
|
+
type: 'address',
|
|
410
|
+
internalType: 'address'
|
|
411
411
|
}, {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
412
|
+
name: 'extra',
|
|
413
|
+
type: 'bytes',
|
|
414
|
+
internalType: 'bytes'
|
|
415
415
|
}]
|
|
416
416
|
}, {
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
417
|
+
name: 'minAmountOutList',
|
|
418
|
+
type: 'uint256[]',
|
|
419
|
+
internalType: 'uint256[]'
|
|
420
420
|
}],
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
421
|
+
outputs: [{
|
|
422
|
+
name: 'amountOut',
|
|
423
|
+
type: 'uint256',
|
|
424
|
+
internalType: 'uint256'
|
|
425
425
|
}],
|
|
426
|
-
|
|
426
|
+
stateMutability: 'nonpayable'
|
|
427
427
|
}, {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
428
|
+
type: 'function',
|
|
429
|
+
name: 'swapAndBridge',
|
|
430
|
+
inputs: [{
|
|
431
|
+
name: 'user',
|
|
432
|
+
type: 'address',
|
|
433
|
+
internalType: 'address'
|
|
434
434
|
}, {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
435
|
+
name: 'amountIn',
|
|
436
|
+
type: 'uint256',
|
|
437
|
+
internalType: 'uint256'
|
|
438
438
|
}, {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
439
|
+
name: 'swapParams',
|
|
440
|
+
type: 'tuple[]',
|
|
441
|
+
internalType: 'struct SwapParams[]',
|
|
442
|
+
components: [{
|
|
443
|
+
name: 'dexType',
|
|
444
|
+
type: 'string',
|
|
445
|
+
internalType: 'string'
|
|
446
446
|
}, {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
447
|
+
name: 'pool',
|
|
448
|
+
type: 'address',
|
|
449
|
+
internalType: 'address'
|
|
450
450
|
}, {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
451
|
+
name: 'fromCoin',
|
|
452
|
+
type: 'address',
|
|
453
|
+
internalType: 'address'
|
|
454
454
|
}, {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
455
|
+
name: 'toCoin',
|
|
456
|
+
type: 'address',
|
|
457
|
+
internalType: 'address'
|
|
458
458
|
}, {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
459
|
+
name: 'extra',
|
|
460
|
+
type: 'bytes',
|
|
461
|
+
internalType: 'bytes'
|
|
462
462
|
}]
|
|
463
463
|
}, {
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
464
|
+
name: 'minAmountOutList',
|
|
465
|
+
type: 'uint256[]',
|
|
466
|
+
internalType: 'uint256[]'
|
|
467
467
|
}, {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
468
|
+
name: 'bridgeParam',
|
|
469
|
+
type: 'tuple',
|
|
470
|
+
internalType: 'struct BridgeParams',
|
|
471
|
+
components: [{
|
|
472
|
+
name: 'bridge',
|
|
473
|
+
type: 'string',
|
|
474
|
+
internalType: 'string'
|
|
475
475
|
}, {
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
476
|
+
name: 'bridgeParam',
|
|
477
|
+
type: 'tuple',
|
|
478
|
+
internalType: 'struct BridgeParam',
|
|
479
|
+
components: [{
|
|
480
|
+
name: 'token',
|
|
481
|
+
type: 'address',
|
|
482
|
+
internalType: 'address'
|
|
483
483
|
}, {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
484
|
+
name: 'amount',
|
|
485
|
+
type: 'uint256',
|
|
486
|
+
internalType: 'uint256'
|
|
487
487
|
}, {
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
488
|
+
name: 'bridgeAddress',
|
|
489
|
+
type: 'address',
|
|
490
|
+
internalType: 'address'
|
|
491
491
|
}, {
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
492
|
+
name: 'refundAddress',
|
|
493
|
+
type: 'address',
|
|
494
|
+
internalType: 'address'
|
|
495
495
|
}, {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
496
|
+
name: 'destinationChain',
|
|
497
|
+
type: 'string',
|
|
498
|
+
internalType: 'string'
|
|
499
499
|
}, {
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
500
|
+
name: 'adapterParams',
|
|
501
|
+
type: 'bytes',
|
|
502
|
+
internalType: 'bytes'
|
|
503
503
|
}]
|
|
504
504
|
}]
|
|
505
505
|
}],
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
506
|
+
outputs: [{
|
|
507
|
+
name: 'amountOut',
|
|
508
|
+
type: 'uint256',
|
|
509
|
+
internalType: 'uint256'
|
|
510
510
|
}],
|
|
511
|
-
|
|
511
|
+
stateMutability: 'nonpayable'
|
|
512
512
|
}, {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
513
|
+
type: 'function',
|
|
514
|
+
name: 'updateContract',
|
|
515
|
+
inputs: [{
|
|
516
|
+
name: 'contractType',
|
|
517
|
+
type: 'string',
|
|
518
|
+
internalType: 'string'
|
|
519
519
|
}, {
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
520
|
+
name: 'contractAddress',
|
|
521
|
+
type: 'address',
|
|
522
|
+
internalType: 'address'
|
|
523
523
|
}],
|
|
524
|
-
|
|
525
|
-
|
|
524
|
+
outputs: [],
|
|
525
|
+
stateMutability: 'nonpayable'
|
|
526
526
|
}, {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
}],
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
}],
|
|
539
|
-
|
|
527
|
+
type: 'function',
|
|
528
|
+
name: 'whitelistMap',
|
|
529
|
+
inputs: [{
|
|
530
|
+
name: '',
|
|
531
|
+
type: 'address',
|
|
532
|
+
internalType: 'address'
|
|
533
|
+
}],
|
|
534
|
+
outputs: [{
|
|
535
|
+
name: '',
|
|
536
|
+
type: 'bool',
|
|
537
|
+
internalType: 'bool'
|
|
538
|
+
}],
|
|
539
|
+
stateMutability: 'view'
|
|
540
540
|
}];
|
|
541
541
|
export default AggregatorAbi;
|