@etherisc/gif-next 0.0.2-dc7e4cb-141 → 0.0.2-dd8bcd0-978

Sign up to get free protection for your applications and to get access to all the features.
Files changed (412) 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 +909 -1202
  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 +1973 -1211
  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/{access/IAccess.sol/IAccess.json → IDistribution.sol/IDistribution.json} +2 -2
  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/{risk/IRisk.sol → IRisk.sol}/IRisk.json +1 -1
  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 +401 -65
  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 +177 -75
  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} +204 -58
  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 +194 -71
  116. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  117. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +202 -143
  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 +323 -76
  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 +313 -218
  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 +175 -54
  156. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  157. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +55 -14
  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} +222 -54
  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 +78 -14
  174. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  175. package/artifacts/contracts/test/TestFee.sol/TestFee.json +4 -4
  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 +283 -62
  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 +2 -2
  186. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  187. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +103 -23
  188. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  189. package/artifacts/contracts/test/Usdc.sol/USDC.json +91 -53
  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 +1 -1
  196. package/artifacts/contracts/types/Fee.sol/FeeLib.json +52 -13
  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/{UFixedMathLib.json → UFixedLib.json} +3 -3
  221. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  222. package/artifacts/contracts/types/Version.sol/VersionLib.json +40 -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 -46
  238. package/contracts/instance/IInstanceBase.sol +26 -0
  239. package/contracts/instance/IInstanceService.sol +42 -0
  240. package/contracts/instance/Instance.sol +260 -50
  241. package/contracts/instance/InstanceAccessManager.sol +304 -0
  242. package/contracts/instance/InstanceBase.sol +33 -63
  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 +244 -98
  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 +87 -86
  274. package/contracts/instance/service/PoolServiceManager.sol +54 -0
  275. package/contracts/instance/service/ProductService.sol +109 -291
  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 +55 -11
  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 +113 -55
  299. package/contracts/test/TestFee.sol +2 -2
  300. package/contracts/test/TestRegisterable.sol +5 -6
  301. package/contracts/test/TestRoleId.sol +2 -2
  302. package/contracts/test/TestService.sol +5 -13
  303. package/contracts/types/DistributorType.sol +55 -0
  304. package/contracts/types/Fee.sol +10 -5
  305. package/contracts/types/Key32.sol +50 -0
  306. package/contracts/types/NftId.sol +16 -1
  307. package/contracts/types/NftIdSet.sol +26 -24
  308. package/contracts/types/NumberId.sol +52 -0
  309. package/contracts/types/ObjectType.sol +51 -14
  310. package/contracts/types/Referral.sol +85 -0
  311. package/contracts/types/RiskId.sol +43 -0
  312. package/contracts/types/RoleId.sol +66 -11
  313. package/contracts/types/StateId.sol +12 -2
  314. package/contracts/types/Timestamp.sol +7 -3
  315. package/contracts/types/UFixed.sol +128 -12
  316. package/contracts/types/Version.sol +13 -1
  317. package/package.json +4 -3
  318. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +0 -4
  319. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.json +0 -24
  320. package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.dbg.json +0 -4
  321. package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.json +0 -50
  322. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +0 -4
  323. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.json +0 -333
  324. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +0 -4
  325. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +0 -4
  326. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.json +0 -333
  327. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +0 -4
  328. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +0 -276
  329. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +0 -4
  330. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +0 -4
  331. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +0 -276
  332. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.dbg.json +0 -4
  333. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.json +0 -10
  334. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.dbg.json +0 -4
  335. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.json +0 -10
  336. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.dbg.json +0 -4
  337. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.json +0 -10
  338. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
  339. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +0 -188
  340. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +0 -4
  341. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.json +0 -10
  342. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +0 -4
  343. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +0 -188
  344. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +0 -4
  345. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.json +0 -134
  346. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +0 -4
  347. package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +0 -4
  348. package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.json +0 -221
  349. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +0 -4
  350. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +0 -4
  351. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +0 -261
  352. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
  353. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +0 -261
  354. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +0 -4
  355. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +0 -4
  356. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +0 -149
  357. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +0 -4
  358. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +0 -149
  359. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +0 -4
  360. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +0 -4
  361. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +0 -10
  362. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +0 -4
  363. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +0 -10
  364. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +0 -4
  365. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +0 -4
  366. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +0 -533
  367. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +0 -4
  368. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +0 -76
  369. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +0 -4
  370. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +0 -533
  371. package/artifacts/contracts/instance/service/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +0 -4
  372. package/artifacts/contracts/instance/service/IService.sol/IService.dbg.json +0 -4
  373. package/artifacts/contracts/instance/service/ServiceBase.sol/ServiceBase.dbg.json +0 -4
  374. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +0 -4
  375. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +0 -452
  376. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +0 -4
  377. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.json +0 -24
  378. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +0 -4
  379. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.json +0 -24
  380. package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +0 -4
  381. package/artifacts/contracts/test/TestPool.sol/TestPool.json +0 -387
  382. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +0 -4
  383. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +0 -393
  384. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +0 -4
  385. package/contracts/experiment/statemachine/README.md +0 -112
  386. package/contracts/instance/IInstanceLinked.sol +0 -8
  387. package/contracts/instance/IServiceLinked.sol +0 -12
  388. package/contracts/instance/module/access/Access.sol +0 -149
  389. package/contracts/instance/module/access/IAccess.sol +0 -53
  390. package/contracts/instance/module/bundle/BundleModule.sol +0 -228
  391. package/contracts/instance/module/bundle/IBundle.sol +0 -53
  392. package/contracts/instance/module/compensation/CompensationModule.sol +0 -8
  393. package/contracts/instance/module/compensation/ICompensation.sol +0 -10
  394. package/contracts/instance/module/component/ComponentModule.sol +0 -103
  395. package/contracts/instance/module/component/IComponent.sol +0 -53
  396. package/contracts/instance/module/lifecycle/ILifecycle.sol +0 -47
  397. package/contracts/instance/module/policy/IPolicy.sol +0 -60
  398. package/contracts/instance/module/policy/PolicyModule.sol +0 -84
  399. package/contracts/instance/module/pool/IPoolModule.sol +0 -41
  400. package/contracts/instance/module/pool/PoolModule.sol +0 -87
  401. package/contracts/instance/module/risk/IRisk.sol +0 -10
  402. package/contracts/instance/module/risk/RiskModule.sol +0 -8
  403. package/contracts/instance/module/treasury/ITreasury.sol +0 -103
  404. package/contracts/instance/module/treasury/TokenHandler.sol +0 -48
  405. package/contracts/instance/module/treasury/TreasuryModule.sol +0 -152
  406. package/contracts/instance/service/ComponentServiceBase.sol +0 -41
  407. package/contracts/instance/service/ServiceBase.sol +0 -39
  408. package/contracts/registry/IChainNft.sol +0 -21
  409. package/contracts/registry/IRegistryLinked.sol +0 -8
  410. package/contracts/shared/IOwnable.sol +0 -6
  411. package/contracts/test/TestPool.sol +0 -22
  412. 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,82 +176,72 @@
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",
297
- "type": "function"
298
- },
299
- {
300
- "inputs": [
301
- {
302
- "internalType": "NftId",
303
- "name": "bundleNftId",
304
- "type": "uint96"
305
- },
306
- {
307
- "internalType": "NftId",
308
- "name": "policyNftId",
309
- "type": "uint96"
310
- },
311
- {
312
- "internalType": "uint256",
313
- "name": "amount",
314
- "type": "uint256"
315
- }
316
- ],
317
- "name": "collateralizePolicy",
244
+ "name": "createBundle",
318
245
  "outputs": [],
319
246
  "stateMutability": "nonpayable",
320
247
  "type": "function"
@@ -323,36 +250,55 @@
323
250
  "inputs": [
324
251
  {
325
252
  "internalType": "NftId",
326
- "name": "productNftId",
327
- "type": "uint96"
328
- },
329
- {
330
- "internalType": "NftId",
331
- "name": "policyNftId",
253
+ "name": "distributionNftId",
332
254
  "type": "uint96"
333
255
  },
334
256
  {
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"
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"
353
299
  }
354
300
  ],
355
- "name": "createApplication",
301
+ "name": "createDistributionSetup",
356
302
  "outputs": [],
357
303
  "stateMutability": "nonpayable",
358
304
  "type": "function"
@@ -361,378 +307,11 @@
361
307
  "inputs": [
362
308
  {
363
309
  "internalType": "NftId",
364
- "name": "bundleNftId",
310
+ "name": "policyNftId",
365
311
  "type": "uint96"
366
312
  },
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
313
  {
574
314
  "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
- {
730
- "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,13 +354,28 @@
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"
364
+ },
365
+ {
366
+ "internalType": "uint16",
367
+ "name": "claimsCount",
368
+ "type": "uint16"
369
+ },
370
+ {
371
+ "internalType": "uint16",
372
+ "name": "openClaimsCount",
373
+ "type": "uint16"
374
+ },
375
+ {
376
+ "internalType": "uint256",
377
+ "name": "payoutAmount",
378
+ "type": "uint256"
785
379
  },
786
380
  {
787
381
  "internalType": "Timestamp",
@@ -797,91 +391,58 @@
797
391
  "internalType": "Timestamp",
798
392
  "name": "closedAt",
799
393
  "type": "uint40"
800
- },
801
- {
802
- "internalType": "Blocknumber",
803
- "name": "updatedIn",
804
- "type": "uint32"
805
394
  }
806
395
  ],
807
396
  "internalType": "struct IPolicy.PolicyInfo",
808
- "name": "info",
397
+ "name": "policy",
809
398
  "type": "tuple"
810
399
  }
811
400
  ],
