@etherisc/gif-next 0.0.2-ac2f4a6-957 → 0.0.2-ac4bee9-682

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 (303) hide show
  1. package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
  2. package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +2 -2
  3. package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
  4. package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
  5. package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +1 -1
  6. package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +1 -1
  7. package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
  8. package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
  9. package/artifacts/contracts/authorization/ReleaseAccessManager.sol/ReleaseAccessManager.dbg.json +1 -1
  10. package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
  11. package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
  12. package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +32 -110
  13. package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
  14. package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +2 -2
  15. package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
  16. package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +8 -38
  17. package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
  18. package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +110 -78
  19. package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
  20. package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +78 -46
  21. package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
  22. package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +11 -23
  23. package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
  24. package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.dbg.json +1 -1
  25. package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.dbg.json +1 -1
  26. package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.json +38 -147
  27. package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +1 -1
  28. package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +49 -17
  29. package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
  30. package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +92 -190
  31. package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
  32. package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +2 -2
  33. package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.dbg.json +1 -1
  34. package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +1 -1
  35. package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +43 -84
  36. package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +1 -1
  37. package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +33 -87
  38. package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
  39. package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +155 -141
  40. package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
  41. package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +391 -205
  42. package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +1 -1
  43. package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +2 -2
  44. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  45. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
  46. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +2 -2
  47. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  48. package/artifacts/contracts/instance/Instance.sol/Instance.json +18 -2
  49. package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
  50. package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +4 -4
  51. package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
  52. package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +2 -2
  53. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
  54. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +69 -74
  55. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
  56. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +21 -5
  57. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
  58. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +46 -22
  59. package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
  60. package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +36 -46
  61. package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
  62. package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
  63. package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
  64. package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +1 -1
  65. package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +1 -1
  66. package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.json +2 -2
  67. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
  68. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
  69. package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +1 -1
  70. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
  71. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
  72. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
  73. package/artifacts/contracts/mock/Dip.sol/Dip.dbg.json +1 -1
  74. package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +1 -1
  75. package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +22 -100
  76. package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
  77. package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +2 -2
  78. package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +1 -1
  79. package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +1 -1
  80. package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +11 -23
  81. package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
  82. package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
  83. package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +8 -38
  84. package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
  85. package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +32 -16
  86. package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
  87. package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +46 -22
  88. package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
  89. package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +8 -53
  90. package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
  91. package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +49 -17
  92. package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
  93. package/artifacts/contracts/pool/BundleService.sol/BundleService.json +115 -111
  94. package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
  95. package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +67 -51
  96. package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
  97. package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +19 -15
  98. package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  99. package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +11 -62
  100. package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
  101. package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +77 -75
  102. package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
  103. package/artifacts/contracts/pool/Pool.sol/Pool.json +8 -77
  104. package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
  105. package/artifacts/contracts/pool/PoolService.sol/PoolService.json +139 -129
  106. package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
  107. package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +53 -33
  108. package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
  109. package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +20 -4
  110. package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
  111. package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +43 -19
  112. package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
  113. package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +13 -38
  114. package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
  115. package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +2 -2
  116. package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
  117. package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +74 -66
  118. package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
  119. package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +67 -47
  120. package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
  121. package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
  122. package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
  123. package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +7 -1
  124. package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
  125. package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  126. package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +16 -23
  127. package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +1 -1
  128. package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
  129. package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +71 -57
  130. package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
  131. package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +55 -35
  132. package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
  133. package/artifacts/contracts/product/PricingService.sol/PricingService.json +54 -38
  134. package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
  135. package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +56 -32
  136. package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
  137. package/artifacts/contracts/product/Product.sol/Product.json +13 -38
  138. package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +1 -1
  139. package/artifacts/contracts/product/RiskService.sol/RiskService.json +18 -2
  140. package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
  141. package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +40 -16
  142. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  143. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  144. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +24 -0
  145. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
  146. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
  147. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  148. package/artifacts/contracts/registry/Registry.sol/Registry.json +62 -38
  149. package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
  150. package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +107 -94
  151. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
  152. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +32 -16
  153. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
  154. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +39 -15
  155. package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +1 -1
  156. package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +1 -1
  157. package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +12 -12
  158. package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
  159. package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +6 -6
  160. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
  161. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +2 -2
  162. package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
  163. package/artifacts/contracts/shared/Component.sol/Component.json +8 -38
  164. package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
  165. package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +145 -70
  166. package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
  167. package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +62 -42
  168. package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
  169. package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +1 -1
  170. package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +21 -2
  171. package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
  172. package/artifacts/contracts/shared/IComponent.sol/IComponent.json +11 -23
  173. package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
  174. package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +67 -0
  175. package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
  176. package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +11 -23
  177. package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  178. package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  179. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
  180. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
  181. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  182. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
  183. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
  184. package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +1 -1
  185. package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
  186. package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +8 -38
  187. package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  188. package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  189. package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +1 -1
  190. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
  191. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +2 -2
  192. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
  193. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +2 -2
  194. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  195. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +2 -2
  196. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
  197. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -2
  198. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
  199. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  200. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +388 -35
  201. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.dbg.json +4 -0
  202. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.json +395 -0
  203. package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +1 -1
  204. package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +88 -24
  205. package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
  206. package/artifacts/contracts/staking/IStaking.sol/IStaking.json +29 -59
  207. package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
  208. package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +1 -1
  209. package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +2 -2
  210. package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
  211. package/artifacts/contracts/staking/Staking.sol/Staking.json +80 -152
  212. package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
  213. package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
  214. package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +50 -46
  215. package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
  216. package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +2 -2
  217. package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
  218. package/artifacts/contracts/staking/StakingService.sol/StakingService.json +36 -20
  219. package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
  220. package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +43 -19
  221. package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
  222. package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +2 -2
  223. package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
  224. package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +2 -2
  225. package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  226. package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
  227. package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  228. package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
  229. package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
  230. package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
  231. package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
  232. package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
  233. package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  234. package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  235. package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
  236. package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
  237. package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
  238. package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
  239. package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +2 -2
  240. package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
  241. package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
  242. package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
  243. package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
  244. package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
  245. package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
  246. package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
  247. package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +1 -1
  248. package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
  249. package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
  250. package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
  251. package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +1 -1
  252. package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +1 -1
  253. package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +18 -2
  254. package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
  255. package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +1 -1
  256. package/contracts/distribution/DistributionService.sol +5 -5
  257. package/contracts/examples/fire/FirePool.sol +19 -8
  258. package/contracts/examples/fire/FireProduct.sol +24 -11
  259. package/contracts/examples/unpermissioned/SimpleDistribution.sol +8 -0
  260. package/contracts/examples/unpermissioned/SimplePool.sol +34 -2
  261. package/contracts/examples/unpermissioned/SimpleProduct.sol +15 -21
  262. package/contracts/instance/IInstanceService.sol +2 -3
  263. package/contracts/instance/InstanceAdmin.sol +3 -3
  264. package/contracts/instance/InstanceReader.sol +1 -1
  265. package/contracts/instance/InstanceService.sol +15 -12
  266. package/contracts/instance/module/IComponents.sol +1 -2
  267. package/contracts/instance/module/IPolicy.sol +2 -1
  268. package/contracts/oracle/OracleService.sol +10 -9
  269. package/contracts/pool/BasicPool.sol +24 -3
  270. package/contracts/pool/BasicPoolAuthorization.sol +12 -1
  271. package/contracts/pool/BundleService.sol +14 -22
  272. package/contracts/pool/IBundleService.sol +2 -5
  273. package/contracts/pool/IPoolComponent.sol +1 -7
  274. package/contracts/pool/IPoolService.sol +23 -18
  275. package/contracts/pool/Pool.sol +112 -102
  276. package/contracts/pool/PoolService.sol +150 -74
  277. package/contracts/product/BasicProduct.sol +7 -11
  278. package/contracts/product/ClaimService.sol +3 -1
  279. package/contracts/product/IPolicyService.sol +3 -1
  280. package/contracts/product/PolicyService.sol +26 -14
  281. package/contracts/product/PricingService.sol +4 -1
  282. package/contracts/product/Product.sol +10 -33
  283. package/contracts/registry/IRegistry.sol +2 -0
  284. package/contracts/registry/Registry.sol +9 -1
  285. package/contracts/registry/RegistryAdmin.sol +22 -8
  286. package/contracts/registry/ReleaseRegistry.sol +2 -18
  287. package/contracts/registry/ServiceAuthorizationV3.sol +10 -1
  288. package/contracts/shared/Component.sol +45 -81
  289. package/contracts/shared/ComponentService.sol +62 -18
  290. package/contracts/shared/ComponentVerifyingService.sol +15 -13
  291. package/contracts/shared/ContractLib.sol +17 -1
  292. package/contracts/shared/IComponent.sol +5 -12
  293. package/contracts/shared/IComponentService.sol +13 -3
  294. package/contracts/shared/InstanceLinkedComponent.sol +1 -9
  295. package/contracts/shared/Registerable.sol +0 -2
  296. package/contracts/shared/RegistryLinked.sol +6 -12
  297. package/contracts/shared/TokenHandler.sol +324 -66
  298. package/contracts/shared/TokenHandlerDeployerLib.sol +10 -2
  299. package/contracts/staking/IStaking.sol +9 -4
  300. package/contracts/staking/Staking.sol +29 -21
  301. package/contracts/staking/StakingService.sol +68 -8
  302. package/contracts/type/RiskId.sol +1 -1
  303. package/package.json +3 -3
