@etherisc/gif-next 0.0.2-d3ee0cc-268 → 0.0.2-d408403-475

Sign up to get free protection for your applications and to get access to all the features.
Files changed (217) hide show
  1. package/README.md +38 -11
  2. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +1 -1
  3. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.json +405 -0
  5. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +1 -1
  6. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
  7. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +340 -0
  8. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  9. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +131 -0
  10. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  11. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +109 -18
  12. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  13. package/artifacts/contracts/components/Pool.sol/Pool.json +194 -3
  14. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  15. package/artifacts/contracts/components/Product.sol/Product.json +160 -21
  16. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
  17. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
  18. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  19. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  20. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
  21. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
  22. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
  23. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
  24. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
  25. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
  26. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +1 -1
  27. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +2 -2
  28. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
  29. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
  30. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
  31. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
  32. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  33. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  34. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  35. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +592 -451
  36. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +1 -1
  37. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  38. package/artifacts/contracts/instance/Instance.sol/Instance.json +735 -506
  39. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +1 -1
  40. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +1 -1
  41. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +50 -0
  42. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  43. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +49 -0
  44. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  45. package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +1 -1
  46. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +1 -1
  47. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +50 -0
  48. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  49. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +41 -23
  50. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  51. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +4 -4
  52. package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +1 -1
  53. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +1 -1
  54. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +1 -1
  55. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +1 -1
  56. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +1 -1
  57. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +1 -1
  58. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +55 -54
  59. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +1 -1
  60. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +1 -1
  61. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +56 -55
  62. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +1 -1
  63. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +22 -93
  64. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +1 -1
  65. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +1 -1
  66. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +22 -93
  67. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.dbg.json +4 -0
  68. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.json +10 -0
  69. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.dbg.json +4 -0
  70. package/artifacts/contracts/instance/module/{compensation/ICompensation.sol/ICompensation.json → distribution/IDistribution.sol/IDistribution.json} +2 -2
  71. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.dbg.json +4 -0
  72. package/artifacts/contracts/instance/module/{compensation/ICompensation.sol/ICompensationModule.json → distribution/IDistribution.sol/IDistributionModule.json} +2 -2
  73. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +1 -1
  74. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +1 -1
  75. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +61 -38
  76. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +1 -1
  77. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +61 -38
  78. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +1 -1
  79. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +1 -1
  80. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +0 -5
  81. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +1 -1
  82. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +0 -5
  83. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +1 -1
  84. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +1 -1
  85. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +104 -1
  86. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +1 -1
  87. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +126 -5
  88. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +1 -1
  89. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +1 -1
  90. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +209 -231
  91. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  92. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +2 -2
  93. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +1 -1
  94. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +209 -231
  95. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +1 -1
  96. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +55 -15
  97. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
  98. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +420 -0
  99. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +1 -1
  100. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
  101. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +325 -0
  102. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  103. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +64 -0
  104. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  105. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +160 -7
  106. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  107. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +84 -12
  108. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  109. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +216 -31
  110. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  111. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
  112. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  113. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
  114. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  115. package/artifacts/contracts/registry/Registry.sol/Registry.json +2 -2
  116. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  117. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +1 -1
  118. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  119. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  120. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  121. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  122. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.dbg.json +4 -0
  123. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.json +405 -0
  124. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  125. package/artifacts/contracts/test/TestFee.sol/TestFee.json +2 -2
  126. package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +1 -1
  127. package/artifacts/contracts/test/TestPool.sol/TestPool.json +194 -3
  128. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +1 -1
  129. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +209 -27
  130. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  131. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +2 -2
  132. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  133. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +38 -4
  134. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  135. package/artifacts/contracts/test/TestService.sol/TestService.json +2 -2
  136. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  137. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  138. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  139. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  140. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  141. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  142. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  143. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  144. package/artifacts/contracts/types/Fee.sol/FeeLib.json +50 -11
  145. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
  146. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +2 -2
  147. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  148. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +2 -2
  149. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  150. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
  151. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  152. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  153. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.dbg.json +4 -0
  154. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.json +99 -0
  155. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
  156. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
  157. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +4 -0
  158. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +30 -0
  159. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  160. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  161. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +1 -1
  162. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  163. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  164. package/contracts/components/BaseComponent.sol +7 -1
  165. package/contracts/components/Distribution.sol +132 -0
  166. package/contracts/components/IDistributionComponent.sol +48 -0
  167. package/contracts/components/IPoolComponent.sol +14 -0
  168. package/contracts/components/IProductComponent.sol +24 -5
  169. package/contracts/components/Pool.sol +64 -3
  170. package/contracts/components/Product.sol +123 -13
  171. package/contracts/instance/IInstance.sol +7 -6
  172. package/contracts/instance/Instance.sol +12 -6
  173. package/contracts/instance/base/IInstanceBase.sol +8 -0
  174. package/contracts/instance/base/IKeyValueStore.sol +4 -3
  175. package/contracts/instance/base/InstanceBase.sol +13 -2
  176. package/contracts/instance/base/KeyValueStore.sol +12 -7
  177. package/contracts/instance/base/Lifecycle.sol +15 -10
  178. package/contracts/instance/base/ModuleBase.sol +22 -17
  179. package/contracts/instance/module/access/Access.sol +6 -6
  180. package/contracts/instance/module/bundle/BundleModule.sol +10 -12
  181. package/contracts/instance/module/bundle/IBundle.sol +6 -11
  182. package/contracts/instance/module/component/ComponentModule.sol +29 -54
  183. package/contracts/instance/module/component/IComponent.sol +5 -30
  184. package/contracts/instance/module/distribution/DistributionModule.sol +17 -0
  185. package/contracts/instance/module/distribution/IDistribution.sol +10 -0
  186. package/contracts/instance/module/policy/IPolicy.sol +12 -9
  187. package/contracts/instance/module/policy/PolicyModule.sol +35 -20
  188. package/contracts/instance/module/pool/IPoolModule.sol +0 -1
  189. package/contracts/instance/module/pool/PoolModule.sol +12 -9
  190. package/contracts/instance/module/risk/IRisk.sol +18 -2
  191. package/contracts/instance/module/risk/RiskModule.sol +56 -2
  192. package/contracts/instance/module/treasury/ITreasury.sol +29 -50
  193. package/contracts/instance/module/treasury/TreasuryModule.sol +71 -85
  194. package/contracts/instance/service/ComponentOwnerService.sol +29 -42
  195. package/contracts/instance/service/DistributionService.sol +59 -0
  196. package/contracts/instance/service/IDistributionService.sol +12 -0
  197. package/contracts/instance/service/IPoolService.sol +7 -0
  198. package/contracts/instance/service/IProductService.sol +56 -7
  199. package/contracts/instance/service/PoolService.sol +30 -4
  200. package/contracts/instance/service/ProductService.sol +230 -75
  201. package/contracts/registry/Registry.sol +3 -2
  202. package/contracts/test/TestDistribution.sol +21 -0
  203. package/contracts/test/TestPool.sol +5 -2
  204. package/contracts/test/TestProduct.sol +35 -7
  205. package/contracts/test/TestRoleId.sol +2 -2
  206. package/contracts/types/Fee.sol +8 -3
  207. package/contracts/types/ObjectType.sol +24 -8
  208. package/contracts/types/ReferralId.sol +48 -0
  209. package/contracts/types/RiskId.sol +43 -0
  210. package/contracts/types/RoleId.sol +12 -10
  211. package/package.json +1 -1
  212. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.dbg.json +0 -4
  213. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.json +0 -10
  214. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.dbg.json +0 -4
  215. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.dbg.json +0 -4
  216. package/contracts/instance/module/compensation/CompensationModule.sol +0 -8
  217. package/contracts/instance/module/compensation/ICompensation.sol +0 -10
