@etherisc/gif-next 0.0.2-80a82e6 → 0.0.2-836a512-798

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 (170) hide show
  1. package/README.md +25 -0
  2. package/artifacts/contracts/components/Component.sol/Component.dbg.json +1 -1
  3. package/artifacts/contracts/components/Component.sol/Component.json +28 -2
  4. package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +1 -1
  5. package/artifacts/contracts/components/Component.sol/InstanceLinked.json +2 -2
  6. package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +1 -1
  7. package/artifacts/contracts/components/IPool.sol/IPoolComponent.json +78 -2
  8. package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +1 -1
  9. package/artifacts/contracts/components/IProduct.sol/IProductComponent.json +32 -150
  10. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  11. package/artifacts/contracts/components/Pool.sol/Pool.json +121 -6
  12. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  13. package/artifacts/contracts/components/Product.sol/Product.json +121 -6
  14. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
  15. package/artifacts/contracts/experiment/errors/Require.sol/Require.json +2 -2
  16. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
  17. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +2 -2
  18. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  19. package/artifacts/contracts/experiment/inheritance/A.sol/A.json +2 -2
  20. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  21. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +2 -2
  22. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
  23. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
  24. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
  25. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
  26. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
  27. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
  28. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +4 -0
  29. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +59 -0
  30. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +4 -0
  31. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.json +124 -0
  32. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +4 -0
  33. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +74 -0
  34. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +4 -0
  35. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +124 -0
  36. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +4 -0
  37. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +207 -0
  38. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  39. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +2 -2
  40. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  41. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +2 -2
  42. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  43. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +518 -47
  44. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  45. package/artifacts/contracts/instance/Instance.sol/Instance.json +584 -66
  46. package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +1 -1
  47. package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +1 -1
  48. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +1 -1
  49. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +1 -1
  50. package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +1 -1
  51. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +1 -1
  52. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.json +14 -23
  53. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +1 -1
  54. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +8 -8
  55. package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +1 -1
  56. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +1 -1
  57. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.json +28 -2
  58. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +1 -1
  59. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.json +12 -21
  60. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +1 -1
  61. package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +1 -1
  62. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +4 -0
  63. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.json +134 -0
  64. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +4 -0
  65. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycleModule.json +182 -0
  66. package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +4 -0
  67. package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.json +221 -0
  68. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +1 -1
  69. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +1 -1
  70. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.json +26 -3
  71. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +1 -1
  72. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.json +26 -3
  73. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +1 -1
  74. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +1 -1
  75. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.json +15 -35
  76. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +1 -1
  77. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.json +22 -29
  78. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +1 -1
  79. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +1 -1
  80. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.json +13 -0
  81. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +1 -1
  82. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +1 -1
  83. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +41 -12
  84. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasury.dbg.json +4 -0
  85. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasury.json +10 -0
  86. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasuryModule.dbg.json +4 -0
  87. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasuryModule.json +355 -0
  88. package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.dbg.json +4 -0
  89. package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.json +45 -0
  90. package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +4 -0
  91. package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.json +355 -0
  92. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  93. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +2 -2
  94. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
  95. package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +1 -1
  96. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +1 -1
  97. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.json +2 -2
  98. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  99. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +4 -95
  100. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +1 -1
  101. package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +1 -1
  102. package/artifacts/contracts/registry/Registry.sol/Registerable.json +2 -2
  103. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  104. package/artifacts/contracts/registry/Registry.sol/Registry.json +14 -105
  105. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +1 -1
  106. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +2 -2
  107. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +4 -0
  108. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +174 -0
  109. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  110. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +2 -2
  111. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  112. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +2 -2
  113. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +4 -0
  114. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +92 -0
  115. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +4 -0
  116. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +92 -0
  117. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +4 -0
  118. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +174 -0
  119. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +4 -0
  120. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +453 -0
  121. package/contracts/components/Component.sol +35 -20
  122. package/contracts/components/IPool.sol +5 -3
  123. package/contracts/components/IProduct.sol +6 -7
  124. package/contracts/components/Pool.sol +28 -12
  125. package/contracts/components/Product.sol +37 -22
  126. package/contracts/experiment/errors/Require.sol +10 -5
  127. package/contracts/experiment/errors/Revert.sol +13 -8
  128. package/contracts/experiment/inheritance/A.sol +8 -11
  129. package/contracts/experiment/inheritance/B.sol +10 -5
  130. package/contracts/experiment/inheritance/C.sol +11 -5
  131. package/contracts/experiment/inheritance/IA.sol +2 -7
  132. package/contracts/experiment/inheritance/IB.sol +3 -2
  133. package/contracts/experiment/inheritance/IC.sol +4 -3
  134. package/contracts/experiment/statemachine/Dummy.sol +33 -0
  135. package/contracts/experiment/statemachine/ISM.sol +20 -0
  136. package/contracts/experiment/statemachine/README.md +112 -0
  137. package/contracts/experiment/statemachine/SM.sol +54 -0
  138. package/contracts/experiment/statemachine/SimpleStateMachine.sol +24 -0
  139. package/contracts/experiment/types/TypeA.sol +14 -9
  140. package/contracts/experiment/types/TypeB.sol +14 -9
  141. package/contracts/instance/IInstance.sol +6 -4
  142. package/contracts/instance/Instance.sol +17 -12
  143. package/contracts/instance/access/Access.sol +63 -116
  144. package/contracts/instance/access/IAccess.sol +28 -48
  145. package/contracts/instance/component/ComponentModule.sol +117 -111
  146. package/contracts/instance/component/IComponent.sol +36 -55
  147. package/contracts/instance/lifecycle/ILifecycle.sol +32 -0
  148. package/contracts/instance/lifecycle/LifecycleModule.sol +91 -0
  149. package/contracts/instance/policy/IPolicy.sol +16 -30
  150. package/contracts/instance/policy/PolicyModule.sol +35 -35
  151. package/contracts/instance/pool/IPoolModule.sol +6 -25
  152. package/contracts/instance/pool/PoolModule.sol +34 -38
  153. package/contracts/instance/product/IProductService.sol +6 -16
  154. package/contracts/instance/product/ProductService.sol +51 -41
  155. package/contracts/instance/treasury/ITreasury.sol +73 -0
  156. package/contracts/instance/treasury/TokenHandler.sol +27 -0
  157. package/contracts/instance/treasury/TreasuryModule.sol +131 -0
  158. package/contracts/registry/ChainNft.sol +23 -61
  159. package/contracts/registry/IChainNft.sol +10 -7
  160. package/contracts/registry/IRegistry.sol +36 -37
  161. package/contracts/registry/Registry.sol +50 -55
  162. package/contracts/types/Blocknumber.sol +118 -0
  163. package/contracts/types/ChainId.sol +24 -10
  164. package/contracts/types/Fee.sol +30 -0
  165. package/contracts/types/NftId.sol +31 -12
  166. package/contracts/types/ObjectType.sol +50 -0
  167. package/contracts/types/StateId.sol +46 -0
  168. package/contracts/types/Timestamp.sol +102 -0
  169. package/contracts/types/UFixed.sol +206 -0
  170. package/package.json +10 -4
