@etherisc/gif-next 0.0.2-ecbd488-936 → 0.0.2-edc084c-558

Sign up to get free protection for your applications and to get access to all the features.
Files changed (382) hide show
  1. package/README.md +71 -14
  2. package/artifacts/contracts/components/Component.sol/Component.dbg.json +4 -0
  3. package/artifacts/contracts/components/Component.sol/Component.json +842 -0
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +1 -1
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +941 -230
  6. package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +4 -0
  7. package/artifacts/contracts/{shared/RegisterableUpgradable.sol/RegisterableUpgradable.json → components/IComponent.sol/IComponent.json} +295 -132
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
  9. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +848 -31
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +864 -49
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +682 -9
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +825 -231
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +638 -190
  18. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.dbg.json +4 -0
  19. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.json +1206 -0
  20. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +4 -0
  21. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +778 -0
  22. package/artifacts/contracts/instance/Cloneable.sol/Cloneable.dbg.json +4 -0
  23. package/artifacts/contracts/instance/{AccessManagedSimple.sol/AccessManagedSimple.json → Cloneable.sol/Cloneable.json} +91 -2
  24. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  25. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +1833 -480
  26. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
  27. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +321 -168
  28. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  29. package/artifacts/contracts/instance/Instance.sol/Instance.json +943 -1206
  30. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
  31. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +593 -180
  32. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
  33. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +148 -247
  34. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
  35. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +509 -261
  36. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
  37. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +331 -98
  38. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +4 -0
  39. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +256 -0
  40. package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.dbg.json +4 -0
  41. package/artifacts/contracts/instance/base/{ComponentServiceBase.sol/ComponentServiceBase.json → ComponentService.sol/ComponentService.json} +247 -180
  42. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  43. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  44. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  45. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +40 -10
  46. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  47. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +36 -11
  48. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
  49. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +71 -45
  50. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
  51. package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +4 -0
  52. package/artifacts/contracts/instance/module/IComponents.sol/IComponents.json +10 -0
  53. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
  54. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
  55. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
  56. package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +1 -1
  57. package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +1 -1
  58. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.dbg.json +4 -0
  59. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.json +1039 -0
  60. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +4 -0
  61. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.json +673 -0
  62. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +4 -0
  63. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +1231 -0
  64. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +4 -0
  65. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +721 -0
  66. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.dbg.json +4 -0
  67. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.json +817 -0
  68. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +4 -0
  69. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.json +641 -0
  70. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +1 -1
  71. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +1341 -259
  72. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
  73. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +440 -79
  74. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.dbg.json +4 -0
  75. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.json +622 -0
  76. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +4 -0
  77. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +659 -0
  78. package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.dbg.json +4 -0
  79. package/artifacts/contracts/instance/service/{IComponentOwnerService.sol/IComponentOwnerService.json → IClaimService.sol/IClaimService.json} +217 -208
  80. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +1 -1
  81. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +804 -160
  82. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +4 -0
  83. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.json +606 -0
  84. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  85. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +437 -154
  86. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  87. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +82 -371
  88. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +4 -0
  89. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +1092 -0
  90. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +4 -0
  91. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +697 -0
  92. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  93. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +649 -251
  94. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
  95. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +305 -92
  96. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  97. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +270 -476
  98. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
  99. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +304 -99
  100. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  101. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +15 -2
  102. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  103. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +261 -131
  104. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
  105. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +149 -230
  106. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
  107. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +18 -0
  108. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  109. package/artifacts/contracts/registry/Registry.sol/Registry.json +275 -226
  110. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +4 -0
  111. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +285 -0
  112. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
  113. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +200 -335
  114. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
  115. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +298 -141
  116. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +4 -0
  117. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +559 -0
  118. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
  119. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +141 -53
  120. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +1 -1
  121. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  122. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +41 -3
  123. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
  124. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +40 -29
  125. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +4 -0
  126. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +129 -0
  127. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  128. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +21 -34
  129. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
  130. package/artifacts/contracts/{experiment/inheritance/IB.sol/IB.json → shared/IRegistryLinked.sol/IRegistryLinked.json} +18 -20
  131. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
  132. package/artifacts/contracts/shared/IService.sol/IService.json +86 -172
  133. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  134. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +2 -152
  135. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
  136. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +120 -27
  137. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +4 -0
  138. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +248 -0
  139. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
  140. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +294 -61
  141. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  142. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +129 -51
  143. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +4 -0
  144. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +84 -0
  145. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
  146. package/artifacts/contracts/shared/Service.sol/Service.json +191 -163
  147. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  148. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +2 -2
  149. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
  150. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +2 -2
  151. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  152. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +2 -152
  153. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  154. package/artifacts/contracts/test/TestFee.sol/TestFee.json +2 -2
  155. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  156. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +129 -51
  157. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  158. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +6 -6
  159. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  160. package/artifacts/contracts/test/TestService.sol/TestService.json +210 -214
  161. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  162. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  163. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +2 -2
  164. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  165. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +8 -190
  166. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  167. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  168. package/artifacts/contracts/types/Amount.sol/AmountLib.dbg.json +4 -0
  169. package/artifacts/contracts/types/Amount.sol/AmountLib.json +161 -0
  170. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  171. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +2 -2
  172. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  173. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.dbg.json +4 -0
  174. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.json +100 -0
  175. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
  176. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.json +2 -2
  177. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  178. package/artifacts/contracts/types/Fee.sol/FeeLib.json +40 -9
  179. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
  180. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +2 -2
  181. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  182. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +17 -4
  183. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  184. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +26 -3
  185. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +1 -1
  186. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  187. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  188. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.dbg.json +4 -0
  189. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.json +100 -0
  190. package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +1 -1
  191. package/artifacts/contracts/types/Referral.sol/ReferralLib.json +23 -4
  192. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +1 -1
  193. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +2 -2
  194. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +1 -1
  195. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +2 -2
  196. package/artifacts/contracts/types/Seconds.sol/SecondsLib.dbg.json +4 -0
  197. package/artifacts/contracts/types/Seconds.sol/SecondsLib.json +124 -0
  198. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  199. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
  200. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  201. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +25 -7
  202. package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +1 -1
  203. package/artifacts/contracts/types/UFixed.sol/MathLib.json +2 -2
  204. package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +1 -1
  205. package/artifacts/contracts/types/UFixed.sol/UFixedLib.json +2 -2
  206. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  207. package/artifacts/contracts/types/Version.sol/VersionLib.json +2 -2
  208. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  209. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +2 -2
  210. package/contracts/components/Component.sol +253 -0
  211. package/contracts/components/Distribution.sol +200 -79
  212. package/contracts/components/IComponent.sol +76 -0
  213. package/contracts/components/IDistributionComponent.sol +44 -17
  214. package/contracts/components/IPoolComponent.sol +88 -37
  215. package/contracts/components/IProductComponent.sol +10 -5
  216. package/contracts/components/Pool.sol +221 -160
  217. package/contracts/components/Product.sol +125 -116
  218. package/contracts/instance/AccessManagerUpgradeableInitializeable.sol +13 -0
  219. package/contracts/instance/BundleManager.sol +127 -0
  220. package/contracts/instance/Cloneable.sol +51 -0
  221. package/contracts/instance/IInstance.sol +61 -11
  222. package/contracts/instance/IInstanceService.sol +47 -5
  223. package/contracts/instance/Instance.sol +144 -260
  224. package/contracts/instance/InstanceAccessManager.sol +414 -175
  225. package/contracts/instance/InstanceReader.sol +19 -34
  226. package/contracts/instance/InstanceService.sol +417 -117
  227. package/contracts/instance/InstanceServiceManager.sol +6 -9
  228. package/contracts/instance/ObjectManager.sol +82 -0
  229. package/contracts/instance/base/ComponentService.sol +121 -0
  230. package/contracts/instance/base/KeyValueStore.sol +13 -5
  231. package/contracts/instance/base/Lifecycle.sol +11 -2
  232. package/contracts/instance/module/IAccess.sol +36 -20
  233. package/contracts/instance/module/IBundle.sol +8 -5
  234. package/contracts/instance/module/IComponents.sol +41 -0
  235. package/contracts/instance/module/IDistribution.sol +2 -0
  236. package/contracts/instance/module/IPolicy.sol +30 -3
  237. package/contracts/instance/module/ISetup.sol +9 -20
  238. package/contracts/instance/service/ApplicationService.sol +350 -0
  239. package/contracts/instance/service/ApplicationServiceManager.sol +35 -0
  240. package/contracts/instance/service/BundleService.sol +431 -0
  241. package/contracts/instance/service/BundleServiceManager.sol +51 -0
  242. package/contracts/instance/service/ClaimService.sol +151 -0
  243. package/contracts/instance/service/ClaimServiceManager.sol +35 -0
  244. package/contracts/instance/service/DistributionService.sol +378 -31
  245. package/contracts/instance/service/DistributionServiceManager.sol +7 -10
  246. package/contracts/instance/service/IApplicationService.sol +82 -0
  247. package/contracts/instance/service/IBundleService.sol +93 -0
  248. package/contracts/instance/service/IClaimService.sol +61 -0
  249. package/contracts/instance/service/IDistributionService.sol +87 -0
  250. package/contracts/instance/service/IPolicyService.sol +72 -0
  251. package/contracts/instance/service/IPoolService.sol +79 -17
  252. package/contracts/instance/service/IProductService.sol +3 -70
  253. package/contracts/instance/service/PolicyService.sol +362 -0
  254. package/contracts/instance/service/PolicyServiceManager.sol +54 -0
  255. package/contracts/instance/service/PoolService.sol +217 -108
  256. package/contracts/instance/service/PoolServiceManager.sol +6 -9
  257. package/contracts/instance/service/ProductService.sol +107 -440
  258. package/contracts/instance/service/ProductServiceManager.sol +2 -2
  259. package/contracts/registry/ChainNft.sol +9 -1
  260. package/contracts/registry/IRegistry.sol +41 -19
  261. package/contracts/registry/IRegistryService.sol +31 -13
  262. package/contracts/registry/ITransferInterceptor.sol +1 -0
  263. package/contracts/registry/Registry.sol +245 -222
  264. package/contracts/registry/RegistryAccessManager.sol +216 -0
  265. package/contracts/registry/RegistryService.sol +97 -173
  266. package/contracts/registry/RegistryServiceManager.sol +21 -39
  267. package/contracts/registry/ReleaseManager.sol +324 -0
  268. package/contracts/registry/TokenRegistry.sol +22 -17
  269. package/contracts/shared/ERC165.sol +14 -12
  270. package/contracts/shared/INftOwnable.sol +11 -10
  271. package/contracts/shared/IPolicyHolder.sol +26 -0
  272. package/contracts/shared/IRegisterable.sol +4 -6
  273. package/contracts/shared/IRegistryLinked.sol +12 -0
  274. package/contracts/shared/IService.sol +5 -4
  275. package/contracts/shared/IVersionable.sol +4 -47
  276. package/contracts/shared/NftOwnable.sol +66 -80
  277. package/contracts/shared/PolicyHolder.sol +81 -0
  278. package/contracts/shared/ProxyManager.sol +100 -25
  279. package/contracts/shared/Registerable.sol +16 -32
  280. package/contracts/shared/RegistryLinked.sol +48 -0
  281. package/contracts/shared/Service.sol +41 -24
  282. package/contracts/shared/TokenHandler.sol +11 -5
  283. package/contracts/shared/Versionable.sol +4 -92
  284. package/contracts/test/TestRegisterable.sol +1 -1
  285. package/contracts/test/TestService.sol +4 -3
  286. package/contracts/types/Amount.sol +60 -0
  287. package/contracts/types/Blocknumber.sol +1 -0
  288. package/contracts/types/ClaimId.sol +52 -0
  289. package/contracts/types/DistributorType.sol +2 -2
  290. package/contracts/types/Fee.sol +13 -5
  291. package/contracts/types/NftId.sol +8 -0
  292. package/contracts/types/NftIdSet.sol +26 -24
  293. package/contracts/types/ObjectType.sol +10 -5
  294. package/contracts/types/PayoutId.sol +54 -0
  295. package/contracts/types/Referral.sol +4 -0
  296. package/contracts/types/RoleId.sol +26 -19
  297. package/contracts/types/Seconds.sol +54 -0
  298. package/contracts/types/StateId.sol +1 -0
  299. package/contracts/types/Timestamp.sol +13 -13
  300. package/contracts/types/UFixed.sol +1 -0
  301. package/contracts/types/Version.sol +1 -0
  302. package/package.json +3 -3
  303. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +0 -4
  304. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.json +0 -327
  305. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +0 -4
  306. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.json +0 -280
  307. package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.dbg.json +0 -4
  308. package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.json +0 -66
  309. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.dbg.json +0 -4
  310. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.json +0 -24
  311. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.dbg.json +0 -4
  312. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.json +0 -42
  313. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +0 -4
  314. package/artifacts/contracts/experiment/errors/Require.sol/Require.json +0 -105
  315. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +0 -4
  316. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +0 -105
  317. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +0 -4
  318. package/artifacts/contracts/experiment/inheritance/A.sol/A.json +0 -128
  319. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +0 -4
  320. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +0 -42
  321. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +0 -4
  322. package/artifacts/contracts/experiment/inheritance/B.sol/B.json +0 -76
  323. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +0 -4
  324. package/artifacts/contracts/experiment/inheritance/C.sol/C.json +0 -89
  325. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +0 -4
  326. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.json +0 -128
  327. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +0 -4
  328. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.json +0 -37
  329. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +0 -4
  330. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +0 -4
  331. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.json +0 -63
  332. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +0 -4
  333. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +0 -59
  334. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +0 -4
  335. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.json +0 -124
  336. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +0 -4
  337. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +0 -74
  338. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +0 -4
  339. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +0 -124
  340. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +0 -4
  341. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +0 -207
  342. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +0 -4
  343. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +0 -10
  344. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +0 -4
  345. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +0 -10
  346. package/artifacts/contracts/instance/AccessManagedSimple.sol/AccessManagedSimple.dbg.json +0 -4
  347. package/artifacts/contracts/instance/AccessManagerSimple.sol/AccessManagerSimple.dbg.json +0 -4
  348. package/artifacts/contracts/instance/AccessManagerSimple.sol/AccessManagerSimple.json +0 -1132
  349. package/artifacts/contracts/instance/IAccessManagerSimple.sol/IAccessManagerSimple.dbg.json +0 -4
  350. package/artifacts/contracts/instance/IAccessManagerSimple.sol/IAccessManagerSimple.json +0 -1082
  351. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +0 -4
  352. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +0 -4
  353. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +0 -113
  354. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +0 -4
  355. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +0 -827
  356. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +0 -4
  357. package/artifacts/contracts/shared/RegisterableUpgradable.sol/RegisterableUpgradable.dbg.json +0 -4
  358. package/contracts/components/BaseComponent.sol +0 -91
  359. package/contracts/components/IBaseComponent.sol +0 -25
  360. package/contracts/experiment/cloning/Cloner.sol +0 -47
  361. package/contracts/experiment/errors/Require.sol +0 -38
  362. package/contracts/experiment/errors/Revert.sol +0 -44
  363. package/contracts/experiment/inheritance/A.sol +0 -53
  364. package/contracts/experiment/inheritance/B.sol +0 -28
  365. package/contracts/experiment/inheritance/C.sol +0 -34
  366. package/contracts/experiment/inheritance/IA.sol +0 -13
  367. package/contracts/experiment/inheritance/IB.sol +0 -10
  368. package/contracts/experiment/inheritance/IC.sol +0 -12
  369. package/contracts/experiment/statemachine/Dummy.sol +0 -27
  370. package/contracts/experiment/statemachine/ISM.sol +0 -25
  371. package/contracts/experiment/statemachine/SM.sol +0 -57
  372. package/contracts/experiment/statemachine/SimpleStateMachine.sol +0 -31
  373. package/contracts/experiment/types/TypeA.sol +0 -47
  374. package/contracts/experiment/types/TypeB.sol +0 -29
  375. package/contracts/instance/AccessManagedSimple.sol +0 -115
  376. package/contracts/instance/AccessManagerSimple.sol +0 -692
  377. package/contracts/instance/IAccessManagerSimple.sol +0 -391
  378. package/contracts/instance/base/ComponentServiceBase.sol +0 -124
  379. package/contracts/instance/base/IInstanceBase.sol +0 -23
  380. package/contracts/instance/service/ComponentOwnerService.sol +0 -317
  381. package/contracts/instance/service/IComponentOwnerService.sol +0 -20
  382. package/contracts/shared/RegisterableUpgradable.sol +0 -16
