@etherisc/gif-next 0.0.2-e8b06c8-540 → 0.0.2-e8ea5fe-337

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 (459) hide show
  1. package/README.md +32 -3
  2. package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
  3. package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +38 -33
  4. package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +4 -0
  5. package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +1206 -0
  6. package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
  7. package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +8 -8
  8. package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +1 -1
  9. package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +1 -1
  10. package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
  11. package/artifacts/contracts/authorization/IModuleAuthorization.sol/IModuleAuthorization.dbg.json +1 -1
  12. package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
  13. package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.json +19 -0
  14. package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.dbg.json +1 -1
  15. package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.json +8 -8
  16. package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
  17. package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +23 -4
  18. package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
  19. package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +85 -101
  20. package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
  21. package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +19 -19
  22. package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
  23. package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +43 -75
  24. package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
  25. package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +223 -105
  26. package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
  27. package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +67 -55
  28. package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
  29. package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +43 -37
  30. package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
  31. package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +120 -31
  32. package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +4 -0
  33. package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +703 -0
  34. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  35. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +7 -7
  36. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
  37. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +10 -5
  38. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  39. package/artifacts/contracts/instance/Instance.sol/Instance.json +19 -19
  40. package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
  41. package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +1208 -290
  42. package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
  43. package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +31 -31
  44. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
  45. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +238 -123
  46. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
  47. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +44 -39
  48. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
  49. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +35 -35
  50. package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
  51. package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +226 -231
  52. package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
  53. package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +2 -2
  54. package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
  55. package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
  56. package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +2 -2
  57. package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +4 -0
  58. package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.json +182 -0
  59. package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +4 -0
  60. package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.json +181 -0
  61. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
  62. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
  63. package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +1 -1
  64. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
  65. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
  66. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
  67. package/artifacts/contracts/mock/Dip.sol/Dip.dbg.json +1 -1
  68. package/artifacts/contracts/mock/Dip.sol/Dip.json +2 -2
  69. package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +1 -1
  70. package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +59 -88
  71. package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
  72. package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +21 -21
  73. package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +1 -1
  74. package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +1 -1
  75. package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +30 -37
  76. package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
  77. package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
  78. package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +27 -72
  79. package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
  80. package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +32 -32
  81. package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
  82. package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +34 -34
  83. package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
  84. package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +55 -137
  85. package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
  86. package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +19 -19
  87. package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
  88. package/artifacts/contracts/pool/BundleService.sol/BundleService.json +402 -62
  89. package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
  90. package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +111 -43
  91. package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
  92. package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +205 -1
  93. package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  94. package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +45 -95
  95. package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
  96. package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +220 -100
  97. package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
  98. package/artifacts/contracts/pool/Pool.sol/Pool.json +45 -133
  99. package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
  100. package/artifacts/contracts/pool/PoolService.sol/PoolService.json +264 -136
  101. package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
  102. package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +40 -36
  103. package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
  104. package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +31 -50
  105. package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
  106. package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +31 -43
  107. package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
  108. package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +22 -78
  109. package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
  110. package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +19 -19
  111. package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
  112. package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +194 -72
  113. package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
  114. package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +58 -54
  115. package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
  116. package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +5 -0
  117. package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
  118. package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +114 -0
  119. package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
  120. package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +184 -119
  121. package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
  122. package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +43 -43
  123. package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  124. package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +19 -37
  125. package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +4 -0
  126. package/artifacts/contracts/product/{IProductService.sol/IProductService.json → IRiskService.sol/IRiskService.json} +2 -2
  127. package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
  128. package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +242 -209
  129. package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
  130. package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +55 -55
  131. package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
  132. package/artifacts/contracts/product/PricingService.sol/PricingService.json +113 -153
  133. package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
  134. package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +55 -75
  135. package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
  136. package/artifacts/contracts/product/Product.sol/Product.json +22 -78
  137. package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +4 -0
  138. package/artifacts/contracts/product/RiskService.sol/RiskService.json +695 -0
  139. package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +4 -0
  140. package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +702 -0
  141. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  142. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +2 -2
  143. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  144. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +51 -47
  145. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
  146. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +0 -183
  147. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
  148. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  149. package/artifacts/contracts/registry/Registry.sol/Registry.json +102 -74
  150. package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
  151. package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +100 -95
  152. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
  153. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +18 -18
  154. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
  155. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +27 -27
  156. package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +4 -0
  157. package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.json +164 -0
  158. package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +4 -0
  159. package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +1159 -0
  160. package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
  161. package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +26 -7
  162. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
  163. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +4 -4
  164. package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
  165. package/artifacts/contracts/shared/Component.sol/Component.json +0 -64
  166. package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
  167. package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +255 -62
  168. package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
  169. package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +69 -49
  170. package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
  171. package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
  172. package/artifacts/contracts/shared/IComponent.sol/IComponent.json +0 -26
  173. package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
  174. package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +153 -0
  175. package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
  176. package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +19 -37
  177. package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  178. package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.json +11 -5
  179. package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  180. package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.json +0 -5
  181. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
  182. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
  183. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  184. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
  185. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
  186. package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.dbg.json +1 -1
  187. package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +4 -0
  188. package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.json +73 -0
  189. package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
  190. package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +19 -75
  191. package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  192. package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.json +15 -89
  193. package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  194. package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.json +4 -65
  195. package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +4 -0
  196. package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.json +306 -0
  197. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
  198. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +6 -6
  199. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
  200. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +6 -6
  201. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  202. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +8 -8
  203. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
  204. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -2
  205. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
  206. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  207. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +330 -11
  208. package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +4 -0
  209. package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +108 -0
  210. package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
  211. package/artifacts/contracts/staking/IStaking.sol/IStaking.json +27 -27
  212. package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
  213. package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +1 -1
  214. package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +85 -105
  215. package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
  216. package/artifacts/contracts/staking/Staking.sol/Staking.json +84 -114
  217. package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +4 -0
  218. package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +164 -0
  219. package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
  220. package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +47 -43
  221. package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
  222. package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +6 -6
  223. package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
  224. package/artifacts/contracts/staking/StakingService.sol/StakingService.json +26 -26
  225. package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
  226. package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +31 -31
  227. package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
  228. package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +146 -165
  229. package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
  230. package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +58 -22
  231. package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  232. package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.json +2 -2
  233. package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
  234. package/artifacts/contracts/type/Amount.sol/AmountLib.json +37 -8
  235. package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  236. package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.json +2 -2
  237. package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
  238. package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.json +4 -4
  239. package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
  240. package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +4 -4
  241. package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
  242. package/artifacts/contracts/type/Fee.sol/FeeLib.json +17 -12
  243. package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
  244. package/artifacts/contracts/type/Key32.sol/Key32Lib.json +2 -2
  245. package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
  246. package/artifacts/contracts/type/NftId.sol/NftIdLib.json +4 -4
  247. package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  248. package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.json +2 -2
  249. package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  250. package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.json +2 -2
  251. package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
  252. package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +4 -4
  253. package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
  254. package/artifacts/contracts/type/Referral.sol/ReferralLib.json +4 -4
  255. package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
  256. package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +4 -4
  257. package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
  258. package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +4 -4
  259. package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
  260. package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +14 -14
  261. package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
  262. package/artifacts/contracts/type/Seconds.sol/SecondsLib.json +50 -2
  263. package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
  264. package/artifacts/contracts/type/Selector.sol/SelectorLib.json +2 -2
  265. package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
  266. package/artifacts/contracts/type/Selector.sol/SelectorSetLib.json +2 -2
  267. package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
  268. package/artifacts/contracts/type/StateId.sol/StateIdLib.json +2 -2
  269. package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
  270. package/artifacts/contracts/type/String.sol/StrLib.json +2 -2
  271. package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
  272. package/artifacts/contracts/type/Timestamp.sol/TimestampLib.json +23 -4
  273. package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +1 -1
  274. package/artifacts/contracts/type/UFixed.sol/MathLib.json +9 -3
  275. package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
  276. package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +39 -2
  277. package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
  278. package/artifacts/contracts/type/Version.sol/VersionLib.json +2 -2
  279. package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
  280. package/artifacts/contracts/type/Version.sol/VersionPartLib.json +21 -2
  281. package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +4 -0
  282. package/artifacts/contracts/{shared → upgradeability}/IVersionable.sol/IVersionable.json +1 -1
  283. package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +4 -0
  284. package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +617 -0
  285. package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
  286. package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
  287. package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +4 -0
  288. package/artifacts/contracts/{shared → upgradeability}/Versionable.sol/Versionable.json +1 -1
  289. package/contracts/authorization/AccessAdmin.sol +8 -39
  290. package/contracts/authorization/AccessManagerCloneable.sol +16 -0
  291. package/contracts/authorization/Authorization.sol +0 -1
  292. package/contracts/authorization/IServiceAuthorization.sol +3 -0
  293. package/contracts/authorization/ModuleAuthorization.sol +0 -125
  294. package/contracts/authorization/ServiceAuthorization.sol +4 -0
  295. package/contracts/distribution/BasicDistribution.sol +4 -15
  296. package/contracts/distribution/BasicDistributionAuthorization.sol +5 -1
  297. package/contracts/distribution/Distribution.sol +22 -10
  298. package/contracts/distribution/DistributionService.sol +67 -34
  299. package/contracts/distribution/DistributionServiceManager.sol +2 -5
  300. package/contracts/distribution/IDistributionComponent.sol +8 -34
  301. package/contracts/distribution/IDistributionService.sol +18 -2
  302. package/contracts/instance/{BundleManager.sol → BundleSet.sol} +23 -23
  303. package/contracts/instance/IInstance.sol +12 -35
  304. package/contracts/instance/IInstanceService.sol +6 -5
  305. package/contracts/instance/Instance.sol +15 -79
  306. package/contracts/instance/InstanceAdmin.sol +220 -269
  307. package/contracts/instance/InstanceAuthorizationV3.sol +19 -28
  308. package/contracts/instance/InstanceReader.sol +32 -12
  309. package/contracts/instance/InstanceService.sol +73 -122
  310. package/contracts/instance/InstanceServiceManager.sol +2 -6
  311. package/contracts/instance/InstanceStore.sol +18 -4
  312. package/contracts/instance/base/ObjectLifecycle.sol +111 -0
  313. package/contracts/instance/base/{ObjectManager.sol → ObjectSet.sol} +5 -5
  314. package/contracts/instance/module/IBundle.sol +1 -1
  315. package/contracts/instance/module/IComponents.sol +1 -7
  316. package/contracts/instance/module/IDistribution.sol +0 -1
  317. package/contracts/instance/module/IPolicy.sol +22 -22
  318. package/contracts/mock/Dip.sol +1 -1
  319. package/contracts/oracle/IOracleComponent.sol +2 -1
  320. package/contracts/oracle/Oracle.sol +16 -6
  321. package/contracts/oracle/OracleService.sol +1 -0
  322. package/contracts/oracle/OracleServiceManager.sol +2 -5
  323. package/contracts/pool/BasicPool.sol +7 -5
  324. package/contracts/pool/BasicPoolAuthorization.sol +11 -2
  325. package/contracts/pool/BundleService.sol +189 -47
  326. package/contracts/pool/BundleServiceManager.sol +2 -5
  327. package/contracts/pool/IBundleService.sol +33 -5
  328. package/contracts/pool/IPoolComponent.sol +6 -0
  329. package/contracts/pool/IPoolService.sol +36 -26
  330. package/contracts/pool/Pool.sol +39 -24
  331. package/contracts/pool/PoolService.sol +161 -104
  332. package/contracts/pool/PoolServiceManager.sol +2 -5
  333. package/contracts/product/ApplicationService.sol +51 -57
  334. package/contracts/product/ApplicationServiceManager.sol +2 -2
  335. package/contracts/product/BasicProduct.sol +3 -32
  336. package/contracts/product/BasicProductAuthorization.sol +3 -0
  337. package/contracts/product/ClaimService.sol +118 -73
  338. package/contracts/product/ClaimServiceManager.sol +2 -2
  339. package/contracts/product/IApplicationService.sol +1 -0
  340. package/contracts/product/IClaimService.sol +28 -5
  341. package/contracts/product/IPolicyService.sol +27 -32
  342. package/contracts/product/IPricingService.sol +7 -7
  343. package/contracts/product/IProductComponent.sol +1 -1
  344. package/contracts/product/{IProductService.sol → IRiskService.sol} +1 -1
  345. package/contracts/product/PolicyService.sol +278 -180
  346. package/contracts/product/PolicyServiceManager.sol +2 -5
  347. package/contracts/product/PricingService.sol +42 -41
  348. package/contracts/product/PricingServiceManager.sol +2 -5
  349. package/contracts/product/Product.sol +67 -34
  350. package/contracts/product/{ProductService.sol → RiskService.sol} +10 -37
  351. package/contracts/product/RiskServiceManager.sol +39 -0
  352. package/contracts/registry/IRegistry.sol +27 -17
  353. package/contracts/registry/IRegistryService.sol +6 -6
  354. package/contracts/registry/Registry.sol +81 -87
  355. package/contracts/registry/RegistryAdmin.sol +34 -23
  356. package/contracts/registry/RegistryService.sol +4 -18
  357. package/contracts/registry/RegistryServiceManager.sol +2 -2
  358. package/contracts/registry/ReleaseLifecycle.sol +27 -0
  359. package/contracts/registry/{ReleaseManager.sol → ReleaseRegistry.sol} +149 -194
  360. package/contracts/registry/ServiceAuthorizationV3.sol +7 -10
  361. package/contracts/registry/TokenRegistry.sol +2 -2
  362. package/contracts/shared/Component.sol +25 -38
  363. package/contracts/shared/ComponentService.sol +84 -69
  364. package/contracts/shared/ComponentServiceManager.sol +2 -2
  365. package/contracts/shared/ComponentVerifyingService.sol +1 -1
  366. package/contracts/shared/IComponent.sol +4 -4
  367. package/contracts/shared/IComponentService.sol +15 -9
  368. package/contracts/shared/IInstanceLinkedComponent.sol +9 -10
  369. package/contracts/shared/IKeyValueStore.sol +1 -0
  370. package/contracts/shared/ILifecycle.sol +1 -2
  371. package/contracts/shared/IService.sol +1 -1
  372. package/contracts/shared/{ERC165.sol → InitializableERC165.sol} +1 -1
  373. package/contracts/shared/InstanceLinkedComponent.sol +22 -2
  374. package/contracts/shared/KeyValueStore.sol +6 -2
  375. package/contracts/shared/Lifecycle.sol +16 -69
  376. package/contracts/shared/{NftIdSetManager.sol → NftIdSet.sol} +1 -1
  377. package/contracts/shared/NftOwnable.sol +3 -3
  378. package/contracts/shared/PolicyHolder.sol +2 -5
  379. package/contracts/shared/Service.sol +3 -4
  380. package/contracts/shared/TokenHandler.sol +100 -19
  381. package/contracts/shared/TokenHandlerDeployerLib.sol +12 -0
  382. package/contracts/staking/IStaking.sol +3 -3
  383. package/contracts/staking/IStakingService.sol +12 -5
  384. package/contracts/staking/StakeManagerLib.sol +18 -25
  385. package/contracts/staking/Staking.sol +24 -39
  386. package/contracts/staking/StakingLifecycle.sol +23 -0
  387. package/contracts/staking/StakingManager.sol +2 -6
  388. package/contracts/staking/StakingReader.sol +12 -16
  389. package/contracts/staking/StakingService.sol +8 -12
  390. package/contracts/staking/StakingServiceManager.sol +2 -2
  391. package/contracts/staking/StakingStore.sol +15 -23
  392. package/contracts/staking/TargetManagerLib.sol +7 -3
  393. package/contracts/type/Amount.sol +12 -5
  394. package/contracts/type/Blocknumber.sol +7 -1
  395. package/contracts/type/ObjectType.sol +18 -18
  396. package/contracts/type/Referral.sol +1 -0
  397. package/contracts/type/RoleId.sol +10 -38
  398. package/contracts/type/Seconds.sol +21 -1
  399. package/contracts/type/StateId.sol +1 -0
  400. package/contracts/type/Timestamp.sol +11 -1
  401. package/contracts/type/UFixed.sol +29 -10
  402. package/contracts/type/Version.sol +3 -1
  403. package/contracts/{shared → upgradeability}/ProxyManager.sol +3 -4
  404. package/contracts/{shared → upgradeability}/UpgradableProxyWithAdmin.sol +1 -3
  405. package/package.json +3 -3
  406. package/artifacts/contracts/authorization/InstanceAdmin.sol/InstanceAdmin.dbg.json +0 -4
  407. package/artifacts/contracts/authorization/InstanceAdmin.sol/InstanceAdmin.json +0 -1385
  408. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +0 -4
  409. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +0 -703
  410. package/artifacts/contracts/instance/InstanceAdminNew.sol/InstanceAdminNew.dbg.json +0 -4
  411. package/artifacts/contracts/instance/InstanceAdminNew.sol/InstanceAdminNew.json +0 -1616
  412. package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.dbg.json +0 -4
  413. package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.json +0 -228
  414. package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.dbg.json +0 -4
  415. package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.json +0 -181
  416. package/artifacts/contracts/product/IProductService.sol/IProductService.dbg.json +0 -4
  417. package/artifacts/contracts/product/ProductService.sol/ProductService.dbg.json +0 -4
  418. package/artifacts/contracts/product/ProductService.sol/ProductService.json +0 -708
  419. package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.dbg.json +0 -4
  420. package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.json +0 -702
  421. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +0 -4
  422. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +0 -1237
  423. package/artifacts/contracts/shared/AccessManagerCustom.sol/AccessManagerCustom.dbg.json +0 -4
  424. package/artifacts/contracts/shared/AccessManagerCustom.sol/AccessManagerCustom.json +0 -1193
  425. package/artifacts/contracts/shared/AccessManagerExtended.sol/AccessManagerExtended.dbg.json +0 -4
  426. package/artifacts/contracts/shared/AccessManagerExtended.sol/AccessManagerExtended.json +0 -1747
  427. package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.dbg.json +0 -4
  428. package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.json +0 -1760
  429. package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.dbg.json +0 -4
  430. package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.json +0 -1838
  431. package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.dbg.json +0 -4
  432. package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.json +0 -1856
  433. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +0 -4
  434. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +0 -73
  435. package/artifacts/contracts/shared/IAccessManagerExtended.sol/IAccessManagerExtended.dbg.json +0 -4
  436. package/artifacts/contracts/shared/IAccessManagerExtended.sol/IAccessManagerExtended.json +0 -1562
  437. package/artifacts/contracts/shared/IAccessManagerExtendedWithDisable.sol/IAccessManagerExtendedWithDisable.dbg.json +0 -4
  438. package/artifacts/contracts/shared/IAccessManagerExtendedWithDisable.sol/IAccessManagerExtendedWithDisable.json +0 -1600
  439. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +0 -4
  440. package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.dbg.json +0 -4
  441. package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.json +0 -306
  442. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +0 -4
  443. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +0 -617
  444. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +0 -4
  445. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +0 -129
  446. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +0 -4
  447. package/contracts/authorization/InstanceAdmin.sol +0 -108
  448. package/contracts/instance/InstanceAdminNew.sol +0 -261
  449. package/contracts/instance/InstanceAuthorizationsLib.sol +0 -422
  450. package/contracts/product/ProductServiceManager.sol +0 -42
  451. package/contracts/shared/AccessManagerCustom.sol +0 -741
  452. package/contracts/shared/AccessManagerExtended.sol +0 -481
  453. package/contracts/shared/AccessManagerExtendedInitializeable.sol +0 -13
  454. package/contracts/shared/AccessManagerExtendedWithDisable.sol +0 -137
  455. package/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol +0 -14
  456. package/contracts/shared/IAccessManagerExtended.sol +0 -74
  457. package/contracts/shared/IAccessManagerExtendedWithDisable.sol +0 -18
  458. /package/contracts/{shared → upgradeability}/IVersionable.sol +0 -0
  459. /package/contracts/{shared → upgradeability}/Versionable.sol +0 -0