@@ -5,6 +5,7 @@ import {Amount, AmountLib} from "../../type/Amount.sol";
5
5
  import {BasicProduct} from "../../product/BasicProduct.sol";
6
6
  import {ClaimId} from "../../type/ClaimId.sol";
7
7
  import {IAuthorization} from "../../authorization/IAuthorization.sol";
8
+ import {IComponents} from "../../instance/module/IComponents.sol";
8
9
  import {IOracleService} from "../../oracle/IOracleService.sol";
9
10
  import {ORACLE} from "../../type/ObjectType.sol";
10
11
  import {NftId} from "../../type/NftId.sol";
@@ -33,37 +34,32 @@ contract SimpleProduct is
33
34
  constructor(
34
35
  address registry,
35
36
  NftId instanceNftId,
36
- IAuthorization authorization,
37
- address initialOwner,
37
+ string memory name,
38
38
  address token,
39
- bool isInterceptor,
40
- bool hasDistribution,
41
- uint8 numberOfOracles
39
+ IComponents.ProductInfo memory productInfo,
40
+ IAuthorization authorization,
41
+ address initialOwner
42
42
  )
43
43
  {
44
44
  initialize(
45
45
  registry,
46
46
  instanceNftId,
47
- authorization,
48
- initialOwner,
49
- "SimpleProduct",
47
+ name,
50
48
  token,
51
- isInterceptor,
52
- hasDistribution,
53
- numberOfOracles);
49
+ productInfo,
50
+ authorization,
51
+ initialOwner);
54
52
  }