@@ -3,6 +3,104 @@
3
3
  "contractName": "IInstance",
4
4
  "sourceName": "contracts/instance/IInstance.sol",
5
5
  "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "NftId",
10
+ "name": "nftId",
11
+ "type": "uint96"
12
+ },
13
+ {
14
+ "internalType": "ObjectType",
15
+ "name": "objectType",
16
+ "type": "uint8"
17
+ },
18
+ {
19
+ "internalType": "StateId",
20
+ "name": "fromStateId",
21
+ "type": "uint8"
22
+ },
23
+ {
24
+ "internalType": "StateId",
25
+ "name": "toStateId",
26
+ "type": "uint8"
27
+ }
28
+ ],
29
+ "name": "ErrorInvalidStateTransition",
30
+ "type": "error"
31
+ },
32
+ {
33
+ "inputs": [
34
+ {
35
+ "internalType": "NftId",
36
+ "name": "nftId",
37
+ "type": "uint96"
38
+ },
39
+ {
40
+ "internalType": "ObjectType",
41
+ "name": "objectType",
42
+ "type": "uint8"
43
+ }
44
+ ],
45
+ "name": "ErrorNoLifecycle",
46
+ "type": "error"
47
+ },
48
+ {
49
+ "anonymous": false,
50
+ "inputs": [
51
+ {
52
+ "indexed": false,
53
+ "internalType": "NftId",
54
+ "name": "nftId",
55
+ "type": "uint96"
56
+ },
57
+ {
58
+ "indexed": false,
59
+ "internalType": "StateId",
60
+ "name": "fromStateId",
61
+ "type": "uint8"
62
+ },
63
+ {
64
+ "indexed": false,
65
+ "internalType": "StateId",
66
+ "name": "toStateId",
67
+ "type": "uint8"
68
+ }
69
+ ],
70
+ "name": "LogBundleStateChanged",
71
+ "type": "event"
72
+ },
73
+ {
74
+ "anonymous": false,
75
+ "inputs": [
76
+ {
77
+ "indexed": false,
78
+ "internalType": "NftId",
79
+ "name": "nftId",
80
+ "type": "uint96"
81
+ },
82
+ {
83
+ "indexed": false,
84
+ "internalType": "ObjectType",
85
+ "name": "objectType",
86
+ "type": "uint8"
87
+ },
88
+ {
89
+ "indexed": false,
90
+ "internalType": "StateId",
91
+ "name": "fromStateId",
92
+ "type": "uint8"
93
+ },
94
+ {
95
+ "indexed": false,
96
+ "internalType": "StateId",
97
+ "name": "toStateId",
98
+ "type": "uint8"
99
+ }
100
+ ],
101
+ "name": "LogComponentStateChanged",
102
+ "type": "event"
103
+ },
6
104
  {
7
105
  "anonymous": false,
8
106
  "inputs": [
@@ -28,6 +126,31 @@
28
126
  "name": "LogDebug",
29
127
  "type": "event"
30
128
  },
129
+ {
130
+ "anonymous": false,
131
+ "inputs": [
132
+ {
133
+ "indexed": false,
134
+ "internalType": "NftId",
135
+ "name": "nftId",
136
+ "type": "uint96"
137
+ },
138
+ {
139
+ "indexed": false,
140
+ "internalType": "StateId",
141
+ "name": "fromStateId",
142
+ "type": "uint8"
143
+ },
144
+ {
145
+ "indexed": false,
146
+ "internalType": "StateId",
147
+ "name": "toStateId",
148
+ "type": "uint8"
149
+ }
150
+ ],
151
+ "name": "LogPolicyStateChanged",
152
+ "type": "event"
153
+ },
31
154
  {
32
155
  "inputs": [],
33
156
  "name": "ORACLE_OWNER_ROLE",
@@ -108,9 +231,9 @@
108
231
  "type": "uint96"
109
232
  },
110
233
  {
111
- "internalType": "uint256",
234
+ "internalType": "ObjectType",
112
235
  "name": "objectType",
113
- "type": "uint256"
236
+ "type": "uint8"
114
237
  },
115
238
  {
116
239
  "internalType": "address",
@@ -164,29 +287,6 @@
164
287
  "stateMutability": "nonpayable",
165
288
  "type": "function"
166
289
  },
167
- {
168
- "inputs": [
169
- {
170
- "internalType": "NftId",
171
- "name": "nftId",
172
- "type": "uint96"
173
- },
174
- {
175
- "internalType": "address",
176
- "name": "wallet",
177
- "type": "address"
178
- },
179
- {
180
- "internalType": "address",
181
- "name": "token",
182
- "type": "address"
183
- }
184
- ],
185
- "name": "createPoolInfo",
186
- "outputs": [],
187
- "stateMutability": "nonpayable",
188
- "type": "function"
189
- },
190
290
  {
191
291
  "inputs": [
192
292
  {
@@ -307,9 +407,14 @@
307
407
  "type": "uint96"
308
408
  },
309
409
  {
310
- "internalType": "enum IComponent.CState",
410
+ "internalType": "StateId",
311
411
  "name": "state",
312
412
  "type": "uint8"
413
+ },
414
+ {
415
+ "internalType": "contract IERC20",
416
+ "name": "token",
417
+ "type": "address"
313
418
  }
314
419
  ],
315
420
  "internalType": "struct IComponent.ComponentInfo",
@@ -378,6 +483,25 @@
378
483
  "stateMutability": "view",
379
484
  "type": "function"
380
485
  },
486
+ {
487
+ "inputs": [
488
+ {
489
+ "internalType": "ObjectType",
490
+ "name": "objectType",
491
+ "type": "uint8"
492
+ }
493
+ ],
494
+ "name": "getInitialState",
495
+ "outputs": [
496
+ {
497
+ "internalType": "StateId",
498
+ "name": "",
499
+ "type": "uint8"
500
+ }
501
+ ],
502
+ "stateMutability": "view",
503
+ "type": "function"
504
+ },
381
505
  {
382
506
  "inputs": [],
383
507
  "name": "getNftId",
@@ -435,7 +559,7 @@
435
559
  "type": "uint96"
436
560
  },
437
561
  {
438
- "internalType": "enum IPolicy.PolicyState",
562
+ "internalType": "StateId",
439
563
  "name": "state",
440
564
  "type": "uint8"
441
565
  },
@@ -449,6 +573,11 @@
449
573
  "name": "premiumAmount",
450
574
  "type": "uint256"
451
575
  },
