@etherisc/gif-next 0.0.2-d4eadee-930 → 0.0.2-d5522f6-712

Sign up to get free protection for your applications and to get access to all the features.
Files changed (411) hide show
  1. package/README.md +242 -11
  2. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +1 -1
  3. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.json +331 -23
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +675 -0
  6. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +1 -1
  7. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.json +246 -23
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
  9. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +152 -0
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +90 -171
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +55 -177
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +523 -68
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +542 -72
  18. package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.dbg.json +4 -0
  19. package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.json +66 -0
  20. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.dbg.json +4 -0
  21. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.json +24 -0
  22. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.dbg.json +4 -0
  23. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.json +42 -0
  24. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
  25. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
  26. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  27. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  28. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
  29. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
  30. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
  31. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
  32. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
  33. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
  34. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +1 -1
  35. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +2 -2
  36. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
  37. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
  38. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
  39. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +2 -2
  40. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
  41. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +2 -2
  42. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  43. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  44. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.dbg.json +4 -0
  45. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.json +1206 -0
  46. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +4 -0
  47. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +788 -0
  48. package/artifacts/contracts/instance/Cloneable.sol/Cloneable.dbg.json +4 -0
  49. package/artifacts/contracts/instance/Cloneable.sol/Cloneable.json +185 -0
  50. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  51. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +948 -1077
  52. package/artifacts/contracts/instance/IInstanceBase.sol/IInstanceBase.dbg.json +4 -0
  53. package/artifacts/contracts/instance/IInstanceBase.sol/IInstanceBase.json +448 -0
  54. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +4 -0
  55. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +570 -0
  56. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  57. package/artifacts/contracts/instance/Instance.sol/Instance.json +1974 -1115
  58. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +4 -0
  59. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +1047 -0
  60. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.dbg.json +4 -0
  61. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.json +763 -0
  62. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +4 -0
  63. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +1422 -0
  64. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +4 -0
  65. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +963 -0
  66. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +4 -0
  67. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +460 -0
  68. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +4 -0
  69. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +285 -0
  70. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +1 -1
  71. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.json +280 -48
  72. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +1 -1
  73. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +51 -1
  74. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  75. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +45 -127
  76. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  77. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  78. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +55 -245
  79. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  80. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +4 -4
  81. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +4 -0
  82. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +254 -0
  83. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +4 -0
  84. package/artifacts/contracts/instance/module/{bundle/IBundle.sol → IBundle.sol}/IBundle.json +1 -1
  85. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +4 -0
  86. package/artifacts/contracts/instance/module/{access/IAccess.sol/IAccess.json → IDistribution.sol/IDistribution.json} +2 -2
  87. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +4 -0
  88. package/artifacts/contracts/instance/module/{policy/IPolicy.sol → IPolicy.sol}/IPolicy.json +1 -1
  89. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +4 -0
  90. package/artifacts/contracts/instance/module/{risk/IRisk.sol → IRisk.sol}/IRisk.json +1 -1
  91. package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +4 -0
  92. package/artifacts/contracts/instance/{base/ModuleBase.sol/ModuleBase.json → module/ISetup.sol/ISetup.json} +2 -2
  93. package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +4 -0
  94. package/artifacts/contracts/instance/module/{treasury/ITreasury.sol → ITreasury.sol}/ITreasury.json +1 -1
  95. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +4 -0
  96. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +1031 -0
  97. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +4 -0
  98. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +436 -0
  99. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +1 -1
  100. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +390 -83
  101. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
  102. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +693 -0
  103. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +4 -0
  104. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +420 -0
  105. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +4 -0
  106. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +720 -0
  107. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +1 -1
  108. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +185 -83
  109. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
  110. package/artifacts/contracts/instance/{base/ServiceBase.sol/ServiceBase.json → service/IDistributionService.sol/IDistributionService.json} +212 -66
  111. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +4 -0
  112. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.json +771 -0
  113. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  114. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +200 -77
  115. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  116. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +209 -150
  117. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +4 -0
  118. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +1156 -0
  119. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +4 -0
  120. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +492 -0
  121. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  122. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +345 -89
  123. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +4 -0
  124. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +420 -0
  125. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  126. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +330 -226
  127. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +4 -0
  128. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +420 -0
  129. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  130. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +186 -12
  131. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  132. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +376 -37
  133. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
  134. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +976 -0
  135. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +4 -0
  136. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +34 -0
  137. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  138. package/artifacts/contracts/registry/Registry.sol/Registry.json +397 -115
  139. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +4 -0
  140. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +285 -0
  141. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
  142. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +1195 -0
  143. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +4 -0
  144. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +451 -0
  145. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +4 -0
  146. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +546 -0
  147. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +4 -0
  148. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +397 -0
  149. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +4 -0
  150. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.json +107 -0
  151. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  152. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +2 -2
  153. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +4 -0
  154. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +127 -0
  155. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  156. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +117 -37
  157. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +4 -0
  158. package/artifacts/contracts/{instance/base → shared}/IService.sol/IService.json +183 -62
  159. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  160. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +55 -14
  161. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +4 -0
  162. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +158 -0
  163. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +4 -0
  164. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +349 -0
  165. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  166. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +190 -37
  167. package/artifacts/contracts/shared/RegisterableUpgradable.sol/RegisterableUpgradable.dbg.json +4 -0
  168. package/artifacts/contracts/{instance/base/InstanceBase.sol/InstanceBase.json → shared/RegisterableUpgradable.sol/RegisterableUpgradable.json} +199 -83
  169. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +4 -0
  170. package/artifacts/contracts/shared/Service.sol/Service.json +468 -0
  171. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +4 -0
  172. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +96 -0
  173. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
  174. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
  175. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  176. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +78 -14
  177. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  178. package/artifacts/contracts/test/TestFee.sol/TestFee.json +4 -4
  179. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  180. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +204 -36
  181. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  182. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +26 -10
  183. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  184. package/artifacts/contracts/test/TestService.sol/TestService.json +289 -68
  185. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  186. package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +91 -53
  187. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  188. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +2 -2
  189. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  190. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +103 -23
  191. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  192. package/artifacts/contracts/test/Usdc.sol/USDC.json +91 -53
  193. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  194. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  195. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  196. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +4 -0
  197. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.json +104 -0
  198. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  199. package/artifacts/contracts/types/Fee.sol/FeeLib.json +52 -13
  200. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
  201. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +31 -17
  202. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  203. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +2 -2
  204. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  205. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +26 -3
  206. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +4 -0
  207. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.json +100 -0
  208. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  209. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  210. package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +4 -0
  211. package/artifacts/contracts/types/Referral.sol/ReferralLib.json +123 -0
  212. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
  213. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
  214. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +1 -1
  215. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +135 -9
  216. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  217. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
  218. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  219. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +15 -2
  220. package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +4 -0
  221. package/artifacts/contracts/types/UFixed.sol/MathLib.json +10 -0
  222. package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +4 -0
  223. package/artifacts/contracts/types/UFixed.sol/{UFixedMathLib.json → UFixedLib.json} +3 -3
  224. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  225. package/artifacts/contracts/types/Version.sol/VersionLib.json +40 -2
  226. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  227. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +22 -3
  228. package/contracts/components/BaseComponent.sol +104 -33
  229. package/contracts/components/Distribution.sol +164 -0
  230. package/contracts/components/IBaseComponent.sol +18 -3
  231. package/contracts/components/IDistributionComponent.sol +44 -0
  232. package/contracts/components/IPoolComponent.sol +19 -10
  233. package/contracts/components/IProductComponent.sol +25 -9
  234. package/contracts/components/Pool.sol +134 -36
  235. package/contracts/components/Product.sol +221 -37
  236. package/contracts/experiment/cloning/Cloner.sol +47 -0
  237. package/contracts/instance/AccessManagerUpgradeableInitializeable.sol +23 -0
  238. package/contracts/instance/BundleManager.sol +129 -0
  239. package/contracts/instance/Cloneable.sol +46 -0
  240. package/contracts/instance/IInstance.sol +55 -45
  241. package/contracts/instance/IInstanceBase.sol +26 -0
  242. package/contracts/instance/IInstanceService.sol +40 -0
  243. package/contracts/instance/Instance.sol +260 -52
  244. package/contracts/instance/InstanceAccessManager.sol +303 -0
  245. package/contracts/instance/InstanceBase.sol +41 -0
  246. package/contracts/instance/InstanceReader.sol +315 -0
  247. package/contracts/instance/InstanceService.sol +345 -0
  248. package/contracts/instance/InstanceServiceManager.sol +54 -0
  249. package/contracts/instance/ObjectManager.sol +101 -0
  250. package/contracts/instance/base/ComponentServiceBase.sol +51 -17
  251. package/contracts/instance/base/IInstanceBase.sol +11 -2
  252. package/contracts/instance/base/IKeyValueStore.sol +13 -13
  253. package/contracts/instance/base/ILifecycle.sol +3 -3
  254. package/contracts/instance/base/KeyValueStore.sol +53 -37
  255. package/contracts/instance/base/Lifecycle.sol +16 -11
  256. package/contracts/instance/module/IAccess.sol +48 -0
  257. package/contracts/instance/module/IBundle.sol +20 -0
  258. package/contracts/instance/module/IDistribution.sol +39 -0
  259. package/contracts/instance/module/IPolicy.sol +45 -0
  260. package/contracts/instance/module/IRisk.sol +11 -0
  261. package/contracts/instance/module/ISetup.sol +46 -0
  262. package/contracts/instance/module/ITreasury.sol +23 -0
  263. package/contracts/instance/service/BundleService.sol +294 -0
  264. package/contracts/instance/service/BundleServiceManager.sol +51 -0
  265. package/contracts/instance/service/ComponentOwnerService.sol +244 -99
  266. package/contracts/instance/service/DistributionService.sol +120 -0
  267. package/contracts/instance/service/DistributionServiceManager.sol +51 -0
  268. package/contracts/instance/service/IBundleService.sol +44 -0
  269. package/contracts/instance/service/IComponentOwnerService.sol +1 -3
  270. package/contracts/instance/service/IDistributionService.sol +12 -0
  271. package/contracts/instance/service/IPolicyService.sol +94 -0
  272. package/contracts/instance/service/IPoolService.sol +8 -18
  273. package/contracts/instance/service/IProductService.sol +21 -39
  274. package/contracts/instance/service/PolicyService.sol +539 -0
  275. package/contracts/instance/service/PolicyServiceManager.sol +54 -0
  276. package/contracts/instance/service/PoolService.sol +109 -87
  277. package/contracts/instance/service/PoolServiceManager.sol +51 -0
  278. package/contracts/instance/service/ProductService.sol +148 -289
  279. package/contracts/instance/service/ProductServiceManager.sol +54 -0
  280. package/contracts/registry/ChainNft.sol +79 -36
  281. package/contracts/registry/IRegistry.sol +58 -24
  282. package/contracts/registry/IRegistryService.sol +58 -0
  283. package/contracts/registry/ITransferInterceptor.sol +6 -0
  284. package/contracts/registry/Registry.sol +303 -288
  285. package/contracts/registry/RegistryAccessManager.sol +210 -0
  286. package/contracts/registry/RegistryService.sol +319 -0
  287. package/contracts/registry/RegistryServiceManager.sol +62 -0
  288. package/contracts/registry/ReleaseManager.sol +348 -0
  289. package/contracts/registry/TokenRegistry.sol +110 -0
  290. package/contracts/shared/ContractDeployerLib.sol +72 -0
  291. package/contracts/shared/ERC165.sol +6 -2
  292. package/contracts/shared/INftOwnable.sol +22 -0
  293. package/contracts/shared/IRegisterable.sol +8 -15
  294. package/contracts/shared/IService.sol +16 -0
  295. package/contracts/shared/IVersionable.sol +55 -11
  296. package/contracts/shared/NftOwnable.sol +134 -0
  297. package/contracts/shared/ProxyManager.sol +94 -0
  298. package/contracts/shared/Registerable.sol +63 -59
  299. package/contracts/shared/RegisterableUpgradable.sol +16 -0
  300. package/contracts/shared/Service.sol +58 -0
  301. package/contracts/shared/TokenHandler.sol +27 -0
  302. package/contracts/shared/UpgradableProxyWithAdmin.sol +16 -0
  303. package/contracts/shared/Versionable.sol +113 -55
  304. package/contracts/test/TestFee.sol +2 -2
  305. package/contracts/test/TestRegisterable.sol +5 -6
  306. package/contracts/test/TestRoleId.sol +2 -2
  307. package/contracts/test/TestService.sol +7 -14
  308. package/contracts/types/DistributorType.sol +55 -0
  309. package/contracts/types/Fee.sol +10 -5
  310. package/contracts/types/Key32.sol +8 -3
  311. package/contracts/types/NftIdSet.sol +26 -24
  312. package/contracts/types/NumberId.sol +52 -0
  313. package/contracts/types/ObjectType.sol +51 -14
  314. package/contracts/types/Referral.sol +85 -0
  315. package/contracts/types/RiskId.sol +43 -0
  316. package/contracts/types/RoleId.sol +61 -14
  317. package/contracts/types/StateId.sol +5 -1
  318. package/contracts/types/Timestamp.sol +7 -3
  319. package/contracts/types/UFixed.sol +128 -12
  320. package/contracts/types/Version.sol +13 -1
  321. package/package.json +4 -3
  322. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +0 -4
  323. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.json +0 -24
  324. package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +0 -4
  325. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +0 -4
  326. package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +0 -4
  327. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +0 -4
  328. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +0 -4
  329. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.json +0 -333
  330. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +0 -4
  331. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +0 -4
  332. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.json +0 -333
  333. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +0 -4
  334. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +0 -296
  335. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +0 -4
  336. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +0 -4
  337. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +0 -296
  338. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.dbg.json +0 -4
  339. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.json +0 -10
  340. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.dbg.json +0 -4
  341. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.json +0 -10
  342. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.dbg.json +0 -4
  343. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.json +0 -10
  344. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
  345. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +0 -188
  346. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +0 -4
  347. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.json +0 -10
  348. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +0 -4
  349. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +0 -188
  350. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +0 -4
  351. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +0 -4
  352. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +0 -261
  353. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
  354. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +0 -261
  355. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +0 -4
  356. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.json +0 -10
  357. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +0 -4
  358. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +0 -149
  359. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +0 -4
  360. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +0 -149
  361. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +0 -4
  362. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +0 -4
  363. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +0 -10
  364. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +0 -4
  365. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +0 -10
  366. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +0 -4
  367. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +0 -4
  368. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +0 -533
  369. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +0 -4
  370. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +0 -76
  371. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +0 -4
  372. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +0 -533
  373. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +0 -4
  374. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +0 -452
  375. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +0 -4
  376. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.json +0 -24
  377. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +0 -4
  378. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.json +0 -24
  379. package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +0 -4
  380. package/artifacts/contracts/test/TestPool.sol/TestPool.json +0 -387
  381. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +0 -4
  382. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +0 -393
  383. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +0 -4
  384. package/contracts/experiment/statemachine/README.md +0 -112
  385. package/contracts/instance/IInstanceLinked.sol +0 -8
  386. package/contracts/instance/base/IService.sol +0 -15
  387. package/contracts/instance/base/InstanceBase.sol +0 -80
  388. package/contracts/instance/base/ModuleBase.sol +0 -52
  389. package/contracts/instance/base/ServiceBase.sol +0 -37
  390. package/contracts/instance/module/access/Access.sol +0 -149
  391. package/contracts/instance/module/access/IAccess.sol +0 -53
  392. package/contracts/instance/module/bundle/BundleModule.sol +0 -136
  393. package/contracts/instance/module/bundle/IBundle.sol +0 -58
  394. package/contracts/instance/module/compensation/CompensationModule.sol +0 -8
  395. package/contracts/instance/module/compensation/ICompensation.sol +0 -10
  396. package/contracts/instance/module/component/ComponentModule.sol +0 -95
  397. package/contracts/instance/module/component/IComponent.sol +0 -53
  398. package/contracts/instance/module/policy/IPolicy.sol +0 -60
  399. package/contracts/instance/module/policy/PolicyModule.sol +0 -76
  400. package/contracts/instance/module/pool/IPoolModule.sol +0 -41
  401. package/contracts/instance/module/pool/PoolModule.sol +0 -87
  402. package/contracts/instance/module/risk/IRisk.sol +0 -10
  403. package/contracts/instance/module/risk/RiskModule.sol +0 -8
  404. package/contracts/instance/module/treasury/ITreasury.sol +0 -103
  405. package/contracts/instance/module/treasury/TokenHandler.sol +0 -48
  406. package/contracts/instance/module/treasury/TreasuryModule.sol +0 -152
  407. package/contracts/registry/IChainNft.sol +0 -21
  408. package/contracts/registry/IRegistryLinked.sol +0 -8
  409. package/contracts/shared/IOwnable.sol +0 -6
  410. package/contracts/test/TestPool.sol +0 -22
  411. package/contracts/test/TestProduct.sol +0 -44
