@etherisc/gif-next 0.0.2-e46206a-486 → 0.0.2-e59218b-293

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