812
- "stateMutability": "view",
401
+ "name": "createPolicy",
402
+ "outputs": [],
403
+ "stateMutability": "nonpayable",
813
404
  "type": "function"
814
405
  },
815
406
  {
816
407
  "inputs": [
817
408
  {
818
409
  "internalType": "NftId",
819
- "name": "nftId",
410
+ "name": "poolNftId",
820
411
  "type": "uint96"
821
- }
822
- ],
823
- "name": "getPoolInfo",
824
- "outputs": [
412
+ },
825
413
  {
826
414
  "components": [
827
415
  {
828
416
  "internalType": "NftId",
829
- "name": "nftId",
417
+ "name": "productNftId",
830
418
  "type": "uint96"
831
419
  },
832
420
  {
833
- "internalType": "bool",
834
- "name": "isVerifying",
835
- "type": "bool"
421
+ "internalType": "contract TokenHandler",
422
+ "name": "tokenHandler",
423
+ "type": "address"
836
424
  },
837
425
  {
838
426
  "internalType": "UFixed",
839
427
  "name": "collateralizationLevel",
840
428
  "type": "uint256"
841
- }
842
- ],
843
- "internalType": "struct IPool.PoolInfo",
844
- "name": "info",
845
- "type": "tuple"
846
- }
847
- ],
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",
862
- "type": "function"
863
- },
864
- {
865
- "inputs": [
866
- {
867
- "internalType": "NftId",
868
- "name": "poolNftId",
869
- "type": "uint96"
870
- }
871
- ],
872
- "name": "getPoolSetup",
873
- "outputs": [
874
- {
875
- "components": [
876
- {
877
- "internalType": "NftId",
878
- "name": "poolNftId",
879
- "type": "uint96"
880
429
  },
881
430
  {
882
- "internalType": "address",
883
- "name": "wallet",
884
- "type": "address"
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"
885
446
  },
886
447
  {
887
448
  "components": [
@@ -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,14 +534,38 @@
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": "address",
976
- "name": "wallet",
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
571
  "components": [
@@ -990,7 +581,7 @@
990
581
  }
991
582
  ],
992
583
  "internalType": "struct Fee",
993
- "name": "policyFee",
584
+ "name": "processingFee",
994
585
  "type": "tuple"
995
586
  },
996
587
  {
@@ -1007,137 +598,108 @@
1007
598
  }
1008
599
  ],
1009
600
  "internalType": "struct Fee",
1010
- "name": "processingFee",
601
+ "name": "poolFee",
1011
602
  "type": "tuple"
1012
- }
1013
- ],
1014
- "internalType": "struct ITreasury.ProductSetup",
1015
- "name": "setup",
1016
- "type": "tuple"
1017
- }
1018
- ],
1019
- "stateMutability": "view",
1020
- "type": "function"
1021
- },
1022
- {
1023
- "inputs": [],
1024
- "name": "getRegistry",
1025
- "outputs": [
1026
- {
1027
- "internalType": "contract IRegistry",
1028
- "name": "registry",
1029
- "type": "address"
1030
- }
1031
- ],
1032
- "stateMutability": "view",
1033
- "type": "function"
1034
- },
1035
- {
1036
- "inputs": [
1037
- {
1038
- "internalType": "uint256",
1039
- "name": "idx",
1040
- "type": "uint256"
1041
- }
1042
- ],
1043
- "name": "getRole",
1044
- "outputs": [
1045
- {
1046
- "internalType": "RoleId",
1047
- "name": "role",
1048
- "type": "bytes8"
1049
- }
1050
- ],
1051
- "stateMutability": "view",
1052
- "type": "function"
1053
- },
1054
- {
1055
- "inputs": [],
1056
- "name": "getRoleCount",
1057
- "outputs": [
1058
- {
1059
- "internalType": "uint256",
1060
- "name": "roles",
1061
- "type": "uint256"
1062
- }
1063
- ],
1064
- "stateMutability": "view",
1065
- "type": "function"
1066
- },
1067
- {
1068
- "inputs": [
1069
- {
1070
- "internalType": "string",
1071
- "name": "roleName",
1072
- "type": "string"
1073
- }
1074
- ],
1075
- "name": "getRoleId",
1076
- "outputs": [
1077
- {
1078
- "internalType": "RoleId",
1079
- "name": "role",
1080
- "type": "bytes8"
603
+ },
604
+ {
605
+ "components": [
606
+ {
607
+ "internalType": "UFixed",
608
+ "name": "fractionalFee",
609
+ "type": "uint256"
610
+ },
611
+ {
612
+ "internalType": "uint256",
613
+ "name": "fixedFee",
614
+ "type": "uint256"
615
+ }
616
+ ],
617
+ "internalType": "struct Fee",
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",
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"
647
+ }
648
+ ],
649
+ "internalType": "struct ISetup.ProductSetupInfo",
650
+ "name": "setup",
651
+ "type": "tuple"
1081
652
  }