576
+ {
577
+ "internalType": "uint256",
578
+ "name": "premiumPaidAmount",
579
+ "type": "uint256"
580
+ },
452
581
  {
453
582
  "internalType": "uint256",
454
583
  "name": "lifetime",
@@ -459,6 +588,11 @@
459
588
  "name": "createdAt",
460
589
  "type": "uint256"
461
590
  },
591
+ {
592
+ "internalType": "uint256",
593
+ "name": "updatedAt",
594
+ "type": "uint256"
595
+ },
462
596
  {
463
597
  "internalType": "uint256",
464
598
  "name": "activatedAt",
@@ -500,16 +634,6 @@
500
634
  "name": "nftId",
501
635
  "type": "uint96"
502
636
  },
503
- {
504
- "internalType": "address",
505
- "name": "wallet",
506
- "type": "address"
507
- },
508
- {
509
- "internalType": "address",
510
- "name": "token",
511
- "type": "address"
512
- },
513
637
  {
514
638
  "internalType": "uint256",
515
639
  "name": "capital",
@@ -533,16 +657,62 @@
533
657
  "inputs": [
534
658
  {
535
659
  "internalType": "NftId",
536
- "name": "productNftId",
660
+ "name": "poolNftId",
537
661
  "type": "uint96"
538
662
  }
539
663
  ],
540
- "name": "getPoolNftId",
664
+ "name": "getPoolSetup",
541
665
  "outputs": [
542
666
  {
543
- "internalType": "NftId",
544
- "name": "poolNftId",
545
- "type": "uint96"
667
+ "components": [
668
+ {
669
+ "internalType": "NftId",
670
+ "name": "poolNftId",
671
+ "type": "uint96"
672
+ },
673
+ {
674
+ "internalType": "address",
675
+ "name": "wallet",
676
+ "type": "address"
677
+ },
678
+ {
679
+ "components": [
680
+ {
681
+ "internalType": "UFixed",
682
+ "name": "fractionalFee",
683
+ "type": "uint256"
684
+ },
685
+ {
686
+ "internalType": "uint256",
687
+ "name": "fixedFee",
688
+ "type": "uint256"
689
+ }
690
+ ],
691
+ "internalType": "struct Fee",
692
+ "name": "stakingFee",
693
+ "type": "tuple"
694
+ },
695
+ {
696
+ "components": [
697
+ {
698
+ "internalType": "UFixed",
699
+ "name": "fractionalFee",
700
+ "type": "uint256"
701
+ },
702
+ {
703
+ "internalType": "uint256",
704
+ "name": "fixedFee",
705
+ "type": "uint256"
706
+ }
707
+ ],
708
+ "internalType": "struct Fee",
709
+ "name": "performanceFee",
710
+ "type": "tuple"
711
+ }
712
+ ],
713
+ "internalType": "struct ITreasuryModule.PoolSetup",
714
+ "name": "setup",
715
+ "type": "tuple"
546
716
  }
547
717
  ],
548
718
  "stateMutability": "view",
@@ -561,6 +731,91 @@
561
731
  "stateMutability": "view",
562
732
  "type": "function"
563
733
  },