@@ -84,11 +84,49 @@
84
84
  "inputs": [
85
85
  {
86
86
  "internalType": "NftId",
87
- "name": "poolNftId",
87
+ "name": "componentNftId",
88
+ "type": "uint96"
89
+ }
90
+ ],
91
+ "name": "getProductNftId",
92
+ "outputs": [
93
+ {
94
+ "internalType": "NftId",
95
+ "name": "productNftId",
96
+ "type": "uint96"
97
+ }
98
+ ],
99
+ "stateMutability": "view",
100
+ "type": "function"
101
+ },
102
+ {
103
+ "inputs": [
104
+ {
105
+ "internalType": "NftId",
106
+ "name": "componentNftId",
107
+ "type": "uint96"
108
+ }
109
+ ],
110
+ "name": "getTokenHandler",
111
+ "outputs": [
112
+ {
113
+ "internalType": "contract TokenHandler",
114
+ "name": "tokenHandler",
115
+ "type": "address"
116
+ }
117
+ ],
118
+ "stateMutability": "view",
119
+ "type": "function"
120
+ },
121
+ {
122
+ "inputs": [
123
+ {
124
+ "internalType": "NftId",
125
+ "name": "productNftId",
88
126
  "type": "uint96"
89
127
  }
90
128
  ],
91
- "name": "getPoolSetup",
129
+ "name": "getTreasuryInfo",
92
130
  "outputs": [
93
131
  {
94
132
  "components": [
@@ -98,8 +136,13 @@
98
136
  "type": "uint96"
99
137
  },
100
138
  {
101
- "internalType": "address",
102
- "name": "wallet",
139
+ "internalType": "NftId",
140
+ "name": "distributionNftId",
141
+ "type": "uint96"
142
+ },
143
+ {
144
+ "internalType": "contract IERC20Metadata",
145
+ "name": "token",
103
146
  "type": "address"
104
147
  },
105
148
  {
@@ -116,7 +159,7 @@
116
159
  }
117
160
  ],
118
161
  "internalType": "struct Fee",
119
- "name": "stakingFee",
162
+ "name": "productFee",
120
163
  "type": "tuple"
121
164
  },
122
165
  {
@@ -133,54 +176,42 @@
133
176
  }
134
177
  ],