@@ -7,16 +7,49 @@
7
7
  "inputs": [
8
8
  {
9
9
  "internalType": "address",
10
- "name": "registry",
10
+ "name": "authority",
11
+ "type": "address"
12
+ }
13
+ ],
14
+ "name": "AccessManagedInvalidAuthority",
15
+ "type": "error"
16
+ },
17
+ {
18
+ "inputs": [
19
+ {
20
+ "internalType": "address",
21
+ "name": "caller",
11
22
  "type": "address"
12
23
  },
24
+ {
25
+ "internalType": "uint32",
26
+ "name": "delay",
27
+ "type": "uint32"
28
+ }
29
+ ],
30
+ "name": "AccessManagedRequiredDelay",
31
+ "type": "error"
32
+ },
33
+ {
34
+ "inputs": [
35
+ {
36
+ "internalType": "address",
37
+ "name": "caller",
38
+ "type": "address"
39
+ }
40
+ ],
41
+ "name": "AccessManagedUnauthorized",
42
+ "type": "error"
43
+ },
44
+ {
45
+ "inputs": [
13
46
  {
14
47
  "internalType": "NftId",
15
48
  "name": "nftId",
16
49
  "type": "uint96"
17
50
  }
18
51
  ],
19
- "name": "ErrorAlreadyLinked",
52
+ "name": "ErrorNftOwnableAlreadyLinked",
20
53
  "type": "error"
21
54
  },