@@ -0,0 +1,27 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.20;
3
+
4
+ import {RELEASE} from "../type/ObjectType.sol";
5
+ import {SCHEDULED, DEPLOYING, ACTIVE, PAUSED, CLOSED/*, FREE*/} from "../type/StateId.sol";
6
+ import {Lifecycle} from "../shared/Lifecycle.sol";
7
+
8
+ contract ReleaseLifecycle is
9
+ Lifecycle
10
+ {
11
+ constructor() {
12
+ _setupLifecycle();
13
+ }
14
+
15
+ function _setupLifecycle()
16
+ internal
17
+ override
18
+ {
19
+ setInitialState(RELEASE(), SCHEDULED());
20
+
21
+ setStateTransition(RELEASE(), SCHEDULED(), DEPLOYING());
22
+ setStateTransition(RELEASE(), DEPLOYING(), DEPLOYING());
23
+ setStateTransition(RELEASE(), DEPLOYING(), ACTIVE());
24
+ setStateTransition(RELEASE(), ACTIVE(), PAUSED());
25
+ setStateTransition(RELEASE(), PAUSED(), ACTIVE());
26
+ }
27
+ }
@@ -14,11 +14,10 @@ import {ObjectType, ObjectTypeLib, POOL, RELEASE, REGISTRY, SERVICE, STAKING} fr
14
14
  import {Version, VersionLib, VersionPart, VersionPartLib} from "../type/Version.sol";