@@ -4,235 +4,170 @@
4
4
  "sourceName": "contracts/instance/IInstance.sol",
5
5
  "abi": [
6
6
  {
7
- "anonymous": false,
8
7
  "inputs": [
9
8
  {
10
- "indexed": false,
11
- "internalType": "RoleId",
12
- "name": "role",
13
- "type": "bytes8"
9
+ "internalType": "ObjectType",
10
+ "name": "objectType",
11
+ "type": "uint8"
14
12
  },
15
13
  {
16
- "indexed": false,
17
- "internalType": "string",
18
- "name": "roleName",
19
- "type": "string"
14
+ "internalType": "StateId",
15
+ "name": "fromStateId",
16
+ "type": "uint8"
17
+ },
18
+ {
19
+ "internalType": "StateId",
20
+ "name": "toStateId",
21
+ "type": "uint8"
20
22
  }
21
23
  ],
22
- "name": "LogAccessRoleCreated",
23
- "type": "event"
24
+ "name": "ErrorInvalidStateTransition",
25
+ "type": "error"
24
26
  },
25
27
  {
26
- "anonymous": false,
27
28
  "inputs": [
28
29
  {
29
- "indexed": false,
30
- "internalType": "RoleId",
31
- "name": "role",
32
- "type": "bytes8"
33
- },
34
- {
35
- "indexed": false,
36
- "internalType": "address",
37
- "name": "member",
38
- "type": "address"
30
+ "internalType": "NftId",
31
+ "name": "nftId",
32
+ "type": "uint96"
39
33
  },
40
34
  {
41
- "indexed": false,
42
- "internalType": "bool",
43
- "name": "isMember",
44
- "type": "bool"
35
+ "internalType": "ObjectType",
36
+ "name": "objectType",
37
+ "type": "uint8"
45
38
  }
46
39
  ],
47
- "name": "LogAccessRoleGranted",
48
- "type": "event"
40
+ "name": "ErrorNoLifecycle",
41
+ "type": "error"
49
42
  },
50
43
  {
51
44
  "anonymous": false,
52
45
  "inputs": [
53
46
  {
54
47
  "indexed": false,
55
- "internalType": "RoleId",
56
- "name": "role",
57
- "type": "bytes8"
48
+ "internalType": "ObjectType",
49
+ "name": "objectType",
50
+ "type": "uint8"
58
51
  },
59
52
  {
60
53
  "indexed": false,
61
- "internalType": "bool",
62
- "name": "active",
63
- "type": "bool"
64
- }
65
- ],
66
- "name": "LogAccessRoleStateSet",
67
- "type": "event"
68
- },
69
- {
70
- "anonymous": false,
71
- "inputs": [
54
+ "internalType": "KeyId",
55
+ "name": "keyId",
56
+ "type": "bytes31"
57
+ },
72
58
  {
73
59
  "indexed": false,
74
- "internalType": "Version",
75
- "name": "version",
76
- "type": "uint24"
60
+ "internalType": "StateId",
61
+ "name": "state",
62
+ "type": "uint8"
77
63
  },
78
64
  {
79
65
  "indexed": false,
80
66
  "internalType": "address",
81
- "name": "implementation",
67
+ "name": "createdBy",
82
68
  "type": "address"
83
69
  },
84
70
  {
85
71
  "indexed": false,
86
72
  "internalType": "address",
87
- "name": "activatedBy",
73
+ "name": "txOrigin",
88
74
  "type": "address"
89
75
  }
90
76
  ],
91
- "name": "LogVersionableActivated",
77
+ "name": "LogInfoCreated",
92
78
  "type": "event"
93
79
  },
94
80
  {
81
+ "anonymous": false,
95
82
  "inputs": [
96
83
  {
97
- "internalType": "address",
98
- "name": "implementation",
99
- "type": "address"
84
+ "indexed": false,
85
+ "internalType": "ObjectType",
86
+ "name": "objectType",
87
+ "type": "uint8"
100
88
  },
101
89
  {
102
- "internalType": "address",
103
- "name": "activatedBy",
104
- "type": "address"
105
- }
106
- ],
107
- "name": "activate",
108
- "outputs": [],
109
- "stateMutability": "nonpayable",
110
- "type": "function"
111
- },
112
- {
113
- "inputs": [
114
- {
115
- "internalType": "NftId",
116
- "name": "bundleNftId",
117
- "type": "uint96"
90
+ "indexed": false,
91
+ "internalType": "KeyId",
92
+ "name": "keyId",
93
+ "type": "bytes31"
118
94
  },
119
95
  {
120
- "internalType": "NftId",
121
- "name": "poolNftId",
122
- "type": "uint96"
96
+ "indexed": false,
97
+ "internalType": "StateId",
98
+ "name": "state",
99
+ "type": "uint8"
123
100
  },
124
101
  {
125
- "internalType": "uint256",
126
- "name": "amount",
127
- "type": "uint256"
128
- }
129
- ],
130
- "name": "addBundleToPool",
131
- "outputs": [],
132
- "stateMutability": "nonpayable",
133
- "type": "function"
134
- },
135
- {
136
- "inputs": [
137
- {
138
- "internalType": "uint256",
139
- "name": "amount",
140
- "type": "uint256"
102
+ "indexed": false,
103
+ "internalType": "address",
104
+ "name": "updatedBy",
105
+ "type": "address"
141
106
  },
142
107
  {
143
- "components": [
144
- {
145
- "internalType": "UFixed",
146
- "name": "fractionalFee",
147
- "type": "uint256"
148
- },
149
- {
150
- "internalType": "uint256",
151
- "name": "fixedFee",
152
- "type": "uint256"
153
- }
154
- ],
155
- "internalType": "struct Fee",
156
- "name": "fee",
157
- "type": "tuple"
158
- }
159
- ],
160
- "name": "calculateFeeAmount",
161
- "outputs": [
162
- {
163
- "internalType": "uint256",
164
- "name": "feeAmount",
165
- "type": "uint256"
108
+ "indexed": false,
109
+ "internalType": "address",
110
+ "name": "txOrigin",
111
+ "type": "address"
166
112
  },
167
113
  {
168
- "internalType": "uint256",
169
- "name": "netAmount",
170
- "type": "uint256"
114
+ "indexed": false,
115
+ "internalType": "Blocknumber",
116
+ "name": "lastUpdatedIn",
117
+ "type": "uint32"
171
118
  }
172
119
  ],
173
- "stateMutability": "pure",
174
- "type": "function"
120
+ "name": "LogInfoUpdated",
121
+ "type": "event"
175
122
  },
