@overcast-xyz/evm-contracts 0.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.
Files changed (36) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +162 -0
  3. package/dist/cjs/generated/abis.d.ts +8064 -0
  4. package/dist/cjs/generated/abis.d.ts.map +1 -0
  5. package/dist/cjs/generated/abis.js +4108 -0
  6. package/dist/cjs/generated/abis.js.map +1 -0
  7. package/dist/cjs/generated/enums.d.ts +42 -0
  8. package/dist/cjs/generated/enums.d.ts.map +1 -0
  9. package/dist/cjs/generated/enums.js +44 -0
  10. package/dist/cjs/generated/enums.js.map +1 -0
  11. package/dist/cjs/generated/structs.d.ts +392 -0
  12. package/dist/cjs/generated/structs.d.ts.map +1 -0
  13. package/dist/cjs/generated/structs.js +419 -0
  14. package/dist/cjs/generated/structs.js.map +1 -0
  15. package/dist/cjs/index.d.ts +4 -0
  16. package/dist/cjs/index.d.ts.map +1 -0
  17. package/dist/cjs/index.js +26 -0
  18. package/dist/cjs/index.js.map +1 -0
  19. package/dist/cjs/package.json +3 -0
  20. package/dist/esm/generated/abis.d.ts +8064 -0
  21. package/dist/esm/generated/abis.d.ts.map +1 -0
  22. package/dist/esm/generated/abis.js +4105 -0
  23. package/dist/esm/generated/abis.js.map +1 -0
  24. package/dist/esm/generated/enums.d.ts +42 -0
  25. package/dist/esm/generated/enums.d.ts.map +1 -0
  26. package/dist/esm/generated/enums.js +41 -0
  27. package/dist/esm/generated/enums.js.map +1 -0
  28. package/dist/esm/generated/structs.d.ts +392 -0
  29. package/dist/esm/generated/structs.d.ts.map +1 -0
  30. package/dist/esm/generated/structs.js +416 -0
  31. package/dist/esm/generated/structs.js.map +1 -0
  32. package/dist/esm/index.d.ts +4 -0
  33. package/dist/esm/index.d.ts.map +1 -0
  34. package/dist/esm/index.js +10 -0
  35. package/dist/esm/index.js.map +1 -0
  36. package/package.json +52 -0