734
+ {
735
+ "inputs": [
736
+ {
737
+ "internalType": "NftId",
738
+ "name": "productNftId",
739
+ "type": "uint96"
740
+ }
741
+ ],
742
+ "name": "getProductSetup",
743
+ "outputs": [
744
+ {
745
+ "components": [
746
+ {
747
+ "internalType": "NftId",
748
+ "name": "productNftId",
749
+ "type": "uint96"
750
+ },
751
+ {
752
+ "internalType": "NftId",
753
+ "name": "distributorNftId",
754
+ "type": "uint96"
755
+ },
756
+ {
757
+ "internalType": "NftId",
758
+ "name": "poolNftId",
759
+ "type": "uint96"
760
+ },
761
+ {
762
+ "internalType": "contract IERC20",
763
+ "name": "token",
764
+ "type": "address"
765
+ },
766
+ {
767
+ "internalType": "contract TokenHandler",
768
+ "name": "tokenHandler",
769
+ "type": "address"
770
+ },
771
+ {
772
+ "internalType": "address",
773
+ "name": "wallet",
774
+ "type": "address"
775
+ },
776
+ {
777
+ "components": [
778
+ {
779
+ "internalType": "UFixed",
780
+ "name": "fractionalFee",
781
+ "type": "uint256"
782
+ },
783
+ {
784
+ "internalType": "uint256",
785
+ "name": "fixedFee",
786
+ "type": "uint256"
787
+ }
788
+ ],
789
+ "internalType": "struct Fee",
790
+ "name": "policyFee",
791
+ "type": "tuple"
792
+ },
793
+ {
794
+ "components": [
795
+ {
796
+ "internalType": "UFixed",
797
+ "name": "fractionalFee",
798
+ "type": "uint256"
799
+ },
800
+ {
801
+ "internalType": "uint256",
802
+ "name": "fixedFee",
803
+ "type": "uint256"
804
+ }
805
+ ],
806
+ "internalType": "struct Fee",
807
+ "name": "processingFee",
808
+ "type": "tuple"
809
+ }
810
+ ],
811
+ "internalType": "struct ITreasuryModule.ProductSetup",
812
+ "name": "setup",
813
+ "type": "tuple"
814
+ }
815
+ ],
816
+ "stateMutability": "view",
817
+ "type": "function"
818
+ },
564
819
  {
565
820
  "inputs": [],
566
821
  "name": "getRegistry",
@@ -704,14 +959,33 @@
704
959
  "stateMutability": "view",
705
960
  "type": "function"
706
961
  },
