afp-sdk 0.1.0__py3-none-any.whl

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.
@@ -0,0 +1,1302 @@
1
+ """ProductRegistry contract binding and data structures."""
2
+
3
+ # This module has been generated using pyabigen v0.2.16
4
+
5
+ import enum
6
+ import typing
7
+ from dataclasses import dataclass
8
+
9
+ import eth_typing
10
+ import hexbytes
11
+ import web3
12
+ from web3.contract import contract
13
+
14
+
15
+ class ProductState(enum.IntEnum):
16
+ """Port of `enum ProductState` on the ProductRegistry contract."""
17
+
18
+ NOT_EXIST = 0
19
+ PENDING = 1
20
+ LIVE = 2
21
+ TRADEOUT = 3
22
+ FINAL_SETTLEMENT = 4
23
+ EXPIRED = 5
24
+
25
+
26
+ @dataclass
27
+ class ProductMetadata:
28
+ """Port of `struct ProductMetadata` on the IProductRegistry contract."""
29
+
30
+ builder: eth_typing.ChecksumAddress
31
+ symbol: str
32
+ description: str
33
+
34
+
35
+ @dataclass
36
+ class OracleSpecification:
37
+ """Port of `struct OracleSpecification` on the IProductRegistry contract."""
38
+
39
+ oracle_address: eth_typing.ChecksumAddress
40
+ fsv_decimals: int
41
+ fsp_alpha: int
42
+ fsp_beta: int
43
+ fsv_calldata: hexbytes.HexBytes
44
+
45
+
46
+ @dataclass
47
+ class Product:
48
+ """Port of `struct Product` on the IProductRegistry contract."""
49
+
50
+ metadata: ProductMetadata
51
+ oracle_spec: OracleSpecification
52
+ price_quotation: str
53
+ collateral_asset: eth_typing.ChecksumAddress
54
+ start_time: int
55
+ earliest_fsp_submission_time: int
56
+ unit_value: int
57
+ initial_margin_requirement: int
58
+ maintenance_margin_requirement: int
59
+ offer_price_buffer: int
60
+ auction_bounty: int
61
+ tradeout_interval: int
62
+ tick_size: int
63
+ extended_metadata: str
64
+
65
+
66
+ class ProductRegistry:
67
+ """ProductRegistry contract binding.
68
+
69
+ Parameters
70
+ ----------
71
+ w3 : web3.Web3
72
+ address : eth_typing.ChecksumAddress
73
+ The address of a deployed ProductRegistry contract.
74
+ """
75
+
76
+ _contract: contract.Contract
77
+
78
+ def __init__(
79
+ self,
80
+ w3: web3.Web3,
81
+ address: eth_typing.ChecksumAddress,
82
+ ):
83
+ self._contract = w3.eth.contract(
84
+ address=address,
85
+ abi=ABI,
86
+ )
87
+
88
+ @property
89
+ def Initialized(self) -> contract.ContractEvent:
90
+ """Binding for `event Initialized` on the ProductRegistry contract."""
91
+ return self._contract.events.Initialized
92
+
93
+ @property
94
+ def OwnershipTransferred(self) -> contract.ContractEvent:
95
+ """Binding for `event OwnershipTransferred` on the ProductRegistry contract."""
96
+ return self._contract.events.OwnershipTransferred
97
+
98
+ @property
99
+ def ProductRegistered(self) -> contract.ContractEvent:
100
+ """Binding for `event ProductRegistered` on the ProductRegistry contract."""
101
+ return self._contract.events.ProductRegistered
102
+
103
+ @property
104
+ def Upgraded(self) -> contract.ContractEvent:
105
+ """Binding for `event Upgraded` on the ProductRegistry contract."""
106
+ return self._contract.events.Upgraded
107
+
108
+ def upgrade_interface_version(
109
+ self,
110
+ ) -> str:
111
+ """Binding for `UPGRADE_INTERFACE_VERSION` on the ProductRegistry contract.
112
+
113
+ Returns
114
+ -------
115
+ str
116
+ """
117
+ return_value = self._contract.functions.UPGRADE_INTERFACE_VERSION().call()
118
+ return str(return_value)
119
+
120
+ def auction_bounty(
121
+ self,
122
+ product_id: hexbytes.HexBytes,
123
+ ) -> int:
124
+ """Binding for `auctionBounty` on the ProductRegistry contract.
125
+
126
+ Parameters
127
+ ----------
128
+ product_id : hexbytes.HexBytes
129
+
130
+ Returns
131
+ -------
132
+ int
133
+ """
134
+ return_value = self._contract.functions.auctionBounty(
135
+ product_id,
136
+ ).call()
137
+ return int(return_value)
138
+
139
+ def clearing(
140
+ self,
141
+ ) -> eth_typing.ChecksumAddress:
142
+ """Binding for `clearing` on the ProductRegistry contract.
143
+
144
+ Returns
145
+ -------
146
+ eth_typing.ChecksumAddress
147
+ """
148
+ return_value = self._contract.functions.clearing().call()
149
+ return eth_typing.ChecksumAddress(return_value)
150
+
151
+ def collateral_asset(
152
+ self,
153
+ product_id: hexbytes.HexBytes,
154
+ ) -> eth_typing.ChecksumAddress:
155
+ """Binding for `collateralAsset` on the ProductRegistry contract.
156
+
157
+ Parameters
158
+ ----------
159
+ product_id : hexbytes.HexBytes
160
+
161
+ Returns
162
+ -------
163
+ eth_typing.ChecksumAddress
164
+ """
165
+ return_value = self._contract.functions.collateralAsset(
166
+ product_id,
167
+ ).call()
168
+ return eth_typing.ChecksumAddress(return_value)
169
+
170
+ def earliest_fsp_submission_time(
171
+ self,
172
+ product_id: hexbytes.HexBytes,
173
+ ) -> int:
174
+ """Binding for `earliestFSPSubmissionTime` on the ProductRegistry contract.
175
+
176
+ Parameters
177
+ ----------
178
+ product_id : hexbytes.HexBytes
179
+
180
+ Returns
181
+ -------
182
+ int
183
+ """
184
+ return_value = self._contract.functions.earliestFSPSubmissionTime(
185
+ product_id,
186
+ ).call()
187
+ return int(return_value)
188
+
189
+ def id(
190
+ self,
191
+ product: Product,
192
+ ) -> hexbytes.HexBytes:
193
+ """Binding for `id` on the ProductRegistry contract.
194
+
195
+ Parameters
196
+ ----------
197
+ product : Product
198
+
199
+ Returns
200
+ -------
201
+ hexbytes.HexBytes
202
+ """
203
+ return_value = self._contract.functions.id(
204
+ (
205
+ (
206
+ product.metadata.builder,
207
+ product.metadata.symbol,
208
+ product.metadata.description,
209
+ ),
210
+ (
211
+ product.oracle_spec.oracle_address,
212
+ product.oracle_spec.fsv_decimals,
213
+ product.oracle_spec.fsp_alpha,
214
+ product.oracle_spec.fsp_beta,
215
+ product.oracle_spec.fsv_calldata,
216
+ ),
217
+ product.price_quotation,
218
+ product.collateral_asset,
219
+ product.start_time,
220
+ product.earliest_fsp_submission_time,
221
+ product.unit_value,
222
+ product.initial_margin_requirement,
223
+ product.maintenance_margin_requirement,
224
+ product.offer_price_buffer,
225
+ product.auction_bounty,
226
+ product.tradeout_interval,
227
+ product.tick_size,
228
+ product.extended_metadata,
229
+ ),
230
+ ).call()
231
+ return hexbytes.HexBytes(return_value)
232
+
233
+ def imr(
234
+ self,
235
+ product_id: hexbytes.HexBytes,
236
+ ) -> int:
237
+ """Binding for `imr` on the ProductRegistry contract.
238
+
239
+ Parameters
240
+ ----------
241
+ product_id : hexbytes.HexBytes
242
+
243
+ Returns
244
+ -------
245
+ int
246
+ """
247
+ return_value = self._contract.functions.imr(
248
+ product_id,
249
+ ).call()
250
+ return int(return_value)
251
+
252
+ def initialize(
253
+ self,
254
+ ) -> contract.ContractFunction:
255
+ """Binding for `initialize` on the ProductRegistry contract.
256
+
257
+ Returns
258
+ -------
259
+ web3.contract.contract.ContractFunction
260
+ A contract function instance to be sent in a transaction.
261
+ """
262
+ return self._contract.functions.initialize()
263
+
264
+ def mmr(
265
+ self,
266
+ product_id: hexbytes.HexBytes,
267
+ ) -> int:
268
+ """Binding for `mmr` on the ProductRegistry contract.
269
+
270
+ Parameters
271
+ ----------
272
+ product_id : hexbytes.HexBytes
273
+
274
+ Returns
275
+ -------
276
+ int
277
+ """
278
+ return_value = self._contract.functions.mmr(
279
+ product_id,
280
+ ).call()
281
+ return int(return_value)
282
+
283
+ def offer_price_buffer(
284
+ self,
285
+ product_id: hexbytes.HexBytes,
286
+ ) -> int:
287
+ """Binding for `offerPriceBuffer` on the ProductRegistry contract.
288
+
289
+ Parameters
290
+ ----------
291
+ product_id : hexbytes.HexBytes
292
+
293
+ Returns
294
+ -------
295
+ int
296
+ """
297
+ return_value = self._contract.functions.offerPriceBuffer(
298
+ product_id,
299
+ ).call()
300
+ return int(return_value)
301
+
302
+ def oracle_specification(
303
+ self,
304
+ product_id: hexbytes.HexBytes,
305
+ ) -> OracleSpecification:
306
+ """Binding for `oracleSpecification` on the ProductRegistry contract.
307
+
308
+ Parameters
309
+ ----------
310
+ product_id : hexbytes.HexBytes
311
+
312
+ Returns
313
+ -------
314
+ OracleSpecification
315
+ """
316
+ return_value = self._contract.functions.oracleSpecification(
317
+ product_id,
318
+ ).call()
319
+ return OracleSpecification(
320
+ eth_typing.ChecksumAddress(return_value[0]),
321
+ int(return_value[1]),
322
+ int(return_value[2]),
323
+ int(return_value[3]),
324
+ hexbytes.HexBytes(return_value[4]),
325
+ )
326
+
327
+ def owner(
328
+ self,
329
+ ) -> eth_typing.ChecksumAddress:
330
+ """Binding for `owner` on the ProductRegistry contract.
331
+
332
+ Returns
333
+ -------
334
+ eth_typing.ChecksumAddress
335
+ """
336
+ return_value = self._contract.functions.owner().call()
337
+ return eth_typing.ChecksumAddress(return_value)
338
+
339
+ def point_value(
340
+ self,
341
+ product_id: hexbytes.HexBytes,
342
+ ) -> int:
343
+ """Binding for `pointValue` on the ProductRegistry contract.
344
+
345
+ Parameters
346
+ ----------
347
+ product_id : hexbytes.HexBytes
348
+
349
+ Returns
350
+ -------
351
+ int
352
+ """
353
+ return_value = self._contract.functions.pointValue(
354
+ product_id,
355
+ ).call()
356
+ return int(return_value)
357
+
358
+ def products(
359
+ self,
360
+ product_id: hexbytes.HexBytes,
361
+ ) -> Product:
362
+ """Binding for `products` on the ProductRegistry contract.
363
+
364
+ Parameters
365
+ ----------
366
+ product_id : hexbytes.HexBytes
367
+
368
+ Returns
369
+ -------
370
+ Product
371
+ """
372
+ return_value = self._contract.functions.products(
373
+ product_id,
374
+ ).call()
375
+ return Product(
376
+ ProductMetadata(
377
+ eth_typing.ChecksumAddress(return_value[0][0]),
378
+ str(return_value[0][1]),
379
+ str(return_value[0][2]),
380
+ ),
381
+ OracleSpecification(
382
+ eth_typing.ChecksumAddress(return_value[1][0]),
383
+ int(return_value[1][1]),
384
+ int(return_value[1][2]),
385
+ int(return_value[1][3]),
386
+ hexbytes.HexBytes(return_value[1][4]),
387
+ ),
388
+ str(return_value[2]),
389
+ eth_typing.ChecksumAddress(return_value[3]),
390
+ int(return_value[4]),
391
+ int(return_value[5]),
392
+ int(return_value[6]),
393
+ int(return_value[7]),
394
+ int(return_value[8]),
395
+ int(return_value[9]),
396
+ int(return_value[10]),
397
+ int(return_value[11]),
398
+ int(return_value[12]),
399
+ str(return_value[13]),
400
+ )
401
+
402
+ def proxiable_uuid(
403
+ self,
404
+ ) -> hexbytes.HexBytes:
405
+ """Binding for `proxiableUUID` on the ProductRegistry contract.
406
+
407
+ Returns
408
+ -------
409
+ hexbytes.HexBytes
410
+ """
411
+ return_value = self._contract.functions.proxiableUUID().call()
412
+ return hexbytes.HexBytes(return_value)
413
+
414
+ def register(
415
+ self,
416
+ product: Product,
417
+ ) -> contract.ContractFunction:
418
+ """Binding for `register` on the ProductRegistry contract.
419
+
420
+ Parameters
421
+ ----------
422
+ product : Product
423
+
424
+ Returns
425
+ -------
426
+ web3.contract.contract.ContractFunction
427
+ A contract function instance to be sent in a transaction.
428
+ """
429
+ return self._contract.functions.register(
430
+ (
431
+ (
432
+ product.metadata.builder,
433
+ product.metadata.symbol,
434
+ product.metadata.description,
435
+ ),
436
+ (
437
+ product.oracle_spec.oracle_address,
438
+ product.oracle_spec.fsv_decimals,
439
+ product.oracle_spec.fsp_alpha,
440
+ product.oracle_spec.fsp_beta,
441
+ product.oracle_spec.fsv_calldata,
442
+ ),
443
+ product.price_quotation,
444
+ product.collateral_asset,
445
+ product.start_time,
446
+ product.earliest_fsp_submission_time,
447
+ product.unit_value,
448
+ product.initial_margin_requirement,
449
+ product.maintenance_margin_requirement,
450
+ product.offer_price_buffer,
451
+ product.auction_bounty,
452
+ product.tradeout_interval,
453
+ product.tick_size,
454
+ product.extended_metadata,
455
+ ),
456
+ )
457
+
458
+ def renounce_ownership(
459
+ self,
460
+ ) -> contract.ContractFunction:
461
+ """Binding for `renounceOwnership` on the ProductRegistry contract.
462
+
463
+ Returns
464
+ -------
465
+ web3.contract.contract.ContractFunction
466
+ A contract function instance to be sent in a transaction.
467
+ """
468
+ return self._contract.functions.renounceOwnership()
469
+
470
+ def set_clearing(
471
+ self,
472
+ clearing_: eth_typing.ChecksumAddress,
473
+ ) -> contract.ContractFunction:
474
+ """Binding for `setClearing` on the ProductRegistry contract.
475
+
476
+ Parameters
477
+ ----------
478
+ clearing_ : eth_typing.ChecksumAddress
479
+
480
+ Returns
481
+ -------
482
+ web3.contract.contract.ContractFunction
483
+ A contract function instance to be sent in a transaction.
484
+ """
485
+ return self._contract.functions.setClearing(
486
+ clearing_,
487
+ )
488
+
489
+ def state(
490
+ self,
491
+ product_id: hexbytes.HexBytes,
492
+ ) -> ProductState:
493
+ """Binding for `state` on the ProductRegistry contract.
494
+
495
+ Parameters
496
+ ----------
497
+ product_id : hexbytes.HexBytes
498
+
499
+ Returns
500
+ -------
501
+ ProductState
502
+ """
503
+ return_value = self._contract.functions.state(
504
+ product_id,
505
+ ).call()
506
+ return ProductState(return_value)
507
+
508
+ def tick_size(
509
+ self,
510
+ product_id: hexbytes.HexBytes,
511
+ ) -> int:
512
+ """Binding for `tickSize` on the ProductRegistry contract.
513
+
514
+ Parameters
515
+ ----------
516
+ product_id : hexbytes.HexBytes
517
+
518
+ Returns
519
+ -------
520
+ int
521
+ """
522
+ return_value = self._contract.functions.tickSize(
523
+ product_id,
524
+ ).call()
525
+ return int(return_value)
526
+
527
+ def transfer_ownership(
528
+ self,
529
+ new_owner: eth_typing.ChecksumAddress,
530
+ ) -> contract.ContractFunction:
531
+ """Binding for `transferOwnership` on the ProductRegistry contract.
532
+
533
+ Parameters
534
+ ----------
535
+ new_owner : eth_typing.ChecksumAddress
536
+
537
+ Returns
538
+ -------
539
+ web3.contract.contract.ContractFunction
540
+ A contract function instance to be sent in a transaction.
541
+ """
542
+ return self._contract.functions.transferOwnership(
543
+ new_owner,
544
+ )
545
+
546
+ def upgrade_to_and_call(
547
+ self,
548
+ new_implementation: eth_typing.ChecksumAddress,
549
+ data: hexbytes.HexBytes,
550
+ ) -> contract.ContractFunction:
551
+ """Binding for `upgradeToAndCall` on the ProductRegistry contract.
552
+
553
+ Parameters
554
+ ----------
555
+ new_implementation : eth_typing.ChecksumAddress
556
+ data : hexbytes.HexBytes
557
+
558
+ Returns
559
+ -------
560
+ web3.contract.contract.ContractFunction
561
+ A contract function instance to be sent in a transaction.
562
+ """
563
+ return self._contract.functions.upgradeToAndCall(
564
+ new_implementation,
565
+ data,
566
+ )
567
+
568
+
569
+ ABI = typing.cast(
570
+ eth_typing.ABI,
571
+ [
572
+ {"inputs": [], "stateMutability": "nonpayable", "type": "constructor"},
573
+ {
574
+ "inputs": [
575
+ {"internalType": "address", "name": "target", "type": "address"}
576
+ ],
577
+ "name": "AddressEmptyCode",
578
+ "type": "error",
579
+ },
580
+ {
581
+ "inputs": [
582
+ {"internalType": "string", "name": "parameter", "type": "string"}
583
+ ],
584
+ "name": "AlreadyExists",
585
+ "type": "error",
586
+ },
587
+ {
588
+ "inputs": [
589
+ {"internalType": "address", "name": "implementation", "type": "address"}
590
+ ],
591
+ "name": "ERC1967InvalidImplementation",
592
+ "type": "error",
593
+ },
594
+ {"inputs": [], "name": "ERC1967NonPayable", "type": "error"},
595
+ {"inputs": [], "name": "FailedCall", "type": "error"},
596
+ {
597
+ "inputs": [
598
+ {"internalType": "uint256", "name": "startTime", "type": "uint256"},
599
+ {
600
+ "internalType": "uint256",
601
+ "name": "earliestFSPSubmissionTime",
602
+ "type": "uint256",
603
+ },
604
+ ],
605
+ "name": "InvalidFSPSubmissionTime",
606
+ "type": "error",
607
+ },
608
+ {"inputs": [], "name": "InvalidInitialization", "type": "error"},
609
+ {
610
+ "inputs": [
611
+ {"internalType": "uint16", "name": "imr", "type": "uint16"},
612
+ {"internalType": "uint16", "name": "mmr", "type": "uint16"},
613
+ ],
614
+ "name": "InvalidMarginRequirement",
615
+ "type": "error",
616
+ },
617
+ {
618
+ "inputs": [
619
+ {"internalType": "string", "name": "paramName", "type": "string"}
620
+ ],
621
+ "name": "InvalidParameter",
622
+ "type": "error",
623
+ },
624
+ {
625
+ "inputs": [
626
+ {"internalType": "uint256", "name": "startTime", "type": "uint256"},
627
+ {
628
+ "internalType": "uint256",
629
+ "name": "blockTimestamp",
630
+ "type": "uint256",
631
+ },
632
+ ],
633
+ "name": "InvalidStartTime",
634
+ "type": "error",
635
+ },
636
+ {"inputs": [], "name": "NotInitializing", "type": "error"},
637
+ {
638
+ "inputs": [{"internalType": "address", "name": "owner", "type": "address"}],
639
+ "name": "OwnableInvalidOwner",
640
+ "type": "error",
641
+ },
642
+ {
643
+ "inputs": [
644
+ {"internalType": "address", "name": "account", "type": "address"}
645
+ ],
646
+ "name": "OwnableUnauthorizedAccount",
647
+ "type": "error",
648
+ },
649
+ {"inputs": [], "name": "UUPSUnauthorizedCallContext", "type": "error"},
650
+ {
651
+ "inputs": [{"internalType": "bytes32", "name": "slot", "type": "bytes32"}],
652
+ "name": "UUPSUnsupportedProxiableUUID",
653
+ "type": "error",
654
+ },
655
+ {
656
+ "anonymous": False,
657
+ "inputs": [
658
+ {
659
+ "indexed": False,
660
+ "internalType": "uint64",
661
+ "name": "version",
662
+ "type": "uint64",
663
+ }
664
+ ],
665
+ "name": "Initialized",
666
+ "type": "event",
667
+ },
668
+ {
669
+ "anonymous": False,
670
+ "inputs": [
671
+ {
672
+ "indexed": True,
673
+ "internalType": "address",
674
+ "name": "previousOwner",
675
+ "type": "address",
676
+ },
677
+ {
678
+ "indexed": True,
679
+ "internalType": "address",
680
+ "name": "newOwner",
681
+ "type": "address",
682
+ },
683
+ ],
684
+ "name": "OwnershipTransferred",
685
+ "type": "event",
686
+ },
687
+ {
688
+ "anonymous": False,
689
+ "inputs": [
690
+ {
691
+ "indexed": True,
692
+ "internalType": "address",
693
+ "name": "builder",
694
+ "type": "address",
695
+ },
696
+ {
697
+ "indexed": False,
698
+ "internalType": "bytes32",
699
+ "name": "productId",
700
+ "type": "bytes32",
701
+ },
702
+ ],
703
+ "name": "ProductRegistered",
704
+ "type": "event",
705
+ },
706
+ {
707
+ "anonymous": False,
708
+ "inputs": [
709
+ {
710
+ "indexed": True,
711
+ "internalType": "address",
712
+ "name": "implementation",
713
+ "type": "address",
714
+ }
715
+ ],
716
+ "name": "Upgraded",
717
+ "type": "event",
718
+ },
719
+ {
720
+ "inputs": [],
721
+ "name": "UPGRADE_INTERFACE_VERSION",
722
+ "outputs": [{"internalType": "string", "name": "", "type": "string"}],
723
+ "stateMutability": "view",
724
+ "type": "function",
725
+ },
726
+ {
727
+ "inputs": [
728
+ {"internalType": "bytes32", "name": "productId", "type": "bytes32"}
729
+ ],
730
+ "name": "auctionBounty",
731
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
732
+ "stateMutability": "view",
733
+ "type": "function",
734
+ },
735
+ {
736
+ "inputs": [],
737
+ "name": "clearing",
738
+ "outputs": [
739
+ {
740
+ "internalType": "contract IClearingSubset",
741
+ "name": "",
742
+ "type": "address",
743
+ }
744
+ ],
745
+ "stateMutability": "view",
746
+ "type": "function",
747
+ },
748
+ {
749
+ "inputs": [
750
+ {"internalType": "bytes32", "name": "productId", "type": "bytes32"}
751
+ ],
752
+ "name": "collateralAsset",
753
+ "outputs": [{"internalType": "address", "name": "", "type": "address"}],
754
+ "stateMutability": "view",
755
+ "type": "function",
756
+ },
757
+ {
758
+ "inputs": [
759
+ {"internalType": "bytes32", "name": "productId", "type": "bytes32"}
760
+ ],
761
+ "name": "earliestFSPSubmissionTime",
762
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
763
+ "stateMutability": "view",
764
+ "type": "function",
765
+ },
766
+ {
767
+ "inputs": [
768
+ {
769
+ "components": [
770
+ {
771
+ "components": [
772
+ {
773
+ "internalType": "address",
774
+ "name": "builder",
775
+ "type": "address",
776
+ },
777
+ {
778
+ "internalType": "string",
779
+ "name": "symbol",
780
+ "type": "string",
781
+ },
782
+ {
783
+ "internalType": "string",
784
+ "name": "description",
785
+ "type": "string",
786
+ },
787
+ ],
788
+ "internalType": "struct IProductRegistry.ProductMetadata",
789
+ "name": "metadata",
790
+ "type": "tuple",
791
+ },
792
+ {
793
+ "components": [
794
+ {
795
+ "internalType": "address",
796
+ "name": "oracleAddress",
797
+ "type": "address",
798
+ },
799
+ {
800
+ "internalType": "uint8",
801
+ "name": "fsvDecimals",
802
+ "type": "uint8",
803
+ },
804
+ {
805
+ "internalType": "int256",
806
+ "name": "fspAlpha",
807
+ "type": "int256",
808
+ },
809
+ {
810
+ "internalType": "int256",
811
+ "name": "fspBeta",
812
+ "type": "int256",
813
+ },
814
+ {
815
+ "internalType": "bytes",
816
+ "name": "fsvCalldata",
817
+ "type": "bytes",
818
+ },
819
+ ],
820
+ "internalType": "struct IProductRegistry.OracleSpecification",
821
+ "name": "oracleSpec",
822
+ "type": "tuple",
823
+ },
824
+ {
825
+ "internalType": "string",
826
+ "name": "priceQuotation",
827
+ "type": "string",
828
+ },
829
+ {
830
+ "internalType": "address",
831
+ "name": "collateralAsset",
832
+ "type": "address",
833
+ },
834
+ {
835
+ "internalType": "uint256",
836
+ "name": "startTime",
837
+ "type": "uint256",
838
+ },
839
+ {
840
+ "internalType": "uint256",
841
+ "name": "earliestFSPSubmissionTime",
842
+ "type": "uint256",
843
+ },
844
+ {
845
+ "internalType": "uint256",
846
+ "name": "unitValue",
847
+ "type": "uint256",
848
+ },
849
+ {
850
+ "internalType": "uint16",
851
+ "name": "initialMarginRequirement",
852
+ "type": "uint16",
853
+ },
854
+ {
855
+ "internalType": "uint16",
856
+ "name": "maintenanceMarginRequirement",
857
+ "type": "uint16",
858
+ },
859
+ {
860
+ "internalType": "uint64",
861
+ "name": "offerPriceBuffer",
862
+ "type": "uint64",
863
+ },
864
+ {
865
+ "internalType": "uint64",
866
+ "name": "auctionBounty",
867
+ "type": "uint64",
868
+ },
869
+ {
870
+ "internalType": "uint32",
871
+ "name": "tradeoutInterval",
872
+ "type": "uint32",
873
+ },
874
+ {"internalType": "uint8", "name": "tickSize", "type": "uint8"},
875
+ {
876
+ "internalType": "string",
877
+ "name": "extendedMetadata",
878
+ "type": "string",
879
+ },
880
+ ],
881
+ "internalType": "struct IProductRegistry.Product",
882
+ "name": "product",
883
+ "type": "tuple",
884
+ }
885
+ ],
886
+ "name": "id",
887
+ "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}],
888
+ "stateMutability": "pure",
889
+ "type": "function",
890
+ },
891
+ {
892
+ "inputs": [
893
+ {"internalType": "bytes32", "name": "productId", "type": "bytes32"}
894
+ ],
895
+ "name": "imr",
896
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
897
+ "stateMutability": "view",
898
+ "type": "function",
899
+ },
900
+ {
901
+ "inputs": [],
902
+ "name": "initialize",
903
+ "outputs": [],
904
+ "stateMutability": "nonpayable",
905
+ "type": "function",
906
+ },
907
+ {
908
+ "inputs": [
909
+ {"internalType": "bytes32", "name": "productId", "type": "bytes32"}
910
+ ],
911
+ "name": "mmr",
912
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
913
+ "stateMutability": "view",
914
+ "type": "function",
915
+ },
916
+ {
917
+ "inputs": [
918
+ {"internalType": "bytes32", "name": "productId", "type": "bytes32"}
919
+ ],
920
+ "name": "offerPriceBuffer",
921
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
922
+ "stateMutability": "view",
923
+ "type": "function",
924
+ },
925
+ {
926
+ "inputs": [
927
+ {"internalType": "bytes32", "name": "productId", "type": "bytes32"}
928
+ ],
929
+ "name": "oracleSpecification",
930
+ "outputs": [
931
+ {
932
+ "components": [
933
+ {
934
+ "internalType": "address",
935
+ "name": "oracleAddress",
936
+ "type": "address",
937
+ },
938
+ {
939
+ "internalType": "uint8",
940
+ "name": "fsvDecimals",
941
+ "type": "uint8",
942
+ },
943
+ {
944
+ "internalType": "int256",
945
+ "name": "fspAlpha",
946
+ "type": "int256",
947
+ },
948
+ {"internalType": "int256", "name": "fspBeta", "type": "int256"},
949
+ {
950
+ "internalType": "bytes",
951
+ "name": "fsvCalldata",
952
+ "type": "bytes",
953
+ },
954
+ ],
955
+ "internalType": "struct IProductRegistry.OracleSpecification",
956
+ "name": "",
957
+ "type": "tuple",
958
+ }
959
+ ],
960
+ "stateMutability": "view",
961
+ "type": "function",
962
+ },
963
+ {
964
+ "inputs": [],
965
+ "name": "owner",
966
+ "outputs": [{"internalType": "address", "name": "", "type": "address"}],
967
+ "stateMutability": "view",
968
+ "type": "function",
969
+ },
970
+ {
971
+ "inputs": [
972
+ {"internalType": "bytes32", "name": "productId", "type": "bytes32"}
973
+ ],
974
+ "name": "pointValue",
975
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
976
+ "stateMutability": "view",
977
+ "type": "function",
978
+ },
979
+ {
980
+ "inputs": [
981
+ {"internalType": "bytes32", "name": "productId", "type": "bytes32"}
982
+ ],
983
+ "name": "products",
984
+ "outputs": [
985
+ {
986
+ "components": [
987
+ {
988
+ "components": [
989
+ {
990
+ "internalType": "address",
991
+ "name": "builder",
992
+ "type": "address",
993
+ },
994
+ {
995
+ "internalType": "string",
996
+ "name": "symbol",
997
+ "type": "string",
998
+ },
999
+ {
1000
+ "internalType": "string",
1001
+ "name": "description",
1002
+ "type": "string",
1003
+ },
1004
+ ],
1005
+ "internalType": "struct IProductRegistry.ProductMetadata",
1006
+ "name": "metadata",
1007
+ "type": "tuple",
1008
+ },
1009
+ {
1010
+ "components": [
1011
+ {
1012
+ "internalType": "address",
1013
+ "name": "oracleAddress",
1014
+ "type": "address",
1015
+ },
1016
+ {
1017
+ "internalType": "uint8",
1018
+ "name": "fsvDecimals",
1019
+ "type": "uint8",
1020
+ },
1021
+ {
1022
+ "internalType": "int256",
1023
+ "name": "fspAlpha",
1024
+ "type": "int256",
1025
+ },
1026
+ {
1027
+ "internalType": "int256",
1028
+ "name": "fspBeta",
1029
+ "type": "int256",
1030
+ },
1031
+ {
1032
+ "internalType": "bytes",
1033
+ "name": "fsvCalldata",
1034
+ "type": "bytes",
1035
+ },
1036
+ ],
1037
+ "internalType": "struct IProductRegistry.OracleSpecification",
1038
+ "name": "oracleSpec",
1039
+ "type": "tuple",
1040
+ },
1041
+ {
1042
+ "internalType": "string",
1043
+ "name": "priceQuotation",
1044
+ "type": "string",
1045
+ },
1046
+ {
1047
+ "internalType": "address",
1048
+ "name": "collateralAsset",
1049
+ "type": "address",
1050
+ },
1051
+ {
1052
+ "internalType": "uint256",
1053
+ "name": "startTime",
1054
+ "type": "uint256",
1055
+ },
1056
+ {
1057
+ "internalType": "uint256",
1058
+ "name": "earliestFSPSubmissionTime",
1059
+ "type": "uint256",
1060
+ },
1061
+ {
1062
+ "internalType": "uint256",
1063
+ "name": "unitValue",
1064
+ "type": "uint256",
1065
+ },
1066
+ {
1067
+ "internalType": "uint16",
1068
+ "name": "initialMarginRequirement",
1069
+ "type": "uint16",
1070
+ },
1071
+ {
1072
+ "internalType": "uint16",
1073
+ "name": "maintenanceMarginRequirement",
1074
+ "type": "uint16",
1075
+ },
1076
+ {
1077
+ "internalType": "uint64",
1078
+ "name": "offerPriceBuffer",
1079
+ "type": "uint64",
1080
+ },
1081
+ {
1082
+ "internalType": "uint64",
1083
+ "name": "auctionBounty",
1084
+ "type": "uint64",
1085
+ },
1086
+ {
1087
+ "internalType": "uint32",
1088
+ "name": "tradeoutInterval",
1089
+ "type": "uint32",
1090
+ },
1091
+ {"internalType": "uint8", "name": "tickSize", "type": "uint8"},
1092
+ {
1093
+ "internalType": "string",
1094
+ "name": "extendedMetadata",
1095
+ "type": "string",
1096
+ },
1097
+ ],
1098
+ "internalType": "struct IProductRegistry.Product",
1099
+ "name": "",
1100
+ "type": "tuple",
1101
+ }
1102
+ ],
1103
+ "stateMutability": "view",
1104
+ "type": "function",
1105
+ },
1106
+ {
1107
+ "inputs": [],
1108
+ "name": "proxiableUUID",
1109
+ "outputs": [{"internalType": "bytes32", "name": "", "type": "bytes32"}],
1110
+ "stateMutability": "view",
1111
+ "type": "function",
1112
+ },
1113
+ {
1114
+ "inputs": [
1115
+ {
1116
+ "components": [
1117
+ {
1118
+ "components": [
1119
+ {
1120
+ "internalType": "address",
1121
+ "name": "builder",
1122
+ "type": "address",
1123
+ },
1124
+ {
1125
+ "internalType": "string",
1126
+ "name": "symbol",
1127
+ "type": "string",
1128
+ },
1129
+ {
1130
+ "internalType": "string",
1131
+ "name": "description",
1132
+ "type": "string",
1133
+ },
1134
+ ],
1135
+ "internalType": "struct IProductRegistry.ProductMetadata",
1136
+ "name": "metadata",
1137
+ "type": "tuple",
1138
+ },
1139
+ {
1140
+ "components": [
1141
+ {
1142
+ "internalType": "address",
1143
+ "name": "oracleAddress",
1144
+ "type": "address",
1145
+ },
1146
+ {
1147
+ "internalType": "uint8",
1148
+ "name": "fsvDecimals",
1149
+ "type": "uint8",
1150
+ },
1151
+ {
1152
+ "internalType": "int256",
1153
+ "name": "fspAlpha",
1154
+ "type": "int256",
1155
+ },
1156
+ {
1157
+ "internalType": "int256",
1158
+ "name": "fspBeta",
1159
+ "type": "int256",
1160
+ },
1161
+ {
1162
+ "internalType": "bytes",
1163
+ "name": "fsvCalldata",
1164
+ "type": "bytes",
1165
+ },
1166
+ ],
1167
+ "internalType": "struct IProductRegistry.OracleSpecification",
1168
+ "name": "oracleSpec",
1169
+ "type": "tuple",
1170
+ },
1171
+ {
1172
+ "internalType": "string",
1173
+ "name": "priceQuotation",
1174
+ "type": "string",
1175
+ },
1176
+ {
1177
+ "internalType": "address",
1178
+ "name": "collateralAsset",
1179
+ "type": "address",
1180
+ },
1181
+ {
1182
+ "internalType": "uint256",
1183
+ "name": "startTime",
1184
+ "type": "uint256",
1185
+ },
1186
+ {
1187
+ "internalType": "uint256",
1188
+ "name": "earliestFSPSubmissionTime",
1189
+ "type": "uint256",
1190
+ },
1191
+ {
1192
+ "internalType": "uint256",
1193
+ "name": "unitValue",
1194
+ "type": "uint256",
1195
+ },
1196
+ {
1197
+ "internalType": "uint16",
1198
+ "name": "initialMarginRequirement",
1199
+ "type": "uint16",
1200
+ },
1201
+ {
1202
+ "internalType": "uint16",
1203
+ "name": "maintenanceMarginRequirement",
1204
+ "type": "uint16",
1205
+ },
1206
+ {
1207
+ "internalType": "uint64",
1208
+ "name": "offerPriceBuffer",
1209
+ "type": "uint64",
1210
+ },
1211
+ {
1212
+ "internalType": "uint64",
1213
+ "name": "auctionBounty",
1214
+ "type": "uint64",
1215
+ },
1216
+ {
1217
+ "internalType": "uint32",
1218
+ "name": "tradeoutInterval",
1219
+ "type": "uint32",
1220
+ },
1221
+ {"internalType": "uint8", "name": "tickSize", "type": "uint8"},
1222
+ {
1223
+ "internalType": "string",
1224
+ "name": "extendedMetadata",
1225
+ "type": "string",
1226
+ },
1227
+ ],
1228
+ "internalType": "struct IProductRegistry.Product",
1229
+ "name": "product",
1230
+ "type": "tuple",
1231
+ }
1232
+ ],
1233
+ "name": "register",
1234
+ "outputs": [],
1235
+ "stateMutability": "nonpayable",
1236
+ "type": "function",
1237
+ },
1238
+ {
1239
+ "inputs": [],
1240
+ "name": "renounceOwnership",
1241
+ "outputs": [],
1242
+ "stateMutability": "nonpayable",
1243
+ "type": "function",
1244
+ },
1245
+ {
1246
+ "inputs": [
1247
+ {
1248
+ "internalType": "contract IClearingSubset",
1249
+ "name": "clearing_",
1250
+ "type": "address",
1251
+ }
1252
+ ],
1253
+ "name": "setClearing",
1254
+ "outputs": [],
1255
+ "stateMutability": "nonpayable",
1256
+ "type": "function",
1257
+ },
1258
+ {
1259
+ "inputs": [
1260
+ {"internalType": "bytes32", "name": "productId", "type": "bytes32"}
1261
+ ],
1262
+ "name": "state",
1263
+ "outputs": [
1264
+ {"internalType": "enum ProductState", "name": "", "type": "uint8"}
1265
+ ],
1266
+ "stateMutability": "view",
1267
+ "type": "function",
1268
+ },
1269
+ {
1270
+ "inputs": [
1271
+ {"internalType": "bytes32", "name": "productId", "type": "bytes32"}
1272
+ ],
1273
+ "name": "tickSize",
1274
+ "outputs": [{"internalType": "uint256", "name": "", "type": "uint256"}],
1275
+ "stateMutability": "view",
1276
+ "type": "function",
1277
+ },
1278
+ {
1279
+ "inputs": [
1280
+ {"internalType": "address", "name": "newOwner", "type": "address"}
1281
+ ],
1282
+ "name": "transferOwnership",
1283
+ "outputs": [],
1284
+ "stateMutability": "nonpayable",
1285
+ "type": "function",
1286
+ },
1287
+ {
1288
+ "inputs": [
1289
+ {
1290
+ "internalType": "address",
1291
+ "name": "newImplementation",
1292
+ "type": "address",
1293
+ },
1294
+ {"internalType": "bytes", "name": "data", "type": "bytes"},
1295
+ ],
1296
+ "name": "upgradeToAndCall",
1297
+ "outputs": [],
1298
+ "stateMutability": "payable",
1299
+ "type": "function",
1300
+ },
1301
+ ],
1302
+ )