@etherisc/gif-next 0.0.2-78bf628-134 → 0.0.2-7acbd99-227

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 (268) hide show
  1. package/README.md +71 -25
  2. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +1 -1
  3. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.json +80 -41
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +445 -0
  6. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +1 -1
  7. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.json +43 -40
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
  9. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +343 -0
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +199 -81
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +141 -47
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +299 -84
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +250 -53
  18. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
  19. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
  20. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  21. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  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 +1 -1
  29. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +2 -2
  30. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
  31. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
  32. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
  33. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
  34. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  35. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  36. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  37. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +742 -425
  38. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +1 -1
  39. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  40. package/artifacts/contracts/instance/Instance.sol/Instance.json +1014 -604
  41. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +1 -1
  42. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.json +139 -46
  43. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +1 -1
  44. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +33 -1
  45. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  46. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  47. package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +1 -1
  48. package/artifacts/contracts/instance/base/IService.sol/IService.json +99 -55
  49. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +1 -1
  50. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +160 -48
  51. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  52. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +14 -14
  53. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  54. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +4 -4
  55. package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +1 -1
  56. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +1 -1
  57. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.json +135 -55
  58. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +1 -1
  59. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +1 -1
  60. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +1 -1
  61. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +1 -1
  62. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +55 -54
  63. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +1 -1
  64. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +1 -1
  65. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +56 -55
  66. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +1 -1
  67. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +12 -7
  68. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +1 -1
  69. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +1 -1
  70. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +12 -7
  71. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.dbg.json +4 -0
  72. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.json +10 -0
  73. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.dbg.json +4 -0
  74. package/artifacts/contracts/instance/module/{compensation/ICompensation.sol/ICompensation.json → distribution/IDistribution.sol/IDistribution.json} +2 -2
  75. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.dbg.json +4 -0
  76. package/artifacts/contracts/instance/module/{compensation/ICompensation.sol/ICompensationModule.json → distribution/IDistribution.sol/IDistributionModule.json} +2 -2
  77. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +1 -1
  78. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +1 -1
  79. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +53 -40
  80. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +1 -1
  81. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +53 -40
  82. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +1 -1
  83. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +1 -1
  84. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +29 -14
  85. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +1 -1
  86. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +28 -13
  87. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +1 -1
  88. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +1 -1
  89. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +104 -1
  90. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +1 -1
  91. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +126 -5
  92. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +1 -1
  93. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +1 -1
  94. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +326 -221
  95. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  96. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +2 -2
  97. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +1 -1
  98. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +326 -221
  99. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +1 -1
  100. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +251 -84
  101. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
  102. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +526 -0
  103. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +1 -1
  104. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +99 -74
  105. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
  106. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +369 -0
  107. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  108. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +158 -50
  109. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  110. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +246 -49
  111. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  112. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +230 -52
  113. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  114. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +361 -70
  115. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  116. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +141 -12
  117. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
  118. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +5 -0
  119. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  120. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +293 -40
  121. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
  122. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
  123. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +668 -0
  124. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +4 -0
  125. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +34 -0
  126. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  127. package/artifacts/contracts/registry/Registry.sol/Registry.json +471 -121
  128. package/artifacts/contracts/registry/Registry.sol/RegistryCreationCode.dbg.json +4 -0
  129. package/artifacts/contracts/registry/Registry.sol/RegistryCreationCode.json +150 -0
  130. package/artifacts/contracts/registry/RegistryInstaller.sol/RegistryInstaller.dbg.json +4 -0
  131. package/artifacts/contracts/registry/RegistryInstaller.sol/RegistryInstaller.json +344 -0
  132. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
  133. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +861 -0
  134. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  135. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +2 -2
  136. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +1 -1
  137. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  138. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +43 -40
  139. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  140. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +55 -14
  141. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +4 -0
  142. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +310 -0
  143. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  144. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +76 -37
  145. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
  146. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
  147. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  148. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +78 -14
  149. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.dbg.json +4 -0
  150. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.json +445 -0
  151. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  152. package/artifacts/contracts/test/TestFee.sol/TestFee.json +2 -2
  153. package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +1 -1
  154. package/artifacts/contracts/test/TestPool.sol/TestPool.json +299 -84
  155. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +1 -1
  156. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +297 -58
  157. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  158. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +93 -39
  159. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  160. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +2 -2
  161. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  162. package/artifacts/contracts/test/TestService.sol/TestService.json +161 -68
  163. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  164. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  165. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +2 -2
  166. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  167. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +89 -25
  168. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  169. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  170. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  171. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  172. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  173. package/artifacts/contracts/types/Fee.sol/FeeLib.json +50 -11
  174. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
  175. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +2 -2
  176. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  177. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +2 -2
  178. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  179. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
  180. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  181. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  182. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.dbg.json +4 -0
  183. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.json +99 -0
  184. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
  185. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
  186. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +1 -1
  187. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +2 -2
  188. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  189. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  190. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +1 -1
  191. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  192. package/artifacts/contracts/types/Version.sol/VersionLib.json +40 -2
  193. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  194. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +2 -2
  195. package/contracts/components/BaseComponent.sol +12 -21
  196. package/contracts/components/Distribution.sol +155 -0
  197. package/contracts/components/IBaseComponent.sol +2 -2
  198. package/contracts/components/IDistributionComponent.sol +47 -0
  199. package/contracts/components/IPoolComponent.sol +14 -6
  200. package/contracts/components/IProductComponent.sol +26 -6
  201. package/contracts/components/Pool.sol +99 -27
  202. package/contracts/components/Product.sol +204 -22
  203. package/contracts/instance/IInstance.sol +11 -7
  204. package/contracts/instance/Instance.sol +25 -7
  205. package/contracts/instance/base/ComponentServiceBase.sol +13 -6
  206. package/contracts/instance/base/IInstanceBase.sol +6 -2
  207. package/contracts/instance/base/InstanceBase.sol +13 -8
  208. package/contracts/instance/base/Lifecycle.sol +10 -2
  209. package/contracts/instance/base/ModuleBase.sol +22 -17
  210. package/contracts/instance/base/ServiceBase.sol +19 -13
  211. package/contracts/instance/module/access/Access.sol +3 -3
  212. package/contracts/instance/module/bundle/BundleModule.sol +10 -12
  213. package/contracts/instance/module/bundle/IBundle.sol +6 -11
  214. package/contracts/instance/module/component/ComponentModule.sol +20 -24
  215. package/contracts/instance/module/component/IComponent.sol +5 -4
  216. package/contracts/instance/module/distribution/DistributionModule.sol +17 -0
  217. package/contracts/instance/module/distribution/IDistribution.sol +10 -0
  218. package/contracts/instance/module/policy/IPolicy.sol +10 -8
  219. package/contracts/instance/module/policy/PolicyModule.sol +33 -19
  220. package/contracts/instance/module/pool/IPoolModule.sol +4 -4
  221. package/contracts/instance/module/pool/PoolModule.sol +23 -15
  222. package/contracts/instance/module/risk/IRisk.sol +18 -2
  223. package/contracts/instance/module/risk/RiskModule.sol +56 -2
  224. package/contracts/instance/module/treasury/ITreasury.sol +32 -51
  225. package/contracts/instance/module/treasury/TokenHandler.sol +2 -2
  226. package/contracts/instance/module/treasury/TreasuryModule.sol +68 -89
  227. package/contracts/instance/service/ComponentOwnerService.sol +189 -79
  228. package/contracts/instance/service/DistributionService.sol +54 -0
  229. package/contracts/instance/service/IComponentOwnerService.sol +0 -2
  230. package/contracts/instance/service/IDistributionService.sol +12 -0
  231. package/contracts/instance/service/IPoolService.sol +7 -0
  232. package/contracts/instance/service/IProductService.sol +56 -7
  233. package/contracts/instance/service/PoolService.sol +49 -23
  234. package/contracts/instance/service/ProductService.sol +246 -91
  235. package/contracts/registry/ChainNft.sol +43 -15
  236. package/contracts/registry/IChainNft.sol +3 -2
  237. package/contracts/registry/IRegistry.sol +44 -28
  238. package/contracts/registry/IRegistryService.sol +29 -0
  239. package/contracts/registry/ITransferInterceptor.sol +6 -0
  240. package/contracts/registry/Registry.sol +388 -271
  241. package/contracts/registry/RegistryInstaller.sol +100 -0
  242. package/contracts/registry/RegistryService.sol +383 -0
  243. package/contracts/shared/ERC165.sol +1 -1
  244. package/contracts/shared/IRegisterable.sol +7 -9
  245. package/contracts/shared/IVersionable.sol +55 -11
  246. package/contracts/shared/ProxyManager.sol +115 -0
  247. package/contracts/shared/Registerable.sol +74 -43
  248. package/contracts/shared/UpgradableProxyWithAdmin.sol +16 -0
  249. package/contracts/shared/Versionable.sol +112 -54
  250. package/contracts/test/TestDistribution.sol +22 -0
  251. package/contracts/test/TestPool.sol +7 -2
  252. package/contracts/test/TestProduct.sol +37 -7
  253. package/contracts/test/TestRegisterable.sol +5 -6
  254. package/contracts/test/TestService.sol +5 -11
  255. package/contracts/types/Fee.sol +8 -3
  256. package/contracts/types/ObjectType.sol +17 -5
  257. package/contracts/types/ReferralId.sol +48 -0
  258. package/contracts/types/RiskId.sol +43 -0
  259. package/contracts/types/RoleId.sol +2 -2
  260. package/contracts/types/Version.sol +9 -0
  261. package/package.json +1 -1
  262. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.dbg.json +0 -4
  263. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.json +0 -10
  264. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.dbg.json +0 -4
  265. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.dbg.json +0 -4
  266. package/contracts/experiment/statemachine/README.md +0 -112
  267. package/contracts/instance/module/compensation/CompensationModule.sol +0 -8
  268. package/contracts/instance/module/compensation/ICompensation.sol +0 -10
