@etherisc/gif-next 0.0.2-d086e6d-456 → 0.0.2-d1f0662-893

Sign up to get free protection for your applications and to get access to all the features.
Files changed (265) hide show
  1. package/README.md +6 -88
  2. package/artifacts/contracts/components/Component.sol/Component.dbg.json +1 -1
  3. package/artifacts/contracts/components/Component.sol/Component.json +37 -6
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +1 -1
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +60 -13
  6. package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +1 -1
  7. package/artifacts/contracts/components/IComponent.sol/IComponent.json +37 -6
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
  9. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +44 -13
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +55 -24
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +52 -21
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +55 -24
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +52 -21
  18. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +1 -1
  19. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +2 -2
  20. package/artifacts/contracts/instance/Cloneable.sol/Cloneable.dbg.json +1 -1
  21. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  22. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +309 -2023
  23. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
  24. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +21 -62
  25. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  26. package/artifacts/contracts/instance/Instance.sol/Instance.json +424 -2776
  27. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
  28. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +95 -58
  29. package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.dbg.json +4 -0
  30. package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.json +124 -0
  31. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
  32. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +331 -51
  33. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
  34. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +71 -215
  35. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
  36. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +38 -83
  37. package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +4 -0
  38. package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +2788 -0
  39. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +1 -1
  40. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +2 -2
  41. package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.dbg.json +1 -1
  42. package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.json +25 -36
  43. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  44. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  45. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  46. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +8 -8
  47. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  48. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +6 -6
  49. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
  50. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +6 -6
  51. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
  52. package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +1 -1
  53. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
  54. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
  55. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
  56. package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +1 -1
  57. package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +1 -1
  58. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.dbg.json +1 -1
  59. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.json +106 -246
  60. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
  61. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.json +38 -55
  62. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +1 -1
  63. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +166 -136
  64. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
  65. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +38 -59
  66. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.dbg.json +1 -1
  67. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.json +623 -91
  68. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
  69. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.json +143 -32
  70. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +1 -1
  71. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +185 -451
  72. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
  73. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +82 -107
  74. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.dbg.json +1 -1
  75. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.json +38 -191
  76. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +1 -1
  77. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +97 -45
  78. package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.dbg.json +1 -1
  79. package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.json +306 -62
  80. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +1 -1
  81. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +34 -297
  82. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +1 -1
  83. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.json +124 -103
  84. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  85. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +269 -60
  86. package/artifacts/contracts/instance/service/IPricingService.sol/IPricingService.dbg.json +4 -0
  87. package/artifacts/contracts/instance/service/IPricingService.sol/IPricingService.json +510 -0
  88. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  89. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +5 -37
  90. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +1 -1
  91. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +332 -162
  92. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
  93. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +104 -53
  94. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  95. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +442 -84
  96. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
  97. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +90 -39
  98. package/artifacts/contracts/instance/service/PricingService.sol/PricingService.dbg.json +4 -0
  99. package/artifacts/contracts/instance/service/PricingService.sol/PricingService.json +1004 -0
  100. package/artifacts/contracts/instance/service/PricingServiceManager.sol/PricingServiceManager.dbg.json +4 -0
  101. package/artifacts/contracts/instance/service/PricingServiceManager.sol/PricingServiceManager.json +688 -0
  102. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  103. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +56 -59
  104. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
  105. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +28 -37
  106. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  107. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  108. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
  109. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +5 -37
  110. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
  111. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  112. package/artifacts/contracts/registry/Registry.sol/Registry.json +2 -2
  113. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +1 -1
  114. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +2 -2
  115. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
  116. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +22 -49
  117. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
  118. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +21 -34
  119. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +1 -1
  120. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +23 -11
  121. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
  122. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +10 -23
  123. package/artifacts/contracts/shared/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.dbg.json +4 -0
  124. package/artifacts/contracts/{instance → shared}/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.json +3 -3
  125. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +1 -1
  126. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  127. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
  128. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +0 -13
  129. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
  130. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +69 -9
  131. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  132. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +0 -13
  133. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
  134. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.json +0 -13
  135. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
  136. package/artifacts/contracts/shared/IService.sol/IService.json +5 -37
  137. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  138. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
  139. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +6 -19
  140. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
  141. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +80 -26
  142. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
  143. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +14 -27
  144. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  145. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +6 -19
  146. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
  147. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -15
  148. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
  149. package/artifacts/contracts/shared/Service.sol/Service.json +11 -38
  150. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  151. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +24 -6
  152. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
  153. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  154. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  155. package/artifacts/contracts/test/TestFee.sol/TestFee.json +2 -2
  156. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  157. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +6 -19
  158. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  159. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +2 -2
  160. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  161. package/artifacts/contracts/test/TestService.sol/TestService.json +26 -49
  162. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  163. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  164. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  165. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  166. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  167. package/artifacts/contracts/types/Amount.sol/AmountLib.dbg.json +1 -1
  168. package/artifacts/contracts/types/Amount.sol/AmountLib.json +124 -4
  169. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  170. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  171. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
  172. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.json +83 -4
  173. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
  174. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.json +2 -2
  175. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  176. package/artifacts/contracts/types/Fee.sol/FeeLib.json +42 -18
  177. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
  178. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +2 -2
  179. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  180. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +2 -2
  181. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  182. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
  183. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +1 -1
  184. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  185. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  186. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
  187. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.json +116 -7
  188. package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +1 -1
  189. package/artifacts/contracts/types/Referral.sol/ReferralLib.json +2 -2
  190. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +1 -1
  191. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +2 -2
  192. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +1 -1
  193. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +2 -2
  194. package/artifacts/contracts/types/Seconds.sol/SecondsLib.dbg.json +1 -1
  195. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  196. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
  197. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  198. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +17 -4
  199. package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +1 -1
  200. package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +1 -1
  201. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  202. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  203. package/contracts/components/Component.sol +21 -2
  204. package/contracts/components/Distribution.sol +11 -6
  205. package/contracts/components/IComponent.sol +16 -2
  206. package/contracts/components/IPoolComponent.sol +8 -7
  207. package/contracts/components/IProductComponent.sol +5 -4
  208. package/contracts/components/Pool.sol +11 -12
  209. package/contracts/components/Product.sol +144 -62
  210. package/contracts/instance/BundleManager.sol +3 -4
  211. package/contracts/instance/IInstance.sol +32 -53
  212. package/contracts/instance/IInstanceService.sol +15 -14
  213. package/contracts/instance/Instance.sol +107 -205
  214. package/contracts/instance/InstanceAccessManager.sol +44 -25
  215. package/contracts/instance/InstanceAuthorizationsLib.sol +308 -0
  216. package/contracts/instance/InstanceReader.sol +84 -7
  217. package/contracts/instance/InstanceService.sol +102 -289
  218. package/contracts/instance/InstanceStore.sol +212 -0
  219. package/contracts/instance/ObjectManager.sol +1 -1
  220. package/contracts/instance/base/ComponentService.sol +53 -41
  221. package/contracts/instance/base/KeyValueStore.sol +0 -31
  222. package/contracts/instance/base/Lifecycle.sol +15 -4
  223. package/contracts/instance/module/IAccess.sol +2 -2
  224. package/contracts/instance/module/IComponents.sol +3 -3
  225. package/contracts/instance/module/IDistribution.sol +3 -2
  226. package/contracts/instance/module/IPolicy.sol +13 -8
  227. package/contracts/instance/service/ApplicationService.sol +60 -224
  228. package/contracts/instance/service/BundleService.sol +73 -122
  229. package/contracts/instance/service/ClaimService.sol +318 -32
  230. package/contracts/instance/service/DistributionService.sol +64 -151
  231. package/contracts/instance/service/IApplicationService.sol +8 -28
  232. package/contracts/instance/service/IBundleService.sol +34 -9
  233. package/contracts/instance/service/IClaimService.sol +52 -23
  234. package/contracts/instance/service/IDistributionService.sol +11 -22
  235. package/contracts/instance/service/IPolicyService.sol +24 -16
  236. package/contracts/instance/service/IPoolService.sol +18 -3
  237. package/contracts/instance/service/IPricingService.sol +37 -0
  238. package/contracts/instance/service/PolicyService.sol +134 -118
  239. package/contracts/instance/service/PoolService.sol +124 -64
  240. package/contracts/instance/service/PricingService.sol +275 -0
  241. package/contracts/instance/service/PricingServiceManager.sol +51 -0
  242. package/contracts/instance/service/ProductService.sol +14 -14
  243. package/contracts/registry/IRegistryService.sol +0 -2
  244. package/contracts/registry/RegistryService.sol +16 -15
  245. package/contracts/registry/ReleaseManager.sol +20 -18
  246. package/contracts/shared/IPolicyHolder.sol +23 -9
  247. package/contracts/shared/IRegistryLinked.sol +0 -1
  248. package/contracts/shared/IService.sol +3 -6
  249. package/contracts/shared/NftOwnable.sol +0 -2
  250. package/contracts/shared/PolicyHolder.sol +30 -17
  251. package/contracts/shared/Registerable.sol +10 -9
  252. package/contracts/shared/RegistryLinked.sol +0 -5
  253. package/contracts/shared/Service.sol +16 -7
  254. package/contracts/shared/TokenHandler.sol +4 -2
  255. package/contracts/test/TestService.sol +1 -1
  256. package/contracts/types/Amount.sol +49 -0
  257. package/contracts/types/ClaimId.sol +25 -2
  258. package/contracts/types/Fee.sol +7 -6
  259. package/contracts/types/ObjectType.sol +9 -5
  260. package/contracts/types/PayoutId.sol +33 -5
  261. package/contracts/types/StateId.sol +6 -2
  262. package/contracts/types/Timestamp.sol +5 -0
  263. package/package.json +1 -1
  264. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.dbg.json +0 -4
  265. /package/contracts/{instance → shared}/AccessManagerUpgradeableInitializeable.sol +0 -0