22
55
  {
@@ -27,7 +60,12 @@
27
60
  "type": "address"
28
61
  }
29
62
  ],
30
- "name": "ErrorContractNotRegistered",
63
+ "name": "ErrorNftOwnableContractNotRegistered",
64
+ "type": "error"
65
+ },
66
+ {
67
+ "inputs": [],
68
+ "name": "ErrorNftOwnableInitialOwnerZero",
31
69
  "type": "error"
32
70
  },
33
71
  {
@@ -38,7 +76,7 @@
38
76
  "type": "address"
39
77
  }
40
78
  ],
41
- "name": "ErrorNotOwner",
79
+ "name": "ErrorNftOwnableNotOwner",
42
80
  "type": "error"
43
81
  },
44
82
  {
@@ -53,50 +91,164 @@
53
91
  "type": "error"
54
92
  },
55
93
  {
56
- "inputs": [],
57
- "name": "ErrorRegistryAddressZero",
94
+ "inputs": [
95
+ {
96
+ "internalType": "NftId",
97
+ "name": "poolNftId",
98
+ "type": "uint96"
99
+ }
100
+ ],
101
+ "name": "ErrorPoolServiceBundleOwnerRoleAlreadySet",
58
102
  "type": "error"
59
103
  },
60
104
  {
61
105
  "inputs": [
62
106
  {
107
+ "internalType": "NftId",
108
+ "name": "bundlePoolNftId",
109
+ "type": "uint96"
110
+ },
111
+ {
112
+ "internalType": "NftId",
113
+ "name": "productPoolNftId",
114
+ "type": "uint96"
115
+ }
116
+ ],
117
+ "name": "ErrorPoolServiceBundlePoolMismatch",
118
+ "type": "error"
119
+ },
120
+ {
121
+ "anonymous": false,
122
+ "inputs": [
123
+ {
124
+ "indexed": false,
63
125
  "internalType": "address",
64
- "name": "registry",
126
+ "name": "authority",
65
127
  "type": "address"
66
128
  }
67
129
  ],
68
- "name": "ErrorRegistryAlreadyInitialized",
69
- "type": "error"
130
+ "name": "AuthorityUpdated",
131
+ "type": "event"
70
132
  },