15
15
  import {Timestamp, TimestampLib, zeroTimestamp, ltTimestamp} from "../type/Timestamp.sol";
16
16
  import {Seconds, SecondsLib} from "../type/Seconds.sol";
17
- import {StateId, INITIAL, SCHEDULED, DEPLOYING, ACTIVE} from "../type/StateId.sol";
17
+ import {StateId, INITIAL, SCHEDULED, DEPLOYING, ACTIVE, PAUSED, CLOSED} from "../type/StateId.sol";
18
18
  import {Version, VersionLib, VersionPart, VersionPartLib} from "../type/Version.sol";
19
19
 
20
20
  import {IService} from "../shared/IService.sol";
21
- import {AccessManagerExtendedWithDisableInitializeable} from "../shared/AccessManagerExtendedWithDisableInitializeable.sol";
22
21
  import {ILifecycle} from "../shared/ILifecycle.sol";
23
22
  import {INftOwnable} from "../shared/INftOwnable.sol";
24
23
  import {IRegisterable} from "../shared/IRegisterable.sol";
@@ -31,126 +30,112 @@ import {IAccessAdmin} from "../authorization/IAccessAdmin.sol";
31
30
  import {RegistryAdmin} from "./RegistryAdmin.sol";
32
31
  import {Registry} from "./Registry.sol";
