@etherisc/gif-next 0.0.2-f13fd28-503 → 0.0.2-f15b559-661

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 (274) hide show
  1. package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +1 -1
  2. package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +2 -2
  3. package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +1 -1
  4. package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +2 -2
  5. package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +1 -1
  6. package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
  7. package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.dbg.json +1 -1
  8. package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
  9. package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
  10. package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +1 -1
  11. package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +1 -1
  12. package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
  13. package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
  14. package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
  15. package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
  16. package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +4 -4
  17. package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
  18. package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +2 -2
  19. package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
  20. package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
  21. package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +126 -118
  22. package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
  23. package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +26 -22
  24. package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
  25. package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
  26. package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +76 -76
  27. package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.dbg.json +1 -1
  28. package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.dbg.json +1 -1
  29. package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.json +2 -2
  30. package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +1 -1
  31. package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +2 -2
  32. package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
  33. package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +42 -50
  34. package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
  35. package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +2 -2
  36. package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.dbg.json +1 -1
  37. package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +1 -1
  38. package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +4 -4
  39. package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +1 -1
  40. package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +2 -2
  41. package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +1 -1
  42. package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +2 -2
  43. package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
  44. package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +2 -2
  45. package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +1 -1
  46. package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +2 -2
  47. package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
  48. package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +35 -29
  49. package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +4 -0
  50. package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +589 -0
  51. package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +1 -1
  52. package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +2 -2
  53. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  54. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +1 -1
  55. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
  56. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  57. package/artifacts/contracts/instance/Instance.sol/Instance.json +3 -3
  58. package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
  59. package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +99 -86
  60. package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
  61. package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +2 -2
  62. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
  63. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +117 -72
  64. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
  65. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +2 -2
  66. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
  67. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +2 -2
  68. package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
  69. package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +18 -18
  70. package/artifacts/contracts/instance/RiskSet.sol/RiskSet.dbg.json +1 -1
  71. package/artifacts/contracts/instance/RiskSet.sol/RiskSet.json +2 -2
  72. package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
  73. package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
  74. package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
  75. package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +1 -1
  76. package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +1 -1
  77. package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.dbg.json +1 -1
  78. package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.json +2 -2
  79. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
  80. package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +1 -1
  81. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
  82. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
  83. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
  84. package/artifacts/contracts/mock/Dip.sol/Dip.dbg.json +1 -1
  85. package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +1 -1
  86. package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +2 -2
  87. package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
  88. package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +2 -2
  89. package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +1 -1
  90. package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +1 -1
  91. package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
  92. package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
  93. package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
  94. package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +2 -2
  95. package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
  96. package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +2 -2
  97. package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
  98. package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
  99. package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +2 -2
  100. package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
  101. package/artifacts/contracts/pool/BundleService.sol/BundleService.json +2 -2
  102. package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
  103. package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +2 -2
  104. package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
  105. package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  106. package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
  107. package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
  108. package/artifacts/contracts/pool/PoolLib.sol/PoolLib.dbg.json +1 -1
  109. package/artifacts/contracts/pool/PoolLib.sol/PoolLib.json +2 -2
  110. package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
  111. package/artifacts/contracts/pool/PoolService.sol/PoolService.json +2 -2
  112. package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
  113. package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +2 -2
  114. package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
  115. package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +2 -2
  116. package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
  117. package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +2 -2
  118. package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
  119. package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
  120. package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +2 -2
  121. package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
  122. package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +2 -2
  123. package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
  124. package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +2 -2
  125. package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
  126. package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
  127. package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
  128. package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
  129. package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  130. package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +1 -1
  131. package/artifacts/contracts/product/IRiskService.sol/IRiskService.json +10 -4
  132. package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
  133. package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +2 -2
  134. package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.dbg.json +1 -1
  135. package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.json +2 -2
  136. package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
  137. package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +2 -2
  138. package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
  139. package/artifacts/contracts/product/PricingService.sol/PricingService.json +2 -2
  140. package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
  141. package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +2 -2
  142. package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
  143. package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +1 -1
  144. package/artifacts/contracts/product/RiskService.sol/RiskService.json +50 -28
  145. package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
  146. package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +21 -13
  147. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  148. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  149. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
  150. package/artifacts/contracts/registry/IRelease.sol/IRelease.dbg.json +1 -1
  151. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
  152. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  153. package/artifacts/contracts/registry/Registry.sol/Registry.json +2 -2
  154. package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
  155. package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +2 -2
  156. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
  157. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +2 -2
  158. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
  159. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +2 -2
  160. package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +1 -1
  161. package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +1 -1
  162. package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +1 -1
  163. package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +2 -2
  164. package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
  165. package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +2 -2
  166. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
  167. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +2 -2
  168. package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
  169. package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
  170. package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +2 -2
  171. package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
  172. package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +2 -2
  173. package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
  174. package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +1 -1
  175. package/artifacts/contracts/shared/ContractLib.sol/IInstanceAdminHelper.dbg.json +1 -1
  176. package/artifacts/contracts/shared/ContractLib.sol/ITargetHelper.dbg.json +1 -1
  177. package/artifacts/contracts/shared/ContractLib.sol/ITokenRegistryHelper.dbg.json +1 -1
  178. package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
  179. package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
  180. package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
  181. package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  182. package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  183. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
  184. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
  185. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  186. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
  187. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
  188. package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +1 -1
  189. package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
  190. package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  191. package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  192. package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +1 -1
  193. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
  194. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
  195. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  196. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
  197. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
  198. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  199. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.dbg.json +1 -1
  200. package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +1 -1
  201. package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
  202. package/artifacts/contracts/staking/IStaking.sol/IStaking.json +3 -3
  203. package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
  204. package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +0 -42
  205. package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +1 -1
  206. package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +32 -48
  207. package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
  208. package/artifacts/contracts/staking/Staking.sol/Staking.json +31 -39
  209. package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
  210. package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
  211. package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +15 -19
  212. package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
  213. package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +2 -2
  214. package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
  215. package/artifacts/contracts/staking/StakingService.sol/StakingService.json +26 -76
  216. package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
  217. package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +14 -18
  218. package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
  219. package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +2 -2
  220. package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
  221. package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +2 -2
  222. package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  223. package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
  224. package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  225. package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
  226. package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
  227. package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
  228. package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
  229. package/artifacts/contracts/type/Key32Set.sol/LibKey32Set.dbg.json +1 -1
  230. package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
  231. package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  232. package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  233. package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
  234. package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
  235. package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
  236. package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
  237. package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +9 -4
  238. package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
  239. package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
  240. package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
  241. package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
  242. package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
  243. package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
  244. package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
  245. package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
  246. package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
  247. package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
  248. package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +1 -1
  249. package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +1 -1
  250. package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
  251. package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +1 -1
  252. package/contracts/distribution/BasicDistribution.sol +7 -5
  253. package/contracts/distribution/Distribution.sol +10 -8
  254. package/contracts/distribution/DistributionService.sol +18 -17
  255. package/contracts/distribution/IDistributionService.sol +14 -13
  256. package/contracts/examples/fire/FireProduct.sol +1 -2
  257. package/contracts/examples/unpermissioned/SimpleProduct.sol +4 -4
  258. package/contracts/examples/unpermissioned/SimpleProductAuthorization.sol +28 -0
  259. package/contracts/instance/IInstance.sol +1 -1
  260. package/contracts/instance/Instance.sol +1 -1
  261. package/contracts/instance/InstanceAdmin.sol +9 -14
  262. package/contracts/instance/InstanceReader.sol +12 -0
  263. package/contracts/instance/module/IDistribution.sol +2 -1
  264. package/contracts/product/IRiskService.sol +5 -8
  265. package/contracts/product/PolicyService.sol +16 -41
  266. package/contracts/product/Product.sol +6 -15
  267. package/contracts/product/RiskService.sol +6 -7
  268. package/contracts/staking/IStaking.sol +1 -1
  269. package/contracts/staking/IStakingService.sol +1 -3
  270. package/contracts/staking/StakeManagerLib.sol +6 -62
  271. package/contracts/staking/Staking.sol +7 -11
  272. package/contracts/staking/StakingService.sol +2 -21
  273. package/contracts/type/RiskId.sol +4 -3
  274. package/package.json +1 -1