@@ -88,27 +88,9 @@
88
88
  "type": "address"
89
89
  }
90
90
  ],
91
- "name": "LogVersionableActivated",
91
+ "name": "LogVersionableInitialized",
92
92
  "type": "event"
93
93
  },
94
- {
95
- "inputs": [
96
- {
97
- "internalType": "address",
98
- "name": "implementation",
99
- "type": "address"
100
- },
101
- {
102
- "internalType": "address",
103
- "name": "activatedBy",
104
- "type": "address"
105
- }
106
- ],
107
- "name": "activate",
108
- "outputs": [],
109
- "stateMutability": "nonpayable",
110
- "type": "function"
111
- },
112
94
  {
113
95
  "inputs": [
114
96
  {
@@ -200,22 +182,34 @@
200
182
  "inputs": [
201
183
  {
202
184
  "internalType": "NftId",
203
- "name": "productNftId",
185
+ "name": "bundleNftId",
204
186
  "type": "uint96"
205
187
  },
206
188
  {
207
189
  "internalType": "NftId",
208
- "name": "policyNftId",
190
+ "name": "poolNftId",
209
191
  "type": "uint96"
210
192
  },
211
193
  {
212
- "internalType": "uint256",
213
- "name": "sumInsuredAmount",
214
- "type": "uint256"
194
+ "components": [
195
+ {
196
+ "internalType": "UFixed",
197
+ "name": "fractionalFee",
198
+ "type": "uint256"
199
+ },
200
+ {
201
+ "internalType": "uint256",
202
+ "name": "fixedFee",
203
+ "type": "uint256"
204
+ }
205
+ ],
206
+ "internalType": "struct Fee",
207
+ "name": "fee",
208
+ "type": "tuple"
215
209
  },
216
210
  {
217
211
  "internalType": "uint256",
218
- "name": "premiumAmount",
212
+ "name": "amount",
219
213
  "type": "uint256"
220
214
  },
221
215
  {
@@ -224,12 +218,12 @@
224
218
  "type": "uint256"
225
219
  },
226
220
  {
227
- "internalType": "NftId",
228
- "name": "bundleNftId",
229
- "type": "uint96"
221
+ "internalType": "bytes",
222
+ "name": "filter",
223
+ "type": "bytes"
230
224
  }
231
225
  ],
232
- "name": "createApplication",
226
+ "name": "createBundleInfo",
233
227
  "outputs": [],
234
228
  "stateMutability": "nonpayable",
235
229
  "type": "function"
@@ -238,17 +232,32 @@
238
232
  "inputs": [
239
233
  {
240
234
  "internalType": "NftId",
241
- "name": "bundleNftId",
235
+ "name": "policyNftId",
242
236
  "type": "uint96"
243
237
  },
244
238
  {
245
239
  "internalType": "NftId",
246
- "name": "poolNftId",
240
+ "name": "productNftId",
247
241
  "type": "uint96"
248
242
  },
243
+ {
244
+ "internalType": "ReferralId",
245
+ "name": "referralId",
246
+ "type": "bytes8"
247
+ },
248
+ {
249
+ "internalType": "RiskId",
250
+ "name": "riskId",
251
+ "type": "bytes8"
252
+ },
249
253
  {
250
254
  "internalType": "uint256",
251
- "name": "amount",
255
+ "name": "sumInsuredAmount",
256
+ "type": "uint256"
257
+ },
258
+ {
259
+ "internalType": "uint256",
260
+ "name": "premiumAmount",
252
261
  "type": "uint256"
253
262
  },
254
263
  {
@@ -256,13 +265,36 @@
256
265
  "name": "lifetime",
257
266
  "type": "uint256"
258
267
  },
268
+ {
269
+ "internalType": "NftId",
270
+ "name": "bundleNftId",
271
+ "type": "uint96"
272
+ }
273
+ ],
274
+ "name": "createPolicyInfo",
275
+ "outputs": [],
276
+ "stateMutability": "nonpayable",
277
+ "type": "function"
278
+ },
279
+ {
280
+ "inputs": [
281
+ {
282
+ "internalType": "RiskId",
283
+ "name": "riskId",
284
+ "type": "bytes8"
285
+ },
286
+ {
287
+ "internalType": "NftId",
288
+ "name": "productNftId",
289
+ "type": "uint96"
290
+ },
259
291
  {
260
292
  "internalType": "bytes",
261
- "name": "filter",
293
+ "name": "data",
262
294
  "type": "bytes"
263
295
  }
264
296
  ],
265
- "name": "createBundleInfo",
297
+ "name": "createRisk",
266
298
  "outputs": [],
267
299
  "stateMutability": "nonpayable",
268
300
  "type": "function"
@@ -309,7 +341,7 @@
309
341
  "inputs": [
310
342
  {
311
343
  "internalType": "NftId",
312
- "name": "bundleNftId",
344
+ "name": "nftId",
313
345
  "type": "uint96"
314
346
  }
315
347
  ],
@@ -319,13 +351,25 @@
319
351
  "components": [
320
352
  {
321
353
  "internalType": "NftId",
322
- "name": "nftId",
354
+ "name": "poolNftId",
323
355
  "type": "uint96"
324
356
  },
325
357
  {
326
- "internalType": "NftId",
327
- "name": "poolNftId",
328
- "type": "uint96"
358
+ "components": [
359
+ {
360
+ "internalType": "UFixed",
361
+ "name": "fractionalFee",
362
+ "type": "uint256"
363
+ },
364
+ {
365
+ "internalType": "uint256",
366
+ "name": "fixedFee",
367
+ "type": "uint256"
368
+ }
369
+ ],
370
+ "internalType": "struct Fee",
371
+ "name": "fee",
372
+ "type": "tuple"
329
373
  },
330
374
  {
331
375
  "internalType": "bytes",
@@ -443,12 +487,12 @@
443
487
  "type": "uint96"
444
488
  }
445
489
  ],
446
- "name": "getComponentState",
490
+ "name": "getComponentToken",
447
491
  "outputs": [
448
492
  {
449
- "internalType": "StateId",
450
- "name": "state",
451
- "type": "uint8"
493
+ "internalType": "contract IERC20Metadata",
494
+ "name": "token",
495
+ "type": "address"
452
496
  }
453
497
  ],
454
498
  "stateMutability": "view",
@@ -462,11 +506,11 @@
462
506
  "type": "uint96"
463
507
  }
464
508
  ],
465
- "name": "getComponentToken",
509
+ "name": "getComponentWallet",
466
510
  "outputs": [
467
511
  {
468
- "internalType": "contract IERC20Metadata",
469
- "name": "token",
512
+ "internalType": "address",
513
+ "name": "wallet",
470
514
  "type": "address"
471
515
  }
472
516
  ],
@@ -475,12 +519,12 @@
475
519
  },
