@etherisc/gif-next 0.0.2-ab8a361 → 0.0.2-accfb48-991

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 (396) hide show
  1. package/README.md +301 -7
  2. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +4 -0
  3. package/artifacts/contracts/{instance/component/ComponentModule.sol/ComponentModule.json → components/BaseComponent.sol/BaseComponent.json} +156 -156
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +618 -0
  6. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +4 -0
  7. package/artifacts/contracts/{instance/component/IComponent.sol/IComponentModule.json → components/IBaseComponent.sol/IBaseComponent.json} +139 -104
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
  9. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +152 -0
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +4 -0
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +249 -0
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +4 -0
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +157 -0
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +611 -37
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +544 -46
  18. package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.dbg.json +4 -0
  19. package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.json +66 -0
  20. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.dbg.json +4 -0
  21. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.json +24 -0
  22. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.dbg.json +4 -0
  23. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.json +42 -0
  24. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
  25. package/artifacts/contracts/experiment/errors/Require.sol/Require.json +2 -2
  26. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
  27. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +2 -2
  28. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  29. package/artifacts/contracts/experiment/inheritance/A.sol/A.json +2 -2
  30. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  31. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +2 -2
  32. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
  33. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
  34. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
  35. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
  36. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
  37. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
  38. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +4 -0
  39. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +59 -0
  40. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +4 -0
  41. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.json +124 -0
  42. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +4 -0
  43. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +74 -0
  44. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +4 -0
  45. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +124 -0
  46. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +4 -0
  47. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +207 -0
  48. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  49. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +2 -2
  50. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  51. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +2 -2
  52. package/artifacts/contracts/instance/AccessManagedSimple.sol/AccessManagedSimple.dbg.json +4 -0
  53. package/artifacts/contracts/instance/AccessManagedSimple.sol/AccessManagedSimple.json +101 -0
  54. package/artifacts/contracts/instance/AccessManagerSimple.sol/AccessManagerSimple.dbg.json +4 -0
  55. package/artifacts/contracts/instance/AccessManagerSimple.sol/AccessManagerSimple.json +1132 -0
  56. package/artifacts/contracts/instance/IAccessManagerSimple.sol/IAccessManagerSimple.dbg.json +4 -0
  57. package/artifacts/contracts/instance/IAccessManagerSimple.sol/IAccessManagerSimple.json +1082 -0
  58. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  59. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +1268 -475
  60. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +4 -0
  61. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +480 -0
  62. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  63. package/artifacts/contracts/instance/Instance.sol/Instance.json +3077 -562
  64. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +4 -0
  65. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +917 -0
  66. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +4 -0
  67. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +1422 -0
  68. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +4 -0
  69. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +931 -0
  70. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +4 -0
  71. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +508 -0
  72. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +4 -0
  73. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.json +540 -0
  74. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +4 -0
  75. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +113 -0
  76. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
  77. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +429 -0
  78. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +4 -0
  79. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.json +115 -0
  80. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
  81. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +502 -0
  82. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +4 -0
  83. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +169 -0
  84. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +4 -0
  85. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +211 -0
  86. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +4 -0
  87. package/artifacts/contracts/instance/{access/IAccess.sol/IAccess.json → module/IBundle.sol/IBundle.json} +2 -2
  88. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +4 -0
  89. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.json +10 -0
  90. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +4 -0
  91. package/artifacts/contracts/instance/{policy → module}/IPolicy.sol/IPolicy.json +1 -1
  92. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +4 -0
  93. package/artifacts/contracts/instance/{pool/IPoolModule.sol/IPool.json → module/IRisk.sol/IRisk.json} +2 -2
  94. package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +4 -0
  95. package/artifacts/contracts/instance/{component/IComponent.sol/IComponent.json → module/ISetup.sol/ISetup.json} +2 -2
  96. package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +4 -0
  97. package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.json +10 -0
  98. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +4 -0
  99. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +827 -0
  100. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
  101. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +716 -0
  102. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +4 -0
  103. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +444 -0
  104. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +4 -0
  105. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +466 -0
  106. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
  107. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +446 -0
  108. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +4 -0
  109. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +669 -0
  110. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +4 -0
  111. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +760 -0
  112. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +4 -0
  113. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +971 -0
  114. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +4 -0
  115. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +460 -0
  116. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +4 -0
  117. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +1147 -0
  118. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +4 -0
  119. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +488 -0
  120. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  121. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +239 -2
  122. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  123. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +429 -63
  124. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
  125. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +947 -0
  126. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +4 -0
  127. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +34 -0
  128. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  129. package/artifacts/contracts/registry/Registry.sol/Registry.json +566 -77
  130. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
  131. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +1293 -0
  132. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +4 -0
  133. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +517 -0
  134. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +4 -0
  135. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +410 -0
  136. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +4 -0
  137. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.json +107 -0
  138. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +4 -0
  139. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +35 -0
  140. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +4 -0
  141. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +127 -0
  142. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +4 -0
  143. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +201 -0
  144. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +4 -0
  145. package/artifacts/contracts/shared/IService.sol/IService.json +421 -0
  146. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +4 -0
  147. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +205 -0
  148. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +4 -0
  149. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +158 -0
  150. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +4 -0
  151. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +349 -0
  152. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +4 -0
  153. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +274 -0
  154. package/artifacts/contracts/shared/RegisterableUpgradable.sol/RegisterableUpgradable.dbg.json +4 -0
  155. package/artifacts/contracts/shared/RegisterableUpgradable.sol/RegisterableUpgradable.json +442 -0
  156. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +4 -0
  157. package/artifacts/contracts/shared/Service.sol/Service.json +468 -0
  158. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +4 -0
  159. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +96 -0
  160. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
  161. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
  162. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +4 -0
  163. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +228 -0
  164. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +4 -0
  165. package/artifacts/contracts/test/TestFee.sol/TestFee.json +119 -0
  166. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +4 -0
  167. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +305 -0
  168. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +4 -0
  169. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +116 -0
  170. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +4 -0
  171. package/artifacts/contracts/test/TestService.sol/TestService.json +600 -0
  172. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +4 -0
  173. package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +376 -0
  174. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +4 -0
  175. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +218 -0
  176. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +4 -0
  177. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +286 -0
  178. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +4 -0
  179. package/artifacts/contracts/test/Usdc.sol/USDC.json +376 -0
  180. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +4 -0
  181. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.json +10 -0
  182. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  183. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +2 -2
  184. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  185. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +2 -2
  186. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +4 -0
  187. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.json +104 -0
  188. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +4 -0
  189. package/artifacts/contracts/types/Fee.sol/FeeLib.json +257 -0
  190. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +4 -0
  191. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +125 -0
  192. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  193. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +65 -4
  194. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +4 -0
  195. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +10 -0
  196. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +4 -0
  197. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.json +100 -0
  198. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +4 -0
  199. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +92 -0
  200. package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +4 -0
  201. package/artifacts/contracts/types/Referral.sol/ReferralLib.json +123 -0
  202. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
  203. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
  204. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +4 -0
  205. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +156 -0
  206. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +4 -0
  207. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +92 -0
  208. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  209. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +77 -2
  210. package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +4 -0
  211. package/artifacts/contracts/types/UFixed.sol/MathLib.json +10 -0
  212. package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +4 -0
  213. package/artifacts/contracts/types/UFixed.sol/UFixedLib.json +479 -0
  214. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +4 -0
  215. package/artifacts/contracts/types/Version.sol/VersionLib.json +177 -0
  216. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +4 -0
  217. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +49 -0
  218. package/contracts/components/BaseComponent.sol +91 -0
  219. package/contracts/components/Distribution.sol +163 -0
  220. package/contracts/components/IBaseComponent.sol +25 -0
  221. package/contracts/components/IDistributionComponent.sol +44 -0
  222. package/contracts/components/IPoolComponent.sol +62 -0
  223. package/contracts/components/IProductComponent.sol +35 -0
  224. package/contracts/components/Pool.sol +236 -18
  225. package/contracts/components/Product.sol +258 -35
  226. package/contracts/experiment/cloning/Cloner.sol +47 -0
  227. package/contracts/experiment/errors/Require.sol +10 -5
  228. package/contracts/experiment/errors/Revert.sol +13 -8
  229. package/contracts/experiment/inheritance/A.sol +8 -11
  230. package/contracts/experiment/inheritance/B.sol +10 -5
  231. package/contracts/experiment/inheritance/C.sol +11 -5
  232. package/contracts/experiment/inheritance/IA.sol +2 -7
  233. package/contracts/experiment/inheritance/IB.sol +3 -2
  234. package/contracts/experiment/inheritance/IC.sol +4 -3
  235. package/contracts/experiment/statemachine/Dummy.sol +27 -0
  236. package/contracts/experiment/statemachine/ISM.sol +25 -0
  237. package/contracts/experiment/statemachine/SM.sol +57 -0
  238. package/contracts/experiment/statemachine/SimpleStateMachine.sol +31 -0
  239. package/contracts/experiment/types/TypeA.sol +14 -9
  240. package/contracts/experiment/types/TypeB.sol +14 -9
  241. package/contracts/instance/AccessManagedSimple.sol +115 -0
  242. package/contracts/instance/AccessManagerSimple.sol +692 -0
  243. package/contracts/instance/IAccessManagerSimple.sol +391 -0
  244. package/contracts/instance/IInstance.sol +49 -15
  245. package/contracts/instance/IInstanceService.sol +30 -0
  246. package/contracts/instance/Instance.sol +423 -44
  247. package/contracts/instance/InstanceAccessManager.sol +288 -0
  248. package/contracts/instance/InstanceReader.sol +315 -0
  249. package/contracts/instance/InstanceService.sol +198 -0
  250. package/contracts/instance/InstanceServiceManager.sol +57 -0
  251. package/contracts/instance/base/ComponentServiceBase.sol +134 -0
  252. package/contracts/instance/base/IInstanceBase.sol +23 -0
  253. package/contracts/instance/base/IKeyValueStore.sol +49 -0
  254. package/contracts/instance/base/ILifecycle.sol +30 -0
  255. package/contracts/instance/base/KeyValueStore.sol +172 -0
  256. package/contracts/instance/base/Lifecycle.sol +100 -0
  257. package/contracts/instance/module/IAccess.sol +38 -0
  258. package/contracts/instance/module/IBundle.sol +20 -0
  259. package/contracts/instance/module/IDistribution.sol +39 -0
  260. package/contracts/instance/module/IPolicy.sol +45 -0
  261. package/contracts/instance/module/IRisk.sol +11 -0
  262. package/contracts/instance/module/ISetup.sol +47 -0
  263. package/contracts/instance/module/ITreasury.sol +23 -0
  264. package/contracts/instance/service/ComponentOwnerService.sol +317 -0
  265. package/contracts/instance/service/DistributionService.sol +88 -0
  266. package/contracts/instance/service/DistributionServiceManager.sol +54 -0
  267. package/contracts/instance/service/IComponentOwnerService.sol +20 -0
  268. package/contracts/instance/service/IDistributionService.sol +12 -0
  269. package/contracts/instance/service/IPoolService.sol +43 -0
  270. package/contracts/instance/service/IProductService.sol +110 -0
  271. package/contracts/instance/service/PoolService.sol +204 -0
  272. package/contracts/instance/service/PoolServiceManager.sol +54 -0
  273. package/contracts/instance/service/ProductService.sol +561 -0
  274. package/contracts/instance/service/ProductServiceManager.sol +54 -0
  275. package/contracts/registry/ChainNft.sol +138 -109
  276. package/contracts/registry/IRegistry.sol +68 -57
  277. package/contracts/registry/IRegistryService.sol +50 -0
  278. package/contracts/registry/ITransferInterceptor.sol +6 -0
  279. package/contracts/registry/Registry.sol +386 -120
  280. package/contracts/registry/RegistryService.sol +358 -0
  281. package/contracts/registry/RegistryServiceManager.sol +80 -0
  282. package/contracts/registry/TokenRegistry.sol +111 -0
  283. package/contracts/shared/ContractDeployerLib.sol +72 -0
  284. package/contracts/shared/ERC165.sol +25 -0
  285. package/contracts/shared/INftOwnable.sol +22 -0
  286. package/contracts/shared/IRegisterable.sol +17 -0
  287. package/contracts/shared/IService.sol +15 -0
  288. package/contracts/shared/IVersionable.sol +96 -0
  289. package/contracts/shared/NftOwnable.sol +134 -0
  290. package/contracts/shared/ProxyManager.sol +94 -0
  291. package/contracts/shared/Registerable.sol +90 -0
  292. package/contracts/shared/RegisterableUpgradable.sol +16 -0
  293. package/contracts/shared/Service.sol +55 -0
  294. package/contracts/shared/TokenHandler.sol +27 -0
  295. package/contracts/shared/UpgradableProxyWithAdmin.sol +16 -0
  296. package/contracts/shared/Versionable.sol +147 -0
  297. package/contracts/test/TestFee.sol +25 -0
  298. package/contracts/test/TestRegisterable.sol +18 -0
  299. package/contracts/test/TestRoleId.sol +14 -0
  300. package/contracts/test/TestService.sol +24 -0
  301. package/contracts/test/TestToken.sol +26 -0
  302. package/contracts/test/TestVersion.sol +44 -0
  303. package/contracts/test/TestVersionable.sol +17 -0
  304. package/contracts/test/Usdc.sol +26 -0
  305. package/contracts/types/AddressSet.sol +58 -0
  306. package/contracts/types/Blocknumber.sol +76 -18
  307. package/contracts/types/ChainId.sol +18 -10
  308. package/contracts/types/DistributorType.sol +55 -0
  309. package/contracts/types/Fee.sol +56 -0
  310. package/contracts/types/Key32.sol +50 -0
  311. package/contracts/types/NftId.sol +48 -11
  312. package/contracts/types/NftIdSet.sol +60 -0
  313. package/contracts/types/NumberId.sol +52 -0
  314. package/contracts/types/ObjectType.sol +152 -0
  315. package/contracts/types/Referral.sol +85 -0
  316. package/contracts/types/RiskId.sol +43 -0
  317. package/contracts/types/RoleId.sol +90 -0
  318. package/contracts/types/StateId.sol +105 -0
  319. package/contracts/types/Timestamp.sol +89 -17
  320. package/contracts/types/UFixed.sol +193 -75
  321. package/contracts/types/Version.sol +107 -0
  322. package/package.json +21 -6
  323. package/artifacts/contracts/components/Component.sol/Component.dbg.json +0 -4
  324. package/artifacts/contracts/components/Component.sol/Component.json +0 -179
  325. package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +0 -4
  326. package/artifacts/contracts/components/Component.sol/InstanceLinked.json +0 -35
  327. package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +0 -4
  328. package/artifacts/contracts/components/IPool.sol/IPoolComponent.json +0 -179
  329. package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +0 -4
  330. package/artifacts/contracts/components/IProduct.sol/IProductComponent.json +0 -192
  331. package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +0 -4
  332. package/artifacts/contracts/instance/access/Access.sol/AccessModule.json +0 -400
  333. package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +0 -4
  334. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +0 -4
  335. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.json +0 -35
  336. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +0 -4
  337. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.json +0 -50
  338. package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +0 -4
  339. package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.json +0 -336
  340. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
  341. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +0 -4
  342. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +0 -147
  343. package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +0 -4
  344. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +0 -4
  345. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.json +0 -179
  346. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +0 -4
  347. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +0 -4
  348. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.json +0 -94
  349. package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +0 -4
  350. package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.json +0 -24
  351. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +0 -4
  352. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +0 -4
  353. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.json +0 -231
  354. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
  355. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.json +0 -231
  356. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +0 -4
  357. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +0 -4
  358. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.json +0 -149
  359. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +0 -4
  360. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.json +0 -162
  361. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +0 -4
  362. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.json +0 -75
  363. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +0 -4
  364. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.json +0 -114
  365. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +0 -4
  366. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.json +0 -75
  367. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +0 -4
  368. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +0 -167
  369. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +0 -4
  370. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +0 -452
  371. package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +0 -4
  372. package/artifacts/contracts/registry/IRegistry.sol/IOwnable.json +0 -24
  373. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +0 -4
  374. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.json +0 -166
  375. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +0 -4
  376. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.json +0 -49
  377. package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +0 -4
  378. package/artifacts/contracts/registry/Registry.sol/Registerable.json +0 -166
  379. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +0 -4
  380. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +0 -60
  381. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +0 -4
  382. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +0 -440
  383. package/contracts/components/Component.sol +0 -62
  384. package/contracts/components/IPool.sol +0 -9
  385. package/contracts/components/IProduct.sol +0 -12
  386. package/contracts/instance/access/Access.sol +0 -218
  387. package/contracts/instance/access/IAccess.sol +0 -83
  388. package/contracts/instance/component/ComponentModule.sol +0 -248
  389. package/contracts/instance/component/IComponent.sol +0 -95
  390. package/contracts/instance/policy/IPolicy.sol +0 -66
  391. package/contracts/instance/policy/PolicyModule.sol +0 -107
  392. package/contracts/instance/pool/IPoolModule.sol +0 -41
  393. package/contracts/instance/pool/PoolModule.sol +0 -86
  394. package/contracts/instance/product/IProductService.sol +0 -46
  395. package/contracts/instance/product/ProductService.sol +0 -108
  396. package/contracts/registry/IChainNft.sol +0 -18