55
53
 
56
54
 
57
55
  function initialize(
58
56
  address registry,
59
57
  NftId instanceNftid,
60
- IAuthorization authorization,
61
- address initialOwner,
62
58
  string memory name,
63
59
  address token,
64
- bool isInterceptor,
65
- bool hasDistribution,
66
- uint8 numberOfOracles
60
+ IComponents.ProductInfo memory productInfo,
61
+ IAuthorization authorization,
62
+ address initialOwner
67
63
  )
68
64
  public
69
65
  virtual
@@ -72,13 +68,11 @@ contract SimpleProduct is
72
68
  _initializeBasicProduct(
73
69
  registry,
74
70
  instanceNftid,
75
- authorization,
76
- initialOwner,
77
71
  name,
78
72
  token,
79
- isInterceptor,
80
- hasDistribution,
81
- numberOfOracles);
73
+ productInfo,
74
+ authorization,
75
+ initialOwner);
82
76
 
83
77
  _oracleService = IOracleService(_getServiceAddress(ORACLE()));
84
78
  }
@@ -3,7 +3,7 @@ pragma solidity ^0.8.20;
3
3
 
4
4
  import {Amount} from "../type/Amount.sol";
5
5
  import {BundleSet} from "./BundleSet.sol";
6
- import {Instance} from "./Instance.sol";
6
+ import {IInstance} from "./IInstance.sol";
7
7
  import {IInstanceLinkedComponent} from "../shared/IInstanceLinkedComponent.sol";
8
8
  import {IService} from "../shared/IService.sol";
9
9
  import {NftId} from "../type/NftId.sol";
