afp-sdk 0.5.4__py3-none-any.whl → 0.6.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.
Files changed (49) hide show
  1. afp/__init__.py +4 -1
  2. afp/afp.py +11 -0
  3. afp/api/admin.py +1 -1
  4. afp/api/base.py +11 -2
  5. afp/api/margin_account.py +12 -148
  6. afp/api/product.py +302 -148
  7. afp/api/trading.py +10 -19
  8. afp/auth.py +14 -0
  9. afp/bindings/__init__.py +30 -16
  10. afp/bindings/admin_facet.py +890 -0
  11. afp/bindings/clearing_facet.py +356 -773
  12. afp/bindings/facade.py +9 -6
  13. afp/bindings/final_settlement_facet.py +258 -99
  14. afp/bindings/margin_account.py +524 -839
  15. afp/bindings/margin_account_facet.py +722 -0
  16. afp/bindings/margin_account_registry.py +184 -310
  17. afp/bindings/mark_price_tracker_facet.py +74 -16
  18. afp/bindings/product_registry.py +1577 -541
  19. afp/bindings/product_registry_facet.py +1467 -0
  20. afp/bindings/system_viewer.py +592 -369
  21. afp/bindings/types.py +223 -0
  22. afp/config.py +4 -0
  23. afp/constants.py +49 -6
  24. afp/decorators.py +25 -3
  25. afp/dtos.py +142 -0
  26. afp/exceptions.py +10 -0
  27. afp/exchange.py +10 -8
  28. afp/hashing.py +7 -5
  29. afp/ipfs.py +245 -0
  30. afp/json-schemas/bafyreiaw34o6l3rmatabzbds2i2myazdw2yolevcpsoyd2i2g3ms7wa2eq.json +1 -0
  31. afp/json-schemas/bafyreibnfg6nq74dvpkre5rakkccij7iadp5rxpim7omsatjnrpmj3y7v4.json +1 -0
  32. afp/json-schemas/bafyreicgr6dfo5yduixjkcifghiulskfegwojvuwodtouvivl362zndhxe.json +1 -0
  33. afp/json-schemas/bafyreicheoypx6synljushh7mq2572iyhlolf4nake2p5dwobgnj3r5eua.json +1 -0
  34. afp/json-schemas/bafyreid35a67db4sqh4fs6boddyt2xvscbqy6nqvsp5jjur56qhkw4ixre.json +1 -0
  35. afp/json-schemas/bafyreidzs7okcpqiss6ztftltyptqwnw5e5opsy5yntospekjha4kpykaa.json +1 -0
  36. afp/json-schemas/bafyreifcec2km7hxwq6oqzjlspni2mgipetjb7pqtaewh2efislzoctboi.json +1 -0
  37. afp/json-schemas/bafyreihn3oiaxffe4e2w7pwtreadpw3obfd7gqlogbcxm56jc2hzfvco74.json +1 -0
  38. afp/json-schemas/bafyreihur3dzwhja6uxsbcw6eeoj3xmmc4e3zkmyzpot5v5dleevxe5zam.json +1 -0
  39. afp/schemas.py +227 -177
  40. afp/types.py +169 -0
  41. afp/validators.py +218 -8
  42. {afp_sdk-0.5.4.dist-info → afp_sdk-0.6.0.dist-info}/METADATA +73 -10
  43. afp_sdk-0.6.0.dist-info/RECORD +50 -0
  44. afp/bindings/auctioneer_facet.py +0 -752
  45. afp/bindings/bankruptcy_facet.py +0 -391
  46. afp/bindings/trading_protocol.py +0 -1158
  47. afp_sdk-0.5.4.dist-info/RECORD +0 -37
  48. {afp_sdk-0.5.4.dist-info → afp_sdk-0.6.0.dist-info}/WHEEL +0 -0
  49. {afp_sdk-0.5.4.dist-info → afp_sdk-0.6.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,890 @@
1
+ """AdminFacet contract binding and data structures."""
2
+
3
+ # This module has been generated using pyabigen v0.2.16
4
+
5
+ import typing
6
+
7
+ import eth_typing
8
+ import web3
9
+ from web3 import types
10
+ from web3.contract import contract
11
+
12
+
13
+ from .types import (
14
+ ClearingConfig,
15
+ MarkPriceConfig,
16
+ FinalSettlementConfig,
17
+ ProductConfig,
18
+ Config,
19
+ )
20
+
21
+
22
+ class AdminFacet:
23
+ """AdminFacet contract binding.
24
+
25
+ Parameters
26
+ ----------
27
+ w3 : web3.Web3
28
+ address : eth_typing.ChecksumAddress
29
+ The address of a deployed AdminFacet contract.
30
+ """
31
+
32
+ _contract: contract.Contract
33
+
34
+ def __init__(
35
+ self,
36
+ w3: web3.Web3,
37
+ address: eth_typing.ChecksumAddress,
38
+ ):
39
+ self._contract = w3.eth.contract(
40
+ address=address,
41
+ abi=ABI,
42
+ )
43
+
44
+ @property
45
+ def AddressUpdated(self) -> contract.ContractEvent:
46
+ """Binding for `event AddressUpdated` on the AdminFacet contract."""
47
+ return self._contract.events.AddressUpdated
48
+
49
+ @property
50
+ def ConfigUpdated(self) -> contract.ContractEvent:
51
+ """Binding for `event ConfigUpdated` on the AdminFacet contract."""
52
+ return self._contract.events.ConfigUpdated
53
+
54
+ @property
55
+ def OwnershipTransferred(self) -> contract.ContractEvent:
56
+ """Binding for `event OwnershipTransferred` on the AdminFacet contract."""
57
+ return self._contract.events.OwnershipTransferred
58
+
59
+ def clearing_fee_rate(
60
+ self,
61
+ block_identifier: types.BlockIdentifier = "latest",
62
+ ) -> int:
63
+ """Binding for `clearingFeeRate` on the AdminFacet contract.
64
+
65
+ Parameters
66
+ ----------
67
+ block_identifier : web3.types.BlockIdentifier
68
+ The block identifier, defaults to the latest block.
69
+
70
+ Returns
71
+ -------
72
+ int
73
+ """
74
+ return_value = self._contract.functions.clearingFeeRate().call(
75
+ block_identifier=block_identifier
76
+ )
77
+ return int(return_value)
78
+
79
+ def closeout_fee_rate(
80
+ self,
81
+ block_identifier: types.BlockIdentifier = "latest",
82
+ ) -> int:
83
+ """Binding for `closeoutFeeRate` on the AdminFacet contract.
84
+
85
+ Parameters
86
+ ----------
87
+ block_identifier : web3.types.BlockIdentifier
88
+ The block identifier, defaults to the latest block.
89
+
90
+ Returns
91
+ -------
92
+ int
93
+ """
94
+ return_value = self._contract.functions.closeoutFeeRate().call(
95
+ block_identifier=block_identifier
96
+ )
97
+ return int(return_value)
98
+
99
+ def closeout_reward_rate(
100
+ self,
101
+ block_identifier: types.BlockIdentifier = "latest",
102
+ ) -> int:
103
+ """Binding for `closeoutRewardRate` on the AdminFacet contract.
104
+
105
+ Parameters
106
+ ----------
107
+ block_identifier : web3.types.BlockIdentifier
108
+ The block identifier, defaults to the latest block.
109
+
110
+ Returns
111
+ -------
112
+ int
113
+ """
114
+ return_value = self._contract.functions.closeoutRewardRate().call(
115
+ block_identifier=block_identifier
116
+ )
117
+ return int(return_value)
118
+
119
+ def config(
120
+ self,
121
+ block_identifier: types.BlockIdentifier = "latest",
122
+ ) -> Config:
123
+ """Binding for `config` on the AdminFacet contract.
124
+
125
+ Parameters
126
+ ----------
127
+ block_identifier : web3.types.BlockIdentifier
128
+ The block identifier, defaults to the latest block.
129
+
130
+ Returns
131
+ -------
132
+ Config
133
+ """
134
+ return_value = self._contract.functions.config().call(
135
+ block_identifier=block_identifier
136
+ )
137
+ return Config(
138
+ ClearingConfig(int(return_value[0][0]), int(return_value[0][1])),
139
+ MarkPriceConfig(int(return_value[1][0])),
140
+ FinalSettlementConfig(int(return_value[2][0]), int(return_value[2][1])),
141
+ ProductConfig(
142
+ int(return_value[3][0]),
143
+ int(return_value[3][1]),
144
+ int(return_value[3][2]),
145
+ ),
146
+ )
147
+
148
+ def get_margin_account_registry(
149
+ self,
150
+ block_identifier: types.BlockIdentifier = "latest",
151
+ ) -> eth_typing.ChecksumAddress:
152
+ """Binding for `getMarginAccountRegistry` on the AdminFacet contract.
153
+
154
+ Parameters
155
+ ----------
156
+ block_identifier : web3.types.BlockIdentifier
157
+ The block identifier, defaults to the latest block.
158
+
159
+ Returns
160
+ -------
161
+ eth_typing.ChecksumAddress
162
+ """
163
+ return_value = self._contract.functions.getMarginAccountRegistry().call(
164
+ block_identifier=block_identifier
165
+ )
166
+ return eth_typing.ChecksumAddress(return_value)
167
+
168
+ def get_mark_price_interval(
169
+ self,
170
+ block_identifier: types.BlockIdentifier = "latest",
171
+ ) -> int:
172
+ """Binding for `getMarkPriceInterval` on the AdminFacet contract.
173
+
174
+ Parameters
175
+ ----------
176
+ block_identifier : web3.types.BlockIdentifier
177
+ The block identifier, defaults to the latest block.
178
+
179
+ Returns
180
+ -------
181
+ int
182
+ """
183
+ return_value = self._contract.functions.getMarkPriceInterval().call(
184
+ block_identifier=block_identifier
185
+ )
186
+ return int(return_value)
187
+
188
+ def get_product_registry(
189
+ self,
190
+ block_identifier: types.BlockIdentifier = "latest",
191
+ ) -> eth_typing.ChecksumAddress:
192
+ """Binding for `getProductRegistry` on the AdminFacet contract.
193
+
194
+ Parameters
195
+ ----------
196
+ block_identifier : web3.types.BlockIdentifier
197
+ The block identifier, defaults to the latest block.
198
+
199
+ Returns
200
+ -------
201
+ eth_typing.ChecksumAddress
202
+ """
203
+ return_value = self._contract.functions.getProductRegistry().call(
204
+ block_identifier=block_identifier
205
+ )
206
+ return eth_typing.ChecksumAddress(return_value)
207
+
208
+ def get_treasury(
209
+ self,
210
+ block_identifier: types.BlockIdentifier = "latest",
211
+ ) -> eth_typing.ChecksumAddress:
212
+ """Binding for `getTreasury` on the AdminFacet contract.
213
+
214
+ Parameters
215
+ ----------
216
+ block_identifier : web3.types.BlockIdentifier
217
+ The block identifier, defaults to the latest block.
218
+
219
+ Returns
220
+ -------
221
+ eth_typing.ChecksumAddress
222
+ """
223
+ return_value = self._contract.functions.getTreasury().call(
224
+ block_identifier=block_identifier
225
+ )
226
+ return eth_typing.ChecksumAddress(return_value)
227
+
228
+ def initialize(
229
+ self,
230
+ treasury: eth_typing.ChecksumAddress,
231
+ product_registry: eth_typing.ChecksumAddress,
232
+ margin_account_registry: eth_typing.ChecksumAddress,
233
+ ) -> contract.ContractFunction:
234
+ """Binding for `initialize` on the AdminFacet contract.
235
+
236
+ Parameters
237
+ ----------
238
+ treasury : eth_typing.ChecksumAddress
239
+ product_registry : eth_typing.ChecksumAddress
240
+ margin_account_registry : eth_typing.ChecksumAddress
241
+
242
+ Returns
243
+ -------
244
+ web3.contract.contract.ContractFunction
245
+ A contract function instance to be sent in a transaction.
246
+ """
247
+ return self._contract.functions.initialize(
248
+ treasury,
249
+ product_registry,
250
+ margin_account_registry,
251
+ )
252
+
253
+ def max_trading_fee_rate(
254
+ self,
255
+ block_identifier: types.BlockIdentifier = "latest",
256
+ ) -> int:
257
+ """Binding for `maxTradingFeeRate` on the AdminFacet contract.
258
+
259
+ Parameters
260
+ ----------
261
+ block_identifier : web3.types.BlockIdentifier
262
+ The block identifier, defaults to the latest block.
263
+
264
+ Returns
265
+ -------
266
+ int
267
+ """
268
+ return_value = self._contract.functions.maxTradingFeeRate().call(
269
+ block_identifier=block_identifier
270
+ )
271
+ return int(return_value)
272
+
273
+ def owner(
274
+ self,
275
+ block_identifier: types.BlockIdentifier = "latest",
276
+ ) -> eth_typing.ChecksumAddress:
277
+ """Binding for `owner` on the AdminFacet contract.
278
+
279
+ Parameters
280
+ ----------
281
+ block_identifier : web3.types.BlockIdentifier
282
+ The block identifier, defaults to the latest block.
283
+
284
+ Returns
285
+ -------
286
+ eth_typing.ChecksumAddress
287
+ """
288
+ return_value = self._contract.functions.owner().call(
289
+ block_identifier=block_identifier
290
+ )
291
+ return eth_typing.ChecksumAddress(return_value)
292
+
293
+ def set_config(
294
+ self,
295
+ config_: Config,
296
+ ) -> contract.ContractFunction:
297
+ """Binding for `setConfig` on the AdminFacet contract.
298
+
299
+ Parameters
300
+ ----------
301
+ config_ : Config
302
+
303
+ Returns
304
+ -------
305
+ web3.contract.contract.ContractFunction
306
+ A contract function instance to be sent in a transaction.
307
+ """
308
+ return self._contract.functions.setConfig(
309
+ (
310
+ (
311
+ config_.clearing_config.clearing_fee_rate,
312
+ config_.clearing_config.max_trading_fee_rate,
313
+ ),
314
+ (config_.mark_price_config.mark_price_interval),
315
+ (
316
+ config_.final_settlement_config.closeout_fee_rate,
317
+ config_.final_settlement_config.closeout_reward_rate,
318
+ ),
319
+ (
320
+ config_.product_config.clearing_payout_ratio,
321
+ config_.product_config.maintenance_deposit_interval,
322
+ config_.product_config.min_product_maintenance_fee,
323
+ ),
324
+ ),
325
+ )
326
+
327
+ def set_margin_account_registry(
328
+ self,
329
+ margin_account_registry: eth_typing.ChecksumAddress,
330
+ ) -> contract.ContractFunction:
331
+ """Binding for `setMarginAccountRegistry` on the AdminFacet contract.
332
+
333
+ Parameters
334
+ ----------
335
+ margin_account_registry : eth_typing.ChecksumAddress
336
+
337
+ Returns
338
+ -------
339
+ web3.contract.contract.ContractFunction
340
+ A contract function instance to be sent in a transaction.
341
+ """
342
+ return self._contract.functions.setMarginAccountRegistry(
343
+ margin_account_registry,
344
+ )
345
+
346
+ def set_treasury(
347
+ self,
348
+ treasury: eth_typing.ChecksumAddress,
349
+ ) -> contract.ContractFunction:
350
+ """Binding for `setTreasury` on the AdminFacet contract.
351
+
352
+ Parameters
353
+ ----------
354
+ treasury : eth_typing.ChecksumAddress
355
+
356
+ Returns
357
+ -------
358
+ web3.contract.contract.ContractFunction
359
+ A contract function instance to be sent in a transaction.
360
+ """
361
+ return self._contract.functions.setTreasury(
362
+ treasury,
363
+ )
364
+
365
+ def transfer_ownership(
366
+ self,
367
+ new_owner: eth_typing.ChecksumAddress,
368
+ ) -> contract.ContractFunction:
369
+ """Binding for `transferOwnership` on the AdminFacet contract.
370
+
371
+ Parameters
372
+ ----------
373
+ new_owner : eth_typing.ChecksumAddress
374
+
375
+ Returns
376
+ -------
377
+ web3.contract.contract.ContractFunction
378
+ A contract function instance to be sent in a transaction.
379
+ """
380
+ return self._contract.functions.transferOwnership(
381
+ new_owner,
382
+ )
383
+
384
+
385
+ ABI = typing.cast(
386
+ eth_typing.ABI,
387
+ [
388
+ {
389
+ "type": "function",
390
+ "name": "clearingFeeRate",
391
+ "inputs": [],
392
+ "outputs": [{"name": "", "type": "uint32", "internalType": "uint32"}],
393
+ "stateMutability": "view",
394
+ },
395
+ {
396
+ "type": "function",
397
+ "name": "closeoutFeeRate",
398
+ "inputs": [],
399
+ "outputs": [{"name": "", "type": "uint256", "internalType": "uint256"}],
400
+ "stateMutability": "view",
401
+ },
402
+ {
403
+ "type": "function",
404
+ "name": "closeoutRewardRate",
405
+ "inputs": [],
406
+ "outputs": [{"name": "", "type": "uint256", "internalType": "uint256"}],
407
+ "stateMutability": "view",
408
+ },
409
+ {
410
+ "type": "function",
411
+ "name": "config",
412
+ "inputs": [],
413
+ "outputs": [
414
+ {
415
+ "name": "",
416
+ "type": "tuple",
417
+ "internalType": "struct Config",
418
+ "components": [
419
+ {
420
+ "name": "clearingConfig",
421
+ "type": "tuple",
422
+ "internalType": "struct ClearingConfig",
423
+ "components": [
424
+ {
425
+ "name": "clearingFeeRate",
426
+ "type": "uint32",
427
+ "internalType": "uint32",
428
+ },
429
+ {
430
+ "name": "maxTradingFeeRate",
431
+ "type": "uint32",
432
+ "internalType": "uint32",
433
+ },
434
+ ],
435
+ },
436
+ {
437
+ "name": "markPriceConfig",
438
+ "type": "tuple",
439
+ "internalType": "struct MarkPriceConfig",
440
+ "components": [
441
+ {
442
+ "name": "markPriceInterval",
443
+ "type": "uint256",
444
+ "internalType": "uint256",
445
+ }
446
+ ],
447
+ },
448
+ {
449
+ "name": "finalSettlementConfig",
450
+ "type": "tuple",
451
+ "internalType": "struct FinalSettlementConfig",
452
+ "components": [
453
+ {
454
+ "name": "closeoutFeeRate",
455
+ "type": "uint256",
456
+ "internalType": "uint256",
457
+ },
458
+ {
459
+ "name": "closeoutRewardRate",
460
+ "type": "uint256",
461
+ "internalType": "uint256",
462
+ },
463
+ ],
464
+ },
465
+ {
466
+ "name": "productConfig",
467
+ "type": "tuple",
468
+ "internalType": "struct ProductConfig",
469
+ "components": [
470
+ {
471
+ "name": "clearingPayoutRatio",
472
+ "type": "uint32",
473
+ "internalType": "uint32",
474
+ },
475
+ {
476
+ "name": "maintenanceDepositInterval",
477
+ "type": "uint32",
478
+ "internalType": "uint32",
479
+ },
480
+ {
481
+ "name": "minProductMaintenanceFee",
482
+ "type": "uint64",
483
+ "internalType": "uint64",
484
+ },
485
+ ],
486
+ },
487
+ ],
488
+ }
489
+ ],
490
+ "stateMutability": "view",
491
+ },
492
+ {
493
+ "type": "function",
494
+ "name": "getMarginAccountRegistry",
495
+ "inputs": [],
496
+ "outputs": [
497
+ {
498
+ "name": "",
499
+ "type": "address",
500
+ "internalType": "contract IMarginAccountRegistry",
501
+ }
502
+ ],
503
+ "stateMutability": "view",
504
+ },
505
+ {
506
+ "type": "function",
507
+ "name": "getMarkPriceInterval",
508
+ "inputs": [],
509
+ "outputs": [{"name": "", "type": "uint256", "internalType": "uint256"}],
510
+ "stateMutability": "view",
511
+ },
512
+ {
513
+ "type": "function",
514
+ "name": "getProductRegistry",
515
+ "inputs": [],
516
+ "outputs": [
517
+ {
518
+ "name": "",
519
+ "type": "address",
520
+ "internalType": "contract IProductRegistry",
521
+ }
522
+ ],
523
+ "stateMutability": "view",
524
+ },
525
+ {
526
+ "type": "function",
527
+ "name": "getTreasury",
528
+ "inputs": [],
529
+ "outputs": [{"name": "", "type": "address", "internalType": "address"}],
530
+ "stateMutability": "view",
531
+ },
532
+ {
533
+ "type": "function",
534
+ "name": "initialize",
535
+ "inputs": [
536
+ {"name": "treasury", "type": "address", "internalType": "address"},
537
+ {
538
+ "name": "productRegistry",
539
+ "type": "address",
540
+ "internalType": "address",
541
+ },
542
+ {
543
+ "name": "marginAccountRegistry",
544
+ "type": "address",
545
+ "internalType": "address",
546
+ },
547
+ ],
548
+ "outputs": [],
549
+ "stateMutability": "nonpayable",
550
+ },
551
+ {
552
+ "type": "function",
553
+ "name": "maxTradingFeeRate",
554
+ "inputs": [],
555
+ "outputs": [{"name": "", "type": "uint256", "internalType": "uint256"}],
556
+ "stateMutability": "view",
557
+ },
558
+ {
559
+ "type": "function",
560
+ "name": "owner",
561
+ "inputs": [],
562
+ "outputs": [{"name": "", "type": "address", "internalType": "address"}],
563
+ "stateMutability": "view",
564
+ },
565
+ {
566
+ "type": "function",
567
+ "name": "setConfig",
568
+ "inputs": [
569
+ {
570
+ "name": "config_",
571
+ "type": "tuple",
572
+ "internalType": "struct Config",
573
+ "components": [
574
+ {
575
+ "name": "clearingConfig",
576
+ "type": "tuple",
577
+ "internalType": "struct ClearingConfig",
578
+ "components": [
579
+ {
580
+ "name": "clearingFeeRate",
581
+ "type": "uint32",
582
+ "internalType": "uint32",
583
+ },
584
+ {
585
+ "name": "maxTradingFeeRate",
586
+ "type": "uint32",
587
+ "internalType": "uint32",
588
+ },
589
+ ],
590
+ },
591
+ {
592
+ "name": "markPriceConfig",
593
+ "type": "tuple",
594
+ "internalType": "struct MarkPriceConfig",
595
+ "components": [
596
+ {
597
+ "name": "markPriceInterval",
598
+ "type": "uint256",
599
+ "internalType": "uint256",
600
+ }
601
+ ],
602
+ },
603
+ {
604
+ "name": "finalSettlementConfig",
605
+ "type": "tuple",
606
+ "internalType": "struct FinalSettlementConfig",
607
+ "components": [
608
+ {
609
+ "name": "closeoutFeeRate",
610
+ "type": "uint256",
611
+ "internalType": "uint256",
612
+ },
613
+ {
614
+ "name": "closeoutRewardRate",
615
+ "type": "uint256",
616
+ "internalType": "uint256",
617
+ },
618
+ ],
619
+ },
620
+ {
621
+ "name": "productConfig",
622
+ "type": "tuple",
623
+ "internalType": "struct ProductConfig",
624
+ "components": [
625
+ {
626
+ "name": "clearingPayoutRatio",
627
+ "type": "uint32",
628
+ "internalType": "uint32",
629
+ },
630
+ {
631
+ "name": "maintenanceDepositInterval",
632
+ "type": "uint32",
633
+ "internalType": "uint32",
634
+ },
635
+ {
636
+ "name": "minProductMaintenanceFee",
637
+ "type": "uint64",
638
+ "internalType": "uint64",
639
+ },
640
+ ],
641
+ },
642
+ ],
643
+ }
644
+ ],
645
+ "outputs": [],
646
+ "stateMutability": "nonpayable",
647
+ },
648
+ {
649
+ "type": "function",
650
+ "name": "setMarginAccountRegistry",
651
+ "inputs": [
652
+ {
653
+ "name": "marginAccountRegistry",
654
+ "type": "address",
655
+ "internalType": "address",
656
+ }
657
+ ],
658
+ "outputs": [],
659
+ "stateMutability": "nonpayable",
660
+ },
661
+ {
662
+ "type": "function",
663
+ "name": "setTreasury",
664
+ "inputs": [
665
+ {"name": "treasury", "type": "address", "internalType": "address"}
666
+ ],
667
+ "outputs": [],
668
+ "stateMutability": "nonpayable",
669
+ },
670
+ {
671
+ "type": "function",
672
+ "name": "transferOwnership",
673
+ "inputs": [
674
+ {"name": "newOwner", "type": "address", "internalType": "address"}
675
+ ],
676
+ "outputs": [],
677
+ "stateMutability": "nonpayable",
678
+ },
679
+ {
680
+ "type": "event",
681
+ "name": "AddressUpdated",
682
+ "inputs": [
683
+ {
684
+ "name": "name",
685
+ "type": "string",
686
+ "indexed": False,
687
+ "internalType": "string",
688
+ },
689
+ {
690
+ "name": "oldAddress",
691
+ "type": "address",
692
+ "indexed": False,
693
+ "internalType": "address",
694
+ },
695
+ {
696
+ "name": "newAddress",
697
+ "type": "address",
698
+ "indexed": False,
699
+ "internalType": "address",
700
+ },
701
+ ],
702
+ "anonymous": False,
703
+ },
704
+ {
705
+ "type": "event",
706
+ "name": "ConfigUpdated",
707
+ "inputs": [
708
+ {
709
+ "name": "oldConfig",
710
+ "type": "tuple",
711
+ "indexed": False,
712
+ "internalType": "struct Config",
713
+ "components": [
714
+ {
715
+ "name": "clearingConfig",
716
+ "type": "tuple",
717
+ "internalType": "struct ClearingConfig",
718
+ "components": [
719
+ {
720
+ "name": "clearingFeeRate",
721
+ "type": "uint32",
722
+ "internalType": "uint32",
723
+ },
724
+ {
725
+ "name": "maxTradingFeeRate",
726
+ "type": "uint32",
727
+ "internalType": "uint32",
728
+ },
729
+ ],
730
+ },
731
+ {
732
+ "name": "markPriceConfig",
733
+ "type": "tuple",
734
+ "internalType": "struct MarkPriceConfig",
735
+ "components": [
736
+ {
737
+ "name": "markPriceInterval",
738
+ "type": "uint256",
739
+ "internalType": "uint256",
740
+ }
741
+ ],
742
+ },
743
+ {
744
+ "name": "finalSettlementConfig",
745
+ "type": "tuple",
746
+ "internalType": "struct FinalSettlementConfig",
747
+ "components": [
748
+ {
749
+ "name": "closeoutFeeRate",
750
+ "type": "uint256",
751
+ "internalType": "uint256",
752
+ },
753
+ {
754
+ "name": "closeoutRewardRate",
755
+ "type": "uint256",
756
+ "internalType": "uint256",
757
+ },
758
+ ],
759
+ },
760
+ {
761
+ "name": "productConfig",
762
+ "type": "tuple",
763
+ "internalType": "struct ProductConfig",
764
+ "components": [
765
+ {
766
+ "name": "clearingPayoutRatio",
767
+ "type": "uint32",
768
+ "internalType": "uint32",
769
+ },
770
+ {
771
+ "name": "maintenanceDepositInterval",
772
+ "type": "uint32",
773
+ "internalType": "uint32",
774
+ },
775
+ {
776
+ "name": "minProductMaintenanceFee",
777
+ "type": "uint64",
778
+ "internalType": "uint64",
779
+ },
780
+ ],
781
+ },
782
+ ],
783
+ },
784
+ {
785
+ "name": "newConfig",
786
+ "type": "tuple",
787
+ "indexed": False,
788
+ "internalType": "struct Config",
789
+ "components": [
790
+ {
791
+ "name": "clearingConfig",
792
+ "type": "tuple",
793
+ "internalType": "struct ClearingConfig",
794
+ "components": [
795
+ {
796
+ "name": "clearingFeeRate",
797
+ "type": "uint32",
798
+ "internalType": "uint32",
799
+ },
800
+ {
801
+ "name": "maxTradingFeeRate",
802
+ "type": "uint32",
803
+ "internalType": "uint32",
804
+ },
805
+ ],
806
+ },
807
+ {
808
+ "name": "markPriceConfig",
809
+ "type": "tuple",
810
+ "internalType": "struct MarkPriceConfig",
811
+ "components": [
812
+ {
813
+ "name": "markPriceInterval",
814
+ "type": "uint256",
815
+ "internalType": "uint256",
816
+ }
817
+ ],
818
+ },
819
+ {
820
+ "name": "finalSettlementConfig",
821
+ "type": "tuple",
822
+ "internalType": "struct FinalSettlementConfig",
823
+ "components": [
824
+ {
825
+ "name": "closeoutFeeRate",
826
+ "type": "uint256",
827
+ "internalType": "uint256",
828
+ },
829
+ {
830
+ "name": "closeoutRewardRate",
831
+ "type": "uint256",
832
+ "internalType": "uint256",
833
+ },
834
+ ],
835
+ },
836
+ {
837
+ "name": "productConfig",
838
+ "type": "tuple",
839
+ "internalType": "struct ProductConfig",
840
+ "components": [
841
+ {
842
+ "name": "clearingPayoutRatio",
843
+ "type": "uint32",
844
+ "internalType": "uint32",
845
+ },
846
+ {
847
+ "name": "maintenanceDepositInterval",
848
+ "type": "uint32",
849
+ "internalType": "uint32",
850
+ },
851
+ {
852
+ "name": "minProductMaintenanceFee",
853
+ "type": "uint64",
854
+ "internalType": "uint64",
855
+ },
856
+ ],
857
+ },
858
+ ],
859
+ },
860
+ ],
861
+ "anonymous": False,
862
+ },
863
+ {
864
+ "type": "event",
865
+ "name": "OwnershipTransferred",
866
+ "inputs": [
867
+ {
868
+ "name": "previousOwner",
869
+ "type": "address",
870
+ "indexed": True,
871
+ "internalType": "address",
872
+ },
873
+ {
874
+ "name": "newOwner",
875
+ "type": "address",
876
+ "indexed": True,
877
+ "internalType": "address",
878
+ },
879
+ ],
880
+ "anonymous": False,
881
+ },
882
+ {
883
+ "type": "error",
884
+ "name": "InvalidParameter",
885
+ "inputs": [
886
+ {"name": "paramName", "type": "string", "internalType": "string"}
887
+ ],
888
+ },
889
+ ],
890
+ )