@@ -0,0 +1,4105 @@
1
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2
+ // ChainlinkSettlement
3
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4
+ export const chainlinkSettlementAbi = [
5
+ {
6
+ type: 'constructor',
7
+ inputs: [
8
+ {
9
+ name: 'config',
10
+ internalType: 'struct ChainlinkSettlementConfig',
11
+ type: 'tuple',
12
+ components: [
13
+ { name: 'collateralAsset', internalType: 'address', type: 'address' },
14
+ { name: 'settlementAsset', internalType: 'address', type: 'address' },
15
+ {
16
+ name: 'collateralFeed',
17
+ internalType: 'contract IAggregatorV3',
18
+ type: 'address',
19
+ },
20
+ {
21
+ name: 'settlementFeed',
22
+ internalType: 'contract IAggregatorV3',
23
+ type: 'address',
24
+ },
25
+ {
26
+ name: 'collMaxStalenessSecs',
27
+ internalType: 'uint32',
28
+ type: 'uint32',
29
+ },
30
+ {
31
+ name: 'settMaxStalenessSecs',
32
+ internalType: 'uint32',
33
+ type: 'uint32',
34
+ },
35
+ { name: 'intrinsicResolution', internalType: 'bool', type: 'bool' },
36
+ {
37
+ name: 'exerciseMode',
38
+ internalType: 'enum ExerciseMode',
39
+ type: 'uint8',
40
+ },
41
+ ],
42
+ },
43
+ ],
44
+ stateMutability: 'nonpayable',
45
+ },
46
+ {
47
+ type: 'function',
48
+ inputs: [],
49
+ name: 'COLLATERAL_ASSET',
50
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
51
+ stateMutability: 'view',
52
+ },
53
+ {
54
+ type: 'function',
55
+ inputs: [],
56
+ name: 'COLLATERAL_DECIMALS',
57
+ outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
58
+ stateMutability: 'view',
59
+ },
60
+ {
61
+ type: 'function',
62
+ inputs: [],
63
+ name: 'COLLATERAL_FEED',
64
+ outputs: [
65
+ { name: '', internalType: 'contract IAggregatorV3', type: 'address' },
66
+ ],
67
+ stateMutability: 'view',
68
+ },
69
+ {
70
+ type: 'function',
71
+ inputs: [],
72
+ name: 'COLL_MAX_STALENESS_SECS',
73
+ outputs: [{ name: '', internalType: 'uint32', type: 'uint32' }],
74
+ stateMutability: 'view',
75
+ },
76
+ {
77
+ type: 'function',
78
+ inputs: [],
79
+ name: 'EXERCISE_MODE',
80
+ outputs: [{ name: '', internalType: 'enum ExerciseMode', type: 'uint8' }],
81
+ stateMutability: 'view',
82
+ },
83
+ {
84
+ type: 'function',
85
+ inputs: [],
86
+ name: 'INTRINSIC_RESOLUTION',
87
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
88
+ stateMutability: 'view',
89
+ },
90
+ {
91
+ type: 'function',
92
+ inputs: [],
93
+ name: 'SETTLEMENT_ASSET',
94
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
95
+ stateMutability: 'view',
96
+ },
97
+ {
98
+ type: 'function',
99
+ inputs: [],
100
+ name: 'SETTLEMENT_DECIMALS',
101
+ outputs: [{ name: '', internalType: 'uint8', type: 'uint8' }],
102
+ stateMutability: 'view',
103
+ },
104
+ {
105
+ type: 'function',
106
+ inputs: [],
107
+ name: 'SETTLEMENT_FEED',
108
+ outputs: [
109
+ { name: '', internalType: 'contract IAggregatorV3', type: 'address' },
110
+ ],
111
+ stateMutability: 'view',
112
+ },
113
+ {
114
+ type: 'function',
115
+ inputs: [],
116
+ name: 'SETT_MAX_STALENESS_SECS',
117
+ outputs: [{ name: '', internalType: 'uint32', type: 'uint32' }],
118
+ stateMutability: 'view',
119
+ },
120
+ {
121
+ type: 'function',
122
+ inputs: [
123
+ {
124
+ name: 'option',
125
+ internalType: 'struct MarketOption',
126
+ type: 'tuple',
127
+ components: [
128
+ {
129
+ name: 'details',
130
+ internalType: 'struct OptionDetails',
131
+ type: 'tuple',
132
+ components: [
133
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
134
+ {
135
+ name: 'startTimestamp',
136
+ internalType: 'uint64',
137
+ type: 'uint64',
138
+ },
139
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
140
+ {
141
+ name: 'premiumAsset',
142
+ internalType: 'address',
143
+ type: 'address',
144
+ },
145
+ {
146
+ name: 'premiumAmount',
147
+ internalType: 'uint256',
148
+ type: 'uint256',
149
+ },
150
+ {
151
+ name: 'collateralAsset',
152
+ internalType: 'address',
153
+ type: 'address',
154
+ },
155
+ {
156
+ name: 'collateralAmount',
157
+ internalType: 'uint256',
158
+ type: 'uint256',
159
+ },
160
+ {
161
+ name: 'settlementAsset',
162
+ internalType: 'address',
163
+ type: 'address',
164
+ },
165
+ {
166
+ name: 'settlementAmount',
167
+ internalType: 'uint256',
168
+ type: 'uint256',
169
+ },
170
+ {
171
+ name: 'settlementLayer',
172
+ internalType: 'address',
173
+ type: 'address',
174
+ },
175
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
176
+ ],
177
+ },
178
+ { name: 'taker', internalType: 'address', type: 'address' },
179
+ { name: 'maker', internalType: 'address', type: 'address' },
180
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
181
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
182
+ ],
183
+ },
184
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
185
+ { name: 'borrower', internalType: 'address', type: 'address' },
186
+ { name: 'collateralReceiver', internalType: 'address', type: 'address' },
187
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
188
+ ],
189
+ name: 'canBorrow',
190
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
191
+ stateMutability: 'pure',
192
+ },
193
+ {
194
+ type: 'function',
195
+ inputs: [
196
+ {
197
+ name: 'option',
198
+ internalType: 'struct MarketOption',
199
+ type: 'tuple',
200
+ components: [
201
+ {
202
+ name: 'details',
203
+ internalType: 'struct OptionDetails',
204
+ type: 'tuple',
205
+ components: [
206
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
207
+ {
208
+ name: 'startTimestamp',
209
+ internalType: 'uint64',
210
+ type: 'uint64',
211
+ },
212
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
213
+ {
214
+ name: 'premiumAsset',
215
+ internalType: 'address',
216
+ type: 'address',
217
+ },
218
+ {
219
+ name: 'premiumAmount',
220
+ internalType: 'uint256',
221
+ type: 'uint256',
222
+ },
223
+ {
224
+ name: 'collateralAsset',
225
+ internalType: 'address',
226
+ type: 'address',
227
+ },
228
+ {
229
+ name: 'collateralAmount',
230
+ internalType: 'uint256',
231
+ type: 'uint256',
232
+ },
233
+ {
234
+ name: 'settlementAsset',
235
+ internalType: 'address',
236
+ type: 'address',
237
+ },
238
+ {
239
+ name: 'settlementAmount',
240
+ internalType: 'uint256',
241
+ type: 'uint256',
242
+ },
243
+ {
244
+ name: 'settlementLayer',
245
+ internalType: 'address',
246
+ type: 'address',
247
+ },
248
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
249
+ ],
250
+ },
251
+ { name: 'taker', internalType: 'address', type: 'address' },
252
+ { name: 'maker', internalType: 'address', type: 'address' },
253
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
254
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
255
+ ],
256
+ },
257
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
258
+ { name: '', internalType: 'address', type: 'address' },
259
+ { name: '', internalType: 'bytes', type: 'bytes' },
260
+ ],
261
+ name: 'canExercise',
262
+ outputs: [
263
+ {
264
+ name: '',
265
+ internalType: 'struct ExerciseResolution',
266
+ type: 'tuple',
267
+ components: [
268
+ {
269
+ name: 'collateralToTaker',
270
+ internalType: 'uint256',
271
+ type: 'uint256',
272
+ },
273
+ {
274
+ name: 'settlementFromTaker',
275
+ internalType: 'uint256',
276
+ type: 'uint256',
277
+ },
278
+ ],
279
+ },
280
+ ],
281
+ stateMutability: 'view',
282
+ },
283
+ {
284
+ type: 'function',
285
+ inputs: [
286
+ {
287
+ name: 'option',
288
+ internalType: 'struct MarketOption',
289
+ type: 'tuple',
290
+ components: [
291
+ {
292
+ name: 'details',
293
+ internalType: 'struct OptionDetails',
294
+ type: 'tuple',
295
+ components: [
296
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
297
+ {
298
+ name: 'startTimestamp',
299
+ internalType: 'uint64',
300
+ type: 'uint64',
301
+ },
302
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
303
+ {
304
+ name: 'premiumAsset',
305
+ internalType: 'address',
306
+ type: 'address',
307
+ },
308
+ {
309
+ name: 'premiumAmount',
310
+ internalType: 'uint256',
311
+ type: 'uint256',
312
+ },
313
+ {
314
+ name: 'collateralAsset',
315
+ internalType: 'address',
316
+ type: 'address',
317
+ },
318
+ {
319
+ name: 'collateralAmount',
320
+ internalType: 'uint256',
321
+ type: 'uint256',
322
+ },
323
+ {
324
+ name: 'settlementAsset',
325
+ internalType: 'address',
326
+ type: 'address',
327
+ },
328
+ {
329
+ name: 'settlementAmount',
330
+ internalType: 'uint256',
331
+ type: 'uint256',
332
+ },
333
+ {
334
+ name: 'settlementLayer',
335
+ internalType: 'address',
336
+ type: 'address',
337
+ },
338
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
339
+ ],
340
+ },
341
+ { name: 'taker', internalType: 'address', type: 'address' },
342
+ { name: 'maker', internalType: 'address', type: 'address' },
343
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
344
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
345
+ ],
346
+ },
347
+ { name: '', internalType: 'address', type: 'address' },
348
+ ],
349
+ name: 'canMatch',
350
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
351
+ stateMutability: 'view',
352
+ },
353
+ {
354
+ type: 'function',
355
+ inputs: [
356
+ {
357
+ name: 'option',
358
+ internalType: 'struct MarketOption',
359
+ type: 'tuple',
360
+ components: [
361
+ {
362
+ name: 'details',
363
+ internalType: 'struct OptionDetails',
364
+ type: 'tuple',
365
+ components: [
366
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
367
+ {
368
+ name: 'startTimestamp',
369
+ internalType: 'uint64',
370
+ type: 'uint64',
371
+ },
372
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
373
+ {
374
+ name: 'premiumAsset',
375
+ internalType: 'address',
376
+ type: 'address',
377
+ },
378
+ {
379
+ name: 'premiumAmount',
380
+ internalType: 'uint256',
381
+ type: 'uint256',
382
+ },
383
+ {
384
+ name: 'collateralAsset',
385
+ internalType: 'address',
386
+ type: 'address',
387
+ },
388
+ {
389
+ name: 'collateralAmount',
390
+ internalType: 'uint256',
391
+ type: 'uint256',
392
+ },
393
+ {
394
+ name: 'settlementAsset',
395
+ internalType: 'address',
396
+ type: 'address',
397
+ },
398
+ {
399
+ name: 'settlementAmount',
400
+ internalType: 'uint256',
401
+ type: 'uint256',
402
+ },
403
+ {
404
+ name: 'settlementLayer',
405
+ internalType: 'address',
406
+ type: 'address',
407
+ },
408
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
409
+ ],
410
+ },
411
+ { name: 'taker', internalType: 'address', type: 'address' },
412
+ { name: 'maker', internalType: 'address', type: 'address' },
413
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
414
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
415
+ ],
416
+ },
417
+ { name: 'redeemAmount', internalType: 'uint256', type: 'uint256' },
418
+ { name: 'claimSupply', internalType: 'uint256', type: 'uint256' },
419
+ { name: 'collateralBalance', internalType: 'uint256', type: 'uint256' },
420
+ { name: 'settlementBalance', internalType: 'uint256', type: 'uint256' },
421
+ { name: 'redeemer', internalType: 'address', type: 'address' },
422
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
423
+ ],
424
+ name: 'canRedeem',
425
+ outputs: [
426
+ {
427
+ name: '',
428
+ internalType: 'struct RedeemResolution',
429
+ type: 'tuple',
430
+ components: [
431
+ {
432
+ name: 'collateralToMaker',
433
+ internalType: 'uint256',
434
+ type: 'uint256',
435
+ },
436
+ {
437
+ name: 'settlementToMaker',
438
+ internalType: 'uint256',
439
+ type: 'uint256',
440
+ },
441
+ ],
442
+ },
443
+ ],
444
+ stateMutability: 'view',
445
+ },
446
+ {
447
+ type: 'function',
448
+ inputs: [],
449
+ name: 'layerType',
450
+ outputs: [
451
+ { name: '', internalType: 'enum SettlementLayerType', type: 'uint8' },
452
+ ],
453
+ stateMutability: 'pure',
454
+ },
455
+ { type: 'error', inputs: [], name: 'BorrowNotSupported' },
456
+ { type: 'error', inputs: [], name: 'CollateralAmountZero' },
457
+ { type: 'error', inputs: [], name: 'ExerciseExceedsCollateral' },
458
+ {
459
+ type: 'error',
460
+ inputs: [
461
+ { name: 'feed', internalType: 'address', type: 'address' },
462
+ { name: 'decimals', internalType: 'uint8', type: 'uint8' },
463
+ ],
464
+ name: 'InvalidFeedDecimals',
465
+ },
466
+ { type: 'error', inputs: [], name: 'NoClaimsOutstanding' },
467
+ { type: 'error', inputs: [], name: 'NotInTheMoney' },
468
+ { type: 'error', inputs: [], name: 'PartialExerciseNotAllowed' },
469
+ {
470
+ type: 'error',
471
+ inputs: [{ name: 'feed', internalType: 'address', type: 'address' }],
472
+ name: 'PriceNotAvailable',
473
+ },
474
+ { type: 'error', inputs: [], name: 'RedeemExceedsClaimSupply' },
475
+ {
476
+ type: 'error',
477
+ inputs: [
478
+ { name: 'feed', internalType: 'address', type: 'address' },
479
+ { name: 'updatedAt', internalType: 'uint256', type: 'uint256' },
480
+ { name: 'nowSecs', internalType: 'uint256', type: 'uint256' },
481
+ ],
482
+ name: 'StalePrice',
483
+ },
484
+ ];
485
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
486
+ // ChainlinkSettlementFactory
487
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
488
+ /**
489
+ *
490
+ */
491
+ export const chainlinkSettlementFactoryAbi = [
492
+ {
493
+ type: 'function',
494
+ inputs: [
495
+ {
496
+ name: 'config',
497
+ internalType: 'struct ChainlinkSettlementConfig',
498
+ type: 'tuple',
499
+ components: [
500
+ { name: 'collateralAsset', internalType: 'address', type: 'address' },
501
+ { name: 'settlementAsset', internalType: 'address', type: 'address' },
502
+ {
503
+ name: 'collateralFeed',
504
+ internalType: 'contract IAggregatorV3',
505
+ type: 'address',
506
+ },
507
+ {
508
+ name: 'settlementFeed',
509
+ internalType: 'contract IAggregatorV3',
510
+ type: 'address',
511
+ },
512
+ {
513
+ name: 'collMaxStalenessSecs',
514
+ internalType: 'uint32',
515
+ type: 'uint32',
516
+ },
517
+ {
518
+ name: 'settMaxStalenessSecs',
519
+ internalType: 'uint32',
520
+ type: 'uint32',
521
+ },
522
+ { name: 'intrinsicResolution', internalType: 'bool', type: 'bool' },
523
+ {
524
+ name: 'exerciseMode',
525
+ internalType: 'enum ExerciseMode',
526
+ type: 'uint8',
527
+ },
528
+ ],
529
+ },
530
+ ],
531
+ name: 'deploy',
532
+ outputs: [
533
+ {
534
+ name: 'layer',
535
+ internalType: 'contract ChainlinkSettlement',
536
+ type: 'address',
537
+ },
538
+ ],
539
+ stateMutability: 'nonpayable',
540
+ },
541
+ {
542
+ type: 'function',
543
+ inputs: [
544
+ {
545
+ name: 'config',
546
+ internalType: 'struct ChainlinkSettlementConfig',
547
+ type: 'tuple',
548
+ components: [
549
+ { name: 'collateralAsset', internalType: 'address', type: 'address' },
550
+ { name: 'settlementAsset', internalType: 'address', type: 'address' },
551
+ {
552
+ name: 'collateralFeed',
553
+ internalType: 'contract IAggregatorV3',
554
+ type: 'address',
555
+ },
556
+ {
557
+ name: 'settlementFeed',
558
+ internalType: 'contract IAggregatorV3',
559
+ type: 'address',
560
+ },
561
+ {
562
+ name: 'collMaxStalenessSecs',
563
+ internalType: 'uint32',
564
+ type: 'uint32',
565
+ },
566
+ {
567
+ name: 'settMaxStalenessSecs',
568
+ internalType: 'uint32',
569
+ type: 'uint32',
570
+ },
571
+ { name: 'intrinsicResolution', internalType: 'bool', type: 'bool' },
572
+ {
573
+ name: 'exerciseMode',
574
+ internalType: 'enum ExerciseMode',
575
+ type: 'uint8',
576
+ },
577
+ ],
578
+ },
579
+ ],
580
+ name: 'initCodeHash',
581
+ outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
582
+ stateMutability: 'pure',
583
+ },
584
+ {
585
+ type: 'function',
586
+ inputs: [
587
+ {
588
+ name: 'config',
589
+ internalType: 'struct ChainlinkSettlementConfig',
590
+ type: 'tuple',
591
+ components: [
592
+ { name: 'collateralAsset', internalType: 'address', type: 'address' },
593
+ { name: 'settlementAsset', internalType: 'address', type: 'address' },
594
+ {
595
+ name: 'collateralFeed',
596
+ internalType: 'contract IAggregatorV3',
597
+ type: 'address',
598
+ },
599
+ {
600
+ name: 'settlementFeed',
601
+ internalType: 'contract IAggregatorV3',
602
+ type: 'address',
603
+ },
604
+ {
605
+ name: 'collMaxStalenessSecs',
606
+ internalType: 'uint32',
607
+ type: 'uint32',
608
+ },
609
+ {
610
+ name: 'settMaxStalenessSecs',
611
+ internalType: 'uint32',
612
+ type: 'uint32',
613
+ },
614
+ { name: 'intrinsicResolution', internalType: 'bool', type: 'bool' },
615
+ {
616
+ name: 'exerciseMode',
617
+ internalType: 'enum ExerciseMode',
618
+ type: 'uint8',
619
+ },
620
+ ],
621
+ },
622
+ ],
623
+ name: 'isDeployed',
624
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
625
+ stateMutability: 'view',
626
+ },
627
+ {
628
+ type: 'function',
629
+ inputs: [
630
+ {
631
+ name: 'config',
632
+ internalType: 'struct ChainlinkSettlementConfig',
633
+ type: 'tuple',
634
+ components: [
635
+ { name: 'collateralAsset', internalType: 'address', type: 'address' },
636
+ { name: 'settlementAsset', internalType: 'address', type: 'address' },
637
+ {
638
+ name: 'collateralFeed',
639
+ internalType: 'contract IAggregatorV3',
640
+ type: 'address',
641
+ },
642
+ {
643
+ name: 'settlementFeed',
644
+ internalType: 'contract IAggregatorV3',
645
+ type: 'address',
646
+ },
647
+ {
648
+ name: 'collMaxStalenessSecs',
649
+ internalType: 'uint32',
650
+ type: 'uint32',
651
+ },
652
+ {
653
+ name: 'settMaxStalenessSecs',
654
+ internalType: 'uint32',
655
+ type: 'uint32',
656
+ },
657
+ { name: 'intrinsicResolution', internalType: 'bool', type: 'bool' },
658
+ {
659
+ name: 'exerciseMode',
660
+ internalType: 'enum ExerciseMode',
661
+ type: 'uint8',
662
+ },
663
+ ],
664
+ },
665
+ ],
666
+ name: 'predictAddress',
667
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
668
+ stateMutability: 'view',
669
+ },
670
+ {
671
+ type: 'function',
672
+ inputs: [
673
+ {
674
+ name: 'config',
675
+ internalType: 'struct ChainlinkSettlementConfig',
676
+ type: 'tuple',
677
+ components: [
678
+ { name: 'collateralAsset', internalType: 'address', type: 'address' },
679
+ { name: 'settlementAsset', internalType: 'address', type: 'address' },
680
+ {
681
+ name: 'collateralFeed',
682
+ internalType: 'contract IAggregatorV3',
683
+ type: 'address',
684
+ },
685
+ {
686
+ name: 'settlementFeed',
687
+ internalType: 'contract IAggregatorV3',
688
+ type: 'address',
689
+ },
690
+ {
691
+ name: 'collMaxStalenessSecs',
692
+ internalType: 'uint32',
693
+ type: 'uint32',
694
+ },
695
+ {
696
+ name: 'settMaxStalenessSecs',
697
+ internalType: 'uint32',
698
+ type: 'uint32',
699
+ },
700
+ { name: 'intrinsicResolution', internalType: 'bool', type: 'bool' },
701
+ {
702
+ name: 'exerciseMode',
703
+ internalType: 'enum ExerciseMode',
704
+ type: 'uint8',
705
+ },
706
+ ],
707
+ },
708
+ ],
709
+ name: 'saltFor',
710
+ outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
711
+ stateMutability: 'pure',
712
+ },
713
+ {
714
+ type: 'event',
715
+ anonymous: false,
716
+ inputs: [
717
+ {
718
+ name: 'layer',
719
+ internalType: 'address',
720
+ type: 'address',
721
+ indexed: true,
722
+ },
723
+ {
724
+ name: 'config',
725
+ internalType: 'struct ChainlinkSettlementConfig',
726
+ type: 'tuple',
727
+ components: [
728
+ { name: 'collateralAsset', internalType: 'address', type: 'address' },
729
+ { name: 'settlementAsset', internalType: 'address', type: 'address' },
730
+ {
731
+ name: 'collateralFeed',
732
+ internalType: 'contract IAggregatorV3',
733
+ type: 'address',
734
+ },
735
+ {
736
+ name: 'settlementFeed',
737
+ internalType: 'contract IAggregatorV3',
738
+ type: 'address',
739
+ },
740
+ {
741
+ name: 'collMaxStalenessSecs',
742
+ internalType: 'uint32',
743
+ type: 'uint32',
744
+ },
745
+ {
746
+ name: 'settMaxStalenessSecs',
747
+ internalType: 'uint32',
748
+ type: 'uint32',
749
+ },
750
+ { name: 'intrinsicResolution', internalType: 'bool', type: 'bool' },
751
+ {
752
+ name: 'exerciseMode',
753
+ internalType: 'enum ExerciseMode',
754
+ type: 'uint8',
755
+ },
756
+ ],
757
+ indexed: false,
758
+ },
759
+ ],
760
+ name: 'ChainlinkSettlementDeployed',
761
+ },
762
+ { type: 'error', inputs: [], name: 'Create2EmptyBytecode' },
763
+ { type: 'error', inputs: [], name: 'FailedDeployment' },
764
+ {
765
+ type: 'error',
766
+ inputs: [
767
+ { name: 'balance', internalType: 'uint256', type: 'uint256' },
768
+ { name: 'needed', internalType: 'uint256', type: 'uint256' },
769
+ ],
770
+ name: 'InsufficientBalance',
771
+ },
772
+ ];
773
+ /**
774
+ *
775
+ */
776
+ export const chainlinkSettlementFactoryAddress = {
777
+ 31337: '0xb17e2f283F48003e86fF5654cB8e87e1645d558d',
778
+ };
779
+ /**
780
+ *
781
+ */
782
+ export const chainlinkSettlementFactoryConfig = {
783
+ address: chainlinkSettlementFactoryAddress,
784
+ abi: chainlinkSettlementFactoryAbi,
785
+ };
786
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
787
+ // Core
788
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
789
+ /**
790
+ *
791
+ */
792
+ export const coreAbi = [
793
+ { type: 'constructor', inputs: [], stateMutability: 'nonpayable' },
794
+ {
795
+ type: 'function',
796
+ inputs: [],
797
+ name: 'UPGRADE_INTERFACE_VERSION',
798
+ outputs: [{ name: '', internalType: 'string', type: 'string' }],
799
+ stateMutability: 'view',
800
+ },
801
+ {
802
+ type: 'function',
803
+ inputs: [
804
+ { name: 'accountHolder', internalType: 'address', type: 'address' },
805
+ { name: 'asset', internalType: 'address', type: 'address' },
806
+ ],
807
+ name: 'balanceOf',
808
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
809
+ stateMutability: 'view',
810
+ },
811
+ {
812
+ type: 'function',
813
+ inputs: [
814
+ {
815
+ name: 'submitted',
816
+ internalType: 'struct MarketOption',
817
+ type: 'tuple',
818
+ components: [
819
+ {
820
+ name: 'details',
821
+ internalType: 'struct OptionDetails',
822
+ type: 'tuple',
823
+ components: [
824
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
825
+ {
826
+ name: 'startTimestamp',
827
+ internalType: 'uint64',
828
+ type: 'uint64',
829
+ },
830
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
831
+ {
832
+ name: 'premiumAsset',
833
+ internalType: 'address',
834
+ type: 'address',
835
+ },
836
+ {
837
+ name: 'premiumAmount',
838
+ internalType: 'uint256',
839
+ type: 'uint256',
840
+ },
841
+ {
842
+ name: 'collateralAsset',
843
+ internalType: 'address',
844
+ type: 'address',
845
+ },
846
+ {
847
+ name: 'collateralAmount',
848
+ internalType: 'uint256',
849
+ type: 'uint256',
850
+ },
851
+ {
852
+ name: 'settlementAsset',
853
+ internalType: 'address',
854
+ type: 'address',
855
+ },
856
+ {
857
+ name: 'settlementAmount',
858
+ internalType: 'uint256',
859
+ type: 'uint256',
860
+ },
861
+ {
862
+ name: 'settlementLayer',
863
+ internalType: 'address',
864
+ type: 'address',
865
+ },
866
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
867
+ ],
868
+ },
869
+ { name: 'taker', internalType: 'address', type: 'address' },
870
+ { name: 'maker', internalType: 'address', type: 'address' },
871
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
872
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
873
+ ],
874
+ },
875
+ { name: 'amount', internalType: 'uint248', type: 'uint248' },
876
+ { name: 'collateralReceiver', internalType: 'address', type: 'address' },
877
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
878
+ ],
879
+ name: 'borrowCollateral',
880
+ outputs: [],
881
+ stateMutability: 'nonpayable',
882
+ },
883
+ {
884
+ type: 'function',
885
+ inputs: [{ name: 'optionId', internalType: 'bytes32', type: 'bytes32' }],
886
+ name: 'borrowedCollateralOf',
887
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
888
+ stateMutability: 'view',
889
+ },
890
+ {
891
+ type: 'function',
892
+ inputs: [
893
+ {
894
+ name: 'submitted',
895
+ internalType: 'struct MarketOption',
896
+ type: 'tuple',
897
+ components: [
898
+ {
899
+ name: 'details',
900
+ internalType: 'struct OptionDetails',
901
+ type: 'tuple',
902
+ components: [
903
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
904
+ {
905
+ name: 'startTimestamp',
906
+ internalType: 'uint64',
907
+ type: 'uint64',
908
+ },
909
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
910
+ {
911
+ name: 'premiumAsset',
912
+ internalType: 'address',
913
+ type: 'address',
914
+ },
915
+ {
916
+ name: 'premiumAmount',
917
+ internalType: 'uint256',
918
+ type: 'uint256',
919
+ },
920
+ {
921
+ name: 'collateralAsset',
922
+ internalType: 'address',
923
+ type: 'address',
924
+ },
925
+ {
926
+ name: 'collateralAmount',
927
+ internalType: 'uint256',
928
+ type: 'uint256',
929
+ },
930
+ {
931
+ name: 'settlementAsset',
932
+ internalType: 'address',
933
+ type: 'address',
934
+ },
935
+ {
936
+ name: 'settlementAmount',
937
+ internalType: 'uint256',
938
+ type: 'uint256',
939
+ },
940
+ {
941
+ name: 'settlementLayer',
942
+ internalType: 'address',
943
+ type: 'address',
944
+ },
945
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
946
+ ],
947
+ },
948
+ { name: 'taker', internalType: 'address', type: 'address' },
949
+ { name: 'maker', internalType: 'address', type: 'address' },
950
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
951
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
952
+ ],
953
+ },
954
+ { name: 'holder', internalType: 'address', type: 'address' },
955
+ ],
956
+ name: 'burnExpiredClaims',
957
+ outputs: [],
958
+ stateMutability: 'nonpayable',
959
+ },
960
+ {
961
+ type: 'function',
962
+ inputs: [
963
+ {
964
+ name: 'offer',
965
+ internalType: 'struct Offer',
966
+ type: 'tuple',
967
+ components: [
968
+ { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
969
+ { name: 'creator', internalType: 'address', type: 'address' },
970
+ {
971
+ name: 'optionDetails',
972
+ internalType: 'struct OptionDetails',
973
+ type: 'tuple',
974
+ components: [
975
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
976
+ {
977
+ name: 'startTimestamp',
978
+ internalType: 'uint64',
979
+ type: 'uint64',
980
+ },
981
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
982
+ {
983
+ name: 'premiumAsset',
984
+ internalType: 'address',
985
+ type: 'address',
986
+ },
987
+ {
988
+ name: 'premiumAmount',
989
+ internalType: 'uint256',
990
+ type: 'uint256',
991
+ },
992
+ {
993
+ name: 'collateralAsset',
994
+ internalType: 'address',
995
+ type: 'address',
996
+ },
997
+ {
998
+ name: 'collateralAmount',
999
+ internalType: 'uint256',
1000
+ type: 'uint256',
1001
+ },
1002
+ {
1003
+ name: 'settlementAsset',
1004
+ internalType: 'address',
1005
+ type: 'address',
1006
+ },
1007
+ {
1008
+ name: 'settlementAmount',
1009
+ internalType: 'uint256',
1010
+ type: 'uint256',
1011
+ },
1012
+ {
1013
+ name: 'settlementLayer',
1014
+ internalType: 'address',
1015
+ type: 'address',
1016
+ },
1017
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
1018
+ ],
1019
+ },
1020
+ { name: 'expiry', internalType: 'uint64', type: 'uint64' },
1021
+ { name: 'side', internalType: 'enum OptionSide', type: 'uint8' },
1022
+ { name: 'counterparty', internalType: 'address', type: 'address' },
1023
+ ],
1024
+ },
1025
+ ],
1026
+ name: 'cancelOffer',
1027
+ outputs: [],
1028
+ stateMutability: 'nonpayable',
1029
+ },
1030
+ {
1031
+ type: 'function',
1032
+ inputs: [
1033
+ {
1034
+ name: 'offer',
1035
+ internalType: 'struct Offer',
1036
+ type: 'tuple',
1037
+ components: [
1038
+ { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
1039
+ { name: 'creator', internalType: 'address', type: 'address' },
1040
+ {
1041
+ name: 'optionDetails',
1042
+ internalType: 'struct OptionDetails',
1043
+ type: 'tuple',
1044
+ components: [
1045
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
1046
+ {
1047
+ name: 'startTimestamp',
1048
+ internalType: 'uint64',
1049
+ type: 'uint64',
1050
+ },
1051
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
1052
+ {
1053
+ name: 'premiumAsset',
1054
+ internalType: 'address',
1055
+ type: 'address',
1056
+ },
1057
+ {
1058
+ name: 'premiumAmount',
1059
+ internalType: 'uint256',
1060
+ type: 'uint256',
1061
+ },
1062
+ {
1063
+ name: 'collateralAsset',
1064
+ internalType: 'address',
1065
+ type: 'address',
1066
+ },
1067
+ {
1068
+ name: 'collateralAmount',
1069
+ internalType: 'uint256',
1070
+ type: 'uint256',
1071
+ },
1072
+ {
1073
+ name: 'settlementAsset',
1074
+ internalType: 'address',
1075
+ type: 'address',
1076
+ },
1077
+ {
1078
+ name: 'settlementAmount',
1079
+ internalType: 'uint256',
1080
+ type: 'uint256',
1081
+ },
1082
+ {
1083
+ name: 'settlementLayer',
1084
+ internalType: 'address',
1085
+ type: 'address',
1086
+ },
1087
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
1088
+ ],
1089
+ },
1090
+ { name: 'expiry', internalType: 'uint64', type: 'uint64' },
1091
+ { name: 'side', internalType: 'enum OptionSide', type: 'uint8' },
1092
+ { name: 'counterparty', internalType: 'address', type: 'address' },
1093
+ ],
1094
+ },
1095
+ {
1096
+ name: 'op',
1097
+ internalType: 'struct SignedOperation',
1098
+ type: 'tuple',
1099
+ components: [
1100
+ { name: 'expiry', internalType: 'uint64', type: 'uint64' },
1101
+ { name: 'nonce', internalType: 'uint256', type: 'uint256' },
1102
+ { name: 'curveId', internalType: 'uint8', type: 'uint8' },
1103
+ { name: 'signature', internalType: 'bytes', type: 'bytes' },
1104
+ ],
1105
+ },
1106
+ ],
1107
+ name: 'cancelOfferSigned',
1108
+ outputs: [],
1109
+ stateMutability: 'nonpayable',
1110
+ },
1111
+ {
1112
+ type: 'function',
1113
+ inputs: [],
1114
+ name: 'claimTokenFactory',
1115
+ outputs: [
1116
+ { name: '', internalType: 'contract ClaimTokenFactory', type: 'address' },
1117
+ ],
1118
+ stateMutability: 'view',
1119
+ },
1120
+ {
1121
+ type: 'function',
1122
+ inputs: [],
1123
+ name: 'claimTokenImplementation',
1124
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
1125
+ stateMutability: 'view',
1126
+ },
1127
+ {
1128
+ type: 'function',
1129
+ inputs: [],
1130
+ name: 'config',
1131
+ outputs: [
1132
+ {
1133
+ name: '',
1134
+ internalType: 'struct ProtocolConfig',
1135
+ type: 'tuple',
1136
+ components: [
1137
+ { name: 'authority', internalType: 'address', type: 'address' },
1138
+ { name: 'pauseAuthority', internalType: 'address', type: 'address' },
1139
+ {
1140
+ name: 'optionCreationHook',
1141
+ internalType: 'address',
1142
+ type: 'address',
1143
+ },
1144
+ { name: 'pausedActions', internalType: 'uint32', type: 'uint32' },
1145
+ {
1146
+ name: 'pauseAuthorityMask',
1147
+ internalType: 'uint32',
1148
+ type: 'uint32',
1149
+ },
1150
+ ],
1151
+ },
1152
+ ],
1153
+ stateMutability: 'view',
1154
+ },
1155
+ {
1156
+ type: 'function',
1157
+ inputs: [
1158
+ {
1159
+ name: 'offer',
1160
+ internalType: 'struct Offer',
1161
+ type: 'tuple',
1162
+ components: [
1163
+ { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
1164
+ { name: 'creator', internalType: 'address', type: 'address' },
1165
+ {
1166
+ name: 'optionDetails',
1167
+ internalType: 'struct OptionDetails',
1168
+ type: 'tuple',
1169
+ components: [
1170
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
1171
+ {
1172
+ name: 'startTimestamp',
1173
+ internalType: 'uint64',
1174
+ type: 'uint64',
1175
+ },
1176
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
1177
+ {
1178
+ name: 'premiumAsset',
1179
+ internalType: 'address',
1180
+ type: 'address',
1181
+ },
1182
+ {
1183
+ name: 'premiumAmount',
1184
+ internalType: 'uint256',
1185
+ type: 'uint256',
1186
+ },
1187
+ {
1188
+ name: 'collateralAsset',
1189
+ internalType: 'address',
1190
+ type: 'address',
1191
+ },
1192
+ {
1193
+ name: 'collateralAmount',
1194
+ internalType: 'uint256',
1195
+ type: 'uint256',
1196
+ },
1197
+ {
1198
+ name: 'settlementAsset',
1199
+ internalType: 'address',
1200
+ type: 'address',
1201
+ },
1202
+ {
1203
+ name: 'settlementAmount',
1204
+ internalType: 'uint256',
1205
+ type: 'uint256',
1206
+ },
1207
+ {
1208
+ name: 'settlementLayer',
1209
+ internalType: 'address',
1210
+ type: 'address',
1211
+ },
1212
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
1213
+ ],
1214
+ },
1215
+ { name: 'expiry', internalType: 'uint64', type: 'uint64' },
1216
+ { name: 'side', internalType: 'enum OptionSide', type: 'uint8' },
1217
+ { name: 'counterparty', internalType: 'address', type: 'address' },
1218
+ ],
1219
+ },
1220
+ ],
1221
+ name: 'createOffer',
1222
+ outputs: [{ name: 'offerId', internalType: 'bytes32', type: 'bytes32' }],
1223
+ stateMutability: 'nonpayable',
1224
+ },
1225
+ {
1226
+ type: 'function',
1227
+ inputs: [
1228
+ {
1229
+ name: 'offer',
1230
+ internalType: 'struct Offer',
1231
+ type: 'tuple',
1232
+ components: [
1233
+ { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
1234
+ { name: 'creator', internalType: 'address', type: 'address' },
1235
+ {
1236
+ name: 'optionDetails',
1237
+ internalType: 'struct OptionDetails',
1238
+ type: 'tuple',
1239
+ components: [
1240
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
1241
+ {
1242
+ name: 'startTimestamp',
1243
+ internalType: 'uint64',
1244
+ type: 'uint64',
1245
+ },
1246
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
1247
+ {
1248
+ name: 'premiumAsset',
1249
+ internalType: 'address',
1250
+ type: 'address',
1251
+ },
1252
+ {
1253
+ name: 'premiumAmount',
1254
+ internalType: 'uint256',
1255
+ type: 'uint256',
1256
+ },
1257
+ {
1258
+ name: 'collateralAsset',
1259
+ internalType: 'address',
1260
+ type: 'address',
1261
+ },
1262
+ {
1263
+ name: 'collateralAmount',
1264
+ internalType: 'uint256',
1265
+ type: 'uint256',
1266
+ },
1267
+ {
1268
+ name: 'settlementAsset',
1269
+ internalType: 'address',
1270
+ type: 'address',
1271
+ },
1272
+ {
1273
+ name: 'settlementAmount',
1274
+ internalType: 'uint256',
1275
+ type: 'uint256',
1276
+ },
1277
+ {
1278
+ name: 'settlementLayer',
1279
+ internalType: 'address',
1280
+ type: 'address',
1281
+ },
1282
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
1283
+ ],
1284
+ },
1285
+ { name: 'expiry', internalType: 'uint64', type: 'uint64' },
1286
+ { name: 'side', internalType: 'enum OptionSide', type: 'uint8' },
1287
+ { name: 'counterparty', internalType: 'address', type: 'address' },
1288
+ ],
1289
+ },
1290
+ {
1291
+ name: 'op',
1292
+ internalType: 'struct SignedOperation',
1293
+ type: 'tuple',
1294
+ components: [
1295
+ { name: 'expiry', internalType: 'uint64', type: 'uint64' },
1296
+ { name: 'nonce', internalType: 'uint256', type: 'uint256' },
1297
+ { name: 'curveId', internalType: 'uint8', type: 'uint8' },
1298
+ { name: 'signature', internalType: 'bytes', type: 'bytes' },
1299
+ ],
1300
+ },
1301
+ ],
1302
+ name: 'createOfferSigned',
1303
+ outputs: [{ name: 'offerId', internalType: 'bytes32', type: 'bytes32' }],
1304
+ stateMutability: 'nonpayable',
1305
+ },
1306
+ {
1307
+ type: 'function',
1308
+ inputs: [
1309
+ { name: 'party', internalType: 'address', type: 'address' },
1310
+ { name: 'delegate', internalType: 'address', type: 'address' },
1311
+ ],
1312
+ name: 'delegatePermissions',
1313
+ outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }],
1314
+ stateMutability: 'view',
1315
+ },
1316
+ {
1317
+ type: 'function',
1318
+ inputs: [
1319
+ { name: 'accountHolder', internalType: 'address', type: 'address' },
1320
+ { name: 'asset', internalType: 'address', type: 'address' },
1321
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
1322
+ ],
1323
+ name: 'deposit',
1324
+ outputs: [],
1325
+ stateMutability: 'nonpayable',
1326
+ },
1327
+ {
1328
+ type: 'function',
1329
+ inputs: [],
1330
+ name: 'domain',
1331
+ outputs: [{ name: '', internalType: 'uint32', type: 'uint32' }],
1332
+ stateMutability: 'view',
1333
+ },
1334
+ {
1335
+ type: 'function',
1336
+ inputs: [
1337
+ { name: 'optionId', internalType: 'bytes32', type: 'bytes32' },
1338
+ { name: 'holder', internalType: 'address', type: 'address' },
1339
+ ],
1340
+ name: 'exerciseClaimOf',
1341
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1342
+ stateMutability: 'view',
1343
+ },
1344
+ {
1345
+ type: 'function',
1346
+ inputs: [{ name: 'optionId', internalType: 'bytes32', type: 'bytes32' }],
1347
+ name: 'exerciseClaimSupplyOf',
1348
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1349
+ stateMutability: 'view',
1350
+ },
1351
+ {
1352
+ type: 'function',
1353
+ inputs: [{ name: 'optionId', internalType: 'bytes32', type: 'bytes32' }],
1354
+ name: 'exerciseClaimTokenOf',
1355
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
1356
+ stateMutability: 'view',
1357
+ },
1358
+ {
1359
+ type: 'function',
1360
+ inputs: [
1361
+ {
1362
+ name: 'option',
1363
+ internalType: 'struct MarketOption',
1364
+ type: 'tuple',
1365
+ components: [
1366
+ {
1367
+ name: 'details',
1368
+ internalType: 'struct OptionDetails',
1369
+ type: 'tuple',
1370
+ components: [
1371
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
1372
+ {
1373
+ name: 'startTimestamp',
1374
+ internalType: 'uint64',
1375
+ type: 'uint64',
1376
+ },
1377
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
1378
+ {
1379
+ name: 'premiumAsset',
1380
+ internalType: 'address',
1381
+ type: 'address',
1382
+ },
1383
+ {
1384
+ name: 'premiumAmount',
1385
+ internalType: 'uint256',
1386
+ type: 'uint256',
1387
+ },
1388
+ {
1389
+ name: 'collateralAsset',
1390
+ internalType: 'address',
1391
+ type: 'address',
1392
+ },
1393
+ {
1394
+ name: 'collateralAmount',
1395
+ internalType: 'uint256',
1396
+ type: 'uint256',
1397
+ },
1398
+ {
1399
+ name: 'settlementAsset',
1400
+ internalType: 'address',
1401
+ type: 'address',
1402
+ },
1403
+ {
1404
+ name: 'settlementAmount',
1405
+ internalType: 'uint256',
1406
+ type: 'uint256',
1407
+ },
1408
+ {
1409
+ name: 'settlementLayer',
1410
+ internalType: 'address',
1411
+ type: 'address',
1412
+ },
1413
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
1414
+ ],
1415
+ },
1416
+ { name: 'taker', internalType: 'address', type: 'address' },
1417
+ { name: 'maker', internalType: 'address', type: 'address' },
1418
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
1419
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
1420
+ ],
1421
+ },
1422
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
1423
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
1424
+ ],
1425
+ name: 'exerciseOption',
1426
+ outputs: [],
1427
+ stateMutability: 'nonpayable',
1428
+ },
1429
+ {
1430
+ type: 'function',
1431
+ inputs: [
1432
+ { name: 'actingParty', internalType: 'address', type: 'address' },
1433
+ {
1434
+ name: 'option',
1435
+ internalType: 'struct MarketOption',
1436
+ type: 'tuple',
1437
+ components: [
1438
+ {
1439
+ name: 'details',
1440
+ internalType: 'struct OptionDetails',
1441
+ type: 'tuple',
1442
+ components: [
1443
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
1444
+ {
1445
+ name: 'startTimestamp',
1446
+ internalType: 'uint64',
1447
+ type: 'uint64',
1448
+ },
1449
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
1450
+ {
1451
+ name: 'premiumAsset',
1452
+ internalType: 'address',
1453
+ type: 'address',
1454
+ },
1455
+ {
1456
+ name: 'premiumAmount',
1457
+ internalType: 'uint256',
1458
+ type: 'uint256',
1459
+ },
1460
+ {
1461
+ name: 'collateralAsset',
1462
+ internalType: 'address',
1463
+ type: 'address',
1464
+ },
1465
+ {
1466
+ name: 'collateralAmount',
1467
+ internalType: 'uint256',
1468
+ type: 'uint256',
1469
+ },
1470
+ {
1471
+ name: 'settlementAsset',
1472
+ internalType: 'address',
1473
+ type: 'address',
1474
+ },
1475
+ {
1476
+ name: 'settlementAmount',
1477
+ internalType: 'uint256',
1478
+ type: 'uint256',
1479
+ },
1480
+ {
1481
+ name: 'settlementLayer',
1482
+ internalType: 'address',
1483
+ type: 'address',
1484
+ },
1485
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
1486
+ ],
1487
+ },
1488
+ { name: 'taker', internalType: 'address', type: 'address' },
1489
+ { name: 'maker', internalType: 'address', type: 'address' },
1490
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
1491
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
1492
+ ],
1493
+ },
1494
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
1495
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
1496
+ {
1497
+ name: 'op',
1498
+ internalType: 'struct SignedOperation',
1499
+ type: 'tuple',
1500
+ components: [
1501
+ { name: 'expiry', internalType: 'uint64', type: 'uint64' },
1502
+ { name: 'nonce', internalType: 'uint256', type: 'uint256' },
1503
+ { name: 'curveId', internalType: 'uint8', type: 'uint8' },
1504
+ { name: 'signature', internalType: 'bytes', type: 'bytes' },
1505
+ ],
1506
+ },
1507
+ ],
1508
+ name: 'exerciseOptionSigned',
1509
+ outputs: [],
1510
+ stateMutability: 'nonpayable',
1511
+ },
1512
+ {
1513
+ type: 'function',
1514
+ inputs: [{ name: 'optionId', internalType: 'bytes32', type: 'bytes32' }],
1515
+ name: 'getOptionRecord',
1516
+ outputs: [
1517
+ {
1518
+ name: '',
1519
+ internalType: 'struct OptionRecord',
1520
+ type: 'tuple',
1521
+ components: [
1522
+ { name: 'exists', internalType: 'bool', type: 'bool' },
1523
+ {
1524
+ name: 'borrowedCollateral',
1525
+ internalType: 'uint248',
1526
+ type: 'uint248',
1527
+ },
1528
+ ],
1529
+ },
1530
+ ],
1531
+ stateMutability: 'view',
1532
+ },
1533
+ {
1534
+ type: 'function',
1535
+ inputs: [
1536
+ { name: 'initialAuthority', internalType: 'address', type: 'address' },
1537
+ {
1538
+ name: 'claimTokenFactory',
1539
+ internalType: 'contract ClaimTokenFactory',
1540
+ type: 'address',
1541
+ },
1542
+ ],
1543
+ name: 'initialize',
1544
+ outputs: [],
1545
+ stateMutability: 'nonpayable',
1546
+ },
1547
+ {
1548
+ type: 'function',
1549
+ inputs: [
1550
+ { name: 'signer', internalType: 'address', type: 'address' },
1551
+ { name: 'nonce', internalType: 'uint256', type: 'uint256' },
1552
+ ],
1553
+ name: 'isNonceUsed',
1554
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
1555
+ stateMutability: 'view',
1556
+ },
1557
+ {
1558
+ type: 'function',
1559
+ inputs: [
1560
+ {
1561
+ name: 'collateralOffer',
1562
+ internalType: 'struct Offer',
1563
+ type: 'tuple',
1564
+ components: [
1565
+ { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
1566
+ { name: 'creator', internalType: 'address', type: 'address' },
1567
+ {
1568
+ name: 'optionDetails',
1569
+ internalType: 'struct OptionDetails',
1570
+ type: 'tuple',
1571
+ components: [
1572
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
1573
+ {
1574
+ name: 'startTimestamp',
1575
+ internalType: 'uint64',
1576
+ type: 'uint64',
1577
+ },
1578
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
1579
+ {
1580
+ name: 'premiumAsset',
1581
+ internalType: 'address',
1582
+ type: 'address',
1583
+ },
1584
+ {
1585
+ name: 'premiumAmount',
1586
+ internalType: 'uint256',
1587
+ type: 'uint256',
1588
+ },
1589
+ {
1590
+ name: 'collateralAsset',
1591
+ internalType: 'address',
1592
+ type: 'address',
1593
+ },
1594
+ {
1595
+ name: 'collateralAmount',
1596
+ internalType: 'uint256',
1597
+ type: 'uint256',
1598
+ },
1599
+ {
1600
+ name: 'settlementAsset',
1601
+ internalType: 'address',
1602
+ type: 'address',
1603
+ },
1604
+ {
1605
+ name: 'settlementAmount',
1606
+ internalType: 'uint256',
1607
+ type: 'uint256',
1608
+ },
1609
+ {
1610
+ name: 'settlementLayer',
1611
+ internalType: 'address',
1612
+ type: 'address',
1613
+ },
1614
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
1615
+ ],
1616
+ },
1617
+ { name: 'expiry', internalType: 'uint64', type: 'uint64' },
1618
+ { name: 'side', internalType: 'enum OptionSide', type: 'uint8' },
1619
+ { name: 'counterparty', internalType: 'address', type: 'address' },
1620
+ ],
1621
+ },
1622
+ {
1623
+ name: 'settlementOffer',
1624
+ internalType: 'struct Offer',
1625
+ type: 'tuple',
1626
+ components: [
1627
+ { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
1628
+ { name: 'creator', internalType: 'address', type: 'address' },
1629
+ {
1630
+ name: 'optionDetails',
1631
+ internalType: 'struct OptionDetails',
1632
+ type: 'tuple',
1633
+ components: [
1634
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
1635
+ {
1636
+ name: 'startTimestamp',
1637
+ internalType: 'uint64',
1638
+ type: 'uint64',
1639
+ },
1640
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
1641
+ {
1642
+ name: 'premiumAsset',
1643
+ internalType: 'address',
1644
+ type: 'address',
1645
+ },
1646
+ {
1647
+ name: 'premiumAmount',
1648
+ internalType: 'uint256',
1649
+ type: 'uint256',
1650
+ },
1651
+ {
1652
+ name: 'collateralAsset',
1653
+ internalType: 'address',
1654
+ type: 'address',
1655
+ },
1656
+ {
1657
+ name: 'collateralAmount',
1658
+ internalType: 'uint256',
1659
+ type: 'uint256',
1660
+ },
1661
+ {
1662
+ name: 'settlementAsset',
1663
+ internalType: 'address',
1664
+ type: 'address',
1665
+ },
1666
+ {
1667
+ name: 'settlementAmount',
1668
+ internalType: 'uint256',
1669
+ type: 'uint256',
1670
+ },
1671
+ {
1672
+ name: 'settlementLayer',
1673
+ internalType: 'address',
1674
+ type: 'address',
1675
+ },
1676
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
1677
+ ],
1678
+ },
1679
+ { name: 'expiry', internalType: 'uint64', type: 'uint64' },
1680
+ { name: 'side', internalType: 'enum OptionSide', type: 'uint8' },
1681
+ { name: 'counterparty', internalType: 'address', type: 'address' },
1682
+ ],
1683
+ },
1684
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
1685
+ ],
1686
+ name: 'matchOffer',
1687
+ outputs: [{ name: 'optionId', internalType: 'bytes32', type: 'bytes32' }],
1688
+ stateMutability: 'nonpayable',
1689
+ },
1690
+ {
1691
+ type: 'function',
1692
+ inputs: [
1693
+ { name: 'offerId', internalType: 'bytes32', type: 'bytes32' },
1694
+ { name: 'asset', internalType: 'address', type: 'address' },
1695
+ ],
1696
+ name: 'offerBalanceOf',
1697
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1698
+ stateMutability: 'view',
1699
+ },
1700
+ {
1701
+ type: 'function',
1702
+ inputs: [{ name: 'offerId', internalType: 'bytes32', type: 'bytes32' }],
1703
+ name: 'offerExists',
1704
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
1705
+ stateMutability: 'view',
1706
+ },
1707
+ {
1708
+ type: 'function',
1709
+ inputs: [
1710
+ { name: 'optionId', internalType: 'bytes32', type: 'bytes32' },
1711
+ { name: 'leg', internalType: 'enum OptionLeg', type: 'uint8' },
1712
+ { name: 'asset', internalType: 'address', type: 'address' },
1713
+ ],
1714
+ name: 'optionBalanceOf',
1715
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1716
+ stateMutability: 'view',
1717
+ },
1718
+ {
1719
+ type: 'function',
1720
+ inputs: [{ name: 'optionId', internalType: 'bytes32', type: 'bytes32' }],
1721
+ name: 'optionExists',
1722
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
1723
+ stateMutability: 'view',
1724
+ },
1725
+ {
1726
+ type: 'function',
1727
+ inputs: [{ name: 'mask', internalType: 'uint32', type: 'uint32' }],
1728
+ name: 'pause',
1729
+ outputs: [],
1730
+ stateMutability: 'nonpayable',
1731
+ },
1732
+ {
1733
+ type: 'function',
1734
+ inputs: [],
1735
+ name: 'proxiableUUID',
1736
+ outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
1737
+ stateMutability: 'view',
1738
+ },
1739
+ {
1740
+ type: 'function',
1741
+ inputs: [
1742
+ { name: 'optionId', internalType: 'bytes32', type: 'bytes32' },
1743
+ { name: 'holder', internalType: 'address', type: 'address' },
1744
+ ],
1745
+ name: 'redeemClaimOf',
1746
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1747
+ stateMutability: 'view',
1748
+ },
1749
+ {
1750
+ type: 'function',
1751
+ inputs: [{ name: 'optionId', internalType: 'bytes32', type: 'bytes32' }],
1752
+ name: 'redeemClaimSupplyOf',
1753
+ outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1754
+ stateMutability: 'view',
1755
+ },
1756
+ {
1757
+ type: 'function',
1758
+ inputs: [{ name: 'optionId', internalType: 'bytes32', type: 'bytes32' }],
1759
+ name: 'redeemClaimTokenOf',
1760
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
1761
+ stateMutability: 'view',
1762
+ },
1763
+ {
1764
+ type: 'function',
1765
+ inputs: [
1766
+ {
1767
+ name: 'option',
1768
+ internalType: 'struct MarketOption',
1769
+ type: 'tuple',
1770
+ components: [
1771
+ {
1772
+ name: 'details',
1773
+ internalType: 'struct OptionDetails',
1774
+ type: 'tuple',
1775
+ components: [
1776
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
1777
+ {
1778
+ name: 'startTimestamp',
1779
+ internalType: 'uint64',
1780
+ type: 'uint64',
1781
+ },
1782
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
1783
+ {
1784
+ name: 'premiumAsset',
1785
+ internalType: 'address',
1786
+ type: 'address',
1787
+ },
1788
+ {
1789
+ name: 'premiumAmount',
1790
+ internalType: 'uint256',
1791
+ type: 'uint256',
1792
+ },
1793
+ {
1794
+ name: 'collateralAsset',
1795
+ internalType: 'address',
1796
+ type: 'address',
1797
+ },
1798
+ {
1799
+ name: 'collateralAmount',
1800
+ internalType: 'uint256',
1801
+ type: 'uint256',
1802
+ },
1803
+ {
1804
+ name: 'settlementAsset',
1805
+ internalType: 'address',
1806
+ type: 'address',
1807
+ },
1808
+ {
1809
+ name: 'settlementAmount',
1810
+ internalType: 'uint256',
1811
+ type: 'uint256',
1812
+ },
1813
+ {
1814
+ name: 'settlementLayer',
1815
+ internalType: 'address',
1816
+ type: 'address',
1817
+ },
1818
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
1819
+ ],
1820
+ },
1821
+ { name: 'taker', internalType: 'address', type: 'address' },
1822
+ { name: 'maker', internalType: 'address', type: 'address' },
1823
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
1824
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
1825
+ ],
1826
+ },
1827
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
1828
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
1829
+ ],
1830
+ name: 'redeemOption',
1831
+ outputs: [],
1832
+ stateMutability: 'nonpayable',
1833
+ },
1834
+ {
1835
+ type: 'function',
1836
+ inputs: [
1837
+ { name: 'actingParty', internalType: 'address', type: 'address' },
1838
+ {
1839
+ name: 'option',
1840
+ internalType: 'struct MarketOption',
1841
+ type: 'tuple',
1842
+ components: [
1843
+ {
1844
+ name: 'details',
1845
+ internalType: 'struct OptionDetails',
1846
+ type: 'tuple',
1847
+ components: [
1848
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
1849
+ {
1850
+ name: 'startTimestamp',
1851
+ internalType: 'uint64',
1852
+ type: 'uint64',
1853
+ },
1854
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
1855
+ {
1856
+ name: 'premiumAsset',
1857
+ internalType: 'address',
1858
+ type: 'address',
1859
+ },
1860
+ {
1861
+ name: 'premiumAmount',
1862
+ internalType: 'uint256',
1863
+ type: 'uint256',
1864
+ },
1865
+ {
1866
+ name: 'collateralAsset',
1867
+ internalType: 'address',
1868
+ type: 'address',
1869
+ },
1870
+ {
1871
+ name: 'collateralAmount',
1872
+ internalType: 'uint256',
1873
+ type: 'uint256',
1874
+ },
1875
+ {
1876
+ name: 'settlementAsset',
1877
+ internalType: 'address',
1878
+ type: 'address',
1879
+ },
1880
+ {
1881
+ name: 'settlementAmount',
1882
+ internalType: 'uint256',
1883
+ type: 'uint256',
1884
+ },
1885
+ {
1886
+ name: 'settlementLayer',
1887
+ internalType: 'address',
1888
+ type: 'address',
1889
+ },
1890
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
1891
+ ],
1892
+ },
1893
+ { name: 'taker', internalType: 'address', type: 'address' },
1894
+ { name: 'maker', internalType: 'address', type: 'address' },
1895
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
1896
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
1897
+ ],
1898
+ },
1899
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
1900
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
1901
+ {
1902
+ name: 'op',
1903
+ internalType: 'struct SignedOperation',
1904
+ type: 'tuple',
1905
+ components: [
1906
+ { name: 'expiry', internalType: 'uint64', type: 'uint64' },
1907
+ { name: 'nonce', internalType: 'uint256', type: 'uint256' },
1908
+ { name: 'curveId', internalType: 'uint8', type: 'uint8' },
1909
+ { name: 'signature', internalType: 'bytes', type: 'bytes' },
1910
+ ],
1911
+ },
1912
+ ],
1913
+ name: 'redeemOptionSigned',
1914
+ outputs: [],
1915
+ stateMutability: 'nonpayable',
1916
+ },
1917
+ {
1918
+ type: 'function',
1919
+ inputs: [
1920
+ {
1921
+ name: 'submitted',
1922
+ internalType: 'struct MarketOption',
1923
+ type: 'tuple',
1924
+ components: [
1925
+ {
1926
+ name: 'details',
1927
+ internalType: 'struct OptionDetails',
1928
+ type: 'tuple',
1929
+ components: [
1930
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
1931
+ {
1932
+ name: 'startTimestamp',
1933
+ internalType: 'uint64',
1934
+ type: 'uint64',
1935
+ },
1936
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
1937
+ {
1938
+ name: 'premiumAsset',
1939
+ internalType: 'address',
1940
+ type: 'address',
1941
+ },
1942
+ {
1943
+ name: 'premiumAmount',
1944
+ internalType: 'uint256',
1945
+ type: 'uint256',
1946
+ },
1947
+ {
1948
+ name: 'collateralAsset',
1949
+ internalType: 'address',
1950
+ type: 'address',
1951
+ },
1952
+ {
1953
+ name: 'collateralAmount',
1954
+ internalType: 'uint256',
1955
+ type: 'uint256',
1956
+ },
1957
+ {
1958
+ name: 'settlementAsset',
1959
+ internalType: 'address',
1960
+ type: 'address',
1961
+ },
1962
+ {
1963
+ name: 'settlementAmount',
1964
+ internalType: 'uint256',
1965
+ type: 'uint256',
1966
+ },
1967
+ {
1968
+ name: 'settlementLayer',
1969
+ internalType: 'address',
1970
+ type: 'address',
1971
+ },
1972
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
1973
+ ],
1974
+ },
1975
+ { name: 'taker', internalType: 'address', type: 'address' },
1976
+ { name: 'maker', internalType: 'address', type: 'address' },
1977
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
1978
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
1979
+ ],
1980
+ },
1981
+ { name: 'amount', internalType: 'uint248', type: 'uint248' },
1982
+ ],
1983
+ name: 'repayCollateral',
1984
+ outputs: [],
1985
+ stateMutability: 'nonpayable',
1986
+ },
1987
+ {
1988
+ type: 'function',
1989
+ inputs: [
1990
+ { name: 'delegate', internalType: 'address', type: 'address' },
1991
+ { name: 'permissions', internalType: 'uint16', type: 'uint16' },
1992
+ ],
1993
+ name: 'setDelegate',
1994
+ outputs: [],
1995
+ stateMutability: 'nonpayable',
1996
+ },
1997
+ {
1998
+ type: 'function',
1999
+ inputs: [{ name: 'newDomain', internalType: 'uint32', type: 'uint32' }],
2000
+ name: 'setDomain',
2001
+ outputs: [],
2002
+ stateMutability: 'nonpayable',
2003
+ },
2004
+ {
2005
+ type: 'function',
2006
+ inputs: [
2007
+ {
2008
+ name: 'newConfig',
2009
+ internalType: 'struct ProtocolConfig',
2010
+ type: 'tuple',
2011
+ components: [
2012
+ { name: 'authority', internalType: 'address', type: 'address' },
2013
+ { name: 'pauseAuthority', internalType: 'address', type: 'address' },
2014
+ {
2015
+ name: 'optionCreationHook',
2016
+ internalType: 'address',
2017
+ type: 'address',
2018
+ },
2019
+ { name: 'pausedActions', internalType: 'uint32', type: 'uint32' },
2020
+ {
2021
+ name: 'pauseAuthorityMask',
2022
+ internalType: 'uint32',
2023
+ type: 'uint32',
2024
+ },
2025
+ ],
2026
+ },
2027
+ ],
2028
+ name: 'updateConfig',
2029
+ outputs: [],
2030
+ stateMutability: 'nonpayable',
2031
+ },
2032
+ {
2033
+ type: 'function',
2034
+ inputs: [
2035
+ { name: 'newImplementation', internalType: 'address', type: 'address' },
2036
+ { name: 'data', internalType: 'bytes', type: 'bytes' },
2037
+ ],
2038
+ name: 'upgradeToAndCall',
2039
+ outputs: [],
2040
+ stateMutability: 'payable',
2041
+ },
2042
+ {
2043
+ type: 'function',
2044
+ inputs: [
2045
+ { name: 'accountHolder', internalType: 'address', type: 'address' },
2046
+ { name: 'asset', internalType: 'address', type: 'address' },
2047
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
2048
+ ],
2049
+ name: 'withdraw',
2050
+ outputs: [],
2051
+ stateMutability: 'nonpayable',
2052
+ },
2053
+ {
2054
+ type: 'function',
2055
+ inputs: [
2056
+ { name: 'accountHolder', internalType: 'address', type: 'address' },
2057
+ { name: 'asset', internalType: 'address', type: 'address' },
2058
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
2059
+ {
2060
+ name: 'op',
2061
+ internalType: 'struct SignedOperation',
2062
+ type: 'tuple',
2063
+ components: [
2064
+ { name: 'expiry', internalType: 'uint64', type: 'uint64' },
2065
+ { name: 'nonce', internalType: 'uint256', type: 'uint256' },
2066
+ { name: 'curveId', internalType: 'uint8', type: 'uint8' },
2067
+ { name: 'signature', internalType: 'bytes', type: 'bytes' },
2068
+ ],
2069
+ },
2070
+ ],
2071
+ name: 'withdrawSigned',
2072
+ outputs: [],
2073
+ stateMutability: 'nonpayable',
2074
+ },
2075
+ {
2076
+ type: 'event',
2077
+ anonymous: false,
2078
+ inputs: [
2079
+ {
2080
+ name: 'optionId',
2081
+ internalType: 'bytes32',
2082
+ type: 'bytes32',
2083
+ indexed: true,
2084
+ },
2085
+ {
2086
+ name: 'taker',
2087
+ internalType: 'address',
2088
+ type: 'address',
2089
+ indexed: true,
2090
+ },
2091
+ {
2092
+ name: 'collateralReceiver',
2093
+ internalType: 'address',
2094
+ type: 'address',
2095
+ indexed: false,
2096
+ },
2097
+ {
2098
+ name: 'asset',
2099
+ internalType: 'address',
2100
+ type: 'address',
2101
+ indexed: false,
2102
+ },
2103
+ {
2104
+ name: 'amount',
2105
+ internalType: 'uint256',
2106
+ type: 'uint256',
2107
+ indexed: false,
2108
+ },
2109
+ {
2110
+ name: 'borrowedCollateral',
2111
+ internalType: 'uint256',
2112
+ type: 'uint256',
2113
+ indexed: false,
2114
+ },
2115
+ ],
2116
+ name: 'CollateralBorrowed',
2117
+ },
2118
+ {
2119
+ type: 'event',
2120
+ anonymous: false,
2121
+ inputs: [
2122
+ {
2123
+ name: 'optionId',
2124
+ internalType: 'bytes32',
2125
+ type: 'bytes32',
2126
+ indexed: true,
2127
+ },
2128
+ {
2129
+ name: 'repayer',
2130
+ internalType: 'address',
2131
+ type: 'address',
2132
+ indexed: true,
2133
+ },
2134
+ {
2135
+ name: 'asset',
2136
+ internalType: 'address',
2137
+ type: 'address',
2138
+ indexed: false,
2139
+ },
2140
+ {
2141
+ name: 'amount',
2142
+ internalType: 'uint248',
2143
+ type: 'uint248',
2144
+ indexed: false,
2145
+ },
2146
+ {
2147
+ name: 'borrowedCollateral',
2148
+ internalType: 'uint248',
2149
+ type: 'uint248',
2150
+ indexed: false,
2151
+ },
2152
+ ],
2153
+ name: 'CollateralRepaid',
2154
+ },
2155
+ {
2156
+ type: 'event',
2157
+ anonymous: false,
2158
+ inputs: [
2159
+ {
2160
+ name: 'party',
2161
+ internalType: 'address',
2162
+ type: 'address',
2163
+ indexed: true,
2164
+ },
2165
+ {
2166
+ name: 'delegate',
2167
+ internalType: 'address',
2168
+ type: 'address',
2169
+ indexed: true,
2170
+ },
2171
+ {
2172
+ name: 'permissions',
2173
+ internalType: 'uint16',
2174
+ type: 'uint16',
2175
+ indexed: false,
2176
+ },
2177
+ ],
2178
+ name: 'DelegateUpdated',
2179
+ },
2180
+ {
2181
+ type: 'event',
2182
+ anonymous: false,
2183
+ inputs: [
2184
+ {
2185
+ name: 'accountHolder',
2186
+ internalType: 'address',
2187
+ type: 'address',
2188
+ indexed: true,
2189
+ },
2190
+ {
2191
+ name: 'funder',
2192
+ internalType: 'address',
2193
+ type: 'address',
2194
+ indexed: true,
2195
+ },
2196
+ {
2197
+ name: 'asset',
2198
+ internalType: 'address',
2199
+ type: 'address',
2200
+ indexed: true,
2201
+ },
2202
+ {
2203
+ name: 'amount',
2204
+ internalType: 'uint256',
2205
+ type: 'uint256',
2206
+ indexed: false,
2207
+ },
2208
+ ],
2209
+ name: 'Deposited',
2210
+ },
2211
+ {
2212
+ type: 'event',
2213
+ anonymous: false,
2214
+ inputs: [
2215
+ {
2216
+ name: 'optionId',
2217
+ internalType: 'bytes32',
2218
+ type: 'bytes32',
2219
+ indexed: true,
2220
+ },
2221
+ {
2222
+ name: 'holder',
2223
+ internalType: 'address',
2224
+ type: 'address',
2225
+ indexed: true,
2226
+ },
2227
+ {
2228
+ name: 'caller',
2229
+ internalType: 'address',
2230
+ type: 'address',
2231
+ indexed: true,
2232
+ },
2233
+ {
2234
+ name: 'claimsBurned',
2235
+ internalType: 'uint256',
2236
+ type: 'uint256',
2237
+ indexed: false,
2238
+ },
2239
+ {
2240
+ name: 'remainingClaims',
2241
+ internalType: 'uint256',
2242
+ type: 'uint256',
2243
+ indexed: false,
2244
+ },
2245
+ ],
2246
+ name: 'ExpiredClaimsBurned',
2247
+ },
2248
+ {
2249
+ type: 'event',
2250
+ anonymous: false,
2251
+ inputs: [
2252
+ {
2253
+ name: 'optionId',
2254
+ internalType: 'bytes32',
2255
+ type: 'bytes32',
2256
+ indexed: true,
2257
+ },
2258
+ {
2259
+ name: 'payer',
2260
+ internalType: 'address',
2261
+ type: 'address',
2262
+ indexed: true,
2263
+ },
2264
+ { name: 'hook', internalType: 'address', type: 'address', indexed: true },
2265
+ {
2266
+ name: 'asset',
2267
+ internalType: 'address',
2268
+ type: 'address',
2269
+ indexed: false,
2270
+ },
2271
+ {
2272
+ name: 'amount',
2273
+ internalType: 'uint256',
2274
+ type: 'uint256',
2275
+ indexed: false,
2276
+ },
2277
+ ],
2278
+ name: 'FeePaid',
2279
+ },
2280
+ {
2281
+ type: 'event',
2282
+ anonymous: false,
2283
+ inputs: [
2284
+ {
2285
+ name: 'version',
2286
+ internalType: 'uint64',
2287
+ type: 'uint64',
2288
+ indexed: false,
2289
+ },
2290
+ ],
2291
+ name: 'Initialized',
2292
+ },
2293
+ {
2294
+ type: 'event',
2295
+ anonymous: false,
2296
+ inputs: [
2297
+ {
2298
+ name: 'offerId',
2299
+ internalType: 'bytes32',
2300
+ type: 'bytes32',
2301
+ indexed: true,
2302
+ },
2303
+ {
2304
+ name: 'creator',
2305
+ internalType: 'address',
2306
+ type: 'address',
2307
+ indexed: true,
2308
+ },
2309
+ {
2310
+ name: 'asset',
2311
+ internalType: 'address',
2312
+ type: 'address',
2313
+ indexed: false,
2314
+ },
2315
+ {
2316
+ name: 'refundedAmount',
2317
+ internalType: 'uint256',
2318
+ type: 'uint256',
2319
+ indexed: false,
2320
+ },
2321
+ ],
2322
+ name: 'OfferCancelled',
2323
+ },
2324
+ {
2325
+ type: 'event',
2326
+ anonymous: false,
2327
+ inputs: [
2328
+ {
2329
+ name: 'offerId',
2330
+ internalType: 'bytes32',
2331
+ type: 'bytes32',
2332
+ indexed: true,
2333
+ },
2334
+ {
2335
+ name: 'creator',
2336
+ internalType: 'address',
2337
+ type: 'address',
2338
+ indexed: true,
2339
+ },
2340
+ {
2341
+ name: 'asset',
2342
+ internalType: 'address',
2343
+ type: 'address',
2344
+ indexed: false,
2345
+ },
2346
+ {
2347
+ name: 'amount',
2348
+ internalType: 'uint256',
2349
+ type: 'uint256',
2350
+ indexed: false,
2351
+ },
2352
+ {
2353
+ name: 'offer',
2354
+ internalType: 'struct Offer',
2355
+ type: 'tuple',
2356
+ components: [
2357
+ { name: 'salt', internalType: 'bytes32', type: 'bytes32' },
2358
+ { name: 'creator', internalType: 'address', type: 'address' },
2359
+ {
2360
+ name: 'optionDetails',
2361
+ internalType: 'struct OptionDetails',
2362
+ type: 'tuple',
2363
+ components: [
2364
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
2365
+ {
2366
+ name: 'startTimestamp',
2367
+ internalType: 'uint64',
2368
+ type: 'uint64',
2369
+ },
2370
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
2371
+ {
2372
+ name: 'premiumAsset',
2373
+ internalType: 'address',
2374
+ type: 'address',
2375
+ },
2376
+ {
2377
+ name: 'premiumAmount',
2378
+ internalType: 'uint256',
2379
+ type: 'uint256',
2380
+ },
2381
+ {
2382
+ name: 'collateralAsset',
2383
+ internalType: 'address',
2384
+ type: 'address',
2385
+ },
2386
+ {
2387
+ name: 'collateralAmount',
2388
+ internalType: 'uint256',
2389
+ type: 'uint256',
2390
+ },
2391
+ {
2392
+ name: 'settlementAsset',
2393
+ internalType: 'address',
2394
+ type: 'address',
2395
+ },
2396
+ {
2397
+ name: 'settlementAmount',
2398
+ internalType: 'uint256',
2399
+ type: 'uint256',
2400
+ },
2401
+ {
2402
+ name: 'settlementLayer',
2403
+ internalType: 'address',
2404
+ type: 'address',
2405
+ },
2406
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
2407
+ ],
2408
+ },
2409
+ { name: 'expiry', internalType: 'uint64', type: 'uint64' },
2410
+ { name: 'side', internalType: 'enum OptionSide', type: 'uint8' },
2411
+ { name: 'counterparty', internalType: 'address', type: 'address' },
2412
+ ],
2413
+ indexed: false,
2414
+ },
2415
+ ],
2416
+ name: 'OfferCreated',
2417
+ },
2418
+ {
2419
+ type: 'event',
2420
+ anonymous: false,
2421
+ inputs: [
2422
+ {
2423
+ name: 'optionId',
2424
+ internalType: 'bytes32',
2425
+ type: 'bytes32',
2426
+ indexed: true,
2427
+ },
2428
+ {
2429
+ name: 'maker',
2430
+ internalType: 'address',
2431
+ type: 'address',
2432
+ indexed: true,
2433
+ },
2434
+ {
2435
+ name: 'taker',
2436
+ internalType: 'address',
2437
+ type: 'address',
2438
+ indexed: true,
2439
+ },
2440
+ {
2441
+ name: 'matcher',
2442
+ internalType: 'address',
2443
+ type: 'address',
2444
+ indexed: false,
2445
+ },
2446
+ {
2447
+ name: 'exerciseClaimToken',
2448
+ internalType: 'address',
2449
+ type: 'address',
2450
+ indexed: false,
2451
+ },
2452
+ {
2453
+ name: 'redeemClaimToken',
2454
+ internalType: 'address',
2455
+ type: 'address',
2456
+ indexed: false,
2457
+ },
2458
+ {
2459
+ name: 'premiumToMaker',
2460
+ internalType: 'uint256',
2461
+ type: 'uint256',
2462
+ indexed: false,
2463
+ },
2464
+ {
2465
+ name: 'option',
2466
+ internalType: 'struct MarketOption',
2467
+ type: 'tuple',
2468
+ components: [
2469
+ {
2470
+ name: 'details',
2471
+ internalType: 'struct OptionDetails',
2472
+ type: 'tuple',
2473
+ components: [
2474
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
2475
+ {
2476
+ name: 'startTimestamp',
2477
+ internalType: 'uint64',
2478
+ type: 'uint64',
2479
+ },
2480
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
2481
+ {
2482
+ name: 'premiumAsset',
2483
+ internalType: 'address',
2484
+ type: 'address',
2485
+ },
2486
+ {
2487
+ name: 'premiumAmount',
2488
+ internalType: 'uint256',
2489
+ type: 'uint256',
2490
+ },
2491
+ {
2492
+ name: 'collateralAsset',
2493
+ internalType: 'address',
2494
+ type: 'address',
2495
+ },
2496
+ {
2497
+ name: 'collateralAmount',
2498
+ internalType: 'uint256',
2499
+ type: 'uint256',
2500
+ },
2501
+ {
2502
+ name: 'settlementAsset',
2503
+ internalType: 'address',
2504
+ type: 'address',
2505
+ },
2506
+ {
2507
+ name: 'settlementAmount',
2508
+ internalType: 'uint256',
2509
+ type: 'uint256',
2510
+ },
2511
+ {
2512
+ name: 'settlementLayer',
2513
+ internalType: 'address',
2514
+ type: 'address',
2515
+ },
2516
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
2517
+ ],
2518
+ },
2519
+ { name: 'taker', internalType: 'address', type: 'address' },
2520
+ { name: 'maker', internalType: 'address', type: 'address' },
2521
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
2522
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
2523
+ ],
2524
+ indexed: false,
2525
+ },
2526
+ ],
2527
+ name: 'OptionCreated',
2528
+ },
2529
+ {
2530
+ type: 'event',
2531
+ anonymous: false,
2532
+ inputs: [
2533
+ {
2534
+ name: 'optionId',
2535
+ internalType: 'bytes32',
2536
+ type: 'bytes32',
2537
+ indexed: true,
2538
+ },
2539
+ {
2540
+ name: 'exerciser',
2541
+ internalType: 'address',
2542
+ type: 'address',
2543
+ indexed: true,
2544
+ },
2545
+ {
2546
+ name: 'claimsBurned',
2547
+ internalType: 'uint256',
2548
+ type: 'uint256',
2549
+ indexed: false,
2550
+ },
2551
+ {
2552
+ name: 'collateralAsset',
2553
+ internalType: 'address',
2554
+ type: 'address',
2555
+ indexed: false,
2556
+ },
2557
+ {
2558
+ name: 'collateralPaid',
2559
+ internalType: 'uint256',
2560
+ type: 'uint256',
2561
+ indexed: false,
2562
+ },
2563
+ {
2564
+ name: 'settlementAsset',
2565
+ internalType: 'address',
2566
+ type: 'address',
2567
+ indexed: false,
2568
+ },
2569
+ {
2570
+ name: 'settlementEscrowed',
2571
+ internalType: 'uint256',
2572
+ type: 'uint256',
2573
+ indexed: false,
2574
+ },
2575
+ {
2576
+ name: 'remainingClaims',
2577
+ internalType: 'uint256',
2578
+ type: 'uint256',
2579
+ indexed: false,
2580
+ },
2581
+ {
2582
+ name: 'totalBurnedClaims',
2583
+ internalType: 'uint256',
2584
+ type: 'uint256',
2585
+ indexed: false,
2586
+ },
2587
+ ],
2588
+ name: 'OptionExercised',
2589
+ },
2590
+ {
2591
+ type: 'event',
2592
+ anonymous: false,
2593
+ inputs: [
2594
+ {
2595
+ name: 'optionId',
2596
+ internalType: 'bytes32',
2597
+ type: 'bytes32',
2598
+ indexed: true,
2599
+ },
2600
+ {
2601
+ name: 'redeemer',
2602
+ internalType: 'address',
2603
+ type: 'address',
2604
+ indexed: true,
2605
+ },
2606
+ {
2607
+ name: 'claimsBurned',
2608
+ internalType: 'uint256',
2609
+ type: 'uint256',
2610
+ indexed: false,
2611
+ },
2612
+ {
2613
+ name: 'collateralAsset',
2614
+ internalType: 'address',
2615
+ type: 'address',
2616
+ indexed: false,
2617
+ },
2618
+ {
2619
+ name: 'collateralPaid',
2620
+ internalType: 'uint256',
2621
+ type: 'uint256',
2622
+ indexed: false,
2623
+ },
2624
+ {
2625
+ name: 'settlementAsset',
2626
+ internalType: 'address',
2627
+ type: 'address',
2628
+ indexed: false,
2629
+ },
2630
+ {
2631
+ name: 'settlementPaid',
2632
+ internalType: 'uint256',
2633
+ type: 'uint256',
2634
+ indexed: false,
2635
+ },
2636
+ {
2637
+ name: 'remainingClaims',
2638
+ internalType: 'uint256',
2639
+ type: 'uint256',
2640
+ indexed: false,
2641
+ },
2642
+ {
2643
+ name: 'totalBurnedClaims',
2644
+ internalType: 'uint256',
2645
+ type: 'uint256',
2646
+ indexed: false,
2647
+ },
2648
+ ],
2649
+ name: 'OptionRedeemed',
2650
+ },
2651
+ {
2652
+ type: 'event',
2653
+ anonymous: false,
2654
+ inputs: [
2655
+ {
2656
+ name: 'updatedBy',
2657
+ internalType: 'address',
2658
+ type: 'address',
2659
+ indexed: true,
2660
+ },
2661
+ {
2662
+ name: 'config',
2663
+ internalType: 'struct ProtocolConfig',
2664
+ type: 'tuple',
2665
+ components: [
2666
+ { name: 'authority', internalType: 'address', type: 'address' },
2667
+ { name: 'pauseAuthority', internalType: 'address', type: 'address' },
2668
+ {
2669
+ name: 'optionCreationHook',
2670
+ internalType: 'address',
2671
+ type: 'address',
2672
+ },
2673
+ { name: 'pausedActions', internalType: 'uint32', type: 'uint32' },
2674
+ {
2675
+ name: 'pauseAuthorityMask',
2676
+ internalType: 'uint32',
2677
+ type: 'uint32',
2678
+ },
2679
+ ],
2680
+ indexed: false,
2681
+ },
2682
+ ],
2683
+ name: 'ProtocolConfigUpdated',
2684
+ },
2685
+ {
2686
+ type: 'event',
2687
+ anonymous: false,
2688
+ inputs: [
2689
+ {
2690
+ name: 'setBy',
2691
+ internalType: 'address',
2692
+ type: 'address',
2693
+ indexed: true,
2694
+ },
2695
+ {
2696
+ name: 'domain',
2697
+ internalType: 'uint32',
2698
+ type: 'uint32',
2699
+ indexed: false,
2700
+ },
2701
+ ],
2702
+ name: 'ProtocolDomainSet',
2703
+ },
2704
+ {
2705
+ type: 'event',
2706
+ anonymous: false,
2707
+ inputs: [
2708
+ {
2709
+ name: 'bootstrapAuthority',
2710
+ internalType: 'address',
2711
+ type: 'address',
2712
+ indexed: true,
2713
+ },
2714
+ ],
2715
+ name: 'ProtocolInitialized',
2716
+ },
2717
+ {
2718
+ type: 'event',
2719
+ anonymous: false,
2720
+ inputs: [
2721
+ {
2722
+ name: 'pausedBy',
2723
+ internalType: 'address',
2724
+ type: 'address',
2725
+ indexed: true,
2726
+ },
2727
+ {
2728
+ name: 'pauseMask',
2729
+ internalType: 'uint32',
2730
+ type: 'uint32',
2731
+ indexed: false,
2732
+ },
2733
+ {
2734
+ name: 'pausedActions',
2735
+ internalType: 'uint32',
2736
+ type: 'uint32',
2737
+ indexed: false,
2738
+ },
2739
+ ],
2740
+ name: 'ProtocolPaused',
2741
+ },
2742
+ {
2743
+ type: 'event',
2744
+ anonymous: false,
2745
+ inputs: [
2746
+ {
2747
+ name: 'actingParty',
2748
+ internalType: 'address',
2749
+ type: 'address',
2750
+ indexed: true,
2751
+ },
2752
+ {
2753
+ name: 'signer',
2754
+ internalType: 'address',
2755
+ type: 'address',
2756
+ indexed: true,
2757
+ },
2758
+ {
2759
+ name: 'action',
2760
+ internalType: 'enum IntentAction',
2761
+ type: 'uint8',
2762
+ indexed: false,
2763
+ },
2764
+ {
2765
+ name: 'nonce',
2766
+ internalType: 'uint256',
2767
+ type: 'uint256',
2768
+ indexed: false,
2769
+ },
2770
+ {
2771
+ name: 'expiry',
2772
+ internalType: 'uint64',
2773
+ type: 'uint64',
2774
+ indexed: false,
2775
+ },
2776
+ ],
2777
+ name: 'SignedOperationExecuted',
2778
+ },
2779
+ {
2780
+ type: 'event',
2781
+ anonymous: false,
2782
+ inputs: [
2783
+ {
2784
+ name: 'implementation',
2785
+ internalType: 'address',
2786
+ type: 'address',
2787
+ indexed: true,
2788
+ },
2789
+ ],
2790
+ name: 'Upgraded',
2791
+ },
2792
+ {
2793
+ type: 'event',
2794
+ anonymous: false,
2795
+ inputs: [
2796
+ {
2797
+ name: 'accountHolder',
2798
+ internalType: 'address',
2799
+ type: 'address',
2800
+ indexed: true,
2801
+ },
2802
+ {
2803
+ name: 'asset',
2804
+ internalType: 'address',
2805
+ type: 'address',
2806
+ indexed: true,
2807
+ },
2808
+ {
2809
+ name: 'amount',
2810
+ internalType: 'uint256',
2811
+ type: 'uint256',
2812
+ indexed: false,
2813
+ },
2814
+ ],
2815
+ name: 'Withdrawn',
2816
+ },
2817
+ {
2818
+ type: 'error',
2819
+ inputs: [
2820
+ { name: 'action', internalType: 'enum PausableActions', type: 'uint8' },
2821
+ ],
2822
+ name: 'ActionPaused',
2823
+ },
2824
+ {
2825
+ type: 'error',
2826
+ inputs: [{ name: 'target', internalType: 'address', type: 'address' }],
2827
+ name: 'AddressEmptyCode',
2828
+ },
2829
+ { type: 'error', inputs: [], name: 'AuthorityRequired' },
2830
+ { type: 'error', inputs: [], name: 'BorrowNotAllowed' },
2831
+ {
2832
+ type: 'error',
2833
+ inputs: [{ name: 'optionId', internalType: 'bytes32', type: 'bytes32' }],
2834
+ name: 'BorrowRefused',
2835
+ },
2836
+ { type: 'error', inputs: [], name: 'ClaimTokenFactoryRequired' },
2837
+ { type: 'error', inputs: [], name: 'CollateralAmountZero' },
2838
+ {
2839
+ type: 'error',
2840
+ inputs: [
2841
+ { name: 'expected', internalType: 'address', type: 'address' },
2842
+ { name: 'provided', internalType: 'address', type: 'address' },
2843
+ ],
2844
+ name: 'CounterpartyMismatch',
2845
+ },
2846
+ {
2847
+ type: 'error',
2848
+ inputs: [{ name: 'domain', internalType: 'uint32', type: 'uint32' }],
2849
+ name: 'DomainAlreadySet',
2850
+ },
2851
+ {
2852
+ type: 'error',
2853
+ inputs: [
2854
+ { name: 'expected', internalType: 'uint32', type: 'uint32' },
2855
+ { name: 'provided', internalType: 'uint32', type: 'uint32' },
2856
+ ],
2857
+ name: 'DomainMismatch',
2858
+ },
2859
+ { type: 'error', inputs: [], name: 'ECDSAInvalidSignature' },
2860
+ {
2861
+ type: 'error',
2862
+ inputs: [{ name: 'length', internalType: 'uint256', type: 'uint256' }],
2863
+ name: 'ECDSAInvalidSignatureLength',
2864
+ },
2865
+ {
2866
+ type: 'error',
2867
+ inputs: [{ name: 's', internalType: 'bytes32', type: 'bytes32' }],
2868
+ name: 'ECDSAInvalidSignatureS',
2869
+ },
2870
+ {
2871
+ type: 'error',
2872
+ inputs: [
2873
+ { name: 'implementation', internalType: 'address', type: 'address' },
2874
+ ],
2875
+ name: 'ERC1967InvalidImplementation',
2876
+ },
2877
+ { type: 'error', inputs: [], name: 'ERC1967NonPayable' },
2878
+ {
2879
+ type: 'error',
2880
+ inputs: [
2881
+ { name: 'supply', internalType: 'uint256', type: 'uint256' },
2882
+ { name: 'requested', internalType: 'uint256', type: 'uint256' },
2883
+ ],
2884
+ name: 'ExerciseExceedsClaimSupply',
2885
+ },
2886
+ { type: 'error', inputs: [], name: 'FailedCall' },
2887
+ {
2888
+ type: 'error',
2889
+ inputs: [
2890
+ { name: 'available', internalType: 'uint256', type: 'uint256' },
2891
+ { name: 'requested', internalType: 'uint256', type: 'uint256' },
2892
+ ],
2893
+ name: 'InsufficientBalance',
2894
+ },
2895
+ {
2896
+ type: 'error',
2897
+ inputs: [
2898
+ { name: 'available', internalType: 'uint256', type: 'uint256' },
2899
+ { name: 'requested', internalType: 'uint256', type: 'uint256' },
2900
+ ],
2901
+ name: 'InsufficientClaims',
2902
+ },
2903
+ {
2904
+ type: 'error',
2905
+ inputs: [{ name: 'expiry', internalType: 'uint64', type: 'uint64' }],
2906
+ name: 'IntentExpired',
2907
+ },
2908
+ { type: 'error', inputs: [], name: 'InvalidInitialization' },
2909
+ { type: 'error', inputs: [], name: 'InvalidTimeRange' },
2910
+ {
2911
+ type: 'error',
2912
+ inputs: [{ name: 'optionId', internalType: 'bytes32', type: 'bytes32' }],
2913
+ name: 'MatchRefused',
2914
+ },
2915
+ {
2916
+ type: 'error',
2917
+ inputs: [
2918
+ { name: 'signer', internalType: 'address', type: 'address' },
2919
+ { name: 'nonce', internalType: 'uint256', type: 'uint256' },
2920
+ ],
2921
+ name: 'NonceAlreadyUsed',
2922
+ },
2923
+ { type: 'error', inputs: [], name: 'NotInitializing' },
2924
+ {
2925
+ type: 'error',
2926
+ inputs: [
2927
+ { name: 'taker', internalType: 'address', type: 'address' },
2928
+ { name: 'caller', internalType: 'address', type: 'address' },
2929
+ ],
2930
+ name: 'NotTaker',
2931
+ },
2932
+ {
2933
+ type: 'error',
2934
+ inputs: [{ name: 'offerId', internalType: 'bytes32', type: 'bytes32' }],
2935
+ name: 'OfferAlreadyExists',
2936
+ },
2937
+ { type: 'error', inputs: [], name: 'OfferAlreadyExpired' },
2938
+ { type: 'error', inputs: [], name: 'OfferExpiryTooLong' },
2939
+ { type: 'error', inputs: [], name: 'OfferMismatch' },
2940
+ {
2941
+ type: 'error',
2942
+ inputs: [{ name: 'offerId', internalType: 'bytes32', type: 'bytes32' }],
2943
+ name: 'OfferNotFound',
2944
+ },
2945
+ {
2946
+ type: 'error',
2947
+ inputs: [{ name: 'optionId', internalType: 'bytes32', type: 'bytes32' }],
2948
+ name: 'OptionAlreadyExists',
2949
+ },
2950
+ { type: 'error', inputs: [], name: 'OptionAlreadyExpired' },
2951
+ {
2952
+ type: 'error',
2953
+ inputs: [
2954
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
2955
+ { name: 'timestamp', internalType: 'uint256', type: 'uint256' },
2956
+ ],
2957
+ name: 'OptionNotExpired',
2958
+ },
2959
+ {
2960
+ type: 'error',
2961
+ inputs: [{ name: 'optionId', internalType: 'bytes32', type: 'bytes32' }],
2962
+ name: 'OptionNotFound',
2963
+ },
2964
+ {
2965
+ type: 'error',
2966
+ inputs: [
2967
+ { name: 'startTimestamp', internalType: 'uint64', type: 'uint64' },
2968
+ { name: 'timestamp', internalType: 'uint256', type: 'uint256' },
2969
+ ],
2970
+ name: 'OutsideBorrowWindow',
2971
+ },
2972
+ {
2973
+ type: 'error',
2974
+ inputs: [
2975
+ { name: 'startTimestamp', internalType: 'uint64', type: 'uint64' },
2976
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
2977
+ { name: 'timestamp', internalType: 'uint256', type: 'uint256' },
2978
+ ],
2979
+ name: 'OutsideExerciseWindow',
2980
+ },
2981
+ {
2982
+ type: 'error',
2983
+ inputs: [
2984
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
2985
+ { name: 'timestamp', internalType: 'uint256', type: 'uint256' },
2986
+ ],
2987
+ name: 'OutsideRedeemWindow',
2988
+ },
2989
+ {
2990
+ type: 'error',
2991
+ inputs: [
2992
+ { name: 'borrowedCollateral', internalType: 'uint256', type: 'uint256' },
2993
+ ],
2994
+ name: 'OutstandingBorrow',
2995
+ },
2996
+ {
2997
+ type: 'error',
2998
+ inputs: [
2999
+ { name: 'requestedMask', internalType: 'uint32', type: 'uint32' },
3000
+ { name: 'allowedMask', internalType: 'uint32', type: 'uint32' },
3001
+ ],
3002
+ name: 'PauseMaskNotAllowed',
3003
+ },
3004
+ { type: 'error', inputs: [], name: 'PremiumAmountZero' },
3005
+ { type: 'error', inputs: [], name: 'ReentrancyGuardReentrantCall' },
3006
+ {
3007
+ type: 'error',
3008
+ inputs: [
3009
+ { name: 'borrowedCollateral', internalType: 'uint256', type: 'uint256' },
3010
+ { name: 'requested', internalType: 'uint256', type: 'uint256' },
3011
+ ],
3012
+ name: 'RepayExceedsBorrowed',
3013
+ },
3014
+ { type: 'error', inputs: [], name: 'ResolutionAmountMismatch' },
3015
+ {
3016
+ type: 'error',
3017
+ inputs: [
3018
+ { name: 'bits', internalType: 'uint8', type: 'uint8' },
3019
+ { name: 'value', internalType: 'uint256', type: 'uint256' },
3020
+ ],
3021
+ name: 'SafeCastOverflowedUintDowncast',
3022
+ },
3023
+ {
3024
+ type: 'error',
3025
+ inputs: [{ name: 'token', internalType: 'address', type: 'address' }],
3026
+ name: 'SafeERC20FailedOperation',
3027
+ },
3028
+ { type: 'error', inputs: [], name: 'SettlementAmountZero' },
3029
+ { type: 'error', inputs: [], name: 'UUPSUnauthorizedCallContext' },
3030
+ {
3031
+ type: 'error',
3032
+ inputs: [{ name: 'slot', internalType: 'bytes32', type: 'bytes32' }],
3033
+ name: 'UUPSUnsupportedProxiableUUID',
3034
+ },
3035
+ { type: 'error', inputs: [], name: 'Unauthorized' },
3036
+ {
3037
+ type: 'error',
3038
+ inputs: [{ name: 'signer', internalType: 'address', type: 'address' }],
3039
+ name: 'UnauthorizedSigner',
3040
+ },
3041
+ {
3042
+ type: 'error',
3043
+ inputs: [{ name: 'curveId', internalType: 'uint8', type: 'uint8' }],
3044
+ name: 'UnsupportedCurveId',
3045
+ },
3046
+ { type: 'error', inputs: [], name: 'ZeroAmount' },
3047
+ { type: 'error', inputs: [], name: 'ZeroAsset' },
3048
+ ];
3049
+ /**
3050
+ *
3051
+ */
3052
+ export const coreAddress = {
3053
+ 31337: '0xe57a0b345e05313386d05f1848888f0AD0aa87B2',
3054
+ };
3055
+ /**
3056
+ *
3057
+ */
3058
+ export const coreConfig = { address: coreAddress, abi: coreAbi };
3059
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3060
+ // FeeHook
3061
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3062
+ export const feeHookAbi = [
3063
+ {
3064
+ type: 'constructor',
3065
+ inputs: [
3066
+ { name: 'beneficiary_', internalType: 'address', type: 'address' },
3067
+ { name: 'bps_', internalType: 'uint16', type: 'uint16' },
3068
+ ],
3069
+ stateMutability: 'nonpayable',
3070
+ },
3071
+ {
3072
+ type: 'function',
3073
+ inputs: [],
3074
+ name: 'beneficiary',
3075
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
3076
+ stateMutability: 'view',
3077
+ },
3078
+ {
3079
+ type: 'function',
3080
+ inputs: [],
3081
+ name: 'bps',
3082
+ outputs: [{ name: '', internalType: 'uint16', type: 'uint16' }],
3083
+ stateMutability: 'view',
3084
+ },
3085
+ {
3086
+ type: 'function',
3087
+ inputs: [{ name: 'asset', internalType: 'address', type: 'address' }],
3088
+ name: 'claim',
3089
+ outputs: [{ name: 'amount', internalType: 'uint256', type: 'uint256' }],
3090
+ stateMutability: 'nonpayable',
3091
+ },
3092
+ {
3093
+ type: 'function',
3094
+ inputs: [
3095
+ {
3096
+ name: 'option',
3097
+ internalType: 'struct MarketOption',
3098
+ type: 'tuple',
3099
+ components: [
3100
+ {
3101
+ name: 'details',
3102
+ internalType: 'struct OptionDetails',
3103
+ type: 'tuple',
3104
+ components: [
3105
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
3106
+ {
3107
+ name: 'startTimestamp',
3108
+ internalType: 'uint64',
3109
+ type: 'uint64',
3110
+ },
3111
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
3112
+ {
3113
+ name: 'premiumAsset',
3114
+ internalType: 'address',
3115
+ type: 'address',
3116
+ },
3117
+ {
3118
+ name: 'premiumAmount',
3119
+ internalType: 'uint256',
3120
+ type: 'uint256',
3121
+ },
3122
+ {
3123
+ name: 'collateralAsset',
3124
+ internalType: 'address',
3125
+ type: 'address',
3126
+ },
3127
+ {
3128
+ name: 'collateralAmount',
3129
+ internalType: 'uint256',
3130
+ type: 'uint256',
3131
+ },
3132
+ {
3133
+ name: 'settlementAsset',
3134
+ internalType: 'address',
3135
+ type: 'address',
3136
+ },
3137
+ {
3138
+ name: 'settlementAmount',
3139
+ internalType: 'uint256',
3140
+ type: 'uint256',
3141
+ },
3142
+ {
3143
+ name: 'settlementLayer',
3144
+ internalType: 'address',
3145
+ type: 'address',
3146
+ },
3147
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
3148
+ ],
3149
+ },
3150
+ { name: 'taker', internalType: 'address', type: 'address' },
3151
+ { name: 'maker', internalType: 'address', type: 'address' },
3152
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
3153
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
3154
+ ],
3155
+ },
3156
+ { name: '', internalType: 'bytes', type: 'bytes' },
3157
+ ],
3158
+ name: 'onCreateOption',
3159
+ outputs: [
3160
+ {
3161
+ name: '',
3162
+ internalType: 'struct FeeResolution',
3163
+ type: 'tuple',
3164
+ components: [
3165
+ {
3166
+ name: 'premiumFeeAmount',
3167
+ internalType: 'uint256',
3168
+ type: 'uint256',
3169
+ },
3170
+ ],
3171
+ },
3172
+ ],
3173
+ stateMutability: 'view',
3174
+ },
3175
+ {
3176
+ type: 'event',
3177
+ anonymous: false,
3178
+ inputs: [
3179
+ {
3180
+ name: 'asset',
3181
+ internalType: 'address',
3182
+ type: 'address',
3183
+ indexed: true,
3184
+ },
3185
+ {
3186
+ name: 'beneficiary',
3187
+ internalType: 'address',
3188
+ type: 'address',
3189
+ indexed: true,
3190
+ },
3191
+ {
3192
+ name: 'amount',
3193
+ internalType: 'uint256',
3194
+ type: 'uint256',
3195
+ indexed: false,
3196
+ },
3197
+ ],
3198
+ name: 'FeeClaimed',
3199
+ },
3200
+ {
3201
+ type: 'error',
3202
+ inputs: [{ name: 'bps', internalType: 'uint16', type: 'uint16' }],
3203
+ name: 'FeeTooHigh',
3204
+ },
3205
+ { type: 'error', inputs: [], name: 'NotBeneficiary' },
3206
+ { type: 'error', inputs: [], name: 'NothingToClaim' },
3207
+ {
3208
+ type: 'error',
3209
+ inputs: [{ name: 'token', internalType: 'address', type: 'address' }],
3210
+ name: 'SafeERC20FailedOperation',
3211
+ },
3212
+ ];
3213
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3214
+ // IOptionCreationHook
3215
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3216
+ export const iOptionCreationHookAbi = [
3217
+ {
3218
+ type: 'function',
3219
+ inputs: [
3220
+ {
3221
+ name: 'option',
3222
+ internalType: 'struct MarketOption',
3223
+ type: 'tuple',
3224
+ components: [
3225
+ {
3226
+ name: 'details',
3227
+ internalType: 'struct OptionDetails',
3228
+ type: 'tuple',
3229
+ components: [
3230
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
3231
+ {
3232
+ name: 'startTimestamp',
3233
+ internalType: 'uint64',
3234
+ type: 'uint64',
3235
+ },
3236
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
3237
+ {
3238
+ name: 'premiumAsset',
3239
+ internalType: 'address',
3240
+ type: 'address',
3241
+ },
3242
+ {
3243
+ name: 'premiumAmount',
3244
+ internalType: 'uint256',
3245
+ type: 'uint256',
3246
+ },
3247
+ {
3248
+ name: 'collateralAsset',
3249
+ internalType: 'address',
3250
+ type: 'address',
3251
+ },
3252
+ {
3253
+ name: 'collateralAmount',
3254
+ internalType: 'uint256',
3255
+ type: 'uint256',
3256
+ },
3257
+ {
3258
+ name: 'settlementAsset',
3259
+ internalType: 'address',
3260
+ type: 'address',
3261
+ },
3262
+ {
3263
+ name: 'settlementAmount',
3264
+ internalType: 'uint256',
3265
+ type: 'uint256',
3266
+ },
3267
+ {
3268
+ name: 'settlementLayer',
3269
+ internalType: 'address',
3270
+ type: 'address',
3271
+ },
3272
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
3273
+ ],
3274
+ },
3275
+ { name: 'taker', internalType: 'address', type: 'address' },
3276
+ { name: 'maker', internalType: 'address', type: 'address' },
3277
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
3278
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
3279
+ ],
3280
+ },
3281
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
3282
+ ],
3283
+ name: 'onCreateOption',
3284
+ outputs: [
3285
+ {
3286
+ name: '',
3287
+ internalType: 'struct FeeResolution',
3288
+ type: 'tuple',
3289
+ components: [
3290
+ {
3291
+ name: 'premiumFeeAmount',
3292
+ internalType: 'uint256',
3293
+ type: 'uint256',
3294
+ },
3295
+ ],
3296
+ },
3297
+ ],
3298
+ stateMutability: 'nonpayable',
3299
+ },
3300
+ ];
3301
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3302
+ // ISettlementLayer
3303
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3304
+ export const iSettlementLayerAbi = [
3305
+ {
3306
+ type: 'function',
3307
+ inputs: [
3308
+ {
3309
+ name: 'option',
3310
+ internalType: 'struct MarketOption',
3311
+ type: 'tuple',
3312
+ components: [
3313
+ {
3314
+ name: 'details',
3315
+ internalType: 'struct OptionDetails',
3316
+ type: 'tuple',
3317
+ components: [
3318
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
3319
+ {
3320
+ name: 'startTimestamp',
3321
+ internalType: 'uint64',
3322
+ type: 'uint64',
3323
+ },
3324
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
3325
+ {
3326
+ name: 'premiumAsset',
3327
+ internalType: 'address',
3328
+ type: 'address',
3329
+ },
3330
+ {
3331
+ name: 'premiumAmount',
3332
+ internalType: 'uint256',
3333
+ type: 'uint256',
3334
+ },
3335
+ {
3336
+ name: 'collateralAsset',
3337
+ internalType: 'address',
3338
+ type: 'address',
3339
+ },
3340
+ {
3341
+ name: 'collateralAmount',
3342
+ internalType: 'uint256',
3343
+ type: 'uint256',
3344
+ },
3345
+ {
3346
+ name: 'settlementAsset',
3347
+ internalType: 'address',
3348
+ type: 'address',
3349
+ },
3350
+ {
3351
+ name: 'settlementAmount',
3352
+ internalType: 'uint256',
3353
+ type: 'uint256',
3354
+ },
3355
+ {
3356
+ name: 'settlementLayer',
3357
+ internalType: 'address',
3358
+ type: 'address',
3359
+ },
3360
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
3361
+ ],
3362
+ },
3363
+ { name: 'taker', internalType: 'address', type: 'address' },
3364
+ { name: 'maker', internalType: 'address', type: 'address' },
3365
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
3366
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
3367
+ ],
3368
+ },
3369
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
3370
+ { name: 'borrower', internalType: 'address', type: 'address' },
3371
+ { name: 'collateralReceiver', internalType: 'address', type: 'address' },
3372
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
3373
+ ],
3374
+ name: 'canBorrow',
3375
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3376
+ stateMutability: 'nonpayable',
3377
+ },
3378
+ {
3379
+ type: 'function',
3380
+ inputs: [
3381
+ {
3382
+ name: 'option',
3383
+ internalType: 'struct MarketOption',
3384
+ type: 'tuple',
3385
+ components: [
3386
+ {
3387
+ name: 'details',
3388
+ internalType: 'struct OptionDetails',
3389
+ type: 'tuple',
3390
+ components: [
3391
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
3392
+ {
3393
+ name: 'startTimestamp',
3394
+ internalType: 'uint64',
3395
+ type: 'uint64',
3396
+ },
3397
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
3398
+ {
3399
+ name: 'premiumAsset',
3400
+ internalType: 'address',
3401
+ type: 'address',
3402
+ },
3403
+ {
3404
+ name: 'premiumAmount',
3405
+ internalType: 'uint256',
3406
+ type: 'uint256',
3407
+ },
3408
+ {
3409
+ name: 'collateralAsset',
3410
+ internalType: 'address',
3411
+ type: 'address',
3412
+ },
3413
+ {
3414
+ name: 'collateralAmount',
3415
+ internalType: 'uint256',
3416
+ type: 'uint256',
3417
+ },
3418
+ {
3419
+ name: 'settlementAsset',
3420
+ internalType: 'address',
3421
+ type: 'address',
3422
+ },
3423
+ {
3424
+ name: 'settlementAmount',
3425
+ internalType: 'uint256',
3426
+ type: 'uint256',
3427
+ },
3428
+ {
3429
+ name: 'settlementLayer',
3430
+ internalType: 'address',
3431
+ type: 'address',
3432
+ },
3433
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
3434
+ ],
3435
+ },
3436
+ { name: 'taker', internalType: 'address', type: 'address' },
3437
+ { name: 'maker', internalType: 'address', type: 'address' },
3438
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
3439
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
3440
+ ],
3441
+ },
3442
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
3443
+ { name: 'exerciser', internalType: 'address', type: 'address' },
3444
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
3445
+ ],
3446
+ name: 'canExercise',
3447
+ outputs: [
3448
+ {
3449
+ name: '',
3450
+ internalType: 'struct ExerciseResolution',
3451
+ type: 'tuple',
3452
+ components: [
3453
+ {
3454
+ name: 'collateralToTaker',
3455
+ internalType: 'uint256',
3456
+ type: 'uint256',
3457
+ },
3458
+ {
3459
+ name: 'settlementFromTaker',
3460
+ internalType: 'uint256',
3461
+ type: 'uint256',
3462
+ },
3463
+ ],
3464
+ },
3465
+ ],
3466
+ stateMutability: 'nonpayable',
3467
+ },
3468
+ {
3469
+ type: 'function',
3470
+ inputs: [
3471
+ {
3472
+ name: 'option',
3473
+ internalType: 'struct MarketOption',
3474
+ type: 'tuple',
3475
+ components: [
3476
+ {
3477
+ name: 'details',
3478
+ internalType: 'struct OptionDetails',
3479
+ type: 'tuple',
3480
+ components: [
3481
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
3482
+ {
3483
+ name: 'startTimestamp',
3484
+ internalType: 'uint64',
3485
+ type: 'uint64',
3486
+ },
3487
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
3488
+ {
3489
+ name: 'premiumAsset',
3490
+ internalType: 'address',
3491
+ type: 'address',
3492
+ },
3493
+ {
3494
+ name: 'premiumAmount',
3495
+ internalType: 'uint256',
3496
+ type: 'uint256',
3497
+ },
3498
+ {
3499
+ name: 'collateralAsset',
3500
+ internalType: 'address',
3501
+ type: 'address',
3502
+ },
3503
+ {
3504
+ name: 'collateralAmount',
3505
+ internalType: 'uint256',
3506
+ type: 'uint256',
3507
+ },
3508
+ {
3509
+ name: 'settlementAsset',
3510
+ internalType: 'address',
3511
+ type: 'address',
3512
+ },
3513
+ {
3514
+ name: 'settlementAmount',
3515
+ internalType: 'uint256',
3516
+ type: 'uint256',
3517
+ },
3518
+ {
3519
+ name: 'settlementLayer',
3520
+ internalType: 'address',
3521
+ type: 'address',
3522
+ },
3523
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
3524
+ ],
3525
+ },
3526
+ { name: 'taker', internalType: 'address', type: 'address' },
3527
+ { name: 'maker', internalType: 'address', type: 'address' },
3528
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
3529
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
3530
+ ],
3531
+ },
3532
+ { name: 'matcher', internalType: 'address', type: 'address' },
3533
+ ],
3534
+ name: 'canMatch',
3535
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3536
+ stateMutability: 'nonpayable',
3537
+ },
3538
+ {
3539
+ type: 'function',
3540
+ inputs: [
3541
+ {
3542
+ name: 'option',
3543
+ internalType: 'struct MarketOption',
3544
+ type: 'tuple',
3545
+ components: [
3546
+ {
3547
+ name: 'details',
3548
+ internalType: 'struct OptionDetails',
3549
+ type: 'tuple',
3550
+ components: [
3551
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
3552
+ {
3553
+ name: 'startTimestamp',
3554
+ internalType: 'uint64',
3555
+ type: 'uint64',
3556
+ },
3557
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
3558
+ {
3559
+ name: 'premiumAsset',
3560
+ internalType: 'address',
3561
+ type: 'address',
3562
+ },
3563
+ {
3564
+ name: 'premiumAmount',
3565
+ internalType: 'uint256',
3566
+ type: 'uint256',
3567
+ },
3568
+ {
3569
+ name: 'collateralAsset',
3570
+ internalType: 'address',
3571
+ type: 'address',
3572
+ },
3573
+ {
3574
+ name: 'collateralAmount',
3575
+ internalType: 'uint256',
3576
+ type: 'uint256',
3577
+ },
3578
+ {
3579
+ name: 'settlementAsset',
3580
+ internalType: 'address',
3581
+ type: 'address',
3582
+ },
3583
+ {
3584
+ name: 'settlementAmount',
3585
+ internalType: 'uint256',
3586
+ type: 'uint256',
3587
+ },
3588
+ {
3589
+ name: 'settlementLayer',
3590
+ internalType: 'address',
3591
+ type: 'address',
3592
+ },
3593
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
3594
+ ],
3595
+ },
3596
+ { name: 'taker', internalType: 'address', type: 'address' },
3597
+ { name: 'maker', internalType: 'address', type: 'address' },
3598
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
3599
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
3600
+ ],
3601
+ },
3602
+ { name: 'redeemAmount', internalType: 'uint256', type: 'uint256' },
3603
+ { name: 'claimSupply', internalType: 'uint256', type: 'uint256' },
3604
+ { name: 'collateralBalance', internalType: 'uint256', type: 'uint256' },
3605
+ { name: 'settlementBalance', internalType: 'uint256', type: 'uint256' },
3606
+ { name: 'redeemer', internalType: 'address', type: 'address' },
3607
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
3608
+ ],
3609
+ name: 'canRedeem',
3610
+ outputs: [
3611
+ {
3612
+ name: '',
3613
+ internalType: 'struct RedeemResolution',
3614
+ type: 'tuple',
3615
+ components: [
3616
+ {
3617
+ name: 'collateralToMaker',
3618
+ internalType: 'uint256',
3619
+ type: 'uint256',
3620
+ },
3621
+ {
3622
+ name: 'settlementToMaker',
3623
+ internalType: 'uint256',
3624
+ type: 'uint256',
3625
+ },
3626
+ ],
3627
+ },
3628
+ ],
3629
+ stateMutability: 'nonpayable',
3630
+ },
3631
+ {
3632
+ type: 'function',
3633
+ inputs: [],
3634
+ name: 'layerType',
3635
+ outputs: [
3636
+ { name: '', internalType: 'enum SettlementLayerType', type: 'uint8' },
3637
+ ],
3638
+ stateMutability: 'view',
3639
+ },
3640
+ ];
3641
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3642
+ // PhysicalSettlement
3643
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3644
+ export const physicalSettlementAbi = [
3645
+ {
3646
+ type: 'constructor',
3647
+ inputs: [
3648
+ {
3649
+ name: 'exerciseMode_',
3650
+ internalType: 'enum ExerciseMode',
3651
+ type: 'uint8',
3652
+ },
3653
+ ],
3654
+ stateMutability: 'nonpayable',
3655
+ },
3656
+ {
3657
+ type: 'function',
3658
+ inputs: [],
3659
+ name: 'EXERCISE_MODE',
3660
+ outputs: [{ name: '', internalType: 'enum ExerciseMode', type: 'uint8' }],
3661
+ stateMutability: 'view',
3662
+ },
3663
+ {
3664
+ type: 'function',
3665
+ inputs: [
3666
+ {
3667
+ name: 'option',
3668
+ internalType: 'struct MarketOption',
3669
+ type: 'tuple',
3670
+ components: [
3671
+ {
3672
+ name: 'details',
3673
+ internalType: 'struct OptionDetails',
3674
+ type: 'tuple',
3675
+ components: [
3676
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
3677
+ {
3678
+ name: 'startTimestamp',
3679
+ internalType: 'uint64',
3680
+ type: 'uint64',
3681
+ },
3682
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
3683
+ {
3684
+ name: 'premiumAsset',
3685
+ internalType: 'address',
3686
+ type: 'address',
3687
+ },
3688
+ {
3689
+ name: 'premiumAmount',
3690
+ internalType: 'uint256',
3691
+ type: 'uint256',
3692
+ },
3693
+ {
3694
+ name: 'collateralAsset',
3695
+ internalType: 'address',
3696
+ type: 'address',
3697
+ },
3698
+ {
3699
+ name: 'collateralAmount',
3700
+ internalType: 'uint256',
3701
+ type: 'uint256',
3702
+ },
3703
+ {
3704
+ name: 'settlementAsset',
3705
+ internalType: 'address',
3706
+ type: 'address',
3707
+ },
3708
+ {
3709
+ name: 'settlementAmount',
3710
+ internalType: 'uint256',
3711
+ type: 'uint256',
3712
+ },
3713
+ {
3714
+ name: 'settlementLayer',
3715
+ internalType: 'address',
3716
+ type: 'address',
3717
+ },
3718
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
3719
+ ],
3720
+ },
3721
+ { name: 'taker', internalType: 'address', type: 'address' },
3722
+ { name: 'maker', internalType: 'address', type: 'address' },
3723
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
3724
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
3725
+ ],
3726
+ },
3727
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
3728
+ { name: 'borrower', internalType: 'address', type: 'address' },
3729
+ { name: 'collateralReceiver', internalType: 'address', type: 'address' },
3730
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
3731
+ ],
3732
+ name: 'canBorrow',
3733
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3734
+ stateMutability: 'pure',
3735
+ },
3736
+ {
3737
+ type: 'function',
3738
+ inputs: [
3739
+ {
3740
+ name: 'option',
3741
+ internalType: 'struct MarketOption',
3742
+ type: 'tuple',
3743
+ components: [
3744
+ {
3745
+ name: 'details',
3746
+ internalType: 'struct OptionDetails',
3747
+ type: 'tuple',
3748
+ components: [
3749
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
3750
+ {
3751
+ name: 'startTimestamp',
3752
+ internalType: 'uint64',
3753
+ type: 'uint64',
3754
+ },
3755
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
3756
+ {
3757
+ name: 'premiumAsset',
3758
+ internalType: 'address',
3759
+ type: 'address',
3760
+ },
3761
+ {
3762
+ name: 'premiumAmount',
3763
+ internalType: 'uint256',
3764
+ type: 'uint256',
3765
+ },
3766
+ {
3767
+ name: 'collateralAsset',
3768
+ internalType: 'address',
3769
+ type: 'address',
3770
+ },
3771
+ {
3772
+ name: 'collateralAmount',
3773
+ internalType: 'uint256',
3774
+ type: 'uint256',
3775
+ },
3776
+ {
3777
+ name: 'settlementAsset',
3778
+ internalType: 'address',
3779
+ type: 'address',
3780
+ },
3781
+ {
3782
+ name: 'settlementAmount',
3783
+ internalType: 'uint256',
3784
+ type: 'uint256',
3785
+ },
3786
+ {
3787
+ name: 'settlementLayer',
3788
+ internalType: 'address',
3789
+ type: 'address',
3790
+ },
3791
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
3792
+ ],
3793
+ },
3794
+ { name: 'taker', internalType: 'address', type: 'address' },
3795
+ { name: 'maker', internalType: 'address', type: 'address' },
3796
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
3797
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
3798
+ ],
3799
+ },
3800
+ { name: 'amount', internalType: 'uint256', type: 'uint256' },
3801
+ { name: 'exerciser', internalType: 'address', type: 'address' },
3802
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
3803
+ ],
3804
+ name: 'canExercise',
3805
+ outputs: [
3806
+ {
3807
+ name: '',
3808
+ internalType: 'struct ExerciseResolution',
3809
+ type: 'tuple',
3810
+ components: [
3811
+ {
3812
+ name: 'collateralToTaker',
3813
+ internalType: 'uint256',
3814
+ type: 'uint256',
3815
+ },
3816
+ {
3817
+ name: 'settlementFromTaker',
3818
+ internalType: 'uint256',
3819
+ type: 'uint256',
3820
+ },
3821
+ ],
3822
+ },
3823
+ ],
3824
+ stateMutability: 'view',
3825
+ },
3826
+ {
3827
+ type: 'function',
3828
+ inputs: [
3829
+ {
3830
+ name: '',
3831
+ internalType: 'struct MarketOption',
3832
+ type: 'tuple',
3833
+ components: [
3834
+ {
3835
+ name: 'details',
3836
+ internalType: 'struct OptionDetails',
3837
+ type: 'tuple',
3838
+ components: [
3839
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
3840
+ {
3841
+ name: 'startTimestamp',
3842
+ internalType: 'uint64',
3843
+ type: 'uint64',
3844
+ },
3845
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
3846
+ {
3847
+ name: 'premiumAsset',
3848
+ internalType: 'address',
3849
+ type: 'address',
3850
+ },
3851
+ {
3852
+ name: 'premiumAmount',
3853
+ internalType: 'uint256',
3854
+ type: 'uint256',
3855
+ },
3856
+ {
3857
+ name: 'collateralAsset',
3858
+ internalType: 'address',
3859
+ type: 'address',
3860
+ },
3861
+ {
3862
+ name: 'collateralAmount',
3863
+ internalType: 'uint256',
3864
+ type: 'uint256',
3865
+ },
3866
+ {
3867
+ name: 'settlementAsset',
3868
+ internalType: 'address',
3869
+ type: 'address',
3870
+ },
3871
+ {
3872
+ name: 'settlementAmount',
3873
+ internalType: 'uint256',
3874
+ type: 'uint256',
3875
+ },
3876
+ {
3877
+ name: 'settlementLayer',
3878
+ internalType: 'address',
3879
+ type: 'address',
3880
+ },
3881
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
3882
+ ],
3883
+ },
3884
+ { name: 'taker', internalType: 'address', type: 'address' },
3885
+ { name: 'maker', internalType: 'address', type: 'address' },
3886
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
3887
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
3888
+ ],
3889
+ },
3890
+ { name: '', internalType: 'address', type: 'address' },
3891
+ ],
3892
+ name: 'canMatch',
3893
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
3894
+ stateMutability: 'pure',
3895
+ },
3896
+ {
3897
+ type: 'function',
3898
+ inputs: [
3899
+ {
3900
+ name: 'option',
3901
+ internalType: 'struct MarketOption',
3902
+ type: 'tuple',
3903
+ components: [
3904
+ {
3905
+ name: 'details',
3906
+ internalType: 'struct OptionDetails',
3907
+ type: 'tuple',
3908
+ components: [
3909
+ { name: 'domain', internalType: 'uint32', type: 'uint32' },
3910
+ {
3911
+ name: 'startTimestamp',
3912
+ internalType: 'uint64',
3913
+ type: 'uint64',
3914
+ },
3915
+ { name: 'endTimestamp', internalType: 'uint64', type: 'uint64' },
3916
+ {
3917
+ name: 'premiumAsset',
3918
+ internalType: 'address',
3919
+ type: 'address',
3920
+ },
3921
+ {
3922
+ name: 'premiumAmount',
3923
+ internalType: 'uint256',
3924
+ type: 'uint256',
3925
+ },
3926
+ {
3927
+ name: 'collateralAsset',
3928
+ internalType: 'address',
3929
+ type: 'address',
3930
+ },
3931
+ {
3932
+ name: 'collateralAmount',
3933
+ internalType: 'uint256',
3934
+ type: 'uint256',
3935
+ },
3936
+ {
3937
+ name: 'settlementAsset',
3938
+ internalType: 'address',
3939
+ type: 'address',
3940
+ },
3941
+ {
3942
+ name: 'settlementAmount',
3943
+ internalType: 'uint256',
3944
+ type: 'uint256',
3945
+ },
3946
+ {
3947
+ name: 'settlementLayer',
3948
+ internalType: 'address',
3949
+ type: 'address',
3950
+ },
3951
+ { name: 'borrowAllowed', internalType: 'bool', type: 'bool' },
3952
+ ],
3953
+ },
3954
+ { name: 'taker', internalType: 'address', type: 'address' },
3955
+ { name: 'maker', internalType: 'address', type: 'address' },
3956
+ { name: 'settlementOffer', internalType: 'bytes32', type: 'bytes32' },
3957
+ { name: 'collateralOffer', internalType: 'bytes32', type: 'bytes32' },
3958
+ ],
3959
+ },
3960
+ { name: 'redeemAmount', internalType: 'uint256', type: 'uint256' },
3961
+ { name: 'claimSupply', internalType: 'uint256', type: 'uint256' },
3962
+ { name: 'collateralBalance', internalType: 'uint256', type: 'uint256' },
3963
+ { name: 'settlementBalance', internalType: 'uint256', type: 'uint256' },
3964
+ { name: 'redeemer', internalType: 'address', type: 'address' },
3965
+ { name: 'metadata', internalType: 'bytes', type: 'bytes' },
3966
+ ],
3967
+ name: 'canRedeem',
3968
+ outputs: [
3969
+ {
3970
+ name: '',
3971
+ internalType: 'struct RedeemResolution',
3972
+ type: 'tuple',
3973
+ components: [
3974
+ {
3975
+ name: 'collateralToMaker',
3976
+ internalType: 'uint256',
3977
+ type: 'uint256',
3978
+ },
3979
+ {
3980
+ name: 'settlementToMaker',
3981
+ internalType: 'uint256',
3982
+ type: 'uint256',
3983
+ },
3984
+ ],
3985
+ },
3986
+ ],
3987
+ stateMutability: 'view',
3988
+ },
3989
+ {
3990
+ type: 'function',
3991
+ inputs: [],
3992
+ name: 'layerType',
3993
+ outputs: [
3994
+ { name: '', internalType: 'enum SettlementLayerType', type: 'uint8' },
3995
+ ],
3996
+ stateMutability: 'pure',
3997
+ },
3998
+ { type: 'error', inputs: [], name: 'BorrowNotSupported' },
3999
+ { type: 'error', inputs: [], name: 'CollateralAmountZero' },
4000
+ { type: 'error', inputs: [], name: 'NoClaimsOutstanding' },
4001
+ { type: 'error', inputs: [], name: 'PartialExerciseNotAllowed' },
4002
+ { type: 'error', inputs: [], name: 'RedeemExceedsClaimSupply' },
4003
+ ];
4004
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4005
+ // PhysicalSettlementFactory
4006
+ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4007
+ /**
4008
+ *
4009
+ */
4010
+ export const physicalSettlementFactoryAbi = [
4011
+ {
4012
+ type: 'function',
4013
+ inputs: [
4014
+ { name: 'mode', internalType: 'enum ExerciseMode', type: 'uint8' },
4015
+ ],
4016
+ name: 'deploy',
4017
+ outputs: [
4018
+ {
4019
+ name: 'layer',
4020
+ internalType: 'contract PhysicalSettlement',
4021
+ type: 'address',
4022
+ },
4023
+ ],
4024
+ stateMutability: 'nonpayable',
4025
+ },
4026
+ {
4027
+ type: 'function',
4028
+ inputs: [
4029
+ { name: 'mode', internalType: 'enum ExerciseMode', type: 'uint8' },
4030
+ ],
4031
+ name: 'initCodeHash',
4032
+ outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
4033
+ stateMutability: 'pure',
4034
+ },
4035
+ {
4036
+ type: 'function',
4037
+ inputs: [
4038
+ { name: 'mode', internalType: 'enum ExerciseMode', type: 'uint8' },
4039
+ ],
4040
+ name: 'isDeployed',
4041
+ outputs: [{ name: '', internalType: 'bool', type: 'bool' }],
4042
+ stateMutability: 'view',
4043
+ },
4044
+ {
4045
+ type: 'function',
4046
+ inputs: [
4047
+ { name: 'mode', internalType: 'enum ExerciseMode', type: 'uint8' },
4048
+ ],
4049
+ name: 'predictAddress',
4050
+ outputs: [{ name: '', internalType: 'address', type: 'address' }],
4051
+ stateMutability: 'view',
4052
+ },
4053
+ {
4054
+ type: 'function',
4055
+ inputs: [
4056
+ { name: 'mode', internalType: 'enum ExerciseMode', type: 'uint8' },
4057
+ ],
4058
+ name: 'saltFor',
4059
+ outputs: [{ name: '', internalType: 'bytes32', type: 'bytes32' }],
4060
+ stateMutability: 'pure',
4061
+ },
4062
+ {
4063
+ type: 'event',
4064
+ anonymous: false,
4065
+ inputs: [
4066
+ {
4067
+ name: 'layer',
4068
+ internalType: 'address',
4069
+ type: 'address',
4070
+ indexed: true,
4071
+ },
4072
+ {
4073
+ name: 'mode',
4074
+ internalType: 'enum ExerciseMode',
4075
+ type: 'uint8',
4076
+ indexed: true,
4077
+ },
4078
+ ],
4079
+ name: 'PhysicalSettlementDeployed',
4080
+ },
4081
+ { type: 'error', inputs: [], name: 'Create2EmptyBytecode' },
4082
+ { type: 'error', inputs: [], name: 'FailedDeployment' },
4083
+ {
4084
+ type: 'error',
4085
+ inputs: [
4086
+ { name: 'balance', internalType: 'uint256', type: 'uint256' },
4087
+ { name: 'needed', internalType: 'uint256', type: 'uint256' },
4088
+ ],
4089
+ name: 'InsufficientBalance',
4090
+ },
4091
+ ];
4092
+ /**
4093
+ *
4094
+ */
4095
+ export const physicalSettlementFactoryAddress = {
4096
+ 31337: '0xA40485DC03E63943C87C2621A1961025a92A1dEb',
4097
+ };
4098
+ /**
4099
+ *
4100
+ */
4101
+ export const physicalSettlementFactoryConfig = {
4102
+ address: physicalSettlementFactoryAddress,
4103
+ abi: physicalSettlementFactoryAbi,
4104
+ };
4105
+ //# sourceMappingURL=abis.js.map