1082
653
  ],
1083
- "stateMutability": "pure",
654
+ "name": "createProductSetup",
655
+ "outputs": [],
656
+ "stateMutability": "nonpayable",
1084
657
  "type": "function"
1085
658
  },
1086
659
  {
1087
660
  "inputs": [
1088
661
  {
1089
- "internalType": "RoleId",
1090
- "name": "role",
662
+ "internalType": "RiskId",
663
+ "name": "riskId",
1091
664
  "type": "bytes8"
1092
- }
1093
- ],
1094
- "name": "getRoleInfo",
1095
- "outputs": [
665
+ },
1096
666
  {
1097
667
  "components": [
1098
668
  {
1099
- "internalType": "RoleId",
1100
- "name": "id",
1101
- "type": "bytes8"
1102
- },
1103
- {
1104
- "internalType": "string",
1105
- "name": "name",
1106
- "type": "string"
669
+ "internalType": "NftId",
670
+ "name": "productNftId",
671
+ "type": "uint96"
1107
672
  },
1108
673
  {
1109
- "internalType": "bool",
1110
- "name": "isActive",
1111
- "type": "bool"
674
+ "internalType": "bytes",
675
+ "name": "data",
676
+ "type": "bytes"
1112
677
  }
1113
678
  ],
1114
- "internalType": "struct IAccess.RoleInfo",
1115
- "name": "info",
679
+ "internalType": "struct IRisk.RiskInfo",
680
+ "name": "risk",
1116
681
  "type": "tuple"
1117
682
  }
1118
683
  ],
1119
- "stateMutability": "view",
684
+ "name": "createRisk",
685
+ "outputs": [],
686
+ "stateMutability": "nonpayable",
1120
687
  "type": "function"
1121
688
  },