@@ -55,8 +55,7 @@ interface IInstanceService is IService {
55
55
  function createInstance()
56
56
  external
57
57
  returns (
58
- // TODO check if Instance can be changed to IInstance
59
- Instance clonedInstance,
58
+ IInstance instance,
60
59
  NftId instanceNftId
61
60
  );
62
61
 
@@ -43,11 +43,11 @@ contract InstanceAdmin is
43
43
  /// @dev Only used for master instance admin.
44
44
  /// Contracts created via constructor come with disabled initializers.
45
45
  constructor(
46
- IAuthorization instanceAuthorization
46
+ address instanceAuthorization
47
47
  )
48
48
  AccessAdmin()
49
49
  {
50
- _instanceAuthorization = instanceAuthorization;
50
+ _instanceAuthorization = IAuthorization(instanceAuthorization);
51
51
  }
52
52
 
53
53
  /// @dev Initializes this instance admin with the provided instances authorization specification.
@@ -56,7 +56,7 @@ contract InstanceAdmin is
56
56
  /// Important: Initialization of this instance admin is only complete after calling function initializeInstance.
57
57
  function initialize(
58
58
  AccessManagerCloneable accessManager,
59
- IAuthorization instanceAuthorization
59
+ address instanceAuthorization
60
60
  )
61
61
  external
62
62
  initializer()
@@ -246,7 +246,7 @@ contract InstanceReader {
246
246
 
247
247
  if (data.length > 0) {
248
248
  IComponents.ComponentInfo memory info = abi.decode(data, (IComponents.ComponentInfo));
249
- return info.wallet;
249
+ return info.tokenHandler.getWallet();
250
250
  }
251
251
  }
252
252
 
@@ -96,8 +96,8 @@ contract InstanceService is
96
96
  function createInstance()
97
97
  external
98
98
  returns (
99
- Instance clonedInstance,
100
- NftId clonedInstanceNftId
99
+ IInstance instance,
100
+ NftId instanceNftId
101
101
  )
102
102
  {
103
103
  // tx sender will become instance owner
@@ -105,24 +105,24 @@ contract InstanceService is
105
105
 
106
106
  // create instance admin and instance
107
107
  InstanceAdmin instanceAdmin = _createInstanceAdmin();
108
- clonedInstance = _createInstance(instanceAdmin, instanceOwner);
108
+ instance = _createInstance(instanceAdmin, instanceOwner);
109
109
 
110
110
  // register cloned instance with registry
111
- clonedInstanceNftId = _registryService.registerInstance(
112
- clonedInstance, instanceOwner).nftId;
111
+ instanceNftId = _registryService.registerInstance(
112
+ instance, instanceOwner).nftId;
113
113
 
114
114
  // register cloned instance as staking target
115
115
  _stakingService.createInstanceTarget(
116
- clonedInstanceNftId,
116
+ instanceNftId,
117
117
  TargetManagerLib.getDefaultLockingPeriod(),
118
118
  TargetManagerLib.getDefaultRewardRate());
119
119
 
120
120
  // MUST be set after instance is set up and registered
121
- instanceAdmin.initializeInstanceAuthorization(address(clonedInstance));
121
+ instanceAdmin.initializeInstanceAuthorization(address(instance));
122
122
 
123
123
  emit LogInstanceCloned(
124
- clonedInstanceNftId,
125
- address(clonedInstance));
124
+ instanceNftId,
125
+ address(instance));
126
126
  }
127
127
 
128
128
 
@@ -293,9 +293,11 @@ contract InstanceService is
293
293
  clonedAccessManager.initialize(
294
294
  address(clonedInstanceAdmin)); // grant ADMIN_ROLE to instance admin
295
295
 
296
+ address authorization = address(
297
+ InstanceAdmin(_masterInstanceAdmin).getInstanceAuthorization());
296
298
  clonedInstanceAdmin.initialize(
297
299
  clonedAccessManager,
298
- InstanceAdmin(_masterInstanceAdmin).getInstanceAuthorization());
300
+ authorization);
299
301
  }
300
302
 
301
303
 
@@ -307,14 +309,14 @@ contract InstanceService is
307
309
  )
308
310
  internal
309
311
  virtual
310
- returns (Instance clonedInstance)
312
+ returns (IInstance)
311
313
  {
312
314
  InstanceStore clonedInstanceStore = InstanceStore(Clones.clone(address(_masterInstanceStore)));
313
315
  BundleSet clonedBundleSet = BundleSet(Clones.clone(_masterInstanceBundleSet));
314
316
  InstanceReader clonedInstanceReader = InstanceReader(Clones.clone(address(_masterInstanceReader)));
315
317
 
316
318
  // clone instance
317
- clonedInstance = Instance(Clones.clone(_masterInstance));
319
+ Instance clonedInstance = Instance(Clones.clone(_masterInstance));
318
320
  clonedInstance.initialize(
319
321
  instanceAdmin,
320
322
  clonedInstanceStore,
@@ -322,6 +324,7 @@ contract InstanceService is
322
324
  clonedInstanceReader,
323
325
  getRegistry(),
324
326
  instanceOwner);
327
+ return clonedInstance;
325
328
  }
326
329
 
327
330
 
@@ -16,12 +16,12 @@ interface IComponents {
16
16
  string name; // component name (needs to be unique per instance)
17
17
  IERC20Metadata token;
18
18
  TokenHandler tokenHandler;
19
- address wallet;
20
19
  bytes data; // will hold component type specific additional info (eg encoded pool info)
21
20
  }
22
21
 
