@gitmyabi/vault 1.0.8 → 1.0.10
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/README.md +3 -3
- package/contracts/Vault_json.d.ts +60 -931
- package/contracts/Vault_json.js +65 -998
- package/contracts/Vault_json.ts +67 -1224
- package/package.json +3 -3
package/contracts/Vault_json.js
CHANGED
|
@@ -11,205 +11,21 @@ exports.Vault_jsonAbi = [
|
|
|
11
11
|
{
|
|
12
12
|
"inputs": [
|
|
13
13
|
{
|
|
14
|
-
"internalType": "
|
|
15
|
-
"name": "
|
|
16
|
-
"type": "
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"internalType": "uint256",
|
|
20
|
-
"name": "_emergencyPenalty",
|
|
21
|
-
"type": "uint256"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"internalType": "address",
|
|
25
|
-
"name": "_emergencyPenaltyReceiver",
|
|
26
|
-
"type": "address"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"internalType": "uint256",
|
|
30
|
-
"name": "_successFee",
|
|
31
|
-
"type": "uint256"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"internalType": "address",
|
|
35
|
-
"name": "_successFeeReceiver",
|
|
36
|
-
"type": "address"
|
|
14
|
+
"internalType": "bytes32",
|
|
15
|
+
"name": "seal_",
|
|
16
|
+
"type": "bytes32"
|
|
37
17
|
}
|
|
38
18
|
],
|
|
39
19
|
"stateMutability": "nonpayable",
|
|
40
20
|
"type": "constructor"
|
|
41
21
|
},
|
|
42
|
-
{
|
|
43
|
-
"inputs": [
|
|
44
|
-
{
|
|
45
|
-
"internalType": "address",
|
|
46
|
-
"name": "owner",
|
|
47
|
-
"type": "address"
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
"name": "OwnableInvalidOwner",
|
|
51
|
-
"type": "error"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"inputs": [
|
|
55
|
-
{
|
|
56
|
-
"internalType": "address",
|
|
57
|
-
"name": "account",
|
|
58
|
-
"type": "address"
|
|
59
|
-
}
|
|
60
|
-
],
|
|
61
|
-
"name": "OwnableUnauthorizedAccount",
|
|
62
|
-
"type": "error"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"inputs": [],
|
|
66
|
-
"name": "ReentrancyGuardReentrantCall",
|
|
67
|
-
"type": "error"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"inputs": [
|
|
71
|
-
{
|
|
72
|
-
"internalType": "address",
|
|
73
|
-
"name": "token",
|
|
74
|
-
"type": "address"
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
"name": "SafeERC20FailedOperation",
|
|
78
|
-
"type": "error"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"anonymous": false,
|
|
82
|
-
"inputs": [
|
|
83
|
-
{
|
|
84
|
-
"indexed": false,
|
|
85
|
-
"internalType": "uint256",
|
|
86
|
-
"name": "uid",
|
|
87
|
-
"type": "uint256"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"indexed": false,
|
|
91
|
-
"internalType": "uint256",
|
|
92
|
-
"name": "startTimestamp",
|
|
93
|
-
"type": "uint256"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"indexed": false,
|
|
97
|
-
"internalType": "uint256",
|
|
98
|
-
"name": "endTimestamp",
|
|
99
|
-
"type": "uint256"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"indexed": false,
|
|
103
|
-
"internalType": "address[]",
|
|
104
|
-
"name": "tokens",
|
|
105
|
-
"type": "address[]"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"indexed": false,
|
|
109
|
-
"internalType": "uint256[]",
|
|
110
|
-
"name": "amounts",
|
|
111
|
-
"type": "uint256[]"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"indexed": false,
|
|
115
|
-
"internalType": "uint256[]",
|
|
116
|
-
"name": "prices",
|
|
117
|
-
"type": "uint256[]"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"indexed": false,
|
|
121
|
-
"internalType": "address",
|
|
122
|
-
"name": "receiver",
|
|
123
|
-
"type": "address"
|
|
124
|
-
}
|
|
125
|
-
],
|
|
126
|
-
"name": "NewDeposit",
|
|
127
|
-
"type": "event"
|
|
128
|
-
},
|
|
129
22
|
{
|
|
130
23
|
"anonymous": false,
|
|
131
24
|
"inputs": [
|
|
132
25
|
{
|
|
133
26
|
"indexed": true,
|
|
134
27
|
"internalType": "address",
|
|
135
|
-
"name": "
|
|
136
|
-
"type": "address"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"indexed": true,
|
|
140
|
-
"internalType": "address",
|
|
141
|
-
"name": "newOwner",
|
|
142
|
-
"type": "address"
|
|
143
|
-
}
|
|
144
|
-
],
|
|
145
|
-
"name": "OwnershipTransferred",
|
|
146
|
-
"type": "event"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
"anonymous": false,
|
|
150
|
-
"inputs": [
|
|
151
|
-
{
|
|
152
|
-
"indexed": false,
|
|
153
|
-
"internalType": "uint256",
|
|
154
|
-
"name": "emergencyPenalty",
|
|
155
|
-
"type": "uint256"
|
|
156
|
-
}
|
|
157
|
-
],
|
|
158
|
-
"name": "SetEmergencyPenalty",
|
|
159
|
-
"type": "event"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"anonymous": false,
|
|
163
|
-
"inputs": [
|
|
164
|
-
{
|
|
165
|
-
"indexed": false,
|
|
166
|
-
"internalType": "address",
|
|
167
|
-
"name": "emergencyPenaltyReceiver",
|
|
168
|
-
"type": "address"
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
"name": "SetEmergencyPenaltyReceiver",
|
|
172
|
-
"type": "event"
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
"anonymous": false,
|
|
176
|
-
"inputs": [
|
|
177
|
-
{
|
|
178
|
-
"indexed": false,
|
|
179
|
-
"internalType": "uint256",
|
|
180
|
-
"name": "successFee",
|
|
181
|
-
"type": "uint256"
|
|
182
|
-
}
|
|
183
|
-
],
|
|
184
|
-
"name": "SetSuccessFee",
|
|
185
|
-
"type": "event"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"anonymous": false,
|
|
189
|
-
"inputs": [
|
|
190
|
-
{
|
|
191
|
-
"indexed": false,
|
|
192
|
-
"internalType": "address",
|
|
193
|
-
"name": "successFeeReceiver",
|
|
194
|
-
"type": "address"
|
|
195
|
-
}
|
|
196
|
-
],
|
|
197
|
-
"name": "SetSuccessFeeReceiver",
|
|
198
|
-
"type": "event"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
"anonymous": false,
|
|
202
|
-
"inputs": [
|
|
203
|
-
{
|
|
204
|
-
"indexed": false,
|
|
205
|
-
"internalType": "uint256",
|
|
206
|
-
"name": "uid",
|
|
207
|
-
"type": "uint256"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
"indexed": false,
|
|
211
|
-
"internalType": "address",
|
|
212
|
-
"name": "token",
|
|
28
|
+
"name": "to",
|
|
213
29
|
"type": "address"
|
|
214
30
|
},
|
|
215
31
|
{
|
|
@@ -219,44 +35,7 @@ exports.Vault_jsonAbi = [
|
|
|
219
35
|
"type": "uint256"
|
|
220
36
|
}
|
|
221
37
|
],
|
|
222
|
-
"name": "
|
|
223
|
-
"type": "event"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"anonymous": false,
|
|
227
|
-
"inputs": [
|
|
228
|
-
{
|
|
229
|
-
"indexed": false,
|
|
230
|
-
"internalType": "address",
|
|
231
|
-
"name": "token",
|
|
232
|
-
"type": "address"
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
"indexed": false,
|
|
236
|
-
"internalType": "address",
|
|
237
|
-
"name": "stateView",
|
|
238
|
-
"type": "address"
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
"indexed": false,
|
|
242
|
-
"internalType": "bytes32",
|
|
243
|
-
"name": "poolId",
|
|
244
|
-
"type": "bytes32"
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
"indexed": false,
|
|
248
|
-
"internalType": "bool",
|
|
249
|
-
"name": "isToken0",
|
|
250
|
-
"type": "bool"
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
"indexed": false,
|
|
254
|
-
"internalType": "bool",
|
|
255
|
-
"name": "status",
|
|
256
|
-
"type": "bool"
|
|
257
|
-
}
|
|
258
|
-
],
|
|
259
|
-
"name": "TokenUpdated",
|
|
38
|
+
"name": "Found",
|
|
260
39
|
"type": "event"
|
|
261
40
|
},
|
|
262
41
|
{
|
|
@@ -265,33 +44,27 @@ exports.Vault_jsonAbi = [
|
|
|
265
44
|
{
|
|
266
45
|
"indexed": true,
|
|
267
46
|
"internalType": "address",
|
|
268
|
-
"name": "
|
|
47
|
+
"name": "from",
|
|
269
48
|
"type": "address"
|
|
270
49
|
},
|
|
271
50
|
{
|
|
272
51
|
"indexed": false,
|
|
273
52
|
"internalType": "uint256",
|
|
274
|
-
"name": "
|
|
53
|
+
"name": "amount",
|
|
275
54
|
"type": "uint256"
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
"indexed": false,
|
|
279
|
-
"internalType": "bool",
|
|
280
|
-
"name": "isEmergency",
|
|
281
|
-
"type": "bool"
|
|
282
55
|
}
|
|
283
56
|
],
|
|
284
|
-
"name": "
|
|
57
|
+
"name": "Funded",
|
|
285
58
|
"type": "event"
|
|
286
59
|
},
|
|
287
60
|
{
|
|
288
61
|
"inputs": [],
|
|
289
|
-
"name": "
|
|
62
|
+
"name": "SEAL",
|
|
290
63
|
"outputs": [
|
|
291
64
|
{
|
|
292
|
-
"internalType": "
|
|
65
|
+
"internalType": "bytes32",
|
|
293
66
|
"name": "",
|
|
294
|
-
"type": "
|
|
67
|
+
"type": "bytes32"
|
|
295
68
|
}
|
|
296
69
|
],
|
|
297
70
|
"stateMutability": "view",
|
|
@@ -299,7 +72,7 @@ exports.Vault_jsonAbi = [
|
|
|
299
72
|
},
|
|
300
73
|
{
|
|
301
74
|
"inputs": [],
|
|
302
|
-
"name": "
|
|
75
|
+
"name": "balance",
|
|
303
76
|
"outputs": [
|
|
304
77
|
{
|
|
305
78
|
"internalType": "uint256",
|
|
@@ -312,50 +85,11 @@ exports.Vault_jsonAbi = [
|
|
|
312
85
|
},
|
|
313
86
|
{
|
|
314
87
|
"inputs": [],
|
|
315
|
-
"name": "
|
|
316
|
-
"outputs": [
|
|
317
|
-
{
|
|
318
|
-
"internalType": "uint256",
|
|
319
|
-
"name": "",
|
|
320
|
-
"type": "uint256"
|
|
321
|
-
}
|
|
322
|
-
],
|
|
323
|
-
"stateMutability": "view",
|
|
324
|
-
"type": "function"
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
"inputs": [
|
|
328
|
-
{
|
|
329
|
-
"internalType": "address",
|
|
330
|
-
"name": "",
|
|
331
|
-
"type": "address"
|
|
332
|
-
}
|
|
333
|
-
],
|
|
334
|
-
"name": "allowedTokens",
|
|
88
|
+
"name": "found",
|
|
335
89
|
"outputs": [
|
|
336
|
-
{
|
|
337
|
-
"internalType": "address",
|
|
338
|
-
"name": "token",
|
|
339
|
-
"type": "address"
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
"internalType": "address",
|
|
343
|
-
"name": "stateView",
|
|
344
|
-
"type": "address"
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
"internalType": "bytes32",
|
|
348
|
-
"name": "poolId",
|
|
349
|
-
"type": "bytes32"
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
"internalType": "bool",
|
|
353
|
-
"name": "isToken0",
|
|
354
|
-
"type": "bool"
|
|
355
|
-
},
|
|
356
90
|
{
|
|
357
91
|
"internalType": "bool",
|
|
358
|
-
"name": "
|
|
92
|
+
"name": "",
|
|
359
93
|
"type": "bool"
|
|
360
94
|
}
|
|
361
95
|
],
|
|
@@ -363,352 +97,52 @@ exports.Vault_jsonAbi = [
|
|
|
363
97
|
"type": "function"
|
|
364
98
|
},
|
|
365
99
|
{
|
|
366
|
-
"inputs": [
|
|
100
|
+
"inputs": [],
|
|
101
|
+
"name": "rules",
|
|
102
|
+
"outputs": [
|
|
367
103
|
{
|
|
368
|
-
"internalType": "
|
|
369
|
-
"name": "
|
|
370
|
-
"type": "
|
|
104
|
+
"internalType": "string",
|
|
105
|
+
"name": "",
|
|
106
|
+
"type": "string"
|
|
371
107
|
}
|
|
372
108
|
],
|
|
373
|
-
"
|
|
374
|
-
"outputs": [],
|
|
375
|
-
"stateMutability": "nonpayable",
|
|
109
|
+
"stateMutability": "pure",
|
|
376
110
|
"type": "function"
|
|
377
111
|
},
|
|
378
112
|
{
|
|
379
|
-
"inputs": [
|
|
113
|
+
"inputs": [],
|
|
114
|
+
"name": "state",
|
|
115
|
+
"outputs": [
|
|
380
116
|
{
|
|
381
|
-
"internalType": "
|
|
382
|
-
"name": "
|
|
383
|
-
"type": "
|
|
117
|
+
"internalType": "string",
|
|
118
|
+
"name": "",
|
|
119
|
+
"type": "string"
|
|
384
120
|
}
|
|
385
121
|
],
|
|
386
|
-
"
|
|
387
|
-
"outputs": [],
|
|
388
|
-
"stateMutability": "nonpayable",
|
|
122
|
+
"stateMutability": "view",
|
|
389
123
|
"type": "function"
|
|
390
124
|
},
|
|
391
125
|
{
|
|
392
126
|
"inputs": [
|
|
393
127
|
{
|
|
394
|
-
"internalType": "
|
|
395
|
-
"name": "
|
|
396
|
-
"type": "
|
|
397
|
-
}
|
|
398
|
-
],
|
|
399
|
-
"name": "changeSuccessFee",
|
|
400
|
-
"outputs": [],
|
|
401
|
-
"stateMutability": "nonpayable",
|
|
402
|
-
"type": "function"
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
"inputs": [
|
|
128
|
+
"internalType": "bytes",
|
|
129
|
+
"name": "secret",
|
|
130
|
+
"type": "bytes"
|
|
131
|
+
},
|
|
406
132
|
{
|
|
407
|
-
"internalType": "address",
|
|
408
|
-
"name": "
|
|
133
|
+
"internalType": "address payable",
|
|
134
|
+
"name": "to",
|
|
409
135
|
"type": "address"
|
|
410
136
|
}
|
|
411
137
|
],
|
|
412
|
-
"name": "
|
|
138
|
+
"name": "unlock",
|
|
413
139
|
"outputs": [],
|
|
414
140
|
"stateMutability": "nonpayable",
|
|
415
141
|
"type": "function"
|
|
416
142
|
},
|
|
417
143
|
{
|
|
418
|
-
"
|
|
419
|
-
|
|
420
|
-
"internalType": "address[]",
|
|
421
|
-
"name": "_tokens",
|
|
422
|
-
"type": "address[]"
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
"internalType": "uint256[]",
|
|
426
|
-
"name": "_amounts",
|
|
427
|
-
"type": "uint256[]"
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
"internalType": "uint256",
|
|
431
|
-
"name": "_term",
|
|
432
|
-
"type": "uint256"
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
"internalType": "address",
|
|
436
|
-
"name": "receiver",
|
|
437
|
-
"type": "address"
|
|
438
|
-
}
|
|
439
|
-
],
|
|
440
|
-
"name": "createDeposit",
|
|
441
|
-
"outputs": [
|
|
442
|
-
{
|
|
443
|
-
"internalType": "uint256",
|
|
444
|
-
"name": "",
|
|
445
|
-
"type": "uint256"
|
|
446
|
-
}
|
|
447
|
-
],
|
|
448
|
-
"stateMutability": "nonpayable",
|
|
449
|
-
"type": "function"
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
"inputs": [
|
|
453
|
-
{
|
|
454
|
-
"internalType": "uint256",
|
|
455
|
-
"name": "",
|
|
456
|
-
"type": "uint256"
|
|
457
|
-
}
|
|
458
|
-
],
|
|
459
|
-
"name": "deposits",
|
|
460
|
-
"outputs": [
|
|
461
|
-
{
|
|
462
|
-
"internalType": "uint256",
|
|
463
|
-
"name": "startTimestamp",
|
|
464
|
-
"type": "uint256"
|
|
465
|
-
},
|
|
466
|
-
{
|
|
467
|
-
"internalType": "uint256",
|
|
468
|
-
"name": "endTimestamp",
|
|
469
|
-
"type": "uint256"
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
"internalType": "bool",
|
|
473
|
-
"name": "active",
|
|
474
|
-
"type": "bool"
|
|
475
|
-
}
|
|
476
|
-
],
|
|
477
|
-
"stateMutability": "view",
|
|
478
|
-
"type": "function"
|
|
479
|
-
},
|
|
480
|
-
{
|
|
481
|
-
"inputs": [],
|
|
482
|
-
"name": "emergencyPenalty",
|
|
483
|
-
"outputs": [
|
|
484
|
-
{
|
|
485
|
-
"internalType": "uint256",
|
|
486
|
-
"name": "",
|
|
487
|
-
"type": "uint256"
|
|
488
|
-
}
|
|
489
|
-
],
|
|
490
|
-
"stateMutability": "view",
|
|
491
|
-
"type": "function"
|
|
492
|
-
},
|
|
493
|
-
{
|
|
494
|
-
"inputs": [],
|
|
495
|
-
"name": "emergencyPenaltyReceiver",
|
|
496
|
-
"outputs": [
|
|
497
|
-
{
|
|
498
|
-
"internalType": "address",
|
|
499
|
-
"name": "",
|
|
500
|
-
"type": "address"
|
|
501
|
-
}
|
|
502
|
-
],
|
|
503
|
-
"stateMutability": "view",
|
|
504
|
-
"type": "function"
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
"inputs": [
|
|
508
|
-
{
|
|
509
|
-
"internalType": "uint256",
|
|
510
|
-
"name": "_uid",
|
|
511
|
-
"type": "uint256"
|
|
512
|
-
}
|
|
513
|
-
],
|
|
514
|
-
"name": "emergencyWithdraw",
|
|
515
|
-
"outputs": [],
|
|
516
|
-
"stateMutability": "nonpayable",
|
|
517
|
-
"type": "function"
|
|
518
|
-
},
|
|
519
|
-
{
|
|
520
|
-
"inputs": [
|
|
521
|
-
{
|
|
522
|
-
"internalType": "uint256",
|
|
523
|
-
"name": "_uid",
|
|
524
|
-
"type": "uint256"
|
|
525
|
-
}
|
|
526
|
-
],
|
|
527
|
-
"name": "getDepositProfit",
|
|
528
|
-
"outputs": [
|
|
529
|
-
{
|
|
530
|
-
"internalType": "uint256",
|
|
531
|
-
"name": "",
|
|
532
|
-
"type": "uint256"
|
|
533
|
-
}
|
|
534
|
-
],
|
|
535
|
-
"stateMutability": "view",
|
|
536
|
-
"type": "function"
|
|
537
|
-
},
|
|
538
|
-
{
|
|
539
|
-
"inputs": [],
|
|
540
|
-
"name": "nftContract",
|
|
541
|
-
"outputs": [
|
|
542
|
-
{
|
|
543
|
-
"internalType": "contract IERC721",
|
|
544
|
-
"name": "",
|
|
545
|
-
"type": "address"
|
|
546
|
-
}
|
|
547
|
-
],
|
|
548
|
-
"stateMutability": "view",
|
|
549
|
-
"type": "function"
|
|
550
|
-
},
|
|
551
|
-
{
|
|
552
|
-
"inputs": [],
|
|
553
|
-
"name": "owner",
|
|
554
|
-
"outputs": [
|
|
555
|
-
{
|
|
556
|
-
"internalType": "address",
|
|
557
|
-
"name": "",
|
|
558
|
-
"type": "address"
|
|
559
|
-
}
|
|
560
|
-
],
|
|
561
|
-
"stateMutability": "view",
|
|
562
|
-
"type": "function"
|
|
563
|
-
},
|
|
564
|
-
{
|
|
565
|
-
"inputs": [],
|
|
566
|
-
"name": "renounceOwnership",
|
|
567
|
-
"outputs": [],
|
|
568
|
-
"stateMutability": "nonpayable",
|
|
569
|
-
"type": "function"
|
|
570
|
-
},
|
|
571
|
-
{
|
|
572
|
-
"inputs": [
|
|
573
|
-
{
|
|
574
|
-
"internalType": "address",
|
|
575
|
-
"name": "_token",
|
|
576
|
-
"type": "address"
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
"internalType": "address",
|
|
580
|
-
"name": "_stateView",
|
|
581
|
-
"type": "address"
|
|
582
|
-
},
|
|
583
|
-
{
|
|
584
|
-
"internalType": "bytes32",
|
|
585
|
-
"name": "_poolId",
|
|
586
|
-
"type": "bytes32"
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
"internalType": "bool",
|
|
590
|
-
"name": "_isToken0",
|
|
591
|
-
"type": "bool"
|
|
592
|
-
},
|
|
593
|
-
{
|
|
594
|
-
"internalType": "bool",
|
|
595
|
-
"name": "_status",
|
|
596
|
-
"type": "bool"
|
|
597
|
-
}
|
|
598
|
-
],
|
|
599
|
-
"name": "setAllowedToken",
|
|
600
|
-
"outputs": [],
|
|
601
|
-
"stateMutability": "nonpayable",
|
|
602
|
-
"type": "function"
|
|
603
|
-
},
|
|
604
|
-
{
|
|
605
|
-
"inputs": [],
|
|
606
|
-
"name": "successFee",
|
|
607
|
-
"outputs": [
|
|
608
|
-
{
|
|
609
|
-
"internalType": "uint256",
|
|
610
|
-
"name": "",
|
|
611
|
-
"type": "uint256"
|
|
612
|
-
}
|
|
613
|
-
],
|
|
614
|
-
"stateMutability": "view",
|
|
615
|
-
"type": "function"
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
"inputs": [],
|
|
619
|
-
"name": "successFeeReceiver",
|
|
620
|
-
"outputs": [
|
|
621
|
-
{
|
|
622
|
-
"internalType": "address",
|
|
623
|
-
"name": "",
|
|
624
|
-
"type": "address"
|
|
625
|
-
}
|
|
626
|
-
],
|
|
627
|
-
"stateMutability": "view",
|
|
628
|
-
"type": "function"
|
|
629
|
-
},
|
|
630
|
-
{
|
|
631
|
-
"inputs": [
|
|
632
|
-
{
|
|
633
|
-
"internalType": "address",
|
|
634
|
-
"name": "newOwner",
|
|
635
|
-
"type": "address"
|
|
636
|
-
}
|
|
637
|
-
],
|
|
638
|
-
"name": "transferOwnership",
|
|
639
|
-
"outputs": [],
|
|
640
|
-
"stateMutability": "nonpayable",
|
|
641
|
-
"type": "function"
|
|
642
|
-
},
|
|
643
|
-
{
|
|
644
|
-
"inputs": [
|
|
645
|
-
{
|
|
646
|
-
"internalType": "uint256",
|
|
647
|
-
"name": "_uid",
|
|
648
|
-
"type": "uint256"
|
|
649
|
-
}
|
|
650
|
-
],
|
|
651
|
-
"name": "viewAmountListById",
|
|
652
|
-
"outputs": [
|
|
653
|
-
{
|
|
654
|
-
"internalType": "uint256[]",
|
|
655
|
-
"name": "",
|
|
656
|
-
"type": "uint256[]"
|
|
657
|
-
}
|
|
658
|
-
],
|
|
659
|
-
"stateMutability": "view",
|
|
660
|
-
"type": "function"
|
|
661
|
-
},
|
|
662
|
-
{
|
|
663
|
-
"inputs": [
|
|
664
|
-
{
|
|
665
|
-
"internalType": "uint256",
|
|
666
|
-
"name": "_uid",
|
|
667
|
-
"type": "uint256"
|
|
668
|
-
}
|
|
669
|
-
],
|
|
670
|
-
"name": "viewStartPriceX96ListById",
|
|
671
|
-
"outputs": [
|
|
672
|
-
{
|
|
673
|
-
"internalType": "uint256[]",
|
|
674
|
-
"name": "",
|
|
675
|
-
"type": "uint256[]"
|
|
676
|
-
}
|
|
677
|
-
],
|
|
678
|
-
"stateMutability": "view",
|
|
679
|
-
"type": "function"
|
|
680
|
-
},
|
|
681
|
-
{
|
|
682
|
-
"inputs": [
|
|
683
|
-
{
|
|
684
|
-
"internalType": "uint256",
|
|
685
|
-
"name": "_uid",
|
|
686
|
-
"type": "uint256"
|
|
687
|
-
}
|
|
688
|
-
],
|
|
689
|
-
"name": "viewTokenListById",
|
|
690
|
-
"outputs": [
|
|
691
|
-
{
|
|
692
|
-
"internalType": "address[]",
|
|
693
|
-
"name": "",
|
|
694
|
-
"type": "address[]"
|
|
695
|
-
}
|
|
696
|
-
],
|
|
697
|
-
"stateMutability": "view",
|
|
698
|
-
"type": "function"
|
|
699
|
-
},
|
|
700
|
-
{
|
|
701
|
-
"inputs": [
|
|
702
|
-
{
|
|
703
|
-
"internalType": "uint256",
|
|
704
|
-
"name": "_uid",
|
|
705
|
-
"type": "uint256"
|
|
706
|
-
}
|
|
707
|
-
],
|
|
708
|
-
"name": "withdraw",
|
|
709
|
-
"outputs": [],
|
|
710
|
-
"stateMutability": "nonpayable",
|
|
711
|
-
"type": "function"
|
|
144
|
+
"stateMutability": "payable",
|
|
145
|
+
"type": "receive"
|
|
712
146
|
}
|
|
713
147
|
];
|
|
714
148
|
/**
|
|
@@ -769,219 +203,50 @@ class Vault_json {
|
|
|
769
203
|
return this.contract;
|
|
770
204
|
}
|
|
771
205
|
/**
|
|
772
|
-
*
|
|
206
|
+
* SEAL
|
|
773
207
|
* view
|
|
774
208
|
*/
|
|
775
|
-
async
|
|
776
|
-
return this.contract.read.
|
|
209
|
+
async SEAL() {
|
|
210
|
+
return this.contract.read.SEAL();
|
|
777
211
|
}
|
|
778
212
|
/**
|
|
779
|
-
*
|
|
213
|
+
* balance
|
|
780
214
|
* view
|
|
781
215
|
*/
|
|
782
|
-
async
|
|
783
|
-
return this.contract.read.
|
|
216
|
+
async balance() {
|
|
217
|
+
return this.contract.read.balance();
|
|
784
218
|
}
|
|
785
219
|
/**
|
|
786
|
-
*
|
|
220
|
+
* found
|
|
787
221
|
* view
|
|
788
222
|
*/
|
|
789
|
-
async
|
|
790
|
-
return this.contract.read.
|
|
223
|
+
async found() {
|
|
224
|
+
return this.contract.read.found();
|
|
791
225
|
}
|
|
792
226
|
/**
|
|
793
|
-
*
|
|
794
|
-
*
|
|
227
|
+
* rules
|
|
228
|
+
* pure
|
|
795
229
|
*/
|
|
796
|
-
async
|
|
797
|
-
return this.contract.read.
|
|
230
|
+
async rules() {
|
|
231
|
+
return this.contract.read.rules();
|
|
798
232
|
}
|
|
799
233
|
/**
|
|
800
|
-
*
|
|
234
|
+
* state
|
|
801
235
|
* view
|
|
802
236
|
*/
|
|
803
|
-
async
|
|
804
|
-
return this.contract.read.
|
|
237
|
+
async state() {
|
|
238
|
+
return this.contract.read.state();
|
|
805
239
|
}
|
|
806
240
|
/**
|
|
807
|
-
*
|
|
808
|
-
* view
|
|
809
|
-
*/
|
|
810
|
-
async emergencyPenalty() {
|
|
811
|
-
return this.contract.read.emergencyPenalty();
|
|
812
|
-
}
|
|
813
|
-
/**
|
|
814
|
-
* emergencyPenaltyReceiver
|
|
815
|
-
* view
|
|
816
|
-
*/
|
|
817
|
-
async emergencyPenaltyReceiver() {
|
|
818
|
-
return this.contract.read.emergencyPenaltyReceiver();
|
|
819
|
-
}
|
|
820
|
-
/**
|
|
821
|
-
* getDepositProfit
|
|
822
|
-
* view
|
|
823
|
-
*/
|
|
824
|
-
async getDepositProfit(_uid) {
|
|
825
|
-
return this.contract.read.getDepositProfit([_uid]);
|
|
826
|
-
}
|
|
827
|
-
/**
|
|
828
|
-
* nftContract
|
|
829
|
-
* view
|
|
830
|
-
*/
|
|
831
|
-
async nftContract() {
|
|
832
|
-
return this.contract.read.nftContract();
|
|
833
|
-
}
|
|
834
|
-
/**
|
|
835
|
-
* owner
|
|
836
|
-
* view
|
|
837
|
-
*/
|
|
838
|
-
async owner() {
|
|
839
|
-
return this.contract.read.owner();
|
|
840
|
-
}
|
|
841
|
-
/**
|
|
842
|
-
* successFee
|
|
843
|
-
* view
|
|
844
|
-
*/
|
|
845
|
-
async successFee() {
|
|
846
|
-
return this.contract.read.successFee();
|
|
847
|
-
}
|
|
848
|
-
/**
|
|
849
|
-
* successFeeReceiver
|
|
850
|
-
* view
|
|
851
|
-
*/
|
|
852
|
-
async successFeeReceiver() {
|
|
853
|
-
return this.contract.read.successFeeReceiver();
|
|
854
|
-
}
|
|
855
|
-
/**
|
|
856
|
-
* viewAmountListById
|
|
857
|
-
* view
|
|
858
|
-
*/
|
|
859
|
-
async viewAmountListById(_uid) {
|
|
860
|
-
return this.contract.read.viewAmountListById([_uid]);
|
|
861
|
-
}
|
|
862
|
-
/**
|
|
863
|
-
* viewStartPriceX96ListById
|
|
864
|
-
* view
|
|
865
|
-
*/
|
|
866
|
-
async viewStartPriceX96ListById(_uid) {
|
|
867
|
-
return this.contract.read.viewStartPriceX96ListById([_uid]);
|
|
868
|
-
}
|
|
869
|
-
/**
|
|
870
|
-
* viewTokenListById
|
|
871
|
-
* view
|
|
872
|
-
*/
|
|
873
|
-
async viewTokenListById(_uid) {
|
|
874
|
-
return this.contract.read.viewTokenListById([_uid]);
|
|
875
|
-
}
|
|
876
|
-
/**
|
|
877
|
-
* changeEmergencyPenalty
|
|
878
|
-
* nonpayable
|
|
879
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
880
|
-
*/
|
|
881
|
-
async changeEmergencyPenalty(_newEmergencyPenalty, options) {
|
|
882
|
-
if (!this.contract.write) {
|
|
883
|
-
throw new Error('Wallet client is required for write operations');
|
|
884
|
-
}
|
|
885
|
-
return this.contract.write.changeEmergencyPenalty([_newEmergencyPenalty], options);
|
|
886
|
-
}
|
|
887
|
-
/**
|
|
888
|
-
* changeEmergencyPenaltyReceiver
|
|
889
|
-
* nonpayable
|
|
890
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
891
|
-
*/
|
|
892
|
-
async changeEmergencyPenaltyReceiver(_newEmergencyPenaltyReveiver, options) {
|
|
893
|
-
if (!this.contract.write) {
|
|
894
|
-
throw new Error('Wallet client is required for write operations');
|
|
895
|
-
}
|
|
896
|
-
return this.contract.write.changeEmergencyPenaltyReceiver([_newEmergencyPenaltyReveiver], options);
|
|
897
|
-
}
|
|
898
|
-
/**
|
|
899
|
-
* changeSuccessFee
|
|
900
|
-
* nonpayable
|
|
901
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
902
|
-
*/
|
|
903
|
-
async changeSuccessFee(_newSuccessFee, options) {
|
|
904
|
-
if (!this.contract.write) {
|
|
905
|
-
throw new Error('Wallet client is required for write operations');
|
|
906
|
-
}
|
|
907
|
-
return this.contract.write.changeSuccessFee([_newSuccessFee], options);
|
|
908
|
-
}
|
|
909
|
-
/**
|
|
910
|
-
* changeSuccessFeeReceiver
|
|
911
|
-
* nonpayable
|
|
912
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
913
|
-
*/
|
|
914
|
-
async changeSuccessFeeReceiver(_successFeeReceiver, options) {
|
|
915
|
-
if (!this.contract.write) {
|
|
916
|
-
throw new Error('Wallet client is required for write operations');
|
|
917
|
-
}
|
|
918
|
-
return this.contract.write.changeSuccessFeeReceiver([_successFeeReceiver], options);
|
|
919
|
-
}
|
|
920
|
-
/**
|
|
921
|
-
* createDeposit
|
|
922
|
-
* nonpayable
|
|
923
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
924
|
-
*/
|
|
925
|
-
async createDeposit(_tokens, _amounts, _term, receiver, options) {
|
|
926
|
-
if (!this.contract.write) {
|
|
927
|
-
throw new Error('Wallet client is required for write operations');
|
|
928
|
-
}
|
|
929
|
-
return this.contract.write.createDeposit([_tokens, _amounts, _term, receiver], options);
|
|
930
|
-
}
|
|
931
|
-
/**
|
|
932
|
-
* emergencyWithdraw
|
|
933
|
-
* nonpayable
|
|
934
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
935
|
-
*/
|
|
936
|
-
async emergencyWithdraw(_uid, options) {
|
|
937
|
-
if (!this.contract.write) {
|
|
938
|
-
throw new Error('Wallet client is required for write operations');
|
|
939
|
-
}
|
|
940
|
-
return this.contract.write.emergencyWithdraw([_uid], options);
|
|
941
|
-
}
|
|
942
|
-
/**
|
|
943
|
-
* renounceOwnership
|
|
944
|
-
* nonpayable
|
|
945
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
946
|
-
*/
|
|
947
|
-
async renounceOwnership(options) {
|
|
948
|
-
if (!this.contract.write) {
|
|
949
|
-
throw new Error('Wallet client is required for write operations');
|
|
950
|
-
}
|
|
951
|
-
return this.contract.write.renounceOwnership(options);
|
|
952
|
-
}
|
|
953
|
-
/**
|
|
954
|
-
* setAllowedToken
|
|
955
|
-
* nonpayable
|
|
956
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
957
|
-
*/
|
|
958
|
-
async setAllowedToken(_token, _stateView, _poolId, _isToken0, _status, options) {
|
|
959
|
-
if (!this.contract.write) {
|
|
960
|
-
throw new Error('Wallet client is required for write operations');
|
|
961
|
-
}
|
|
962
|
-
return this.contract.write.setAllowedToken([_token, _stateView, _poolId, _isToken0, _status], options);
|
|
963
|
-
}
|
|
964
|
-
/**
|
|
965
|
-
* transferOwnership
|
|
241
|
+
* unlock
|
|
966
242
|
* nonpayable
|
|
967
243
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
968
244
|
*/
|
|
969
|
-
async
|
|
245
|
+
async unlock(secret, to, options) {
|
|
970
246
|
if (!this.contract.write) {
|
|
971
247
|
throw new Error('Wallet client is required for write operations');
|
|
972
248
|
}
|
|
973
|
-
return this.contract.write.
|
|
974
|
-
}
|
|
975
|
-
/**
|
|
976
|
-
* withdraw
|
|
977
|
-
* nonpayable
|
|
978
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
979
|
-
*/
|
|
980
|
-
async withdraw(_uid, options) {
|
|
981
|
-
if (!this.contract.write) {
|
|
982
|
-
throw new Error('Wallet client is required for write operations');
|
|
983
|
-
}
|
|
984
|
-
return this.contract.write.withdraw([_uid], options);
|
|
249
|
+
return this.contract.write.unlock([secret, to], options);
|
|
985
250
|
}
|
|
986
251
|
/**
|
|
987
252
|
* Simulate contract write operations (dry-run without sending transaction)
|
|
@@ -998,84 +263,12 @@ class Vault_json {
|
|
|
998
263
|
}
|
|
999
264
|
return {
|
|
1000
265
|
/**
|
|
1001
|
-
* Simulate
|
|
1002
|
-
* Returns gas estimate and result without sending transaction
|
|
1003
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1004
|
-
*/
|
|
1005
|
-
async changeEmergencyPenalty(_newEmergencyPenalty, options) {
|
|
1006
|
-
return contract.simulate.changeEmergencyPenalty([_newEmergencyPenalty], options);
|
|
1007
|
-
},
|
|
1008
|
-
/**
|
|
1009
|
-
* Simulate changeEmergencyPenaltyReceiver
|
|
1010
|
-
* Returns gas estimate and result without sending transaction
|
|
1011
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1012
|
-
*/
|
|
1013
|
-
async changeEmergencyPenaltyReceiver(_newEmergencyPenaltyReveiver, options) {
|
|
1014
|
-
return contract.simulate.changeEmergencyPenaltyReceiver([_newEmergencyPenaltyReveiver], options);
|
|
1015
|
-
},
|
|
1016
|
-
/**
|
|
1017
|
-
* Simulate changeSuccessFee
|
|
1018
|
-
* Returns gas estimate and result without sending transaction
|
|
1019
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1020
|
-
*/
|
|
1021
|
-
async changeSuccessFee(_newSuccessFee, options) {
|
|
1022
|
-
return contract.simulate.changeSuccessFee([_newSuccessFee], options);
|
|
1023
|
-
},
|
|
1024
|
-
/**
|
|
1025
|
-
* Simulate changeSuccessFeeReceiver
|
|
1026
|
-
* Returns gas estimate and result without sending transaction
|
|
1027
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1028
|
-
*/
|
|
1029
|
-
async changeSuccessFeeReceiver(_successFeeReceiver, options) {
|
|
1030
|
-
return contract.simulate.changeSuccessFeeReceiver([_successFeeReceiver], options);
|
|
1031
|
-
},
|
|
1032
|
-
/**
|
|
1033
|
-
* Simulate createDeposit
|
|
1034
|
-
* Returns gas estimate and result without sending transaction
|
|
1035
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1036
|
-
*/
|
|
1037
|
-
async createDeposit(_tokens, _amounts, _term, receiver, options) {
|
|
1038
|
-
return contract.simulate.createDeposit([_tokens, _amounts, _term, receiver], options);
|
|
1039
|
-
},
|
|
1040
|
-
/**
|
|
1041
|
-
* Simulate emergencyWithdraw
|
|
1042
|
-
* Returns gas estimate and result without sending transaction
|
|
1043
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1044
|
-
*/
|
|
1045
|
-
async emergencyWithdraw(_uid, options) {
|
|
1046
|
-
return contract.simulate.emergencyWithdraw([_uid], options);
|
|
1047
|
-
},
|
|
1048
|
-
/**
|
|
1049
|
-
* Simulate renounceOwnership
|
|
1050
|
-
* Returns gas estimate and result without sending transaction
|
|
1051
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1052
|
-
*/
|
|
1053
|
-
async renounceOwnership(options) {
|
|
1054
|
-
return contract.simulate.renounceOwnership(options);
|
|
1055
|
-
},
|
|
1056
|
-
/**
|
|
1057
|
-
* Simulate setAllowedToken
|
|
1058
|
-
* Returns gas estimate and result without sending transaction
|
|
1059
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1060
|
-
*/
|
|
1061
|
-
async setAllowedToken(_token, _stateView, _poolId, _isToken0, _status, options) {
|
|
1062
|
-
return contract.simulate.setAllowedToken([_token, _stateView, _poolId, _isToken0, _status], options);
|
|
1063
|
-
},
|
|
1064
|
-
/**
|
|
1065
|
-
* Simulate transferOwnership
|
|
266
|
+
* Simulate unlock
|
|
1066
267
|
* Returns gas estimate and result without sending transaction
|
|
1067
268
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1068
269
|
*/
|
|
1069
|
-
async
|
|
1070
|
-
return contract.simulate.
|
|
1071
|
-
},
|
|
1072
|
-
/**
|
|
1073
|
-
* Simulate withdraw
|
|
1074
|
-
* Returns gas estimate and result without sending transaction
|
|
1075
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1076
|
-
*/
|
|
1077
|
-
async withdraw(_uid, options) {
|
|
1078
|
-
return contract.simulate.withdraw([_uid], options);
|
|
270
|
+
async unlock(secret, to, options) {
|
|
271
|
+
return contract.simulate.unlock([secret, to], options);
|
|
1079
272
|
}
|
|
1080
273
|
};
|
|
1081
274
|
}
|
|
@@ -1094,34 +287,16 @@ class Vault_json {
|
|
|
1094
287
|
get watch() {
|
|
1095
288
|
return {
|
|
1096
289
|
/**
|
|
1097
|
-
* Watch
|
|
290
|
+
* Watch Found events
|
|
1098
291
|
* @param callback Function to call when event is emitted
|
|
1099
292
|
* @param filter Optional filter for indexed parameters
|
|
1100
293
|
* @returns Unwatch function to stop listening
|
|
1101
294
|
*/
|
|
1102
|
-
|
|
295
|
+
Found: (callback, filter) => {
|
|
1103
296
|
return this.publicClient.watchContractEvent({
|
|
1104
297
|
address: this.contractAddress,
|
|
1105
298
|
abi: exports.Vault_jsonAbi,
|
|
1106
|
-
eventName: '
|
|
1107
|
-
onLogs: (logs) => {
|
|
1108
|
-
logs.forEach((log) => {
|
|
1109
|
-
callback(log.args);
|
|
1110
|
-
});
|
|
1111
|
-
},
|
|
1112
|
-
});
|
|
1113
|
-
},
|
|
1114
|
-
/**
|
|
1115
|
-
* Watch OwnershipTransferred events
|
|
1116
|
-
* @param callback Function to call when event is emitted
|
|
1117
|
-
* @param filter Optional filter for indexed parameters
|
|
1118
|
-
* @returns Unwatch function to stop listening
|
|
1119
|
-
*/
|
|
1120
|
-
OwnershipTransferred: (callback, filter) => {
|
|
1121
|
-
return this.publicClient.watchContractEvent({
|
|
1122
|
-
address: this.contractAddress,
|
|
1123
|
-
abi: exports.Vault_jsonAbi,
|
|
1124
|
-
eventName: 'OwnershipTransferred',
|
|
299
|
+
eventName: 'Found',
|
|
1125
300
|
args: filter,
|
|
1126
301
|
onLogs: (logs) => {
|
|
1127
302
|
logs.forEach((log) => {
|
|
@@ -1131,124 +306,16 @@ class Vault_json {
|
|
|
1131
306
|
});
|
|
1132
307
|
},
|
|
1133
308
|
/**
|
|
1134
|
-
* Watch
|
|
1135
|
-
* @param callback Function to call when event is emitted
|
|
1136
|
-
* @param filter Optional filter for indexed parameters
|
|
1137
|
-
* @returns Unwatch function to stop listening
|
|
1138
|
-
*/
|
|
1139
|
-
SetEmergencyPenalty: (callback) => {
|
|
1140
|
-
return this.publicClient.watchContractEvent({
|
|
1141
|
-
address: this.contractAddress,
|
|
1142
|
-
abi: exports.Vault_jsonAbi,
|
|
1143
|
-
eventName: 'SetEmergencyPenalty',
|
|
1144
|
-
onLogs: (logs) => {
|
|
1145
|
-
logs.forEach((log) => {
|
|
1146
|
-
callback(log.args);
|
|
1147
|
-
});
|
|
1148
|
-
},
|
|
1149
|
-
});
|
|
1150
|
-
},
|
|
1151
|
-
/**
|
|
1152
|
-
* Watch SetEmergencyPenaltyReceiver events
|
|
1153
|
-
* @param callback Function to call when event is emitted
|
|
1154
|
-
* @param filter Optional filter for indexed parameters
|
|
1155
|
-
* @returns Unwatch function to stop listening
|
|
1156
|
-
*/
|
|
1157
|
-
SetEmergencyPenaltyReceiver: (callback) => {
|
|
1158
|
-
return this.publicClient.watchContractEvent({
|
|
1159
|
-
address: this.contractAddress,
|
|
1160
|
-
abi: exports.Vault_jsonAbi,
|
|
1161
|
-
eventName: 'SetEmergencyPenaltyReceiver',
|
|
1162
|
-
onLogs: (logs) => {
|
|
1163
|
-
logs.forEach((log) => {
|
|
1164
|
-
callback(log.args);
|
|
1165
|
-
});
|
|
1166
|
-
},
|
|
1167
|
-
});
|
|
1168
|
-
},
|
|
1169
|
-
/**
|
|
1170
|
-
* Watch SetSuccessFee events
|
|
1171
|
-
* @param callback Function to call when event is emitted
|
|
1172
|
-
* @param filter Optional filter for indexed parameters
|
|
1173
|
-
* @returns Unwatch function to stop listening
|
|
1174
|
-
*/
|
|
1175
|
-
SetSuccessFee: (callback) => {
|
|
1176
|
-
return this.publicClient.watchContractEvent({
|
|
1177
|
-
address: this.contractAddress,
|
|
1178
|
-
abi: exports.Vault_jsonAbi,
|
|
1179
|
-
eventName: 'SetSuccessFee',
|
|
1180
|
-
onLogs: (logs) => {
|
|
1181
|
-
logs.forEach((log) => {
|
|
1182
|
-
callback(log.args);
|
|
1183
|
-
});
|
|
1184
|
-
},
|
|
1185
|
-
});
|
|
1186
|
-
},
|
|
1187
|
-
/**
|
|
1188
|
-
* Watch SetSuccessFeeReceiver events
|
|
1189
|
-
* @param callback Function to call when event is emitted
|
|
1190
|
-
* @param filter Optional filter for indexed parameters
|
|
1191
|
-
* @returns Unwatch function to stop listening
|
|
1192
|
-
*/
|
|
1193
|
-
SetSuccessFeeReceiver: (callback) => {
|
|
1194
|
-
return this.publicClient.watchContractEvent({
|
|
1195
|
-
address: this.contractAddress,
|
|
1196
|
-
abi: exports.Vault_jsonAbi,
|
|
1197
|
-
eventName: 'SetSuccessFeeReceiver',
|
|
1198
|
-
onLogs: (logs) => {
|
|
1199
|
-
logs.forEach((log) => {
|
|
1200
|
-
callback(log.args);
|
|
1201
|
-
});
|
|
1202
|
-
},
|
|
1203
|
-
});
|
|
1204
|
-
},
|
|
1205
|
-
/**
|
|
1206
|
-
* Watch SuccessFeeCharged events
|
|
1207
|
-
* @param callback Function to call when event is emitted
|
|
1208
|
-
* @param filter Optional filter for indexed parameters
|
|
1209
|
-
* @returns Unwatch function to stop listening
|
|
1210
|
-
*/
|
|
1211
|
-
SuccessFeeCharged: (callback) => {
|
|
1212
|
-
return this.publicClient.watchContractEvent({
|
|
1213
|
-
address: this.contractAddress,
|
|
1214
|
-
abi: exports.Vault_jsonAbi,
|
|
1215
|
-
eventName: 'SuccessFeeCharged',
|
|
1216
|
-
onLogs: (logs) => {
|
|
1217
|
-
logs.forEach((log) => {
|
|
1218
|
-
callback(log.args);
|
|
1219
|
-
});
|
|
1220
|
-
},
|
|
1221
|
-
});
|
|
1222
|
-
},
|
|
1223
|
-
/**
|
|
1224
|
-
* Watch TokenUpdated events
|
|
1225
|
-
* @param callback Function to call when event is emitted
|
|
1226
|
-
* @param filter Optional filter for indexed parameters
|
|
1227
|
-
* @returns Unwatch function to stop listening
|
|
1228
|
-
*/
|
|
1229
|
-
TokenUpdated: (callback) => {
|
|
1230
|
-
return this.publicClient.watchContractEvent({
|
|
1231
|
-
address: this.contractAddress,
|
|
1232
|
-
abi: exports.Vault_jsonAbi,
|
|
1233
|
-
eventName: 'TokenUpdated',
|
|
1234
|
-
onLogs: (logs) => {
|
|
1235
|
-
logs.forEach((log) => {
|
|
1236
|
-
callback(log.args);
|
|
1237
|
-
});
|
|
1238
|
-
},
|
|
1239
|
-
});
|
|
1240
|
-
},
|
|
1241
|
-
/**
|
|
1242
|
-
* Watch Withdraw events
|
|
309
|
+
* Watch Funded events
|
|
1243
310
|
* @param callback Function to call when event is emitted
|
|
1244
311
|
* @param filter Optional filter for indexed parameters
|
|
1245
312
|
* @returns Unwatch function to stop listening
|
|
1246
313
|
*/
|
|
1247
|
-
|
|
314
|
+
Funded: (callback, filter) => {
|
|
1248
315
|
return this.publicClient.watchContractEvent({
|
|
1249
316
|
address: this.contractAddress,
|
|
1250
317
|
abi: exports.Vault_jsonAbi,
|
|
1251
|
-
eventName: '
|
|
318
|
+
eventName: 'Funded',
|
|
1252
319
|
args: filter,
|
|
1253
320
|
onLogs: (logs) => {
|
|
1254
321
|
logs.forEach((log) => {
|