176
123
  {
124
+ "anonymous": false,
177
125
  "inputs": [
178
126
  {
179
- "internalType": "NftId",
180
- "name": "bundleNftId",
181
- "type": "uint96"
182
- },
183
- {
184
- "internalType": "NftId",
185
- "name": "policyNftId",
186
- "type": "uint96"
127
+ "indexed": false,
128
+ "internalType": "ObjectType",
129
+ "name": "objectType",
130
+ "type": "uint8"
187
131
  },
188
132
  {
189
- "internalType": "uint256",
190
- "name": "amount",
191
- "type": "uint256"
192
- }
193
- ],
194
- "name": "collateralizePolicy",
195
- "outputs": [],
196
- "stateMutability": "nonpayable",
197
- "type": "function"
198
- },
199
- {
200
- "inputs": [
201
- {
202
- "internalType": "NftId",
203
- "name": "productNftId",
204
- "type": "uint96"
133
+ "indexed": false,
134
+ "internalType": "KeyId",
135
+ "name": "keyId",
136
+ "type": "bytes31"
205
137
  },
206
138
  {
207
- "internalType": "NftId",
208
- "name": "policyNftId",
209
- "type": "uint96"
139
+ "indexed": false,
140
+ "internalType": "StateId",
141
+ "name": "stateOld",
142
+ "type": "uint8"
210
143
  },
211
144
  {
212
- "internalType": "uint256",
213
- "name": "sumInsuredAmount",
214
- "type": "uint256"
145
+ "indexed": false,
146
+ "internalType": "StateId",
147
+ "name": "stateNew",
148
+ "type": "uint8"
215
149
  },
216
150
  {
217
- "internalType": "uint256",
218
- "name": "premiumAmount",
219
- "type": "uint256"
151
+ "indexed": false,
152
+ "internalType": "address",
153
+ "name": "updatedBy",
154
+ "type": "address"
220
155
  },
221
156
  {
222
- "internalType": "uint256",
223
- "name": "lifetime",
224
- "type": "uint256"
157
+ "indexed": false,
158
+ "internalType": "address",
159
+ "name": "txOrigin",
160
+ "type": "address"
225
161
  },
226
162
  {
227
- "internalType": "NftId",
228
- "name": "bundleNftId",
229
- "type": "uint96"
163
+ "indexed": false,
164
+ "internalType": "Blocknumber",
165
+ "name": "lastUpdatedIn",
166
+ "type": "uint32"
230
167
  }
231
168
  ],
232
- "name": "createApplication",
233
- "outputs": [],
234
- "stateMutability": "nonpayable",
235
- "type": "function"
169
+ "name": "LogStateUpdated",
170
+ "type": "event"
236
171
  },
237
172
  {
238
173
  "inputs": [
@@ -241,91 +176,29 @@
241
176
  "name": "bundleNftId",
242
177
  "type": "uint96"
243
178
  },
244
- {
245
- "internalType": "NftId",
246
- "name": "poolNftId",
247
- "type": "uint96"
248
- },
249
- {
250
- "internalType": "uint256",
251
- "name": "amount",
252
- "type": "uint256"
253
- },
254
- {
255
- "internalType": "uint256",
256
- "name": "lifetime",
257
- "type": "uint256"
258
- },
259
- {
260
- "internalType": "bytes",
261
- "name": "filter",
262
- "type": "bytes"
263
- }
264
- ],
265
- "name": "createBundleInfo",
266
- "outputs": [],
267
- "stateMutability": "nonpayable",
268
- "type": "function"
269
- },
270
- {
271
- "inputs": [
272
- {
273
- "internalType": "string",
274
- "name": "roleName",
275
- "type": "string"
276
- }
277
- ],
278
- "name": "createRole",
279
- "outputs": [
280
- {
281
- "internalType": "RoleId",
282
- "name": "role",
283
- "type": "bytes8"
284
- }
285
- ],
286
- "stateMutability": "nonpayable",
287
- "type": "function"
288
- },
289
- {
290
- "inputs": [
291
- {
292
- "internalType": "NftId",
293
- "name": "poolNftId",
294
- "type": "uint96"
295
- }
296
- ],
297
- "name": "getBundleCount",
298
- "outputs": [
299
- {
300
- "internalType": "uint256",
301
- "name": "bundleCount",
302
- "type": "uint256"
303
- }
304
- ],
305
- "stateMutability": "view",
306
- "type": "function"
307
- },
308
- {
309
- "inputs": [
310
- {
311
- "internalType": "NftId",
312
- "name": "bundleNftId",
313
- "type": "uint96"
314
- }
315
- ],
316
- "name": "getBundleInfo",
317
- "outputs": [
318
179
  {
319
180
  "components": [
320
181
  {
321
182
  "internalType": "NftId",
322
- "name": "nftId",
183
+ "name": "poolNftId",
323
184
  "type": "uint96"
324
185
  },
325
186
  {
326
- "internalType": "NftId",
327
- "name": "poolNftId",
328
- "type": "uint96"
187
+ "components": [
188
+ {
189
+ "internalType": "UFixed",
190
+ "name": "fractionalFee",
191
+ "type": "uint256"
192
+ },
193
+ {
194
+ "internalType": "uint256",
195
+ "name": "fixedFee",
196
+ "type": "uint256"
197
+ }
198
+ ],
199
+ "internalType": "struct Fee",
200
+ "name": "fee",
201
+ "type": "tuple"
329
202
  },
330
203
  {
331
204
  "internalType": "bytes",
@@ -347,6 +220,11 @@
347
220
  "name": "balanceAmount",
348
221
  "type": "uint256"
349
222
  },
223
+ {
224
+ "internalType": "uint256",
225
+ "name": "lifetime",
226
+ "type": "uint256"
227
+ },
350
228
  {
351
229
  "internalType": "Timestamp",
352
230
  "name": "expiredAt",
@@ -359,236 +237,81 @@
359
237
  }
360
238
  ],
361
239
  "internalType": "struct IBundle.BundleInfo",
362
- "name": "bundleInfo",
240
+ "name": "bundle",
363
241
  "type": "tuple"
364
242
  }
365
243
  ],
366
- "stateMutability": "view",
244
+ "name": "createBundle",
245
+ "outputs": [],
246
+ "stateMutability": "nonpayable",
367
247
  "type": "function"
368
248
  },
369
249
  {
370
250
  "inputs": [
371
251
  {
372
252
  "internalType": "NftId",
373
- "name": "poolNftId",
253
+ "name": "distributionNftId",
374
254
  "type": "uint96"
375
255
  },
376
- {
377
- "internalType": "uint256",
378
- "name": "index",
379
- "type": "uint256"
380
- }
381
- ],
382
- "name": "getBundleNftId",
383
- "outputs": [
384
- {
385
- "internalType": "NftId",
386
- "name": "bundleNftId",
387
- "type": "uint96"
388
- }
389
- ],
390
- "stateMutability": "view",
391
- "type": "function"
392
- },
393
- {
394
- "inputs": [],
395
- "name": "getComponentCount",
396
- "outputs": [
397
- {
398
- "internalType": "uint256",
399
- "name": "numberOfCompnents",
400
- "type": "uint256"
401
- }
402
- ],
403
- "stateMutability": "view",
404
- "type": "function"
405
- },
406
- {
407
- "inputs": [
408
- {
409
- "internalType": "uint256",
410
- "name": "idx",
411
- "type": "uint256"
412
- }
413
- ],
414
- "name": "getComponentId",
415
- "outputs": [
416
- {
417
- "internalType": "NftId",
418
- "name": "nftId",
419
- "type": "uint96"
420
- }
421
- ],
422
- "stateMutability": "view",
423
- "type": "function"
424
- },
425
- {
426
- "inputs": [
427
- {
428
- "internalType": "NftId",
429
- "name": "nftId",
430
- "type": "uint96"
431
- }
432
- ],
433
- "name": "getComponentInfo",
434
- "outputs": [
435
256
  {
436
257
  "components": [
437
258
  {
438
259
  "internalType": "NftId",
439
- "name": "nftId",
260
+ "name": "productNftId",
440
261
  "type": "uint96"
441
262
  },
442
263
  {
443
- "internalType": "StateId",
444
- "name": "state",
445
- "type": "uint8"
264
+ "internalType": "contract TokenHandler",
265
+ "name": "tokenHandler",
266
+ "type": "address"
446
267
  },
447
268
  {
448
- "internalType": "contract IERC20Metadata",
449
- "name": "token",
450
- "type": "address"
451
- }
452
- ],
453
- "internalType": "struct IComponent.ComponentInfo",
454
- "name": "info",
455
- "type": "tuple"
456
- }
457
- ],
458
- "stateMutability": "view",
459
- "type": "function"
460
- },
461
- {
462
- "inputs": [],
463
- "name": "getComponentOwnerService",
464
- "outputs": [
465
- {
466
- "internalType": "contract IComponentOwnerService",
467
- "name": "",
468
- "type": "address"
469
- }
470
- ],
471
- "stateMutability": "view",
472
- "type": "function"
473
- },
474
- {
475
- "inputs": [],
476
- "name": "getData",
477
- "outputs": [
478
- {
479
- "internalType": "bytes",
480
- "name": "data",
481
- "type": "bytes"
482
- }
483
- ],
484
- "stateMutability": "view",
485
- "type": "function"
486
- },
487
- {
488
- "inputs": [
489
- {
490
- "internalType": "UFixed",
491
- "name": "fractionalFee",
492
- "type": "uint256"
493
- },
494
- {
495
- "internalType": "uint256",
496
- "name": "fixedFee",
497
- "type": "uint256"
498
- }
499
- ],
500
- "name": "getFee",
501
- "outputs": [
502
- {
503
- "components": [
269
+ "components": [
270
+ {
271
+ "internalType": "UFixed",
272
+ "name": "fractionalFee",
273
+ "type": "uint256"
274
+ },
275
+ {
276
+ "internalType": "uint256",
277
+ "name": "fixedFee",
278
+ "type": "uint256"
279
+ }
280
+ ],
281
+ "internalType": "struct Fee",
282
+ "name": "distributionFee",
283
+ "type": "tuple"
284
+ },
504
285
  {
505
- "internalType": "UFixed",
506
- "name": "fractionalFee",
507
- "type": "uint256"
286
+ "internalType": "bool",
287
+ "name": "isIntercepting",
288
+ "type": "bool"
508
289
  },
509
290
  {
510
- "internalType": "uint256",
511
- "name": "fixedFee",
512
- "type": "uint256"
291
+ "internalType": "address",
292
+ "name": "wallet",
293
+ "type": "address"
513
294
  }
514
295
  ],
515
- "internalType": "struct Fee",
516
- "name": "fee",
296
+ "internalType": "struct ISetup.DistributionSetupInfo",
297
+ "name": "setup",
517
298
  "type": "tuple"
518
299
  }
519
300
  ],
520
- "stateMutability": "pure",
521
- "type": "function"
522
- },
523
- {
524
- "inputs": [],
525
- "name": "getKeyValueStore",
526
- "outputs": [
527
- {
528
- "internalType": "contract IKeyValueStore",
529
- "name": "keyValueStore",
530
- "type": "address"
531
- }
532
- ],
533
- "stateMutability": "view",
534
- "type": "function"
535
- },
536
- {
537
- "inputs": [],
538
- "name": "getNftId",
539
- "outputs": [
540
- {
541
- "internalType": "NftId",
542
- "name": "nftId",
543
- "type": "uint96"
544
- }
545
- ],
546
- "stateMutability": "view",
547
- "type": "function"
548
- },
549
- {
550
- "inputs": [],
551
- "name": "getOwner",
552
- "outputs": [
553
- {
554
- "internalType": "address",
555
- "name": "owner",
556
- "type": "address"
557
- }
558
- ],
559
- "stateMutability": "view",
560
- "type": "function"
561
- },
562
- {
563
- "inputs": [],
564
- "name": "getParentNftId",
565
- "outputs": [
566
- {
567
- "internalType": "NftId",
568
- "name": "nftId",
569
- "type": "uint96"
570
- }
571
- ],
572
- "stateMutability": "view",
301
+ "name": "createDistributionSetup",
302
+ "outputs": [],
303
+ "stateMutability": "nonpayable",
573
304
  "type": "function"
574
305
  },
