@etherisc/gif-next 0.0.2-da2c7dd-538 → 0.0.2-da87b00-860

Sign up to get free protection for your applications and to get access to all the features.
Files changed (469) hide show
  1. package/README.md +57 -1
  2. package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +1 -1
  3. package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +106 -38
  4. package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +1 -1
  5. package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +91 -45
  6. package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +1 -1
  7. package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.json +58 -6
  8. package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
  9. package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +573 -288
  10. package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.dbg.json +4 -0
  11. package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.json +1289 -0
  12. package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
  13. package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +8 -39
  14. package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
  15. package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +295 -47
  16. package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +1 -1
  17. package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +1 -1
  18. package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.json +452 -210
  19. package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
  20. package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +119 -14
  21. package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
  22. package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.json +246 -16
  23. package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
  24. package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +420 -27
  25. package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
  26. package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +64 -142
  27. package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
  28. package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +275 -59
  29. package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
  30. package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +21 -88
  31. package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
  32. package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +448 -148
  33. package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
  34. package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +143 -77
  35. package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
  36. package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +20 -87
  37. package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
  38. package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +296 -20
  39. package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.dbg.json +1 -1
  40. package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.dbg.json +1 -1
  41. package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.json +109 -100
  42. package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +1 -1
  43. package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +274 -58
  44. package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
  45. package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +145 -124
  46. package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
  47. package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +274 -58
  48. package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.dbg.json +1 -1
  49. package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +1 -1
  50. package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +126 -166
  51. package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +1 -1
  52. package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +274 -58
  53. package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +1 -1
  54. package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +39 -63
  55. package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
  56. package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +130 -138
  57. package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +1 -1
  58. package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +274 -58
  59. package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
  60. package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +333 -180
  61. package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +1 -1
  62. package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +274 -58
  63. package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +1 -1
  64. package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +2 -2
  65. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  66. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +427 -28
  67. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
  68. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +335 -12
  69. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  70. package/artifacts/contracts/instance/Instance.sol/Instance.json +430 -62
  71. package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
  72. package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +822 -402
  73. package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
  74. package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +299 -58
  75. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
  76. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +619 -402
  77. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
  78. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +367 -64
  79. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
  80. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +83 -55
  81. package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
  82. package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +448 -374
  83. package/artifacts/contracts/instance/RiskSet.sol/RiskSet.dbg.json +1 -1
  84. package/artifacts/contracts/instance/RiskSet.sol/RiskSet.json +101 -88
  85. package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
  86. package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +8 -8
  87. package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
  88. package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
  89. package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +2 -2
  90. package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +1 -1
  91. package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.json +2 -2
  92. package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +1 -1
  93. package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.json +2 -2
  94. package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.dbg.json +1 -1
  95. package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.json +20 -20
  96. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
  97. package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +1 -1
  98. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
  99. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
  100. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
  101. package/artifacts/contracts/mock/Dip.sol/Dip.dbg.json +1 -1
  102. package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +1 -1
  103. package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +33 -35
  104. package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
  105. package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +294 -53
  106. package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +1 -1
  107. package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +1 -1
  108. package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +19 -21
  109. package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
  110. package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.json +29 -0
  111. package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
  112. package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +19 -21
  113. package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
  114. package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +87 -42
  115. package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
  116. package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +96 -50
  117. package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
  118. package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +59 -69
  119. package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
  120. package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +274 -58
  121. package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
  122. package/artifacts/contracts/pool/BundleService.sol/BundleService.json +300 -123
  123. package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
  124. package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +124 -58
  125. package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
  126. package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +186 -33
  127. package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  128. package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +29 -31
  129. package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
  130. package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +238 -19
  131. package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
  132. package/artifacts/contracts/pool/Pool.sol/Pool.json +29 -31
  133. package/artifacts/contracts/pool/PoolLib.sol/PoolLib.dbg.json +1 -1
  134. package/artifacts/contracts/pool/PoolLib.sol/PoolLib.json +100 -34
  135. package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
  136. package/artifacts/contracts/pool/PoolService.sol/PoolService.json +346 -87
  137. package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
  138. package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +121 -63
  139. package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
  140. package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +273 -50
  141. package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
  142. package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +103 -41
  143. package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
  144. package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +46 -48
  145. package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
  146. package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +274 -58
  147. package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
  148. package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +142 -102
  149. package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
  150. package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +113 -75
  151. package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
  152. package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +208 -1
  153. package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
  154. package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +50 -10
  155. package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
  156. package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +55 -0
  157. package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
  158. package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +50 -0
  159. package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  160. package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +40 -42
  161. package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +1 -1
  162. package/artifacts/contracts/product/IRiskService.sol/IRiskService.json +224 -18
  163. package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
  164. package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +157 -86
  165. package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.dbg.json +1 -1
  166. package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.json +511 -21
  167. package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
  168. package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +118 -72
  169. package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
  170. package/artifacts/contracts/product/PricingService.sol/PricingService.json +116 -114
  171. package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
  172. package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +100 -70
  173. package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
  174. package/artifacts/contracts/product/Product.sol/Product.json +40 -42
  175. package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +1 -1
  176. package/artifacts/contracts/product/RiskService.sol/RiskService.json +258 -44
  177. package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
  178. package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +84 -42
  179. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  180. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  181. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +33 -22
  182. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
  183. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +29 -0
  184. package/artifacts/contracts/registry/IRelease.sol/IRelease.dbg.json +1 -1
  185. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
  186. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  187. package/artifacts/contracts/registry/Registry.sol/Registry.json +71 -60
  188. package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
  189. package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +704 -472
  190. package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.dbg.json +4 -0
  191. package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.json +1074 -0
  192. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
  193. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +47 -18
  194. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
  195. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +76 -38
  196. package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +1 -1
  197. package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.json +710 -407
  198. package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +1 -1
  199. package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.json +2 -2
  200. package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +1 -1
  201. package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +184 -128
  202. package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
  203. package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +437 -26
  204. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
  205. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +119 -59
  206. package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
  207. package/artifacts/contracts/shared/Component.sol/Component.json +19 -21
  208. package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
  209. package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +212 -232
  210. package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
  211. package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +113 -71
  212. package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +1 -1
  213. package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +130 -39
  214. package/artifacts/contracts/shared/ContractLib.sol/IInstanceAdminHelper.dbg.json +1 -1
  215. package/artifacts/contracts/shared/ContractLib.sol/ITargetHelper.dbg.json +1 -1
  216. package/artifacts/contracts/shared/ContractLib.sol/ITokenRegistryHelper.dbg.json +1 -1
  217. package/artifacts/contracts/shared/ContractLib.sol/ITokenRegistryHelper.json +2 -2
  218. package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
  219. package/artifacts/contracts/shared/IComponent.sol/IComponent.json +19 -21
  220. package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
  221. package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +119 -147
  222. package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
  223. package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +19 -21
  224. package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  225. package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.json +6 -6
  226. package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  227. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
  228. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +19 -0
  229. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
  230. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  231. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +19 -0
  232. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
  233. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
  234. package/artifacts/contracts/shared/IService.sol/IService.json +29 -0
  235. package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +1 -1
  236. package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.json +2 -2
  237. package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
  238. package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +19 -21
  239. package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  240. package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.json +6 -6
  241. package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  242. package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +1 -1
  243. package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.json +2 -2
  244. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
  245. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +21 -2
  246. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
  247. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +2 -2
  248. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  249. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +19 -0
  250. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
  251. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -2
  252. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
  253. package/artifacts/contracts/shared/Service.sol/Service.json +29 -0
  254. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  255. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +2 -2
  256. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.dbg.json +1 -1
  257. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.json +2 -2
  258. package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +1 -1
  259. package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +2 -2
  260. package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
  261. package/artifacts/contracts/staking/IStaking.sol/IStaking.json +1450 -140
  262. package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
  263. package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +161 -110
  264. package/artifacts/contracts/staking/ITargetLimitHandler.sol/ITargetLimitHandler.dbg.json +4 -0
  265. package/artifacts/contracts/staking/ITargetLimitHandler.sol/ITargetLimitHandler.json +50 -0
  266. package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
  267. package/artifacts/contracts/staking/Staking.sol/Staking.json +1624 -272
  268. package/artifacts/contracts/staking/StakingLib.sol/StakingLib.dbg.json +4 -0
  269. package/artifacts/contracts/staking/StakingLib.sol/StakingLib.json +470 -0
  270. package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
  271. package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +135 -68
  272. package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
  273. package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +294 -177
  274. package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
  275. package/artifacts/contracts/staking/StakingService.sol/StakingService.json +200 -157
  276. package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
  277. package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +86 -52
  278. package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
  279. package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +1600 -818
  280. package/artifacts/contracts/staking/TargetHandler.sol/TargetHandler.dbg.json +4 -0
  281. package/artifacts/contracts/staking/TargetHandler.sol/TargetHandler.json +309 -0
  282. package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
  283. package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +159 -87
  284. package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  285. package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
  286. package/artifacts/contracts/type/Amount.sol/AmountLib.json +10 -10
  287. package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  288. package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.json +45 -19
  289. package/artifacts/contracts/type/ChainId.sol/ChainIdLib.dbg.json +4 -0
  290. package/artifacts/contracts/type/ChainId.sol/ChainIdLib.json +193 -0
  291. package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
  292. package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.json +2 -2
  293. package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
  294. package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +2 -2
  295. package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
  296. package/artifacts/contracts/type/Fee.sol/FeeLib.json +93 -37
  297. package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
  298. package/artifacts/contracts/type/Key32.sol/Key32Lib.json +2 -2
  299. package/artifacts/contracts/type/Key32Set.sol/LibKey32Set.dbg.json +1 -1
  300. package/artifacts/contracts/type/Key32Set.sol/LibKey32Set.json +2 -2
  301. package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
  302. package/artifacts/contracts/type/NftId.sol/NftIdLib.json +2 -2
  303. package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  304. package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.json +2 -2
  305. package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  306. package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.json +33 -31
  307. package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
  308. package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +2 -2
  309. package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
  310. package/artifacts/contracts/type/Referral.sol/ReferralLib.json +2 -2
  311. package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
  312. package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +2 -2
  313. package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
  314. package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +2 -2
  315. package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
  316. package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +39 -218
  317. package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
  318. package/artifacts/contracts/type/Seconds.sol/SecondsLib.json +45 -2
  319. package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
  320. package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
  321. package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
  322. package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
  323. package/artifacts/contracts/type/String.sol/StrLib.json +50 -2
  324. package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
  325. package/artifacts/contracts/type/Timestamp.sol/TimestampLib.json +3 -3
  326. package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
  327. package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +60 -36
  328. package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
  329. package/artifacts/contracts/type/Version.sol/VersionLib.json +2 -2
  330. package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
  331. package/artifacts/contracts/type/Version.sol/VersionPartLib.json +56 -2
  332. package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +1 -1
  333. package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.json +10 -0
  334. package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +1 -1
  335. package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +65 -27
  336. package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
  337. package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +15 -2
  338. package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +1 -1
  339. package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.json +10 -0
  340. package/contracts/accounting/AccountingService.sol +15 -3
  341. package/contracts/accounting/IAccountingService.sol +4 -2
  342. package/contracts/authorization/AccessAdmin.sol +389 -298
  343. package/contracts/authorization/AccessAdminLib.sol +396 -0
  344. package/contracts/authorization/AccessManagerCloneable.sol +40 -31
  345. package/contracts/authorization/Authorization.sol +60 -228
  346. package/contracts/authorization/IAccess.sol +25 -7
  347. package/contracts/authorization/IAccessAdmin.sol +81 -80
  348. package/contracts/authorization/IAuthorization.sol +3 -51
  349. package/contracts/authorization/IServiceAuthorization.sol +55 -17
  350. package/contracts/authorization/ServiceAuthorization.sol +248 -34
  351. package/contracts/distribution/BasicDistribution.sol +6 -6
  352. package/contracts/distribution/BasicDistributionAuthorization.sol +11 -4
  353. package/contracts/distribution/Distribution.sol +10 -52
  354. package/contracts/distribution/DistributionService.sol +154 -64
  355. package/contracts/distribution/IDistributionComponent.sol +3 -10
  356. package/contracts/distribution/IDistributionService.sol +24 -10
  357. package/contracts/examples/fire/FirePool.sol +0 -4
  358. package/contracts/examples/fire/FireProduct.sol +6 -10
  359. package/contracts/examples/unpermissioned/SimpleDistribution.sol +32 -8
  360. package/contracts/examples/unpermissioned/SimpleOracle.sol +4 -8
  361. package/contracts/examples/unpermissioned/SimplePool.sol +0 -4
  362. package/contracts/examples/unpermissioned/SimpleProduct.sol +83 -23
  363. package/contracts/instance/IInstance.sol +87 -12
  364. package/contracts/instance/IInstanceService.sol +52 -7
  365. package/contracts/instance/Instance.sol +148 -48
  366. package/contracts/instance/InstanceAdmin.sol +227 -281
  367. package/contracts/instance/InstanceAuthorizationV3.sol +79 -26
  368. package/contracts/instance/InstanceReader.sol +375 -380
  369. package/contracts/instance/InstanceService.sol +230 -134
  370. package/contracts/instance/RiskSet.sol +10 -2
  371. package/contracts/instance/base/BalanceStore.sol +4 -6
  372. package/contracts/instance/base/ObjectLifecycle.sol +2 -6
  373. package/contracts/instance/module/IBundle.sol +6 -5
  374. package/contracts/instance/module/IComponents.sol +16 -5
  375. package/contracts/instance/module/IDistribution.sol +19 -7
  376. package/contracts/instance/module/IPolicy.sol +28 -8
  377. package/contracts/instance/module/IRisk.sol +2 -0
  378. package/contracts/oracle/BasicOracle.sol +2 -4
  379. package/contracts/oracle/BasicOracleAuthorization.sol +18 -2
  380. package/contracts/oracle/IOracle.sol +9 -4
  381. package/contracts/oracle/Oracle.sol +2 -4
  382. package/contracts/oracle/OracleService.sol +8 -8
  383. package/contracts/pool/BasicPool.sol +3 -16
  384. package/contracts/pool/BasicPoolAuthorization.sol +10 -5
  385. package/contracts/pool/BundleService.sol +34 -43
  386. package/contracts/pool/IBundleService.sol +14 -13
  387. package/contracts/pool/IPoolService.sol +7 -2
  388. package/contracts/pool/Pool.sol +4 -16
  389. package/contracts/pool/PoolLib.sol +127 -2
  390. package/contracts/pool/PoolService.sol +41 -184
  391. package/contracts/product/ApplicationService.sol +83 -15
  392. package/contracts/product/BasicProduct.sol +1 -3
  393. package/contracts/product/BasicProductAuthorization.sol +11 -4
  394. package/contracts/product/ClaimService.sol +56 -58
  395. package/contracts/product/IApplicationService.sol +24 -2
  396. package/contracts/product/IClaimService.sol +5 -4
  397. package/contracts/product/IPolicyService.sol +9 -2
  398. package/contracts/product/IPricingService.sol +1 -0
  399. package/contracts/product/IRiskService.sol +21 -3
  400. package/contracts/product/PolicyService.sol +31 -68
  401. package/contracts/product/PolicyServiceLib.sol +79 -5
  402. package/contracts/product/PricingService.sol +33 -31
  403. package/contracts/product/Product.sol +38 -14
  404. package/contracts/product/RiskService.sol +55 -9
  405. package/contracts/registry/IRegistry.sol +15 -9
  406. package/contracts/registry/IRelease.sol +6 -3
  407. package/contracts/registry/Registry.sol +15 -9
  408. package/contracts/registry/RegistryAdmin.sol +100 -263
  409. package/contracts/registry/RegistryAuthorization.sol +336 -0
  410. package/contracts/registry/RegistryService.sol +1 -1
  411. package/contracts/registry/ReleaseAdmin.sol +62 -112
  412. package/contracts/registry/ReleaseRegistry.sol +57 -43
  413. package/contracts/registry/ServiceAuthorizationV3.sol +128 -33
  414. package/contracts/registry/TokenRegistry.sol +56 -52
  415. package/contracts/shared/Component.sol +18 -31
  416. package/contracts/shared/ComponentService.sol +239 -244
  417. package/contracts/shared/ContractLib.sol +134 -75
  418. package/contracts/shared/IComponent.sol +1 -4
  419. package/contracts/shared/IComponentService.sol +21 -22
  420. package/contracts/shared/IKeyValueStore.sol +1 -1
  421. package/contracts/shared/INftOwnable.sol +2 -0
  422. package/contracts/shared/IRegisterable.sol +0 -1
  423. package/contracts/shared/InitializableERC165.sol +9 -1
  424. package/contracts/shared/InstanceLinkedComponent.sol +4 -7
  425. package/contracts/shared/KeyValueStore.sol +3 -3
  426. package/contracts/shared/NftOwnable.sol +4 -2
  427. package/contracts/shared/PolicyHolder.sol +3 -2
  428. package/contracts/shared/Registerable.sol +1 -4
  429. package/contracts/shared/Service.sol +6 -4
  430. package/contracts/shared/TokenHandler.sol +5 -4
  431. package/contracts/staking/IStaking.sol +266 -64
  432. package/contracts/staking/IStakingService.sol +44 -82
  433. package/contracts/staking/ITargetLimitHandler.sol +17 -0
  434. package/contracts/staking/Staking.sol +473 -202
  435. package/contracts/staking/{StakeManagerLib.sol → StakingLib.sol} +55 -84
  436. package/contracts/staking/StakingManager.sol +4 -3
  437. package/contracts/staking/StakingReader.sol +58 -77
  438. package/contracts/staking/StakingService.sol +49 -158
  439. package/contracts/staking/StakingServiceManager.sol +1 -0
  440. package/contracts/staking/StakingStore.sol +1089 -330
  441. package/contracts/staking/TargetHandler.sol +132 -0
  442. package/contracts/staking/TargetManagerLib.sol +69 -46
  443. package/contracts/type/Amount.sol +4 -0
  444. package/contracts/type/Blocknumber.sol +15 -15
  445. package/contracts/type/ChainId.sol +101 -0
  446. package/contracts/type/Fee.sol +8 -8
  447. package/contracts/type/NftId.sol +3 -3
  448. package/contracts/type/ObjectType.sol +21 -17
  449. package/contracts/type/RoleId.sol +57 -59
  450. package/contracts/type/Seconds.sol +19 -0
  451. package/contracts/type/String.sol +12 -0
  452. package/contracts/type/Timestamp.sol +4 -2
  453. package/contracts/type/UFixed.sol +28 -10
  454. package/contracts/type/Version.sol +39 -0
  455. package/contracts/upgradeability/IVersionable.sol +3 -0
  456. package/contracts/upgradeability/ProxyManager.sol +25 -11
  457. package/contracts/upgradeability/UpgradableProxyWithAdmin.sol +12 -2
  458. package/contracts/upgradeability/Versionable.sol +6 -3
  459. package/package.json +2 -2
  460. package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.dbg.json +0 -4
  461. package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.json +0 -24
  462. package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +0 -4
  463. package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.json +0 -485
  464. package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +0 -4
  465. package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +0 -440
  466. package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +0 -4
  467. package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +0 -205
  468. package/contracts/shared/ComponentVerifyingService.sol +0 -128
  469. package/contracts/staking/StakingLifecycle.sol +0 -23