71
133
  {
72
- "inputs": [],
73
- "name": "ErrorRegistryNotInitialized",
74
- "type": "error"
134
+ "anonymous": false,
135
+ "inputs": [
136
+ {
137
+ "indexed": false,
138
+ "internalType": "NftId",
139
+ "name": "instanceNftId",
140
+ "type": "uint96"
141
+ },
142
+ {
143
+ "indexed": false,
144
+ "internalType": "NftId",
145
+ "name": "poolNftId",
146
+ "type": "uint96"
147
+ },
148
+ {
149
+ "indexed": false,
150
+ "internalType": "NftId",
151
+ "name": "bundleNftId",
152
+ "type": "uint96"
153
+ }
154
+ ],
155
+ "name": "LogPoolServiceBundleClosed",
156
+ "type": "event"
75
157
  },
76
158
  {
77
159
  "anonymous": false,
78
160
  "inputs": [
79
161
  {
80
162
  "indexed": false,
81
- "internalType": "Version",
82
- "name": "version",
83
- "type": "uint24"
163
+ "internalType": "NftId",
164
+ "name": "instanceNftId",
165
+ "type": "uint96"
84
166
  },
85
167
  {
86
168
  "indexed": false,
87
- "internalType": "address",
88
- "name": "implementation",
89
- "type": "address"
169
+ "internalType": "NftId",
170
+ "name": "poolNftId",
171
+ "type": "uint96"
90
172
  },
91
173
  {
92
174
  "indexed": false,
175
+ "internalType": "NftId",
176
+ "name": "bundleNftId",
177
+ "type": "uint96"
178
+ }
179
+ ],
180
+ "name": "LogPoolServiceBundleCreated",
181
+ "type": "event"
182
+ },
183
+ {
184
+ "anonymous": false,
185
+ "inputs": [
186
+ {
187
+ "indexed": false,
188
+ "internalType": "NftId",
189
+ "name": "poolNftId",
190
+ "type": "uint96"
191
+ },
192
+ {
193
+ "indexed": false,
194
+ "internalType": "RoleId",
195
+ "name": "bundleOwnerRole",
196
+ "type": "uint64"
197
+ }
198
+ ],
199
+ "name": "LogPoolServiceBundleOwnerRoleSet",
200
+ "type": "event"
201
+ },
202
+ {
203
+ "anonymous": false,
204
+ "inputs": [
205
+ {
206
+ "indexed": false,
207
+ "internalType": "NftId",
208
+ "name": "poolNftId",
209
+ "type": "uint96"
210
+ },
211
+ {
212
+ "indexed": false,
213
+ "internalType": "uint256",
214
+ "name": "previousMaxCapitalAmount",
215
+ "type": "uint256"
216
+ },
217
+ {
218
+ "indexed": false,
219
+ "internalType": "uint256",
220
+ "name": "currentMaxCapitalAmount",
221
+ "type": "uint256"
222
+ }
223
+ ],
224
+ "name": "LogPoolServiceMaxCapitalAmountUpdated",
225
+ "type": "event"
226
+ },
227
+ {
228
+ "inputs": [],
229
+ "name": "authority",
230
+ "outputs": [
231
+ {
93
232
  "internalType": "address",
94
- "name": "activatedBy",
233
+ "name": "",
95
234
  "type": "address"
96
235
  }
97
236
  ],
98
- "name": "LogVersionableInitialized",
99
- "type": "event"
237
+ "stateMutability": "view",
238
+ "type": "function"
239
+ },
240
+ {
241
+ "inputs": [
242
+ {
243
+ "internalType": "NftId",
244
+ "name": "bundleNftId",
245
+ "type": "uint96"
246
+ }
247
+ ],
248
+ "name": "closeBundle",
249
+ "outputs": [],
250
+ "stateMutability": "nonpayable",
251
+ "type": "function"
100
252
  },