@@ -3,21 +3,18 @@ pragma solidity ^0.8.20;
3
3
 
4
4
  import {Amount, AmountLib} from "../type/Amount.sol";
5
5
  import {ClaimId} from "../type/ClaimId.sol";
6
- import {IComponent} from "../shared/IComponent.sol";
7
- import {Fee, FeeLib} from "../type/Fee.sol";
8
- import {IRisk} from "../instance/module/IRisk.sol";
6
+ import {Fee} from "../type/Fee.sol";
9
7
  import {IApplicationService} from "./IApplicationService.sol";
10
8
  import {IAuthorization} from "../authorization/IAuthorization.sol";
11
9
  import {IComponentService} from "../shared/IComponentService.sol";
12
10
  import {InstanceLinkedComponent} from "../shared/InstanceLinkedComponent.sol";
13
- import {IInstanceLinkedComponent} from "../shared/IInstanceLinkedComponent.sol";
14
11
  import {IPolicyService} from "./IPolicyService.sol";
15
12
  import {IRiskService} from "./IRiskService.sol";
16
13
  import {IClaimService} from "./IClaimService.sol";
17
14
  import {IPricingService} from "./IPricingService.sol";
18
15
  import {IProductComponent} from "./IProductComponent.sol";
19
- import {NftId, NftIdLib} from "../type/NftId.sol";
20
- import {ObjectType, COMPONENT, DISTRIBUTION, ORACLE, POOL, PRODUCT, BUNDLE, APPLICATION, POLICY, CLAIM, PRICE } from "../type/ObjectType.sol";
16
+ import {NftId} from "../type/NftId.sol";
17
+ import {COMPONENT, PRODUCT, BUNDLE, APPLICATION, POLICY, CLAIM, PRICE } from "../type/ObjectType.sol";
21
18
  import {PayoutId} from "../type/PayoutId.sol";
