@etherisc/gif-next 0.0.2-d408403-475 → 0.0.2-d60aa51-726

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