23
22
  struct ProductInfo {
24
23
  bool isProcessingFundedClaims; // custom logic to react to pool events for funded claims
24
+ bool isInterceptingPolicyTransfers; // custom logic for policy nft transfers
25
25
  bool hasDistribution; // flag to indicate if distribution is enabled
26
26
  uint8 expectedNumberOfOracles; // expected number of oracles
27
27
  uint8 numberOfOracles; // actual number of oracles
@@ -40,7 +40,6 @@ interface IComponents {
40
40
 
41
41
  struct PoolInfo {
42
42
  Amount maxBalanceAmount; // max balance amount allowed for pool
43
- RoleId bundleOwnerRole; // the required role for bundle owners
44
43
  bool isInterceptingBundleTransfers; // custom logic for bundle nft transfers
45
44
  bool isProcessingConfirmedClaims; // custom logic for claims confirmation
46
45
  bool isExternallyManaged; // funding bundles is restricted to book keeping, actual funds may be provided as needed to support payouts
@@ -43,6 +43,7 @@ interface IPolicy {
43
43
 
44
44
  /// @dev policy data for the full policy lifecycle
45
45
  struct PolicyInfo {
46
+ // application data, no changes after applying for a policy
46
47
  NftId productNftId;
47
48
  NftId bundleNftId;
48
49
  ReferralId referralId;
@@ -50,8 +51,8 @@ interface IPolicy {
50
51
  Amount sumInsuredAmount;
51
52
  Amount premiumAmount; // expected premium at application time
52
53
  Seconds lifetime;
53
- // policy application data, no changes after applying for a policy
54
54
  bytes applicationData;
55
+ // policy data that may change during the lifecycle
55
56
  bytes processData;
56
57
  uint16 claimsCount;
57
58
  uint16 openClaimsCount;
@@ -274,15 +274,16 @@ contract OracleService is
274
274
  }
275
275
 
276
276
 
277
- function _getInstanceForComponent(NftId componentNftId)
278
- internal
279
- view
280
- returns(IInstance instance)
281
- {
282
- NftId instanceNftId = getRegistry().getObjectInfo(componentNftId).parentNftId;
283
- address instanceAddress = getRegistry().getObjectAddress(instanceNftId);
284
- return IInstance(instanceAddress);
285
- }
277
+ // TODO cleanup
278
+ // function _getInstanceForComponent(NftId componentNftId)
279
+ // internal
280
+ // view
281
+ // returns(IInstance instance)
282
+ // {
283
+ // NftId instanceNftId = getRegistry().getObjectInfo(componentNftId).parentNftId;
284
+ // address instanceAddress = getRegistry().getObjectAddress(instanceNftId);
285
+ // return IInstance(instanceAddress);
286
+ // }
286
287
 
287
288
 
288
289
  function _getDomain() internal pure override returns(ObjectType) {
@@ -4,6 +4,7 @@ pragma solidity ^0.8.20;
4
4
  import {Amount} from "../type/Amount.sol";
5
5
  import {Fee} from "../type/Fee.sol";
6
6
  import {IAuthorization} from "../authorization/IAuthorization.sol";
7
+ import {IComponents} from "../instance/module/IComponents.sol";
7
8
  import {NftId} from "../type/NftId.sol";
8
9
  import {BUNDLE} from "../type/ObjectType.sol";
9
10
  import {RoleId} from "../type/RoleId.sol";
@@ -19,9 +20,10 @@ abstract contract BasicPool is
19
20
  function _initializeBasicPool(
20
21
  address registry,
21
22
  NftId productNftId,
22
- IAuthorization authorization,
23
- address token,
24
23
  string memory name,
24
+ address token,
25
+ IComponents.PoolInfo memory poolInfo,
26
+ IAuthorization authorization,
25
27
  address initialOwner
26
28
  )
27
29
  internal
@@ -33,8 +35,8 @@ abstract contract BasicPool is
33
35
  productNftId,
34
36
  name,
35
37
  token,
38
+ poolInfo,
36
39
  authorization,
37
- false, // isInterceptingNftTransfers,
38
40
  initialOwner,
39
41
  ""); // componentData
40
42
  }
@@ -115,6 +117,9 @@ abstract contract BasicPool is
115
117
  }
116
118
 
117
119
 
120
+ /// @dev Updates the bundle feeds to the specified values.
121
+ /// @param bundleNftId the bundle Nft Id
122
+ /// @param fee the new fee values
118
123
  function setBundleFee(
119
124
  NftId bundleNftId,
120
125
  Fee memory fee
@@ -129,6 +134,22 @@ abstract contract BasicPool is
129
134
  }
130
135
 
131
136
 
137
+ /// @dev Withdraw bundle feeds for the given bundle.
138
+ /// @param bundleNftId the bundle Nft Id
139
+ /// @param amount the amount to withdraw. If set to AMOUNT_MAX, the full commission available is withdrawn
140
+ /// @return withdrawnAmount the effective withdrawn amount
141
+ function withdrawBundleFees(NftId bundleNftId, Amount amount)
142
+ external
143
+ virtual
144
+ restricted()
145
+ onlyBundleOwner(bundleNftId)
146
+ onlyNftOfType(bundleNftId, BUNDLE())
147
+ returns (Amount withdrawnAmount)
148
+ {
149
+ return _withdrawBundleFees(bundleNftId, amount);
150
+ }
151
+
152
+
132
153
  function setMaxBalanceAmount(Amount maxBalanceAmount)
133
154
  public
134
155
  virtual
@@ -19,6 +19,13 @@ contract BasicPoolAuthorization
19
19
  Authorization(poolName)
20
20
  {}
21
21
 
22
+ function _setupServiceTargets()
23
+ internal
24
+ virtual override
25
+ {
26
+ _addServiceTargetWithRole(POOL());
27
+ }
28
+
22
29
  function _setupTargets()
23
30
  internal
24
31
  virtual override
@@ -51,7 +58,11 @@ contract BasicPoolAuthorization
51
58
 
52
59
  _authorize(functions, IInstanceLinkedComponent.withdrawFees.selector, "withdrawFees");
53
60
 
54
- _authorize(functions, IPoolComponent.withdrawBundleFees.selector, "withdrawBundleFees");
61
+ _authorize(functions, BasicPool.withdrawBundleFees.selector, "withdrawBundleFees");
62
+
63
+ // authorize pool service
64
+ functions = _authorizeForTarget(getTargetName(), getServiceRole(POOL()));
65
+ _authorize(functions, IPoolComponent.verifyApplication.selector, "verifyApplication");
55
66
  }
56
67
  }
57
68
 
@@ -63,6 +63,7 @@ contract BundleService is
63
63
  )