575
306
  {
576
307
  "inputs": [
577
308
  {
578
309
  "internalType": "NftId",
579
- "name": "nftId",
310
+ "name": "policyNftId",
580
311
  "type": "uint96"
581
- }
582
- ],
583
- "name": "getPolicyInfo",
584
- "outputs": [
312
+ },
585
313
  {
586
314
  "components": [
587
- {
588
- "internalType": "NftId",
589
- "name": "nftId",
590
- "type": "uint96"
591
- },
592
315
  {
593
316
  "internalType": "NftId",
594
317
  "name": "productNftId",
@@ -600,14 +323,14 @@
600
323
  "type": "uint96"
601
324
  },
602
325
  {
603
- "internalType": "address",
604
- "name": "beneficiary",
605
- "type": "address"
326
+ "internalType": "ReferralId",
327
+ "name": "referralId",
328
+ "type": "bytes8"
606
329
  },
607
330
  {
608
- "internalType": "StateId",
609
- "name": "state",
610
- "type": "uint8"
331
+ "internalType": "RiskId",
332
+ "name": "riskId",
333
+ "type": "bytes8"
611
334
  },
612
335
  {
613
336
  "internalType": "uint256",
@@ -631,13 +354,28 @@
631
354
  },
632
355
  {
633
356
  "internalType": "bytes",
634
- "name": "data",
357
+ "name": "applicationData",
635
358
  "type": "bytes"
636
359
  },
637
360
  {
638
- "internalType": "Timestamp",
639
- "name": "createdAt",
640
- "type": "uint40"
361
+ "internalType": "bytes",
362
+ "name": "policyData",
363
+ "type": "bytes"
364
+ },
365
+ {
366
+ "internalType": "uint16",
367
+ "name": "claimsCount",
368
+ "type": "uint16"
369
+ },
370
+ {
371
+ "internalType": "uint16",
372
+ "name": "openClaimsCount",
373
+ "type": "uint16"
374
+ },
375
+ {
376
+ "internalType": "uint256",
377
+ "name": "payoutAmount",
378
+ "type": "uint256"
641
379
  },
642
380
  {
643
381
  "internalType": "Timestamp",
@@ -653,91 +391,41 @@
653
391
  "internalType": "Timestamp",
654
392
  "name": "closedAt",
655
393
  "type": "uint40"
656
- },
657
- {
658
- "internalType": "Blocknumber",
659
- "name": "updatedIn",
660
- "type": "uint32"
661
394
  }
662
395
  ],
663
396
  "internalType": "struct IPolicy.PolicyInfo",
664
- "name": "info",
397
+ "name": "policy",
665
398
  "type": "tuple"
666
399
  }
667
400
  ],
668
- "stateMutability": "view",
401
+ "name": "createPolicy",
402
+ "outputs": [],
403
+ "stateMutability": "nonpayable",
669
404
  "type": "function"
670
405
  },
671
406
  {
672
407
  "inputs": [
673
408
  {
674
409
  "internalType": "NftId",
675
- "name": "nftId",
410
+ "name": "poolNftId",
676
411
  "type": "uint96"
677
- }
678
- ],
679
- "name": "getPoolInfo",
680
- "outputs": [
412
+ },
681
413
  {
682
414
  "components": [
683
415
  {
684
416
  "internalType": "NftId",
685
- "name": "nftId",
417
+ "name": "productNftId",
686
418
  "type": "uint96"
687
419
  },
688
420
  {
689
- "internalType": "bool",
690
- "name": "isVerifying",
691
- "type": "bool"
421
+ "internalType": "contract TokenHandler",
422
+ "name": "tokenHandler",
423
+ "type": "address"
692
424
  },
693
425
  {
694
426
  "internalType": "UFixed",
695
427
  "name": "collateralizationLevel",
696
428
  "type": "uint256"
697
- }
698
- ],
699
- "internalType": "struct IPool.PoolInfo",
700
- "name": "info",
701
- "type": "tuple"
702
- }
703
- ],
704
- "stateMutability": "view",
705
- "type": "function"
706
- },
707
- {
708
- "inputs": [],
709
- "name": "getPoolService",
710
- "outputs": [
711
- {
712
- "internalType": "contract IPoolService",
713
- "name": "",
714
- "type": "address"
715
- }
716
- ],
717
- "stateMutability": "view",
718
- "type": "function"
719
- },
720
- {
721
- "inputs": [
722
- {
723
- "internalType": "NftId",
724
- "name": "poolNftId",
725
- "type": "uint96"
726
- }
727
- ],
728
- "name": "getPoolSetup",
729
- "outputs": [
730
- {
731
- "components": [
732
- {
733
- "internalType": "NftId",
734
- "name": "poolNftId",
735
- "type": "uint96"
736
- },
737
- {
738
- "internalType": "address",
739
- "name": "wallet",
740
- "type": "address"
741
429
  },
742
430
  {
743
431
  "components": [
@@ -753,7 +441,7 @@
753
441
  }
754
442
  ],
755
443
  "internalType": "struct Fee",
756
- "name": "stakingFee",
444
+ "name": "poolFee",
757
445
  "type": "tuple"
758
446
  },
759
447
  {
@@ -770,29 +458,50 @@
770
458
  }
771
459
  ],
772
460
  "internalType": "struct Fee",
773
- "name": "performanceFee",
461
+ "name": "stakingFee",
774
462
  "type": "tuple"
775
- }
776
- ],
777
- "internalType": "struct ITreasury.PoolSetup",
778
- "name": "setup",
779
- "type": "tuple"
780
- }
781
- ],
782
- "stateMutability": "view",
783
- "type": "function"
784
- },
785
- {
786
- "inputs": [],
787
- "name": "getProductService",
788
- "outputs": [
789
- {
790
- "internalType": "contract IProductService",
791
- "name": "",
792
- "type": "address"
463
+ },
464
+ {
465
+ "components": [
466
+ {
467
+ "internalType": "UFixed",
468
+ "name": "fractionalFee",
469
+ "type": "uint256"
470
+ },
471
+ {
472
+ "internalType": "uint256",
473
+ "name": "fixedFee",
474
+ "type": "uint256"
475
+ }
476
+ ],
477
+ "internalType": "struct Fee",
478
+ "name": "performanceFee",
479
+ "type": "tuple"
480
+ },
481
+ {
482
+ "internalType": "bool",
483
+ "name": "isIntercepting",
484
+ "type": "bool"
485
+ },
486
+ {
487
+ "internalType": "bool",
488
+ "name": "isConfirmingApplication",
489
+ "type": "bool"
490
+ },
491
+ {
492
+ "internalType": "address",
493
+ "name": "wallet",
494
+ "type": "address"
495
+ }
496
+ ],
497
+ "internalType": "struct ISetup.PoolSetupInfo",
498
+ "name": "setup",
499
+ "type": "tuple"
793
500
  }
794
501
  ],
795
- "stateMutability": "view",
502
+ "name": "createPoolSetup",
503
+ "outputs": [],
504
+ "stateMutability": "nonpayable",
796
505
  "type": "function"
797
506
  },
798
507
  {
@@ -801,20 +510,22 @@
801
510
  "internalType": "NftId",
802
511
  "name": "productNftId",
803
512
  "type": "uint96"
804
- }
805
- ],
806
- "name": "getProductSetup",
807
- "outputs": [
513
+ },
808
514
  {
809
515
  "components": [
810
516
  {
811
- "internalType": "NftId",
812
- "name": "productNftId",
813
- "type": "uint96"
517
+ "internalType": "contract IERC20Metadata",
518
+ "name": "token",
519
+ "type": "address"
520
+ },
521
+ {
522
+ "internalType": "contract TokenHandler",
523
+ "name": "tokenHandler",
524
+ "type": "address"
814
525
  },
815
526
  {
816
527
  "internalType": "NftId",
817
- "name": "distributorNftId",
528
+ "name": "distributionNftId",
818
529
  "type": "uint96"
819
530
  },
820
531
  {
@@ -823,14 +534,55 @@
823
534
  "type": "uint96"
824
535
  },
825
536
  {
826
- "internalType": "contract IERC20Metadata",
827
- "name": "token",
828
- "type": "address"
537
+ "components": [
538
+ {
539
+ "internalType": "UFixed",
540
+ "name": "fractionalFee",
541
+ "type": "uint256"
542
+ },
543
+ {
544
+ "internalType": "uint256",
545
+ "name": "fixedFee",
546
+ "type": "uint256"
547
+ }
548
+ ],
549
+ "internalType": "struct Fee",
550
+ "name": "distributionFee",
551
+ "type": "tuple"
829
552
  },
830
553
  {
831
- "internalType": "address",
832
- "name": "wallet",
833
- "type": "address"
554
+ "components": [
555
+ {
556
+ "internalType": "UFixed",
557
+ "name": "fractionalFee",
558
+ "type": "uint256"
559
+ },
560
+ {
561
+ "internalType": "uint256",
562
+ "name": "fixedFee",
563
+ "type": "uint256"
564
+ }
565
+ ],
566
+ "internalType": "struct Fee",
567
+ "name": "productFee",
568
+ "type": "tuple"
569
+ },
570
+ {
571
+ "components": [
572
+ {
573
+ "internalType": "UFixed",
574
+ "name": "fractionalFee",
575
+ "type": "uint256"
576
+ },
577
+ {
578
+ "internalType": "uint256",
579
+ "name": "fixedFee",
580
+ "type": "uint256"
581
+ }
582
+ ],
583
+ "internalType": "struct Fee",
584
+ "name": "processingFee",
585
+ "type": "tuple"
834
586
  },
835
587
  {
836
588
  "components": [
@@ -846,7 +598,7 @@
846
598
  }
847
599
  ],
848
600
  "internalType": "struct Fee",
849
- "name": "policyFee",
601
+ "name": "poolFee",
850
602
  "type": "tuple"
851
603
  },
852
604
  {
@@ -863,112 +615,148 @@
863
615
  }
864
616
  ],
865
617
  "internalType": "struct Fee",
866
- "name": "processingFee",
618
+ "name": "stakingFee",
619
+ "type": "tuple"
620
+ },
621
+ {
622
+ "components": [
623
+ {
624
+ "internalType": "UFixed",
625
+ "name": "fractionalFee",
626
+ "type": "uint256"
627
+ },
628
+ {
629
+ "internalType": "uint256",
630
+ "name": "fixedFee",
631
+ "type": "uint256"
632
+ }
633
+ ],
634
+ "internalType": "struct Fee",
635
+ "name": "performanceFee",
867
636
  "type": "tuple"
637
+ },
638
+ {
639
+ "internalType": "bool",
640
+ "name": "isIntercepting",
641
+ "type": "bool"
642
+ },
643
+ {
644
+ "internalType": "address",
645
+ "name": "wallet",
646
+ "type": "address"
868
647
  }
869
648
  ],
870
- "internalType": "struct ITreasury.ProductSetup",
649
+ "internalType": "struct ISetup.ProductSetupInfo",
871
650
  "name": "setup",
872
651
  "type": "tuple"
873
652
  }
874
653
  ],
875
- "stateMutability": "view",
876
- "type": "function"
877
- },
878
- {
879
- "inputs": [],
880
- "name": "getRegistry",
881
- "outputs": [
882
- {
883
- "internalType": "contract IRegistry",
884
- "name": "registry",
885
- "type": "address"
886
- }
887
- ],
888
- "stateMutability": "view",
654
+ "name": "createProductSetup",
655
+ "outputs": [],
656
+ "stateMutability": "nonpayable",
889
657
  "type": "function"
890
658
  },