33
32
  import {TokenRegistry} from "./TokenRegistry.sol";
33
+ import {ReleaseLifecycle} from "./ReleaseLifecycle.sol";
34
34
 
35
- // TODO rename to something that does not end with 'Manager'
36
- // everywhere else *Manager points to an upgradeable contract
37
- contract ReleaseManager is
38
- AccessManaged,
39
- ILifecycle,
35
+ contract ReleaseRegistry is
36
+ AccessManaged,
37
+ ReleaseLifecycle,
40
38
  IRegistryLinked
41
39
  {
42
40
  using ObjectTypeLib for ObjectType;
43
41
 
44
42
  uint256 public constant INITIAL_GIF_VERSION = 3;
45
43
 
46
- event LogReleaseCreation(VersionPart version, bytes32 salt, address authority);
44
+ event LogReleaseCreation(VersionPart version, bytes32 salt);
47
45
  event LogReleaseActivation(VersionPart version);
46
+ event LogReleaseDisabled(VersionPart version);
47
+ event LogReleaseEnabled(VersionPart version);
48
48
 
49
49
  // constructor
50
- error ErrorReleaseManagerNotRegistry(Registry registry);
50
+ error ErrorReleaseRegistryNotRegistry(Registry registry);
51
51
 
52
52
  // createNextRelease
53
- error ErrorReleaseManagerReleaseCreationDisallowed(StateId currentStateId);
53
+ error ErrorReleaseRegistryReleaseCreationDisallowed(VersionPart version, StateId currentStateId);
54
54
 
55
55
  // prepareRelease
56
- error ErrorReleaseManagerReleasePreparationDisallowed(StateId currentStateId);
57
- error ErrorReleaseManagerReleaseAlreadyPrepared(VersionPart version);
58
- error ErrorReleaseManagerVersionMismatch(VersionPart expectedVersion, VersionPart providedVersion);
59
- error ErrorReleaseManagerNoDomains(VersionPart version);
60
-
61
- // register staking
62
- //error ErrorReleaseManagerStakingAlreadySet(address stakingAddress);
56
+ error ErrorReleaseRegistryReleasePreparationDisallowed(VersionPart version, StateId currentStateId);
57
+ error ErrorReleaseRegistryReleaseAlreadyPrepared(VersionPart version, StateId currentStateId);
58
+ error ErrorReleaseRegistryVersionMismatch(VersionPart expected, VersionPart actual);
59
+ error ErrorReleaseRegistryNoDomains(VersionPart version);
63
60
 
64
61
  // registerService
65
- error ErrorReleaseManagerNoServiceRegistrationExpected();
66
- error ErrorReleaseManagerServiceRegistrationDisallowed(StateId currentStateId);
67
- error ErrorReleaseManagerServiceDomainMismatch(ObjectType expectedDomain, ObjectType actualDomain);
68
- error ErrorReleaseManagerNotService(IService service);
69
- error ErrorReleaseManagerServiceAddressInvalid(IService given, address expected);
62
+ error ErrorReleaseRegistryNoServiceRegistrationExpected();
63
+ error ErrorReleaseRegistryServiceRegistrationDisallowed(StateId currentStateId);
64
+ error ErrorReleaseRegistryServiceDomainMismatch(ObjectType expectedDomain, ObjectType actualDomain);
65
+ error ErrorReleaseRegistryNotService(address notService);
66
+ error ErrorReleaseRegistryServiceAddressMismatch(address expected, address actual);
70
67
 
71
68
  // activateNextRelease
72
- error ErrorReleaseManagerReleaseActivationDisallowed(StateId currentStateId);
73
- error ErrorReleaseManagerReleaseNotCreated(VersionPart releaseVersion);
74
- error ErrorReleaseManagerReleaseRegistrationNotFinished(VersionPart releaseVersion, uint awaitingRegistration);
75
- error ErrorReleaseManagerReleaseAlreadyActivated(VersionPart releaseVersion);
69
+ error ErrorReleaseRegistryReleaseActivationDisallowed(VersionPart releaseVersion, StateId currentStateId);
70
+ error ErrorReleaseRegistryReleaseNotCreated(VersionPart releaseVersion);
71
+ error ErrorReleaseRegistryReleaseRegistrationNotFinished(VersionPart releaseVersion, uint awaitingRegistration);
72
+ error ErrorReleaseRegistryReleaseAlreadyActivated(VersionPart releaseVersion);
76
73
 
77
74
  // disableRelease
78
- error ErrorReleaseManagerReleaseNotActivated(VersionPart releaseVersion);
79
- error ErrorReleaseManagerReleaseAlreadyDisabled(VersionPart releaseVersion);
75
+ error ErrorReleaseRegistryReleaseNotActivated(VersionPart releaseVersion);
76
+ error ErrorReleaseRegistryReleaseAlreadyDisabled(VersionPart releaseVersion);
80
77
 
81
78
  // _verifyService
82
- error ErrorReleaseManagerServiceReleaseAuthorityMismatch(IService service, address serviceAuthority, address releaseAuthority);
83
- error ErrorReleaseManagerServiceReleaseVersionMismatch(IService service, VersionPart serviceVersion, VersionPart releaseVersion);
79
+ error ErrorReleaseRegistryServiceReleaseAuthorityMismatch(IService service, address serviceAuthority, address releaseAuthority);
80
+ error ErrorReleaseRegistryServiceReleaseVersionMismatch(IService service, VersionPart serviceVersion, VersionPart releaseVersion);
84
81
 
85
82
  // _verifyServiceInfo
86
- error ErrorReleaseManagerServiceInfoAddressInvalid(IService service, address expected);
87
- error ErrorReleaseManagerServiceInfoInterceptorInvalid(IService service, bool isInterceptor);
88
- error ErrorReleaseManagerServiceInfoTypeInvalid(IService service, ObjectType expected, ObjectType found);
89
- error ErrorReleaseManagerServiceInfoOwnerInvalid(IService service, address expected, address found);
90
- error ErrorReleaseManagerServiceSelfRegistration(IService service);
91
- error ErrorReleaseManagerServiceOwnerRegistered(IService service, address owner);
83
+ error ErrorReleaseRegistryServiceInfoAddressInvalid(IService service, address expected);
84
+ error ErrorReleaseRegistryServiceInfoInterceptorInvalid(IService service, bool isInterceptor);
85
+ error ErrorReleaseRegistryServiceInfoTypeInvalid(IService service, ObjectType expected, ObjectType found);
86
+ error ErrorReleaseRegistryServiceInfoOwnerInvalid(IService service, address expected, address found);
87
+ error ErrorReleaseRegistryServiceSelfRegistration(IService service);
88
+ error ErrorReleaseRegistryServiceOwnerRegistered(IService service, address owner);
92
89
 
93
90
  Seconds public constant MIN_DISABLE_DELAY = Seconds.wrap(60 * 24 * 365); // 1 year
94
91
 
95
92
  RegistryAdmin public immutable _admin;
96
- address public immutable _releaseAccessManagerCodeAddress;
97
93
  Registry public immutable _registry;
98
94
  IRegisterable private _staking;
99
95
  address private _stakingOwner;
100
96
 
101
- // TODO remove once it's clear that release authority will always be registry authority
102
- mapping(VersionPart version => address authority) internal _releaseAccessManager;
103
97
  mapping(VersionPart version => IRegistry.ReleaseInfo info) internal _releaseInfo;
104
- mapping(address registryService => VersionPart version) _releaseVersionByAddress;
105
-
106
98
  mapping(VersionPart version => IServiceAuthorization authz) internal _serviceAuthorization;
107
99
 
108
- VersionPart immutable internal _initial;// first active version
100
+ // TODO check where/why this is used
101
+ mapping(address registryService => VersionPart version) _releaseVersionByAddress;
102
+
103
+ VersionPart private _initial;// first active version
109
104
  VersionPart internal _latest; // latest active version
110
105
  VersionPart internal _next; // version to create and activate
111
- StateId internal _state; // current state of release manager
106
+ mapping(VersionPart verson => StateId releaseState) private _state;
112
107
 
113
108
  uint256 internal _registeredServices;
114
109
  uint256 internal _servicesToRegister;
115
110
 
116
- // deployer of this contract must be gif admin
117
111
  constructor(Registry registry)
118
112
  AccessManaged(msg.sender)
119
113
  {
120
114
  // TODO move this part to RegistryLinked constructor
121
115
  if(!_isRegistry(address(registry))) {
122
- revert ErrorReleaseManagerNotRegistry(registry);
116
+ revert ErrorReleaseRegistryNotRegistry(registry);
123
117
  }
124
118
 
119
+ setAuthority(registry.getAuthority());
120
+
125
121
  _registry = registry;
126
- setAuthority(_registry.getAuthority());
127
122
  _admin = RegistryAdmin(_registry.getRegistryAdminAddress());
128
123
 
129
124
  _initial = VersionPartLib.toVersionPart(INITIAL_GIF_VERSION);
130
125
  _next = VersionPartLib.toVersionPart(INITIAL_GIF_VERSION - 1);
131
- _state = getInitialState(RELEASE());
132
-
133
- AccessManagerExtendedWithDisableInitializeable masterReleaseAccessManager = new AccessManagerExtendedWithDisableInitializeable();
134
- masterReleaseAccessManager.initialize(_registry.NFT_LOCK_ADDRESS(), VersionLib.toVersionPart(0));
135
- //masterReleaseAccessManager.disable();
136
- _releaseAccessManagerCodeAddress = address(masterReleaseAccessManager);
137
126
  }
138
127
 
139
128
  /// @dev skips previous release if was not activated
140
- /// sets release manager into state SCHEDULED
129
+ /// sets next release into state SCHEDULED
141
130
  function createNextRelease()
142
131
  external
143
132
  restricted() // GIF_ADMIN_ROLE
144
133
  returns(VersionPart)
145
134
  {
146
- if (!isValidTransition(RELEASE(), _state, SCHEDULED())) {
147
- revert ErrorReleaseManagerReleaseCreationDisallowed(_state);
148
- }
149
-
150
135
  _next = VersionPartLib.toVersionPart(_next.toInt() + 1);
151
136
  _servicesToRegister = 0;
152
137
  _registeredServices = 0;
153
- _state = SCHEDULED();
138
+ _state[_next] = getInitialState(RELEASE());
154
139
 
155
140
  return _next;
156
141
  }
@@ -167,97 +152,98 @@ contract ReleaseManager is
167
152
  bytes32 releaseSalt
168
153
  )