101
253
  {
102
254
  "inputs": [
@@ -123,14 +275,14 @@
123
275
  "type": "tuple"
124
276
  },
125
277
  {
126
- "internalType": "uint256",
127
- "name": "amount",
128
- "type": "uint256"
278
+ "internalType": "Amount",
279
+ "name": "stakingAmount",
280
+ "type": "uint96"
129
281
  },
130
282
  {
131
- "internalType": "uint256",
283
+ "internalType": "Seconds",
132
284
  "name": "lifetime",
133
- "type": "uint256"
285
+ "type": "uint40"
134
286
  },
135
287
  {
136
288
  "internalType": "bytes",
@@ -149,6 +301,19 @@
149
301
  "stateMutability": "nonpayable",
150
302
  "type": "function"
151
303
  },
304
+ {
305
+ "inputs": [],
306
+ "name": "getDomain",
307
+ "outputs": [
308
+ {
309
+ "internalType": "ObjectType",
310
+ "name": "serviceDomain",
311
+ "type": "uint8"
312
+ }
313
+ ],
314
+ "stateMutability": "pure",
315
+ "type": "function"
316
+ },
152
317
  {
153
318
  "inputs": [],
154
319
  "name": "getInitialInfo",
@@ -194,11 +359,6 @@
194
359
  "internalType": "struct IRegistry.ObjectInfo",
195
360
  "name": "",
196
361
  "type": "tuple"
197
- },
198
- {
199
- "internalType": "bytes",
200
- "name": "data",
201
- "type": "bytes"
202
362
  }
203
363
  ],