891
659
  {
892
660
  "inputs": [
893
661
  {
894
- "internalType": "uint256",
895
- "name": "idx",
896
- "type": "uint256"
897
- }
898
- ],
899
- "name": "getRole",
900
- "outputs": [
901
- {
902
- "internalType": "RoleId",
903
- "name": "role",
662
+ "internalType": "RiskId",
663
+ "name": "riskId",
904
664
  "type": "bytes8"
905
- }
906
- ],
907
- "stateMutability": "view",
908
- "type": "function"
909
- },
910
- {
911
- "inputs": [],
912
- "name": "getRoleCount",
913
- "outputs": [
665
+ },
914
666
  {
915
- "internalType": "uint256",
916
- "name": "roles",
917
- "type": "uint256"
667
+ "components": [
668
+ {
669
+ "internalType": "NftId",
670
+ "name": "productNftId",
671
+ "type": "uint96"
672
+ },
673
+ {
674
+ "internalType": "bytes",
675
+ "name": "data",
676
+ "type": "bytes"
677
+ }
678
+ ],
679
+ "internalType": "struct IRisk.RiskInfo",
680
+ "name": "risk",
681
+ "type": "tuple"
918
682
  }
919
683
  ],
920
- "stateMutability": "view",
684
+ "name": "createRisk",
685
+ "outputs": [],
686
+ "stateMutability": "nonpayable",
921
687
  "type": "function"
922
688
  },
923
689
  {
924
690
  "inputs": [
925
691
  {
926
- "internalType": "string",
927
- "name": "roleName",
928
- "type": "string"
692
+ "internalType": "Key32",
693
+ "name": "key",
694
+ "type": "bytes32"
929
695
  }
930
696
  ],
931
- "name": "getRoleId",
697
+ "name": "exists",
932
698
  "outputs": [
933
699
  {
934
- "internalType": "RoleId",
935
- "name": "role",
936
- "type": "bytes8"
700
+ "internalType": "bool",
701
+ "name": "",
702
+ "type": "bool"
937
703
  }
938
704
  ],
939
- "stateMutability": "pure",
705
+ "stateMutability": "view",
940
706
  "type": "function"
941
707
  },
942
708
  {
943
709
  "inputs": [
944
710
  {
945
- "internalType": "RoleId",
946
- "name": "role",
947
- "type": "bytes8"
711
+ "internalType": "Key32",
712
+ "name": "key",
713
+ "type": "bytes32"
948
714
  }
949
715
  ],
950
- "name": "getRoleInfo",
716
+ "name": "get",
951
717
  "outputs": [
952
718
  {
953
719
  "components": [
954
720
  {
955
- "internalType": "RoleId",
956
- "name": "id",
957
- "type": "bytes8"
958
- },
959
- {
960
- "internalType": "string",
961
- "name": "name",
962
- "type": "string"
721
+ "components": [
722
+ {
723
+ "internalType": "ObjectType",
724
+ "name": "objectType",
725
+ "type": "uint8"
726
+ },
727
+ {
728
+ "internalType": "StateId",
729
+ "name": "state",
730
+ "type": "uint8"
731
+ },
732
+ {
733
+ "internalType": "address",
734
+ "name": "updatedBy",
735
+ "type": "address"
736
+ },
737
+ {
738
+ "internalType": "Blocknumber",
739
+ "name": "updatedIn",
740
+ "type": "uint32"
741
+ },
742
+ {
743
+ "internalType": "Blocknumber",
744
+ "name": "createdIn",
745
+ "type": "uint32"
746
+ }
747
+ ],
748
+ "internalType": "struct IKeyValueStore.Metadata",
749
+ "name": "metadata",
750
+ "type": "tuple"
963
751
  },
964
752
  {
965
- "internalType": "bool",
966
- "name": "isActive",
967
- "type": "bool"
753
+ "internalType": "bytes",
754
+ "name": "data",
755
+ "type": "bytes"
968
756
  }
969
757
  ],
970
- "internalType": "struct IAccess.RoleInfo",
971
- "name": "info",
758
+ "internalType": "struct IKeyValueStore.Value",
759
+ "name": "value",
972
760
  "type": "tuple"
973
761
  }
974
762
  ],
@@ -976,23 +764,12 @@
976
764
  "type": "function"
977
765
  },
978
766
  {
979
- "inputs": [
980
- {
981
- "internalType": "RoleId",
982
- "name": "role",
983
- "type": "bytes8"
984
- },
985
- {
986
- "internalType": "uint256",
987
- "name": "idx",
988
- "type": "uint256"
989
- }
990
- ],
991
- "name": "getRoleMember",
767
+ "inputs": [],
768
+ "name": "getBundleManager",
992
769
  "outputs": [
993
770
  {
994
- "internalType": "address",
995
- "name": "roleMember",
771
+ "internalType": "contract BundleManager",
772
+ "name": "",
996
773
  "type": "address"
997
774
  }
998
775
  ],
@@ -1000,19 +777,26 @@
1000
777
  "type": "function"
1001
778
  },