476
520
  {
477
521
  "inputs": [],
478
- "name": "getData",
522
+ "name": "getDistributionService",
479
523
  "outputs": [
480
524
  {
481
- "internalType": "bytes",
482
- "name": "data",
483
- "type": "bytes"
525
+ "internalType": "contract IDistributionService",
526
+ "name": "",
527
+ "type": "address"
484
528
  }
485
529
  ],
486
530
  "stateMutability": "view",
@@ -524,12 +568,54 @@
524
568
  },
525
569
  {
526
570
  "inputs": [],
527
- "name": "getKeyValueStore",
571
+ "name": "getInitialInfo",
528
572
  "outputs": [
529
573
  {
530
- "internalType": "contract IKeyValueStore",
531
- "name": "keyValueStore",
532
- "type": "address"
574
+ "components": [
575
+ {
576
+ "internalType": "NftId",
577
+ "name": "nftId",
578
+ "type": "uint96"
579
+ },
580
+ {
581
+ "internalType": "NftId",
582
+ "name": "parentNftId",
583
+ "type": "uint96"
584
+ },
585
+ {
586
+ "internalType": "ObjectType",
587
+ "name": "objectType",
588
+ "type": "uint8"
589
+ },
590
+ {
591
+ "internalType": "bool",
592
+ "name": "isInterceptor",
593
+ "type": "bool"
594
+ },
595
+ {
596
+ "internalType": "address",
597
+ "name": "objectAddress",
598
+ "type": "address"
599
+ },
600
+ {
601
+ "internalType": "address",
602
+ "name": "initialOwner",
603
+ "type": "address"
604
+ },
605
+ {
606
+ "internalType": "bytes",
607
+ "name": "data",
608
+ "type": "bytes"
609
+ }
610
+ ],
611
+ "internalType": "struct IRegistry.ObjectInfo",
612
+ "name": "",
613
+ "type": "tuple"
614
+ },
615
+ {
616
+ "internalType": "bytes",
617
+ "name": "data",
618
+ "type": "bytes"
533
619
  }
534
620
  ],
535
621
  "stateMutability": "view",
@@ -537,12 +623,12 @@
537
623
  },
538
624
  {
539
625
  "inputs": [],
540
- "name": "getNftId",
626
+ "name": "getInitializedVersion",
541
627
  "outputs": [
542
628
  {
543
- "internalType": "NftId",
544
- "name": "nftId",
545
- "type": "uint96"
629
+ "internalType": "uint64",
630
+ "name": "",
631
+ "type": "uint64"
546
632
  }
547
633
  ],
548
634
  "stateMutability": "view",
@@ -550,11 +636,11 @@
550
636
  },
551
637
  {
552
638
  "inputs": [],
553
- "name": "getOwner",
639
+ "name": "getKeyValueStore",
554
640
  "outputs": [
555
641
  {
556
- "internalType": "address",
557
- "name": "owner",
642
+ "internalType": "contract IKeyValueStore",
643
+ "name": "keyValueStore",
558
644
  "type": "address"
559
645
  }
560
646
  ],
@@ -563,7 +649,7 @@
563
649
  },