204
364
  "stateMutability": "view",
@@ -206,25 +366,12 @@
206
366
  },
207
367
  {
208
368
  "inputs": [],
209
- "name": "getInitializedVersion",
369
+ "name": "getNftId",
210
370
  "outputs": [
211
371
  {
212
- "internalType": "uint64",
372
+ "internalType": "NftId",
213
373
  "name": "",
214
- "type": "uint64"
215
- }
216
- ],
217
- "stateMutability": "view",
218
- "type": "function"
219
- },
220
- {
221
- "inputs": [],
222
- "name": "getMajorVersion",
223
- "outputs": [
224
- {
225
- "internalType": "VersionPart",
226
- "name": "majorVersion",
227
- "type": "uint8"
374
+ "type": "uint96"
228
375
  }
229
376
  ],
230
377
  "stateMutability": "view",
@@ -232,25 +379,12 @@
232
379
  },
233
380
  {
234
381
  "inputs": [],
235
- "name": "getName",
236
- "outputs": [
237
- {
238
- "internalType": "string",
239
- "name": "name",
240
- "type": "string"
241
- }
242
- ],
243
- "stateMutability": "pure",
244
- "type": "function"
245
- },
246
- {
247
- "inputs": [],
248
- "name": "getNftId",
382
+ "name": "getOwner",
249
383
  "outputs": [
250
384
  {
251
- "internalType": "NftId",
385
+ "internalType": "address",
252
386
  "name": "",
253
- "type": "uint96"
387
+ "type": "address"
254
388
  }
255
389
  ],
256
390
  "stateMutability": "view",
@@ -258,10 +392,10 @@
258
392
  },