@@ -3,21 +3,25 @@ pragma solidity ^0.8.19;
3
3
 
4
4
  import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
5
5
 
6
+ import {Amount, AmountLib} from "../types/Amount.sol";
7
+ import {ClaimId} from "../types/ClaimId.sol";
8
+ import {Component} from "./Component.sol";
9
+ import {Fee} from "../types/Fee.sol";
6
10
  import {IRisk} from "../instance/module/IRisk.sol";
7
11
  import {IApplicationService} from "../instance/service/IApplicationService.sol";
8
12
  import {IPolicyService} from "../instance/service/IPolicyService.sol";
9
13
  import {IProductService} from "../instance/service/IProductService.sol";
10
14
  import {IClaimService} from "../instance/service/IClaimService.sol";
15
+ import {IPricingService} from "../instance/service/IPricingService.sol";
11
16
  import {IProductComponent} from "./IProductComponent.sol";
12
17
  import {NftId, NftIdLib} from "../types/NftId.sol";
13
- import {PRODUCT, APPLICATION, POLICY, CLAIM } from "../types/ObjectType.sol";
18
+ import {PayoutId} from "../types/PayoutId.sol";
19
+ import {PRODUCT, APPLICATION, POLICY, CLAIM, PRICE } from "../types/ObjectType.sol";
14
20
  import {ReferralId} from "../types/Referral.sol";