962
+ {
963
+ "inputs": [
964
+ {
965
+ "internalType": "NftId",
966
+ "name": "productNftId",
967
+ "type": "uint96"
968
+ }
969
+ ],
970
+ "name": "getTokenHandler",
971
+ "outputs": [
972
+ {
973
+ "internalType": "contract TokenHandler",
974
+ "name": "tokenHandler",
975
+ "type": "address"
976
+ }
977
+ ],
978
+ "stateMutability": "view",
979
+ "type": "function"
980
+ },
707
981
  {
708
982
  "inputs": [],
709
983
  "name": "getType",
710
984
  "outputs": [
711
985
  {
712
- "internalType": "uint256",
986
+ "internalType": "ObjectType",
713
987
  "name": "objectType",
714
- "type": "uint256"
988
+ "type": "uint8"
715
989
  }
716
990
  ],
717
991
  "stateMutability": "view",
@@ -785,6 +1059,66 @@
785
1059
  "stateMutability": "view",
786
1060
  "type": "function"
787
1061
  },
1062
+ {
1063
+ "inputs": [
1064
+ {
1065
+ "internalType": "ObjectType",
1066
+ "name": "objectType",
1067
+ "type": "uint8"
1068
+ },
1069
+ {
1070
+ "internalType": "StateId",
1071
+ "name": "fromId",
1072
+ "type": "uint8"
1073
+ },
1074
+ {
1075
+ "internalType": "StateId",
1076
+ "name": "toId",
1077
+ "type": "uint8"
1078
+ }
1079
+ ],
1080
+ "name": "isValidTransition",
1081
+ "outputs": [
1082
+ {
1083
+ "internalType": "bool",
1084
+ "name": "",
1085
+ "type": "bool"
1086
+ }
1087
+ ],
1088
+ "stateMutability": "view",
1089
+ "type": "function"
1090
+ },
1091
+ {
1092
+ "inputs": [
1093
+ {
1094
+ "internalType": "NftId",
1095
+ "name": "nftId",
1096
+ "type": "uint96"
1097
+ }
1098
+ ],
1099
+ "name": "processPremium",
1100
+ "outputs": [],
1101
+ "stateMutability": "nonpayable",
1102
+ "type": "function"
1103
+ },
1104
+ {
1105
+ "inputs": [
1106
+ {
1107
+ "internalType": "NftId",
1108
+ "name": "policyNftId",
1109
+ "type": "uint96"
1110
+ },
1111
+ {
1112
+ "internalType": "NftId",
1113
+ "name": "productNftId",
1114
+ "type": "uint96"
1115
+ }
1116
+ ],
1117
+ "name": "processPremium",
1118
+ "outputs": [],
1119
+ "stateMutability": "nonpayable",
1120
+ "type": "function"
1121
+ },
788
1122
  {
789
1123
  "inputs": [],
790
1124
  "name": "register",
@@ -817,6 +1151,138 @@
817
1151
  "stateMutability": "nonpayable",
818
1152
  "type": "function"
819
1153
  },