@@ -1,8 +1,6 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.20;
3
3
 
4
- import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
5
-
6
4
  import {Amount} from "../../type/Amount.sol";
7
5
  import {Fee} from "../../type/Fee.sol";
8
6
  import {NftId} from "../../type/NftId.sol";
@@ -12,13 +10,16 @@ import {UFixed} from "../../type/UFixed.sol";
12
10
  interface IComponents {
13
11
 
14
12
  struct ComponentInfo {
13
+ // slot 0
15
14
  string name; // component name (needs to be unique per instance)
16
- IERC20Metadata token;
15
+ // slot 1
17
16
  TokenHandler tokenHandler;
17
+ // slot 2
18
18
  bytes data; // will hold component type specific additional info (eg encoded pool info)
19
19
  }
20
20
 
21
21
  struct ProductInfo {
22
+ // slot 0
22
23
  bool isProcessingFundedClaims; // custom logic to react to pool events for funded claims
23
24
  bool isInterceptingPolicyTransfers; // custom logic for policy nft transfers
24
25
  bool hasDistribution; // flag to indicate if distribution is enabled
@@ -26,26 +27,36 @@ interface IComponents {
26
27
  uint8 numberOfOracles; // actual number of oracles
27
28
  NftId poolNftId; // mandatory
28
29
  NftId distributionNftId; // 0..1 (optional)
30
+ // slot 1
29
31
  NftId [] oracleNftId; // 0..n (optional)
30
32
  }
31
33
 
32
34
  struct FeeInfo {
35
+ // slot 0
33
36
  Fee productFee; // product fee on net premium
37
+ // slot 1
34
38
  Fee processingFee; // product fee on payout amounts
39
+ // slot 2
35
40
  Fee distributionFee; // distribution fee for sales that do not include commissions
41
+ // slot 3
36
42
  Fee minDistributionOwnerFee; // min fee required by distribution owner (not including commissions for distributors)
43
+ // slot 4
37
44
  Fee poolFee; // pool fee on net premium
45
+ // slot 5
38
46
  Fee stakingFee; // pool fee on staked capital from investor
47
+ // slot 6
39
48
  Fee performanceFee; // pool fee on profits from capital investors
40
49
  }
41
50
 
42
51
  struct PoolInfo {
52
+ // slot 0
43
53
  Amount maxBalanceAmount; // max balance amount allowed for pool
54
+ UFixed collateralizationLevel; // factor to calculate collateral for sum insurance (default 100%)
55
+ // slot 1
56
+ UFixed retentionLevel; // amount of collateral held in pool (default 100%)
44
57
  bool isInterceptingBundleTransfers; // custom logic for bundle nft transfers
45
58
  bool isProcessingConfirmedClaims; // custom logic for claims confirmation
46
59
  bool isExternallyManaged; // funding bundles is restricted to book keeping, actual funds may be provided as needed to support payouts
47
60
  bool isVerifyingApplications; // underwriting requires the pool component checks/confirms the applications
48
- UFixed collateralizationLevel; // factor to calculate collateral for sum insurance (default 100%)
49
- UFixed retentionLevel; // amount of collateral held in pool (default 100%)
50
61
  }
51
62
  }
@@ -1,7 +1,6 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.20;
3
3
 
4
- import {Amount} from "../../type/Amount.sol";
5
4
  import {DistributorType} from "../../type/DistributorType.sol";
6
5
  import {NftId} from "../../type/NftId.sol";
7
6
  import {Seconds} from "../../type/Seconds.sol";
@@ -11,31 +10,44 @@ import {UFixed} from "../../type/UFixed.sol";
11
10
  interface IDistribution {
12
11
 
13
12
  struct DistributorTypeInfo {
14
- string name;
13
+ // slot 0
15
14
  UFixed minDiscountPercentage;
15
+ NftId distributionNftId;
16
+ // slot 1
16
17
  UFixed maxDiscountPercentage;
17
- UFixed commissionPercentage;
18
18
  uint32 maxReferralCount;
19
19
  Seconds maxReferralLifetime;
20
20
  bool allowSelfReferrals;
21
21
  bool allowRenewals;
22
+ // slot 2
23
+ UFixed commissionPercentage;
24
+ // slot 3
25
+ string name;
26
+ // slot 4
22
27
  bytes data;
23
28
  }
24
29
 
25
30
  struct DistributorInfo {
31
+ // slot 0
26
32
  DistributorType distributorType;
27
33
  bool active;
28
- bytes data;
29
34
  uint32 numPoliciesSold;
35
+ // slot 1
36
+ bytes data;
30
37
  }
31
38
 
32
- struct ReferralInfo {
39
+ struct ReferralInfo {
40
+ // slot 0
41
+ NftId distributionNftId;
33
42
  NftId distributorNftId;
34
- string referralCode;
35
- UFixed discountPercentage;
36
43
  uint32 maxReferrals;
37
44
  uint32 usedReferrals;
45
+ // slot 1
46
+ UFixed discountPercentage;
38
47
  Timestamp expiryAt;
48
+ // slot 2
49
+ string referralCode;
50
+ // slot 3
39
51
  bytes data;
40
52
  }
41
53
 
@@ -12,29 +12,38 @@ import {Timestamp} from "../../type/Timestamp.sol";
12
12
  interface IPolicy {
13
13
 
14
14
  struct PremiumInfo {
15
+ // slot 0
15
16
  // premium splitting per target wallet
16
17
  Amount productFeeAmount;
17
18
  Amount distributionFeeAndCommissionAmount;
19
+ // slot 1
18
20
  Amount poolPremiumAndFeeAmount;
19
21
 
20
22
  // detailed positions
21
23
  // this is the net premium calculated by the product
22
24
  Amount netPremiumAmount;
25
+ // slot 2
23
26
  // fullPremium = netPremium + all fixed amounts + all variable amounts (excl commission and minDistribtuionOwnerFee variable part)
24
27
  Amount fullPremiumAmount;
25
28
  // effective premium = fullPremium - discount
26
29
  Amount premiumAmount;
30
+ // slot 3
27
31
  Amount productFeeFixAmount;
28
32
  Amount poolFeeFixAmount;
33
+ // slot 4
29
34
  Amount bundleFeeFixAmount;
30
35
  Amount distributionFeeFixAmount;
36
+ // slot 5
31
37
  Amount productFeeVarAmount;
32
38
  Amount poolFeeVarAmount;
39
+ // slot 6
33
40
  Amount bundleFeeVarAmount;
34
41
  Amount distributionFeeVarAmount;
42
+ // slot 7
35
43
  Amount distributionOwnerFeeFixAmount;
36
44
  // this is the remaining amount when the commission and discount are subtracted from the distribution fee variable part (must be at least the minDistributionOwnerFee)
37
45
  Amount distributionOwnerFeeVarAmount;
46
+ // slot 8
38
47
  // this value is based on distributor type referenced in the referral
39
48
  Amount commissionAmount;
40
49
  // this is based on referral used
@@ -43,43 +52,54 @@ interface IPolicy {
43
52
 
44
53
  /// @dev policy data for the full policy lifecycle
45
54
  struct PolicyInfo {
46
- // application data, no changes after applying for a policy
55
+ // slot 0
47
56
  NftId productNftId;
48
57
  NftId bundleNftId;
49
- ReferralId referralId;
50
58
  RiskId riskId;
59
+ // slot 1
51
60
  Amount sumInsuredAmount;
52
61
  Amount premiumAmount; // expected premium at application time
53
- Seconds lifetime;
54
- bytes applicationData;
55
- // policy data that may change during the lifecycle
56
- bytes processData;
62
+ ReferralId referralId;
63
+ // slot 2
57
64
  uint16 claimsCount;
58
65
  uint16 openClaimsCount;
59
66
  Amount claimAmount; // sum of confirmed claim amounts (max = sum insured amount)
60
67
  Amount payoutAmount; // sum of payouts (max = sum confirmed claim amountst)
68
+ // slot 3
61
69
  Timestamp activatedAt; // time of underwriting
70
+ Seconds lifetime;
62
71
  Timestamp expiredAt; // no new claims (activatedAt + lifetime)
63
72
  Timestamp closedAt; // no locked capital (or declinedAt)
73
+ // slot 4
74
+ bytes applicationData;
75
+ // slot 5
76
+ bytes processData;
64
77
  }
65
78
 
66
79
  // claimId neeeds to be encoded policyNftId:claimId combination
67
80
  struct ClaimInfo {
81
+ // slot 0
68
82
  Amount claimAmount;
69
83
  Amount paidAmount;
84
+ Timestamp closedAt; // payment of confirmed claim amount (or declinedAt)
70
85
  uint24 payoutsCount;
86
+ // slot 1
71
87
  uint24 openPayoutsCount;
88
+ // slot 2
72
89
  bytes submissionData; // use case specific claim submission data, no changes after submitting the claim
90
+ // slot 3
73
91
  bytes processData; // use case specific data that may include information supporting confirm or decline
74
- Timestamp closedAt; // payment of confirmed claim amount (or declinedAt)
75
92
  }
76
93
 
77
94
  // claimId neeeds to be encoded policyNftId:claimId combination
78
95
  struct PayoutInfo {
96
+ // slot 0
79
97
  ClaimId claimId;
80
98
  Amount amount;
99
+ Timestamp paidAt; // timestamp for actual payout
100
+ // slot 1
81
101
  address beneficiary; // for address(0) beneficiary is policy nft owner
102
+ // slot 2
82
103
  bytes data; // use case specific supporting data
83
- Timestamp paidAt; // timestamp for actual payout
84
104
  }
85
105
  }
@@ -7,8 +7,10 @@ import {Timestamp} from "../../type/Timestamp.sol";
7
7
  interface IRisk {
8
8
 
9
9
  struct RiskInfo {
10
+ // slot 0
10
11
  NftId productNftId;
11
12
  Timestamp createdAt;
13
+ // slot 1
12
14
  bytes data;
13
15
  }
14
16
  }
@@ -27,21 +27,19 @@ contract BasicOracle is
27
27
  NftId instanceNftId,
28
28
  IAuthorization authorization,
29
29
  address initialOwner,
30
- string memory name,
31
- address token
30
+ string memory name
32
31
  )
33
32
  internal
34
33
  virtual
35
34
  onlyInitializing()
36
35
  {
37
36
 
38
- _initializeOracle(
37
+ __Oracle_init(
39
38
  registry,
40
39
  instanceNftId,
41
40
  authorization,
42
41
  initialOwner,
43
42
  name,
44
- token,
45
43
  "");
46
44
  }
47
45
  }
@@ -14,10 +14,26 @@ contract BasicOracleAuthorization
14
14
  is Authorization
15
15
  {
16
16
 
17
- constructor(string memory componentName)
18
- Authorization(componentName, ORACLE())
17
+ constructor(
18
+ string memory componentName,
19
+ string memory commitHash
20
+ )
21
+ Authorization(
22
+ componentName,
23
+ ORACLE(),
24
+ 3,
25
+ commitHash,
26
+ true,
27
+ false)
19
28
  {}
20
29
 
30
+ function _setupServiceTargets()
31
+ internal
32
+ virtual override
33
+ {
34
+ _authorizeServiceDomain(ORACLE(), address(15));
35
+ }
36
+
21
37
  function _setupTargetAuthorizations()
22
38
  internal
23
39
  virtual override
@@ -9,14 +9,19 @@ import {Timestamp} from "../type/Timestamp.sol";
9
9
  interface IOracle {
10
10
 
11
11
  struct RequestInfo {
12
+ // slot 0
12
13
  NftId requesterNftId; // originator of the request
13
- string callbackMethodName; // callback function of the requestor to call to provide response data
14
14
  NftId oracleNftId; // responsible oracle component
15
- bytes requestData;
16
- bytes responseData;
15
+ bool isCancelled;
17
16
  Timestamp respondedAt; // response timestamp
17
+ // slot 1
18
18
  Timestamp expiredAt; // expiry timestamp
19
- bool isCancelled;
19
+ // slot 2
20
+ string callbackMethodName; // callback function of the requestor to call to provide response data
21
+ // slot 3
22
+ bytes requestData;
23
+ // slot 4
24
+ bytes responseData;
20
25
  }
21
26
 
22
27
 
@@ -75,24 +75,22 @@ abstract contract Oracle is
75
75
  }
76
76
 
77
77
 
78
- function _initializeOracle(
78
+ function __Oracle_init(
79
79
  address registry,
80
80
  NftId productNftId,
81
81
  IAuthorization authorization,
82
82
  address initialOwner,
83
83
  string memory name,
84
- address token,
85
84
  bytes memory componentData // component specifidc data
86
85
  )
87
86
  internal
88
87
  virtual
89
88
  onlyInitializing()
90
89
  {
91
- _initializeInstanceLinkedComponent(
90
+ __InstanceLinkedComponent_init(
92
91
  registry,
93
92
  productNftId,
94
93
  name,
95
- token,
96
94
  ORACLE(),
97
95
  authorization,
98
96
  true,
@@ -48,7 +48,7 @@ contract OracleService is
48
48
  )
49
49
  external
50
50
  virtual
51
- // restricted() // add authz
51
+ restricted()
52
52
  onlyNftOfType(oracleNftId, ORACLE())
53
53
  returns (RequestId requestId)
54
54
  {
@@ -104,7 +104,7 @@ contract OracleService is
104
104
  )
105
105
  external
106
106
  virtual
107
- // restricted() // add authz
107
+ restricted()
108
108
  returns (bool success)
109
109
  {
110
110
  (
@@ -118,7 +118,7 @@ contract OracleService is
118
118
  bool callerIsOracle = true;
119
119
  IOracle.RequestInfo memory request = _checkAndGetRequestInfo(instance, requestId, oracleNftId, callerIsOracle);
120
120
  request.responseData = responseData;
121
- request.respondedAt = TimestampLib.blockTimestamp();
121
+ request.respondedAt = TimestampLib.current();
122
122
 
123
123
  instance.getInstanceStore().updateRequest(
124
124
  requestId, request, KEEP_STATE());
@@ -153,7 +153,7 @@ contract OracleService is
153
153
  function resend(RequestId requestId)
154
154
  external
155
155
  virtual
156
- // restricted() // add authz
156
+ restricted()
157
157
  {
158
158
  (
159
159
  IRegistry.ObjectInfo memory info,
@@ -192,7 +192,7 @@ contract OracleService is
192
192
  function cancel(RequestId requestId)
193
193
  external
194
194
  virtual
195
- // restricted() // add authz
195
+ restricted()
196
196
  {
197
197
  (
198
198
  IRegistry.ObjectInfo memory info,
@@ -253,8 +253,8 @@ contract OracleService is
253
253
  }
254
254
 
255
255
  // check expiriyAt >= now
256
- if (expiryAt < TimestampLib.blockTimestamp()) {
257
- revert ErrorOracleServiceExpiryInThePast(TimestampLib.blockTimestamp(), expiryAt);
256
+ if (expiryAt < TimestampLib.current()) {
257
+ revert ErrorOracleServiceExpiryInThePast(TimestampLib.current(), expiryAt);
258
258
  }
259
259
 
260
260
  // check callbackMethodName.length > 0
@@ -298,7 +298,7 @@ contract OracleService is
298
298
  }
299
299
 
300
300
  // check expiry
301
- if (info.expiredAt < TimestampLib.blockTimestamp()) {
301
+ if (info.expiredAt < TimestampLib.current()) {
302
302
  revert ErrorOracleServiceRequestExpired(requestId, info.expiredAt);
303
303
  }
304
304
  }
@@ -21,7 +21,6 @@ abstract contract BasicPool is
21
21
  address registry,
22
22
  NftId productNftId,
23
23
  string memory name,
24
- address token,
25
24
  IComponents.PoolInfo memory poolInfo,
26
25
  IAuthorization authorization,
27
26
  address initialOwner
@@ -30,11 +29,10 @@ abstract contract BasicPool is
30
29
  virtual
31
30
  onlyInitializing()
32
31
  {
33
- _initializePool(
32
+ __Pool_init(
34
33
  registry,
35
34
  productNftId,
36
35
  name,
37
- token,
38
36
  poolInfo,
39
37
  authorization,
40
38
  initialOwner,
@@ -84,25 +82,14 @@ abstract contract BasicPool is
84
82
  }
85
83
 
86
84
 
87
- function lockBundle(NftId bundleNftId)
85
+ function setBundleLocked(NftId bundleNftId, bool locked)
88
86
  public
89
87
  virtual
90
88
  restricted()
91
89
  onlyBundleOwner(bundleNftId)
92
90
  onlyNftOfType(bundleNftId, BUNDLE())
93
91
  {
94
- _lockBundle(bundleNftId);
95
- }
96
-
97
-
98
- function unlockBundle(NftId bundleNftId)
99
- public
100
- virtual
101
- restricted()
102
- onlyBundleOwner(bundleNftId)
103
- onlyNftOfType(bundleNftId, BUNDLE())
104
- {
105
- _unlockBundle(bundleNftId);
92
+ _setBundleLocked(bundleNftId, locked);
106
93
  }
107
94
 
108
95
 
@@ -18,15 +18,21 @@ contract BasicPoolAuthorization
18
18
  {
19
19
 
20
20
  constructor(string memory poolName)
21
- Authorization(poolName, POOL())
21
+ Authorization(
22
+ poolName,
23
+ POOL(),
24
+ 3,
25
+ COMMIT_HASH,
26
+ true,
27
+ true)
22
28
  {}
23
29
 
24
30
  function _setupServiceTargets()
25
31
  internal
26
32
  virtual override
27
33
  {
28
- _addServiceTargetWithRole(COMPONENT());
29
- _addServiceTargetWithRole(POOL());
34
+ _authorizeServiceDomain(COMPONENT(), address(11));
35
+ _authorizeServiceDomain(POOL(), address(12));
30
36
  }
31
37
 
32
38
  function _setupTokenHandlerAuthorizations() internal virtual override {
@@ -54,8 +60,7 @@ contract BasicPoolAuthorization
54
60
  _authorize(functions, BasicPool.stake.selector, "stake");
55
61
  _authorize(functions, BasicPool.unstake.selector, "unstake");
56
62
  _authorize(functions, BasicPool.extend.selector, "extend");
57
- _authorize(functions, BasicPool.lockBundle.selector, "lockBundle");
58
- _authorize(functions, BasicPool.unlockBundle.selector, "unlockBundle");
63
+ _authorize(functions, BasicPool.setBundleLocked.selector, "setBundleLocked");
59
64
  _authorize(functions, BasicPool.closeBundle.selector, "closeBundle");
60
65
  _authorize(functions, BasicPool.setBundleFee.selector, "setBundleFee");
61
66