@@ -4,163 +4,245 @@
4
4
  "sourceName": "contracts/instance/IInstance.sol",
5
5
  "abi": [
6
6
  {
7
- "anonymous": false,
8
7
  "inputs": [
9
8
  {
10
- "indexed": false,
11
- "internalType": "uint256",
12
- "name": "idx",
13
- "type": "uint256"
9
+ "internalType": "ObjectType",
10
+ "name": "objectType",
11
+ "type": "uint8"
14
12
  },
15
13
  {
16
- "indexed": false,
17
- "internalType": "address",
18
- "name": "module",
19
- "type": "address"
14
+ "internalType": "StateId",
15
+ "name": "fromStateId",
16
+ "type": "uint8"
20
17
  },
21
18
  {
22
- "indexed": false,
23
- "internalType": "string",
24
- "name": "comment",
25
- "type": "string"
19
+ "internalType": "StateId",
20
+ "name": "toStateId",
21
+ "type": "uint8"
26
22
  }
27
23
  ],
28
- "name": "LogDebug",
29
- "type": "event"
24
+ "name": "ErrorInvalidStateTransition",
25
+ "type": "error"
30
26
  },
31
27
  {
32
- "inputs": [],
33
- "name": "ORACLE_OWNER_ROLE",
34
- "outputs": [
28
+ "inputs": [
35
29
  {
36
- "internalType": "bytes32",
37
- "name": "role",
38
- "type": "bytes32"
39
- }
40
- ],
41
- "stateMutability": "view",
42
- "type": "function"
43
- },
44
- {
45
- "inputs": [],
46
- "name": "POOL_OWNER_ROLE",
47
- "outputs": [
30
+ "internalType": "NftId",
31
+ "name": "nftId",
32
+ "type": "uint96"
33
+ },
48
34
  {
49
- "internalType": "bytes32",
50
- "name": "role",
51
- "type": "bytes32"
35
+ "internalType": "ObjectType",
36
+ "name": "objectType",
37
+ "type": "uint8"
52
38
  }
53
39
  ],
54
- "stateMutability": "view",
55
- "type": "function"
40
+ "name": "ErrorNoLifecycle",
41
+ "type": "error"
56
42
  },
57
43
  {
58
- "inputs": [],
59
- "name": "PRODUCT_OWNER_ROLE",
60
- "outputs": [
44
+ "anonymous": false,
45
+ "inputs": [
61
46
  {
62
- "internalType": "bytes32",
63
- "name": "role",
64
- "type": "bytes32"
47
+ "indexed": false,
48
+ "internalType": "ObjectType",
49
+ "name": "objectType",
50
+ "type": "uint8"
51
+ },
52
+ {
53
+ "indexed": false,
54
+ "internalType": "KeyId",
55
+ "name": "keyId",
56
+ "type": "bytes31"
57
+ },
58
+ {
59
+ "indexed": false,
60
+ "internalType": "StateId",
61
+ "name": "state",
62
+ "type": "uint8"
63
+ },
64
+ {
65
+ "indexed": false,
66
+ "internalType": "address",
67
+ "name": "createdBy",
68
+ "type": "address"
69
+ },
70
+ {
71
+ "indexed": false,
72
+ "internalType": "address",
73
+ "name": "txOrigin",
74
+ "type": "address"
65
75
  }
66
76
  ],
67
- "stateMutability": "view",
68
- "type": "function"
77
+ "name": "LogInfoCreated",
78
+ "type": "event"
69
79
  },
70
80
  {
81
+ "anonymous": false,
71
82
  "inputs": [
72
83
  {
73
- "internalType": "NftId",
74
- "name": "nftId",
75
- "type": "uint96"
84
+ "indexed": false,
85
+ "internalType": "ObjectType",
86
+ "name": "objectType",
87
+ "type": "uint8"
88
+ },
89
+ {
90
+ "indexed": false,
91
+ "internalType": "KeyId",
92
+ "name": "keyId",
93
+ "type": "bytes31"
94
+ },
95
+ {
96
+ "indexed": false,
97
+ "internalType": "StateId",
98
+ "name": "state",
99
+ "type": "uint8"
100
+ },
101
+ {
102
+ "indexed": false,
103
+ "internalType": "address",
104
+ "name": "updatedBy",
105
+ "type": "address"
106
+ },
107
+ {
108
+ "indexed": false,
109
+ "internalType": "address",
110
+ "name": "txOrigin",
111
+ "type": "address"
112
+ },
113
+ {
114
+ "indexed": false,
115
+ "internalType": "Blocknumber",
116
+ "name": "lastUpdatedIn",
117
+ "type": "uint32"
76
118
  }
77
119
  ],
78
- "name": "activate",
79
- "outputs": [],
80
- "stateMutability": "nonpayable",
81
- "type": "function"
120
+ "name": "LogInfoUpdated",
121
+ "type": "event"
82
122
  },
83
123
  {
84
- "inputs": [],
85
- "name": "components",
86
- "outputs": [
124
+ "anonymous": false,
125
+ "inputs": [
126
+ {
127
+ "indexed": false,
128
+ "internalType": "ObjectType",
129
+ "name": "objectType",
130
+ "type": "uint8"
131
+ },
132
+ {
133
+ "indexed": false,
134
+ "internalType": "KeyId",
135
+ "name": "keyId",
136
+ "type": "bytes31"
137
+ },
138
+ {
139
+ "indexed": false,
140
+ "internalType": "StateId",
141
+ "name": "stateOld",
142
+ "type": "uint8"
143
+ },
144
+ {
145
+ "indexed": false,
146
+ "internalType": "StateId",
147
+ "name": "stateNew",
148
+ "type": "uint8"
149
+ },
150
+ {
151
+ "indexed": false,
152
+ "internalType": "address",
153
+ "name": "updatedBy",
154
+ "type": "address"
155
+ },
156
+ {
157
+ "indexed": false,
158
+ "internalType": "address",
159
+ "name": "txOrigin",
160
+ "type": "address"
161
+ },
87
162
  {
88
- "internalType": "uint256",
89
- "name": "numberOfCompnents",
90
- "type": "uint256"
163
+ "indexed": false,
164
+ "internalType": "Blocknumber",
165
+ "name": "lastUpdatedIn",
166
+ "type": "uint32"
91
167
  }
92
168
  ],
93
- "stateMutability": "view",
94
- "type": "function"
169
+ "name": "LogStateUpdated",
170
+ "type": "event"
95
171
  },
96
172
  {
97
173
  "inputs": [
174
+ {
175
+ "internalType": "NftId",
176
+ "name": "bundleNftId",
177
+ "type": "uint96"
178
+ },
98
179
  {
99
180
  "components": [
100
181
  {
101
182
  "internalType": "NftId",
102
- "name": "nftId",
183
+ "name": "poolNftId",
103
184
  "type": "uint96"
104
185
  },
105
186
  {
106
- "internalType": "NftId",
107
- "name": "parentNftId",
108
- "type": "uint96"
187
+ "components": [
188
+ {
189
+ "internalType": "UFixed",
190
+ "name": "fractionalFee",
191
+ "type": "uint256"
192
+ },
193
+ {
194
+ "internalType": "uint256",
195
+ "name": "fixedFee",
196
+ "type": "uint256"
197
+ }
198
+ ],
199
+ "internalType": "struct Fee",
200
+ "name": "fee",
201
+ "type": "tuple"
202
+ },
203
+ {
204
+ "internalType": "bytes",
205
+ "name": "filter",
206
+ "type": "bytes"
109
207
  },
110
208
  {
111
209
  "internalType": "uint256",
112
- "name": "objectType",
210
+ "name": "capitalAmount",
113
211
  "type": "uint256"
114
212
  },
115
213
  {
116
- "internalType": "address",
117
- "name": "objectAddress",
118
- "type": "address"
214
+ "internalType": "uint256",
215
+ "name": "lockedAmount",
216
+ "type": "uint256"
119
217
  },
120
218
  {
121
- "internalType": "address",
122
- "name": "initialOwner",
123
- "type": "address"
219
+ "internalType": "uint256",
220
+ "name": "balanceAmount",
221
+ "type": "uint256"
222
+ },
223
+ {
224
+ "internalType": "uint256",
225
+ "name": "lifetime",
226
+ "type": "uint256"
227
+ },
228
+ {
229
+ "internalType": "Timestamp",
230
+ "name": "expiredAt",
231
+ "type": "uint40"
232
+ },
233
+ {
234
+ "internalType": "Timestamp",
235
+ "name": "closedAt",
236
+ "type": "uint40"
124
237
  }
125
238
  ],
126
- "internalType": "struct IRegistry.RegistryInfo",
127
- "name": "productInfo",
239
+ "internalType": "struct IBundle.BundleInfo",
240
+ "name": "bundle",
128
241
  "type": "tuple"
129
- },
130
- {
131
- "internalType": "address",
132
- "name": "applicationOwner",
133
- "type": "address"
134
- },
135
- {
136
- "internalType": "uint256",
137
- "name": "sumInsuredAmount",
138
- "type": "uint256"
139
- },
140
- {
141
- "internalType": "uint256",
142
- "name": "premiumAmount",
143
- "type": "uint256"
144
- },
145
- {
146
- "internalType": "uint256",
147
- "name": "lifetime",
148
- "type": "uint256"
149
- },
150
- {
151
- "internalType": "NftId",
152
- "name": "bundleNftId",
153
- "type": "uint96"
154
- }
155
- ],
156
- "name": "createApplication",
157
- "outputs": [
158
- {
159
- "internalType": "NftId",
160
- "name": "nftId",
161
- "type": "uint96"
162
242
  }
163
243
  ],
244
+ "name": "createBundle",
245
+ "outputs": [],
164
246
  "stateMutability": "nonpayable",
165
247
  "type": "function"
166
248
  },
@@ -168,21 +250,55 @@
168
250
  "inputs": [
169
251
  {
170
252
  "internalType": "NftId",
171
- "name": "nftId",
253
+ "name": "distributionNftId",
172
254
  "type": "uint96"
173
255
  },
174
256
  {
175
- "internalType": "address",
176
- "name": "wallet",
177
- "type": "address"
178
- },
179
- {
180
- "internalType": "address",
181
- "name": "token",
182
- "type": "address"
257
+ "components": [
258
+ {
259
+ "internalType": "NftId",
260
+ "name": "productNftId",
261
+ "type": "uint96"
262
+ },
263
+ {
264
+ "internalType": "contract TokenHandler",
265
+ "name": "tokenHandler",
266
+ "type": "address"
267
+ },
268
+ {
269
+ "components": [
270
+ {
271
+ "internalType": "UFixed",
272
+ "name": "fractionalFee",
273
+ "type": "uint256"
274
+ },
275
+ {
276
+ "internalType": "uint256",
277
+ "name": "fixedFee",
278
+ "type": "uint256"
279
+ }
280
+ ],
281
+ "internalType": "struct Fee",
282
+ "name": "distributionFee",
283
+ "type": "tuple"
284
+ },
285
+ {
286
+ "internalType": "bool",
287
+ "name": "isIntercepting",
288
+ "type": "bool"
289
+ },
290
+ {
291
+ "internalType": "address",
292
+ "name": "wallet",
293
+ "type": "address"
294
+ }
295
+ ],
296
+ "internalType": "struct ISetup.DistributionSetupInfo",
297
+ "name": "setup",
298
+ "type": "tuple"
183
299
  }
184
300
  ],
185
- "name": "createPoolInfo",
301
+ "name": "createDistributionSetup",
186
302
  "outputs": [],
187
303
  "stateMutability": "nonpayable",
188
304
  "type": "function"
@@ -190,31 +306,99 @@
190
306
  {
191
307
  "inputs": [
192
308
  {
193
- "internalType": "string",
194
- "name": "roleName",
195
- "type": "string"
196
- }
197
- ],
198
- "name": "createRole",
199
- "outputs": [
200
- {
201
- "internalType": "bytes32",
202
- "name": "role",
203
- "type": "bytes32"
204
- }
205
- ],
206
- "stateMutability": "nonpayable",
207
- "type": "function"
208
- },
209
- {
210
- "inputs": [
309
+ "internalType": "NftId",
310
+ "name": "policyNftId",
311
+ "type": "uint96"
312
+ },
211
313
  {
212
- "internalType": "bytes32",
213
- "name": "role",
214
- "type": "bytes32"
314
+ "components": [
315
+ {
316
+ "internalType": "NftId",
317
+ "name": "productNftId",
318
+ "type": "uint96"
319
+ },
320
+ {
321
+ "internalType": "NftId",
322
+ "name": "bundleNftId",
323
+ "type": "uint96"
324
+ },
325
+ {
326
+ "internalType": "ReferralId",
327
+ "name": "referralId",
328
+ "type": "bytes8"
329
+ },
330
+ {
331
+ "internalType": "RiskId",
332
+ "name": "riskId",
333
+ "type": "bytes8"
334
+ },
335
+ {
336
+ "internalType": "uint256",
337
+ "name": "sumInsuredAmount",
338
+ "type": "uint256"
339
+ },
340
+ {
341
+ "internalType": "uint256",
342
+ "name": "premiumAmount",
343
+ "type": "uint256"
344
+ },
345
+ {
346
+ "internalType": "uint256",
347
+ "name": "premiumPaidAmount",
348
+ "type": "uint256"
349
+ },
350
+ {
351
+ "internalType": "uint256",
352
+ "name": "lifetime",
353
+ "type": "uint256"
354
+ },
355
+ {
356
+ "internalType": "bytes",
357
+ "name": "applicationData",
358
+ "type": "bytes"
359
+ },
360
+ {
361
+ "internalType": "bytes",
362
+ "name": "policyData",
363
+ "type": "bytes"
364
+ },
365
+ {
366
+ "internalType": "uint16",
367
+ "name": "claimsCount",
368
+ "type": "uint16"
369
+ },
370
+ {
371
+ "internalType": "uint16",
372
+ "name": "openClaimsCount",
373
+ "type": "uint16"
374
+ },
375
+ {
376
+ "internalType": "uint256",
377
+ "name": "payoutAmount",
378
+ "type": "uint256"
379
+ },
380
+ {
381
+ "internalType": "Timestamp",
382
+ "name": "activatedAt",
383
+ "type": "uint40"
384
+ },
385
+ {
386
+ "internalType": "Timestamp",
387
+ "name": "expiredAt",
388
+ "type": "uint40"
389
+ },
390
+ {
391
+ "internalType": "Timestamp",
392
+ "name": "closedAt",
393
+ "type": "uint40"
394
+ }
395
+ ],
396
+ "internalType": "struct IPolicy.PolicyInfo",
397
+ "name": "policy",
398
+ "type": "tuple"
215
399
  }
216
400
  ],
217
- "name": "disableRole",
401
+ "name": "createPolicy",
218
402
  "outputs": [],
219
403
  "stateMutability": "nonpayable",
220
404
  "type": "function"
@@ -222,12 +406,100 @@
222
406
  {
223
407
  "inputs": [
224
408
  {
225
- "internalType": "bytes32",
226
- "name": "role",
227
- "type": "bytes32"
409
+ "internalType": "NftId",
410
+ "name": "poolNftId",
411
+ "type": "uint96"
412
+ },
413
+ {
414
+ "components": [
415
+ {
416
+ "internalType": "NftId",
417
+ "name": "productNftId",
418
+ "type": "uint96"
419
+ },
420
+ {
421
+ "internalType": "contract TokenHandler",
422
+ "name": "tokenHandler",
423
+ "type": "address"
424
+ },
425
+ {
426
+ "internalType": "UFixed",
427
+ "name": "collateralizationLevel",
428
+ "type": "uint256"
429
+ },
430
+ {
431
+ "components": [
432
+ {
433
+ "internalType": "UFixed",
434
+ "name": "fractionalFee",
435
+ "type": "uint256"
436
+ },
437
+ {
438
+ "internalType": "uint256",
439
+ "name": "fixedFee",
440
+ "type": "uint256"
441
+ }
442
+ ],
443
+ "internalType": "struct Fee",
444
+ "name": "poolFee",
445
+ "type": "tuple"
446
+ },
447
+ {
448
+ "components": [
449
+ {
450
+ "internalType": "UFixed",
451
+ "name": "fractionalFee",
452
+ "type": "uint256"
453
+ },
454
+ {
455
+ "internalType": "uint256",
456
+ "name": "fixedFee",
457
+ "type": "uint256"
458
+ }
459
+ ],
460
+ "internalType": "struct Fee",
461
+ "name": "stakingFee",
462
+ "type": "tuple"
463
+ },
464
+ {
465
+ "components": [
466
+ {
467
+ "internalType": "UFixed",
468
+ "name": "fractionalFee",
469
+ "type": "uint256"
470
+ },
471
+ {
472
+ "internalType": "uint256",
473
+ "name": "fixedFee",
474
+ "type": "uint256"
475
+ }
476
+ ],
477
+ "internalType": "struct Fee",
478
+ "name": "performanceFee",
479
+ "type": "tuple"
480
+ },
481
+ {
482
+ "internalType": "bool",
483
+ "name": "isIntercepting",
484
+ "type": "bool"
485
+ },
486
+ {
487
+ "internalType": "bool",
488
+ "name": "isConfirmingApplication",
489
+ "type": "bool"
490
+ },
491
+ {
492
+ "internalType": "address",
493
+ "name": "wallet",
494
+ "type": "address"
495
+ }
496
+ ],
497
+ "internalType": "struct ISetup.PoolSetupInfo",
498
+ "name": "setup",
499
+ "type": "tuple"
228
500
  }
229
501
  ],
230
- "name": "enableRole",
502
+ "name": "createPoolSetup",
231
503
  "outputs": [],
232
504
  "stateMutability": "nonpayable",
233
505
  "type": "function"
@@ -236,54 +508,198 @@
236
508
  "inputs": [
237
509
  {
238
510
  "internalType": "NftId",
239
- "name": "nftId",
511
+ "name": "productNftId",
240
512
  "type": "uint96"
241
- }
242
- ],
243
- "name": "getBundleNftForPolicy",
244
- "outputs": [
513
+ },
245
514
  {
246
- "internalType": "NftId",
247
- "name": "bundleNft",
248
- "type": "uint96"
515
+ "components": [
516
+ {
517
+ "internalType": "contract IERC20Metadata",
518
+ "name": "token",
519
+ "type": "address"
520
+ },
521
+ {
522
+ "internalType": "contract TokenHandler",
523
+ "name": "tokenHandler",
524
+ "type": "address"
525
+ },
526
+ {
527
+ "internalType": "NftId",
528
+ "name": "distributionNftId",
529
+ "type": "uint96"
530
+ },
531
+ {
532
+ "internalType": "NftId",
533
+ "name": "poolNftId",
534
+ "type": "uint96"
535
+ },
536
+ {
537
+ "components": [
538
+ {
539
+ "internalType": "UFixed",
540
+ "name": "fractionalFee",
541
+ "type": "uint256"
542
+ },
543
+ {
544
+ "internalType": "uint256",
545
+ "name": "fixedFee",
546
+ "type": "uint256"
547
+ }
548
+ ],
549
+ "internalType": "struct Fee",
550
+ "name": "distributionFee",
551
+ "type": "tuple"
552
+ },
553
+ {
554
+ "components": [
555
+ {
556
+ "internalType": "UFixed",
557
+ "name": "fractionalFee",
558
+ "type": "uint256"
559
+ },
560
+ {
561
+ "internalType": "uint256",
562
+ "name": "fixedFee",
563
+ "type": "uint256"
564
+ }
565
+ ],
566
+ "internalType": "struct Fee",
567
+ "name": "productFee",
568
+ "type": "tuple"
569
+ },
570
+ {
571
+ "components": [
572
+ {
573
+ "internalType": "UFixed",
574
+ "name": "fractionalFee",
575
+ "type": "uint256"
576
+ },
577
+ {
578
+ "internalType": "uint256",
579
+ "name": "fixedFee",
580
+ "type": "uint256"
581
+ }
582
+ ],
583
+ "internalType": "struct Fee",
584
+ "name": "processingFee",
585
+ "type": "tuple"
586
+ },
587
+ {
588
+ "components": [
589
+ {
590
+ "internalType": "UFixed",
591
+ "name": "fractionalFee",
592
+ "type": "uint256"
593
+ },
594
+ {
595
+ "internalType": "uint256",
596
+ "name": "fixedFee",
597
+ "type": "uint256"
598
+ }
599
+ ],
600
+ "internalType": "struct Fee",
601
+ "name": "poolFee",
602
+ "type": "tuple"
603
+ },
604
+ {
605
+ "components": [
606
+ {
607
+ "internalType": "UFixed",
608
+ "name": "fractionalFee",
609
+ "type": "uint256"
610
+ },
611
+ {
612
+ "internalType": "uint256",
613
+ "name": "fixedFee",
614
+ "type": "uint256"
615
+ }
616
+ ],
617
+ "internalType": "struct Fee",
618
+ "name": "stakingFee",
619
+ "type": "tuple"
620
+ },
621
+ {
622
+ "components": [
623
+ {
624
+ "internalType": "UFixed",
625
+ "name": "fractionalFee",
626
+ "type": "uint256"
627
+ },
628
+ {
629
+ "internalType": "uint256",
630
+ "name": "fixedFee",
631
+ "type": "uint256"
632
+ }
633
+ ],
634
+ "internalType": "struct Fee",
635
+ "name": "performanceFee",
636
+ "type": "tuple"
637
+ },
638
+ {
639
+ "internalType": "bool",
640
+ "name": "isIntercepting",
641
+ "type": "bool"
642
+ },
643
+ {
644
+ "internalType": "address",
645
+ "name": "wallet",
646
+ "type": "address"
647
+ }
648
+ ],
649
+ "internalType": "struct ISetup.ProductSetupInfo",
650
+ "name": "setup",
651
+ "type": "tuple"
249
652
  }
250
653
  ],
251
- "stateMutability": "view",
654
+ "name": "createProductSetup",
655
+ "outputs": [],
656
+ "stateMutability": "nonpayable",
252
657
  "type": "function"
253
658
  },
254
659
  {
255
660
  "inputs": [
256
661
  {
257
- "internalType": "address",
258
- "name": "componentAddress",
259
- "type": "address"
260
- }
261
- ],
262
- "name": "getComponentId",
263
- "outputs": [
662
+ "internalType": "RiskId",
663
+ "name": "riskId",
664
+ "type": "bytes8"
665
+ },
264
666
  {
265
- "internalType": "NftId",
266
- "name": "nftId",
267
- "type": "uint96"
667
+ "components": [
668
+ {
669
+ "internalType": "NftId",
670
+ "name": "productNftId",
671
+ "type": "uint96"
672
+ },
673
+ {
674
+ "internalType": "bytes",
675
+ "name": "data",
676
+ "type": "bytes"
677
+ }
678
+ ],
679
+ "internalType": "struct IRisk.RiskInfo",
680
+ "name": "risk",
681
+ "type": "tuple"
268
682
  }
269
683
  ],
270
- "stateMutability": "view",
684
+ "name": "createRisk",
685
+ "outputs": [],
686
+ "stateMutability": "nonpayable",
271
687
  "type": "function"
272
688
  },
273
689
  {
274
690
  "inputs": [
275
691
  {
276
- "internalType": "uint256",
277
- "name": "idx",
278
- "type": "uint256"
692
+ "internalType": "Key32",
693
+ "name": "key",
694
+ "type": "bytes32"
279
695
  }
280
696
  ],
281
- "name": "getComponentId",
697
+ "name": "exists",
282
698
  "outputs": [
283
699
  {
284
- "internalType": "NftId",
285
- "name": "nftId",
286
- "type": "uint96"
700
+ "internalType": "bool",
701
+ "name": "",
702
+ "type": "bool"
287
703
  }
288
704
  ],
289
705
  "stateMutability": "view",
@@ -292,53 +708,61 @@
292
708
  {
293
709
  "inputs": [
294
710
  {
295
- "internalType": "NftId",
296
- "name": "nftId",
297
- "type": "uint96"
711
+ "internalType": "Key32",
712
+ "name": "key",
713
+ "type": "bytes32"
298
714
  }
299
715
  ],
300
- "name": "getComponentInfo",
716
+ "name": "get",
301
717
  "outputs": [
302
718
  {
303
719
  "components": [
304
720
  {
305
- "internalType": "NftId",
306
- "name": "nftId",
307
- "type": "uint96"
721
+ "components": [
722
+ {
723
+ "internalType": "ObjectType",
724
+ "name": "objectType",
725
+ "type": "uint8"
726
+ },
727
+ {
728
+ "internalType": "StateId",
729
+ "name": "state",
730
+ "type": "uint8"
731
+ },
732
+ {
733
+ "internalType": "address",
734
+ "name": "updatedBy",
735
+ "type": "address"
736
+ },
737
+ {
738
+ "internalType": "Blocknumber",
739
+ "name": "updatedIn",
740
+ "type": "uint32"
741
+ },
742
+ {
743
+ "internalType": "Blocknumber",
744
+ "name": "createdIn",
745
+ "type": "uint32"
746
+ }
747
+ ],
748
+ "internalType": "struct IKeyValueStore.Metadata",
749
+ "name": "metadata",
750
+ "type": "tuple"
308
751
  },
309
752
  {
310
- "internalType": "enum IComponent.CState",
311
- "name": "state",
312
- "type": "uint8"
753
+ "internalType": "bytes",
754
+ "name": "data",
755
+ "type": "bytes"
313
756
  }
314
757
  ],
315
- "internalType": "struct IComponent.ComponentInfo",
316
- "name": "info",
758
+ "internalType": "struct IKeyValueStore.Value",
759
+ "name": "value",
317
760
  "type": "tuple"
318
761
  }
319
762
  ],
320
763
  "stateMutability": "view",
321
764
  "type": "function"
322
765
  },
323
- {
324
- "inputs": [
325
- {
326
- "internalType": "NftId",
327
- "name": "nftId",
328
- "type": "uint96"
329
- }
330
- ],
331
- "name": "getComponentOwner",
332
- "outputs": [
333
- {
334
- "internalType": "address",
335
- "name": "owner",
336
- "type": "address"
337
- }
338
- ],
339
- "stateMutability": "view",
340
- "type": "function"
341
- },
342
766
  {
343
767
  "inputs": [],
344
768
  "name": "getComponentOwnerService",
@@ -353,7 +777,13 @@
353
777
  "type": "function"
354
778
  },
355
779
  {
356
- "inputs": [],
780
+ "inputs": [
781
+ {
782
+ "internalType": "Key32",
783
+ "name": "key",
784
+ "type": "bytes32"
785
+ }
786
+ ],
357
787
  "name": "getData",
358
788
  "outputs": [
359
789
  {
@@ -367,11 +797,11 @@
367
797
  },
368
798
  {
369
799
  "inputs": [],
370
- "name": "getInitialOwner",
800
+ "name": "getDistributionService",
371
801
  "outputs": [
372
802
  {
373
- "internalType": "address",
374
- "name": "initialOwner",
803
+ "internalType": "contract IDistributionService",
804
+ "name": "",
375
805
  "type": "address"
376
806
  }
377
807
  ],
@@ -379,26 +809,19 @@
379
809
  "type": "function"
380
810
  },
381
811
  {
382
- "inputs": [],
383
- "name": "getNftId",
384
- "outputs": [
812
+ "inputs": [
385
813
  {
386
- "internalType": "NftId",
387
- "name": "nftId",
388
- "type": "uint96"
814
+ "internalType": "ObjectType",
815
+ "name": "objectType",
816
+ "type": "uint8"
389
817
  }
390
818
  ],
391
- "stateMutability": "view",
392
- "type": "function"
393
- },
394
- {
395
- "inputs": [],
396
- "name": "getOwner",
819
+ "name": "getInitialState",
397
820
  "outputs": [
398
821
  {
399
- "internalType": "address",
400
- "name": "owner",
401
- "type": "address"
822
+ "internalType": "StateId",
823
+ "name": "",
824
+ "type": "uint8"
402
825
  }
403
826
  ],
404
827
  "stateMutability": "view",
@@ -406,12 +829,12 @@
406
829
  },
407
830
  {
408
831
  "inputs": [],
409
- "name": "getParentNftId",
832
+ "name": "getInstanceReader",
410
833
  "outputs": [
411
834
  {
412
- "internalType": "NftId",
413
- "name": "parentNftId",
414
- "type": "uint96"
835
+ "internalType": "contract InstanceReader",
836
+ "name": "",
837
+ "type": "address"
415
838
  }
416
839
  ],
417
840
  "stateMutability": "view",
@@ -420,63 +843,43 @@
420
843
  {
421
844
  "inputs": [
422
845
  {
423
- "internalType": "NftId",
424
- "name": "nftId",
425
- "type": "uint96"
846
+ "internalType": "Key32",
847
+ "name": "key",
848
+ "type": "bytes32"
426
849
  }
427
850
  ],
428
- "name": "getPolicyInfo",
851
+ "name": "getMetadata",
429
852
  "outputs": [
430
853
  {
431
854
  "components": [
432
855
  {
433
- "internalType": "NftId",
434
- "name": "nftId",
435
- "type": "uint96"
856
+ "internalType": "ObjectType",
857
+ "name": "objectType",
858
+ "type": "uint8"
436
859
  },
437
860
  {
438
- "internalType": "enum IPolicy.PolicyState",
861
+ "internalType": "StateId",
439
862
  "name": "state",
440
863
  "type": "uint8"
441
864
  },
442
865
  {
443
- "internalType": "uint256",
444
- "name": "sumInsuredAmount",
445
- "type": "uint256"
446
- },
447
- {
448
- "internalType": "uint256",
449
- "name": "premiumAmount",
450
- "type": "uint256"
451
- },
452
- {
453
- "internalType": "uint256",
454
- "name": "lifetime",
455
- "type": "uint256"
456
- },
457
- {
458
- "internalType": "uint256",
459
- "name": "createdAt",
460
- "type": "uint256"
461
- },
462
- {
463
- "internalType": "uint256",
464
- "name": "activatedAt",
465
- "type": "uint256"
866
+ "internalType": "address",
867
+ "name": "updatedBy",
868
+ "type": "address"
466
869
  },
467
870
  {
468
- "internalType": "uint256",
469
- "name": "expiredAt",
470
- "type": "uint256"
871
+ "internalType": "Blocknumber",
872
+ "name": "updatedIn",
873
+ "type": "uint32"
471
874
  },
472
875
  {
473
- "internalType": "uint256",
474
- "name": "closedAt",
475
- "type": "uint256"
876
+ "internalType": "Blocknumber",
877
+ "name": "createdIn",
878
+ "type": "uint32"
476
879
  }
477
880
  ],
478
- "internalType": "struct IPolicy.PolicyInfo",
479
- "name": "info",
881
+ "internalType": "struct IKeyValueStore.Metadata",
882
+ "name": "metadata",
480
883
  "type": "tuple"
481
884
  }
482
885
  ],
@@ -484,46 +887,26 @@
484
887
  "type": "function"
485
888
  },
486
889
  {
487
- "inputs": [
890
+ "inputs": [],
891
+ "name": "getPoolService",
892
+ "outputs": [
488
893
  {
489
- "internalType": "NftId",
490
- "name": "nftId",
491
- "type": "uint96"
894
+ "internalType": "contract IPoolService",
895
+ "name": "",
896
+ "type": "address"
492
897
  }
493
898
  ],
494
- "name": "getPoolInfo",
899
+ "stateMutability": "view",
900
+ "type": "function"
901
+ },
902
+ {
903
+ "inputs": [],
904
+ "name": "getProductService",
495
905
  "outputs": [
496
906
  {
497
- "components": [
498
- {
499
- "internalType": "NftId",
500
- "name": "nftId",
501
- "type": "uint96"
502
- },
503
- {
504
- "internalType": "address",
505
- "name": "wallet",
506
- "type": "address"
507
- },
508
- {
509
- "internalType": "address",
510
- "name": "token",
511
- "type": "address"
512
- },
513
- {
514
- "internalType": "uint256",
515
- "name": "capital",
516
- "type": "uint256"
517
- },
518
- {
519
- "internalType": "uint256",
520
- "name": "lockedCapital",
521
- "type": "uint256"
522
- }
523
- ],
524
- "internalType": "struct IPool.PoolInfo",
525
- "name": "info",
526
- "type": "tuple"
907
+ "internalType": "contract IProductService",
908
+ "name": "",
909
+ "type": "address"
527
910
  }
528
911
  ],
529
912
  "stateMutability": "view",
@@ -532,43 +915,36 @@
532
915
  {
533
916
  "inputs": [
534
917
  {
535
- "internalType": "NftId",
536
- "name": "productNftId",
537
- "type": "uint96"
918
+ "internalType": "Key32",
919
+ "name": "key",
920
+ "type": "bytes32"
538
921
  }
539
922
  ],
540
- "name": "getPoolNftId",
923
+ "name": "getState",
541
924
  "outputs": [
542
925
  {
543
- "internalType": "NftId",
544
- "name": "poolNftId",
545
- "type": "uint96"
926
+ "internalType": "StateId",
927
+ "name": "state",
928
+ "type": "uint8"
546
929
  }
547
930
  ],
548
931
  "stateMutability": "view",
549
932
  "type": "function"
550
933
  },
551
934
  {
552
- "inputs": [],
553
- "name": "getProductService",
554
- "outputs": [
935
+ "inputs": [
555
936
  {
556
- "internalType": "contract IProductService",
557
- "name": "",
558
- "type": "address"
937
+ "internalType": "ObjectType",
938
+ "name": "objectType",
939
+ "type": "uint8"
559
940
  }
560
941
  ],
561
- "stateMutability": "view",
562
- "type": "function"
563
- },
564
- {
565
- "inputs": [],
566
- "name": "getRegistry",
942
+ "name": "hasLifecycle",
567
943
  "outputs": [
568
944
  {
569
- "internalType": "contract IRegistry",
570
- "name": "registry",
571
- "type": "address"
945
+ "internalType": "bool",
946
+ "name": "",
947
+ "type": "bool"
572
948
  }
573
949
  ],
574
950
  "stateMutability": "view",
@@ -577,30 +953,46 @@
577
953
  {
578
954
  "inputs": [
579
955
  {
580
- "internalType": "uint256",
581
- "name": "idx",
582
- "type": "uint256"
956
+ "internalType": "ObjectType",
957
+ "name": "objectType",
958
+ "type": "uint8"
959
+ },
960
+ {
961
+ "internalType": "StateId",
962
+ "name": "fromId",
963
+ "type": "uint8"
964
+ },
965
+ {
966
+ "internalType": "StateId",
967
+ "name": "toId",
968
+ "type": "uint8"
583
969
  }
584
970
  ],
585
- "name": "getRole",
971
+ "name": "isValidTransition",
586
972
  "outputs": [
587
973
  {
588
- "internalType": "bytes32",
589
- "name": "role",
590
- "type": "bytes32"
974
+ "internalType": "bool",
975
+ "name": "",
976
+ "type": "bool"
591
977
  }
592
978
  ],
593
979
  "stateMutability": "view",
594
980
  "type": "function"
595
981
  },
596
982
  {
597
- "inputs": [],
598
- "name": "getRoleCount",
983
+ "inputs": [
984
+ {
985
+ "internalType": "bytes4",
986
+ "name": "interfaceId",
987
+ "type": "bytes4"
988
+ }
989
+ ],
990
+ "name": "supportsInterface",
599
991
  "outputs": [
600
992
  {
601
- "internalType": "uint256",
602
- "name": "roles",
603
- "type": "uint256"
993
+ "internalType": "bool",
994
+ "name": "",
995
+ "type": "bool"
604
996
  }
605
997
  ],
606
998
  "stateMutability": "view",
@@ -609,16 +1001,21 @@
609
1001
  {
610
1002
  "inputs": [
611
1003
  {
612
- "internalType": "string",
613
- "name": "roleName",
614
- "type": "string"
1004
+ "internalType": "ObjectType",
1005
+ "name": "objectType",
1006
+ "type": "uint8"
1007
+ },
1008
+ {
1009
+ "internalType": "KeyId",
1010
+ "name": "id",
1011
+ "type": "bytes31"
615
1012
  }
616
1013
  ],
617
- "name": "getRoleForName",
1014
+ "name": "toKey32",
618
1015
  "outputs": [
619
1016
  {
620
- "internalType": "bytes32",
621
- "name": "role",
1017
+ "internalType": "Key32",
1018
+ "name": "",
622
1019
  "type": "bytes32"
623
1020
  }
624
1021
  ],
@@ -628,109 +1025,302 @@
628
1025
  {
629
1026
  "inputs": [
630
1027
  {
631
- "internalType": "bytes32",
632
- "name": "role",
633
- "type": "bytes32"
1028
+ "internalType": "NftId",
1029
+ "name": "bundleNftId",
1030
+ "type": "uint96"
1031
+ },
1032
+ {
1033
+ "components": [
1034
+ {
1035
+ "internalType": "NftId",
1036
+ "name": "poolNftId",
1037
+ "type": "uint96"
1038
+ },
1039
+ {
1040
+ "components": [
1041
+ {
1042
+ "internalType": "UFixed",
1043
+ "name": "fractionalFee",
1044
+ "type": "uint256"
1045
+ },
1046
+ {
1047
+ "internalType": "uint256",
1048
+ "name": "fixedFee",
1049
+ "type": "uint256"
1050
+ }
1051
+ ],
1052
+ "internalType": "struct Fee",
1053
+ "name": "fee",
1054
+ "type": "tuple"
1055
+ },
1056
+ {
1057
+ "internalType": "bytes",
1058
+ "name": "filter",
1059
+ "type": "bytes"
1060
+ },
1061
+ {
1062
+ "internalType": "uint256",
1063
+ "name": "capitalAmount",
1064
+ "type": "uint256"
1065
+ },
1066
+ {
1067
+ "internalType": "uint256",
1068
+ "name": "lockedAmount",
1069
+ "type": "uint256"
1070
+ },
1071
+ {
1072
+ "internalType": "uint256",
1073
+ "name": "balanceAmount",
1074
+ "type": "uint256"
1075
+ },
1076
+ {
1077
+ "internalType": "uint256",
1078
+ "name": "lifetime",
1079
+ "type": "uint256"
1080
+ },
1081
+ {
1082
+ "internalType": "Timestamp",
1083
+ "name": "expiredAt",
1084
+ "type": "uint40"
1085
+ },
1086
+ {
1087
+ "internalType": "Timestamp",
1088
+ "name": "closedAt",
1089
+ "type": "uint40"
1090
+ }
1091
+ ],
1092
+ "internalType": "struct IBundle.BundleInfo",
1093
+ "name": "bundle",
1094
+ "type": "tuple"
1095
+ },
1096
+ {
1097
+ "internalType": "StateId",
1098
+ "name": "newState",
1099
+ "type": "uint8"
634
1100
  }
635
1101
  ],
636
- "name": "getRoleInfo",
637
- "outputs": [
1102
+ "name": "updateBundle",
1103
+ "outputs": [],
1104
+ "stateMutability": "nonpayable",
1105
+ "type": "function"
1106
+ },
1107
+ {
1108
+ "inputs": [
1109
+ {
1110
+ "internalType": "NftId",
1111
+ "name": "bundleNftId",
1112
+ "type": "uint96"
1113
+ },
1114
+ {
1115
+ "internalType": "StateId",
1116
+ "name": "newState",
1117
+ "type": "uint8"
1118
+ }
1119
+ ],
1120
+ "name": "updateBundleState",
1121
+ "outputs": [],
1122
+ "stateMutability": "nonpayable",
1123
+ "type": "function"
1124
+ },
1125
+ {
1126
+ "inputs": [
1127
+ {
1128
+ "internalType": "NftId",
1129
+ "name": "distributionNftId",
1130
+ "type": "uint96"
1131
+ },
638
1132
  {
639
1133
  "components": [
640
1134
  {
641
- "internalType": "bytes32",
642
- "name": "id",
643
- "type": "bytes32"
1135
+ "internalType": "NftId",
1136
+ "name": "productNftId",
1137
+ "type": "uint96"
1138
+ },
1139
+ {
1140
+ "internalType": "contract TokenHandler",
1141
+ "name": "tokenHandler",
1142
+ "type": "address"
644
1143
  },
645
1144
  {
646
- "internalType": "string",
647
- "name": "name",
648
- "type": "string"
1145
+ "components": [
1146
+ {
1147
+ "internalType": "UFixed",
1148
+ "name": "fractionalFee",
1149
+ "type": "uint256"
1150
+ },
1151
+ {
1152
+ "internalType": "uint256",
1153
+ "name": "fixedFee",
1154
+ "type": "uint256"
1155
+ }
1156
+ ],
1157
+ "internalType": "struct Fee",
1158
+ "name": "distributionFee",
1159
+ "type": "tuple"
649
1160
  },
650
1161
  {
651
1162
  "internalType": "bool",
652
- "name": "isActive",
1163
+ "name": "isIntercepting",
653
1164
  "type": "bool"
1165
+ },
1166
+ {
1167
+ "internalType": "address",
1168
+ "name": "wallet",
1169
+ "type": "address"
654
1170
  }
655
1171
  ],
656
- "internalType": "struct IAccess.RoleInfo",
657
- "name": "info",
1172
+ "internalType": "struct ISetup.DistributionSetupInfo",
1173
+ "name": "setup",
658
1174
  "type": "tuple"
1175
+ },
1176
+ {
1177
+ "internalType": "StateId",
1178
+ "name": "newState",
1179
+ "type": "uint8"
659
1180
  }
660
1181
  ],
661
- "stateMutability": "view",
1182
+ "name": "updateDistributionSetup",
1183
+ "outputs": [],
1184
+ "stateMutability": "nonpayable",
662
1185
  "type": "function"
663
1186
  },
664
1187
  {
665
1188
  "inputs": [
666
1189
  {
667
- "internalType": "bytes32",
668
- "name": "role",
669
- "type": "bytes32"
1190
+ "internalType": "NftId",
1191
+ "name": "distributionNftId",
1192
+ "type": "uint96"
670
1193
  },
671
1194
  {
672
- "internalType": "uint256",
673
- "name": "idx",
674
- "type": "uint256"
675
- }
676
- ],
677
- "name": "getRoleMember",
678
- "outputs": [
679
- {
680
- "internalType": "address",
681
- "name": "roleMembers",
682
- "type": "address"
1195
+ "internalType": "StateId",
1196
+ "name": "newState",
1197
+ "type": "uint8"
683
1198
  }
684
1199
  ],
685
- "stateMutability": "view",
1200
+ "name": "updateDistributionSetupState",
1201
+ "outputs": [],
1202
+ "stateMutability": "nonpayable",
686
1203
  "type": "function"
687
1204
  },
688
1205
  {
689
1206
  "inputs": [
690
1207
  {
691
- "internalType": "bytes32",
692
- "name": "role",
693
- "type": "bytes32"
694
- }
695
- ],
696
- "name": "getRoleMemberCount",
697
- "outputs": [
1208
+ "internalType": "NftId",
1209
+ "name": "policyNftId",
1210
+ "type": "uint96"
1211
+ },
698
1212
  {
699
- "internalType": "uint256",
700
- "name": "roleMembers",
701
- "type": "uint256"
702
- }
703
- ],
704
- "stateMutability": "view",
705
- "type": "function"
706
- },
707
- {
708
- "inputs": [],
709
- "name": "getType",
710
- "outputs": [
1213
+ "components": [
1214
+ {
1215
+ "internalType": "NftId",
1216
+ "name": "productNftId",
1217
+ "type": "uint96"
1218
+ },
1219
+ {
1220
+ "internalType": "NftId",
1221
+ "name": "bundleNftId",
1222
+ "type": "uint96"
1223
+ },
1224
+ {
1225
+ "internalType": "ReferralId",
1226
+ "name": "referralId",
1227
+ "type": "bytes8"
1228
+ },
1229
+ {
1230
+ "internalType": "RiskId",
1231
+ "name": "riskId",
1232
+ "type": "bytes8"
1233
+ },
1234
+ {
1235
+ "internalType": "uint256",
1236
+ "name": "sumInsuredAmount",
1237
+ "type": "uint256"
1238
+ },
1239
+ {
1240
+ "internalType": "uint256",
1241
+ "name": "premiumAmount",
1242
+ "type": "uint256"
1243
+ },
1244
+ {
1245
+ "internalType": "uint256",
1246
+ "name": "premiumPaidAmount",
1247
+ "type": "uint256"
1248
+ },
1249
+ {
1250
+ "internalType": "uint256",
1251
+ "name": "lifetime",
1252
+ "type": "uint256"
1253
+ },
1254
+ {
1255
+ "internalType": "bytes",
1256
+ "name": "applicationData",
1257
+ "type": "bytes"
1258
+ },
1259
+ {
1260
+ "internalType": "bytes",
1261
+ "name": "policyData",
1262
+ "type": "bytes"
1263
+ },
1264
+ {
1265
+ "internalType": "uint16",
1266
+ "name": "claimsCount",
1267
+ "type": "uint16"
1268
+ },
1269
+ {
1270
+ "internalType": "uint16",
1271
+ "name": "openClaimsCount",
1272
+ "type": "uint16"
1273
+ },
1274
+ {
1275
+ "internalType": "uint256",
1276
+ "name": "payoutAmount",
1277
+ "type": "uint256"
1278
+ },
1279
+ {
1280
+ "internalType": "Timestamp",
1281
+ "name": "activatedAt",
1282
+ "type": "uint40"
1283
+ },
1284
+ {
1285
+ "internalType": "Timestamp",
1286
+ "name": "expiredAt",
1287
+ "type": "uint40"
1288
+ },
1289
+ {
1290
+ "internalType": "Timestamp",
1291
+ "name": "closedAt",
1292
+ "type": "uint40"
1293
+ }
1294
+ ],
1295
+ "internalType": "struct IPolicy.PolicyInfo",
1296
+ "name": "policy",
1297
+ "type": "tuple"
1298
+ },
711
1299
  {
712
- "internalType": "uint256",
713
- "name": "objectType",
714
- "type": "uint256"
1300
+ "internalType": "StateId",
1301
+ "name": "newState",
1302
+ "type": "uint8"
715
1303
  }
716
1304
  ],
717
- "stateMutability": "view",
1305
+ "name": "updatePolicy",
1306
+ "outputs": [],
1307
+ "stateMutability": "nonpayable",
718
1308
  "type": "function"
719
1309
  },
720
1310
  {
721
1311
  "inputs": [
722
1312
  {
723
- "internalType": "bytes32",
724
- "name": "role",
725
- "type": "bytes32"
1313
+ "internalType": "NftId",
1314
+ "name": "policyNftId",
1315
+ "type": "uint96"
726
1316
  },
727
1317
  {
728
- "internalType": "address",
729
- "name": "member",
730
- "type": "address"
1318
+ "internalType": "StateId",
1319
+ "name": "newState",
1320
+ "type": "uint8"
731
1321
  }
732
1322
  ],
733
- "name": "grantRole",
1323
+ "name": "updatePolicyState",
734
1324
  "outputs": [],
735
1325
  "stateMutability": "nonpayable",
736
1326
  "type": "function"
@@ -738,148 +1328,351 @@
738
1328
  {
739
1329
  "inputs": [
740
1330
  {
741
- "internalType": "bytes32",
742
- "name": "role",
743
- "type": "bytes32"
1331
+ "internalType": "NftId",
1332
+ "name": "poolNftId",
1333
+ "type": "uint96"
744
1334
  },
745
1335
  {
746
- "internalType": "address",
747
- "name": "member",
748
- "type": "address"
749
- }
750
- ],
751
- "name": "hasRole",
752
- "outputs": [
753
- {
754
- "internalType": "bool",
755
- "name": "",
756
- "type": "bool"
757
- }
758
- ],
759
- "stateMutability": "view",
760
- "type": "function"
761
- },
762
- {
763
- "inputs": [],
764
- "name": "isRegisterable",
765
- "outputs": [
766
- {
767
- "internalType": "bool",
768
- "name": "",
769
- "type": "bool"
770
- }
771
- ],
772
- "stateMutability": "pure",
773
- "type": "function"
774
- },
775
- {
776
- "inputs": [],
777
- "name": "isRegistered",
778
- "outputs": [
1336
+ "components": [
1337
+ {
1338
+ "internalType": "NftId",
1339
+ "name": "productNftId",
1340
+ "type": "uint96"
1341
+ },
1342
+ {
1343
+ "internalType": "contract TokenHandler",
1344
+ "name": "tokenHandler",
1345
+ "type": "address"
1346
+ },
1347
+ {
1348
+ "internalType": "UFixed",
1349
+ "name": "collateralizationLevel",
1350
+ "type": "uint256"
1351
+ },
1352
+ {
1353
+ "components": [
1354
+ {
1355
+ "internalType": "UFixed",
1356
+ "name": "fractionalFee",
1357
+ "type": "uint256"
1358
+ },
1359
+ {
1360
+ "internalType": "uint256",
1361
+ "name": "fixedFee",
1362
+ "type": "uint256"
1363
+ }
1364
+ ],
1365
+ "internalType": "struct Fee",
1366
+ "name": "poolFee",
1367
+ "type": "tuple"
1368
+ },
1369
+ {
1370
+ "components": [
1371
+ {
1372
+ "internalType": "UFixed",
1373
+ "name": "fractionalFee",
1374
+ "type": "uint256"
1375
+ },
1376
+ {
1377
+ "internalType": "uint256",
1378
+ "name": "fixedFee",
1379
+ "type": "uint256"
1380
+ }
1381
+ ],
1382
+ "internalType": "struct Fee",
1383
+ "name": "stakingFee",
1384
+ "type": "tuple"
1385
+ },
1386
+ {
1387
+ "components": [
1388
+ {
1389
+ "internalType": "UFixed",
1390
+ "name": "fractionalFee",
1391
+ "type": "uint256"
1392
+ },
1393
+ {
1394
+ "internalType": "uint256",
1395
+ "name": "fixedFee",
1396
+ "type": "uint256"
1397
+ }
1398
+ ],
1399
+ "internalType": "struct Fee",
1400
+ "name": "performanceFee",
1401
+ "type": "tuple"
1402
+ },
1403
+ {
1404
+ "internalType": "bool",
1405
+ "name": "isIntercepting",
1406
+ "type": "bool"
1407
+ },
1408
+ {
1409
+ "internalType": "bool",
1410
+ "name": "isConfirmingApplication",
1411
+ "type": "bool"
1412
+ },
1413
+ {
1414
+ "internalType": "address",
1415
+ "name": "wallet",
1416
+ "type": "address"
1417
+ }
1418
+ ],
1419
+ "internalType": "struct ISetup.PoolSetupInfo",
1420
+ "name": "setup",
1421
+ "type": "tuple"
1422
+ },
779
1423
  {
780
- "internalType": "bool",
781
- "name": "",
782
- "type": "bool"
1424
+ "internalType": "StateId",
1425
+ "name": "newState",
1426
+ "type": "uint8"
783
1427
  }
784
1428
  ],
785
- "stateMutability": "view",
1429
+ "name": "updatePoolSetup",
1430
+ "outputs": [],
1431
+ "stateMutability": "nonpayable",
786
1432
  "type": "function"
787
1433
  },
788
1434
  {
789
- "inputs": [],
790
- "name": "register",
791
- "outputs": [
1435
+ "inputs": [
792
1436
  {
793
1437
  "internalType": "NftId",
794
- "name": "nftId",
1438
+ "name": "poolNftId",
795
1439
  "type": "uint96"
1440
+ },
1441
+ {
1442
+ "internalType": "StateId",
1443
+ "name": "newState",
1444
+ "type": "uint8"
796
1445
  }
797
1446
  ],
1447
+ "name": "updatePoolSetupState",
1448
+ "outputs": [],
798
1449
  "stateMutability": "nonpayable",
799
1450
  "type": "function"
800
1451
  },
801
1452
  {
802
1453
  "inputs": [
803
- {
804
- "internalType": "contract IComponentContract",
805
- "name": "component",
806
- "type": "address"
807
- }
808
- ],
809
- "name": "registerComponent",
810
- "outputs": [
811
1454
  {
812
1455
  "internalType": "NftId",
813
- "name": "nftId",
1456
+ "name": "productNftId",
814
1457
  "type": "uint96"
1458
+ },
1459
+ {
1460
+ "components": [
1461
+ {
1462
+ "internalType": "contract IERC20Metadata",
1463
+ "name": "token",
1464
+ "type": "address"
1465
+ },
1466
+ {
1467
+ "internalType": "contract TokenHandler",
1468
+ "name": "tokenHandler",
1469
+ "type": "address"
1470
+ },
1471
+ {
1472
+ "internalType": "NftId",
1473
+ "name": "distributionNftId",
1474
+ "type": "uint96"
1475
+ },
1476
+ {
1477
+ "internalType": "NftId",
1478
+ "name": "poolNftId",
1479
+ "type": "uint96"
1480
+ },
1481
+ {
1482
+ "components": [
1483
+ {
1484
+ "internalType": "UFixed",
1485
+ "name": "fractionalFee",
1486
+ "type": "uint256"
1487
+ },
1488
+ {
1489
+ "internalType": "uint256",
1490
+ "name": "fixedFee",
1491
+ "type": "uint256"
1492
+ }
1493
+ ],
1494
+ "internalType": "struct Fee",
1495
+ "name": "distributionFee",
1496
+ "type": "tuple"
1497
+ },
1498
+ {
1499
+ "components": [
1500
+ {
1501
+ "internalType": "UFixed",
1502
+ "name": "fractionalFee",
1503
+ "type": "uint256"
1504
+ },
1505
+ {
1506
+ "internalType": "uint256",
1507
+ "name": "fixedFee",
1508
+ "type": "uint256"
1509
+ }
1510
+ ],
1511
+ "internalType": "struct Fee",
1512
+ "name": "productFee",
1513
+ "type": "tuple"
1514
+ },
1515
+ {
1516
+ "components": [
1517
+ {
1518
+ "internalType": "UFixed",
1519
+ "name": "fractionalFee",
1520
+ "type": "uint256"
1521
+ },
1522
+ {
1523
+ "internalType": "uint256",
1524
+ "name": "fixedFee",
1525
+ "type": "uint256"
1526
+ }
1527
+ ],
1528
+ "internalType": "struct Fee",
1529
+ "name": "processingFee",
1530
+ "type": "tuple"
1531
+ },
1532
+ {
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": "poolFee",
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": "stakingFee",
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": "performanceFee",
1581
+ "type": "tuple"
1582
+ },
1583
+ {
1584
+ "internalType": "bool",
1585
+ "name": "isIntercepting",
1586
+ "type": "bool"
1587
+ },
1588
+ {
1589
+ "internalType": "address",
1590
+ "name": "wallet",
1591
+ "type": "address"
1592
+ }
1593
+ ],
1594
+ "internalType": "struct ISetup.ProductSetupInfo",
1595
+ "name": "setup",
1596
+ "type": "tuple"
1597
+ },
1598
+ {
1599
+ "internalType": "StateId",
1600
+ "name": "newState",
1601
+ "type": "uint8"
815
1602
  }
816
1603
  ],
1604
+ "name": "updateProductSetup",
1605
+ "outputs": [],
817
1606
  "stateMutability": "nonpayable",
818
1607
  "type": "function"
819
1608
  },
820
1609
  {
821
1610
  "inputs": [
822
1611
  {
823
- "internalType": "bytes32",
824
- "name": "role",
825
- "type": "bytes32"
1612
+ "internalType": "NftId",
1613
+ "name": "productNftId",
1614
+ "type": "uint96"
826
1615
  },
827
1616
  {
828
- "internalType": "address",
829
- "name": "member",
830
- "type": "address"
1617
+ "internalType": "StateId",
1618
+ "name": "newState",
1619
+ "type": "uint8"
831
1620
  }
832
1621
  ],
833
- "name": "revokeRole",
1622
+ "name": "updateProductSetupState",
834
1623
  "outputs": [],
835
1624
  "stateMutability": "nonpayable",
836
1625
  "type": "function"
837
1626
  },
838
1627
  {
839
1628
  "inputs": [
1629
+ {
1630
+ "internalType": "RiskId",
1631
+ "name": "riskId",
1632
+ "type": "bytes8"
1633
+ },
840
1634
  {
841
1635
  "components": [
842
1636
  {
843
1637
  "internalType": "NftId",
844
- "name": "nftId",
1638
+ "name": "productNftId",
845
1639
  "type": "uint96"
846
1640
  },
847
1641
  {
848
- "internalType": "enum IComponent.CState",
849
- "name": "state",
850
- "type": "uint8"
1642
+ "internalType": "bytes",
1643
+ "name": "data",
1644
+ "type": "bytes"
851
1645
  }
852
1646
  ],
853
- "internalType": "struct IComponent.ComponentInfo",
854
- "name": "info",
1647
+ "internalType": "struct IRisk.RiskInfo",
1648
+ "name": "risk",
855
1649
  "type": "tuple"
856
- }
857
- ],
858
- "name": "setComponentInfo",
859
- "outputs": [
1650
+ },
860
1651
  {
861
- "internalType": "NftId",
862
- "name": "componentNftId",
863
- "type": "uint96"
1652
+ "internalType": "StateId",
1653
+ "name": "newState",
1654
+ "type": "uint8"
864
1655
  }
865
1656
  ],
1657
+ "name": "updateRisk",
1658
+ "outputs": [],
866
1659
  "stateMutability": "nonpayable",
867
1660
  "type": "function"
868
1661
  },
869
1662
  {
870
1663
  "inputs": [
871
1664
  {
872
- "internalType": "NftId",
873
- "name": "poolNftId",
874
- "type": "uint96"
1665
+ "internalType": "RiskId",
1666
+ "name": "riskId",
1667
+ "type": "bytes8"
875
1668
  },
876
1669
  {
877
- "internalType": "NftId",
878
- "name": "policyNftId",
879
- "type": "uint96"
1670
+ "internalType": "StateId",
1671
+ "name": "newState",
1672
+ "type": "uint8"
880
1673
  }
881
1674
  ],
882
- "name": "underwrite",
1675
+ "name": "updateRiskState",
883
1676
  "outputs": [],
884
1677
  "stateMutability": "nonpayable",
885
1678
  "type": "function"