22
19
  import {COMPONENT, PRODUCT, APPLICATION, POLICY, CLAIM, PRICE, BUNDLE, RISK } from "../type/ObjectType.sol";
23
20
  import {ReferralId} from "../type/Referral.sol";
@@ -28,9 +25,6 @@ import {Timestamp} from "../type/Timestamp.sol";
28
25
 
29
26
  import {IPolicy} from "../instance/module/IPolicy.sol";
30
27
  import {IComponents} from "../instance/module/IComponents.sol";
31
- import {IDistributionComponent} from "../distribution/IDistributionComponent.sol";
32
- import {IOracleComponent} from "../oracle/IOracleComponent.sol";
33
- import {IPoolComponent} from "../pool/IPoolComponent.sol";
34
28
 
35
29
  abstract contract Product is
36
30
  InstanceLinkedComponent,
@@ -189,13 +183,14 @@ abstract contract Product is
189
183
 
190
184
 
191
185
  function _createRisk(
192
- RiskId id,
186
+ bytes32 id,
193
187
  bytes memory data
194
188
  )
195
189
  internal
196
190
  virtual
191
+ returns (RiskId riskId)
197
192
  {
198
- _getProductStorage()._riskService.createRisk(
193
+ return _getProductStorage()._riskService.createRisk(
199
194
  id,
200
195
  data
201
196
  );
@@ -466,10 +461,6 @@ abstract contract Product is
466
461
  payoutId);
467
462
  }
468
463
 