169
154
  {
170
- // verify release manager is in proper state to start deploying a next release
171
- if (!isValidTransition(RELEASE(), _state, DEPLOYING())) {
172
- revert ErrorReleaseManagerReleasePreparationDisallowed(_state);
173
- }
155
+ authority = _admin.authority();
156
+ version = _next;
174
157
 
175
- // verify prepareNextRelease is only called once per release
176
- if(_servicesToRegister > 0) {
177
- revert ErrorReleaseManagerReleaseAlreadyPrepared(version);
158
+ // ensures unique salt
159
+ // TODO CreateX have clones capability also
160
+ // what would releaseSalt look like if used with CreateX in pemissioned mode?
161
+ releaseSalt = keccak256(
162
+ bytes.concat(
163
+ bytes32(version.toInt()),
164
+ salt));
165
+
166
+ // verify release in state SCHEDULED
167
+ if (!isValidTransition(RELEASE(), _state[version], DEPLOYING())) {
168
+ revert ErrorReleaseRegistryReleasePreparationDisallowed(version, _state[version]);
178
169
  }
179
170
 
171
+ _state[version] = DEPLOYING();
172
+
180
173
  // verify authorizaion contract release matches with expected version
181
174
  VersionPart releaseVersion = serviceAuthorization.getRelease();
182
- if (releaseVersion != _next) {
183
- revert ErrorReleaseManagerVersionMismatch(_next, releaseVersion);
175
+ if (releaseVersion != version) {
176
+ revert ErrorReleaseRegistryVersionMismatch(version, releaseVersion);
184
177
  }
185
178
 
179
+
186
180
  // sanity check to ensure service domain list is not empty
187
181
  uint256 serviceDomainsCount = serviceAuthorization.getServiceDomains().length;
188
182
  if (serviceDomainsCount == 0) {
189
- revert ErrorReleaseManagerNoDomains(_next);
183
+ revert ErrorReleaseRegistryNoDomains(version);
190
184
  }
191
185
 
192
- _state = DEPLOYING();
193
- _servicesToRegister = serviceDomainsCount;
194
-
195
- // store release specific service authorization
196
- authority = _admin.authority();
197
- _serviceAuthorization[_next] = serviceAuthorization;
198
- // TODO refactor: authority no longer release specific
199
- _releaseAccessManager[_next] = authority;
186
+ // verify prepareNextRelease is only called once per release
187
+ if(_servicesToRegister > 0) {
188
+ revert ErrorReleaseRegistryReleaseAlreadyPrepared(version, _state[version]);
189
+ }
200
190
 
201
- // ensures unique salt
202
- releaseSalt = keccak256(
203
- bytes.concat(
204
- bytes32(version.toInt()),
205
- salt));
191
+ _servicesToRegister = serviceDomainsCount;
192
+ _serviceAuthorization[version] = serviceAuthorization;
206
193
 
207
- emit LogReleaseCreation(version, releaseSalt, authority);
194
+ emit LogReleaseCreation(version, releaseSalt);
208
195
  }
209
196
 
210
-
197
+ // TODO this function can have 0 args -> use stored addresses from prepareNextRelease()
211
198
  function registerService(IService service)
212
199
  external
213
200
  restricted // GIF_MANAGER_ROLE
214
201
  returns(NftId nftId)
215
202
  {
216
- // TODO is it usefull to check transition from A to A?
217
- if (!isValidTransition(RELEASE(), _state, DEPLOYING())) {
218
- revert ErrorReleaseManagerServiceRegistrationDisallowed(_state);
203
+ VersionPart releaseVersion = _next;
204
+ StateId state = _state[releaseVersion];
205
+
206
+ // verify release in state DEPLOYING
207
+ if (!isValidTransition(RELEASE(), state, DEPLOYING())) {
208
+ // TOOD name must represent failed state transition
209
+ revert ErrorReleaseRegistryServiceRegistrationDisallowed(state);
219
210
  }
220
211
 
212
+ _state[releaseVersion] = DEPLOYING();
213
+
214
+ // not all services are registered
221
215
  if (_servicesToRegister == _registeredServices) {
222
- revert ErrorReleaseManagerNoServiceRegistrationExpected();
216
+ revert ErrorReleaseRegistryNoServiceRegistrationExpected();
223
217
  }
224
218
 
219
+ // service can work with release manager
225
220
  (
226
221
  IRegistry.ObjectInfo memory info,
227
- ObjectType domain,
228
- VersionPart version
222
+ ObjectType serviceDomain,
223
+ VersionPart serviceVersion
229
224
  ) = _verifyService(service);
230
225
 
231
- ObjectType expectedDomain = _serviceAuthorization[version].getServiceDomains()[_registeredServices];
232
- if (service.getDomain() != expectedDomain) {
233
- revert ErrorReleaseManagerServiceDomainMismatch(expectedDomain, service.getDomain());
226
+ // service domain matches defined in release config
227
+ ObjectType expectedDomain = _serviceAuthorization[releaseVersion].getServiceDomain(_registeredServices);
228
+ if (serviceDomain != expectedDomain) {
229
+ revert ErrorReleaseRegistryServiceDomainMismatch(expectedDomain, serviceDomain);
234
230
  }
235
231
 
236
- // checked in registry
237
- _releaseInfo[version].domains.push(domain);
238
-
239
232
  // register service with registry
240
- nftId = _registry.registerService(info, version, domain);
241
- _registeredServices++;
242
-
233
+ nftId = _registry.registerService(info, serviceVersion, serviceDomain);
243
234
  service.linkToRegisteredNftId();
235
+ _registeredServices++;
244
236
 
245
237
  // setup service authorization
246
238
  _admin.authorizeService(
247
- _serviceAuthorization[version],
239
+ _serviceAuthorization[releaseVersion],
248
240
  service);
249
241
 
250
242
  // TODO consider to extend this to REGISTRY
251
243
  // special roles for registry/staking/pool service
252
- if (domain == STAKING() || domain == POOL()) {
244
+ if (serviceDomain == STAKING() || serviceDomain == POOL()) {
253
245
  // TODO rename to grantServiceDomainRole()
254
- _admin.grantServiceRoleForAllVersions(service, domain);
255
- }
256
-
257
- if (_registeredServices < _servicesToRegister) {
258
- _state = DEPLOYING();
259
- } else {
260
- // TODO end state depends on (_awaitingRegistration == 0)
246
+ _admin.grantServiceRoleForAllVersions(service, serviceDomain);
261
247
  }
262
248
  }
263
249
 
@@ -266,29 +252,28 @@ contract ReleaseManager is
266
252
  external
267
253
  restricted // GIF_ADMIN_ROLE
268
254
  {
269
- if (!isValidTransition(RELEASE(), _state, ACTIVE())) {
270
- revert ErrorReleaseManagerReleaseActivationDisallowed(_state);
255
+ VersionPart version = _next;
256
+ StateId state = _state[version];
257
+ StateId newState = ACTIVE();
258
+
259
+ // verify release in state DEPLOYING
260
+ if (!isValidTransition(RELEASE(), state, newState)) {
261
+ revert ErrorReleaseRegistryReleaseActivationDisallowed(version, state);
271
262
  }
272
263
 
273
264
  // release fully deployed
274
- VersionPart version = _next;
275
265
  if(_registeredServices < _servicesToRegister) {
276
- revert ErrorReleaseManagerReleaseRegistrationNotFinished(version, _servicesToRegister - _registeredServices);
266
+ revert ErrorReleaseRegistryReleaseRegistrationNotFinished(version, _servicesToRegister - _registeredServices);
277
267
  }
278
268
 
279
269
  // release exists, registry service MUST exist
280
270
  address service = _registry.getServiceAddress(REGISTRY(), version);
281
271
  if(service == address(0)) {
282
- revert ErrorReleaseManagerReleaseNotCreated(version);
283
- }
284
-
285
- // release is not activated
286
- if(_releaseInfo[version].activatedAt.gtz()) {
287
- revert ErrorReleaseManagerReleaseAlreadyActivated(version);
272
+ revert ErrorReleaseRegistryReleaseNotCreated(version);
288
273
  }
289
274
 
290
275
  _latest = version;
291
- _state = ACTIVE();
276
+ _state[version] = newState;
292
277
 
293
278
  _releaseVersionByAddress[service] = version;
294
279
  _releaseInfo[version].activatedAt = TimestampLib.blockTimestamp();
@@ -296,43 +281,49 @@ contract ReleaseManager is
296
281
  emit LogReleaseActivation(version);
297
282
  }
298
283
 
299
- // release becomes disabled after delay expiration (can be reenabled before that)
300
- function disableRelease(VersionPart version, Seconds disableDelay)
284
+ /// @dev stop all operations with release services
285
+ function pauseRelease(VersionPart version)
301
286
  external
302
287
  restricted // GIF_ADMIN_ROLE
303
288
  {
304
- // release was activated
305
- if(_releaseInfo[version].activatedAt.eqz()) {
306
- revert ErrorReleaseManagerReleaseNotActivated(version);
307
- }
289
+ StateId state = _state[version];
290
+ StateId newState = PAUSED();
308
291
 
309
- // release not disabled already
310
- if(_releaseInfo[version].disabledAt.gtz()) {
311
- revert ErrorReleaseManagerReleaseAlreadyDisabled(version);
292
+ // verify release in state ACTIVE
293
+ if (!isValidTransition(RELEASE(), state, newState)) {
294
+ revert ErrorReleaseRegistryReleaseActivationDisallowed(version, state);
312
295
  }
313
296
 
314
- disableDelay = SecondsLib.toSeconds(Math.max(disableDelay.toInt(), MIN_DISABLE_DELAY.toInt()));
315
-
316
297
  // TODO come up with a substitute
317
- // _releaseAccessManager[version].disable(disableDelay);
298
+ //_releaseAccessManager[version].disable();
318
299
 
319
- _releaseInfo[version].disabledAt = TimestampLib.blockTimestamp().addSeconds(disableDelay);
300
+ _state[version] = newState;
301
+ _releaseInfo[version].disabledAt = TimestampLib.blockTimestamp();
302
+
303
+ emit LogReleaseDisabled(version);
320
304
  }
321
-
322
- function enableRelease(VersionPart version)
305
+
306
+ // TODO consider revert if some delay is expired -> becomes disabled automatically
307
+ /// @dev resume operations with release services
308
+ function unpauseRelease(VersionPart version)
323
309
  external
324
310
  restricted // GIF_ADMIN_ROLE
325
311
  {
326
- // release was disabled
327
- //if(_releaseInfo[version].disabledAt.eqz()) {
328
- // revert ErrorReleaseManagerReleaseAlreadyEnabled(version);
329
- //}
312
+ StateId state = _state[version];
313
+ StateId newState = ACTIVE();
314
+
315
+ // verify release in state PAUSED
316
+ if (!isValidTransition(RELEASE(), state, newState)) {
317
+ revert ErrorReleaseRegistryReleaseActivationDisallowed(version, state);
318
+ }
330
319
 
331
- // reverts if disable delay expired
332
320
  // TODO come up with a substitute
333
321
  // _releaseAccessManager[version].enable();
334
322
 
323
+ _state[version] = newState;
335
324
  _releaseInfo[version].disabledAt = zeroTimestamp();
325
+
326
+ emit LogReleaseEnabled(version);
336
327
  }
337
328
 
338
329
  //--- view functions ----------------------------------------------------//
@@ -351,7 +342,7 @@ contract ReleaseManager is
351
342
  }
352
343
 
353
344
  function isActiveRelease(VersionPart version) public view returns(bool) {
354
- return _releaseInfo[version].activatedAt.gtz();
345
+ return _state[version] == ACTIVE();
355
346
  }
356
347
 
357
348
  function getReleaseInfo(VersionPart version) external view returns(IRegistry.ReleaseInfo memory) {
@@ -370,19 +361,14 @@ contract ReleaseManager is
370
361
  return _initial;
371
362
  }
372
363
 
373
- function getState() external view returns (StateId stateId) {
374
- return _state;
364
+ function getState(VersionPart version) external view returns (StateId stateId) {
365
+ return _state[version];
375
366
  }
376
367
 
377
368
  function getRemainingServicesToRegister() external view returns (uint256 services) {
378
369
  return _servicesToRegister - _registeredServices;
379
370
  }
380
371
 
381
- // TODO cleanup
382
- function getReleaseAccessManager(VersionPart version) external view returns(AccessManagerExtendedWithDisableInitializeable) {
383
- // return _releaseAccessManager[version];
384
- }
385
-
386
372
  function getServiceAuthorization(VersionPart version)
387
373
  external
388
374
  view
@@ -391,7 +377,6 @@ contract ReleaseManager is
391
377
  return _serviceAuthorization[version];
392
378
  }
393
379
 
394
- // TODO token registry knows nothing about adfmin, only registry
395
380
  function getRegistryAdmin() external view returns (address) {
396
381
  return address(_admin);
397
382
  }
@@ -402,37 +387,6 @@ contract ReleaseManager is
402
387
  return _registry;
403
388
  }
404
389
 
405
- //--- ILifecycle -----------------------------------------------------------//
406
-
407
- function hasLifecycle(ObjectType objectType) external pure returns (bool) { return objectType == RELEASE(); }
408
-
409
- function getInitialState(ObjectType objectType) public pure returns (StateId stateId) {
410
- if (objectType == RELEASE()) {
411
- stateId = INITIAL();
412
- }
413
- }
414
-
415
- function isValidTransition(
416
- ObjectType objectType,
417
- StateId fromId,
418
- StateId toId
419
- )
420
- public
421
- pure
422
- returns (bool isValid)
423
- {
424
- if (objectType != RELEASE()) { return false; }
425
-
426
- if (fromId == INITIAL() && toId == SCHEDULED()) { return true; }
427
- if (fromId == SCHEDULED() && toId == DEPLOYING()) { return true; }
428
- if (fromId == DEPLOYING() && toId == SCHEDULED()) { return true; }
429
- if (fromId == DEPLOYING() && toId == DEPLOYING()) { return true; }
430
- if (fromId == DEPLOYING() && toId == ACTIVE()) { return true; }
431
- // TODO active -> scheduled missing, add tests to cover this and more scenarios (#358)
432
-
433
- return false;
434
- }
435
-
436
390
  //--- private functions ----------------------------------------------------//
437
391
 
438
392
  function _verifyService(IService service)
@@ -445,7 +399,7 @@ contract ReleaseManager is
445
399
  )
446
400
  {
447
401
  if(!service.supportsInterface(type(IService).interfaceId)) {
448
- revert ErrorReleaseManagerNotService(service);
402
+ revert ErrorReleaseRegistryNotService(address(service));
449
403
  }
450
404
 
451
405
  address owner = msg.sender;
@@ -456,19 +410,19 @@ contract ReleaseManager is
456
410
 
457
411
  _verifyServiceInfo(service, serviceInfo, owner);
458
412
 
459
- VersionPart releaseVersion = getNextVersion(); // never 0
460
- address releaseAuthority = address(_releaseAccessManager[releaseVersion]); // can be zero if registering service when release is not created
413
+ VersionPart releaseVersion = _next; // never 0
414
+ address expectedAuthority = _admin.authority(); // can be zero if registering service when release is not created
461
415
 
462
416
  // IMPORTANT: can not guarantee service access is actually controlled by authority
463
- if(serviceAuthority != releaseAuthority) {
464
- revert ErrorReleaseManagerServiceReleaseAuthorityMismatch(
417
+ if(serviceAuthority != expectedAuthority) {
418
+ revert ErrorReleaseRegistryServiceReleaseAuthorityMismatch(
465
419
  service,
466
420
  serviceAuthority,
467
- releaseAuthority);
421
+ expectedAuthority);
468
422
  }
469
423
 
470
424
  if(serviceVersion != releaseVersion) {
471
- revert ErrorReleaseManagerServiceReleaseVersionMismatch(
425
+ revert ErrorReleaseRegistryServiceReleaseVersionMismatch(
472
426
  service,
473
427
  serviceVersion,
474
428
  releaseVersion);
@@ -485,29 +439,29 @@ contract ReleaseManager is
485
439
  view
486
440
  {
487
441
  if(info.objectAddress != address(service)) {
488
- revert ErrorReleaseManagerServiceInfoAddressInvalid(service, address(service));
442
+ revert ErrorReleaseRegistryServiceInfoAddressInvalid(service, address(service));
489
443
  }
490
444
 
491
445
  if(info.isInterceptor != false) { // service is never interceptor
492
- revert ErrorReleaseManagerServiceInfoInterceptorInvalid(service, info.isInterceptor);
446
+ revert ErrorReleaseRegistryServiceInfoInterceptorInvalid(service, info.isInterceptor);
493
447
  }
494
448
 
495
- if(info.objectType != SERVICE()) {// type is checked in registry anyway...but service logic may depend on expected value
496
- revert ErrorReleaseManagerServiceInfoTypeInvalid(service, SERVICE(), info.objectType);
449
+ if(info.objectType != SERVICE()) {
450
+ revert ErrorReleaseRegistryServiceInfoTypeInvalid(service, SERVICE(), info.objectType);
497
451
  }
498
452
 
499
453
  address owner = info.initialOwner;
500
454
 
501
455
  if(owner != expectedOwner) { // registerable owner protection
502
- revert ErrorReleaseManagerServiceInfoOwnerInvalid(service, expectedOwner, owner);
456
+ revert ErrorReleaseRegistryServiceInfoOwnerInvalid(service, expectedOwner, owner);
503
457
  }
504
458
 
505
459
  if(owner == address(service)) {
506
- revert ErrorReleaseManagerServiceSelfRegistration(service);
460
+ revert ErrorReleaseRegistryServiceSelfRegistration(service);
507
461
  }
508
462
 
509
463
  if(_registry.isRegistered(owner)) {
510
- revert ErrorReleaseManagerServiceOwnerRegistered(service, owner);
464
+ revert ErrorReleaseRegistryServiceOwnerRegistered(service, owner);
511
465
  }
512
466
  }
513
467
 
@@ -519,12 +473,13 @@ contract ReleaseManager is
519
473
  return false;
520
474
  }
521
475
  // TODO try catch and return false in case of revert
522
- // a just panic
476
+ // or just panic
523
477
  // check if contract returns a zero nft id for its own address
524
- if (IRegistry(registryAddress).getNftId(registryAddress).eqz()) {
478
+ if (IRegistry(registryAddress).getNftIdForAddress(registryAddress).eqz()) {
525
479
  return false;
526
480
  }
527
481
 
528
482
  return true;
529
483
  }
530
484
  }
485
+