15
21
  import {RiskId, RiskIdLib} from "../types/RiskId.sol";
16
22
  import {Seconds} from "../types/Seconds.sol";
17
23
  import {StateId} from "../types/StateId.sol";
18
24
  import {Timestamp} from "../types/Timestamp.sol";
19
- import {Fee} from "../types/Fee.sol";
20
- import {Component} from "./Component.sol";
21
25
 
22
26
  import {TokenHandler} from "../shared/TokenHandler.sol";
23
27
 
@@ -40,6 +44,7 @@ abstract contract Product is
40
44
  IApplicationService _applicationService;
41
45
  IPolicyService _policyService;
42
46
  IClaimService _claimService;
47
+ IPricingService _pricingService;
43
48
  Pool _pool;
44
49
  Distribution _distribution;
45
50
  Fee _initialProductFee;
@@ -70,11 +75,12 @@ abstract contract Product is
70
75
 
71
76
  ProductStorage storage $ = _getProductStorage();
72
77
  // TODO add validation
73
- // TODO refactor to go via registry
78
+ // TODO refactor to go via registry ?
74
79
  $._productService = IProductService(_getServiceAddress(PRODUCT()));
75
80
  $._applicationService = IApplicationService(_getServiceAddress(APPLICATION()));
76
81
  $._policyService = IPolicyService(_getServiceAddress(POLICY()));
77
82
  $._claimService = IClaimService(_getServiceAddress(CLAIM()));
83
+ $._pricingService = IPricingService(_getServiceAddress(PRICE()));
78
84
  $._pool = Pool(pool);
79
85
  $._distribution = Distribution(distribution);
80
86
  $._initialProductFee = productFee;