135
178
  "internalType": "struct Fee",
136
- "name": "performanceFee",
179
+ "name": "processingFee",
137
180
  "type": "tuple"
138
- }
139
- ],
140
- "internalType": "struct ITreasury.PoolSetup",
141
- "name": "setup",
142
- "type": "tuple"
143
- }
144
- ],
145
- "stateMutability": "view",
146
- "type": "function"
147
- },
148
- {
149
- "inputs": [
150
- {
151
- "internalType": "NftId",
152
- "name": "productNftId",
153
- "type": "uint96"
154
- }
155
- ],
156
- "name": "getProductSetup",
157
- "outputs": [
158
- {
159
- "components": [
160
- {
161
- "internalType": "NftId",
162
- "name": "productNftId",
163
- "type": "uint96"
164
181
  },
165
182
  {
166
- "internalType": "NftId",
167
- "name": "distributorNftId",
168
- "type": "uint96"
169
- },
170
- {
171
- "internalType": "NftId",
172
- "name": "poolNftId",
173
- "type": "uint96"
174
- },
175
- {
176
- "internalType": "contract IERC20Metadata",
177
- "name": "token",
178
- "type": "address"
183
+ "components": [
184
+ {
185
+ "internalType": "UFixed",
186
+ "name": "fractionalFee",
187
+ "type": "uint256"
188
+ },
189
+ {
190
+ "internalType": "uint256",
191
+ "name": "fixedFee",
192
+ "type": "uint256"
193
+ }
194
+ ],
195
+ "internalType": "struct Fee",
196
+ "name": "poolFee",
197
+ "type": "tuple"
179
198
  },
180
199
  {
181
- "internalType": "address",
182
- "name": "wallet",
183
- "type": "address"
200
+ "components": [
201
+ {
202
+ "internalType": "UFixed",
203
+ "name": "fractionalFee",
204
+ "type": "uint256"
205
+ },
206
+ {
207
+ "internalType": "uint256",
208
+ "name": "fixedFee",
209
+ "type": "uint256"
210
+ }
211
+ ],
212
+ "internalType": "struct Fee",
213
+ "name": "stakingFee",
214
+ "type": "tuple"
184
215
  },
185
216
  {
186
217
  "components": [
@@ -196,7 +227,7 @@
196
227
  }
197
228
  ],
198
229
  "internalType": "struct Fee",
199
- "name": "policyFee",
230
+ "name": "performanceFee",
200
231
  "type": "tuple"
201
232
  },
202
233
  {
@@ -213,37 +244,18 @@
213
244
  }
214
245
  ],
215
246
  "internalType": "struct Fee",
216
- "name": "processingFee",
247
+ "name": "distributionFee",
217
248
  "type": "tuple"
218
249
  }
219
250
  ],