564
650
  {
565
651
  "inputs": [],
566
- "name": "getParentNftId",
652
+ "name": "getNftId",
567
653
  "outputs": [
568
654
  {
569
655
  "internalType": "NftId",
@@ -574,6 +660,19 @@
574
660
  "stateMutability": "view",
575
661
  "type": "function"
576
662
  },
663
+ {
664
+ "inputs": [],
665
+ "name": "getOwner",
666
+ "outputs": [
667
+ {
668
+ "internalType": "address",
669
+ "name": "owner",
670
+ "type": "address"
671
+ }
672
+ ],
673
+ "stateMutability": "view",
674
+ "type": "function"
675
+ },
577
676
  {
578
677
  "inputs": [
579
678
  {
@@ -586,11 +685,6 @@
586
685
  "outputs": [
587
686
  {
588
687
  "components": [
589
- {
590
- "internalType": "NftId",
591
- "name": "nftId",
592
- "type": "uint96"
593
- },
594
688
  {
595
689
  "internalType": "NftId",
596
690
  "name": "productNftId",
@@ -601,15 +695,20 @@
601
695
  "name": "bundleNftId",
602
696
  "type": "uint96"
603
697
  },
698
+ {
699
+ "internalType": "ReferralId",
700
+ "name": "referralId",
701
+ "type": "bytes8"
702
+ },
604
703
  {
605
704
  "internalType": "address",
606
705
  "name": "beneficiary",
607
706
  "type": "address"
608
707
  },
609
708
  {
610
- "internalType": "StateId",
611
- "name": "state",
612
- "type": "uint8"
709
+ "internalType": "RiskId",
710
+ "name": "riskId",
711
+ "type": "bytes8"
613
712
  },
614
713
  {
615
714
  "internalType": "uint256",
@@ -641,11 +740,6 @@
641
740
  "name": "policyData",
642
741
  "type": "bytes"
643
742
  },
644
- {
645
- "internalType": "Timestamp",
646
- "name": "createdAt",
647
- "type": "uint40"
648
- },
649
743
  {
650
744
  "internalType": "Timestamp",
651
745
  "name": "activatedAt",
@@ -660,11 +754,6 @@
660
754
  "internalType": "Timestamp",
661
755
  "name": "closedAt",
662
756
  "type": "uint40"
663
- },
664
- {
665
- "internalType": "Blocknumber",
666
- "name": "updatedIn",
667
- "type": "uint32"
668
757
  }
669
758
  ],
670
759
  "internalType": "struct IPolicy.PolicyInfo",
@@ -687,11 +776,6 @@
687
776
  "outputs": [
688
777
  {
689
778
  "components": [
690
- {
691
- "internalType": "NftId",
692
- "name": "nftId",
693
- "type": "uint96"
694
- },
695
779
  {
696
780
  "internalType": "bool",
697
781
  "name": "isVerifying",
@@ -728,62 +812,16 @@
728
812
  "inputs": [
729
813
  {
730
814
  "internalType": "NftId",
731
- "name": "poolNftId",
815
+ "name": "componentNftId",
732
816
  "type": "uint96"
733
817
  }
734
818
  ],
735
- "name": "getPoolSetup",
819
+ "name": "getProductNftId",
736
820
  "outputs": [
737
821
  {
738
- "components": [
739
- {
740
- "internalType": "NftId",
741
- "name": "poolNftId",
742
- "type": "uint96"
743
- },
744
- {
745
- "internalType": "address",
746
- "name": "wallet",
747
- "type": "address"
748
- },
749
- {
750
- "components": [
751
- {
752
- "internalType": "UFixed",
753
- "name": "fractionalFee",
754
- "type": "uint256"
755
- },
756
- {
757
- "internalType": "uint256",
758
- "name": "fixedFee",
759
- "type": "uint256"
760
- }
761
- ],
762
- "internalType": "struct Fee",
763
- "name": "stakingFee",
764
- "type": "tuple"
765
- },
766
- {
767
- "components": [
768
- {
769
- "internalType": "UFixed",
770
- "name": "fractionalFee",
771
- "type": "uint256"
772
- },
773
- {
774
- "internalType": "uint256",
775
- "name": "fixedFee",
776
- "type": "uint256"
777
- }
778
- ],
779
- "internalType": "struct Fee",
780
- "name": "performanceFee",
781
- "type": "tuple"
782
- }
783
- ],
784
- "internalType": "struct ITreasury.PoolSetup",
785
- "name": "setup",
786
- "type": "tuple"
822
+ "internalType": "NftId",
823
+ "name": "productNftId",
824
+ "type": "uint96"
787
825
  }
788
826
  ],
789
827
  "stateMutability": "view",
@@ -802,15 +840,28 @@
802
840
  "stateMutability": "view",
803
841
  "type": "function"
804
842
  },
843
+ {
844
+ "inputs": [],
845
+ "name": "getRegistry",
846
+ "outputs": [
847
+ {
848
+ "internalType": "contract IRegistry",
849
+ "name": "registry",
850
+ "type": "address"
851
+ }
852
+ ],
853
+ "stateMutability": "view",
854
+ "type": "function"
855
+ },
805
856
  {
806
857
  "inputs": [
807
858
  {
808
- "internalType": "NftId",
809
- "name": "productNftId",
810
- "type": "uint96"
859
+ "internalType": "RiskId",
860
+ "name": "riskId",
861
+ "type": "bytes8"
811
862
  }
812
863
  ],
813
- "name": "getProductSetup",
864
+ "name": "getRiskInfo",
814
865
  "outputs": [
815
866
  {
816
867
  "components": [
@@ -820,81 +871,19 @@
820
871
  "type": "uint96"
821
872
  },
822
873
  {
823
- "internalType": "NftId",
824
- "name": "distributorNftId",
825
- "type": "uint96"
826
- },
827
- {
828
- "internalType": "NftId",
829
- "name": "poolNftId",
830
- "type": "uint96"
831
- },
832
- {
833
- "internalType": "contract IERC20Metadata",
834
- "name": "token",
835
- "type": "address"
836
- },
837
- {
838
- "internalType": "address",
839
- "name": "wallet",
840
- "type": "address"
841
- },
842
- {
843
- "components": [
844
- {
845
- "internalType": "UFixed",
846
- "name": "fractionalFee",
847
- "type": "uint256"
848
- },
849
- {
850
- "internalType": "uint256",
851
- "name": "fixedFee",
852
- "type": "uint256"
853
- }
854
- ],
855
- "internalType": "struct Fee",
856
- "name": "policyFee",
857
- "type": "tuple"
858
- },
859
- {
860
- "components": [
861
- {
862
- "internalType": "UFixed",
863
- "name": "fractionalFee",
864
- "type": "uint256"
865
- },
866
- {
867
- "internalType": "uint256",
868
- "name": "fixedFee",
869
- "type": "uint256"
870
- }
871
- ],
872
- "internalType": "struct Fee",
873
- "name": "processingFee",
874
- "type": "tuple"
874
+ "internalType": "bytes",
875
+ "name": "data",
876
+ "type": "bytes"
875
877
  }
876
878
  ],
877
- "internalType": "struct ITreasury.ProductSetup",
878
- "name": "setup",
879
+ "internalType": "struct IRisk.RiskInfo",
880
+ "name": "info",
879
881
  "type": "tuple"
880
882
  }
881
883
  ],
882
884
  "stateMutability": "view",
883
885
  "type": "function"
884
886
  },
885
- {
886
- "inputs": [],
887
- "name": "getRegistry",
888
- "outputs": [
889
- {
890
- "internalType": "contract IRegistry",
891
- "name": "registry",
892
- "type": "address"
893
- }
894
- ],
895
- "stateMutability": "view",
896
- "type": "function"
897
- },
898
887
  {
899
888
  "inputs": [
900
889
  {
@@ -1025,6 +1014,25 @@
1025
1014
  "stateMutability": "view",
1026
1015
  "type": "function"
1027
1016
  },
1017
+ {
1018
+ "inputs": [
1019
+ {
1020
+ "internalType": "Key32",
1021
+ "name": "key",
1022
+ "type": "bytes32"
1023
+ }
1024
+ ],
1025
+ "name": "getState",
1026
+ "outputs": [
1027
+ {
1028
+ "internalType": "StateId",
1029
+ "name": "state",
1030
+ "type": "uint8"
1031
+ }
1032
+ ],
1033
+ "stateMutability": "view",
1034
+ "type": "function"
1035
+ },
1028
1036
  {
1029
1037
  "inputs": [
1030
1038
  {
@@ -1045,16 +1053,141 @@
1045
1053
  "type": "function"
1046
1054
  },
1047
1055
  {
1048
- "inputs": [],
1049
- "name": "getType",
1056
+ "inputs": [
1057
+ {
1058
+ "internalType": "NftId",
1059
+ "name": "productNftId",
1060
+ "type": "uint96"
1061
+ }
1062
+ ],
1063
+ "name": "getTreasuryInfo",
1050
1064
  "outputs": [
1051
1065
  {
1052
- "internalType": "ObjectType",
1053
- "name": "objectType",
1054
- "type": "uint8"
1066
+ "components": [
1067
+ {
1068
+ "internalType": "NftId",
1069
+ "name": "poolNftId",
1070
+ "type": "uint96"
1071
+ },
1072
+ {
1073
+ "internalType": "NftId",
1074
+ "name": "distributionNftId",
1075
+ "type": "uint96"
1076
+ },
1077
+ {
1078
+ "internalType": "contract IERC20Metadata",
1079
+ "name": "token",
1080
+ "type": "address"
1081
+ },
1082
+ {
1083
+ "components": [
1084
+ {
1085
+ "internalType": "UFixed",
1086
+ "name": "fractionalFee",
1087
+ "type": "uint256"
1088
+ },
1089
+ {
1090
+ "internalType": "uint256",
1091
+ "name": "fixedFee",
1092
+ "type": "uint256"
1093
+ }
1094
+ ],
1095
+ "internalType": "struct Fee",
1096
+ "name": "productFee",
1097
+ "type": "tuple"
1098
+ },
1099
+ {
1100
+ "components": [
1101
+ {
1102
+ "internalType": "UFixed",
1103
+ "name": "fractionalFee",
1104
+ "type": "uint256"
1105
+ },
1106
+ {
1107
+ "internalType": "uint256",
1108
+ "name": "fixedFee",
1109
+ "type": "uint256"
1110
+ }
1111
+ ],
1112
+ "internalType": "struct Fee",
1113
+ "name": "processingFee",
1114
+ "type": "tuple"
1115
+ },
1116
+ {
1117
+ "components": [
1118
+ {
1119
+ "internalType": "UFixed",
1120
+ "name": "fractionalFee",
1121
+ "type": "uint256"
1122
+ },
1123
+ {
1124
+ "internalType": "uint256",
1125
+ "name": "fixedFee",
1126
+ "type": "uint256"
1127
+ }
1128
+ ],
1129
+ "internalType": "struct Fee",
1130
+ "name": "poolFee",
1131
+ "type": "tuple"
1132
+ },
1133
+ {
1134
+ "components": [
1135
+ {
1136
+ "internalType": "UFixed",
1137
+ "name": "fractionalFee",
1138
+ "type": "uint256"
1139
+ },
1140
+ {
1141
+ "internalType": "uint256",
1142
+ "name": "fixedFee",
1143
+ "type": "uint256"
1144
+ }
1145
+ ],
1146
+ "internalType": "struct Fee",
1147
+ "name": "stakingFee",
1148
+ "type": "tuple"
1149
+ },
1150
+ {
1151
+ "components": [
1152
+ {
1153
+ "internalType": "UFixed",
1154
+ "name": "fractionalFee",
1155
+ "type": "uint256"
1156
+ },
1157
+ {
1158
+ "internalType": "uint256",
1159
+ "name": "fixedFee",
1160
+ "type": "uint256"
1161
+ }
1162
+ ],
1163
+ "internalType": "struct Fee",
1164
+ "name": "performanceFee",
1165
+ "type": "tuple"
1166
+ },
1167
+ {
1168
+ "components": [
1169
+ {
1170
+ "internalType": "UFixed",
1171
+ "name": "fractionalFee",
1172
+ "type": "uint256"
1173
+ },
1174
+ {
1175
+ "internalType": "uint256",
1176
+ "name": "fixedFee",
1177
+ "type": "uint256"
1178
+ }
1179
+ ],
1180
+ "internalType": "struct Fee",
1181
+ "name": "distributionFee",
1182
+ "type": "tuple"
1183
+ }
1184
+ ],
1185
+ "internalType": "struct ITreasury.TreasuryInfo",
1186
+ "name": "info",
1187
+ "type": "tuple"
1055
1188
  }
1056
1189
  ],
1057
- "stateMutability": "pure",
1190
+ "stateMutability": "view",
1058
1191
  "type": "function"
1059
1192
  },
1060
1193
  {
@@ -1213,7 +1346,7 @@
1213
1346
  "type": "tuple"
1214
1347
  }
1215
1348
  ],
1216
- "stateMutability": "pure",
1349
+ "stateMutability": "view",
1217
1350
  "type": "function"
1218
1351
  },
1219
1352
  {
@@ -1261,16 +1394,16 @@
1261
1394
  {
1262
1395
  "inputs": [
1263
1396
  {
1264
- "internalType": "Version",
1265
- "name": "version",
1266
- "type": "uint24"
1397
+ "internalType": "NftId",
1398
+ "name": "productNftId",
1399
+ "type": "uint96"
1267
1400
  }
1268
1401
  ],
1269
- "name": "isActivated",
1402
+ "name": "hasTreasuryInfo",
1270
1403
  "outputs": [
1271
1404
  {
1272
1405
  "internalType": "bool",
1273
- "name": "",
1406
+ "name": "hasInfo",
1274
1407
  "type": "bool"
1275
1408
  }
1276
1409
  ],
@@ -1278,16 +1411,45 @@
1278
1411
  "type": "function"
1279
1412
  },
1280
1413
  {
1281
- "inputs": [],
1282
- "name": "register",
1283
- "outputs": [
1414
+ "inputs": [
1284
1415
  {
1285
- "internalType": "NftId",
1286
- "name": "nftId",
1287
- "type": "uint96"
1288
- }
1289
- ],
1290
- "stateMutability": "nonpayable",
1416
+ "internalType": "address",
1417
+ "name": "implementation",
1418
+ "type": "address"
1419
+ },
1420
+ {
1421
+ "internalType": "address",
1422
+ "name": "activatedBy",
1423
+ "type": "address"
1424
+ },
1425
+ {
1426
+ "internalType": "bytes",
1427
+ "name": "activationData",
1428
+ "type": "bytes"
1429
+ }
1430
+ ],
1431
+ "name": "initialize",
1432
+ "outputs": [],
1433
+ "stateMutability": "nonpayable",
1434
+ "type": "function"
1435
+ },
1436
+ {
1437
+ "inputs": [
1438
+ {
1439
+ "internalType": "Version",
1440
+ "name": "version",
1441
+ "type": "uint24"
1442
+ }
1443
+ ],
1444
+ "name": "isInitialized",
1445
+ "outputs": [
1446
+ {
1447
+ "internalType": "bool",
1448
+ "name": "",
1449
+ "type": "bool"
1450
+ }
1451
+ ],
1452
+ "stateMutability": "view",
1291
1453
  "type": "function"
1292
1454
  },
1293
1455
  {
@@ -1301,6 +1463,11 @@
1301
1463
  "internalType": "contract IERC20Metadata",
1302
1464
  "name": "token",
1303
1465
  "type": "address"
1466
+ },
1467
+ {
1468
+ "internalType": "address",
1469
+ "name": "wallet",
1470
+ "type": "address"
1304
1471
  }
1305
1472
  ],
1306
1473
  "name": "registerComponent",
@@ -1312,46 +1479,24 @@
1312
1479
  "inputs": [
1313
1480
  {
1314
1481
  "internalType": "NftId",
1315
- "name": "poolNftId",
1482
+ "name": "nftId",
1316
1483
  "type": "uint96"
1317
1484
  },
1318
- {
1319
- "internalType": "address",
1320
- "name": "wallet",
1321
- "type": "address"
1322
- },
1323
1485
  {
1324
1486
  "components": [
1325
1487
  {
1326
- "internalType": "UFixed",
1327
- "name": "fractionalFee",
1328
- "type": "uint256"
1488
+ "internalType": "bool",
1489
+ "name": "isVerifying",
1490
+ "type": "bool"
1329
1491
  },
1330
- {
1331
- "internalType": "uint256",
1332
- "name": "fixedFee",
1333
- "type": "uint256"
1334
- }
1335
- ],
1336
- "internalType": "struct Fee",
1337
- "name": "stakingFee",
1338
- "type": "tuple"
1339
- },
1340
- {
1341
- "components": [
1342
1492
  {
1343
1493
  "internalType": "UFixed",
1344
- "name": "fractionalFee",
1345
- "type": "uint256"
1346
- },
1347
- {
1348
- "internalType": "uint256",
1349
- "name": "fixedFee",
1494
+ "name": "collateralizationLevel",
1350
1495
  "type": "uint256"
1351
1496
  }
1352
1497
  ],
1353
- "internalType": "struct Fee",
1354
- "name": "performanceFee",
1498
+ "internalType": "struct IPool.PoolInfo",
1499
+ "name": "info",
1355
1500
  "type": "tuple"
1356
1501
  }
1357
1502
  ],
@@ -1360,29 +1505,6 @@
1360
1505
  "stateMutability": "nonpayable",
1361
1506
  "type": "function"
1362
1507
  },
1363
- {
1364
- "inputs": [
1365
- {
1366
- "internalType": "NftId",
1367
- "name": "poolNftId",
1368
- "type": "uint96"
1369
- },
1370
- {
1371
- "internalType": "bool",
1372
- "name": "isVerifying",
1373
- "type": "bool"
1374
- },
1375
- {
1376
- "internalType": "UFixed",
1377
- "name": "collateralizationLevel",
1378
- "type": "uint256"
1379
- }
1380
- ],
1381
- "name": "registerPool",
1382
- "outputs": [],
1383
- "stateMutability": "nonpayable",
1384
- "type": "function"
1385
- },
1386
1508
  {
1387
1509
  "inputs": [
1388
1510
  {
@@ -1390,62 +1512,132 @@
1390
1512
  "name": "productNftId",
1391
1513
  "type": "uint96"
1392
1514
  },
1393
- {
1394
- "internalType": "NftId",
1395
- "name": "distributorNftId",
1396
- "type": "uint96"
1397
- },
1398
- {
1399
- "internalType": "NftId",
1400
- "name": "poolNftId",
1401
- "type": "uint96"
1402
- },
1403
- {
1404
- "internalType": "contract IERC20Metadata",
1405
- "name": "token",
1406
- "type": "address"
1407
- },
1408
- {
1409
- "internalType": "address",
1410
- "name": "wallet",
1411
- "type": "address"
1412
- },
1413
1515
  {
1414
1516
  "components": [
1415
1517
  {
1416
- "internalType": "UFixed",
1417
- "name": "fractionalFee",
1418
- "type": "uint256"
1518
+ "internalType": "NftId",
1519
+ "name": "poolNftId",
1520
+ "type": "uint96"
1419
1521
  },
1420
1522
  {
1421
- "internalType": "uint256",
1422
- "name": "fixedFee",
1423
- "type": "uint256"
1424
- }
1425
- ],
1426
- "internalType": "struct Fee",
1427
- "name": "policyFee",
1428
- "type": "tuple"
1429
- },
1430
- {
1431
- "components": [
1523
+ "internalType": "NftId",
1524
+ "name": "distributionNftId",
1525
+ "type": "uint96"
1526
+ },
1432
1527
  {
1433
- "internalType": "UFixed",
1434
- "name": "fractionalFee",
1435
- "type": "uint256"
1528
+ "internalType": "contract IERC20Metadata",
1529
+ "name": "token",
1530
+ "type": "address"
1436
1531
  },
1437
1532
  {
1438
- "internalType": "uint256",
1439
- "name": "fixedFee",
1440
- "type": "uint256"
1533
+ "components": [
1534
+ {
1535
+ "internalType": "UFixed",
1536
+ "name": "fractionalFee",
1537
+ "type": "uint256"
1538
+ },
1539
+ {
1540
+ "internalType": "uint256",
1541
+ "name": "fixedFee",
1542
+ "type": "uint256"
1543
+ }
1544
+ ],
1545
+ "internalType": "struct Fee",
1546
+ "name": "productFee",
1547
+ "type": "tuple"
1548
+ },
1549
+ {
1550
+ "components": [
1551
+ {
1552
+ "internalType": "UFixed",
1553
+ "name": "fractionalFee",
1554
+ "type": "uint256"
1555
+ },
1556
+ {
1557
+ "internalType": "uint256",
1558
+ "name": "fixedFee",
1559
+ "type": "uint256"
1560
+ }
1561
+ ],
1562
+ "internalType": "struct Fee",
1563
+ "name": "processingFee",
1564
+ "type": "tuple"
1565
+ },
1566
+ {
1567
+ "components": [
1568
+ {
1569
+ "internalType": "UFixed",
1570
+ "name": "fractionalFee",
1571
+ "type": "uint256"
1572
+ },
1573
+ {
1574
+ "internalType": "uint256",
1575
+ "name": "fixedFee",
1576
+ "type": "uint256"
1577
+ }
1578
+ ],
1579
+ "internalType": "struct Fee",
1580
+ "name": "poolFee",
1581
+ "type": "tuple"
1582
+ },
1583
+ {
1584
+ "components": [
1585
+ {
1586
+ "internalType": "UFixed",
1587
+ "name": "fractionalFee",
1588
+ "type": "uint256"
1589
+ },
1590
+ {
1591
+ "internalType": "uint256",
1592
+ "name": "fixedFee",
1593
+ "type": "uint256"
1594
+ }
1595
+ ],
1596
+ "internalType": "struct Fee",
1597
+ "name": "stakingFee",
1598
+ "type": "tuple"
1599
+ },
1600
+ {
1601
+ "components": [
1602
+ {
1603
+ "internalType": "UFixed",
1604
+ "name": "fractionalFee",
1605
+ "type": "uint256"
1606
+ },
1607
+ {
1608
+ "internalType": "uint256",
1609
+ "name": "fixedFee",
1610
+ "type": "uint256"
1611
+ }
1612
+ ],
1613
+ "internalType": "struct Fee",
1614
+ "name": "performanceFee",
1615
+ "type": "tuple"
1616
+ },
1617
+ {
1618
+ "components": [
1619
+ {
1620
+ "internalType": "UFixed",
1621
+ "name": "fractionalFee",
1622
+ "type": "uint256"
1623
+ },
1624
+ {
1625
+ "internalType": "uint256",
1626
+ "name": "fixedFee",
1627
+ "type": "uint256"
1628
+ }
1629
+ ],
1630
+ "internalType": "struct Fee",
1631
+ "name": "distributionFee",
1632
+ "type": "tuple"
1441
1633
  }
1442
1634
  ],
1443
- "internalType": "struct Fee",
1444
- "name": "processingFee",
1635
+ "internalType": "struct ITreasury.TreasuryInfo",
1636
+ "name": "info",
1445
1637
  "type": "tuple"
1446
1638
  }
1447
1639
  ],
1448
- "name": "registerProduct",
1640
+ "name": "registerProductSetup",
1449
1641
  "outputs": [],
1450
1642
  "stateMutability": "nonpayable",
1451
1643
  "type": "function"
@@ -1513,17 +1705,34 @@
1513
1705
  },
1514
1706
  {
1515
1707
  "inputs": [
1708
+ {
1709
+ "internalType": "NftId",
1710
+ "name": "nftId",
1711
+ "type": "uint96"
1712
+ },
1516
1713
  {
1517
1714
  "components": [
1518
1715
  {
1519
1716
  "internalType": "NftId",
1520
- "name": "nftId",
1717
+ "name": "poolNftId",
1521
1718
  "type": "uint96"
1522
1719
  },
1523
1720
  {
1524
- "internalType": "NftId",
1525
- "name": "poolNftId",
1526
- "type": "uint96"
1721
+ "components": [
1722
+ {
1723
+ "internalType": "UFixed",
1724
+ "name": "fractionalFee",
1725
+ "type": "uint256"
1726
+ },
1727
+ {
1728
+ "internalType": "uint256",
1729
+ "name": "fixedFee",
1730
+ "type": "uint256"
1731
+ }
1732
+ ],
1733
+ "internalType": "struct Fee",
1734
+ "name": "fee",
1735
+ "type": "tuple"
1527
1736
  },
1528
1737
  {
1529
1738
  "internalType": "bytes",
@@ -1568,13 +1777,13 @@
1568
1777
  },
1569
1778
  {
1570
1779
  "inputs": [
1780
+ {
1781
+ "internalType": "NftId",
1782
+ "name": "policyNftId",
1783
+ "type": "uint96"
1784
+ },
1571
1785
  {
1572
1786
  "components": [
1573
- {
1574
- "internalType": "NftId",
1575
- "name": "nftId",
1576
- "type": "uint96"
1577
- },
1578
1787
  {
1579
1788
  "internalType": "NftId",
1580
1789
  "name": "productNftId",
@@ -1585,15 +1794,20 @@
1585
1794
  "name": "bundleNftId",
1586
1795
  "type": "uint96"
1587
1796
  },
1797
+ {
1798
+ "internalType": "ReferralId",
1799
+ "name": "referralId",
1800
+ "type": "bytes8"
1801
+ },
1588
1802
  {
1589
1803
  "internalType": "address",
1590
1804
  "name": "beneficiary",
1591
1805
  "type": "address"
1592
1806
  },
1593
1807
  {
1594
- "internalType": "StateId",
1595
- "name": "state",
1596
- "type": "uint8"
1808
+ "internalType": "RiskId",
1809
+ "name": "riskId",
1810
+ "type": "bytes8"
1597
1811
  },
1598
1812
  {
1599
1813
  "internalType": "uint256",
@@ -1625,11 +1839,6 @@
1625
1839
  "name": "policyData",
1626
1840
  "type": "bytes"
1627
1841
  },
1628
- {
1629
- "internalType": "Timestamp",
1630
- "name": "createdAt",
1631
- "type": "uint40"
1632
- },
1633
1842
  {
1634
1843
  "internalType": "Timestamp",
1635
1844
  "name": "activatedAt",
@@ -1644,15 +1853,10 @@
1644
1853
  "internalType": "Timestamp",
1645
1854
  "name": "closedAt",
1646
1855
  "type": "uint40"
1647
- },
1648
- {
1649
- "internalType": "Blocknumber",
1650
- "name": "updatedIn",
1651
- "type": "uint32"
1652
1856
  }
1653
1857
  ],
1654
1858
  "internalType": "struct IPolicy.PolicyInfo",
1655
- "name": "policyInfo",
1859
+ "name": "info",
1656
1860
  "type": "tuple"
1657
1861
  }
1658
1862
  ],
@@ -1664,46 +1868,47 @@
1664
1868
  {
1665
1869
  "inputs": [
1666
1870
  {
1667
- "internalType": "NftId",
1668
- "name": "poolNftId",
1669
- "type": "uint96"
1871
+ "internalType": "RiskId",
1872
+ "name": "riskId",
1873
+ "type": "bytes8"
1670
1874
  },
1671
1875
  {
1672
1876
  "components": [
1673
1877
  {
1674
- "internalType": "UFixed",
1675
- "name": "fractionalFee",
1676
- "type": "uint256"
1878
+ "internalType": "NftId",
1879
+ "name": "productNftId",
1880
+ "type": "uint96"
1677
1881
  },
1678
1882
  {
1679
- "internalType": "uint256",
1680
- "name": "fixedFee",
1681
- "type": "uint256"
1883
+ "internalType": "bytes",
1884
+ "name": "data",
1885
+ "type": "bytes"
1682
1886
  }
1683
1887
  ],
1684
- "internalType": "struct Fee",
1685
- "name": "stakingFee",
1888
+ "internalType": "struct IRisk.RiskInfo",
1889
+ "name": "info",
1686
1890
  "type": "tuple"
1891
+ }
1892
+ ],
1893
+ "name": "setRiskInfo",
1894
+ "outputs": [],
1895
+ "stateMutability": "nonpayable",
1896
+ "type": "function"
1897
+ },
1898
+ {
1899
+ "inputs": [
1900
+ {
1901
+ "internalType": "RoleId",
1902
+ "name": "role",
1903
+ "type": "bytes8"
1687
1904
  },
1688
1905
  {
1689
- "components": [
1690
- {
1691
- "internalType": "UFixed",
1692
- "name": "fractionalFee",
1693
- "type": "uint256"
1694
- },
1695
- {
1696
- "internalType": "uint256",
1697
- "name": "fixedFee",
1698
- "type": "uint256"
1699
- }
1700
- ],
1701
- "internalType": "struct Fee",
1702
- "name": "performanceFee",
1703
- "type": "tuple"
1906
+ "internalType": "bool",
1907
+ "name": "active",
1908
+ "type": "bool"
1704
1909
  }
1705
1910
  ],
1706
- "name": "setPoolFees",
1911
+ "name": "setRoleState",
1707
1912
  "outputs": [],
1708
1913
  "stateMutability": "nonpayable",
1709
1914
  "type": "function"
@@ -1718,57 +1923,129 @@
1718
1923
  {
1719
1924
  "components": [
1720
1925
  {
1721
- "internalType": "UFixed",
1722
- "name": "fractionalFee",
1723
- "type": "uint256"
1926
+ "internalType": "NftId",
1927
+ "name": "poolNftId",
1928
+ "type": "uint96"
1724
1929
  },
1725
1930
  {
1726
- "internalType": "uint256",
1727
- "name": "fixedFee",
1728
- "type": "uint256"
1729
- }
1730
- ],
1731
- "internalType": "struct Fee",
1732
- "name": "policyFee",
1733
- "type": "tuple"
1734
- },
1735
- {
1736
- "components": [
1931
+ "internalType": "NftId",
1932
+ "name": "distributionNftId",
1933
+ "type": "uint96"
1934
+ },
1737
1935
  {
1738
- "internalType": "UFixed",
1739
- "name": "fractionalFee",
1740
- "type": "uint256"
1936
+ "internalType": "contract IERC20Metadata",
1937
+ "name": "token",
1938
+ "type": "address"
1741
1939
  },
1742
1940
  {
1743
- "internalType": "uint256",
1744
- "name": "fixedFee",
1745
- "type": "uint256"
1941
+ "components": [
1942
+ {
1943
+ "internalType": "UFixed",
1944
+ "name": "fractionalFee",
1945
+ "type": "uint256"
1946
+ },
1947
+ {
1948
+ "internalType": "uint256",
1949
+ "name": "fixedFee",
1950
+ "type": "uint256"
1951
+ }
1952
+ ],
1953
+ "internalType": "struct Fee",
1954
+ "name": "productFee",
1955
+ "type": "tuple"
1956
+ },
1957
+ {
1958
+ "components": [
1959
+ {
1960
+ "internalType": "UFixed",
1961
+ "name": "fractionalFee",
1962
+ "type": "uint256"
1963
+ },
1964
+ {
1965
+ "internalType": "uint256",
1966
+ "name": "fixedFee",
1967
+ "type": "uint256"
1968
+ }
1969
+ ],
1970
+ "internalType": "struct Fee",
1971
+ "name": "processingFee",
1972
+ "type": "tuple"
1973
+ },
1974
+ {
1975
+ "components": [
1976
+ {
1977
+ "internalType": "UFixed",
1978
+ "name": "fractionalFee",
1979
+ "type": "uint256"
1980
+ },
1981
+ {
1982
+ "internalType": "uint256",
1983
+ "name": "fixedFee",
1984
+ "type": "uint256"
1985
+ }
1986
+ ],
1987
+ "internalType": "struct Fee",
1988
+ "name": "poolFee",
1989
+ "type": "tuple"
1990
+ },
1991
+ {
1992
+ "components": [
1993
+ {
1994
+ "internalType": "UFixed",
1995
+ "name": "fractionalFee",
1996
+ "type": "uint256"
1997
+ },
1998
+ {
1999
+ "internalType": "uint256",
2000
+ "name": "fixedFee",
2001
+ "type": "uint256"
2002
+ }
2003
+ ],
2004
+ "internalType": "struct Fee",
2005
+ "name": "stakingFee",
2006
+ "type": "tuple"
2007
+ },
2008
+ {
2009
+ "components": [
2010
+ {
2011
+ "internalType": "UFixed",
2012
+ "name": "fractionalFee",
2013
+ "type": "uint256"
2014
+ },
2015
+ {
2016
+ "internalType": "uint256",
2017
+ "name": "fixedFee",
2018
+ "type": "uint256"
2019
+ }
2020
+ ],
2021
+ "internalType": "struct Fee",
2022
+ "name": "performanceFee",
2023
+ "type": "tuple"
2024
+ },
2025
+ {
2026
+ "components": [
2027
+ {
2028
+ "internalType": "UFixed",
2029
+ "name": "fractionalFee",
2030
+ "type": "uint256"
2031
+ },
2032
+ {
2033
+ "internalType": "uint256",
2034
+ "name": "fixedFee",
2035
+ "type": "uint256"
2036
+ }
2037
+ ],
2038
+ "internalType": "struct Fee",
2039
+ "name": "distributionFee",
2040
+ "type": "tuple"
1746
2041
  }
1747
2042
  ],
1748
- "internalType": "struct Fee",
1749
- "name": "processingFee",
2043
+ "internalType": "struct ITreasury.TreasuryInfo",
2044
+ "name": "info",
1750
2045
  "type": "tuple"
1751
2046
  }
1752
2047
  ],
1753
- "name": "setProductFees",
1754
- "outputs": [],
1755
- "stateMutability": "nonpayable",
1756
- "type": "function"
1757
- },
1758
- {
1759
- "inputs": [
1760
- {
1761
- "internalType": "RoleId",
1762
- "name": "role",
1763
- "type": "bytes8"
1764
- },
1765
- {
1766
- "internalType": "bool",
1767
- "name": "active",
1768
- "type": "bool"
1769
- }
1770
- ],
1771
- "name": "setRoleState",
2048
+ "name": "setTreasuryInfo",
1772
2049
  "outputs": [],
1773
2050
  "stateMutability": "nonpayable",
1774
2051
  "type": "function"
@@ -1796,26 +2073,25 @@
1796
2073
  "inputs": [
1797
2074
  {
1798
2075
  "internalType": "NftId",
1799
- "name": "bundleNftId",
2076
+ "name": "nftId",
1800
2077
  "type": "uint96"
1801
- }
1802
- ],
1803
- "name": "toBundleKey32",
1804
- "outputs": [
2078
+ },
1805
2079
  {
1806
- "internalType": "Key32",
1807
- "name": "key32",
1808
- "type": "bytes32"
2080
+ "internalType": "StateId",
2081
+ "name": "state",
2082
+ "type": "uint8"
1809
2083
  }
1810
2084
  ],
1811
- "stateMutability": "view",
2085
+ "name": "updateBundleState",
2086
+ "outputs": [],
2087
+ "stateMutability": "nonpayable",
1812
2088
  "type": "function"
1813
2089
  },
1814
2090
  {
1815
2091
  "inputs": [
1816
2092
  {
1817
2093
  "internalType": "NftId",
1818
- "name": "bundleNftId",
2094
+ "name": "nftId",
1819
2095
  "type": "uint96"
1820
2096
  },
1821
2097
  {
@@ -1824,7 +2100,25 @@
1824
2100
  "type": "uint8"
1825
2101
  }
1826
2102
  ],
1827
- "name": "updateBundleState",
2103
+ "name": "updatePolicyState",
2104
+ "outputs": [],
2105
+ "stateMutability": "nonpayable",
2106
+ "type": "function"
2107
+ },
2108
+ {
2109
+ "inputs": [
2110
+ {
2111
+ "internalType": "RiskId",
2112
+ "name": "riskId",
2113
+ "type": "bytes8"
2114
+ },
2115
+ {
2116
+ "internalType": "StateId",
2117
+ "name": "state",
2118
+ "type": "uint8"
2119
+ }
2120
+ ],
2121
+ "name": "updateRiskState",
1828
2122
  "outputs": [],
1829
2123
  "stateMutability": "nonpayable",
1830
2124
  "type": "function"
@@ -1846,6 +2140,29 @@
1846
2140
  "outputs": [],
1847
2141
  "stateMutability": "nonpayable",
1848
2142
  "type": "function"
2143
+ },
2144
+ {
2145
+ "inputs": [
2146
+ {
2147
+ "internalType": "address",
2148
+ "name": "implementation",
2149
+ "type": "address"
2150
+ },
2151
+ {
2152
+ "internalType": "address",
2153
+ "name": "activatedBy",
2154
+ "type": "address"
2155
+ },
2156
+ {
2157
+ "internalType": "bytes",
2158
+ "name": "upgradeData",
2159
+ "type": "bytes"
2160
+ }
2161
+ ],
2162
+ "name": "upgrade",
2163
+ "outputs": [],
2164
+ "stateMutability": "nonpayable",
2165
+ "type": "function"
1849
2166
  }
1850
2167
  ],
1851
2168
  "bytecode": "0x",