259
393
  {
260
394
  "inputs": [],
261
- "name": "getOwner",
395
+ "name": "getRegistry",
262
396
  "outputs": [
263
397
  {
264
- "internalType": "address",
398
+ "internalType": "contract IRegistry",
265
399
  "name": "",
266
400
  "type": "address"
267
401
  }
@@ -271,10 +405,10 @@
271
405
  },
272
406
  {
273
407
  "inputs": [],
274
- "name": "getRegistry",
408
+ "name": "getRegistryAddress",
275
409
  "outputs": [
276
410
  {
277
- "internalType": "contract IRegistry",
411
+ "internalType": "address",
278
412
  "name": "",
279
413
  "type": "address"
280
414
  }
@@ -298,61 +432,124 @@
298
432
  {
299
433
  "inputs": [
300
434
  {
301
- "internalType": "uint256",
302
- "name": "index",
303
- "type": "uint256"
304
- }
305
- ],
306
- "name": "getVersion",
307
- "outputs": [
435
+ "internalType": "address",
436
+ "name": "activatedBy",
437
+ "type": "address"
438
+ },
308
439
  {
309
- "internalType": "Version",
310
- "name": "version",
311
- "type": "uint24"
440
+ "internalType": "bytes",
441
+ "name": "activationData",
442
+ "type": "bytes"
312
443
  }
313
444
  ],
314
- "stateMutability": "view",
445
+ "name": "initializeVersionable",
446
+ "outputs": [],
447
+ "stateMutability": "nonpayable",
315
448
  "type": "function"
316
449
  },
317
450
  {
318
451
  "inputs": [],
319
- "name": "getVersionCount",
452
+ "name": "isConsumingScheduledOp",
320
453
  "outputs": [
321
454
  {
322
- "internalType": "uint256",
323
- "name": "numberOfVersions",
324
- "type": "uint256"
455
+ "internalType": "bytes4",
456
+ "name": "",
457
+ "type": "bytes4"
325
458
  }
326
459
  ],
327
460
  "stateMutability": "view",
328
461
  "type": "function"
329
462
  },
463
+ {
464
+ "inputs": [],
465
+ "name": "linkToRegisteredNftId",
466
+ "outputs": [],
467
+ "stateMutability": "nonpayable",
468
+ "type": "function"
469
+ },
330
470
  {
331
471
  "inputs": [
332
472
  {
333
- "internalType": "Version",
334
- "name": "version",
335
- "type": "uint24"
336
- }
337
- ],
338
- "name": "getVersionInfo",
339
- "outputs": [
473
+ "internalType": "contract IInstance",
474
+ "name": "instance",
475
+ "type": "address"
476
+ },
477
+ {
478
+ "internalType": "NftId",
479
+ "name": "productNftId",
480
+ "type": "uint96"
481
+ },
482
+ {
483
+ "internalType": "NftId",
484
+ "name": "applicationNftId",
485
+ "type": "uint96"
486
+ },
340
487
  {
341
488
  "components": [
342
489
  {
343
- "internalType": "Version",
344
- "name": "version",
345
- "type": "uint24"
490
+ "internalType": "NftId",
491
+ "name": "productNftId",
492
+ "type": "uint96"
346
493
  },
347
494
  {
348
- "internalType": "address",
349
- "name": "implementation",
350
- "type": "address"
495
+ "internalType": "NftId",
496
+ "name": "bundleNftId",
497
+ "type": "uint96"
351
498
  },
352
499
  {
353
- "internalType": "address",
354
- "name": "activatedBy",
355
- "type": "address"
500
+ "internalType": "ReferralId",
501
+ "name": "referralId",
502
+ "type": "bytes8"
503
+ },
504
+ {
505
+ "internalType": "RiskId",
506
+ "name": "riskId",
507
+ "type": "bytes8"
508
+ },
509
+ {
510
+ "internalType": "uint256",
511
+ "name": "sumInsuredAmount",
512
+ "type": "uint256"
513
+ },
514
+ {
515
+ "internalType": "uint256",
516
+ "name": "premiumAmount",
517
+ "type": "uint256"
518
+ },
519
+ {
520
+ "internalType": "uint256",
521
+ "name": "premiumPaidAmount",
522
+ "type": "uint256"
523
+ },
524
+ {
525
+ "internalType": "Seconds",
526
+ "name": "lifetime",
527
+ "type": "uint40"
528
+ },
529
+ {
530
+ "internalType": "bytes",
531
+ "name": "applicationData",
532
+ "type": "bytes"
533
+ },
534
+ {
535
+ "internalType": "bytes",
536
+ "name": "policyData",
537
+ "type": "bytes"
538
+ },
539
+ {
540
+ "internalType": "uint16",
541
+ "name": "claimsCount",
542
+ "type": "uint16"
543
+ },
544
+ {
545
+ "internalType": "uint16",
546
+ "name": "openClaimsCount",
547
+ "type": "uint16"
548
+ },
549
+ {
550
+ "internalType": "uint256",
551
+ "name": "payoutAmount",
552
+ "type": "uint256"
356
553
  },
357
554
  {
358
555
  "internalType": "Timestamp",
@@ -360,38 +557,27 @@
360
557
  "type": "uint40"
361
558
  },
362
559
  {
363
- "internalType": "Blocknumber",
364
- "name": "activatedIn",
365
- "type": "uint32"
560
+ "internalType": "Timestamp",
561
+ "name": "expiredAt",
562
+ "type": "uint40"
563
+ },
564
+ {
565
+ "internalType": "Timestamp",
566
+ "name": "closedAt",
567
+ "type": "uint40"
366
568
  }
367
569
  ],
368
- "internalType": "struct IVersionable.VersionInfo",
369
- "name": "versionInfo",
570
+ "internalType": "struct IPolicy.PolicyInfo",
571
+ "name": "applicationInfo",
370
572
  "type": "tuple"
371
- }
372
- ],
373
- "stateMutability": "view",
374
- "type": "function"
375
- },
376
- {
377
- "inputs": [
378
- {
379
- "internalType": "address",
380
- "name": "implementation",
381
- "type": "address"
382
- },
383
- {
384
- "internalType": "address",
385
- "name": "activatedBy",
386
- "type": "address"
387
573
  },
388
574
  {
389
- "internalType": "bytes",
390
- "name": "activationData",
391
- "type": "bytes"
575
+ "internalType": "uint256",
576
+ "name": "premiumAmount",
577
+ "type": "uint256"
392
578
  }
393
579
  ],
394
- "name": "initialize",
580
+ "name": "lockCollateral",
395
581
  "outputs": [],
396
582
  "stateMutability": "nonpayable",
397
583
  "type": "function"
@@ -399,55 +585,149 @@
399
585
  {
400
586
  "inputs": [
401
587
  {
402
- "internalType": "Version",
403
- "name": "version",
404
- "type": "uint24"
588
+ "internalType": "address",
589
+ "name": "poolAddress",
590
+ "type": "address"
405
591
  }
406
592
  ],
407
- "name": "isInitialized",
593
+ "name": "register",
408
594
  "outputs": [
409
595
  {
410
- "internalType": "bool",
596
+ "internalType": "NftId",
411
597
  "name": "",
412
- "type": "bool"
598
+ "type": "uint96"
413
599
  }
414
600
  ],
415
- "stateMutability": "view",
416
- "type": "function"
417
- },
418
- {
419
- "inputs": [],
420
- "name": "linkToRegisteredNftId",
421
- "outputs": [],
422
601
  "stateMutability": "nonpayable",
423
602
  "type": "function"
424
603
  },
425
604
  {
426
605
  "inputs": [
606
+ {
607
+ "internalType": "contract IInstance",
608
+ "name": "instance",
609
+ "type": "address"
610
+ },
427
611
  {
428
612
  "internalType": "NftId",
429
- "name": "bundleNftId",
613
+ "name": "policyNftId",
430
614
  "type": "uint96"
431
615
  },
432
616
  {
433
617
  "components": [
434
618
  {
435
- "internalType": "UFixed",
436
- "name": "fractionalFee",
619
+ "internalType": "NftId",
620
+ "name": "productNftId",
621
+ "type": "uint96"
622
+ },
623
+ {
624
+ "internalType": "NftId",
625
+ "name": "bundleNftId",
626
+ "type": "uint96"
627
+ },
628
+ {
629
+ "internalType": "ReferralId",
630
+ "name": "referralId",
631
+ "type": "bytes8"
632
+ },
633
+ {
634
+ "internalType": "RiskId",
635
+ "name": "riskId",
636
+ "type": "bytes8"
637
+ },
638
+ {
639
+ "internalType": "uint256",
640
+ "name": "sumInsuredAmount",
437
641
  "type": "uint256"
438
642
  },
439
643
  {
440
644
  "internalType": "uint256",
441
- "name": "fixedFee",
645
+ "name": "premiumAmount",
442
646
  "type": "uint256"
647
+ },
648
+ {
649
+ "internalType": "uint256",
650
+ "name": "premiumPaidAmount",
651
+ "type": "uint256"
652
+ },
653
+ {
654
+ "internalType": "Seconds",
655
+ "name": "lifetime",
656
+ "type": "uint40"
657
+ },
658
+ {
659
+ "internalType": "bytes",
660
+ "name": "applicationData",
661
+ "type": "bytes"
662
+ },
663
+ {
664
+ "internalType": "bytes",
665
+ "name": "policyData",
666
+ "type": "bytes"
667
+ },
668
+ {
669
+ "internalType": "uint16",
670
+ "name": "claimsCount",
671
+ "type": "uint16"
672
+ },
673
+ {
674
+ "internalType": "uint16",
675
+ "name": "openClaimsCount",
676
+ "type": "uint16"
677
+ },
678
+ {
679
+ "internalType": "uint256",
680
+ "name": "payoutAmount",
681
+ "type": "uint256"
682
+ },
683
+ {
684
+ "internalType": "Timestamp",
685
+ "name": "activatedAt",
686
+ "type": "uint40"
687
+ },
688
+ {
689
+ "internalType": "Timestamp",
690
+ "name": "expiredAt",
691
+ "type": "uint40"
692
+ },
693
+ {
694
+ "internalType": "Timestamp",
695
+ "name": "closedAt",
696
+ "type": "uint40"
443
697
  }
444
698
  ],
445
- "internalType": "struct Fee",
446
- "name": "fee",
699
+ "internalType": "struct IPolicy.PolicyInfo",
700
+ "name": "policyInfo",
447
701
  "type": "tuple"
448
702
  }
449
703
  ],
450
- "name": "setBundleFee",
704
+ "name": "releaseCollateral",
705
+ "outputs": [],
706
+ "stateMutability": "nonpayable",
707
+ "type": "function"
708
+ },
709
+ {
710
+ "inputs": [
711
+ {
712
+ "internalType": "address",
713
+ "name": "",
714
+ "type": "address"
715
+ }
716
+ ],
717
+ "name": "setAuthority",
718
+ "outputs": [],
719
+ "stateMutability": "nonpayable",
720
+ "type": "function"
721
+ },
722
+ {
723
+ "inputs": [
724
+ {
725
+ "internalType": "RoleId",
726
+ "name": "bundleOwnerRole",
727
+ "type": "uint64"
728
+ }
729
+ ],
730
+ "name": "setBundleOwnerRole",
451
731
  "outputs": [],
452
732
  "stateMutability": "nonpayable",
453
733
  "type": "function"
@@ -511,6 +791,19 @@
511
791
  "stateMutability": "nonpayable",
512
792
  "type": "function"
513
793
  },
794
+ {
795
+ "inputs": [
796
+ {
797
+ "internalType": "uint256",
798
+ "name": "maxCapitalAmount",
799
+ "type": "uint256"
800
+ }
801
+ ],
802
+ "name": "setMaxCapitalAmount",
803
+ "outputs": [],
804
+ "stateMutability": "nonpayable",
805
+ "type": "function"
806
+ },
514
807
  {
515
808
  "inputs": [
516
809
  {
@@ -532,23 +825,13 @@
532
825
  },
533
826
  {
534
827
  "inputs": [
535
- {
536
- "internalType": "address",
537
- "name": "implementation",
538
- "type": "address"
539
- },
540
- {
541
- "internalType": "address",
542
- "name": "activatedBy",
543
- "type": "address"
544
- },
545
828
  {
546
829
  "internalType": "bytes",
547
830
  "name": "upgradeData",
548
831
  "type": "bytes"
549
832
  }
550
833
  ],
551
- "name": "upgrade",
834
+ "name": "upgradeVersionable",
552
835
  "outputs": [],
553
836
  "stateMutability": "nonpayable",
554
837
  "type": "function"