220
- "internalType": "struct ITreasury.ProductSetup",
221
- "name": "setup",
251
+ "internalType": "struct ITreasury.TreasuryInfo",
252
+ "name": "info",
222
253
  "type": "tuple"
223
254
  }
224
255
  ],
225
256
  "stateMutability": "view",
226
257
  "type": "function"
227
258
  },
228
- {
229
- "inputs": [
230
- {
231
- "internalType": "NftId",
232
- "name": "componentNftId",
233
- "type": "uint96"
234
- }
235
- ],
236
- "name": "getTokenHandler",
237
- "outputs": [
238
- {
239
- "internalType": "contract TokenHandler",
240
- "name": "tokenHandler",
241
- "type": "address"
242
- }
243
- ],
244
- "stateMutability": "view",
245
- "type": "function"
246
- },
247
259
  {
248
260
  "inputs": [
249
261
  {
@@ -309,124 +321,47 @@
309
321
  "type": "tuple"
310
322
  }
311
323
  ],
312
- "stateMutability": "pure",
324
+ "stateMutability": "view",
313
325
  "type": "function"
314
326
  },
315
327
  {
316
328
  "inputs": [
317
329
  {
318
330
  "internalType": "NftId",
319
- "name": "poolNftId",
331
+ "name": "productNftId",
320
332
  "type": "uint96"
321
- },
322
- {
323
- "internalType": "address",
324
- "name": "wallet",
325
- "type": "address"
326
- },
327
- {
328
- "components": [
329
- {
330
- "internalType": "UFixed",
331
- "name": "fractionalFee",
332
- "type": "uint256"
333
- },
334
- {
335
- "internalType": "uint256",
336
- "name": "fixedFee",
337
- "type": "uint256"
338
- }
339
- ],
340
- "internalType": "struct Fee",
341
- "name": "stakingFee",
342
- "type": "tuple"
343
- },
333
+ }
334
+ ],
335
+ "name": "hasTreasuryInfo",
336
+ "outputs": [
344
337
  {
345
- "components": [
346
- {
347
- "internalType": "UFixed",
348
- "name": "fractionalFee",
349
- "type": "uint256"
350
- },
351
- {
352
- "internalType": "uint256",
353
- "name": "fixedFee",
354
- "type": "uint256"
355
- }
356
- ],
357
- "internalType": "struct Fee",
358
- "name": "performanceFee",
359
- "type": "tuple"
338
+ "internalType": "bool",
339
+ "name": "hasInfo",
340
+ "type": "bool"
360
341
  }
361
342
  ],
362
- "name": "registerPool",
363
- "outputs": [],
364
- "stateMutability": "nonpayable",
343
+ "stateMutability": "view",
365
344
  "type": "function"
366
345
  },