64
64
  external
65
65
  virtual
66
+ restricted()
66
67
  {
67
68
  _checkNftType(bundleNftId, BUNDLE());
68
69
 
@@ -83,20 +84,17 @@ contract BundleService is
83
84
 
84
85
 
85
86
  function create(
86
- IInstance instance,
87
- NftId poolNftId,
88
87
  address owner,
89
88
  Fee memory bundleFee,
90
- Amount stakingAmount,
91
89
  Seconds lifetime,
92
90
  bytes calldata filter
93
91
  )
94
92
  external
95
- override
96
- restricted
93
+ virtual
94
+ restricted()
97
95
  returns(NftId bundleNftId)
98
96
  {
99
- _checkNftType(poolNftId, POOL());
97
+ (NftId poolNftId,, IInstance instance) = _getAndVerifyActiveComponent(POOL());
100
98
 
101
99
  // register bundle with registry
102
100
  bundleNftId = _registryService.registerBundle(
@@ -125,19 +123,11 @@ contract BundleService is
125
123
  })
126
124
  );
127
125
 
128
- if (stakingAmount.gtz()) {
129
- // bundle book keeping
130
- _componentService.increaseBundleBalance(
131
- instanceStore,
132
- bundleNftId,
133
- stakingAmount,
134
- AmountLib.zero()); // fee amount
135
- }
136
-
137
126
  // put bundle under bundle managemet
138
127
  BundleSet bundleManager = instance.getBundleSet();
139
128
  bundleManager.add(bundleNftId);
140
- // TODO add logging
129
+
130
+ emit LogBundleServiceBundleCreated(bundleNftId, poolNftId);
141
131
  }
142
132
 
143
133
 
@@ -194,6 +184,7 @@ contract BundleService is
194
184
  function lock(NftId bundleNftId)
195
185
  external
196
186
  virtual
