@etherisc/gif-next 0.0.2-d679de9-140 → 0.0.2-d6f24e1-490

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