@etherisc/gif-next 0.0.2-d4eadee-930 → 0.0.2-d64ea51-772

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