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
package/dist/esm/abis/quoter.js
CHANGED
|
@@ -1,381 +1,381 @@
|
|
|
1
1
|
var QuoterAbi = [{
|
|
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
|
-
|
|
12
|
+
stateMutability: 'nonpayable'
|
|
13
13
|
}, {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
type: 'function',
|
|
15
|
+
name: 'addContract',
|
|
16
|
+
inputs: [{
|
|
17
|
+
name: 'contractType',
|
|
18
|
+
type: 'string',
|
|
19
|
+
internalType: 'string'
|
|
20
20
|
}, {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
name: 'contractAddress',
|
|
22
|
+
type: 'address',
|
|
23
|
+
internalType: 'address'
|
|
24
24
|
}],
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
outputs: [],
|
|
26
|
+
stateMutability: 'nonpayable'
|
|
27
27
|
}, {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
type: 'function',
|
|
29
|
+
name: 'batchMultiQuote',
|
|
30
|
+
inputs: [{
|
|
31
|
+
name: 'amountInArr',
|
|
32
|
+
type: 'uint256[]',
|
|
33
|
+
internalType: 'uint256[]'
|
|
34
34
|
}, {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
name: 'quoteParamsArr',
|
|
36
|
+
type: 'tuple[][]',
|
|
37
|
+
internalType: 'struct MultiQuoteParam[][]',
|
|
38
|
+
components: [{
|
|
39
|
+
name: 'dexType',
|
|
40
|
+
type: 'string',
|
|
41
|
+
internalType: 'string'
|
|
42
42
|
}, {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
name: 'pool',
|
|
44
|
+
type: 'address',
|
|
45
|
+
internalType: 'address'
|
|
46
46
|
}, {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
name: 'fromCoin',
|
|
48
|
+
type: 'address',
|
|
49
|
+
internalType: 'address'
|
|
50
50
|
}, {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
name: 'toCoin',
|
|
52
|
+
type: 'address',
|
|
53
|
+
internalType: 'address'
|
|
54
54
|
}, {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
name: 'extra',
|
|
56
|
+
type: 'bytes',
|
|
57
|
+
internalType: 'bytes'
|
|
58
58
|
}]
|
|
59
59
|
}],
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
outputs: [{
|
|
61
|
+
name: 'amountOutListArr',
|
|
62
|
+
type: 'uint256[][]',
|
|
63
|
+
internalType: 'uint256[][]'
|
|
64
64
|
}],
|
|
65
|
-
|
|
65
|
+
stateMutability: 'view'
|
|
66
66
|
}, {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
type: 'function',
|
|
68
|
+
name: 'contractList',
|
|
69
|
+
inputs: [{
|
|
70
|
+
name: '',
|
|
71
|
+
type: 'uint256',
|
|
72
|
+
internalType: 'uint256'
|
|
73
73
|
}],
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
outputs: [{
|
|
75
|
+
name: 'contractType',
|
|
76
|
+
type: 'string',
|
|
77
|
+
internalType: 'string'
|
|
78
78
|
}, {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
79
|
+
name: 'contractAddress',
|
|
80
|
+
type: 'address',
|
|
81
|
+
internalType: 'address'
|
|
82
82
|
}],
|
|
83
|
-
|
|
83
|
+
stateMutability: 'view'
|
|
84
84
|
}, {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
type: 'function',
|
|
86
|
+
name: 'contractMap',
|
|
87
|
+
inputs: [{
|
|
88
|
+
name: '',
|
|
89
|
+
type: 'string',
|
|
90
|
+
internalType: 'string'
|
|
91
91
|
}],
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
outputs: [{
|
|
93
|
+
name: '',
|
|
94
|
+
type: 'address',
|
|
95
|
+
internalType: 'address'
|
|
96
96
|
}],
|
|
97
|
-
|
|
97
|
+
stateMutability: 'view'
|
|
98
98
|
}, {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
99
|
+
type: 'function',
|
|
100
|
+
name: 'executor',
|
|
101
|
+
inputs: [],
|
|
102
|
+
outputs: [{
|
|
103
|
+
name: '',
|
|
104
|
+
type: 'address',
|
|
105
|
+
internalType: 'address'
|
|
106
106
|
}],
|
|
107
|
-
|
|
107
|
+
stateMutability: 'view'
|
|
108
108
|
}, {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
109
|
+
type: 'function',
|
|
110
|
+
name: 'getAddressList',
|
|
111
|
+
inputs: [],
|
|
112
|
+
outputs: [{
|
|
113
|
+
name: '',
|
|
114
|
+
type: 'address[]',
|
|
115
|
+
internalType: 'address[]'
|
|
116
116
|
}],
|
|
117
|
-
|
|
117
|
+
stateMutability: 'view'
|
|
118
118
|
}, {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
119
|
+
type: 'function',
|
|
120
|
+
name: 'isAddressist',
|
|
121
|
+
inputs: [{
|
|
122
|
+
name: '_address',
|
|
123
|
+
type: 'address',
|
|
124
|
+
internalType: 'address'
|
|
125
125
|
}],
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
126
|
+
outputs: [{
|
|
127
|
+
name: '',
|
|
128
|
+
type: 'bool',
|
|
129
|
+
internalType: 'bool'
|
|
130
130
|
}],
|
|
131
|
-
|
|
131
|
+
stateMutability: 'view'
|
|
132
132
|
}, {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
133
|
+
type: 'function',
|
|
134
|
+
name: 'isWhitelist',
|
|
135
|
+
inputs: [{
|
|
136
|
+
name: '_address',
|
|
137
|
+
type: 'address',
|
|
138
|
+
internalType: 'address'
|
|
139
139
|
}],
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
140
|
+
outputs: [{
|
|
141
|
+
name: '',
|
|
142
|
+
type: 'bool',
|
|
143
|
+
internalType: 'bool'
|
|
144
144
|
}],
|
|
145
|
-
|
|
145
|
+
stateMutability: 'view'
|
|
146
146
|
}, {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
147
|
+
type: 'function',
|
|
148
|
+
name: 'multiQuote',
|
|
149
|
+
inputs: [{
|
|
150
|
+
name: 'amountIn',
|
|
151
|
+
type: 'uint256',
|
|
152
|
+
internalType: 'uint256'
|
|
153
153
|
}, {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
name: 'quoteParams',
|
|
155
|
+
type: 'tuple[]',
|
|
156
|
+
internalType: 'struct MultiQuoteParam[]',
|
|
157
|
+
components: [{
|
|
158
|
+
name: 'dexType',
|
|
159
|
+
type: 'string',
|
|
160
|
+
internalType: 'string'
|
|
161
161
|
}, {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
162
|
+
name: 'pool',
|
|
163
|
+
type: 'address',
|
|
164
|
+
internalType: 'address'
|
|
165
165
|
}, {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
name: 'fromCoin',
|
|
167
|
+
type: 'address',
|
|
168
|
+
internalType: 'address'
|
|
169
169
|
}, {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
name: 'toCoin',
|
|
171
|
+
type: 'address',
|
|
172
|
+
internalType: 'address'
|
|
173
173
|
}, {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
name: 'extra',
|
|
175
|
+
type: 'bytes',
|
|
176
|
+
internalType: 'bytes'
|
|
177
177
|
}]
|
|
178
178
|
}],
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
outputs: [{
|
|
180
|
+
name: 'amountOutList',
|
|
181
|
+
type: 'uint256[]',
|
|
182
|
+
internalType: 'uint256[]'
|
|
183
183
|
}],
|
|
184
|
-
|
|
184
|
+
stateMutability: 'view'
|
|
185
185
|
}, {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
186
|
+
type: 'function',
|
|
187
|
+
name: 'owner',
|
|
188
|
+
inputs: [],
|
|
189
|
+
outputs: [{
|
|
190
|
+
name: '',
|
|
191
|
+
type: 'address',
|
|
192
|
+
internalType: 'address'
|
|
193
193
|
}],
|
|
194
|
-
|
|
194
|
+
stateMutability: 'view'
|
|
195
195
|
}, {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
196
|
+
type: 'function',
|
|
197
|
+
name: 'quote',
|
|
198
|
+
inputs: [{
|
|
199
|
+
name: 'quoteParam',
|
|
200
|
+
type: 'tuple',
|
|
201
|
+
internalType: 'struct SingleQuoteParam',
|
|
202
|
+
components: [{
|
|
203
|
+
name: 'amountIn',
|
|
204
|
+
type: 'uint256',
|
|
205
|
+
internalType: 'uint256'
|
|
206
206
|
}, {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
name: 'dexType',
|
|
208
|
+
type: 'string',
|
|
209
|
+
internalType: 'string'
|
|
210
210
|
}, {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
211
|
+
name: 'pool',
|
|
212
|
+
type: 'address',
|
|
213
|
+
internalType: 'address'
|
|
214
214
|
}, {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
215
|
+
name: 'fromCoin',
|
|
216
|
+
type: 'address',
|
|
217
|
+
internalType: 'address'
|
|
218
218
|
}, {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
219
|
+
name: 'toCoin',
|
|
220
|
+
type: 'address',
|
|
221
|
+
internalType: 'address'
|
|
222
222
|
}, {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
223
|
+
name: 'extra',
|
|
224
|
+
type: 'bytes',
|
|
225
|
+
internalType: 'bytes'
|
|
226
226
|
}]
|
|
227
227
|
}],
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
outputs: [{
|
|
229
|
+
name: 'amountOut',
|
|
230
|
+
type: 'uint256',
|
|
231
|
+
internalType: 'uint256'
|
|
232
232
|
}],
|
|
233
|
-
|
|
233
|
+
stateMutability: 'view'
|
|
234
234
|
}, {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
235
|
+
type: 'function',
|
|
236
|
+
name: 'quoteBridge',
|
|
237
|
+
inputs: [{
|
|
238
|
+
name: 'bridgeParams',
|
|
239
|
+
type: 'tuple',
|
|
240
|
+
internalType: 'struct BridgeParams',
|
|
241
|
+
components: [{
|
|
242
|
+
name: 'bridge',
|
|
243
|
+
type: 'string',
|
|
244
|
+
internalType: 'string'
|
|
245
245
|
}, {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
246
|
+
name: 'bridgeParam',
|
|
247
|
+
type: 'tuple',
|
|
248
|
+
internalType: 'struct BridgeParam',
|
|
249
|
+
components: [{
|
|
250
|
+
name: 'token',
|
|
251
|
+
type: 'address',
|
|
252
|
+
internalType: 'address'
|
|
253
253
|
}, {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
254
|
+
name: 'amount',
|
|
255
|
+
type: 'uint256',
|
|
256
|
+
internalType: 'uint256'
|
|
257
257
|
}, {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
258
|
+
name: 'bridgeAddress',
|
|
259
|
+
type: 'address',
|
|
260
|
+
internalType: 'address'
|
|
261
261
|
}, {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
262
|
+
name: 'refundAddress',
|
|
263
|
+
type: 'address',
|
|
264
|
+
internalType: 'address'
|
|
265
265
|
}, {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
name: 'destinationChain',
|
|
267
|
+
type: 'string',
|
|
268
|
+
internalType: 'string'
|
|
269
269
|
}, {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
270
|
+
name: 'adapterParams',
|
|
271
|
+
type: 'bytes',
|
|
272
|
+
internalType: 'bytes'
|
|
273
273
|
}]
|
|
274
274
|
}]
|
|
275
275
|
}],
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
276
|
+
outputs: [{
|
|
277
|
+
name: 'bridgeFee',
|
|
278
|
+
type: 'uint256',
|
|
279
|
+
internalType: 'uint256'
|
|
280
280
|
}],
|
|
281
|
-
|
|
281
|
+
stateMutability: 'view'
|
|
282
282
|
}, {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
283
|
+
type: 'function',
|
|
284
|
+
name: 'removeContract',
|
|
285
|
+
inputs: [{
|
|
286
|
+
name: 'contractType',
|
|
287
|
+
type: 'string',
|
|
288
|
+
internalType: 'string'
|
|
289
289
|
}],
|
|
290
|
-
|
|
291
|
-
|
|
290
|
+
outputs: [],
|
|
291
|
+
stateMutability: 'nonpayable'
|
|
292
292
|
}, {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
293
|
+
type: 'function',
|
|
294
|
+
name: 'setExecutor',
|
|
295
|
+
inputs: [{
|
|
296
|
+
name: '_executor',
|
|
297
|
+
type: 'address',
|
|
298
|
+
internalType: 'address'
|
|
299
299
|
}],
|
|
300
|
-
|
|
301
|
-
|
|
300
|
+
outputs: [],
|
|
301
|
+
stateMutability: 'nonpayable'
|
|
302
302
|
}, {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
303
|
+
type: 'function',
|
|
304
|
+
name: 'updateContract',
|
|
305
|
+
inputs: [{
|
|
306
|
+
name: 'contractType',
|
|
307
|
+
type: 'string',
|
|
308
|
+
internalType: 'string'
|
|
309
309
|
}, {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
310
|
+
name: 'contractAddress',
|
|
311
|
+
type: 'address',
|
|
312
|
+
internalType: 'address'
|
|
313
313
|
}],
|
|
314
|
-
|
|
315
|
-
|
|
314
|
+
outputs: [],
|
|
315
|
+
stateMutability: 'nonpayable'
|
|
316
316
|
}, {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
317
|
+
type: 'function',
|
|
318
|
+
name: 'whitelistMap',
|
|
319
|
+
inputs: [{
|
|
320
|
+
name: '',
|
|
321
|
+
type: 'address',
|
|
322
|
+
internalType: 'address'
|
|
323
323
|
}],
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
324
|
+
outputs: [{
|
|
325
|
+
name: '',
|
|
326
|
+
type: 'bool',
|
|
327
|
+
internalType: 'bool'
|
|
328
328
|
}],
|
|
329
|
-
|
|
329
|
+
stateMutability: 'view'
|
|
330
330
|
}, {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
331
|
+
type: 'event',
|
|
332
|
+
name: 'ContractAdded',
|
|
333
|
+
inputs: [{
|
|
334
|
+
name: 'contractType',
|
|
335
|
+
type: 'string',
|
|
336
|
+
indexed: false,
|
|
337
|
+
internalType: 'string'
|
|
338
338
|
}, {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
339
|
+
name: 'contractAddress',
|
|
340
|
+
type: 'address',
|
|
341
|
+
indexed: false,
|
|
342
|
+
internalType: 'address'
|
|
343
343
|
}],
|
|
344
|
-
|
|
344
|
+
anonymous: false
|
|
345
345
|
}, {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
346
|
+
type: 'event',
|
|
347
|
+
name: 'ContractRemoved',
|
|
348
|
+
inputs: [{
|
|
349
|
+
name: 'contractType',
|
|
350
|
+
type: 'string',
|
|
351
|
+
indexed: false,
|
|
352
|
+
internalType: 'string'
|
|
353
353
|
}],
|
|
354
|
-
|
|
354
|
+
anonymous: false
|
|
355
355
|
}, {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
356
|
+
type: 'event',
|
|
357
|
+
name: 'ContractUpdated',
|
|
358
|
+
inputs: [{
|
|
359
|
+
name: 'contractType',
|
|
360
|
+
type: 'string',
|
|
361
|
+
indexed: false,
|
|
362
|
+
internalType: 'string'
|
|
363
363
|
}, {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
364
|
+
name: 'contractAddress',
|
|
365
|
+
type: 'address',
|
|
366
|
+
indexed: false,
|
|
367
|
+
internalType: 'address'
|
|
368
368
|
}],
|
|
369
|
-
|
|
369
|
+
anonymous: false
|
|
370
370
|
}, {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
371
|
+
type: 'event',
|
|
372
|
+
name: 'ExecutorUpdated',
|
|
373
|
+
inputs: [{
|
|
374
|
+
name: 'executor',
|
|
375
|
+
type: 'address',
|
|
376
|
+
indexed: false,
|
|
377
|
+
internalType: 'address'
|
|
378
378
|
}],
|
|
379
|
-
|
|
379
|
+
anonymous: false
|
|
380
380
|
}];
|
|
381
381
|
export default QuoterAbi;
|