1002
779
  {
1003
- "inputs": [
780
+ "inputs": [],
781
+ "name": "getBundleService",
782
+ "outputs": [
1004
783
  {
1005
- "internalType": "RoleId",
1006
- "name": "role",
1007
- "type": "bytes8"
784
+ "internalType": "contract IBundleService",
785
+ "name": "",
786
+ "type": "address"
1008
787
  }
1009
788
  ],
1010
- "name": "getRoleMemberCount",
789
+ "stateMutability": "view",
790
+ "type": "function"
791
+ },
792
+ {
793
+ "inputs": [],
794
+ "name": "getComponentOwnerService",
1011
795
  "outputs": [
1012
796
  {
1013
- "internalType": "uint256",
1014
- "name": "roleMembers",
1015
- "type": "uint256"
797
+ "internalType": "contract IComponentOwnerService",
798
+ "name": "",
799
+ "type": "address"
1016
800
  }
1017
801
  ],
1018
802
  "stateMutability": "view",
@@ -1021,17 +805,17 @@
1021
805
  {
1022
806
  "inputs": [
1023
807
  {
1024
- "internalType": "NftId",
1025
- "name": "componentNftId",
1026
- "type": "uint96"
808
+ "internalType": "Key32",
809
+ "name": "key",
810
+ "type": "bytes32"
1027
811
  }
1028
812
  ],
1029
- "name": "getTokenHandler",
813
+ "name": "getData",
1030
814
  "outputs": [
1031
815
  {
1032
- "internalType": "contract TokenHandler",
1033
- "name": "tokenHandler",
1034
- "type": "address"
816
+ "internalType": "bytes",
817
+ "name": "data",
818
+ "type": "bytes"
1035
819
  }
1036
820
  ],
1037
821
  "stateMutability": "view",
@@ -1039,87 +823,44 @@
1039
823
  },
1040
824
  {
1041
825
  "inputs": [],
1042
- "name": "getType",
826
+ "name": "getDistributionService",
1043
827
  "outputs": [
1044
828
  {
1045
- "internalType": "ObjectType",
1046
- "name": "objectType",
1047
- "type": "uint8"
829
+ "internalType": "contract IDistributionService",
830
+ "name": "",
831
+ "type": "address"
1048
832
  }
1049
833
  ],
1050
- "stateMutability": "pure",
834
+ "stateMutability": "view",
1051
835
  "type": "function"
1052
836
  },
1053
837
  {
1054
838
  "inputs": [
1055
839
  {
1056
- "internalType": "uint256",
1057
- "name": "a",
1058
- "type": "uint256"
1059
- },
1060
- {
1061
- "internalType": "int8",
1062
- "name": "exp",
1063
- "type": "int8"
1064
- }
1065
- ],
1066
- "name": "getUFixed",
1067
- "outputs": [
1068
- {
1069
- "internalType": "UFixed",
1070
- "name": "",
1071
- "type": "uint256"
1072
- }
1073
- ],
1074
- "stateMutability": "pure",
1075
- "type": "function"
1076
- },
1077
- {
1078
- "inputs": [
1079
- {
1080
- "internalType": "uint256",
1081
- "name": "a",
1082
- "type": "uint256"
840
+ "internalType": "ObjectType",
841
+ "name": "objectType",
842
+ "type": "uint8"
1083
843
  }
1084
844
  ],
1085
- "name": "getUFixed",
845
+ "name": "getInitialState",
1086
846
  "outputs": [
1087
847
  {
1088
- "internalType": "UFixed",
848
+ "internalType": "StateId",
1089
849
  "name": "",
1090
- "type": "uint256"
850
+ "type": "uint8"
1091
851
  }
1092
852
  ],
1093
- "stateMutability": "pure",
853
+ "stateMutability": "view",
1094
854
  "type": "function"
1095
855
  },
1096
856
  {
1097
857
  "inputs": [],
1098
- "name": "getVersion",
858
+ "name": "getInstanceAccessManager",
1099
859
  "outputs": [
1100
860
  {
1101
- "internalType": "Version",
861
+ "internalType": "contract InstanceAccessManager",
1102
862
  "name": "",
1103
- "type": "uint24"
1104
- }
1105
- ],
1106
- "stateMutability": "pure",
1107
- "type": "function"
1108
- },
1109
- {
1110
- "inputs": [
1111
- {
1112
- "internalType": "uint256",
1113
- "name": "index",
1114
- "type": "uint256"
1115
- }
1116
- ],
1117
- "name": "getVersion",
1118
- "outputs": [
1119
- {
1120
- "internalType": "Version",
1121
- "name": "version",
1122
- "type": "uint24"
863
+ "type": "address"
1123
864
  }
1124
865
  ],
1125
866
  "stateMutability": "view",
@@ -1127,12 +868,12 @@
1127
868
  },
1128
869
  {
1129
870
  "inputs": [],
1130
- "name": "getVersionCount",
871
+ "name": "getInstanceReader",
1131
872
  "outputs": [
1132
873
  {
1133
- "internalType": "uint256",
1134
- "name": "numberOfVersions",
1135
- "type": "uint256"
874
+ "internalType": "contract InstanceReader",
875
+ "name": "",
876
+ "type": "address"
1136
877
  }
1137
878
  ],
1138
879
  "stateMutability": "view",
@@ -1141,43 +882,43 @@
1141
882
  {
1142
883
  "inputs": [
1143
884
  {
1144
- "internalType": "Version",
1145
- "name": "version",
1146
- "type": "uint24"
885
+ "internalType": "Key32",
886
+ "name": "key",
887
+ "type": "bytes32"
1147
888
  }
1148
889
  ],
1149
- "name": "getVersionInfo",
890
+ "name": "getMetadata",
1150
891
  "outputs": [
1151
892
  {
1152
893
  "components": [
1153
894
  {
1154
- "internalType": "Version",
1155
- "name": "version",
1156
- "type": "uint24"
895
+ "internalType": "ObjectType",
896
+ "name": "objectType",
897
+ "type": "uint8"
1157
898
  },
1158
899
  {
1159
- "internalType": "address",
1160
- "name": "implementation",
1161
- "type": "address"
900
+ "internalType": "StateId",
901
+ "name": "state",
902
+ "type": "uint8"
1162
903
  },
1163
904
  {
1164
905
  "internalType": "address",
1165
- "name": "activatedBy",
906
+ "name": "updatedBy",
1166
907
  "type": "address"
1167
908
  },
1168
909
  {
1169
- "internalType": "Timestamp",
1170
- "name": "activatedAt",
1171
- "type": "uint40"
910
+ "internalType": "Blocknumber",
911
+ "name": "updatedIn",
912
+ "type": "uint32"
1172
913
  },
1173
914
  {
1174
915
  "internalType": "Blocknumber",
1175
- "name": "activatedIn",
916
+ "name": "createdIn",
1176
917
  "type": "uint32"
1177
918
  }
1178
919
  ],
1179
- "internalType": "struct IVersionable.VersionInfo",
1180
- "name": "versionInfo",
920
+ "internalType": "struct IKeyValueStore.Metadata",
921
+ "name": "metadata",
1181
922
  "type": "tuple"
1182
923
  }
1183
924
  ],
@@ -1186,65 +927,75 @@
1186
927
  },
1187
928
  {
1188
929
  "inputs": [],
1189
- "name": "getZeroFee",
930
+ "name": "getPolicyService",
1190
931
  "outputs": [
1191
932
  {
1192
- "components": [
1193
- {
1194
- "internalType": "UFixed",
1195
- "name": "fractionalFee",
1196
- "type": "uint256"
1197
- },
1198
- {
1199
- "internalType": "uint256",
1200
- "name": "fixedFee",
1201
- "type": "uint256"
1202
- }
1203
- ],
1204
- "internalType": "struct Fee",
1205
- "name": "fee",
1206
- "type": "tuple"
933
+ "internalType": "contract IPolicyService",
934
+ "name": "",
935
+ "type": "address"
1207
936
  }
1208
937
  ],
1209
- "stateMutability": "pure",
938
+ "stateMutability": "view",
1210
939
  "type": "function"
1211
940
  },
1212
941
  {
1213
- "inputs": [
942
+ "inputs": [],
943
+ "name": "getPoolService",
944
+ "outputs": [
1214
945
  {
1215
- "internalType": "RoleId",
1216
- "name": "role",
1217
- "type": "bytes8"
1218
- },
946
+ "internalType": "contract IPoolService",
947
+ "name": "",
948
+ "type": "address"
949
+ }
950
+ ],
951
+ "stateMutability": "view",
952
+ "type": "function"
953
+ },
954
+ {
955
+ "inputs": [],
956
+ "name": "getProductService",
957
+ "outputs": [
1219
958
  {
1220
- "internalType": "address",
1221
- "name": "member",
959
+ "internalType": "contract IProductService",
960
+ "name": "",
1222
961
  "type": "address"
1223
962
  }
1224
963
  ],
1225
- "name": "grantRole",
1226
- "outputs": [],
1227
- "stateMutability": "nonpayable",
964
+ "stateMutability": "view",
1228
965
  "type": "function"
1229
966
  },
1230
967
  {
1231
968
  "inputs": [
1232
969
  {
1233
- "internalType": "RoleId",
1234
- "name": "role",
1235
- "type": "bytes8"
1236
- },
970
+ "internalType": "Key32",
971
+ "name": "key",
972
+ "type": "bytes32"
973
+ }
974
+ ],
975
+ "name": "getState",
976
+ "outputs": [
1237
977
  {
1238
- "internalType": "address",
1239
- "name": "member",
1240
- "type": "address"
978
+ "internalType": "StateId",
979
+ "name": "state",
980
+ "type": "uint8"
981
+ }
982
+ ],
983
+ "stateMutability": "view",
984
+ "type": "function"
985
+ },
986
+ {
987
+ "inputs": [
988
+ {
989
+ "internalType": "ObjectType",
990
+ "name": "objectType",
991
+ "type": "uint8"
1241
992
  }
1242
993
  ],
1243
- "name": "hasRole",
994
+ "name": "hasLifecycle",
1244
995
  "outputs": [
1245
996
  {
1246
997
  "internalType": "bool",
1247
- "name": "hasRole",
998
+ "name": "",
1248
999
  "type": "bool"
1249
1000
  }
1250
1001
  ],
@@ -1254,12 +1005,22 @@
1254
1005
  {
1255
1006
  "inputs": [
1256
1007
  {
1257
- "internalType": "Version",
1258
- "name": "version",
1259
- "type": "uint24"
1008
+ "internalType": "ObjectType",
1009
+ "name": "objectType",
1010
+ "type": "uint8"
1011
+ },
1012
+ {
1013
+ "internalType": "StateId",
1014
+ "name": "fromId",
1015
+ "type": "uint8"
1016
+ },
1017
+ {
1018
+ "internalType": "StateId",
1019
+ "name": "toId",
1020
+ "type": "uint8"
1260
1021
  }
1261
1022
  ],
1262
- "name": "isActivated",
1023
+ "name": "isValidTransition",
1263
1024
  "outputs": [
1264
1025
  {
1265
1026
  "internalType": "bool",
@@ -1271,89 +1032,126 @@
1271
1032
  "type": "function"
1272
1033
  },
1273
1034
  {
1274
- "inputs": [],
1275
- "name": "register",
1035
+ "inputs": [
1036
+ {
1037
+ "internalType": "bytes4",
1038
+ "name": "interfaceId",
1039
+ "type": "bytes4"
1040
+ }
1041
+ ],
1042
+ "name": "supportsInterface",
1276
1043
  "outputs": [
1277
1044
  {
1278
- "internalType": "NftId",
1279
- "name": "nftId",
1280
- "type": "uint96"
1045
+ "internalType": "bool",
1046
+ "name": "",
1047
+ "type": "bool"
1281
1048
  }
1282
1049
  ],
1283
- "stateMutability": "nonpayable",
1050
+ "stateMutability": "view",
1284
1051
  "type": "function"
1285
1052
  },
1286
1053
  {
1287
1054
  "inputs": [
1288
- {
1289
- "internalType": "NftId",
1290
- "name": "nftId",
1291
- "type": "uint96"
1292
- },
1293
1055
  {
1294
1056
  "internalType": "ObjectType",
1295
1057
  "name": "objectType",
1296
1058
  "type": "uint8"
1297
1059
  },
1298
1060
  {
1299
- "internalType": "contract IERC20Metadata",
1300
- "name": "token",
1301
- "type": "address"
1061
+ "internalType": "KeyId",
1062
+ "name": "id",
1063
+ "type": "bytes31"
1302
1064
  }
1303
1065
  ],
1304
- "name": "registerComponent",
1305
- "outputs": [],
1306
- "stateMutability": "nonpayable",
1066
+ "name": "toKey32",
1067
+ "outputs": [
1068
+ {
1069
+ "internalType": "Key32",
1070
+ "name": "",
1071
+ "type": "bytes32"
1072
+ }
1073
+ ],
1074
+ "stateMutability": "pure",
1307
1075
  "type": "function"
1308
1076
  },
1309
1077
  {
1310
1078
  "inputs": [
1311
1079
  {
1312
1080
  "internalType": "NftId",
1313
- "name": "poolNftId",
1081
+ "name": "bundleNftId",
1314
1082
  "type": "uint96"
1315
1083
  },
1316
- {
1317
- "internalType": "address",
1318
- "name": "wallet",
1319
- "type": "address"
1320
- },
1321
1084
  {
1322
1085
  "components": [
1323
1086
  {
1324
- "internalType": "UFixed",
1325
- "name": "fractionalFee",
1087
+ "internalType": "NftId",
1088
+ "name": "poolNftId",
1089
+ "type": "uint96"
1090
+ },
1091
+ {
1092
+ "components": [
1093
+ {
1094
+ "internalType": "UFixed",
1095
+ "name": "fractionalFee",
1096
+ "type": "uint256"
1097
+ },
1098
+ {
1099
+ "internalType": "uint256",
1100
+ "name": "fixedFee",
1101
+ "type": "uint256"
1102
+ }
1103
+ ],
1104
+ "internalType": "struct Fee",
1105
+ "name": "fee",
1106
+ "type": "tuple"
1107
+ },
1108
+ {
1109
+ "internalType": "bytes",
1110
+ "name": "filter",
1111
+ "type": "bytes"
1112
+ },
1113
+ {
1114
+ "internalType": "uint256",
1115
+ "name": "capitalAmount",
1326
1116
  "type": "uint256"
1327
1117
  },
1328
1118
  {
1329
1119
  "internalType": "uint256",
1330
- "name": "fixedFee",
1120
+ "name": "lockedAmount",
1331
1121
  "type": "uint256"
1332
- }
1333
- ],
1334
- "internalType": "struct Fee",
1335
- "name": "stakingFee",
1336
- "type": "tuple"
1337
- },
1338
- {
1339
- "components": [
1122
+ },
1340
1123
  {
1341
- "internalType": "UFixed",
1342
- "name": "fractionalFee",
1124
+ "internalType": "uint256",
1125
+ "name": "balanceAmount",
1343
1126
  "type": "uint256"
1344
1127
  },
1345
1128
  {
1346
1129
  "internalType": "uint256",
1347
- "name": "fixedFee",
1130
+ "name": "lifetime",
1348
1131
  "type": "uint256"
1132
+ },
1133
+ {
1134
+ "internalType": "Timestamp",
1135
+ "name": "expiredAt",
1136
+ "type": "uint40"
1137
+ },
1138
+ {
1139
+ "internalType": "Timestamp",
1140
+ "name": "closedAt",
1141
+ "type": "uint40"
1349
1142
  }
1350
1143
  ],
1351
- "internalType": "struct Fee",
1352
- "name": "performanceFee",
1144
+ "internalType": "struct IBundle.BundleInfo",
1145
+ "name": "bundle",
1353
1146
  "type": "tuple"
1147
+ },
1148
+ {
1149
+ "internalType": "StateId",
1150
+ "name": "newState",
1151
+ "type": "uint8"
1354
1152
  }
1355
1153
  ],
1356
- "name": "registerPool",
1154
+ "name": "updateBundle",
1357
1155
  "outputs": [],
1358
1156
  "stateMutability": "nonpayable",
1359
1157
  "type": "function"
@@ -1362,21 +1160,16 @@
1362
1160
  "inputs": [
1363
1161
  {
1364
1162
  "internalType": "NftId",
1365
- "name": "poolNftId",
1163
+ "name": "bundleNftId",
1366
1164
  "type": "uint96"
1367
1165
  },
1368
1166
  {
1369
- "internalType": "bool",
1370
- "name": "isVerifying",
1371
- "type": "bool"
1372
- },
1373
- {
1374
- "internalType": "UFixed",
1375
- "name": "collateralizationLevel",
1376
- "type": "uint256"
1167
+ "internalType": "StateId",
1168
+ "name": "newState",
1169
+ "type": "uint8"
1377
1170
  }
1378
1171
  ],
1379
- "name": "registerPool",
1172
+ "name": "updateBundleState",
1380
1173
  "outputs": [],
1381
1174
  "stateMutability": "nonpayable",
1382
1175
  "type": "function"
@@ -1385,65 +1178,60 @@
1385
1178
  "inputs": [
1386
1179
  {
1387
1180
  "internalType": "NftId",
1388
- "name": "productNftId",
1389
- "type": "uint96"
1390
- },
1391
- {
1392
- "internalType": "NftId",
1393
- "name": "distributorNftId",
1394
- "type": "uint96"
1395
- },
1396
- {
1397
- "internalType": "NftId",
1398
- "name": "poolNftId",
1181
+ "name": "distributionNftId",
1399
1182
  "type": "uint96"
1400
1183
  },
1401
- {
1402
- "internalType": "contract IERC20Metadata",
1403
- "name": "token",
1404
- "type": "address"
1405
- },
1406
- {
1407
- "internalType": "address",
1408
- "name": "wallet",
1409
- "type": "address"
1410
- },
1411
1184
  {
1412
1185
  "components": [
1413
1186
  {
1414
- "internalType": "UFixed",
1415
- "name": "fractionalFee",
1416
- "type": "uint256"
1187
+ "internalType": "NftId",
1188
+ "name": "productNftId",
1189
+ "type": "uint96"
1417
1190
  },
1418
1191
  {
1419
- "internalType": "uint256",
1420
- "name": "fixedFee",
1421
- "type": "uint256"
1422
- }
1423
- ],
1424
- "internalType": "struct Fee",
1425
- "name": "policyFee",
1426
- "type": "tuple"
1427
- },
1428
- {
1429
- "components": [
1192
+ "internalType": "contract TokenHandler",
1193
+ "name": "tokenHandler",
1194
+ "type": "address"
1195
+ },
1430
1196
  {
1431
- "internalType": "UFixed",
1432
- "name": "fractionalFee",
1433
- "type": "uint256"
1197
+ "components": [
1198
+ {
1199
+ "internalType": "UFixed",
1200
+ "name": "fractionalFee",
1201
+ "type": "uint256"
1202
+ },
1203
+ {
1204
+ "internalType": "uint256",
1205
+ "name": "fixedFee",
1206
+ "type": "uint256"
1207
+ }
1208
+ ],
1209
+ "internalType": "struct Fee",
1210
+ "name": "distributionFee",
1211
+ "type": "tuple"
1434
1212
  },
1435
1213
  {
1436
- "internalType": "uint256",
1437
- "name": "fixedFee",
1438
- "type": "uint256"
1214
+ "internalType": "bool",
1215
+ "name": "isIntercepting",
1216
+ "type": "bool"
1217
+ },
1218
+ {
1219
+ "internalType": "address",
1220
+ "name": "wallet",
1221
+ "type": "address"
1439
1222
  }
1440
1223
  ],
1441
- "internalType": "struct Fee",
1442
- "name": "processingFee",
1224
+ "internalType": "struct ISetup.DistributionSetupInfo",
1225
+ "name": "setup",
1443
1226
  "type": "tuple"
1227
+ },
1228
+ {
1229
+ "internalType": "StateId",
1230
+ "name": "newState",
1231
+ "type": "uint8"
1444
1232
  }
1445
1233
  ],
1446
- "name": "registerProduct",
1234
+ "name": "updateDistributionSetup",
1447
1235
  "outputs": [],
1448
1236
  "stateMutability": "nonpayable",
1449
1237
  "type": "function"
@@ -1452,40 +1240,16 @@
1452
1240
  "inputs": [
1453
1241
  {
1454
1242
  "internalType": "NftId",
1455
- "name": "bundleNftId",
1243
+ "name": "distributionNftId",
1456
1244
  "type": "uint96"
1457
1245
  },
1458
1246
  {
1459
- "internalType": "NftId",
1460
- "name": "policyNftId",
1461
- "type": "uint96"
1462
- }
1463
- ],
1464
- "name": "releasePolicy",
1465
- "outputs": [
1466
- {
1467
- "internalType": "uint256",
1468
- "name": "collateralAmount",
1469
- "type": "uint256"
1470
- }
1471
- ],
1472
- "stateMutability": "nonpayable",
1473
- "type": "function"
1474
- },
1475
- {
1476
- "inputs": [
1477
- {
1478
- "internalType": "RoleId",
1479
- "name": "role",
1480
- "type": "bytes8"
1481
- },
1482
- {
1483
- "internalType": "address",
1484
- "name": "member",
1485
- "type": "address"
1247
+ "internalType": "StateId",
1248
+ "name": "newState",
1249
+ "type": "uint8"
1486
1250
  }
1487
1251
  ],
1488
- "name": "revokeRole",
1252
+ "name": "updateDistributionSetupState",
1489
1253
  "outputs": [],
1490
1254
  "stateMutability": "nonpayable",
1491
1255
  "type": "function"
@@ -1493,56 +1257,82 @@
1493
1257
  {
1494
1258
  "inputs": [
1495
1259
  {
1496
- "internalType": "RoleId",
1497
- "name": "role",
1498
- "type": "bytes8"
1499
- }
1500
- ],
1501
- "name": "roleExists",
1502
- "outputs": [
1503
- {
1504
- "internalType": "bool",
1505
- "name": "",
1506
- "type": "bool"
1507
- }
1508
- ],
1509
- "stateMutability": "view",
1510
- "type": "function"
1511
- },
1512
- {
1513
- "inputs": [
1260
+ "internalType": "NftId",
1261
+ "name": "policyNftId",
1262
+ "type": "uint96"
1263
+ },
1514
1264
  {
1515
1265
  "components": [
1516
1266
  {
1517
1267
  "internalType": "NftId",
1518
- "name": "nftId",
1268
+ "name": "productNftId",
1519
1269
  "type": "uint96"
1520
1270
  },
1521
1271
  {
1522
1272
  "internalType": "NftId",
1523
- "name": "poolNftId",
1273
+ "name": "bundleNftId",
1524
1274
  "type": "uint96"
1525
1275
  },
1526
1276
  {
1527
- "internalType": "bytes",
1528
- "name": "filter",
1529
- "type": "bytes"
1277
+ "internalType": "ReferralId",
1278
+ "name": "referralId",
1279
+ "type": "bytes8"
1280
+ },
1281
+ {
1282
+ "internalType": "RiskId",
1283
+ "name": "riskId",
1284
+ "type": "bytes8"
1530
1285
  },
1531
1286
  {
1532
1287
  "internalType": "uint256",
1533
- "name": "capitalAmount",
1288
+ "name": "sumInsuredAmount",
1534
1289
  "type": "uint256"
1535
1290
  },
1536
1291
  {
1537
1292
  "internalType": "uint256",
1538
- "name": "lockedAmount",
1293
+ "name": "premiumAmount",
1539
1294
  "type": "uint256"
1540
1295
  },
1541
1296
  {
1542
1297
  "internalType": "uint256",
1543
- "name": "balanceAmount",
1298
+ "name": "premiumPaidAmount",
1299
+ "type": "uint256"
1300
+ },
1301
+ {
1302
+ "internalType": "uint256",
1303
+ "name": "lifetime",
1304
+ "type": "uint256"
1305
+ },
1306
+ {
1307
+ "internalType": "bytes",
1308
+ "name": "applicationData",
1309
+ "type": "bytes"
1310
+ },
1311
+ {
1312
+ "internalType": "bytes",
1313
+ "name": "policyData",
1314
+ "type": "bytes"
1315
+ },
1316
+ {
1317
+ "internalType": "uint16",
1318
+ "name": "claimsCount",
1319
+ "type": "uint16"
1320
+ },
1321
+ {
1322
+ "internalType": "uint16",
1323
+ "name": "openClaimsCount",
1324
+ "type": "uint16"
1325
+ },
1326
+ {
1327
+ "internalType": "uint256",
1328
+ "name": "payoutAmount",
1544
1329
  "type": "uint256"
1545
1330
  },
1331
+ {
1332
+ "internalType": "Timestamp",
1333
+ "name": "activatedAt",
1334
+ "type": "uint40"
1335
+ },
1546
1336
  {
1547
1337
  "internalType": "Timestamp",
1548
1338
  "name": "expiredAt",
@@ -1554,138 +1344,141 @@
1554
1344
  "type": "uint40"
1555
1345
  }
1556
1346
  ],
1557
- "internalType": "struct IBundle.BundleInfo",
1558
- "name": "bundleInfo",
1347
+ "internalType": "struct IPolicy.PolicyInfo",
1348
+ "name": "policy",
1559
1349
  "type": "tuple"
1350
+ },
1351
+ {
1352
+ "internalType": "StateId",
1353
+ "name": "newState",
1354
+ "type": "uint8"
1560
1355
  }
1561
1356
  ],
1562
- "name": "setBundleInfo",
1357
+ "name": "updatePolicy",
1563
1358
  "outputs": [],
1564
1359
  "stateMutability": "nonpayable",
1565
1360
  "type": "function"
1566
1361
  },
1567
1362
  {
1568
1363
  "inputs": [
1569
- {
1570
- "components": [
1571
- {
1572
- "internalType": "NftId",
1573
- "name": "nftId",
1574
- "type": "uint96"
1575
- },
1576
- {
1577
- "internalType": "StateId",
1578
- "name": "state",
1579
- "type": "uint8"
1580
- },
1581
- {
1582
- "internalType": "contract IERC20Metadata",
1583
- "name": "token",
1584
- "type": "address"
1585
- }
1586
- ],
1587
- "internalType": "struct IComponent.ComponentInfo",
1588
- "name": "info",
1589
- "type": "tuple"
1590
- }
1591
- ],
1592
- "name": "setComponentInfo",
1593
- "outputs": [
1594
1364
  {
1595
1365
  "internalType": "NftId",
1596
- "name": "componentNftId",
1366
+ "name": "policyNftId",
1597
1367
  "type": "uint96"
1368
+ },
1369
+ {
1370
+ "internalType": "StateId",
1371
+ "name": "newState",
1372
+ "type": "uint8"
1598
1373
  }
1599
1374
  ],
1375
+ "name": "updatePolicyState",
1376
+ "outputs": [],
1600
1377
  "stateMutability": "nonpayable",
1601
1378
  "type": "function"
1602
1379
  },
1603
1380
  {
1604
1381
  "inputs": [
1382
+ {
1383
+ "internalType": "NftId",
1384
+ "name": "poolNftId",
1385
+ "type": "uint96"
1386
+ },
1605
1387
  {
1606
1388
  "components": [
1607
- {
1608
- "internalType": "NftId",
1609
- "name": "nftId",
1610
- "type": "uint96"
1611
- },
1612
1389
  {
1613
1390
  "internalType": "NftId",
1614
1391
  "name": "productNftId",
1615
1392
  "type": "uint96"
1616
1393
  },
1617
1394
  {
1618
- "internalType": "NftId",
1619
- "name": "bundleNftId",
1620
- "type": "uint96"
1621
- },
1622
- {
1623
- "internalType": "address",
1624
- "name": "beneficiary",
1395
+ "internalType": "contract TokenHandler",
1396
+ "name": "tokenHandler",
1625
1397
  "type": "address"
1626
1398
  },
1627
1399
  {
1628
- "internalType": "StateId",
1629
- "name": "state",
1630
- "type": "uint8"
1631
- },
1632
- {
1633
- "internalType": "uint256",
1634
- "name": "sumInsuredAmount",
1635
- "type": "uint256"
1636
- },
1637
- {
1638
- "internalType": "uint256",
1639
- "name": "premiumAmount",
1640
- "type": "uint256"
1641
- },
1642
- {
1643
- "internalType": "uint256",
1644
- "name": "premiumPaidAmount",
1645
- "type": "uint256"
1646
- },
1647
- {
1648
- "internalType": "uint256",
1649
- "name": "lifetime",
1400
+ "internalType": "UFixed",
1401
+ "name": "collateralizationLevel",
1650
1402
  "type": "uint256"
1651
1403
  },
1652
1404
  {
1653
- "internalType": "bytes",
1654
- "name": "data",
1655
- "type": "bytes"
1405
+ "components": [
1406
+ {
1407
+ "internalType": "UFixed",
1408
+ "name": "fractionalFee",
1409
+ "type": "uint256"
1410
+ },
1411
+ {
1412
+ "internalType": "uint256",
1413
+ "name": "fixedFee",
1414
+ "type": "uint256"
1415
+ }
1416
+ ],
1417
+ "internalType": "struct Fee",
1418
+ "name": "poolFee",
1419
+ "type": "tuple"
1656
1420
  },
1657
1421
  {
1658
- "internalType": "Timestamp",
1659
- "name": "createdAt",
1660
- "type": "uint40"
1422
+ "components": [
1423
+ {
1424
+ "internalType": "UFixed",
1425
+ "name": "fractionalFee",
1426
+ "type": "uint256"
1427
+ },
1428
+ {
1429
+ "internalType": "uint256",
1430
+ "name": "fixedFee",
1431
+ "type": "uint256"
1432
+ }
1433
+ ],
1434
+ "internalType": "struct Fee",
1435
+ "name": "stakingFee",
1436
+ "type": "tuple"
1661
1437
  },
1662
1438
  {
1663
- "internalType": "Timestamp",
1664
- "name": "activatedAt",
1665
- "type": "uint40"
1439
+ "components": [
1440
+ {
1441
+ "internalType": "UFixed",
1442
+ "name": "fractionalFee",
1443
+ "type": "uint256"
1444
+ },
1445
+ {
1446
+ "internalType": "uint256",
1447
+ "name": "fixedFee",
1448
+ "type": "uint256"
1449
+ }
1450
+ ],
1451
+ "internalType": "struct Fee",
1452
+ "name": "performanceFee",
1453
+ "type": "tuple"
1666
1454
  },
1667
1455
  {
1668
- "internalType": "Timestamp",
1669
- "name": "expiredAt",
1670
- "type": "uint40"
1456
+ "internalType": "bool",
1457
+ "name": "isIntercepting",
1458
+ "type": "bool"
1671
1459
  },
1672
1460
  {
1673
- "internalType": "Timestamp",
1674
- "name": "closedAt",
1675
- "type": "uint40"
1461
+ "internalType": "bool",
1462
+ "name": "isConfirmingApplication",
1463
+ "type": "bool"
1676
1464
  },
1677
1465
  {
1678
- "internalType": "Blocknumber",
1679
- "name": "updatedIn",
1680
- "type": "uint32"
1466
+ "internalType": "address",
1467
+ "name": "wallet",
1468
+ "type": "address"
1681
1469
  }
1682
1470
  ],
1683
- "internalType": "struct IPolicy.PolicyInfo",
1684
- "name": "policyInfo",
1471
+ "internalType": "struct ISetup.PoolSetupInfo",
1472
+ "name": "setup",
1685
1473
  "type": "tuple"
1474
+ },
1475
+ {
1476
+ "internalType": "StateId",
1477
+ "name": "newState",
1478
+ "type": "uint8"
1686
1479
  }
1687
1480
  ],
1688
- "name": "setPolicyInfo",
1481
+ "name": "updatePoolSetup",
1689
1482
  "outputs": [],
1690
1483
  "stateMutability": "nonpayable",
1691
1484
  "type": "function"
@@ -1698,41 +1491,12 @@
1698
1491
  "type": "uint96"
1699
1492
  },
1700
1493
  {
1701
- "components": [
1702
- {
1703
- "internalType": "UFixed",
1704
- "name": "fractionalFee",
1705
- "type": "uint256"
1706
- },
1707
- {
1708
- "internalType": "uint256",
1709
- "name": "fixedFee",
1710
- "type": "uint256"
1711
- }
1712
- ],
1713
- "internalType": "struct Fee",
1714
- "name": "stakingFee",
1715
- "type": "tuple"
1716
- },
1717
- {
1718
- "components": [
1719
- {
1720
- "internalType": "UFixed",
1721
- "name": "fractionalFee",
1722
- "type": "uint256"
1723
- },
1724
- {
1725
- "internalType": "uint256",
1726
- "name": "fixedFee",
1727
- "type": "uint256"
1728
- }
1729
- ],
1730
- "internalType": "struct Fee",
1731
- "name": "performanceFee",
1732
- "type": "tuple"
1494
+ "internalType": "StateId",
1495
+ "name": "newState",
1496
+ "type": "uint8"
1733
1497
  }
1734
1498
  ],
1735
- "name": "setPoolFees",
1499
+ "name": "updatePoolSetupState",
1736
1500
  "outputs": [],
1737
1501
  "stateMutability": "nonpayable",
1738
1502
  "type": "function"
@@ -1747,39 +1511,149 @@
1747
1511
  {
1748
1512
  "components": [
1749
1513
  {
1750
- "internalType": "UFixed",
1751
- "name": "fractionalFee",
1752
- "type": "uint256"
1514
+ "internalType": "contract IERC20Metadata",
1515
+ "name": "token",
1516
+ "type": "address"
1753
1517
  },
1754
1518
  {
1755
- "internalType": "uint256",
1756
- "name": "fixedFee",
1757
- "type": "uint256"
1758
- }
1759
- ],
1760
- "internalType": "struct Fee",
1761
- "name": "policyFee",
1762
- "type": "tuple"
1763
- },
1764
- {
1765
- "components": [
1519
+ "internalType": "contract TokenHandler",
1520
+ "name": "tokenHandler",
1521
+ "type": "address"
1522
+ },
1766
1523
  {
1767
- "internalType": "UFixed",
1768
- "name": "fractionalFee",
1769
- "type": "uint256"
1524
+ "internalType": "NftId",
1525
+ "name": "distributionNftId",
1526
+ "type": "uint96"
1770
1527
  },
1771
1528
  {
1772
- "internalType": "uint256",
1773
- "name": "fixedFee",
1774
- "type": "uint256"
1529
+ "internalType": "NftId",
1530
+ "name": "poolNftId",
1531
+ "type": "uint96"
1532
+ },
1533
+ {
1534
+ "components": [
1535
+ {
1536
+ "internalType": "UFixed",
1537
+ "name": "fractionalFee",
1538
+ "type": "uint256"
1539
+ },
1540
+ {
1541
+ "internalType": "uint256",
1542
+ "name": "fixedFee",
1543
+ "type": "uint256"
1544
+ }
1545
+ ],
1546
+ "internalType": "struct Fee",
1547
+ "name": "distributionFee",
1548
+ "type": "tuple"
1549
+ },
1550
+ {
1551
+ "components": [
1552
+ {
1553
+ "internalType": "UFixed",
1554
+ "name": "fractionalFee",
1555
+ "type": "uint256"
1556
+ },
1557
+ {
1558
+ "internalType": "uint256",
1559
+ "name": "fixedFee",
1560
+ "type": "uint256"
1561
+ }
1562
+ ],
1563
+ "internalType": "struct Fee",
1564
+ "name": "productFee",
1565
+ "type": "tuple"
1566
+ },
1567
+ {
1568
+ "components": [
1569
+ {
1570
+ "internalType": "UFixed",
1571
+ "name": "fractionalFee",
1572
+ "type": "uint256"
1573
+ },
1574
+ {
1575
+ "internalType": "uint256",
1576
+ "name": "fixedFee",
1577
+ "type": "uint256"
1578
+ }
1579
+ ],
1580
+ "internalType": "struct Fee",
1581
+ "name": "processingFee",
1582
+ "type": "tuple"
1583
+ },
1584
+ {
1585
+ "components": [
1586
+ {
1587
+ "internalType": "UFixed",
1588
+ "name": "fractionalFee",
1589
+ "type": "uint256"
1590
+ },
1591
+ {
1592
+ "internalType": "uint256",
1593
+ "name": "fixedFee",
1594
+ "type": "uint256"
1595
+ }
1596
+ ],
1597
+ "internalType": "struct Fee",
1598
+ "name": "poolFee",
1599
+ "type": "tuple"
1600
+ },
1601
+ {
1602
+ "components": [
1603
+ {
1604
+ "internalType": "UFixed",
1605
+ "name": "fractionalFee",
1606
+ "type": "uint256"
1607
+ },
1608
+ {
1609
+ "internalType": "uint256",
1610
+ "name": "fixedFee",
1611
+ "type": "uint256"
1612
+ }
1613
+ ],
1614
+ "internalType": "struct Fee",
1615
+ "name": "stakingFee",
1616
+ "type": "tuple"
1617
+ },
1618
+ {
1619
+ "components": [
1620
+ {
1621
+ "internalType": "UFixed",
1622
+ "name": "fractionalFee",
1623
+ "type": "uint256"
1624
+ },
1625
+ {
1626
+ "internalType": "uint256",
1627
+ "name": "fixedFee",
1628
+ "type": "uint256"
1629
+ }
1630
+ ],
1631
+ "internalType": "struct Fee",
1632
+ "name": "performanceFee",
1633
+ "type": "tuple"
1634
+ },
1635
+ {
1636
+ "internalType": "bool",
1637
+ "name": "isIntercepting",
1638
+ "type": "bool"
1639
+ },
1640
+ {
1641
+ "internalType": "address",
1642
+ "name": "wallet",
1643
+ "type": "address"
1775
1644
  }
1776
1645
  ],
1777
- "internalType": "struct Fee",
1778
- "name": "processingFee",
1646
+ "internalType": "struct ISetup.ProductSetupInfo",
1647
+ "name": "setup",
1779
1648
  "type": "tuple"
1649
+ },
1650
+ {
1651
+ "internalType": "StateId",
1652
+ "name": "newState",
1653
+ "type": "uint8"
1780
1654
  }
1781
1655
  ],