@@ -86,50 +92,17 @@ abstract contract Product is
86
92
  registerInterface(type(IProductComponent).interfaceId);
87
93
  }
88
94
 
89
-
90
- function calculatePremium(
91
- uint256 sumInsuredAmount,
92
- RiskId riskId,
93
- Seconds lifetime,
94
- bytes memory applicationData,
95
- NftId bundleNftId,
96
- ReferralId referralId
97
- )
98
- external
99
- view
100
- override
101
- returns (uint256 premiumAmount)
102
- {
103
- IPolicy.Premium memory premium = _getProductStorage()._applicationService.calculatePremium(
104
- getNftId(),
105
- riskId,
106
- sumInsuredAmount,
107
- lifetime,
108
- applicationData,
109
- bundleNftId,
110
- referralId
111
- );
112
- premiumAmount = premium.premiumAmount;
113
- }
114
-
115
-
116
- function calculateNetPremium(
117
- uint256 sumInsuredAmount,
118
- RiskId riskId,
119
- Seconds lifetime,
120
- bytes memory applicationData
95
+ // from product component
96
+ function setFees(
97
+ Fee memory productFee,
98
+ Fee memory processingFee
121
99
  )
122
100
  external
123
- view
124
- virtual override
125
- returns (uint256 netPremiumAmount)
101
+ onlyOwner
102
+ restricted()
103
+ override
126
104
  {
127
- // default 10% of sum insured
128
- return sumInsuredAmount / 10;
129
- }
130
-
131
- function _toRiskId(string memory riskName) internal pure returns (RiskId riskId) {
132
- return RiskIdLib.toRiskId(riskName);
105
+ _getProductService().setFees(productFee, processingFee);
133
106
  }
134
107
 
135
108
  function _createRisk(
@@ -169,7 +142,7 @@ abstract contract Product is
169
142
  function _createApplication(
170
143
  address applicationOwner,
171
144
  RiskId riskId,
172
- uint256 sumInsuredAmount,
145
+ Amount sumInsuredAmount,
173
146
  Seconds lifetime,
174
147
  NftId bundleNftId,
175
148
  ReferralId referralId,
@@ -189,14 +162,14 @@ abstract contract Product is
189
162
  );
190
163
  }
191
164
 
192
- function _underwrite(
165
+ function _collateralize(
193
166
  NftId policyNftId,
194
167
  bool requirePremiumPayment,
195
168
  Timestamp activateAt
196
169
  )
197
170
  internal
198
171
  {
199
- _getProductStorage()._policyService.underwrite(
172
+ _getProductStorage()._policyService.collateralize(
200
173
  policyNftId,
201
174
  requirePremiumPayment,
202
175
  activateAt);
@@ -229,28 +202,137 @@ abstract contract Product is
229
202
  )
230
203
  internal
231
204
  {
232
- _getProductStorage()._policyService.close(policyNftId);
205
+ _getProductStorage()._policyService.close(
206
+ policyNftId);
233
207
  }
234
208
 
235
- function getPoolNftId() external view override returns (NftId poolNftId) {
236
- return getRegistry().getNftId(address(_getProductStorage()._pool));
209
+ function _submitClaim(
210
+ NftId policyNftId,
211
+ Amount claimAmount,
212
+ bytes memory claimData
213
+ )
214
+ internal
215
+ returns(ClaimId)
216
+ {
217
+ return _getProductStorage()._claimService.submit(
218
+ policyNftId,
219
+ claimAmount,
220
+ claimData);
237
221
  }
238
222
 
239
- function getDistributionNftId() external view override returns (NftId distributionNftId) {
240
- return getRegistry().getNftId(address(_getProductStorage()._distribution));
223
+ function _confirmClaim(
224
+ NftId policyNftId,
225
+ ClaimId claimId,
226
+ Amount confirmedAmount
227
+ )
228
+ internal
229
+ {
230
+ _getProductStorage()._claimService.confirm(
231
+ policyNftId,
232
+ claimId,
233
+ confirmedAmount);
241
234
  }
242
235
 
243
- // from product component
244
- function setFees(
245
- Fee memory productFee,
246
- Fee memory processingFee
236
+ function _declineClaim(
237
+ NftId policyNftId,
238
+ ClaimId claimId
239
+ )
240
+ internal
241
+ {
242
+ _getProductStorage()._claimService.decline(
243
+ policyNftId,
244
+ claimId);
245
+ }
246
+
247
+ function _closeClaim(
248
+ NftId policyNftId,
249
+ ClaimId claimId
250
+ )
251
+ internal
252
+ {
253
+ _getProductStorage()._claimService.close(
254
+ policyNftId,
255
+ claimId);
256
+ }
257
+
258
+ function _createPayout(
259
+ NftId policyNftId,
260
+ ClaimId claimId,
261
+ Amount amount,
262
+ bytes memory data
263
+ )
264
+ internal
265
+ returns (PayoutId)
266
+ {
267
+ return _getProductStorage()._claimService.createPayout(
268
+ policyNftId,
269
+ claimId,
270
+ amount,
271
+ data);
272
+ }
273
+
274
+ function _processPayout(
275
+ NftId policyNftId,
276
+ PayoutId payoutId
277
+ )
278
+ internal
279
+ {
280
+ _getProductStorage()._claimService.processPayout(
281
+ policyNftId,
282
+ payoutId);
283
+ }
284
+
285
+ function calculatePremium(
286
+ Amount sumInsuredAmount,
287
+ RiskId riskId,
288
+ Seconds lifetime,
289
+ bytes memory applicationData,
290
+ NftId bundleNftId,
291
+ ReferralId referralId
292
+ )
293
+ external
294
+ view
295
+ override
296
+ returns (Amount premiumAmount)
297
+ {
298
+ IPolicy.Premium memory premium = _getProductStorage()._pricingService.calculatePremium(
299
+ getNftId(),
300
+ riskId,
301
+ sumInsuredAmount,
302
+ lifetime,
303
+ applicationData,
304
+ bundleNftId,
305
+ referralId
306
+ );
307
+
308
+ return AmountLib.toAmount(premium.premiumAmount);
309
+ }
310
+
311
+ function calculateNetPremium(
312
+ Amount sumInsuredAmount,
313
+ RiskId riskId,
314
+ Seconds lifetime,
315
+ bytes memory applicationData
247
316
  )
248
317
  external
249
- onlyOwner
250
- restricted()
251
- override
318
+ view
319
+ virtual override
320
+ returns (Amount netPremiumAmount)
252
321
  {
253
- _getProductService().setFees(productFee, processingFee);
322
+ // default 10% of sum insured
323
+ return AmountLib.toAmount(sumInsuredAmount.toInt() / 10);
324
+ }
325
+
326
+ function _toRiskId(string memory riskName) internal pure returns (RiskId riskId) {
327
+ return RiskIdLib.toRiskId(riskName);
328
+ }
329
+
330
+ function getPoolNftId() external view override returns (NftId poolNftId) {
331
+ return getRegistry().getNftId(address(_getProductStorage()._pool));
332
+ }
333
+
334
+ function getDistributionNftId() external view override returns (NftId distributionNftId) {
335
+ return getRegistry().getNftId(address(_getProductStorage()._distribution));
254
336
  }
255
337
 
256
338
  function getSetupInfo() public view returns (ISetup.ProductSetupInfo memory setupInfo) {
@@ -290,4 +372,4 @@ abstract contract Product is
290
372
  function _getProductService() internal view returns (IProductService) {
291
373
  return _getProductStorage()._productService;
292
374
  }
293
- }
375
+ }
@@ -34,8 +34,7 @@ contract BundleManager is
34
34
  mapping(NftId bundleNftId => LibNftIdSet.Set policies) internal _activePolicies;
35
35
 
36
36
  /// @dev links a policy to its bundle
37
- // to link a policy it MUST NOT yet have been activated
38
- // the bundle MUST be unlocked (active) for linking (underwriting) and registered with this instance
37
+ // to link a policy it MUST NOT yet have been linked
39
38
  function linkPolicy(NftId policyNftId) external restricted() {
40
39
  NftId bundleNftId = _instance.getInstanceReader().getPolicyInfo(policyNftId).bundleNftId;
41
40
  // decision will likely depend on the decision what to check here and what in the service
@@ -87,14 +86,14 @@ contract BundleManager is
87
86
  }
88
87
 
89
88
 
90
- /// @dev unlocked (active) bundles are available to underwrite new policies
89
+ /// @dev unlocked (active) bundles are available to collateralize new policies
91
90
  function unlock(NftId bundleNftId) external restricted() {
92
91
  NftId poolNftId = _instance.getInstanceReader().getBundleInfo(bundleNftId).poolNftId;
93
92
  _activate(poolNftId, bundleNftId);
94
93
  emit LogBundleManagerBundleUnlocked(poolNftId, bundleNftId);
95
94
  }
96
95
 
97
- /// @dev locked (deactivated) bundles may not underwrite any new policies
96
+ /// @dev locked (deactivated) bundles may not collateralize any new policies
98
97
  function lock(NftId bundleNftId) external restricted() {
99
98
  NftId poolNftId = _instance.getInstanceReader().getBundleInfo(bundleNftId).poolNftId;
100
99
  _deactivate(poolNftId, bundleNftId);
@@ -3,11 +3,16 @@ pragma solidity ^0.8.20;
3
3
 
4
4
  import {IAccessManaged} from "@openzeppelin/contracts/access/manager/IAccessManaged.sol";
5
5
 
6
+ import {ClaimId} from "../types/ClaimId.sol";
7
+ import {DistributorType} from "../types/DistributorType.sol";
8
+ import {PayoutId} from "../types/PayoutId.sol";
6
9
  import {NftId} from "../types/NftId.sol";
7
10
  import {StateId} from "../types/StateId.sol";
11
+ import {ReferralId} from "../types/Referral.sol";
8
12
  import {RiskId} from "../types/RiskId.sol";
9
13
  import {VersionPart} from "../types/Version.sol";
10
14
  import {Key32} from "../types/Key32.sol";
15
+ import {RoleId} from "../types/RoleId.sol";
11
16
 
12
17
  import {IRegisterable} from "../shared/IRegisterable.sol";
13
18
 
@@ -16,83 +21,57 @@ import {ITransferInterceptor} from "../registry/ITransferInterceptor.sol";
16
21
  import {InstanceAccessManager} from "./InstanceAccessManager.sol";
17
22
  import {BundleManager} from "./BundleManager.sol";
18
23
  import {InstanceReader} from "./InstanceReader.sol";
24
+ import {InstanceStore} from "./InstanceStore.sol";
25
+
26
+ import {IKeyValueStore} from "./base/IKeyValueStore.sol";
27
+
28
+ import {IAccess} from "./module/IAccess.sol";
19
29
 
20
- import {IBundle} from "./module/IBundle.sol";
21
30
  import {IBundleService} from "./service/IBundleService.sol";
22
- import {IComponents} from "./module/IComponents.sol";
23
31
  import {IDistributionService} from "./service/IDistributionService.sol";
24
- import {InstanceAccessManager} from "./InstanceAccessManager.sol";
25
- import {IKeyValueStore} from "./base/IKeyValueStore.sol";
26
- import {IPolicy} from "./module/IPolicy.sol";
27
- import {IDistribution} from "./module/IDistribution.sol";
28
32
  import {IPolicyService} from "./service/IPolicyService.sol";
29
33
  import {IPoolService} from "./service/IPoolService.sol";
30
34
  import {IProductService} from "./service/IProductService.sol";
31
35
  import {IPolicyService} from "./service/IPolicyService.sol";
32
36
  import {IBundleService} from "./service/IBundleService.sol";
33
- import {IRisk} from "./module/IRisk.sol";
34
- import {ISetup} from "./module/ISetup.sol";
35
37
 
36
38
 
37
39
 
38
40
  interface IInstance is
39
41
  IRegisterable,
40
42
  ITransferInterceptor,
41
- IAccessManaged,
42
- IKeyValueStore
43
+ IAccessManaged
43
44
  {
44
- function getDistributionService() external view returns (IDistributionService);
45
- function getProductService() external view returns (IProductService);
46
- function getPoolService() external view returns (IPoolService);
47
- function getPolicyService() external view returns (IPolicyService);
48
- function getBundleService() external view returns (IBundleService);
49
-
50
- function createDistributionSetup(NftId distributionNftId, ISetup.DistributionSetupInfo memory setup) external;
51
- function updateDistributionSetup(NftId distributionNftId, ISetup.DistributionSetupInfo memory setup, StateId newState) external;
52
- function updateDistributionSetupState(NftId distributionNftId, StateId newState) external;
45
+ error ErrorInstanceInstanceAccessManagerZero();
46
+ error ErrorInstanceInstanceAccessManagerAlreadySet(address instanceAccessManager);
47
+ error ErrorInstanceInstanceAccessManagerAuthorityMismatch(address instanceAuthority);
53
48
 
54
- function createPoolSetup(NftId poolNftId, IComponents.ComponentInfo memory info) external;
55
- function updatePoolSetup(NftId poolNftId, IComponents.ComponentInfo memory info, StateId newState) external;
56
- function updatePoolSetupState(NftId poolNftId, StateId newState) external;
49
+ error ErrorInstanceBundleManagerAlreadySet(address instanceBundleManager);
50
+ error ErrorInstanceBundleManagerInstanceMismatch(address instance);
51
+ error ErrorInstanceBundleManagerAuthorityMismatch(address instanceAuthority);
57
52
 
58
- function createBundle(NftId bundleNftId, IBundle.BundleInfo memory bundle) external;
59
- function updateBundle(NftId bundleNftId, IBundle.BundleInfo memory bundle, StateId newState) external;
60
- function updateBundleState(NftId bundleNftId, StateId newState) external;
53
+ error ErrorInstanceInstanceReaderInstanceMismatch(address instanceAuthority);
61
54
 
62
- function createProductSetup(NftId productNftId, ISetup.ProductSetupInfo memory setup) external;
63
- function updateProductSetup(NftId productNftId, ISetup.ProductSetupInfo memory setup, StateId newState) external;
64
- function updateProductSetupState(NftId productNftId, StateId newState) external;
55
+ error ErrorInstanceInstanceStoreAlreadySet(address instanceStore);
56
+ error ErrorInstanceInstanceStoreAuthorityMismatch(address instanceAuthority);
65
57
 
66
- function createDistributorType(Key32 distributorKey, IDistribution.DistributorTypeInfo memory info) external;
67
- function updateDistributorType(Key32 distributorKey, IDistribution.DistributorTypeInfo memory info, StateId newState) external;
68
- function updateDistributorTypeState(Key32 distributorKey, StateId newState) external;
58
+ function createRole(string memory roleName, string memory adminName) external returns (RoleId roleId, RoleId admin);
59
+ function grantRole(RoleId roleId, address account) external;
60
+ function revokeRole(RoleId roleId, address account) external;
69
61
 
70
- function createDistributor(NftId nftId, IDistribution.DistributorInfo memory info) external;
71
- function updateDistributor(NftId nftId, IDistribution.DistributorInfo memory info, StateId newState) external;
72
- function updateDistributorState(NftId nftId, StateId newState) external;
62
+ function createTarget(address target, string memory name) external;
63
+ function setTargetFunctionRole(string memory targetName, bytes4[] calldata selectors, RoleId roleId) external;
64
+ function setTargetLocked(address target, bool locked) external;
73
65
 
74
- function createReferral(Key32 referralKey, IDistribution.ReferralInfo memory referralInfo) external;
75
- function updateReferral(Key32 referralKey, IDistribution.ReferralInfo memory referralInfo, StateId newState) external;
76
- function updateReferralState(Key32 referralKey, StateId newState) external;
77
-
78
- function createRisk(RiskId riskId, IRisk.RiskInfo memory risk) external;
79
- function updateRisk(RiskId riskId, IRisk.RiskInfo memory risk, StateId newState) external;
80
- function updateRiskState(RiskId riskId, StateId newState) external;
81
-
82
- function createApplication(NftId applicationNftId, IPolicy.PolicyInfo memory policy) external;
83
- function updateApplication(NftId applicationNftId, IPolicy.PolicyInfo memory policy, StateId newState) external;
84
- function updateApplicationState(NftId applicationNftId, StateId newState) external;
85
-
86
- function updatePolicy(NftId policyNftId, IPolicy.PolicyInfo memory policy, StateId newState) external;
87
- function updatePolicyState(NftId policyNftId, StateId newState) external;
88
-
89
- // TODO add claims/payouts function to instance
90
- // function updateClaims(NftId policyNftId, IPolicy.PolicyInfo memory policy, StateId newState) external;
66
+ function getDistributionService() external view returns (IDistributionService);
67
+ function getProductService() external view returns (IProductService);
68
+ function getPoolService() external view returns (IPoolService);
69
+ function getPolicyService() external view returns (IPolicyService);
70
+ function getBundleService() external view returns (IBundleService);
91
71
 
92
72
  function getMajorVersion() external pure returns (VersionPart majorVersion);
93
73
  function getInstanceReader() external view returns (InstanceReader);
94
74
  function getBundleManager() external view returns (BundleManager);
95
-
96
- function setInstanceAccessManager(InstanceAccessManager accessManager) external;
97
75
  function getInstanceAccessManager() external view returns (InstanceAccessManager);
76
+ function getInstanceStore() external view returns (InstanceStore);
98
77
  }
@@ -5,16 +5,13 @@ import {NftId} from "../types/NftId.sol";
5
5
  import {ObjectType} from "../types/ObjectType.sol";
6
6
  import {RoleId} from "../types/RoleId.sol";
7
7
  import {IService} from "../shared/IService.sol";
8
- import {IRegistry} from "../registry/IRegistry.sol";
9
8
 
10
- import {IRegisterable} from "../shared/IRegisterable.sol";
11
- import {IComponent} from "../components/IComponent.sol";
12
-
13
- import {AccessManagerUpgradeableInitializeable} from "./AccessManagerUpgradeableInitializeable.sol";
9
+ import {AccessManagerUpgradeableInitializeable} from "../shared/AccessManagerUpgradeableInitializeable.sol";
14
10
  import {InstanceAccessManager} from "./InstanceAccessManager.sol";
15
11
  import {Instance} from "./Instance.sol";
16
12
  import {InstanceReader} from "./InstanceReader.sol";
17
13
  import {BundleManager} from "./BundleManager.sol";
14
+ import {InstanceStore} from "./InstanceStore.sol";
18
15
 
19
16
  interface IInstanceService is IService {
20
17
 
@@ -29,15 +26,16 @@ interface IInstanceService is IService {
29
26
  error ErrorInstanceServiceInstanceReaderSameAsMasterInstanceReader();
30
27
  error ErrorInstanceServiceInstanceReaderInstanceMismatch();
31
28
 
32
- error ErrorInstanceServiceOzAccessManagerZero();
33
29
  error ErrorInstanceServiceInstanceAccessManagerZero();
34
30
  error ErrorInstanceServiceInstanceReaderZero();
35
31
  error ErrorInstanceServiceBundleManagerZero();
32
+ error ErrorInstanceServiceInstanceStoreZero();
36
33
 
37
34
  error ErrorInstanceServiceInstanceAuthorityMismatch();
38
35
  error ErrorInstanceServiceBundleManagerAuthorityMismatch();
39
36
  error ErrorInstanceServiceInstanceReaderInstanceMismatch2();
40
37
  error ErrorInstanceServiceBundleMangerInstanceMismatch();
38
+ error ErrorInstanceServiceInstanceStoreAuthorityMismatch();
41
39
 
42
40
  error ErrorInstanceServiceRequestUnauhorized(address caller);
43
41
  error ErrorInstanceServiceNotInstanceOwner(address caller, NftId instanceNftId);
@@ -46,17 +44,21 @@ interface IInstanceService is IService {
46
44
  error ErrorInstanceServiceInstanceComponentMismatch(NftId instanceNftId, NftId componentNftId);
47
45
  error ErrorInstanceServiceInvalidComponentType(address componentAddress, ObjectType expectedType, ObjectType componentType);
48
46
 
49
- event LogInstanceCloned(address clonedOzAccessManager, address clonedInstanceAccessManager, address clonedInstance, address clonedBundleManager, address clonedInstanceReader, NftId clonedInstanceNftId);
47
+ event LogInstanceCloned(
48
+ address clonedOzAccessManager,
49
+ address clonedInstanceAccessManager,
50
+ address clonedInstance,
51
+ address clonedInstanceStore,
52
+ address clonedBundleManager,
53
+ address clonedInstanceReader,
54
+ NftId clonedInstanceNftId
55
+ );
50
56
 
51
57
  function createInstanceClone()
52
58
  external
53
59
  returns (
54
- AccessManagerUpgradeableInitializeable clonedOzAccessManager,
55
- InstanceAccessManager clonedInstanceAccessManager,
56
60
  Instance clonedInstance,
57
- NftId instanceNftId,
58
- InstanceReader clonedInstanceReader,
59
- BundleManager clonedBundleManager
61
+ NftId instanceNftId
60
62
  );
61
63
 
62
64
  function createGifTarget(
@@ -68,5 +70,4 @@ interface IInstanceService is IService {
68
70
  ) external;
69
71
 
70
72
  function setComponentLocked(bool locked) external;
71
- }
72
-
73
+ }