187
+ restricted()
197
188
  {
198
189
  _checkNftType(bundleNftId, BUNDLE());
199
190
 
@@ -213,6 +204,7 @@ contract BundleService is
213
204
  function unlock(NftId bundleNftId)
214
205
  external
215
206
  virtual
207
+ restricted()
216
208
  {
217
209
  _checkNftType(bundleNftId, BUNDLE());
218
210
 
@@ -235,7 +227,7 @@ contract BundleService is
235
227
  )
236
228
  external
237
229
  virtual
238
- restricted
230
+ restricted()
239
231
  returns (Amount unstakedAmount, Amount feeAmount)
240
232
  {
241
233
  _checkNftType(bundleNftId, BUNDLE());
@@ -271,7 +263,7 @@ contract BundleService is
271
263
  )
272
264
  external
273
265
  virtual
274
- // TODO: restricted() (once #462 is done)
266
+ restricted()
275
267
  {
276
268
  _checkNftType(bundleNftId, BUNDLE());
277
269
 
@@ -299,7 +291,7 @@ contract BundleService is
299
291
  )
300
292
  external
301
293
  virtual
302
- // TODO: restricted() (once #462 is done)
294
+ restricted()
303
295
  returns (Amount unstakedAmount)
304
296
  {
305
297
  _checkNftType(bundleNftId, BUNDLE());
@@ -335,7 +327,7 @@ contract BundleService is
335
327
  function extend(NftId bundleNftId, Seconds lifetimeExtension)
336
328
  external
337
329
  virtual
338
- // TODO: restricted() (once #462 is done)
330
+ restricted()
339
331
  returns (Timestamp extendedExpiredAt)
340
332
  {
341
333
  _checkNftType(bundleNftId, BUNDLE());
@@ -406,7 +398,7 @@ contract BundleService is
406
398
  function withdrawBundleFees(NftId bundleNftId, Amount amount)
407
399
  public
408
400
  virtual
409
- // TODO: restricted() (once #462 is done)
401
+ restricted()
410
402
  returns (Amount withdrawnAmount)
411
403
  {
412
404
  _checkNftType(bundleNftId, BUNDLE());
@@ -415,7 +407,7 @@ contract BundleService is
415
407
  InstanceReader reader = instance.getInstanceReader();
416
408
 
417
409
  IComponents.ComponentInfo memory poolInfo = reader.getComponentInfo(poolNftId);
418
- address poolWallet = poolInfo.wallet;
410
+ address poolWallet = poolInfo.tokenHandler.getWallet();
419
411
 
420
412
  // IBundle.BundleInfo memory bundleInfo = reader.getBundleInfo(bundleNftId);
421
413
 
@@ -13,6 +13,7 @@ import {Timestamp} from "../type/Timestamp.sol";
13
13
 
14
14
  interface IBundleService is IService {
15
15
 
16
+ event LogBundleServiceBundleCreated(NftId bundleNftId, NftId poolNftId);
16
17
  event LogBundleServiceBundleActivated(NftId bundleNftId);
17
18
  event LogBundleServiceBundleLocked(NftId bundleNftId);
18
19
 
@@ -35,14 +36,10 @@ interface IBundleService is IService {
35
36
  event LogBundleServiceFeesWithdrawn(NftId bundleNftId, address recipient, address tokenAddress, Amount amount);
36
37
  event LogBundleServiceBundleExtended(NftId bundleNftId, Seconds lifetimeExtension, Timestamp extendedExpiredAt);
37
38
 
38
- /// @dev create a new bundle for the specified attributes
39
- /// may only be called by pool service
39
+ /// @dev Create a new bundle for the specified attributes.
40
40
  function create(
41
- IInstance instance, // instance relevant for bundle
42
- NftId poolNftId, // the pool the bundle will be linked to
43
41
  address owner, // initial bundle owner
44
42
  Fee memory fee, // fees deducted from premium that go to bundle owner
45
- Amount stakingAmount, // staking amount - staking fees result in initial bundle capital
46
43
  Seconds lifetime, // initial duration for which new policies are covered
47
44
  bytes calldata filter // optional use case specific criteria that define if a policy may be covered by this bundle
48
45
  )
@@ -27,9 +27,7 @@ interface IPoolComponent is IInstanceLinkedComponent {
27
27
  /// The default implementation is empty.
28
28
  function verifyApplication(
29
29
  NftId applicationNftId,
30
- bytes memory applicationData,
31
30
  NftId bundleNftId,
32
- bytes memory bundleFilter,
33
31
  Amount collateralizationAmount
34
32
  ) external;
35
33
 
@@ -47,6 +45,7 @@ interface IPoolComponent is IInstanceLinkedComponent {
47
45
  view
48
46
  returns (bool isMatching);
49
47
 
48
+
50
49
  /// @dev This is a callback function that is called by the claim service when a claim is confirmed.
51
50
  /// The pool has the option to implement custom behavirous such as triggering a reinsurance claim or blocking the claim confirmaation.
52
51
  /// The default implementation is empty.
@@ -56,11 +55,6 @@ interface IPoolComponent is IInstanceLinkedComponent {
56
55
  Amount amount
57
56
  ) external;
58
57
 
59
- /// @dev Withdraw bundle feeds for the given bundle
60
- /// @param bundleNftId the bundle Nft Id
61
- /// @param amount the amount to withdraw. If set to AMOUNT_MAX, the full commission available is withdrawn
62
- /// @return withdrawnAmount the effective withdrawn amount
63
- function withdrawBundleFees(NftId bundleNftId, Amount amount) external returns (Amount withdrawnAmount);
64
58
 
65
59
  /// @dev Returns initial pool specific infos for this pool
66
60
  function getInitialPoolInfo() external view returns (IComponents.PoolInfo memory info);
@@ -19,16 +19,18 @@ import {UFixed} from "../type/UFixed.sol";
19
19
  interface IPoolService is IService {
20
20
 
21
21
  event LogPoolServiceMaxBalanceAmountUpdated(NftId poolNftId, Amount previousMaxCapitalAmount, Amount currentMaxCapitalAmount);
22
- event LogPoolServiceBundleOwnerRoleSet(NftId poolNftId, RoleId bundleOwnerRole);
22
+ event LogPoolServiceWalletFunded(NftId poolNftId, address poolOwner, Amount amount);
23
+ event LogPoolServiceWalletDefunded(NftId poolNftId, address poolOwner, Amount amount);
23
24
 
24
25
  event LogPoolServiceBundleCreated(NftId instanceNftId, NftId poolNftId, NftId bundleNftId);
25
26
  event LogPoolServiceBundleClosed(NftId instanceNftId, NftId poolNftId, NftId bundleNftId);
26
27
 
27
28
  event LogPoolServiceBundleStaked(NftId instanceNftId, NftId poolNftId, NftId bundleNftId, Amount amount, Amount netAmount);
28
- event LogPoolServiceBundleUnstaked(NftId instanceNftId, NftId poolNftId, NftId bundleNftId, Amount amount);
29
+ event LogPoolServiceBundleUnstaked(NftId instanceNftId, NftId poolNftId, NftId bundleNftId, Amount amount, Amount netAmount);
29
30
 
30
31
  event LogPoolServiceProcessFundedClaim(NftId policyNftId, ClaimId claimId, Amount availableAmount);
31
32
 
33
+ error ErrorPoolServicePoolNotExternallyManaged(NftId poolNftId);
32
34
  error ErrorPoolServicePolicyPoolMismatch(NftId policyNftId, NftId productNftId, NftId expectedProductNftId);
33
35
  error ErrorPoolServiceBundleOwnerRoleAlreadySet(NftId poolNftId);
34
36
  error ErrorPoolServiceInvalidTransferAmount(Amount expectedAmount, Amount actualAmount);
@@ -80,16 +82,17 @@ interface IPoolService is IService {
80
82
  ) external;
81
83
 
82
84
 
83
- /// @dev create a new empty bundle with the provided parameters
84
- /// may only be called by registered and unlocked pool components.
85
- function createBundle(
86
- address owner, // initial bundle owner
87
- Fee memory fee, // fees deducted from premium that go to bundle owner
88
- Seconds lifetime, // initial duration for which new policies are covered
89
- bytes calldata filter // optional use case specific criteria that define if a policy may be covered by this bundle
90
- )
91
- external
92
- returns(NftId bundleNftId); // the nft id of the newly created bundle
85
+ // TODO cleanup
86
+ // /// @dev create a new empty bundle with the provided parameters
87
+ // /// may only be called by registered and unlocked pool components.
88
+ // function createBundle(
89
+ // address owner, // initial bundle owner
90
+ // Fee memory fee, // fees deducted from premium that go to bundle owner
91
+ // Seconds lifetime, // initial duration for which new policies are covered
92
+ // bytes calldata filter // optional use case specific criteria that define if a policy may be covered by this bundle
93
+ // )
94
+ // external
95
+ // returns(NftId bundleNftId); // the nft id of the newly created bundle
93
96
 
94
97
 
95
98
  /// @dev increase stakes for bundle
@@ -117,18 +120,18 @@ interface IPoolService is IService {
117
120
  function processFundedClaim(NftId policyNftId, ClaimId claimId, Amount availableAmount) external;
118
121
 
119
122
 
120
- /// @dev Fund the specified pool wallet with the provided amount.
121
- /// This function will collect the amount from the sender address and transfers it to the pool wallet.
123
+ /// @dev Fund the pool wallet with the provided amount.
124
+ /// This function will collect the amount from the pool owner and transfers it to the pool wallet.
122
125
  /// The function will not update balance amounts managed by the framework.
123
126
  /// Only available for externally managed pools.
124
- function fundPoolWallet(NftId poolNftId, Amount amount) external;
127
+ function fundPoolWallet(Amount amount) external;
125
128
 
126
129
 
127
130
  /// @dev Defund the specified pool wallet with the provided amount.
128
- /// This function will transfer the amount from the pool wallet to the sender address.
131
+ /// This function will transfer the amount from the pool wallet to the pool owner.
129
132
  /// The function will not update balance amounts managed by the framework.
130
133
  /// Only available for externally managed pools.
131
- function defundPoolWallet(NftId poolNftId, Amount amount) external;
134
+ function defundPoolWallet(Amount amount) external;
132
135
 
133
136
 
134
137
  /// @dev processes the sale of a bundle and track the pool fee and bundle fee amounts
@@ -144,8 +147,10 @@ interface IPoolService is IService {
144
147
  external
145
148
  view
146
149
  returns(
150
+ NftId poolNftId,
147
151
  Amount totalCollateralAmount,
148
- Amount localCollateralAmount
152
+ Amount localCollateralAmount,
153
+ bool poolIsVerifyingApplications
149
154
  );
150
155
 
151
156