1154
+ {
1155
+ "inputs": [
1156
+ {
1157
+ "internalType": "NftId",
1158
+ "name": "nftId",
1159
+ "type": "uint96"
1160
+ }
1161
+ ],
1162
+ "name": "registerPool",
1163
+ "outputs": [],
1164
+ "stateMutability": "nonpayable",
1165
+ "type": "function"
1166
+ },
1167
+ {
1168
+ "inputs": [
1169
+ {
1170
+ "internalType": "NftId",
1171
+ "name": "poolNftId",
1172
+ "type": "uint96"
1173
+ },
1174
+ {
1175
+ "internalType": "address",
1176
+ "name": "wallet",
1177
+ "type": "address"
1178
+ },
1179
+ {
1180
+ "components": [
1181
+ {
1182
+ "internalType": "UFixed",
1183
+ "name": "fractionalFee",
1184
+ "type": "uint256"
1185
+ },
1186
+ {
1187
+ "internalType": "uint256",
1188
+ "name": "fixedFee",
1189
+ "type": "uint256"
1190
+ }
1191
+ ],
1192
+ "internalType": "struct Fee",
1193
+ "name": "stakingFee",
1194
+ "type": "tuple"
1195
+ },
1196
+ {
1197
+ "components": [
1198
+ {
1199
+ "internalType": "UFixed",
1200
+ "name": "fractionalFee",
1201
+ "type": "uint256"
1202
+ },
1203
+ {
1204
+ "internalType": "uint256",
1205
+ "name": "fixedFee",
1206
+ "type": "uint256"
1207
+ }
1208
+ ],
1209
+ "internalType": "struct Fee",
1210
+ "name": "performanceFee",
1211
+ "type": "tuple"
1212
+ }
1213
+ ],
1214
+ "name": "registerPool",
1215
+ "outputs": [],
1216
+ "stateMutability": "nonpayable",
1217
+ "type": "function"
1218
+ },
1219
+ {
1220
+ "inputs": [
1221
+ {
1222
+ "internalType": "NftId",
1223
+ "name": "productNftId",
1224
+ "type": "uint96"
1225
+ },
1226
+ {
1227
+ "internalType": "NftId",
1228
+ "name": "distributorNftId",
1229
+ "type": "uint96"
1230
+ },
1231
+ {
1232
+ "internalType": "NftId",
1233
+ "name": "poolNftId",
1234
+ "type": "uint96"
1235
+ },
1236
+ {
1237
+ "internalType": "contract IERC20",
1238
+ "name": "token",
1239
+ "type": "address"
1240
+ },
1241
+ {
1242
+ "internalType": "address",
1243
+ "name": "wallet",
1244
+ "type": "address"
1245
+ },
1246
+ {
1247
+ "components": [
1248
+ {
1249
+ "internalType": "UFixed",
1250
+ "name": "fractionalFee",
1251
+ "type": "uint256"
1252
+ },
1253
+ {
1254
+ "internalType": "uint256",
1255
+ "name": "fixedFee",
1256
+ "type": "uint256"
1257
+ }
1258
+ ],
1259
+ "internalType": "struct Fee",
1260
+ "name": "policyFee",
1261
+ "type": "tuple"
1262
+ },
1263
+ {
1264
+ "components": [
1265
+ {
1266
+ "internalType": "UFixed",
1267
+ "name": "fractionalFee",
1268
+ "type": "uint256"
1269
+ },
1270
+ {
1271
+ "internalType": "uint256",
1272
+ "name": "fixedFee",
1273
+ "type": "uint256"
1274
+ }
1275
+ ],
1276
+ "internalType": "struct Fee",
1277
+ "name": "processingFee",
1278
+ "type": "tuple"
1279
+ }
1280
+ ],
1281
+ "name": "registerProduct",
1282
+ "outputs": [],
1283
+ "stateMutability": "nonpayable",
1284
+ "type": "function"
1285
+ },
820
1286
  {
821
1287
  "inputs": [
822
1288
  {
@@ -845,9 +1311,14 @@
845
1311
  "type": "uint96"
846
1312
  },
847
1313
  {
848
- "internalType": "enum IComponent.CState",
1314
+ "internalType": "StateId",
849
1315
  "name": "state",
850
1316
  "type": "uint8"
1317
+ },
1318
+ {
1319
+ "internalType": "contract IERC20",
1320
+ "name": "token",
1321
+ "type": "address"
851
1322
  }
852
1323
  ],
853
1324
  "internalType": "struct IComponent.ComponentInfo",
@@ -870,12 +1341,12 @@
870
1341
  "inputs": [
871
1342
  {
872
1343
  "internalType": "NftId",
873
- "name": "poolNftId",
1344
+ "name": "policyNftId",
874
1345
  "type": "uint96"
875
1346
  },
876
1347
  {
877
1348
  "internalType": "NftId",
878
- "name": "policyNftId",
1349
+ "name": "productNftId",
879
1350
  "type": "uint96"
880
1351
  }
881
1352
  ],
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/a97efa992a2120820e2178f0881b5ea8.json"
3
+ "buildInfo": "../../../build-info/cf2d2e1c79c39858c3089f23d02154a8.json"
4
4
  }