@etherisc/gif-next 0.0.2-fc8b370-882 → 0.0.2-fca9315-260

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