1782
- "name": "setProductFees",
1656
+ "name": "updateProductSetup",
1783
1657
  "outputs": [],
1784
1658
  "stateMutability": "nonpayable",
1785
1659
  "type": "function"
@@ -1787,17 +1661,17 @@
1787
1661
  {
1788
1662
  "inputs": [
1789
1663
  {
1790
- "internalType": "RoleId",
1791
- "name": "role",
1792
- "type": "bytes8"
1664
+ "internalType": "NftId",
1665
+ "name": "productNftId",
1666
+ "type": "uint96"
1793
1667
  },
1794
1668
  {
1795
- "internalType": "bool",
1796
- "name": "active",
1797
- "type": "bool"
1669
+ "internalType": "StateId",
1670
+ "name": "newState",
1671
+ "type": "uint8"
1798
1672
  }
1799
1673
  ],
1800
- "name": "setRoleState",
1674
+ "name": "updateProductSetupState",
1801
1675
  "outputs": [],
1802
1676
  "stateMutability": "nonpayable",
1803
1677
  "type": "function"
@@ -1805,55 +1679,52 @@
1805
1679
  {
1806
1680
  "inputs": [
1807
1681
  {
1808
- "internalType": "bytes4",
1809
- "name": "interfaceId",
1810
- "type": "bytes4"
1811
- }
1812
- ],
1813
- "name": "supportsInterface",
1814
- "outputs": [
1815
- {
1816
- "internalType": "bool",
1817
- "name": "",
1818
- "type": "bool"
1819
- }
1820
- ],
1821
- "stateMutability": "view",
1822
- "type": "function"
1823
- },
1824
- {
1825
- "inputs": [
1682
+ "internalType": "RiskId",
1683
+ "name": "riskId",
1684
+ "type": "bytes8"
1685
+ },
1826
1686
  {
1827
- "internalType": "NftId",
1828
- "name": "bundleNftId",
1829
- "type": "uint96"
1830
- }
1831
- ],
1832
- "name": "toBundleKey32",
1833
- "outputs": [
1687
+ "components": [
1688
+ {
1689
+ "internalType": "NftId",
1690
+ "name": "productNftId",
1691
+ "type": "uint96"
1692
+ },
1693
+ {
1694
+ "internalType": "bytes",
1695
+ "name": "data",
1696
+ "type": "bytes"
1697
+ }
1698
+ ],
1699
+ "internalType": "struct IRisk.RiskInfo",
1700
+ "name": "risk",
1701
+ "type": "tuple"
1702
+ },
1834
1703
  {
1835
- "internalType": "Key32",
1836
- "name": "key32",
1837
- "type": "bytes32"
1704
+ "internalType": "StateId",
1705
+ "name": "newState",
1706
+ "type": "uint8"
1838
1707
  }
1839
1708
  ],
1840
- "stateMutability": "view",
1709
+ "name": "updateRisk",
1710
+ "outputs": [],
1711
+ "stateMutability": "nonpayable",
1841
1712
  "type": "function"
1842
1713
  },
1843
1714
  {
1844
1715
  "inputs": [
1845
1716
  {
1846
- "internalType": "NftId",
1847
- "name": "bundleNftId",
1848
- "type": "uint96"
1717
+ "internalType": "RiskId",
1718
+ "name": "riskId",
1719
+ "type": "bytes8"
1849
1720
  },
1850
1721
  {
1851
1722
  "internalType": "StateId",
1852
- "name": "state",
1723
+ "name": "newState",
1853
1724
  "type": "uint8"
1854
1725
  }
1855
1726
  ],
1856
- "name": "updateBundleState",
1727
+ "name": "updateRiskState",
1857
1728
  "outputs": [],
1858
1729
  "stateMutability": "nonpayable",
1859
1730
  "type": "function"