@gitmyabi/eth2x-fli 1.0.0
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 +108 -0
- package/contracts/SetToken_json.d.ts +2137 -0
- package/contracts/SetToken_json.js +2237 -0
- package/contracts/SetToken_json.ts +2832 -0
- package/contracts/index.d.ts +2 -0
- package/contracts/index.js +7 -0
- package/contracts/index.ts +3 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +43 -0
|
@@ -0,0 +1,2237 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetToken_json = exports.SetToken_jsonAbi = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
/**
|
|
6
|
+
* SetToken_json ABI
|
|
7
|
+
*
|
|
8
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
9
|
+
*/
|
|
10
|
+
exports.SetToken_jsonAbi = [
|
|
11
|
+
{
|
|
12
|
+
"inputs": [
|
|
13
|
+
{
|
|
14
|
+
"internalType": "address[]",
|
|
15
|
+
"name": "_components",
|
|
16
|
+
"type": "address[]"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"internalType": "int256[]",
|
|
20
|
+
"name": "_units",
|
|
21
|
+
"type": "int256[]"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"internalType": "address[]",
|
|
25
|
+
"name": "_modules",
|
|
26
|
+
"type": "address[]"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"internalType": "contract IController",
|
|
30
|
+
"name": "_controller",
|
|
31
|
+
"type": "address"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"internalType": "address",
|
|
35
|
+
"name": "_manager",
|
|
36
|
+
"type": "address"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"internalType": "string",
|
|
40
|
+
"name": "_name",
|
|
41
|
+
"type": "string"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"internalType": "string",
|
|
45
|
+
"name": "_symbol",
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"stateMutability": "nonpayable",
|
|
50
|
+
"type": "constructor"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"anonymous": false,
|
|
54
|
+
"inputs": [
|
|
55
|
+
{
|
|
56
|
+
"indexed": true,
|
|
57
|
+
"internalType": "address",
|
|
58
|
+
"name": "owner",
|
|
59
|
+
"type": "address"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"indexed": true,
|
|
63
|
+
"internalType": "address",
|
|
64
|
+
"name": "spender",
|
|
65
|
+
"type": "address"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"indexed": false,
|
|
69
|
+
"internalType": "uint256",
|
|
70
|
+
"name": "value",
|
|
71
|
+
"type": "uint256"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"name": "Approval",
|
|
75
|
+
"type": "event"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"anonymous": false,
|
|
79
|
+
"inputs": [
|
|
80
|
+
{
|
|
81
|
+
"indexed": true,
|
|
82
|
+
"internalType": "address",
|
|
83
|
+
"name": "_component",
|
|
84
|
+
"type": "address"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"name": "ComponentAdded",
|
|
88
|
+
"type": "event"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"anonymous": false,
|
|
92
|
+
"inputs": [
|
|
93
|
+
{
|
|
94
|
+
"indexed": true,
|
|
95
|
+
"internalType": "address",
|
|
96
|
+
"name": "_component",
|
|
97
|
+
"type": "address"
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"name": "ComponentRemoved",
|
|
101
|
+
"type": "event"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"anonymous": false,
|
|
105
|
+
"inputs": [
|
|
106
|
+
{
|
|
107
|
+
"indexed": true,
|
|
108
|
+
"internalType": "address",
|
|
109
|
+
"name": "_component",
|
|
110
|
+
"type": "address"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"indexed": false,
|
|
114
|
+
"internalType": "int256",
|
|
115
|
+
"name": "_realUnit",
|
|
116
|
+
"type": "int256"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"name": "DefaultPositionUnitEdited",
|
|
120
|
+
"type": "event"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"anonymous": false,
|
|
124
|
+
"inputs": [
|
|
125
|
+
{
|
|
126
|
+
"indexed": true,
|
|
127
|
+
"internalType": "address",
|
|
128
|
+
"name": "_component",
|
|
129
|
+
"type": "address"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"indexed": true,
|
|
133
|
+
"internalType": "address",
|
|
134
|
+
"name": "_positionModule",
|
|
135
|
+
"type": "address"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"indexed": false,
|
|
139
|
+
"internalType": "bytes",
|
|
140
|
+
"name": "_data",
|
|
141
|
+
"type": "bytes"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"name": "ExternalPositionDataEdited",
|
|
145
|
+
"type": "event"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"anonymous": false,
|
|
149
|
+
"inputs": [
|
|
150
|
+
{
|
|
151
|
+
"indexed": true,
|
|
152
|
+
"internalType": "address",
|
|
153
|
+
"name": "_component",
|
|
154
|
+
"type": "address"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"indexed": true,
|
|
158
|
+
"internalType": "address",
|
|
159
|
+
"name": "_positionModule",
|
|
160
|
+
"type": "address"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"indexed": false,
|
|
164
|
+
"internalType": "int256",
|
|
165
|
+
"name": "_realUnit",
|
|
166
|
+
"type": "int256"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"name": "ExternalPositionUnitEdited",
|
|
170
|
+
"type": "event"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"anonymous": false,
|
|
174
|
+
"inputs": [
|
|
175
|
+
{
|
|
176
|
+
"indexed": true,
|
|
177
|
+
"internalType": "address",
|
|
178
|
+
"name": "_target",
|
|
179
|
+
"type": "address"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"indexed": true,
|
|
183
|
+
"internalType": "uint256",
|
|
184
|
+
"name": "_value",
|
|
185
|
+
"type": "uint256"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"indexed": false,
|
|
189
|
+
"internalType": "bytes",
|
|
190
|
+
"name": "_data",
|
|
191
|
+
"type": "bytes"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"indexed": false,
|
|
195
|
+
"internalType": "bytes",
|
|
196
|
+
"name": "_returnValue",
|
|
197
|
+
"type": "bytes"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"name": "Invoked",
|
|
201
|
+
"type": "event"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"anonymous": false,
|
|
205
|
+
"inputs": [
|
|
206
|
+
{
|
|
207
|
+
"indexed": false,
|
|
208
|
+
"internalType": "address",
|
|
209
|
+
"name": "_newManager",
|
|
210
|
+
"type": "address"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"indexed": false,
|
|
214
|
+
"internalType": "address",
|
|
215
|
+
"name": "_oldManager",
|
|
216
|
+
"type": "address"
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
"name": "ManagerEdited",
|
|
220
|
+
"type": "event"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"anonymous": false,
|
|
224
|
+
"inputs": [
|
|
225
|
+
{
|
|
226
|
+
"indexed": true,
|
|
227
|
+
"internalType": "address",
|
|
228
|
+
"name": "_module",
|
|
229
|
+
"type": "address"
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
"name": "ModuleAdded",
|
|
233
|
+
"type": "event"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"anonymous": false,
|
|
237
|
+
"inputs": [
|
|
238
|
+
{
|
|
239
|
+
"indexed": true,
|
|
240
|
+
"internalType": "address",
|
|
241
|
+
"name": "_module",
|
|
242
|
+
"type": "address"
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"name": "ModuleInitialized",
|
|
246
|
+
"type": "event"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"anonymous": false,
|
|
250
|
+
"inputs": [
|
|
251
|
+
{
|
|
252
|
+
"indexed": true,
|
|
253
|
+
"internalType": "address",
|
|
254
|
+
"name": "_module",
|
|
255
|
+
"type": "address"
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"name": "ModuleRemoved",
|
|
259
|
+
"type": "event"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"anonymous": false,
|
|
263
|
+
"inputs": [
|
|
264
|
+
{
|
|
265
|
+
"indexed": true,
|
|
266
|
+
"internalType": "address",
|
|
267
|
+
"name": "_module",
|
|
268
|
+
"type": "address"
|
|
269
|
+
}
|
|
270
|
+
],
|
|
271
|
+
"name": "PendingModuleRemoved",
|
|
272
|
+
"type": "event"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"anonymous": false,
|
|
276
|
+
"inputs": [
|
|
277
|
+
{
|
|
278
|
+
"indexed": true,
|
|
279
|
+
"internalType": "address",
|
|
280
|
+
"name": "_component",
|
|
281
|
+
"type": "address"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"indexed": true,
|
|
285
|
+
"internalType": "address",
|
|
286
|
+
"name": "_positionModule",
|
|
287
|
+
"type": "address"
|
|
288
|
+
}
|
|
289
|
+
],
|
|
290
|
+
"name": "PositionModuleAdded",
|
|
291
|
+
"type": "event"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"anonymous": false,
|
|
295
|
+
"inputs": [
|
|
296
|
+
{
|
|
297
|
+
"indexed": true,
|
|
298
|
+
"internalType": "address",
|
|
299
|
+
"name": "_component",
|
|
300
|
+
"type": "address"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"indexed": true,
|
|
304
|
+
"internalType": "address",
|
|
305
|
+
"name": "_positionModule",
|
|
306
|
+
"type": "address"
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"name": "PositionModuleRemoved",
|
|
310
|
+
"type": "event"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"anonymous": false,
|
|
314
|
+
"inputs": [
|
|
315
|
+
{
|
|
316
|
+
"indexed": false,
|
|
317
|
+
"internalType": "int256",
|
|
318
|
+
"name": "_newMultiplier",
|
|
319
|
+
"type": "int256"
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"name": "PositionMultiplierEdited",
|
|
323
|
+
"type": "event"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"anonymous": false,
|
|
327
|
+
"inputs": [
|
|
328
|
+
{
|
|
329
|
+
"indexed": true,
|
|
330
|
+
"internalType": "address",
|
|
331
|
+
"name": "from",
|
|
332
|
+
"type": "address"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"indexed": true,
|
|
336
|
+
"internalType": "address",
|
|
337
|
+
"name": "to",
|
|
338
|
+
"type": "address"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"indexed": false,
|
|
342
|
+
"internalType": "uint256",
|
|
343
|
+
"name": "value",
|
|
344
|
+
"type": "uint256"
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"name": "Transfer",
|
|
348
|
+
"type": "event"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"inputs": [
|
|
352
|
+
{
|
|
353
|
+
"internalType": "address",
|
|
354
|
+
"name": "_component",
|
|
355
|
+
"type": "address"
|
|
356
|
+
}
|
|
357
|
+
],
|
|
358
|
+
"name": "addComponent",
|
|
359
|
+
"outputs": [],
|
|
360
|
+
"stateMutability": "nonpayable",
|
|
361
|
+
"type": "function"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"inputs": [
|
|
365
|
+
{
|
|
366
|
+
"internalType": "address",
|
|
367
|
+
"name": "_component",
|
|
368
|
+
"type": "address"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"internalType": "address",
|
|
372
|
+
"name": "_positionModule",
|
|
373
|
+
"type": "address"
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
"name": "addExternalPositionModule",
|
|
377
|
+
"outputs": [],
|
|
378
|
+
"stateMutability": "nonpayable",
|
|
379
|
+
"type": "function"
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"inputs": [
|
|
383
|
+
{
|
|
384
|
+
"internalType": "address",
|
|
385
|
+
"name": "_module",
|
|
386
|
+
"type": "address"
|
|
387
|
+
}
|
|
388
|
+
],
|
|
389
|
+
"name": "addModule",
|
|
390
|
+
"outputs": [],
|
|
391
|
+
"stateMutability": "nonpayable",
|
|
392
|
+
"type": "function"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"inputs": [
|
|
396
|
+
{
|
|
397
|
+
"internalType": "address",
|
|
398
|
+
"name": "owner",
|
|
399
|
+
"type": "address"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"internalType": "address",
|
|
403
|
+
"name": "spender",
|
|
404
|
+
"type": "address"
|
|
405
|
+
}
|
|
406
|
+
],
|
|
407
|
+
"name": "allowance",
|
|
408
|
+
"outputs": [
|
|
409
|
+
{
|
|
410
|
+
"internalType": "uint256",
|
|
411
|
+
"name": "",
|
|
412
|
+
"type": "uint256"
|
|
413
|
+
}
|
|
414
|
+
],
|
|
415
|
+
"stateMutability": "view",
|
|
416
|
+
"type": "function"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"inputs": [
|
|
420
|
+
{
|
|
421
|
+
"internalType": "address",
|
|
422
|
+
"name": "spender",
|
|
423
|
+
"type": "address"
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"internalType": "uint256",
|
|
427
|
+
"name": "amount",
|
|
428
|
+
"type": "uint256"
|
|
429
|
+
}
|
|
430
|
+
],
|
|
431
|
+
"name": "approve",
|
|
432
|
+
"outputs": [
|
|
433
|
+
{
|
|
434
|
+
"internalType": "bool",
|
|
435
|
+
"name": "",
|
|
436
|
+
"type": "bool"
|
|
437
|
+
}
|
|
438
|
+
],
|
|
439
|
+
"stateMutability": "nonpayable",
|
|
440
|
+
"type": "function"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"inputs": [
|
|
444
|
+
{
|
|
445
|
+
"internalType": "address",
|
|
446
|
+
"name": "account",
|
|
447
|
+
"type": "address"
|
|
448
|
+
}
|
|
449
|
+
],
|
|
450
|
+
"name": "balanceOf",
|
|
451
|
+
"outputs": [
|
|
452
|
+
{
|
|
453
|
+
"internalType": "uint256",
|
|
454
|
+
"name": "",
|
|
455
|
+
"type": "uint256"
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
"stateMutability": "view",
|
|
459
|
+
"type": "function"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"inputs": [
|
|
463
|
+
{
|
|
464
|
+
"internalType": "address",
|
|
465
|
+
"name": "_account",
|
|
466
|
+
"type": "address"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"internalType": "uint256",
|
|
470
|
+
"name": "_quantity",
|
|
471
|
+
"type": "uint256"
|
|
472
|
+
}
|
|
473
|
+
],
|
|
474
|
+
"name": "burn",
|
|
475
|
+
"outputs": [],
|
|
476
|
+
"stateMutability": "nonpayable",
|
|
477
|
+
"type": "function"
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
"inputs": [
|
|
481
|
+
{
|
|
482
|
+
"internalType": "uint256",
|
|
483
|
+
"name": "",
|
|
484
|
+
"type": "uint256"
|
|
485
|
+
}
|
|
486
|
+
],
|
|
487
|
+
"name": "components",
|
|
488
|
+
"outputs": [
|
|
489
|
+
{
|
|
490
|
+
"internalType": "address",
|
|
491
|
+
"name": "",
|
|
492
|
+
"type": "address"
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
"stateMutability": "view",
|
|
496
|
+
"type": "function"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"inputs": [],
|
|
500
|
+
"name": "controller",
|
|
501
|
+
"outputs": [
|
|
502
|
+
{
|
|
503
|
+
"internalType": "contract IController",
|
|
504
|
+
"name": "",
|
|
505
|
+
"type": "address"
|
|
506
|
+
}
|
|
507
|
+
],
|
|
508
|
+
"stateMutability": "view",
|
|
509
|
+
"type": "function"
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"inputs": [],
|
|
513
|
+
"name": "decimals",
|
|
514
|
+
"outputs": [
|
|
515
|
+
{
|
|
516
|
+
"internalType": "uint8",
|
|
517
|
+
"name": "",
|
|
518
|
+
"type": "uint8"
|
|
519
|
+
}
|
|
520
|
+
],
|
|
521
|
+
"stateMutability": "view",
|
|
522
|
+
"type": "function"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"inputs": [
|
|
526
|
+
{
|
|
527
|
+
"internalType": "address",
|
|
528
|
+
"name": "spender",
|
|
529
|
+
"type": "address"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"internalType": "uint256",
|
|
533
|
+
"name": "subtractedValue",
|
|
534
|
+
"type": "uint256"
|
|
535
|
+
}
|
|
536
|
+
],
|
|
537
|
+
"name": "decreaseAllowance",
|
|
538
|
+
"outputs": [
|
|
539
|
+
{
|
|
540
|
+
"internalType": "bool",
|
|
541
|
+
"name": "",
|
|
542
|
+
"type": "bool"
|
|
543
|
+
}
|
|
544
|
+
],
|
|
545
|
+
"stateMutability": "nonpayable",
|
|
546
|
+
"type": "function"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
"inputs": [
|
|
550
|
+
{
|
|
551
|
+
"internalType": "address",
|
|
552
|
+
"name": "_component",
|
|
553
|
+
"type": "address"
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"internalType": "int256",
|
|
557
|
+
"name": "_realUnit",
|
|
558
|
+
"type": "int256"
|
|
559
|
+
}
|
|
560
|
+
],
|
|
561
|
+
"name": "editDefaultPositionUnit",
|
|
562
|
+
"outputs": [],
|
|
563
|
+
"stateMutability": "nonpayable",
|
|
564
|
+
"type": "function"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"inputs": [
|
|
568
|
+
{
|
|
569
|
+
"internalType": "address",
|
|
570
|
+
"name": "_component",
|
|
571
|
+
"type": "address"
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"internalType": "address",
|
|
575
|
+
"name": "_positionModule",
|
|
576
|
+
"type": "address"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"internalType": "bytes",
|
|
580
|
+
"name": "_data",
|
|
581
|
+
"type": "bytes"
|
|
582
|
+
}
|
|
583
|
+
],
|
|
584
|
+
"name": "editExternalPositionData",
|
|
585
|
+
"outputs": [],
|
|
586
|
+
"stateMutability": "nonpayable",
|
|
587
|
+
"type": "function"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"inputs": [
|
|
591
|
+
{
|
|
592
|
+
"internalType": "address",
|
|
593
|
+
"name": "_component",
|
|
594
|
+
"type": "address"
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"internalType": "address",
|
|
598
|
+
"name": "_positionModule",
|
|
599
|
+
"type": "address"
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"internalType": "int256",
|
|
603
|
+
"name": "_realUnit",
|
|
604
|
+
"type": "int256"
|
|
605
|
+
}
|
|
606
|
+
],
|
|
607
|
+
"name": "editExternalPositionUnit",
|
|
608
|
+
"outputs": [],
|
|
609
|
+
"stateMutability": "nonpayable",
|
|
610
|
+
"type": "function"
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
"inputs": [
|
|
614
|
+
{
|
|
615
|
+
"internalType": "int256",
|
|
616
|
+
"name": "_newMultiplier",
|
|
617
|
+
"type": "int256"
|
|
618
|
+
}
|
|
619
|
+
],
|
|
620
|
+
"name": "editPositionMultiplier",
|
|
621
|
+
"outputs": [],
|
|
622
|
+
"stateMutability": "nonpayable",
|
|
623
|
+
"type": "function"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"inputs": [],
|
|
627
|
+
"name": "getComponents",
|
|
628
|
+
"outputs": [
|
|
629
|
+
{
|
|
630
|
+
"internalType": "address[]",
|
|
631
|
+
"name": "",
|
|
632
|
+
"type": "address[]"
|
|
633
|
+
}
|
|
634
|
+
],
|
|
635
|
+
"stateMutability": "view",
|
|
636
|
+
"type": "function"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"inputs": [
|
|
640
|
+
{
|
|
641
|
+
"internalType": "address",
|
|
642
|
+
"name": "_component",
|
|
643
|
+
"type": "address"
|
|
644
|
+
}
|
|
645
|
+
],
|
|
646
|
+
"name": "getDefaultPositionRealUnit",
|
|
647
|
+
"outputs": [
|
|
648
|
+
{
|
|
649
|
+
"internalType": "int256",
|
|
650
|
+
"name": "",
|
|
651
|
+
"type": "int256"
|
|
652
|
+
}
|
|
653
|
+
],
|
|
654
|
+
"stateMutability": "view",
|
|
655
|
+
"type": "function"
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"inputs": [
|
|
659
|
+
{
|
|
660
|
+
"internalType": "address",
|
|
661
|
+
"name": "_component",
|
|
662
|
+
"type": "address"
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"internalType": "address",
|
|
666
|
+
"name": "_positionModule",
|
|
667
|
+
"type": "address"
|
|
668
|
+
}
|
|
669
|
+
],
|
|
670
|
+
"name": "getExternalPositionData",
|
|
671
|
+
"outputs": [
|
|
672
|
+
{
|
|
673
|
+
"internalType": "bytes",
|
|
674
|
+
"name": "",
|
|
675
|
+
"type": "bytes"
|
|
676
|
+
}
|
|
677
|
+
],
|
|
678
|
+
"stateMutability": "view",
|
|
679
|
+
"type": "function"
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"inputs": [
|
|
683
|
+
{
|
|
684
|
+
"internalType": "address",
|
|
685
|
+
"name": "_component",
|
|
686
|
+
"type": "address"
|
|
687
|
+
}
|
|
688
|
+
],
|
|
689
|
+
"name": "getExternalPositionModules",
|
|
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": "address",
|
|
704
|
+
"name": "_component",
|
|
705
|
+
"type": "address"
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
"internalType": "address",
|
|
709
|
+
"name": "_positionModule",
|
|
710
|
+
"type": "address"
|
|
711
|
+
}
|
|
712
|
+
],
|
|
713
|
+
"name": "getExternalPositionRealUnit",
|
|
714
|
+
"outputs": [
|
|
715
|
+
{
|
|
716
|
+
"internalType": "int256",
|
|
717
|
+
"name": "",
|
|
718
|
+
"type": "int256"
|
|
719
|
+
}
|
|
720
|
+
],
|
|
721
|
+
"stateMutability": "view",
|
|
722
|
+
"type": "function"
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
"inputs": [],
|
|
726
|
+
"name": "getModules",
|
|
727
|
+
"outputs": [
|
|
728
|
+
{
|
|
729
|
+
"internalType": "address[]",
|
|
730
|
+
"name": "",
|
|
731
|
+
"type": "address[]"
|
|
732
|
+
}
|
|
733
|
+
],
|
|
734
|
+
"stateMutability": "view",
|
|
735
|
+
"type": "function"
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
"inputs": [],
|
|
739
|
+
"name": "getPositions",
|
|
740
|
+
"outputs": [
|
|
741
|
+
{
|
|
742
|
+
"components": [
|
|
743
|
+
{
|
|
744
|
+
"internalType": "address",
|
|
745
|
+
"name": "component",
|
|
746
|
+
"type": "address"
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"internalType": "address",
|
|
750
|
+
"name": "module",
|
|
751
|
+
"type": "address"
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"internalType": "int256",
|
|
755
|
+
"name": "unit",
|
|
756
|
+
"type": "int256"
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
"internalType": "uint8",
|
|
760
|
+
"name": "positionState",
|
|
761
|
+
"type": "uint8"
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"internalType": "bytes",
|
|
765
|
+
"name": "data",
|
|
766
|
+
"type": "bytes"
|
|
767
|
+
}
|
|
768
|
+
],
|
|
769
|
+
"internalType": "struct ISetToken.Position[]",
|
|
770
|
+
"name": "",
|
|
771
|
+
"type": "tuple[]"
|
|
772
|
+
}
|
|
773
|
+
],
|
|
774
|
+
"stateMutability": "view",
|
|
775
|
+
"type": "function"
|
|
776
|
+
},
|
|
777
|
+
{
|
|
778
|
+
"inputs": [
|
|
779
|
+
{
|
|
780
|
+
"internalType": "address",
|
|
781
|
+
"name": "_component",
|
|
782
|
+
"type": "address"
|
|
783
|
+
}
|
|
784
|
+
],
|
|
785
|
+
"name": "getTotalComponentRealUnits",
|
|
786
|
+
"outputs": [
|
|
787
|
+
{
|
|
788
|
+
"internalType": "int256",
|
|
789
|
+
"name": "",
|
|
790
|
+
"type": "int256"
|
|
791
|
+
}
|
|
792
|
+
],
|
|
793
|
+
"stateMutability": "view",
|
|
794
|
+
"type": "function"
|
|
795
|
+
},
|
|
796
|
+
{
|
|
797
|
+
"inputs": [
|
|
798
|
+
{
|
|
799
|
+
"internalType": "address",
|
|
800
|
+
"name": "spender",
|
|
801
|
+
"type": "address"
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"internalType": "uint256",
|
|
805
|
+
"name": "addedValue",
|
|
806
|
+
"type": "uint256"
|
|
807
|
+
}
|
|
808
|
+
],
|
|
809
|
+
"name": "increaseAllowance",
|
|
810
|
+
"outputs": [
|
|
811
|
+
{
|
|
812
|
+
"internalType": "bool",
|
|
813
|
+
"name": "",
|
|
814
|
+
"type": "bool"
|
|
815
|
+
}
|
|
816
|
+
],
|
|
817
|
+
"stateMutability": "nonpayable",
|
|
818
|
+
"type": "function"
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"inputs": [],
|
|
822
|
+
"name": "initializeModule",
|
|
823
|
+
"outputs": [],
|
|
824
|
+
"stateMutability": "nonpayable",
|
|
825
|
+
"type": "function"
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"inputs": [
|
|
829
|
+
{
|
|
830
|
+
"internalType": "address",
|
|
831
|
+
"name": "_target",
|
|
832
|
+
"type": "address"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
"internalType": "uint256",
|
|
836
|
+
"name": "_value",
|
|
837
|
+
"type": "uint256"
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
"internalType": "bytes",
|
|
841
|
+
"name": "_data",
|
|
842
|
+
"type": "bytes"
|
|
843
|
+
}
|
|
844
|
+
],
|
|
845
|
+
"name": "invoke",
|
|
846
|
+
"outputs": [
|
|
847
|
+
{
|
|
848
|
+
"internalType": "bytes",
|
|
849
|
+
"name": "_returnValue",
|
|
850
|
+
"type": "bytes"
|
|
851
|
+
}
|
|
852
|
+
],
|
|
853
|
+
"stateMutability": "nonpayable",
|
|
854
|
+
"type": "function"
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
"inputs": [
|
|
858
|
+
{
|
|
859
|
+
"internalType": "address",
|
|
860
|
+
"name": "_component",
|
|
861
|
+
"type": "address"
|
|
862
|
+
}
|
|
863
|
+
],
|
|
864
|
+
"name": "isComponent",
|
|
865
|
+
"outputs": [
|
|
866
|
+
{
|
|
867
|
+
"internalType": "bool",
|
|
868
|
+
"name": "",
|
|
869
|
+
"type": "bool"
|
|
870
|
+
}
|
|
871
|
+
],
|
|
872
|
+
"stateMutability": "view",
|
|
873
|
+
"type": "function"
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
"inputs": [
|
|
877
|
+
{
|
|
878
|
+
"internalType": "address",
|
|
879
|
+
"name": "_component",
|
|
880
|
+
"type": "address"
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"internalType": "address",
|
|
884
|
+
"name": "_module",
|
|
885
|
+
"type": "address"
|
|
886
|
+
}
|
|
887
|
+
],
|
|
888
|
+
"name": "isExternalPositionModule",
|
|
889
|
+
"outputs": [
|
|
890
|
+
{
|
|
891
|
+
"internalType": "bool",
|
|
892
|
+
"name": "",
|
|
893
|
+
"type": "bool"
|
|
894
|
+
}
|
|
895
|
+
],
|
|
896
|
+
"stateMutability": "view",
|
|
897
|
+
"type": "function"
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"inputs": [
|
|
901
|
+
{
|
|
902
|
+
"internalType": "address",
|
|
903
|
+
"name": "_module",
|
|
904
|
+
"type": "address"
|
|
905
|
+
}
|
|
906
|
+
],
|
|
907
|
+
"name": "isInitializedModule",
|
|
908
|
+
"outputs": [
|
|
909
|
+
{
|
|
910
|
+
"internalType": "bool",
|
|
911
|
+
"name": "",
|
|
912
|
+
"type": "bool"
|
|
913
|
+
}
|
|
914
|
+
],
|
|
915
|
+
"stateMutability": "view",
|
|
916
|
+
"type": "function"
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
"inputs": [],
|
|
920
|
+
"name": "isLocked",
|
|
921
|
+
"outputs": [
|
|
922
|
+
{
|
|
923
|
+
"internalType": "bool",
|
|
924
|
+
"name": "",
|
|
925
|
+
"type": "bool"
|
|
926
|
+
}
|
|
927
|
+
],
|
|
928
|
+
"stateMutability": "view",
|
|
929
|
+
"type": "function"
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
"inputs": [
|
|
933
|
+
{
|
|
934
|
+
"internalType": "address",
|
|
935
|
+
"name": "_module",
|
|
936
|
+
"type": "address"
|
|
937
|
+
}
|
|
938
|
+
],
|
|
939
|
+
"name": "isPendingModule",
|
|
940
|
+
"outputs": [
|
|
941
|
+
{
|
|
942
|
+
"internalType": "bool",
|
|
943
|
+
"name": "",
|
|
944
|
+
"type": "bool"
|
|
945
|
+
}
|
|
946
|
+
],
|
|
947
|
+
"stateMutability": "view",
|
|
948
|
+
"type": "function"
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
"inputs": [],
|
|
952
|
+
"name": "lock",
|
|
953
|
+
"outputs": [],
|
|
954
|
+
"stateMutability": "nonpayable",
|
|
955
|
+
"type": "function"
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"inputs": [],
|
|
959
|
+
"name": "locker",
|
|
960
|
+
"outputs": [
|
|
961
|
+
{
|
|
962
|
+
"internalType": "address",
|
|
963
|
+
"name": "",
|
|
964
|
+
"type": "address"
|
|
965
|
+
}
|
|
966
|
+
],
|
|
967
|
+
"stateMutability": "view",
|
|
968
|
+
"type": "function"
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
"inputs": [],
|
|
972
|
+
"name": "manager",
|
|
973
|
+
"outputs": [
|
|
974
|
+
{
|
|
975
|
+
"internalType": "address",
|
|
976
|
+
"name": "",
|
|
977
|
+
"type": "address"
|
|
978
|
+
}
|
|
979
|
+
],
|
|
980
|
+
"stateMutability": "view",
|
|
981
|
+
"type": "function"
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"inputs": [
|
|
985
|
+
{
|
|
986
|
+
"internalType": "address",
|
|
987
|
+
"name": "_account",
|
|
988
|
+
"type": "address"
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
"internalType": "uint256",
|
|
992
|
+
"name": "_quantity",
|
|
993
|
+
"type": "uint256"
|
|
994
|
+
}
|
|
995
|
+
],
|
|
996
|
+
"name": "mint",
|
|
997
|
+
"outputs": [],
|
|
998
|
+
"stateMutability": "nonpayable",
|
|
999
|
+
"type": "function"
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
"inputs": [
|
|
1003
|
+
{
|
|
1004
|
+
"internalType": "address",
|
|
1005
|
+
"name": "",
|
|
1006
|
+
"type": "address"
|
|
1007
|
+
}
|
|
1008
|
+
],
|
|
1009
|
+
"name": "moduleStates",
|
|
1010
|
+
"outputs": [
|
|
1011
|
+
{
|
|
1012
|
+
"internalType": "enum ISetToken.ModuleState",
|
|
1013
|
+
"name": "",
|
|
1014
|
+
"type": "uint8"
|
|
1015
|
+
}
|
|
1016
|
+
],
|
|
1017
|
+
"stateMutability": "view",
|
|
1018
|
+
"type": "function"
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"inputs": [
|
|
1022
|
+
{
|
|
1023
|
+
"internalType": "uint256",
|
|
1024
|
+
"name": "",
|
|
1025
|
+
"type": "uint256"
|
|
1026
|
+
}
|
|
1027
|
+
],
|
|
1028
|
+
"name": "modules",
|
|
1029
|
+
"outputs": [
|
|
1030
|
+
{
|
|
1031
|
+
"internalType": "address",
|
|
1032
|
+
"name": "",
|
|
1033
|
+
"type": "address"
|
|
1034
|
+
}
|
|
1035
|
+
],
|
|
1036
|
+
"stateMutability": "view",
|
|
1037
|
+
"type": "function"
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
"inputs": [],
|
|
1041
|
+
"name": "name",
|
|
1042
|
+
"outputs": [
|
|
1043
|
+
{
|
|
1044
|
+
"internalType": "string",
|
|
1045
|
+
"name": "",
|
|
1046
|
+
"type": "string"
|
|
1047
|
+
}
|
|
1048
|
+
],
|
|
1049
|
+
"stateMutability": "view",
|
|
1050
|
+
"type": "function"
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"inputs": [],
|
|
1054
|
+
"name": "positionMultiplier",
|
|
1055
|
+
"outputs": [
|
|
1056
|
+
{
|
|
1057
|
+
"internalType": "int256",
|
|
1058
|
+
"name": "",
|
|
1059
|
+
"type": "int256"
|
|
1060
|
+
}
|
|
1061
|
+
],
|
|
1062
|
+
"stateMutability": "view",
|
|
1063
|
+
"type": "function"
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"inputs": [
|
|
1067
|
+
{
|
|
1068
|
+
"internalType": "address",
|
|
1069
|
+
"name": "_component",
|
|
1070
|
+
"type": "address"
|
|
1071
|
+
}
|
|
1072
|
+
],
|
|
1073
|
+
"name": "removeComponent",
|
|
1074
|
+
"outputs": [],
|
|
1075
|
+
"stateMutability": "nonpayable",
|
|
1076
|
+
"type": "function"
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
"inputs": [
|
|
1080
|
+
{
|
|
1081
|
+
"internalType": "address",
|
|
1082
|
+
"name": "_component",
|
|
1083
|
+
"type": "address"
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
"internalType": "address",
|
|
1087
|
+
"name": "_positionModule",
|
|
1088
|
+
"type": "address"
|
|
1089
|
+
}
|
|
1090
|
+
],
|
|
1091
|
+
"name": "removeExternalPositionModule",
|
|
1092
|
+
"outputs": [],
|
|
1093
|
+
"stateMutability": "nonpayable",
|
|
1094
|
+
"type": "function"
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
"inputs": [
|
|
1098
|
+
{
|
|
1099
|
+
"internalType": "address",
|
|
1100
|
+
"name": "_module",
|
|
1101
|
+
"type": "address"
|
|
1102
|
+
}
|
|
1103
|
+
],
|
|
1104
|
+
"name": "removeModule",
|
|
1105
|
+
"outputs": [],
|
|
1106
|
+
"stateMutability": "nonpayable",
|
|
1107
|
+
"type": "function"
|
|
1108
|
+
},
|
|
1109
|
+
{
|
|
1110
|
+
"inputs": [
|
|
1111
|
+
{
|
|
1112
|
+
"internalType": "address",
|
|
1113
|
+
"name": "_module",
|
|
1114
|
+
"type": "address"
|
|
1115
|
+
}
|
|
1116
|
+
],
|
|
1117
|
+
"name": "removePendingModule",
|
|
1118
|
+
"outputs": [],
|
|
1119
|
+
"stateMutability": "nonpayable",
|
|
1120
|
+
"type": "function"
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
"inputs": [
|
|
1124
|
+
{
|
|
1125
|
+
"internalType": "address",
|
|
1126
|
+
"name": "_manager",
|
|
1127
|
+
"type": "address"
|
|
1128
|
+
}
|
|
1129
|
+
],
|
|
1130
|
+
"name": "setManager",
|
|
1131
|
+
"outputs": [],
|
|
1132
|
+
"stateMutability": "nonpayable",
|
|
1133
|
+
"type": "function"
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
"inputs": [],
|
|
1137
|
+
"name": "symbol",
|
|
1138
|
+
"outputs": [
|
|
1139
|
+
{
|
|
1140
|
+
"internalType": "string",
|
|
1141
|
+
"name": "",
|
|
1142
|
+
"type": "string"
|
|
1143
|
+
}
|
|
1144
|
+
],
|
|
1145
|
+
"stateMutability": "view",
|
|
1146
|
+
"type": "function"
|
|
1147
|
+
},
|
|
1148
|
+
{
|
|
1149
|
+
"inputs": [],
|
|
1150
|
+
"name": "totalSupply",
|
|
1151
|
+
"outputs": [
|
|
1152
|
+
{
|
|
1153
|
+
"internalType": "uint256",
|
|
1154
|
+
"name": "",
|
|
1155
|
+
"type": "uint256"
|
|
1156
|
+
}
|
|
1157
|
+
],
|
|
1158
|
+
"stateMutability": "view",
|
|
1159
|
+
"type": "function"
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
"inputs": [
|
|
1163
|
+
{
|
|
1164
|
+
"internalType": "address",
|
|
1165
|
+
"name": "recipient",
|
|
1166
|
+
"type": "address"
|
|
1167
|
+
},
|
|
1168
|
+
{
|
|
1169
|
+
"internalType": "uint256",
|
|
1170
|
+
"name": "amount",
|
|
1171
|
+
"type": "uint256"
|
|
1172
|
+
}
|
|
1173
|
+
],
|
|
1174
|
+
"name": "transfer",
|
|
1175
|
+
"outputs": [
|
|
1176
|
+
{
|
|
1177
|
+
"internalType": "bool",
|
|
1178
|
+
"name": "",
|
|
1179
|
+
"type": "bool"
|
|
1180
|
+
}
|
|
1181
|
+
],
|
|
1182
|
+
"stateMutability": "nonpayable",
|
|
1183
|
+
"type": "function"
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
"inputs": [
|
|
1187
|
+
{
|
|
1188
|
+
"internalType": "address",
|
|
1189
|
+
"name": "sender",
|
|
1190
|
+
"type": "address"
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
"internalType": "address",
|
|
1194
|
+
"name": "recipient",
|
|
1195
|
+
"type": "address"
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
"internalType": "uint256",
|
|
1199
|
+
"name": "amount",
|
|
1200
|
+
"type": "uint256"
|
|
1201
|
+
}
|
|
1202
|
+
],
|
|
1203
|
+
"name": "transferFrom",
|
|
1204
|
+
"outputs": [
|
|
1205
|
+
{
|
|
1206
|
+
"internalType": "bool",
|
|
1207
|
+
"name": "",
|
|
1208
|
+
"type": "bool"
|
|
1209
|
+
}
|
|
1210
|
+
],
|
|
1211
|
+
"stateMutability": "nonpayable",
|
|
1212
|
+
"type": "function"
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
"inputs": [],
|
|
1216
|
+
"name": "unlock",
|
|
1217
|
+
"outputs": [],
|
|
1218
|
+
"stateMutability": "nonpayable",
|
|
1219
|
+
"type": "function"
|
|
1220
|
+
},
|
|
1221
|
+
{
|
|
1222
|
+
"stateMutability": "payable",
|
|
1223
|
+
"type": "receive"
|
|
1224
|
+
}
|
|
1225
|
+
];
|
|
1226
|
+
/**
|
|
1227
|
+
* SetToken_json Contract Class
|
|
1228
|
+
*
|
|
1229
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
1230
|
+
*
|
|
1231
|
+
* @example
|
|
1232
|
+
* ```typescript
|
|
1233
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
1234
|
+
* import { mainnet } from 'viem/chains';
|
|
1235
|
+
* import { SetToken_json } from 'SetToken_json';
|
|
1236
|
+
*
|
|
1237
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
1238
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
1239
|
+
*
|
|
1240
|
+
* const contract = new SetToken_json('0x...', { publicClient, walletClient });
|
|
1241
|
+
*
|
|
1242
|
+
* // Read functions
|
|
1243
|
+
* const result = await contract.balanceOf('0x...');
|
|
1244
|
+
*
|
|
1245
|
+
* // Write functions
|
|
1246
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
1247
|
+
*
|
|
1248
|
+
* // Simulate transactions (dry-run)
|
|
1249
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
1250
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
1251
|
+
*
|
|
1252
|
+
* // Watch events
|
|
1253
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1254
|
+
* console.log('Transfer event:', event);
|
|
1255
|
+
* });
|
|
1256
|
+
* ```
|
|
1257
|
+
*/
|
|
1258
|
+
class SetToken_json {
|
|
1259
|
+
constructor(address, clients) {
|
|
1260
|
+
this.contractAddress = address;
|
|
1261
|
+
this.publicClient = clients.publicClient;
|
|
1262
|
+
this.contract = (0, viem_1.getContract)({
|
|
1263
|
+
address,
|
|
1264
|
+
abi: exports.SetToken_jsonAbi,
|
|
1265
|
+
client: {
|
|
1266
|
+
public: clients.publicClient,
|
|
1267
|
+
wallet: clients.walletClient,
|
|
1268
|
+
},
|
|
1269
|
+
});
|
|
1270
|
+
}
|
|
1271
|
+
/**
|
|
1272
|
+
* Get the contract address
|
|
1273
|
+
*/
|
|
1274
|
+
get address() {
|
|
1275
|
+
return this.contractAddress;
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* Get the underlying viem contract instance
|
|
1279
|
+
*/
|
|
1280
|
+
getContract() {
|
|
1281
|
+
return this.contract;
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* allowance
|
|
1285
|
+
* view
|
|
1286
|
+
*/
|
|
1287
|
+
async allowance(owner, spender) {
|
|
1288
|
+
return this.contract.read.allowance([owner, spender]);
|
|
1289
|
+
}
|
|
1290
|
+
/**
|
|
1291
|
+
* balanceOf
|
|
1292
|
+
* view
|
|
1293
|
+
*/
|
|
1294
|
+
async balanceOf(account) {
|
|
1295
|
+
return this.contract.read.balanceOf([account]);
|
|
1296
|
+
}
|
|
1297
|
+
/**
|
|
1298
|
+
* components
|
|
1299
|
+
* view
|
|
1300
|
+
*/
|
|
1301
|
+
async components(arg0) {
|
|
1302
|
+
return this.contract.read.components([arg0]);
|
|
1303
|
+
}
|
|
1304
|
+
/**
|
|
1305
|
+
* controller
|
|
1306
|
+
* view
|
|
1307
|
+
*/
|
|
1308
|
+
async controller() {
|
|
1309
|
+
return this.contract.read.controller();
|
|
1310
|
+
}
|
|
1311
|
+
/**
|
|
1312
|
+
* decimals
|
|
1313
|
+
* view
|
|
1314
|
+
*/
|
|
1315
|
+
async decimals() {
|
|
1316
|
+
return this.contract.read.decimals();
|
|
1317
|
+
}
|
|
1318
|
+
/**
|
|
1319
|
+
* getComponents
|
|
1320
|
+
* view
|
|
1321
|
+
*/
|
|
1322
|
+
async getComponents() {
|
|
1323
|
+
return this.contract.read.getComponents();
|
|
1324
|
+
}
|
|
1325
|
+
/**
|
|
1326
|
+
* getDefaultPositionRealUnit
|
|
1327
|
+
* view
|
|
1328
|
+
*/
|
|
1329
|
+
async getDefaultPositionRealUnit(_component) {
|
|
1330
|
+
return this.contract.read.getDefaultPositionRealUnit([_component]);
|
|
1331
|
+
}
|
|
1332
|
+
/**
|
|
1333
|
+
* getExternalPositionData
|
|
1334
|
+
* view
|
|
1335
|
+
*/
|
|
1336
|
+
async getExternalPositionData(_component, _positionModule) {
|
|
1337
|
+
return this.contract.read.getExternalPositionData([_component, _positionModule]);
|
|
1338
|
+
}
|
|
1339
|
+
/**
|
|
1340
|
+
* getExternalPositionModules
|
|
1341
|
+
* view
|
|
1342
|
+
*/
|
|
1343
|
+
async getExternalPositionModules(_component) {
|
|
1344
|
+
return this.contract.read.getExternalPositionModules([_component]);
|
|
1345
|
+
}
|
|
1346
|
+
/**
|
|
1347
|
+
* getExternalPositionRealUnit
|
|
1348
|
+
* view
|
|
1349
|
+
*/
|
|
1350
|
+
async getExternalPositionRealUnit(_component, _positionModule) {
|
|
1351
|
+
return this.contract.read.getExternalPositionRealUnit([_component, _positionModule]);
|
|
1352
|
+
}
|
|
1353
|
+
/**
|
|
1354
|
+
* getModules
|
|
1355
|
+
* view
|
|
1356
|
+
*/
|
|
1357
|
+
async getModules() {
|
|
1358
|
+
return this.contract.read.getModules();
|
|
1359
|
+
}
|
|
1360
|
+
/**
|
|
1361
|
+
* getPositions
|
|
1362
|
+
* view
|
|
1363
|
+
*/
|
|
1364
|
+
async getPositions() {
|
|
1365
|
+
return this.contract.read.getPositions();
|
|
1366
|
+
}
|
|
1367
|
+
/**
|
|
1368
|
+
* getTotalComponentRealUnits
|
|
1369
|
+
* view
|
|
1370
|
+
*/
|
|
1371
|
+
async getTotalComponentRealUnits(_component) {
|
|
1372
|
+
return this.contract.read.getTotalComponentRealUnits([_component]);
|
|
1373
|
+
}
|
|
1374
|
+
/**
|
|
1375
|
+
* isComponent
|
|
1376
|
+
* view
|
|
1377
|
+
*/
|
|
1378
|
+
async isComponent(_component) {
|
|
1379
|
+
return this.contract.read.isComponent([_component]);
|
|
1380
|
+
}
|
|
1381
|
+
/**
|
|
1382
|
+
* isExternalPositionModule
|
|
1383
|
+
* view
|
|
1384
|
+
*/
|
|
1385
|
+
async isExternalPositionModule(_component, _module) {
|
|
1386
|
+
return this.contract.read.isExternalPositionModule([_component, _module]);
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* isInitializedModule
|
|
1390
|
+
* view
|
|
1391
|
+
*/
|
|
1392
|
+
async isInitializedModule(_module) {
|
|
1393
|
+
return this.contract.read.isInitializedModule([_module]);
|
|
1394
|
+
}
|
|
1395
|
+
/**
|
|
1396
|
+
* isLocked
|
|
1397
|
+
* view
|
|
1398
|
+
*/
|
|
1399
|
+
async isLocked() {
|
|
1400
|
+
return this.contract.read.isLocked();
|
|
1401
|
+
}
|
|
1402
|
+
/**
|
|
1403
|
+
* isPendingModule
|
|
1404
|
+
* view
|
|
1405
|
+
*/
|
|
1406
|
+
async isPendingModule(_module) {
|
|
1407
|
+
return this.contract.read.isPendingModule([_module]);
|
|
1408
|
+
}
|
|
1409
|
+
/**
|
|
1410
|
+
* locker
|
|
1411
|
+
* view
|
|
1412
|
+
*/
|
|
1413
|
+
async locker() {
|
|
1414
|
+
return this.contract.read.locker();
|
|
1415
|
+
}
|
|
1416
|
+
/**
|
|
1417
|
+
* manager
|
|
1418
|
+
* view
|
|
1419
|
+
*/
|
|
1420
|
+
async manager() {
|
|
1421
|
+
return this.contract.read.manager();
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* moduleStates
|
|
1425
|
+
* view
|
|
1426
|
+
*/
|
|
1427
|
+
async moduleStates(arg0) {
|
|
1428
|
+
return this.contract.read.moduleStates([arg0]);
|
|
1429
|
+
}
|
|
1430
|
+
/**
|
|
1431
|
+
* modules
|
|
1432
|
+
* view
|
|
1433
|
+
*/
|
|
1434
|
+
async modules(arg0) {
|
|
1435
|
+
return this.contract.read.modules([arg0]);
|
|
1436
|
+
}
|
|
1437
|
+
/**
|
|
1438
|
+
* name
|
|
1439
|
+
* view
|
|
1440
|
+
*/
|
|
1441
|
+
async name() {
|
|
1442
|
+
return this.contract.read.name();
|
|
1443
|
+
}
|
|
1444
|
+
/**
|
|
1445
|
+
* positionMultiplier
|
|
1446
|
+
* view
|
|
1447
|
+
*/
|
|
1448
|
+
async positionMultiplier() {
|
|
1449
|
+
return this.contract.read.positionMultiplier();
|
|
1450
|
+
}
|
|
1451
|
+
/**
|
|
1452
|
+
* symbol
|
|
1453
|
+
* view
|
|
1454
|
+
*/
|
|
1455
|
+
async symbol() {
|
|
1456
|
+
return this.contract.read.symbol();
|
|
1457
|
+
}
|
|
1458
|
+
/**
|
|
1459
|
+
* totalSupply
|
|
1460
|
+
* view
|
|
1461
|
+
*/
|
|
1462
|
+
async totalSupply() {
|
|
1463
|
+
return this.contract.read.totalSupply();
|
|
1464
|
+
}
|
|
1465
|
+
/**
|
|
1466
|
+
* addComponent
|
|
1467
|
+
* nonpayable
|
|
1468
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1469
|
+
*/
|
|
1470
|
+
async addComponent(_component, options) {
|
|
1471
|
+
if (!this.contract.write) {
|
|
1472
|
+
throw new Error('Wallet client is required for write operations');
|
|
1473
|
+
}
|
|
1474
|
+
return this.contract.write.addComponent([_component], options);
|
|
1475
|
+
}
|
|
1476
|
+
/**
|
|
1477
|
+
* addExternalPositionModule
|
|
1478
|
+
* nonpayable
|
|
1479
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1480
|
+
*/
|
|
1481
|
+
async addExternalPositionModule(_component, _positionModule, options) {
|
|
1482
|
+
if (!this.contract.write) {
|
|
1483
|
+
throw new Error('Wallet client is required for write operations');
|
|
1484
|
+
}
|
|
1485
|
+
return this.contract.write.addExternalPositionModule([_component, _positionModule], options);
|
|
1486
|
+
}
|
|
1487
|
+
/**
|
|
1488
|
+
* addModule
|
|
1489
|
+
* nonpayable
|
|
1490
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1491
|
+
*/
|
|
1492
|
+
async addModule(_module, options) {
|
|
1493
|
+
if (!this.contract.write) {
|
|
1494
|
+
throw new Error('Wallet client is required for write operations');
|
|
1495
|
+
}
|
|
1496
|
+
return this.contract.write.addModule([_module], options);
|
|
1497
|
+
}
|
|
1498
|
+
/**
|
|
1499
|
+
* approve
|
|
1500
|
+
* nonpayable
|
|
1501
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1502
|
+
*/
|
|
1503
|
+
async approve(spender, amount, options) {
|
|
1504
|
+
if (!this.contract.write) {
|
|
1505
|
+
throw new Error('Wallet client is required for write operations');
|
|
1506
|
+
}
|
|
1507
|
+
return this.contract.write.approve([spender, amount], options);
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
* burn
|
|
1511
|
+
* nonpayable
|
|
1512
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1513
|
+
*/
|
|
1514
|
+
async burn(_account, _quantity, options) {
|
|
1515
|
+
if (!this.contract.write) {
|
|
1516
|
+
throw new Error('Wallet client is required for write operations');
|
|
1517
|
+
}
|
|
1518
|
+
return this.contract.write.burn([_account, _quantity], options);
|
|
1519
|
+
}
|
|
1520
|
+
/**
|
|
1521
|
+
* decreaseAllowance
|
|
1522
|
+
* nonpayable
|
|
1523
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1524
|
+
*/
|
|
1525
|
+
async decreaseAllowance(spender, subtractedValue, options) {
|
|
1526
|
+
if (!this.contract.write) {
|
|
1527
|
+
throw new Error('Wallet client is required for write operations');
|
|
1528
|
+
}
|
|
1529
|
+
return this.contract.write.decreaseAllowance([spender, subtractedValue], options);
|
|
1530
|
+
}
|
|
1531
|
+
/**
|
|
1532
|
+
* editDefaultPositionUnit
|
|
1533
|
+
* nonpayable
|
|
1534
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1535
|
+
*/
|
|
1536
|
+
async editDefaultPositionUnit(_component, _realUnit, options) {
|
|
1537
|
+
if (!this.contract.write) {
|
|
1538
|
+
throw new Error('Wallet client is required for write operations');
|
|
1539
|
+
}
|
|
1540
|
+
return this.contract.write.editDefaultPositionUnit([_component, _realUnit], options);
|
|
1541
|
+
}
|
|
1542
|
+
/**
|
|
1543
|
+
* editExternalPositionData
|
|
1544
|
+
* nonpayable
|
|
1545
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1546
|
+
*/
|
|
1547
|
+
async editExternalPositionData(_component, _positionModule, _data, options) {
|
|
1548
|
+
if (!this.contract.write) {
|
|
1549
|
+
throw new Error('Wallet client is required for write operations');
|
|
1550
|
+
}
|
|
1551
|
+
return this.contract.write.editExternalPositionData([_component, _positionModule, _data], options);
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* editExternalPositionUnit
|
|
1555
|
+
* nonpayable
|
|
1556
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1557
|
+
*/
|
|
1558
|
+
async editExternalPositionUnit(_component, _positionModule, _realUnit, options) {
|
|
1559
|
+
if (!this.contract.write) {
|
|
1560
|
+
throw new Error('Wallet client is required for write operations');
|
|
1561
|
+
}
|
|
1562
|
+
return this.contract.write.editExternalPositionUnit([_component, _positionModule, _realUnit], options);
|
|
1563
|
+
}
|
|
1564
|
+
/**
|
|
1565
|
+
* editPositionMultiplier
|
|
1566
|
+
* nonpayable
|
|
1567
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1568
|
+
*/
|
|
1569
|
+
async editPositionMultiplier(_newMultiplier, options) {
|
|
1570
|
+
if (!this.contract.write) {
|
|
1571
|
+
throw new Error('Wallet client is required for write operations');
|
|
1572
|
+
}
|
|
1573
|
+
return this.contract.write.editPositionMultiplier([_newMultiplier], options);
|
|
1574
|
+
}
|
|
1575
|
+
/**
|
|
1576
|
+
* increaseAllowance
|
|
1577
|
+
* nonpayable
|
|
1578
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1579
|
+
*/
|
|
1580
|
+
async increaseAllowance(spender, addedValue, options) {
|
|
1581
|
+
if (!this.contract.write) {
|
|
1582
|
+
throw new Error('Wallet client is required for write operations');
|
|
1583
|
+
}
|
|
1584
|
+
return this.contract.write.increaseAllowance([spender, addedValue], options);
|
|
1585
|
+
}
|
|
1586
|
+
/**
|
|
1587
|
+
* initializeModule
|
|
1588
|
+
* nonpayable
|
|
1589
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1590
|
+
*/
|
|
1591
|
+
async initializeModule(options) {
|
|
1592
|
+
if (!this.contract.write) {
|
|
1593
|
+
throw new Error('Wallet client is required for write operations');
|
|
1594
|
+
}
|
|
1595
|
+
return this.contract.write.initializeModule(options);
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* invoke
|
|
1599
|
+
* nonpayable
|
|
1600
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1601
|
+
*/
|
|
1602
|
+
async invoke(_target, _value, _data, options) {
|
|
1603
|
+
if (!this.contract.write) {
|
|
1604
|
+
throw new Error('Wallet client is required for write operations');
|
|
1605
|
+
}
|
|
1606
|
+
return this.contract.write.invoke([_target, _value, _data], options);
|
|
1607
|
+
}
|
|
1608
|
+
/**
|
|
1609
|
+
* lock
|
|
1610
|
+
* nonpayable
|
|
1611
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1612
|
+
*/
|
|
1613
|
+
async lock(options) {
|
|
1614
|
+
if (!this.contract.write) {
|
|
1615
|
+
throw new Error('Wallet client is required for write operations');
|
|
1616
|
+
}
|
|
1617
|
+
return this.contract.write.lock(options);
|
|
1618
|
+
}
|
|
1619
|
+
/**
|
|
1620
|
+
* mint
|
|
1621
|
+
* nonpayable
|
|
1622
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1623
|
+
*/
|
|
1624
|
+
async mint(_account, _quantity, options) {
|
|
1625
|
+
if (!this.contract.write) {
|
|
1626
|
+
throw new Error('Wallet client is required for write operations');
|
|
1627
|
+
}
|
|
1628
|
+
return this.contract.write.mint([_account, _quantity], options);
|
|
1629
|
+
}
|
|
1630
|
+
/**
|
|
1631
|
+
* removeComponent
|
|
1632
|
+
* nonpayable
|
|
1633
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1634
|
+
*/
|
|
1635
|
+
async removeComponent(_component, options) {
|
|
1636
|
+
if (!this.contract.write) {
|
|
1637
|
+
throw new Error('Wallet client is required for write operations');
|
|
1638
|
+
}
|
|
1639
|
+
return this.contract.write.removeComponent([_component], options);
|
|
1640
|
+
}
|
|
1641
|
+
/**
|
|
1642
|
+
* removeExternalPositionModule
|
|
1643
|
+
* nonpayable
|
|
1644
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1645
|
+
*/
|
|
1646
|
+
async removeExternalPositionModule(_component, _positionModule, options) {
|
|
1647
|
+
if (!this.contract.write) {
|
|
1648
|
+
throw new Error('Wallet client is required for write operations');
|
|
1649
|
+
}
|
|
1650
|
+
return this.contract.write.removeExternalPositionModule([_component, _positionModule], options);
|
|
1651
|
+
}
|
|
1652
|
+
/**
|
|
1653
|
+
* removeModule
|
|
1654
|
+
* nonpayable
|
|
1655
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1656
|
+
*/
|
|
1657
|
+
async removeModule(_module, options) {
|
|
1658
|
+
if (!this.contract.write) {
|
|
1659
|
+
throw new Error('Wallet client is required for write operations');
|
|
1660
|
+
}
|
|
1661
|
+
return this.contract.write.removeModule([_module], options);
|
|
1662
|
+
}
|
|
1663
|
+
/**
|
|
1664
|
+
* removePendingModule
|
|
1665
|
+
* nonpayable
|
|
1666
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1667
|
+
*/
|
|
1668
|
+
async removePendingModule(_module, options) {
|
|
1669
|
+
if (!this.contract.write) {
|
|
1670
|
+
throw new Error('Wallet client is required for write operations');
|
|
1671
|
+
}
|
|
1672
|
+
return this.contract.write.removePendingModule([_module], options);
|
|
1673
|
+
}
|
|
1674
|
+
/**
|
|
1675
|
+
* setManager
|
|
1676
|
+
* nonpayable
|
|
1677
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1678
|
+
*/
|
|
1679
|
+
async setManager(_manager, options) {
|
|
1680
|
+
if (!this.contract.write) {
|
|
1681
|
+
throw new Error('Wallet client is required for write operations');
|
|
1682
|
+
}
|
|
1683
|
+
return this.contract.write.setManager([_manager], options);
|
|
1684
|
+
}
|
|
1685
|
+
/**
|
|
1686
|
+
* transfer
|
|
1687
|
+
* nonpayable
|
|
1688
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1689
|
+
*/
|
|
1690
|
+
async transfer(recipient, amount, options) {
|
|
1691
|
+
if (!this.contract.write) {
|
|
1692
|
+
throw new Error('Wallet client is required for write operations');
|
|
1693
|
+
}
|
|
1694
|
+
return this.contract.write.transfer([recipient, amount], options);
|
|
1695
|
+
}
|
|
1696
|
+
/**
|
|
1697
|
+
* transferFrom
|
|
1698
|
+
* nonpayable
|
|
1699
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1700
|
+
*/
|
|
1701
|
+
async transferFrom(sender, recipient, amount, options) {
|
|
1702
|
+
if (!this.contract.write) {
|
|
1703
|
+
throw new Error('Wallet client is required for write operations');
|
|
1704
|
+
}
|
|
1705
|
+
return this.contract.write.transferFrom([sender, recipient, amount], options);
|
|
1706
|
+
}
|
|
1707
|
+
/**
|
|
1708
|
+
* unlock
|
|
1709
|
+
* nonpayable
|
|
1710
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1711
|
+
*/
|
|
1712
|
+
async unlock(options) {
|
|
1713
|
+
if (!this.contract.write) {
|
|
1714
|
+
throw new Error('Wallet client is required for write operations');
|
|
1715
|
+
}
|
|
1716
|
+
return this.contract.write.unlock(options);
|
|
1717
|
+
}
|
|
1718
|
+
/**
|
|
1719
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
1720
|
+
*
|
|
1721
|
+
* @example
|
|
1722
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
1723
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
1724
|
+
* console.log('Would succeed:', result.result);
|
|
1725
|
+
*/
|
|
1726
|
+
get simulate() {
|
|
1727
|
+
const contract = this.contract;
|
|
1728
|
+
if (!contract.simulate) {
|
|
1729
|
+
throw new Error('Public client is required for simulation');
|
|
1730
|
+
}
|
|
1731
|
+
return {
|
|
1732
|
+
/**
|
|
1733
|
+
* Simulate addComponent
|
|
1734
|
+
* Returns gas estimate and result without sending transaction
|
|
1735
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1736
|
+
*/
|
|
1737
|
+
async addComponent(_component, options) {
|
|
1738
|
+
return contract.simulate.addComponent([_component], options);
|
|
1739
|
+
},
|
|
1740
|
+
/**
|
|
1741
|
+
* Simulate addExternalPositionModule
|
|
1742
|
+
* Returns gas estimate and result without sending transaction
|
|
1743
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1744
|
+
*/
|
|
1745
|
+
async addExternalPositionModule(_component, _positionModule, options) {
|
|
1746
|
+
return contract.simulate.addExternalPositionModule([_component, _positionModule], options);
|
|
1747
|
+
},
|
|
1748
|
+
/**
|
|
1749
|
+
* Simulate addModule
|
|
1750
|
+
* Returns gas estimate and result without sending transaction
|
|
1751
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1752
|
+
*/
|
|
1753
|
+
async addModule(_module, options) {
|
|
1754
|
+
return contract.simulate.addModule([_module], options);
|
|
1755
|
+
},
|
|
1756
|
+
/**
|
|
1757
|
+
* Simulate approve
|
|
1758
|
+
* Returns gas estimate and result without sending transaction
|
|
1759
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1760
|
+
*/
|
|
1761
|
+
async approve(spender, amount, options) {
|
|
1762
|
+
return contract.simulate.approve([spender, amount], options);
|
|
1763
|
+
},
|
|
1764
|
+
/**
|
|
1765
|
+
* Simulate burn
|
|
1766
|
+
* Returns gas estimate and result without sending transaction
|
|
1767
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1768
|
+
*/
|
|
1769
|
+
async burn(_account, _quantity, options) {
|
|
1770
|
+
return contract.simulate.burn([_account, _quantity], options);
|
|
1771
|
+
},
|
|
1772
|
+
/**
|
|
1773
|
+
* Simulate decreaseAllowance
|
|
1774
|
+
* Returns gas estimate and result without sending transaction
|
|
1775
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1776
|
+
*/
|
|
1777
|
+
async decreaseAllowance(spender, subtractedValue, options) {
|
|
1778
|
+
return contract.simulate.decreaseAllowance([spender, subtractedValue], options);
|
|
1779
|
+
},
|
|
1780
|
+
/**
|
|
1781
|
+
* Simulate editDefaultPositionUnit
|
|
1782
|
+
* Returns gas estimate and result without sending transaction
|
|
1783
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1784
|
+
*/
|
|
1785
|
+
async editDefaultPositionUnit(_component, _realUnit, options) {
|
|
1786
|
+
return contract.simulate.editDefaultPositionUnit([_component, _realUnit], options);
|
|
1787
|
+
},
|
|
1788
|
+
/**
|
|
1789
|
+
* Simulate editExternalPositionData
|
|
1790
|
+
* Returns gas estimate and result without sending transaction
|
|
1791
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1792
|
+
*/
|
|
1793
|
+
async editExternalPositionData(_component, _positionModule, _data, options) {
|
|
1794
|
+
return contract.simulate.editExternalPositionData([_component, _positionModule, _data], options);
|
|
1795
|
+
},
|
|
1796
|
+
/**
|
|
1797
|
+
* Simulate editExternalPositionUnit
|
|
1798
|
+
* Returns gas estimate and result without sending transaction
|
|
1799
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1800
|
+
*/
|
|
1801
|
+
async editExternalPositionUnit(_component, _positionModule, _realUnit, options) {
|
|
1802
|
+
return contract.simulate.editExternalPositionUnit([_component, _positionModule, _realUnit], options);
|
|
1803
|
+
},
|
|
1804
|
+
/**
|
|
1805
|
+
* Simulate editPositionMultiplier
|
|
1806
|
+
* Returns gas estimate and result without sending transaction
|
|
1807
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1808
|
+
*/
|
|
1809
|
+
async editPositionMultiplier(_newMultiplier, options) {
|
|
1810
|
+
return contract.simulate.editPositionMultiplier([_newMultiplier], options);
|
|
1811
|
+
},
|
|
1812
|
+
/**
|
|
1813
|
+
* Simulate increaseAllowance
|
|
1814
|
+
* Returns gas estimate and result without sending transaction
|
|
1815
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1816
|
+
*/
|
|
1817
|
+
async increaseAllowance(spender, addedValue, options) {
|
|
1818
|
+
return contract.simulate.increaseAllowance([spender, addedValue], options);
|
|
1819
|
+
},
|
|
1820
|
+
/**
|
|
1821
|
+
* Simulate initializeModule
|
|
1822
|
+
* Returns gas estimate and result without sending transaction
|
|
1823
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1824
|
+
*/
|
|
1825
|
+
async initializeModule(options) {
|
|
1826
|
+
return contract.simulate.initializeModule(options);
|
|
1827
|
+
},
|
|
1828
|
+
/**
|
|
1829
|
+
* Simulate invoke
|
|
1830
|
+
* Returns gas estimate and result without sending transaction
|
|
1831
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1832
|
+
*/
|
|
1833
|
+
async invoke(_target, _value, _data, options) {
|
|
1834
|
+
return contract.simulate.invoke([_target, _value, _data], options);
|
|
1835
|
+
},
|
|
1836
|
+
/**
|
|
1837
|
+
* Simulate lock
|
|
1838
|
+
* Returns gas estimate and result without sending transaction
|
|
1839
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1840
|
+
*/
|
|
1841
|
+
async lock(options) {
|
|
1842
|
+
return contract.simulate.lock(options);
|
|
1843
|
+
},
|
|
1844
|
+
/**
|
|
1845
|
+
* Simulate mint
|
|
1846
|
+
* Returns gas estimate and result without sending transaction
|
|
1847
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1848
|
+
*/
|
|
1849
|
+
async mint(_account, _quantity, options) {
|
|
1850
|
+
return contract.simulate.mint([_account, _quantity], options);
|
|
1851
|
+
},
|
|
1852
|
+
/**
|
|
1853
|
+
* Simulate removeComponent
|
|
1854
|
+
* Returns gas estimate and result without sending transaction
|
|
1855
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1856
|
+
*/
|
|
1857
|
+
async removeComponent(_component, options) {
|
|
1858
|
+
return contract.simulate.removeComponent([_component], options);
|
|
1859
|
+
},
|
|
1860
|
+
/**
|
|
1861
|
+
* Simulate removeExternalPositionModule
|
|
1862
|
+
* Returns gas estimate and result without sending transaction
|
|
1863
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1864
|
+
*/
|
|
1865
|
+
async removeExternalPositionModule(_component, _positionModule, options) {
|
|
1866
|
+
return contract.simulate.removeExternalPositionModule([_component, _positionModule], options);
|
|
1867
|
+
},
|
|
1868
|
+
/**
|
|
1869
|
+
* Simulate removeModule
|
|
1870
|
+
* Returns gas estimate and result without sending transaction
|
|
1871
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1872
|
+
*/
|
|
1873
|
+
async removeModule(_module, options) {
|
|
1874
|
+
return contract.simulate.removeModule([_module], options);
|
|
1875
|
+
},
|
|
1876
|
+
/**
|
|
1877
|
+
* Simulate removePendingModule
|
|
1878
|
+
* Returns gas estimate and result without sending transaction
|
|
1879
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1880
|
+
*/
|
|
1881
|
+
async removePendingModule(_module, options) {
|
|
1882
|
+
return contract.simulate.removePendingModule([_module], options);
|
|
1883
|
+
},
|
|
1884
|
+
/**
|
|
1885
|
+
* Simulate setManager
|
|
1886
|
+
* Returns gas estimate and result without sending transaction
|
|
1887
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1888
|
+
*/
|
|
1889
|
+
async setManager(_manager, options) {
|
|
1890
|
+
return contract.simulate.setManager([_manager], options);
|
|
1891
|
+
},
|
|
1892
|
+
/**
|
|
1893
|
+
* Simulate transfer
|
|
1894
|
+
* Returns gas estimate and result without sending transaction
|
|
1895
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1896
|
+
*/
|
|
1897
|
+
async transfer(recipient, amount, options) {
|
|
1898
|
+
return contract.simulate.transfer([recipient, amount], options);
|
|
1899
|
+
},
|
|
1900
|
+
/**
|
|
1901
|
+
* Simulate transferFrom
|
|
1902
|
+
* Returns gas estimate and result without sending transaction
|
|
1903
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1904
|
+
*/
|
|
1905
|
+
async transferFrom(sender, recipient, amount, options) {
|
|
1906
|
+
return contract.simulate.transferFrom([sender, recipient, amount], options);
|
|
1907
|
+
},
|
|
1908
|
+
/**
|
|
1909
|
+
* Simulate unlock
|
|
1910
|
+
* Returns gas estimate and result without sending transaction
|
|
1911
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1912
|
+
*/
|
|
1913
|
+
async unlock(options) {
|
|
1914
|
+
return contract.simulate.unlock(options);
|
|
1915
|
+
}
|
|
1916
|
+
};
|
|
1917
|
+
}
|
|
1918
|
+
/**
|
|
1919
|
+
* Watch contract events
|
|
1920
|
+
*
|
|
1921
|
+
* @example
|
|
1922
|
+
* // Watch all Transfer events
|
|
1923
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1924
|
+
* console.log('Transfer:', event);
|
|
1925
|
+
* });
|
|
1926
|
+
*
|
|
1927
|
+
* // Stop watching
|
|
1928
|
+
* unwatch();
|
|
1929
|
+
*/
|
|
1930
|
+
get watch() {
|
|
1931
|
+
return {
|
|
1932
|
+
/**
|
|
1933
|
+
* Watch Approval events
|
|
1934
|
+
* @param callback Function to call when event is emitted
|
|
1935
|
+
* @param filter Optional filter for indexed parameters
|
|
1936
|
+
* @returns Unwatch function to stop listening
|
|
1937
|
+
*/
|
|
1938
|
+
Approval: (callback, filter) => {
|
|
1939
|
+
return this.publicClient.watchContractEvent({
|
|
1940
|
+
address: this.contractAddress,
|
|
1941
|
+
abi: exports.SetToken_jsonAbi,
|
|
1942
|
+
eventName: 'Approval',
|
|
1943
|
+
args: filter,
|
|
1944
|
+
onLogs: (logs) => {
|
|
1945
|
+
logs.forEach((log) => {
|
|
1946
|
+
callback(log.args);
|
|
1947
|
+
});
|
|
1948
|
+
},
|
|
1949
|
+
});
|
|
1950
|
+
},
|
|
1951
|
+
/**
|
|
1952
|
+
* Watch ComponentAdded events
|
|
1953
|
+
* @param callback Function to call when event is emitted
|
|
1954
|
+
* @param filter Optional filter for indexed parameters
|
|
1955
|
+
* @returns Unwatch function to stop listening
|
|
1956
|
+
*/
|
|
1957
|
+
ComponentAdded: (callback, filter) => {
|
|
1958
|
+
return this.publicClient.watchContractEvent({
|
|
1959
|
+
address: this.contractAddress,
|
|
1960
|
+
abi: exports.SetToken_jsonAbi,
|
|
1961
|
+
eventName: 'ComponentAdded',
|
|
1962
|
+
args: filter,
|
|
1963
|
+
onLogs: (logs) => {
|
|
1964
|
+
logs.forEach((log) => {
|
|
1965
|
+
callback(log.args);
|
|
1966
|
+
});
|
|
1967
|
+
},
|
|
1968
|
+
});
|
|
1969
|
+
},
|
|
1970
|
+
/**
|
|
1971
|
+
* Watch ComponentRemoved events
|
|
1972
|
+
* @param callback Function to call when event is emitted
|
|
1973
|
+
* @param filter Optional filter for indexed parameters
|
|
1974
|
+
* @returns Unwatch function to stop listening
|
|
1975
|
+
*/
|
|
1976
|
+
ComponentRemoved: (callback, filter) => {
|
|
1977
|
+
return this.publicClient.watchContractEvent({
|
|
1978
|
+
address: this.contractAddress,
|
|
1979
|
+
abi: exports.SetToken_jsonAbi,
|
|
1980
|
+
eventName: 'ComponentRemoved',
|
|
1981
|
+
args: filter,
|
|
1982
|
+
onLogs: (logs) => {
|
|
1983
|
+
logs.forEach((log) => {
|
|
1984
|
+
callback(log.args);
|
|
1985
|
+
});
|
|
1986
|
+
},
|
|
1987
|
+
});
|
|
1988
|
+
},
|
|
1989
|
+
/**
|
|
1990
|
+
* Watch DefaultPositionUnitEdited events
|
|
1991
|
+
* @param callback Function to call when event is emitted
|
|
1992
|
+
* @param filter Optional filter for indexed parameters
|
|
1993
|
+
* @returns Unwatch function to stop listening
|
|
1994
|
+
*/
|
|
1995
|
+
DefaultPositionUnitEdited: (callback, filter) => {
|
|
1996
|
+
return this.publicClient.watchContractEvent({
|
|
1997
|
+
address: this.contractAddress,
|
|
1998
|
+
abi: exports.SetToken_jsonAbi,
|
|
1999
|
+
eventName: 'DefaultPositionUnitEdited',
|
|
2000
|
+
args: filter,
|
|
2001
|
+
onLogs: (logs) => {
|
|
2002
|
+
logs.forEach((log) => {
|
|
2003
|
+
callback(log.args);
|
|
2004
|
+
});
|
|
2005
|
+
},
|
|
2006
|
+
});
|
|
2007
|
+
},
|
|
2008
|
+
/**
|
|
2009
|
+
* Watch ExternalPositionDataEdited events
|
|
2010
|
+
* @param callback Function to call when event is emitted
|
|
2011
|
+
* @param filter Optional filter for indexed parameters
|
|
2012
|
+
* @returns Unwatch function to stop listening
|
|
2013
|
+
*/
|
|
2014
|
+
ExternalPositionDataEdited: (callback, filter) => {
|
|
2015
|
+
return this.publicClient.watchContractEvent({
|
|
2016
|
+
address: this.contractAddress,
|
|
2017
|
+
abi: exports.SetToken_jsonAbi,
|
|
2018
|
+
eventName: 'ExternalPositionDataEdited',
|
|
2019
|
+
args: filter,
|
|
2020
|
+
onLogs: (logs) => {
|
|
2021
|
+
logs.forEach((log) => {
|
|
2022
|
+
callback(log.args);
|
|
2023
|
+
});
|
|
2024
|
+
},
|
|
2025
|
+
});
|
|
2026
|
+
},
|
|
2027
|
+
/**
|
|
2028
|
+
* Watch ExternalPositionUnitEdited events
|
|
2029
|
+
* @param callback Function to call when event is emitted
|
|
2030
|
+
* @param filter Optional filter for indexed parameters
|
|
2031
|
+
* @returns Unwatch function to stop listening
|
|
2032
|
+
*/
|
|
2033
|
+
ExternalPositionUnitEdited: (callback, filter) => {
|
|
2034
|
+
return this.publicClient.watchContractEvent({
|
|
2035
|
+
address: this.contractAddress,
|
|
2036
|
+
abi: exports.SetToken_jsonAbi,
|
|
2037
|
+
eventName: 'ExternalPositionUnitEdited',
|
|
2038
|
+
args: filter,
|
|
2039
|
+
onLogs: (logs) => {
|
|
2040
|
+
logs.forEach((log) => {
|
|
2041
|
+
callback(log.args);
|
|
2042
|
+
});
|
|
2043
|
+
},
|
|
2044
|
+
});
|
|
2045
|
+
},
|
|
2046
|
+
/**
|
|
2047
|
+
* Watch Invoked events
|
|
2048
|
+
* @param callback Function to call when event is emitted
|
|
2049
|
+
* @param filter Optional filter for indexed parameters
|
|
2050
|
+
* @returns Unwatch function to stop listening
|
|
2051
|
+
*/
|
|
2052
|
+
Invoked: (callback, filter) => {
|
|
2053
|
+
return this.publicClient.watchContractEvent({
|
|
2054
|
+
address: this.contractAddress,
|
|
2055
|
+
abi: exports.SetToken_jsonAbi,
|
|
2056
|
+
eventName: 'Invoked',
|
|
2057
|
+
args: filter,
|
|
2058
|
+
onLogs: (logs) => {
|
|
2059
|
+
logs.forEach((log) => {
|
|
2060
|
+
callback(log.args);
|
|
2061
|
+
});
|
|
2062
|
+
},
|
|
2063
|
+
});
|
|
2064
|
+
},
|
|
2065
|
+
/**
|
|
2066
|
+
* Watch ManagerEdited events
|
|
2067
|
+
* @param callback Function to call when event is emitted
|
|
2068
|
+
* @param filter Optional filter for indexed parameters
|
|
2069
|
+
* @returns Unwatch function to stop listening
|
|
2070
|
+
*/
|
|
2071
|
+
ManagerEdited: (callback) => {
|
|
2072
|
+
return this.publicClient.watchContractEvent({
|
|
2073
|
+
address: this.contractAddress,
|
|
2074
|
+
abi: exports.SetToken_jsonAbi,
|
|
2075
|
+
eventName: 'ManagerEdited',
|
|
2076
|
+
onLogs: (logs) => {
|
|
2077
|
+
logs.forEach((log) => {
|
|
2078
|
+
callback(log.args);
|
|
2079
|
+
});
|
|
2080
|
+
},
|
|
2081
|
+
});
|
|
2082
|
+
},
|
|
2083
|
+
/**
|
|
2084
|
+
* Watch ModuleAdded events
|
|
2085
|
+
* @param callback Function to call when event is emitted
|
|
2086
|
+
* @param filter Optional filter for indexed parameters
|
|
2087
|
+
* @returns Unwatch function to stop listening
|
|
2088
|
+
*/
|
|
2089
|
+
ModuleAdded: (callback, filter) => {
|
|
2090
|
+
return this.publicClient.watchContractEvent({
|
|
2091
|
+
address: this.contractAddress,
|
|
2092
|
+
abi: exports.SetToken_jsonAbi,
|
|
2093
|
+
eventName: 'ModuleAdded',
|
|
2094
|
+
args: filter,
|
|
2095
|
+
onLogs: (logs) => {
|
|
2096
|
+
logs.forEach((log) => {
|
|
2097
|
+
callback(log.args);
|
|
2098
|
+
});
|
|
2099
|
+
},
|
|
2100
|
+
});
|
|
2101
|
+
},
|
|
2102
|
+
/**
|
|
2103
|
+
* Watch ModuleInitialized events
|
|
2104
|
+
* @param callback Function to call when event is emitted
|
|
2105
|
+
* @param filter Optional filter for indexed parameters
|
|
2106
|
+
* @returns Unwatch function to stop listening
|
|
2107
|
+
*/
|
|
2108
|
+
ModuleInitialized: (callback, filter) => {
|
|
2109
|
+
return this.publicClient.watchContractEvent({
|
|
2110
|
+
address: this.contractAddress,
|
|
2111
|
+
abi: exports.SetToken_jsonAbi,
|
|
2112
|
+
eventName: 'ModuleInitialized',
|
|
2113
|
+
args: filter,
|
|
2114
|
+
onLogs: (logs) => {
|
|
2115
|
+
logs.forEach((log) => {
|
|
2116
|
+
callback(log.args);
|
|
2117
|
+
});
|
|
2118
|
+
},
|
|
2119
|
+
});
|
|
2120
|
+
},
|
|
2121
|
+
/**
|
|
2122
|
+
* Watch ModuleRemoved events
|
|
2123
|
+
* @param callback Function to call when event is emitted
|
|
2124
|
+
* @param filter Optional filter for indexed parameters
|
|
2125
|
+
* @returns Unwatch function to stop listening
|
|
2126
|
+
*/
|
|
2127
|
+
ModuleRemoved: (callback, filter) => {
|
|
2128
|
+
return this.publicClient.watchContractEvent({
|
|
2129
|
+
address: this.contractAddress,
|
|
2130
|
+
abi: exports.SetToken_jsonAbi,
|
|
2131
|
+
eventName: 'ModuleRemoved',
|
|
2132
|
+
args: filter,
|
|
2133
|
+
onLogs: (logs) => {
|
|
2134
|
+
logs.forEach((log) => {
|
|
2135
|
+
callback(log.args);
|
|
2136
|
+
});
|
|
2137
|
+
},
|
|
2138
|
+
});
|
|
2139
|
+
},
|
|
2140
|
+
/**
|
|
2141
|
+
* Watch PendingModuleRemoved events
|
|
2142
|
+
* @param callback Function to call when event is emitted
|
|
2143
|
+
* @param filter Optional filter for indexed parameters
|
|
2144
|
+
* @returns Unwatch function to stop listening
|
|
2145
|
+
*/
|
|
2146
|
+
PendingModuleRemoved: (callback, filter) => {
|
|
2147
|
+
return this.publicClient.watchContractEvent({
|
|
2148
|
+
address: this.contractAddress,
|
|
2149
|
+
abi: exports.SetToken_jsonAbi,
|
|
2150
|
+
eventName: 'PendingModuleRemoved',
|
|
2151
|
+
args: filter,
|
|
2152
|
+
onLogs: (logs) => {
|
|
2153
|
+
logs.forEach((log) => {
|
|
2154
|
+
callback(log.args);
|
|
2155
|
+
});
|
|
2156
|
+
},
|
|
2157
|
+
});
|
|
2158
|
+
},
|
|
2159
|
+
/**
|
|
2160
|
+
* Watch PositionModuleAdded events
|
|
2161
|
+
* @param callback Function to call when event is emitted
|
|
2162
|
+
* @param filter Optional filter for indexed parameters
|
|
2163
|
+
* @returns Unwatch function to stop listening
|
|
2164
|
+
*/
|
|
2165
|
+
PositionModuleAdded: (callback, filter) => {
|
|
2166
|
+
return this.publicClient.watchContractEvent({
|
|
2167
|
+
address: this.contractAddress,
|
|
2168
|
+
abi: exports.SetToken_jsonAbi,
|
|
2169
|
+
eventName: 'PositionModuleAdded',
|
|
2170
|
+
args: filter,
|
|
2171
|
+
onLogs: (logs) => {
|
|
2172
|
+
logs.forEach((log) => {
|
|
2173
|
+
callback(log.args);
|
|
2174
|
+
});
|
|
2175
|
+
},
|
|
2176
|
+
});
|
|
2177
|
+
},
|
|
2178
|
+
/**
|
|
2179
|
+
* Watch PositionModuleRemoved events
|
|
2180
|
+
* @param callback Function to call when event is emitted
|
|
2181
|
+
* @param filter Optional filter for indexed parameters
|
|
2182
|
+
* @returns Unwatch function to stop listening
|
|
2183
|
+
*/
|
|
2184
|
+
PositionModuleRemoved: (callback, filter) => {
|
|
2185
|
+
return this.publicClient.watchContractEvent({
|
|
2186
|
+
address: this.contractAddress,
|
|
2187
|
+
abi: exports.SetToken_jsonAbi,
|
|
2188
|
+
eventName: 'PositionModuleRemoved',
|
|
2189
|
+
args: filter,
|
|
2190
|
+
onLogs: (logs) => {
|
|
2191
|
+
logs.forEach((log) => {
|
|
2192
|
+
callback(log.args);
|
|
2193
|
+
});
|
|
2194
|
+
},
|
|
2195
|
+
});
|
|
2196
|
+
},
|
|
2197
|
+
/**
|
|
2198
|
+
* Watch PositionMultiplierEdited events
|
|
2199
|
+
* @param callback Function to call when event is emitted
|
|
2200
|
+
* @param filter Optional filter for indexed parameters
|
|
2201
|
+
* @returns Unwatch function to stop listening
|
|
2202
|
+
*/
|
|
2203
|
+
PositionMultiplierEdited: (callback) => {
|
|
2204
|
+
return this.publicClient.watchContractEvent({
|
|
2205
|
+
address: this.contractAddress,
|
|
2206
|
+
abi: exports.SetToken_jsonAbi,
|
|
2207
|
+
eventName: 'PositionMultiplierEdited',
|
|
2208
|
+
onLogs: (logs) => {
|
|
2209
|
+
logs.forEach((log) => {
|
|
2210
|
+
callback(log.args);
|
|
2211
|
+
});
|
|
2212
|
+
},
|
|
2213
|
+
});
|
|
2214
|
+
},
|
|
2215
|
+
/**
|
|
2216
|
+
* Watch Transfer events
|
|
2217
|
+
* @param callback Function to call when event is emitted
|
|
2218
|
+
* @param filter Optional filter for indexed parameters
|
|
2219
|
+
* @returns Unwatch function to stop listening
|
|
2220
|
+
*/
|
|
2221
|
+
Transfer: (callback, filter) => {
|
|
2222
|
+
return this.publicClient.watchContractEvent({
|
|
2223
|
+
address: this.contractAddress,
|
|
2224
|
+
abi: exports.SetToken_jsonAbi,
|
|
2225
|
+
eventName: 'Transfer',
|
|
2226
|
+
args: filter,
|
|
2227
|
+
onLogs: (logs) => {
|
|
2228
|
+
logs.forEach((log) => {
|
|
2229
|
+
callback(log.args);
|
|
2230
|
+
});
|
|
2231
|
+
},
|
|
2232
|
+
});
|
|
2233
|
+
}
|
|
2234
|
+
};
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
2237
|
+
exports.SetToken_json = SetToken_json;
|