469
- function _toRiskId(string memory riskName) internal virtual pure returns (RiskId riskId) {
470
- return RiskIdLib.toRiskId(riskName);
471
- }
472
-
473
464
  function _getProductStorage() internal virtual pure returns (ProductStorage storage $) {
474
465
  assembly {
475
466
  $.slot := PRODUCT_STORAGE_LOCATION_V1
@@ -2,19 +2,16 @@
2
2
  pragma solidity ^0.8.20;
3
3
 
4
4
  import {IInstance} from "../instance/IInstance.sol";
5
- import {IInstanceService} from "../instance/IInstanceService.sol";
6
- import {IPoolService} from "../pool/PoolService.sol";
7
5
  import {IRegistry} from "../registry/IRegistry.sol";
8
- import {IRegistryService} from "../registry/IRegistryService.sol";
9
6
  import {IRisk} from "../instance/module/IRisk.sol";
10
7
  import {IRiskService} from "./IRiskService.sol";
11
8
 
12
9
  import {ContractLib} from "../shared/ContractLib.sol";
13
10
  import {InstanceReader} from "../instance/InstanceReader.sol";
14
- import {ObjectType, COMPONENT, INSTANCE, PRODUCT, POOL, POLICY, REGISTRY, RISK} from "../type/ObjectType.sol";
11
+ import {ObjectType, COMPONENT, PRODUCT, RISK} from "../type/ObjectType.sol";
15
12
  import {ACTIVE, PAUSED, KEEP_STATE} from "../type/StateId.sol";
16
13
  import {NftId} from "../type/NftId.sol";
17
- import {RiskId} from "../type/RiskId.sol";
14
+ import {RiskId, RiskIdLib} from "../type/RiskId.sol";
18
15
  import {StateId} from "../type/StateId.sol";
19
16
  import {RiskSet} from "../instance/RiskSet.sol";
20
17
  import {Service} from "../shared/Service.sol";
@@ -42,18 +39,20 @@ contract RiskService is
42
39
  _registerInterface(type(IRiskService).interfaceId);
43
40
  }
44
41
 
45
-
42
+ /// @inheritdoc IRiskService
46
43
  function createRisk(
47
- RiskId riskId,
44
+ bytes32 id,
48
45
  bytes memory data
49
46
  )
50
47
  external
51
48
  restricted()
49
+ returns (RiskId riskId)
52
50
  {
53
51
  // checks
54
52
  (NftId productNftId, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
55
53
 
56
54
  // effects
55
+ riskId = RiskIdLib.toRiskId(productNftId, id);
57
56
  IRisk.RiskInfo memory riskInfo = IRisk.RiskInfo({
58
57
  productNftId: productNftId,
59
58
  createdAt: TimestampLib.blockTimestamp(),
@@ -132,7 +132,7 @@ interface IStaking is
132
132
  /// @dev restakes the dips to a new target.
133
133
  /// the sum of the staked dips and the accumulated rewards will be restaked.
134
134
  /// permissioned: only staking service may call this function.
135
- function restake(NftId stakeNftId, NftId newStakeNftId) external returns (Amount newStakeBalance);
135
+ function restake(NftId stakeNftId, NftId newTargetNftId) external returns (NftId newStakeNftId);
136
136
 
137
137
  /// @dev retuns the specified amount of dips to the holder of the specified stake nft.
138
138
  /// if dipAmount is set to Amount.max() all staked dips and all rewards are transferred to
@@ -26,7 +26,6 @@ interface IStakingService is IService
26
26
  event LogStakingServiceStakeCreated(NftId stakeNftId, NftId targetNftId, address owner, Amount stakedAmount);
27
27
  event LogStakingServiceStakeIncreased(NftId stakeNftId, address owner, Amount stakedAmount, Amount stakeBalance);
28
28
  event LogStakingServiceUnstaked(NftId stakeNftId, address stakeOwner, Amount totalAmount);
29
- event LogStakingServiceStakeRestaked(address stakeOwner, NftId indexed stakeNftId, NftId newStakeNftId, NftId indexed newTargetNftId, Amount indexed newStakeBalance);
30
29
 
31
30
  event LogStakingServiceRewardsUpdated(NftId stakeNftId);
32
31
  event LogStakingServiceRewardsClaimed(NftId stakeNftId, address stakeOwner, Amount rewardsClaimedAmount);
@@ -117,8 +116,7 @@ interface IStakingService is IService
117
116
  )
118
117
  external
119
118
  returns (
120
- NftId newStakeNftId,
121
- Amount newStakeBalance
119
+ NftId newStakeNftId
122
120
  );
123
121
 
124
122
 
@@ -1,10 +1,16 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.20;
3
3
 
4
+ import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
5
+
4
6
  import {Amount, AmountLib} from "../type/Amount.sol";
7
+ import {Component} from "../shared/Component.sol";
5
8
  import {IRegistry} from "../registry/IRegistry.sol";
9
+ import {IRegistryService} from "../registry/IRegistryService.sol";
6
10
  import {IStaking} from "./IStaking.sol";
11
+ import {Key32} from "../type/Key32.sol";
7
12
  import {NftId} from "../type/NftId.sol";
13
+ import {ObjectType, INSTANCE, PROTOCOL, TARGET} from "../type/ObjectType.sol";
8
14
  import {Seconds, SecondsLib} from "../type/Seconds.sol";
9
15
  import {StakingReader} from "./StakingReader.sol";
10
16
  import {StakingStore} from "./StakingStore.sol";
@@ -66,55 +72,6 @@ library StakeManagerLib {
66
72
 
67
73
  }
68
74
 
69
- function restake(
70
- StakingReader stakingReader,
71
- StakingStore stakingStore,
72
- NftId oldStakeNftId,
73
- NftId newStakeNftId
74
- )
75
- external
76
- returns (Amount newStakeBalance)
77
- {
78
- NftId oldTargetNftId = stakingReader.getTargetNftId(oldStakeNftId);
79
- (UFixed oldRewardRate,) = checkUnstakeParameters(stakingReader, oldStakeNftId);
80
-
81
- // calculate new rewards update and unstake full amount
82
- (
83
- Amount rewardIncrementAmount,
84
- ) = calculateRewardIncrease(
85
- stakingReader,
86
- oldStakeNftId,
87
- oldRewardRate);
88
- stakingStore.updateRewards(
89
- oldStakeNftId,
90
- oldTargetNftId,
91
- rewardIncrementAmount);
92
- (
93
- Amount unstakedAmount,
94
- Amount rewardsAmount
95
- ) = stakingStore.unstakeUpTo(
96
- oldStakeNftId,
97
- oldTargetNftId,
98
- AmountLib.max(), // unstake all stakes
99
- AmountLib.max()); // claim all rewards
100
-
101
- // calculate full restake amount
102
- newStakeBalance = unstakedAmount + rewardsAmount;
103
- NftId newTargetNftId = stakingReader.getTargetNftId(newStakeNftId);
104
-
105
- // create new staking target and increase stake
106
- Timestamp newLockedUntil = _checkCreateParameters(stakingReader, newTargetNftId, newStakeBalance);
107
- stakingStore.create(
108
- newStakeNftId,
109
- IStaking.StakeInfo({
110
- lockedUntil: newLockedUntil
111
- }));
112
- stakingStore.increaseStake(
113
- newStakeNftId,
114
- newTargetNftId,
115
- newStakeBalance);
116
- }
117
-
118
75
  function checkCreateParameters(
119
76
  StakingReader stakingReader,
120
77
  NftId targetNftId,
@@ -125,19 +82,6 @@ library StakeManagerLib {
125
82
  returns (
126
83
  Timestamp lockedUntil
127
84
  )
128
- {
129
- return _checkCreateParameters(stakingReader, targetNftId, dipAmount);
130
- }
131
-
132
- function _checkCreateParameters(
133
- StakingReader stakingReader,
134
- NftId targetNftId,
135
- Amount dipAmount
136
- )
137
- internal view
138
- returns (
139
- Timestamp lockedUntil
140
- )
141
85
  {
142
86
  Seconds lockingPeriod = checkTarget(stakingReader, targetNftId);
143
87
  checkDipAmount(stakingReader, targetNftId, dipAmount);
@@ -4,6 +4,7 @@ pragma solidity ^0.8.20;
4
4
  import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
5
5
 
6
6
  import {IRegistry} from "../registry/IRegistry.sol";
7
+ import {IRegistryService} from "../registry/IRegistryService.sol";
7
8
  import {IRelease} from "../registry/IRelease.sol";
8
9
  import {IStaking} from "./IStaking.sol";
9
10
  import {IVersionable} from "../upgradeability/IVersionable.sol";
@@ -13,7 +14,7 @@ import {Component} from "../shared/Component.sol";
13
14
  import {IComponent} from "../shared/IComponent.sol";
14
15
  import {IComponentService} from "../shared/IComponentService.sol";
15
16
  import {NftId} from "../type/NftId.sol";
16
- import {ObjectType, STAKE, STAKING} from "../type/ObjectType.sol";
17
+ import {ObjectType, COMPONENT, STAKING} from "../type/ObjectType.sol";
17
18
  import {Seconds} from "../type/Seconds.sol";
18
19
  import {Registerable} from "../shared/Registerable.sol";
19
20
  import {StakeManagerLib} from "./StakeManagerLib.sol";
@@ -316,26 +317,21 @@ contract Staking is
316
317
 
317
318
  function restake(
318
319
  NftId stakeNftId,
319
- NftId newStakeNftId
320
+ NftId newTargetNftId
320
321
  )
321
322
  external
322
323
  virtual
323
324
  restricted() // only staking service
324
325
  onlyStake(stakeNftId)
325
- returns (Amount newStakeBalance)
326
+ returns (NftId newStakeNftId)
326
327
  {
327
- _checkNftType(stakeNftId, STAKE());
328
- _checkNftType(newStakeNftId, STAKE());
329
-
330
328
  // TODO add check that allows additional staking amount
331
329
  StakingStorage storage $ = _getStakingStorage();
332
- newStakeBalance = StakeManagerLib.restake(
333
- $._reader,
334
- $._store,
335
- stakeNftId,
336
- newStakeNftId);
330
+
331
+ // TODO implement
337
332
  }
338
333
 
334
+
339
335
  function updateRewards(NftId stakeNftId)
340
336
  external
341
337
  virtual
@@ -227,32 +227,13 @@ contract StakingService is
227
227
  restricted()
228
228
  onlyNftOwner(stakeNftId)
229
229
  returns (
230
- NftId newStakeNftId,
231
- Amount newStakeBalance
230
+ NftId newStakeNftId
232
231
  )
233
232
  {
234
233
  _checkNftType(stakeNftId, STAKE());
235
234
 
236
235
  StakingServiceStorage storage $ = _getStakingServiceStorage();
237
- address stakeOwner = msg.sender;
238
-
239
- // register new stake object with registry
240
- newStakeNftId = $._registryService.registerStake(
241
- IRegistry.ObjectInfo({
242
- nftId: NftIdLib.zero(),
243
- parentNftId: newTargetNftId,
244
- objectType: STAKE(),
245
- isInterceptor: false,
246
- objectAddress: address(0),
247
- initialOwner: stakeOwner,
248
- data: ""
249
- }));
250
-
251
- newStakeBalance = $._staking.restake(
252
- stakeNftId,
253
- newStakeNftId);
254
-
255
- emit LogStakingServiceStakeRestaked(stakeOwner, stakeNftId, newStakeNftId, newTargetNftId, newStakeBalance);
236
+ // TODO implement
256
237
  }
257
238
 
258
239
 
@@ -2,6 +2,7 @@
2
2
  pragma solidity ^0.8.20;
3
3
 
4
4
  import {Key32, KeyId, Key32Lib} from "./Key32.sol";
5
+ import {NftId} from "./NftId.sol";
5
6
  import {RISK} from "./ObjectType.sol";
6
7
 
7
8
  type RiskId is bytes8;
@@ -40,9 +41,9 @@ library RiskIdLib {
40
41
  return uint64(RiskId.unwrap(riskId));
41
42
  }
42
43
 
43
- // @dev Converts a risk id string into a risk id.
44
- function toRiskId(string memory risk) public pure returns (RiskId) {
45
- return RiskId.wrap(bytes8(keccak256(abi.encode(risk))));
44
+ // @dev Converts a risk id string with a product NftId into a risk id.
45
+ function toRiskId(NftId productNftId, bytes32 risk) public pure returns (RiskId) {
46
+ return RiskId.wrap(bytes8(keccak256(abi.encode(productNftId, risk))));
46
47
  }
47
48
 
48
49
  /// @dev Returns the key32 value for the specified risk id.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etherisc/gif-next",
3
- "version": "0.0.2-f13fd28-503",
3
+ "version": "0.0.2-f15b559-661",
4
4
  "description": "This is the repository for the next version of the Generic Insurance Framework (GIF) smart contracts. ",
5
5
  "main": "index.js",
6
6
  "scripts": {