1122
689
  {
1123
690
  "inputs": [
1124
691
  {
1125
- "internalType": "RoleId",
1126
- "name": "role",
1127
- "type": "bytes8"
1128
- },
1129
- {
1130
- "internalType": "uint256",
1131
- "name": "idx",
1132
- "type": "uint256"
692
+ "internalType": "Key32",
693
+ "name": "key",
694
+ "type": "bytes32"
1133
695
  }
1134
696
  ],
1135
- "name": "getRoleMember",
697
+ "name": "exists",
1136
698
  "outputs": [
1137
699
  {
1138
- "internalType": "address",
1139
- "name": "roleMember",
1140
- "type": "address"
700
+ "internalType": "bool",
701
+ "name": "",
702
+ "type": "bool"
1141
703
  }
1142
704
  ],
1143
705
  "stateMutability": "view",
@@ -1146,35 +708,68 @@
1146
708
  {
1147
709
  "inputs": [
1148
710
  {
1149
- "internalType": "RoleId",
1150
- "name": "role",
1151
- "type": "bytes8"
711
+ "internalType": "Key32",
712
+ "name": "key",
713
+ "type": "bytes32"
1152
714
  }
1153
715
  ],
1154
- "name": "getRoleMemberCount",
716
+ "name": "get",
1155
717
  "outputs": [
1156
718
  {
1157
- "internalType": "uint256",
1158
- "name": "roleMembers",
1159
- "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"
1160
761
  }
1161
762
  ],
1162
763
  "stateMutability": "view",
1163
764
  "type": "function"
1164
765
  },
1165
766
  {
1166
- "inputs": [
1167
- {
1168
- "internalType": "NftId",
1169
- "name": "componentNftId",
1170
- "type": "uint96"
1171
- }
1172
- ],
1173
- "name": "getTokenHandler",
767
+ "inputs": [],
768
+ "name": "getBundleManager",
1174
769
  "outputs": [
1175
770
  {
1176
- "internalType": "contract TokenHandler",
1177
- "name": "tokenHandler",
771
+ "internalType": "contract BundleManager",
772
+ "name": "",
1178
773
  "type": "address"
1179
774
  }
1180
775
  ],
@@ -1183,87 +778,76 @@
1183
778
  },
1184
779
  {
1185
780
  "inputs": [],
1186
- "name": "getType",
781
+ "name": "getBundleService",
1187
782
  "outputs": [
1188
783
  {
1189
- "internalType": "ObjectType",
1190
- "name": "objectType",
1191
- "type": "uint8"
784
+ "internalType": "contract IBundleService",
785
+ "name": "",
786
+ "type": "address"
1192
787
  }
1193
788
  ],
1194
- "stateMutability": "pure",
789
+ "stateMutability": "view",
1195
790
  "type": "function"
1196
791
  },
1197
792
  {
1198
- "inputs": [
1199
- {
1200
- "internalType": "uint256",
1201
- "name": "a",
1202
- "type": "uint256"
1203
- },
1204
- {
1205
- "internalType": "int8",
1206
- "name": "exp",
1207
- "type": "int8"
1208
- }
1209
- ],
1210
- "name": "getUFixed",
793
+ "inputs": [],
794
+ "name": "getComponentOwnerService",
1211
795
  "outputs": [
1212
796
  {
1213
- "internalType": "UFixed",
797
+ "internalType": "contract IComponentOwnerService",
1214
798
  "name": "",
1215
- "type": "uint256"
799
+ "type": "address"
1216
800
  }
1217
801
  ],
1218
- "stateMutability": "pure",
802
+ "stateMutability": "view",
1219
803
  "type": "function"
1220
804
  },
1221
805
  {
1222
806
  "inputs": [
1223
807
  {
1224
- "internalType": "uint256",
1225
- "name": "a",
1226
- "type": "uint256"
808
+ "internalType": "Key32",
809
+ "name": "key",
810
+ "type": "bytes32"
1227
811
  }
1228
812
  ],
1229
- "name": "getUFixed",
813
+ "name": "getData",
1230
814
  "outputs": [
1231
815
  {
1232
- "internalType": "UFixed",
1233
- "name": "",
1234
- "type": "uint256"
816
+ "internalType": "bytes",
817
+ "name": "data",
818
+ "type": "bytes"
1235
819
  }
1236
820
  ],
1237
- "stateMutability": "pure",
821
+ "stateMutability": "view",
1238
822
  "type": "function"
1239
823
  },
1240
824
  {
1241
825
  "inputs": [],
1242
- "name": "getVersion",
826
+ "name": "getDistributionService",
1243
827
  "outputs": [
1244
828
  {
1245
- "internalType": "Version",
829
+ "internalType": "contract IDistributionService",
1246
830
  "name": "",
1247
- "type": "uint24"
831
+ "type": "address"
1248
832
  }
1249
833
  ],
1250
- "stateMutability": "pure",
834
+ "stateMutability": "view",
1251
835
  "type": "function"
1252
836
  },
1253
837
  {
1254
838
  "inputs": [
1255
839
  {
1256
- "internalType": "uint256",
1257
- "name": "index",
1258
- "type": "uint256"
840
+ "internalType": "ObjectType",
841
+ "name": "objectType",
842
+ "type": "uint8"
1259
843
  }
1260
844
  ],
1261
- "name": "getVersion",
845
+ "name": "getInitialState",
1262
846
  "outputs": [
1263
847
  {
1264
- "internalType": "Version",
1265
- "name": "version",
1266
- "type": "uint24"
848
+ "internalType": "StateId",
849
+ "name": "",
850
+ "type": "uint8"
1267
851
  }
1268
852
  ],
1269
853
  "stateMutability": "view",
@@ -1271,12 +855,12 @@
1271
855
  },
1272
856
  {
1273
857
  "inputs": [],
1274
- "name": "getVersionCount",
858
+ "name": "getInstanceReader",
1275
859
  "outputs": [
1276
860
  {
1277
- "internalType": "uint256",
1278
- "name": "numberOfVersions",
1279
- "type": "uint256"
861
+ "internalType": "contract InstanceReader",
862
+ "name": "",
863
+ "type": "address"
1280
864
  }
1281
865
  ],
1282
866
  "stateMutability": "view",
@@ -1285,43 +869,43 @@
1285
869
  {
1286
870
  "inputs": [
1287
871
  {
1288
- "internalType": "Version",
1289
- "name": "version",
1290
- "type": "uint24"
872
+ "internalType": "Key32",
873
+ "name": "key",
874
+ "type": "bytes32"
1291
875
  }
1292
876
  ],
1293
- "name": "getVersionInfo",
877
+ "name": "getMetadata",
1294
878
  "outputs": [
1295
879
  {
1296
880
  "components": [
1297
881
  {
1298
- "internalType": "Version",
1299
- "name": "version",
1300
- "type": "uint24"
882
+ "internalType": "ObjectType",
883
+ "name": "objectType",
884
+ "type": "uint8"
1301
885
  },
1302
886
  {
1303
- "internalType": "address",
1304
- "name": "implementation",
1305
- "type": "address"
887
+ "internalType": "StateId",
888
+ "name": "state",
889
+ "type": "uint8"
1306
890
  },
1307
891
  {
1308
892
  "internalType": "address",
1309
- "name": "activatedBy",
893
+ "name": "updatedBy",
1310
894
  "type": "address"
1311
895
  },
1312
896
  {
1313
- "internalType": "Timestamp",
1314
- "name": "activatedAt",
1315
- "type": "uint40"
897
+ "internalType": "Blocknumber",
898
+ "name": "updatedIn",
899
+ "type": "uint32"
1316
900
  },
1317
901
  {
1318
902
  "internalType": "Blocknumber",
1319
- "name": "activatedIn",
903
+ "name": "createdIn",
1320
904
  "type": "uint32"
1321
905
  }
1322
906
  ],
1323
- "internalType": "struct IVersionable.VersionInfo",
1324
- "name": "versionInfo",
907
+ "internalType": "struct IKeyValueStore.Metadata",
908
+ "name": "metadata",
1325
909
  "type": "tuple"
1326
910
  }
1327
911
  ],
@@ -1330,66 +914,57 @@
1330
914
  },
1331
915
  {
1332
916
  "inputs": [],
1333
- "name": "getZeroFee",
917
+ "name": "getPolicyService",
1334
918
  "outputs": [
1335
919
  {
1336
- "components": [
1337
- {
1338
- "internalType": "UFixed",
1339
- "name": "fractionalFee",
1340
- "type": "uint256"
1341
- },
1342
- {
1343
- "internalType": "uint256",
1344
- "name": "fixedFee",
1345
- "type": "uint256"
1346
- }
1347
- ],
1348
- "internalType": "struct Fee",
1349
- "name": "fee",
1350
- "type": "tuple"
920
+ "internalType": "contract IPolicyService",
921
+ "name": "",
922
+ "type": "address"
1351
923
  }
1352
924
  ],
1353
- "stateMutability": "pure",
925
+ "stateMutability": "view",
1354
926
  "type": "function"
1355
927
  },
1356
928
  {
1357
- "inputs": [
929
+ "inputs": [],
930
+ "name": "getPoolService",
931
+ "outputs": [
1358
932
  {
1359
- "internalType": "RoleId",
1360
- "name": "role",
1361
- "type": "bytes8"
1362
- },
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": [
1363
945
  {
1364
- "internalType": "address",
1365
- "name": "member",
946
+ "internalType": "contract IProductService",
947
+ "name": "",
1366
948
  "type": "address"
1367
949
  }
1368
950
  ],
1369
- "name": "grantRole",
1370
- "outputs": [],
1371
- "stateMutability": "nonpayable",
951
+ "stateMutability": "view",
1372
952
  "type": "function"
1373
953
  },
1374
954
  {
1375
955
  "inputs": [
1376
956
  {
1377
- "internalType": "RoleId",
1378
- "name": "role",
1379
- "type": "bytes8"
1380
- },
1381
- {
1382
- "internalType": "address",
1383
- "name": "member",
1384
- "type": "address"
957
+ "internalType": "Key32",
958
+ "name": "key",
959
+ "type": "bytes32"
1385
960
  }
1386
961
  ],
1387
- "name": "hasRole",
962
+ "name": "getState",
1388
963
  "outputs": [
1389
964
  {
1390
- "internalType": "bool",
1391
- "name": "hasRole",
1392
- "type": "bool"
965
+ "internalType": "StateId",
966
+ "name": "state",
967
+ "type": "uint8"
1393
968
  }
1394
969
  ],
1395
970
  "stateMutability": "view",
@@ -1398,12 +973,12 @@
1398
973
  {
1399
974
  "inputs": [
1400
975
  {
1401
- "internalType": "Version",
1402
- "name": "version",
1403
- "type": "uint24"
976
+ "internalType": "ObjectType",
977
+ "name": "objectType",
978
+ "type": "uint8"
1404
979
  }
1405
980
  ],
1406
- "name": "isActivated",
981
+ "name": "hasLifecycle",
1407
982
  "outputs": [
1408
983
  {
1409
984
  "internalType": "bool",
@@ -1444,89 +1019,126 @@
1444
1019
  "type": "function"
1445
1020
  },
1446
1021
  {
1447
- "inputs": [],
1448
- "name": "register",
1022
+ "inputs": [
1023
+ {
1024
+ "internalType": "bytes4",
1025
+ "name": "interfaceId",
1026
+ "type": "bytes4"
1027
+ }
1028
+ ],
1029
+ "name": "supportsInterface",
1449
1030
  "outputs": [
1450
1031
  {
1451
- "internalType": "NftId",
1452
- "name": "nftId",
1453
- "type": "uint96"
1032
+ "internalType": "bool",
1033
+ "name": "",
1034
+ "type": "bool"
1454
1035
  }
1455
1036
  ],
1456
- "stateMutability": "nonpayable",
1037
+ "stateMutability": "view",
1457
1038
  "type": "function"
1458
1039
  },
1459
1040
  {
1460
1041
  "inputs": [
1461
- {
1462
- "internalType": "NftId",
1463
- "name": "nftId",
1464
- "type": "uint96"
1465
- },
1466
1042
  {
1467
1043
  "internalType": "ObjectType",
1468
1044
  "name": "objectType",
1469
1045
  "type": "uint8"
1470
1046
  },
1471
1047
  {
1472
- "internalType": "contract IERC20Metadata",
1473
- "name": "token",
1474
- "type": "address"
1048
+ "internalType": "KeyId",
1049
+ "name": "id",
1050
+ "type": "bytes31"
1475
1051
  }
1476
1052
  ],
1477
- "name": "registerComponent",
1478
- "outputs": [],
1479
- "stateMutability": "nonpayable",
1053
+ "name": "toKey32",
1054
+ "outputs": [
1055
+ {
1056
+ "internalType": "Key32",
1057
+ "name": "",
1058
+ "type": "bytes32"
1059
+ }
1060
+ ],
1061
+ "stateMutability": "pure",
1480
1062
  "type": "function"
1481
1063
  },
1482
1064
  {
1483
1065
  "inputs": [
1484
1066
  {
1485
1067
  "internalType": "NftId",
1486
- "name": "poolNftId",
1068
+ "name": "bundleNftId",
1487
1069
  "type": "uint96"
1488
1070
  },
1489
- {
1490
- "internalType": "address",
1491
- "name": "wallet",
1492
- "type": "address"
1493
- },
1494
1071
  {
1495
1072
  "components": [
1496
1073
  {
1497
- "internalType": "UFixed",
1498
- "name": "fractionalFee",
1074
+ "internalType": "NftId",
1075
+ "name": "poolNftId",
1076
+ "type": "uint96"
1077
+ },
1078
+ {
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"
1094
+ },
1095
+ {
1096
+ "internalType": "bytes",
1097
+ "name": "filter",
1098
+ "type": "bytes"
1099
+ },
1100
+ {
1101
+ "internalType": "uint256",
1102
+ "name": "capitalAmount",
1499
1103
  "type": "uint256"
1500
1104
  },
1501
1105
  {
1502
1106
  "internalType": "uint256",
1503
- "name": "fixedFee",
1107
+ "name": "lockedAmount",
1504
1108
  "type": "uint256"
1505
- }
1506
- ],
1507
- "internalType": "struct Fee",
1508
- "name": "stakingFee",
1509
- "type": "tuple"
1510
- },
1511
- {
1512
- "components": [
1109
+ },
1513
1110
  {
1514
- "internalType": "UFixed",
1515
- "name": "fractionalFee",
1111
+ "internalType": "uint256",
1112
+ "name": "balanceAmount",
1516
1113
  "type": "uint256"
1517
1114
  },
1518
1115
  {
1519
1116
  "internalType": "uint256",
1520
- "name": "fixedFee",
1117
+ "name": "lifetime",
1521
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"
1522
1129
  }
1523
1130
  ],
1524
- "internalType": "struct Fee",
1525
- "name": "performanceFee",
1131
+ "internalType": "struct IBundle.BundleInfo",
1132
+ "name": "bundle",
1526
1133
  "type": "tuple"
1134
+ },
1135
+ {
1136
+ "internalType": "StateId",
1137
+ "name": "newState",
1138
+ "type": "uint8"
1527
1139
  }
1528
1140
  ],
1529
- "name": "registerPool",
1141
+ "name": "updateBundle",
1530
1142
  "outputs": [],
1531
1143
  "stateMutability": "nonpayable",
1532
1144
  "type": "function"
@@ -1535,21 +1147,16 @@
1535
1147
  "inputs": [
1536
1148
  {
1537
1149
  "internalType": "NftId",
1538
- "name": "poolNftId",
1150
+ "name": "bundleNftId",
1539
1151
  "type": "uint96"
1540
1152
  },
1541
1153
  {
1542
- "internalType": "bool",
1543
- "name": "isVerifying",
1544
- "type": "bool"
1545
- },
1546
- {
1547
- "internalType": "UFixed",
1548
- "name": "collateralizationLevel",
1549
- "type": "uint256"
1154
+ "internalType": "StateId",
1155
+ "name": "newState",
1156
+ "type": "uint8"
1550
1157
  }
1551
1158
  ],
1552
- "name": "registerPool",
1159
+ "name": "updateBundleState",
1553
1160
  "outputs": [],
1554
1161
  "stateMutability": "nonpayable",
1555
1162
  "type": "function"
@@ -1558,65 +1165,60 @@
1558
1165
  "inputs": [
1559
1166
  {
1560
1167
  "internalType": "NftId",
1561
- "name": "productNftId",
1562
- "type": "uint96"
1563
- },
1564
- {
1565
- "internalType": "NftId",
1566
- "name": "distributorNftId",
1567
- "type": "uint96"
1568
- },
1569
- {
1570
- "internalType": "NftId",
1571
- "name": "poolNftId",
1168
+ "name": "distributionNftId",
1572
1169
  "type": "uint96"
1573
1170
  },
1574
- {
1575
- "internalType": "contract IERC20Metadata",
1576
- "name": "token",
1577
- "type": "address"
1578
- },
1579
- {
1580
- "internalType": "address",
1581
- "name": "wallet",
1582
- "type": "address"
1583
- },
1584
1171
  {
1585
1172
  "components": [
1586
1173
  {
1587
- "internalType": "UFixed",
1588
- "name": "fractionalFee",
1589
- "type": "uint256"
1174
+ "internalType": "NftId",
1175
+ "name": "productNftId",
1176
+ "type": "uint96"
1590
1177
  },
1591
1178
  {
1592
- "internalType": "uint256",
1593
- "name": "fixedFee",
1594
- "type": "uint256"
1595
- }
1596
- ],
1597
- "internalType": "struct Fee",
1598
- "name": "policyFee",
1599
- "type": "tuple"
1600
- },
1601
- {
1602
- "components": [
1179
+ "internalType": "contract TokenHandler",
1180
+ "name": "tokenHandler",
1181
+ "type": "address"
1182
+ },
1603
1183
  {
1604
- "internalType": "UFixed",
1605
- "name": "fractionalFee",
1606
- "type": "uint256"
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"
1607
1199
  },
1608
1200
  {
1609
- "internalType": "uint256",
1610
- "name": "fixedFee",
1611
- "type": "uint256"
1201
+ "internalType": "bool",
1202
+ "name": "isIntercepting",
1203
+ "type": "bool"
1204
+ },
1205
+ {
1206
+ "internalType": "address",
1207
+ "name": "wallet",
1208
+ "type": "address"
1612
1209
  }
1613
1210
  ],
1614
- "internalType": "struct Fee",
1615
- "name": "processingFee",
1211
+ "internalType": "struct ISetup.DistributionSetupInfo",
1212
+ "name": "setup",
1616
1213
  "type": "tuple"
1214
+ },
1215
+ {
1216
+ "internalType": "StateId",
1217
+ "name": "newState",
1218
+ "type": "uint8"
1617
1219
  }
1618
1220
  ],
1619
- "name": "registerProduct",
1221
+ "name": "updateDistributionSetup",
1620
1222
  "outputs": [],
1621
1223
  "stateMutability": "nonpayable",
1622
1224
  "type": "function"
@@ -1625,40 +1227,16 @@
1625
1227
  "inputs": [
1626
1228
  {
1627
1229
  "internalType": "NftId",
1628
- "name": "bundleNftId",
1629
- "type": "uint96"
1630
- },
1631
- {
1632
- "internalType": "NftId",
1633
- "name": "policyNftId",
1230
+ "name": "distributionNftId",
1634
1231
  "type": "uint96"
1635
- }
1636
- ],
1637
- "name": "releasePolicy",
1638
- "outputs": [
1639
- {
1640
- "internalType": "uint256",
1641
- "name": "collateralAmount",
1642
- "type": "uint256"
1643
- }
1644
- ],
1645
- "stateMutability": "nonpayable",
1646
- "type": "function"
1647
- },
1648
- {
1649
- "inputs": [
1650
- {
1651
- "internalType": "RoleId",
1652
- "name": "role",
1653
- "type": "bytes8"
1654
1232
  },
1655
1233
  {
1656
- "internalType": "address",
1657
- "name": "member",
1658
- "type": "address"
1234
+ "internalType": "StateId",
1235
+ "name": "newState",
1236
+ "type": "uint8"
1659
1237
  }
1660
1238
  ],
1661
- "name": "revokeRole",
1239
+ "name": "updateDistributionSetupState",
1662
1240
  "outputs": [],
1663
1241
  "stateMutability": "nonpayable",
1664
1242
  "type": "function"
@@ -1666,64 +1244,80 @@
1666
1244
  {
1667
1245
  "inputs": [
1668
1246
  {
1669
- "internalType": "RoleId",
1670
- "name": "role",
1671
- "type": "bytes8"
1672
- }
1673
- ],
1674
- "name": "roleExists",
1675
- "outputs": [
1676
- {
1677
- "internalType": "bool",
1678
- "name": "",
1679
- "type": "bool"
1680
- }
1681
- ],
1682
- "stateMutability": "view",
1683
- "type": "function"
1684
- },
1685
- {
1686
- "inputs": [
1247
+ "internalType": "NftId",
1248
+ "name": "policyNftId",
1249
+ "type": "uint96"
1250
+ },
1687
1251
  {
1688
1252
  "components": [
1689
1253
  {
1690
1254
  "internalType": "NftId",
1691
- "name": "nftId",
1255
+ "name": "productNftId",
1692
1256
  "type": "uint96"
1693
1257
  },
1694
1258
  {
1695
1259
  "internalType": "NftId",
1696
- "name": "poolNftId",
1260
+ "name": "bundleNftId",
1697
1261
  "type": "uint96"
1698
1262
  },
1699
1263
  {
1700
- "internalType": "StateId",
1701
- "name": "state",
1702
- "type": "uint8"
1264
+ "internalType": "ReferralId",
1265
+ "name": "referralId",
1266
+ "type": "bytes8"
1703
1267
  },
1704
1268
  {
1705
- "internalType": "bytes",
1706
- "name": "filter",
1707
- "type": "bytes"
1269
+ "internalType": "RiskId",
1270
+ "name": "riskId",
1271
+ "type": "bytes8"
1708
1272
  },
1709
1273
  {
1710
1274
  "internalType": "uint256",
1711
- "name": "capitalAmount",
1275
+ "name": "sumInsuredAmount",
1712
1276
  "type": "uint256"
1713
1277
  },
1714
1278
  {
1715
1279
  "internalType": "uint256",
1716
- "name": "lockedAmount",
1280
+ "name": "premiumAmount",
1717
1281
  "type": "uint256"
1718
1282
  },
1719
1283
  {
1720
1284
  "internalType": "uint256",
1721
- "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",
1722
1316
  "type": "uint256"
1723
1317
  },
1724
1318
  {
1725
1319
  "internalType": "Timestamp",
1726
- "name": "createdAt",
1320
+ "name": "activatedAt",
1727
1321
  "type": "uint40"
1728
1322
  },
1729
1323
  {
@@ -1735,145 +1329,318 @@
1735
1329
  "internalType": "Timestamp",
1736
1330
  "name": "closedAt",
1737
1331
  "type": "uint40"
1738
- },
1739
- {
1740
- "internalType": "Blocknumber",
1741
- "name": "updatedIn",
1742
- "type": "uint32"
1743
1332
  }
1744
1333
  ],
1745
- "internalType": "struct IBundle.BundleInfo",
1746
- "name": "bundleInfo",
1334
+ "internalType": "struct IPolicy.PolicyInfo",
1335
+ "name": "policy",
1747
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"
1748
1360
  }
1749
1361
  ],
1750
- "name": "setBundleInfo",
1362
+ "name": "updatePolicyState",
1751
1363
  "outputs": [],
1752
1364
  "stateMutability": "nonpayable",
1753
1365
  "type": "function"
1754
1366
  },
1755
1367
  {
1756
1368
  "inputs": [
1369
+ {
1370
+ "internalType": "NftId",
1371
+ "name": "poolNftId",
1372
+ "type": "uint96"
1373
+ },
1757
1374
  {
1758
1375
  "components": [
1759
1376
  {
1760
1377
  "internalType": "NftId",
1761
- "name": "nftId",
1378
+ "name": "productNftId",
1762
1379
  "type": "uint96"
1763
1380
  },
1764
1381
  {
1765
- "internalType": "StateId",
1766
- "name": "state",
1767
- "type": "uint8"
1382
+ "internalType": "contract TokenHandler",
1383
+ "name": "tokenHandler",
1384
+ "type": "address"
1385
+ },
1386
+ {
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"
1768
1451
  },
1769
1452
  {
1770
- "internalType": "contract IERC20Metadata",
1771
- "name": "token",
1453
+ "internalType": "address",
1454
+ "name": "wallet",
1772
1455
  "type": "address"
1773
1456
  }
1774
1457
  ],
1775
- "internalType": "struct IComponent.ComponentInfo",
1776
- "name": "info",
1458
+ "internalType": "struct ISetup.PoolSetupInfo",
1459
+ "name": "setup",
1777
1460
  "type": "tuple"
1461
+ },
1462
+ {
1463
+ "internalType": "StateId",
1464
+ "name": "newState",
1465
+ "type": "uint8"
1778
1466
  }
1779
1467
  ],
1780
- "name": "setComponentInfo",
1781
- "outputs": [
1468
+ "name": "updatePoolSetup",
1469
+ "outputs": [],
1470
+ "stateMutability": "nonpayable",
1471
+ "type": "function"
1472
+ },
1473
+ {
1474
+ "inputs": [
1782
1475
  {
1783
1476
  "internalType": "NftId",
1784
- "name": "componentNftId",
1477
+ "name": "poolNftId",
1785
1478
  "type": "uint96"
1479
+ },
1480
+ {
1481
+ "internalType": "StateId",
1482
+ "name": "newState",
1483
+ "type": "uint8"
1786
1484
  }
1787
1485
  ],
1486
+ "name": "updatePoolSetupState",
1487
+ "outputs": [],
1788
1488
  "stateMutability": "nonpayable",
1789
1489
  "type": "function"
1790
1490
  },
1791
1491
  {
1792
1492
  "inputs": [
1493
+ {
1494
+ "internalType": "NftId",
1495
+ "name": "productNftId",
1496
+ "type": "uint96"
1497
+ },
1793
1498
  {
1794
1499
  "components": [
1795
1500
  {
1796
- "internalType": "NftId",
1797
- "name": "nftId",
1798
- "type": "uint96"
1501
+ "internalType": "contract IERC20Metadata",
1502
+ "name": "token",
1503
+ "type": "address"
1799
1504
  },
1800
1505
  {
1801
- "internalType": "NftId",
1802
- "name": "productNftId",
1803
- "type": "uint96"
1506
+ "internalType": "contract TokenHandler",
1507
+ "name": "tokenHandler",
1508
+ "type": "address"
1804
1509
  },
1805
1510
  {
1806
1511
  "internalType": "NftId",
1807
- "name": "bundleNftId",
1512
+ "name": "distributionNftId",
1808
1513
  "type": "uint96"
1809
1514
  },
1810
1515
  {
1811
- "internalType": "address",
1812
- "name": "beneficiary",
1813
- "type": "address"
1814
- },
1815
- {
1816
- "internalType": "StateId",
1817
- "name": "state",
1818
- "type": "uint8"
1819
- },
1820
- {
1821
- "internalType": "uint256",
1822
- "name": "sumInsuredAmount",
1823
- "type": "uint256"
1824
- },
1825
- {
1826
- "internalType": "uint256",
1827
- "name": "premiumAmount",
1828
- "type": "uint256"
1516
+ "internalType": "NftId",
1517
+ "name": "poolNftId",
1518
+ "type": "uint96"
1829
1519
  },
1830
1520
  {
1831
- "internalType": "uint256",
1832
- "name": "premiumPaidAmount",
1833
- "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"
1834
1536
  },
1835
1537
  {
1836
- "internalType": "uint256",
1837
- "name": "lifetime",
1838
- "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"
1839
1553
  },
1840
1554
  {
1841
- "internalType": "bytes",
1842
- "name": "data",
1843
- "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"
1844
1570
  },
1845
1571
  {
1846
- "internalType": "Timestamp",
1847
- "name": "createdAt",
1848
- "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"
1849
1587
  },
1850
1588
  {
1851
- "internalType": "Timestamp",
1852
- "name": "activatedAt",
1853
- "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"
1854
1604
  },
1855
1605
  {
1856
- "internalType": "Timestamp",
1857
- "name": "expiredAt",
1858
- "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"
1859
1621
  },
1860
1622
  {
1861
- "internalType": "Timestamp",
1862
- "name": "closedAt",
1863
- "type": "uint40"
1623
+ "internalType": "bool",
1624
+ "name": "isIntercepting",
1625
+ "type": "bool"
1864
1626
  },
1865
1627
  {
1866
- "internalType": "Blocknumber",
1867
- "name": "updatedIn",
1868
- "type": "uint32"
1628
+ "internalType": "address",
1629
+ "name": "wallet",
1630
+ "type": "address"
1869
1631
  }
1870
1632
  ],
1871
- "internalType": "struct IPolicy.PolicyInfo",
1872
- "name": "policyInfo",
1633
+ "internalType": "struct ISetup.ProductSetupInfo",
1634
+ "name": "setup",
1873
1635
  "type": "tuple"
1636
+ },
1637
+ {
1638
+ "internalType": "StateId",
1639
+ "name": "newState",
1640
+ "type": "uint8"
1874
1641
  }
1875
1642
  ],
1876
- "name": "setPolicyInfo",
1643
+ "name": "updateProductSetup",
1877
1644
  "outputs": [],
1878
1645
  "stateMutability": "nonpayable",
1879
1646
  "type": "function"
@@ -1882,45 +1649,16 @@
1882
1649
  "inputs": [
1883
1650
  {
1884
1651
  "internalType": "NftId",
1885
- "name": "poolNftId",
1652
+ "name": "productNftId",
1886
1653
  "type": "uint96"
1887
1654
  },
1888
1655
  {
1889
- "components": [
1890
- {
1891
- "internalType": "UFixed",
1892
- "name": "fractionalFee",
1893
- "type": "uint256"
1894
- },
1895
- {
1896
- "internalType": "uint256",
1897
- "name": "fixedFee",
1898
- "type": "uint256"
1899
- }
1900
- ],
1901
- "internalType": "struct Fee",
1902
- "name": "stakingFee",
1903
- "type": "tuple"
1904
- },
1905
- {
1906
- "components": [
1907
- {
1908
- "internalType": "UFixed",
1909
- "name": "fractionalFee",
1910
- "type": "uint256"
1911
- },
1912
- {
1913
- "internalType": "uint256",
1914
- "name": "fixedFee",
1915
- "type": "uint256"
1916
- }
1917
- ],
1918
- "internalType": "struct Fee",
1919
- "name": "performanceFee",
1920
- "type": "tuple"
1656
+ "internalType": "StateId",
1657
+ "name": "newState",
1658
+ "type": "uint8"
1921
1659
  }
1922
1660
  ],
1923
- "name": "setPoolFees",
1661
+ "name": "updateProductSetupState",
1924
1662
  "outputs": [],
1925
1663
  "stateMutability": "nonpayable",
1926
1664
  "type": "function"
@@ -1928,46 +1666,34 @@
1928
1666
  {
1929
1667
  "inputs": [
1930
1668
  {
1931
- "internalType": "NftId",
1932
- "name": "productNftId",
1933
- "type": "uint96"
1669
+ "internalType": "RiskId",
1670
+ "name": "riskId",
1671
+ "type": "bytes8"
1934
1672
  },
1935
1673
  {
1936
1674
  "components": [
1937
1675
  {
1938
- "internalType": "UFixed",
1939
- "name": "fractionalFee",
1940
- "type": "uint256"
1676
+ "internalType": "NftId",
1677
+ "name": "productNftId",
1678
+ "type": "uint96"
1941
1679
  },
1942
1680
  {
1943
- "internalType": "uint256",
1944
- "name": "fixedFee",
1945
- "type": "uint256"
1681
+ "internalType": "bytes",
1682
+ "name": "data",
1683
+ "type": "bytes"
1946
1684
  }
1947
1685
  ],
1948
- "internalType": "struct Fee",
1949
- "name": "policyFee",
1686
+ "internalType": "struct IRisk.RiskInfo",
1687
+ "name": "risk",
1950
1688
  "type": "tuple"
1951
1689
  },
1952
1690
  {
1953
- "components": [
1954
- {
1955
- "internalType": "UFixed",
1956
- "name": "fractionalFee",
1957
- "type": "uint256"
1958
- },
1959
- {
1960
- "internalType": "uint256",
1961
- "name": "fixedFee",
1962
- "type": "uint256"
1963
- }
1964
- ],
1965
- "internalType": "struct Fee",
1966
- "name": "processingFee",
1967
- "type": "tuple"
1691
+ "internalType": "StateId",
1692
+ "name": "newState",
1693
+ "type": "uint8"
1968
1694
  }
1969
1695
  ],
1970
- "name": "setProductFees",
1696
+ "name": "updateRisk",
1971
1697
  "outputs": [],
1972
1698
  "stateMutability": "nonpayable",
1973
1699
  "type": "function"
@@ -1975,39 +1701,20 @@
1975
1701
  {
1976
1702
  "inputs": [
1977
1703
  {
1978
- "internalType": "RoleId",
1979
- "name": "role",
1704
+ "internalType": "RiskId",
1705
+ "name": "riskId",
1980
1706
  "type": "bytes8"
1981
1707
  },
1982
1708
  {
1983
- "internalType": "bool",
1984
- "name": "active",
1985
- "type": "bool"
1709
+ "internalType": "StateId",
1710
+ "name": "newState",
1711
+ "type": "uint8"
1986
1712
  }
1987
1713
  ],
1988
- "name": "setRoleState",
1714
+ "name": "updateRiskState",
1989
1715
  "outputs": [],
1990
1716
  "stateMutability": "nonpayable",
1991
1717
  "type": "function"
1992
- },
1993
- {
1994
- "inputs": [
1995
- {
1996
- "internalType": "bytes4",
1997
- "name": "interfaceId",
1998
- "type": "bytes4"
1999
- }
2000
- ],
2001
- "name": "supportsInterface",
2002
- "outputs": [
2003
- {
2004
- "internalType": "bool",
2005
- "name": "",
2006
- "type": "bool"
2007
- }
2008
- ],
2009
- "stateMutability": "view",
2010
- "type": "function"
2011
1718
  }
2012
1719
  ],
2013
1720
  "bytecode": "0x",