367
346
  {
368
347
  "inputs": [
369
348
  {
370
- "internalType": "NftId",
371
- "name": "productNftId",
372
- "type": "uint96"
373
- },
374
- {
375
- "internalType": "NftId",
376
- "name": "distributorNftId",
377
- "type": "uint96"
378
- },
379
- {
380
- "internalType": "NftId",
381
- "name": "poolNftId",
382
- "type": "uint96"
383
- },
384
- {
385
- "internalType": "contract IERC20Metadata",
386
- "name": "token",
349
+ "internalType": "contract IProductComponent",
350
+ "name": "product",
387
351
  "type": "address"
388
352
  },
389
353
  {
390
- "internalType": "address",
391
- "name": "wallet",
354
+ "internalType": "contract IPoolComponent",
355
+ "name": "pool",
392
356
  "type": "address"
393
357
  },
394
358
  {
395
- "components": [
396
- {
397
- "internalType": "UFixed",
398
- "name": "fractionalFee",
399
- "type": "uint256"
400
- },
401
- {
402
- "internalType": "uint256",
403
- "name": "fixedFee",
404
- "type": "uint256"
405
- }
406
- ],
407
- "internalType": "struct Fee",
408
- "name": "policyFee",
409
- "type": "tuple"
410
- },
411
- {
412
- "components": [
413
- {
414
- "internalType": "UFixed",
415
- "name": "fractionalFee",
416
- "type": "uint256"
417
- },
418
- {
419
- "internalType": "uint256",
420
- "name": "fixedFee",
421
- "type": "uint256"
422
- }
423
- ],
424
- "internalType": "struct Fee",
425
- "name": "processingFee",
426
- "type": "tuple"
359
+ "internalType": "contract IDistributionComponent",
360
+ "name": "distribution",
361
+ "type": "address"
427
362
  }
428
363
  ],
429
- "name": "registerProduct",
364
+ "name": "registerProductSetup",
430
365
  "outputs": [],
431
366
  "stateMutability": "nonpayable",
432
367
  "type": "function"
@@ -435,92 +370,135 @@
435
370
  "inputs": [
436
371
  {
437
372
  "internalType": "NftId",
438
- "name": "poolNftId",
373
+ "name": "productNftId",
439
374
  "type": "uint96"
440
375
  },
441
376
  {
442
377
  "components": [
443
378
  {
444
- "internalType": "UFixed",
445
- "name": "fractionalFee",
446
- "type": "uint256"
379
+ "internalType": "NftId",
380
+ "name": "poolNftId",
381
+ "type": "uint96"
447
382
  },
448
383
  {
449
- "internalType": "uint256",
450
- "name": "fixedFee",
451
- "type": "uint256"
452
- }
453
- ],
454
- "internalType": "struct Fee",
455
- "name": "stakingFee",
456
- "type": "tuple"
457
- },
458
- {
459
- "components": [
384
+ "internalType": "NftId",
385
+ "name": "distributionNftId",
386
+ "type": "uint96"
387
+ },
460
388
  {
461
- "internalType": "UFixed",
462
- "name": "fractionalFee",
463
- "type": "uint256"
389
+ "internalType": "contract IERC20Metadata",
390
+ "name": "token",
391
+ "type": "address"
464
392
  },
465
393
  {
466
- "internalType": "uint256",
467
- "name": "fixedFee",
468
- "type": "uint256"
469
- }
470
- ],
471
- "internalType": "struct Fee",
472
- "name": "performanceFee",
473
- "type": "tuple"
474
- }
475
- ],
476
- "name": "setPoolFees",
477
- "outputs": [],
478
- "stateMutability": "nonpayable",
479
- "type": "function"
480
- },
481
- {
482
- "inputs": [
483
- {
484
- "internalType": "NftId",
485
- "name": "productNftId",
486
- "type": "uint96"
487
- },
488
- {
489
- "components": [
394
+ "components": [
395
+ {
396
+ "internalType": "UFixed",
397
+ "name": "fractionalFee",
398
+ "type": "uint256"
399
+ },
400
+ {
401
+ "internalType": "uint256",
402
+ "name": "fixedFee",
403
+ "type": "uint256"
404
+ }
405
+ ],
406
+ "internalType": "struct Fee",
407
+ "name": "productFee",
408
+ "type": "tuple"
409
+ },
490
410
  {
491
- "internalType": "UFixed",
492
- "name": "fractionalFee",
493
- "type": "uint256"
411
+ "components": [
412
+ {
413
+ "internalType": "UFixed",
414
+ "name": "fractionalFee",
415
+ "type": "uint256"
416
+ },
417
+ {
418
+ "internalType": "uint256",
419
+ "name": "fixedFee",
420
+ "type": "uint256"
421
+ }
422
+ ],
423
+ "internalType": "struct Fee",
424
+ "name": "processingFee",
425
+ "type": "tuple"
494
426
  },
495
427
  {
496
- "internalType": "uint256",
497
- "name": "fixedFee",
498
- "type": "uint256"
499
- }
500
- ],
501
- "internalType": "struct Fee",
502
- "name": "policyFee",
503
- "type": "tuple"
504
- },
505
- {
506
- "components": [
428
+ "components": [
429
+ {
430
+ "internalType": "UFixed",
431
+ "name": "fractionalFee",
432
+ "type": "uint256"
433
+ },
434
+ {
435
+ "internalType": "uint256",
436
+ "name": "fixedFee",
437
+ "type": "uint256"
438
+ }
439
+ ],
440
+ "internalType": "struct Fee",
441
+ "name": "poolFee",
442
+ "type": "tuple"
443
+ },
507
444
  {
508
- "internalType": "UFixed",
509
- "name": "fractionalFee",
510
- "type": "uint256"
445
+ "components": [
446
+ {
447
+ "internalType": "UFixed",
448
+ "name": "fractionalFee",
449
+ "type": "uint256"
450
+ },
451
+ {
452
+ "internalType": "uint256",
453
+ "name": "fixedFee",
454
+ "type": "uint256"
455
+ }
456
+ ],
457
+ "internalType": "struct Fee",
458
+ "name": "stakingFee",
459
+ "type": "tuple"
511
460
  },
512
461
  {
513
- "internalType": "uint256",
514
- "name": "fixedFee",
515
- "type": "uint256"
462
+ "components": [
463
+ {
464
+ "internalType": "UFixed",
465
+ "name": "fractionalFee",
466
+ "type": "uint256"
467
+ },
468
+ {
469
+ "internalType": "uint256",
470
+ "name": "fixedFee",
471
+ "type": "uint256"
472
+ }
473
+ ],
474
+ "internalType": "struct Fee",
475
+ "name": "performanceFee",
476
+ "type": "tuple"
477
+ },
478
+ {
479
+ "components": [
480
+ {
481
+ "internalType": "UFixed",
482
+ "name": "fractionalFee",
483
+ "type": "uint256"
484
+ },
485
+ {
486
+ "internalType": "uint256",
487
+ "name": "fixedFee",
488
+ "type": "uint256"
489
+ }
490
+ ],
491
+ "internalType": "struct Fee",
492
+ "name": "distributionFee",
493
+ "type": "tuple"
516
494
  }
517
495
  ],
518
- "internalType": "struct Fee",
519
- "name": "processingFee",
496
+ "internalType": "struct ITreasury.TreasuryInfo",
497
+ "name": "info",
520
498
  "type": "tuple"
521
499
  }
