@etherisc/gif-next 0.0.2-da77c50-824 → 0.0.2-dd8bcd0-978

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