522
500
  ],
523
- "name": "setProductFees",
501
+ "name": "setTreasuryInfo",
524
502
  "outputs": [],
525
503
  "stateMutability": "nonpayable",
526
504
  "type": "function"
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../../../build-info/a0be93f6846b412966dd52d34bc4f9b2.json"
3
+ "buildInfo": "../../../../../build-info/f93a8e80452dc32f10ebad6b13365e96.json"
4
4
  }
@@ -69,8 +69,8 @@
69
69
  "type": "function"
70
70
  }
71
71
  ],
72
- "bytecode": "0x608060405234801561001057600080fd5b506040516102aa3803806102aa83398101604081905261002f9161005b565b6001600160a01b03166c01000000000000000000000000026001600160601b03909116176000556100ad565b6000806040838503121561006e57600080fd5b82516001600160601b038116811461008557600080fd5b60208401519092506001600160a01b03811681146100a257600080fd5b809150509250929050565b6101ee806100bc6000396000f3fe608060405234801561001057600080fd5b50600436106100405760003560e01c806251884a1461004557806321df0da71461006a578063beabacc814610095575b600080fd5b6000546040516bffffffffffffffffffffffff90911681526020015b60405180910390f35b600054600160601b90046001600160a01b03166040516001600160a01b039091168152602001610061565b6100a86100a3366004610153565b6100aa565b005b6000546040516323b872dd60e01b81526001600160a01b038581166004830152848116602483015260448201849052600160601b909204909116906323b872dd906064016020604051808303816000875af115801561010d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610131919061018f565b50505050565b80356001600160a01b038116811461014e57600080fd5b919050565b60008060006060848603121561016857600080fd5b61017184610137565b925061017f60208501610137565b9150604084013590509250925092565b6000602082840312156101a157600080fd5b815180151581146101b157600080fd5b939250505056fea26469706673582212202b9b96f8a114d50ac700f93106ae958bdf05223b6902bd79a7088ba5f33cdf3464736f6c63430008140033",
73
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100405760003560e01c806251884a1461004557806321df0da71461006a578063beabacc814610095575b600080fd5b6000546040516bffffffffffffffffffffffff90911681526020015b60405180910390f35b600054600160601b90046001600160a01b03166040516001600160a01b039091168152602001610061565b6100a86100a3366004610153565b6100aa565b005b6000546040516323b872dd60e01b81526001600160a01b038581166004830152848116602483015260448201849052600160601b909204909116906323b872dd906064016020604051808303816000875af115801561010d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610131919061018f565b50505050565b80356001600160a01b038116811461014e57600080fd5b919050565b60008060006060848603121561016857600080fd5b61017184610137565b925061017f60208501610137565b9150604084013590509250925092565b6000602082840312156101a157600080fd5b815180151581146101b157600080fd5b939250505056fea26469706673582212202b9b96f8a114d50ac700f93106ae958bdf05223b6902bd79a7088ba5f33cdf3464736f6c63430008140033",
72
+ "bytecode": "0x608060405234801561001057600080fd5b506040516102aa3803806102aa83398101604081905261002f9161005b565b6001600160a01b03166c01000000000000000000000000026001600160601b03909116176000556100ad565b6000806040838503121561006e57600080fd5b82516001600160601b038116811461008557600080fd5b60208401519092506001600160a01b03811681146100a257600080fd5b809150509250929050565b6101ee806100bc6000396000f3fe608060405234801561001057600080fd5b50600436106100405760003560e01c806251884a1461004557806321df0da71461006a578063beabacc814610095575b600080fd5b6000546040516bffffffffffffffffffffffff90911681526020015b60405180910390f35b600054600160601b90046001600160a01b03166040516001600160a01b039091168152602001610061565b6100a86100a3366004610153565b6100aa565b005b6000546040516323b872dd60e01b81526001600160a01b038581166004830152848116602483015260448201849052600160601b909204909116906323b872dd906064016020604051808303816000875af115801561010d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610131919061018f565b50505050565b80356001600160a01b038116811461014e57600080fd5b919050565b60008060006060848603121561016857600080fd5b61017184610137565b925061017f60208501610137565b9150604084013590509250925092565b6000602082840312156101a157600080fd5b815180151581146101b157600080fd5b939250505056fea264697066735822122098042a25f53a65deabe0e6f542a37f2241e6a3e8502eedd92fc64bb45d25bfc364736f6c63430008140033",
73
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100405760003560e01c806251884a1461004557806321df0da71461006a578063beabacc814610095575b600080fd5b6000546040516bffffffffffffffffffffffff90911681526020015b60405180910390f35b600054600160601b90046001600160a01b03166040516001600160a01b039091168152602001610061565b6100a86100a3366004610153565b6100aa565b005b6000546040516323b872dd60e01b81526001600160a01b038581166004830152848116602483015260448201849052600160601b909204909116906323b872dd906064016020604051808303816000875af115801561010d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610131919061018f565b50505050565b80356001600160a01b038116811461014e57600080fd5b919050565b60008060006060848603121561016857600080fd5b61017184610137565b925061017f60208501610137565b9150604084013590509250925092565b6000602082840312156101a157600080fd5b815180151581146101b157600080fd5b939250505056fea264697066735822122098042a25f53a65deabe0e6f542a37f2241e6a3e8502eedd92fc64bb45d25bfc364736f6c63430008140033",
74
74
  "linkReferences": {},
75
75
  "deployedLinkReferences": {}
76
76
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../../../build-info/a0be93f6846b412966dd52d34bc4f9b2.json"
3
+ "buildInfo": "../../../../../build-info/f93a8e80452dc32f10ebad6b13365e96.json"
4
4
  }