@etherisc/gif-next 0.0.2-e1e92ab-754 → 0.0.2-e26c262-698

Sign up to get free protection for your applications and to get access to all the features.
Files changed (454) hide show
  1. package/README.md +232 -2
  2. package/artifacts/contracts/components/Component.sol/Component.dbg.json +4 -0
  3. package/artifacts/contracts/components/Component.sol/Component.json +832 -0
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +1 -1
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +954 -192
  6. package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +4 -0
  7. package/artifacts/contracts/{instance/base/ComponentServiceBase.sol/ComponentServiceBase.json → components/IComponent.sol/IComponent.json} +192 -168
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
  9. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +719 -27
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +773 -127
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +556 -33
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +906 -266
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +702 -159
  18. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.dbg.json +4 -0
  19. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.json +1206 -0
  20. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +4 -0
  21. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +778 -0
  22. package/artifacts/contracts/instance/Cloneable.sol/Cloneable.dbg.json +4 -0
  23. package/artifacts/contracts/instance/Cloneable.sol/Cloneable.json +190 -0
  24. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  25. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +1415 -1008
  26. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +4 -0
  27. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +567 -0
  28. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  29. package/artifacts/contracts/instance/Instance.sol/Instance.json +2129 -1194
  30. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +4 -0
  31. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +1311 -0
  32. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +4 -0
  33. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +1279 -0
  34. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +4 -0
  35. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +1033 -0
  36. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +4 -0
  37. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +701 -0
  38. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +4 -0
  39. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +256 -0
  40. package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.dbg.json +4 -0
  41. package/artifacts/contracts/instance/base/{InstanceBase.sol/InstanceBase.json → ComponentService.sol/ComponentService.json} +203 -195
  42. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  43. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +27 -158
  44. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  45. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  46. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +67 -245
  47. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  48. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +36 -11
  49. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +4 -0
  50. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +237 -0
  51. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +4 -0
  52. package/artifacts/contracts/instance/module/{bundle/IBundle.sol → IBundle.sol}/IBundle.json +1 -1
  53. package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +4 -0
  54. package/artifacts/contracts/instance/module/{pool/IPoolModule.sol/IPool.json → IComponents.sol/IComponents.json} +2 -2
  55. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +4 -0
  56. package/artifacts/contracts/instance/module/{distribution/IDistribution.sol → IDistribution.sol}/IDistribution.json +1 -1
  57. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +4 -0
  58. package/artifacts/contracts/instance/module/{policy/IPolicy.sol → IPolicy.sol}/IPolicy.json +1 -1
  59. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +4 -0
  60. package/artifacts/contracts/instance/module/{risk/IRisk.sol → IRisk.sol}/IRisk.json +1 -1
  61. package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +4 -0
  62. package/artifacts/contracts/instance/{base/ModuleBase.sol/ModuleBase.json → module/ISetup.sol/ISetup.json} +2 -2
  63. package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +4 -0
  64. package/artifacts/contracts/instance/module/{treasury/ITreasury.sol → ITreasury.sol}/ITreasury.json +1 -1
  65. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.dbg.json +4 -0
  66. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.json +968 -0
  67. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +4 -0
  68. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.json +665 -0
  69. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +4 -0
  70. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +1093 -0
  71. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +4 -0
  72. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +661 -0
  73. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.dbg.json +4 -0
  74. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.json +754 -0
  75. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +4 -0
  76. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.json +637 -0
  77. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +1 -1
  78. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +1341 -239
  79. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +4 -0
  80. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +805 -0
  81. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.dbg.json +4 -0
  82. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.json +556 -0
  83. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +4 -0
  84. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +630 -0
  85. package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.dbg.json +4 -0
  86. package/artifacts/contracts/instance/service/{IComponentOwnerService.sol/IComponentOwnerService.json → IClaimService.sol/IClaimService.json} +150 -207
  87. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +1 -1
  88. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +727 -160
  89. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +4 -0
  90. package/artifacts/contracts/instance/{base/ServiceBase.sol/ServiceBase.json → service/IPolicyService.sol/IPolicyService.json} +263 -191
  91. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  92. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +84 -217
  93. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  94. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +47 -414
  95. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +4 -0
  96. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +1021 -0
  97. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +4 -0
  98. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +689 -0
  99. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  100. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +314 -243
  101. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +4 -0
  102. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +657 -0
  103. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  104. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +242 -533
  105. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +4 -0
  106. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +649 -0
  107. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  108. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +60 -2
  109. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  110. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +373 -61
  111. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
  112. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +234 -216
  113. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
  114. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +18 -0
  115. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  116. package/artifacts/contracts/registry/Registry.sol/Registry.json +333 -188
  117. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +4 -0
  118. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +285 -0
  119. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
  120. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +229 -297
  121. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
  122. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +312 -132
  123. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +4 -0
  124. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +547 -0
  125. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +4 -0
  126. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +498 -0
  127. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +1 -1
  128. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  129. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +41 -3
  130. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
  131. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +40 -29
  132. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +4 -0
  133. package/artifacts/contracts/{instance/module/component/IComponent.sol/IComponentModule.json → shared/IPolicyHolder.sol/IPolicyHolder.json} +69 -57
  134. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  135. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +21 -34
  136. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
  137. package/artifacts/contracts/{experiment/inheritance/IB.sol/IB.json → shared/IRegistryLinked.sol/IRegistryLinked.json} +18 -20
  138. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +4 -0
  139. package/artifacts/contracts/{components/IBaseComponent.sol/IBaseComponent.json → shared/IService.sol/IService.json} +59 -44
  140. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  141. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +2 -152
  142. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
  143. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +120 -27
  144. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +4 -0
  145. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +248 -0
  146. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
  147. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +294 -61
  148. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  149. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +129 -51
  150. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +4 -0
  151. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +84 -0
  152. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +4 -0
  153. package/artifacts/contracts/{instance/base/IService.sol/IService.json → shared/Service.sol/Service.json} +155 -151
  154. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +4 -0
  155. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +96 -0
  156. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
  157. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +2 -2
  158. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  159. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +2 -152
  160. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  161. package/artifacts/contracts/test/TestFee.sol/TestFee.json +2 -2
  162. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  163. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +129 -51
  164. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  165. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +14 -14
  166. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  167. package/artifacts/contracts/test/TestService.sol/TestService.json +148 -211
  168. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  169. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  170. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +2 -2
  171. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  172. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +8 -174
  173. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  174. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  175. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  176. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +2 -2
  177. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  178. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.dbg.json +4 -0
  179. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.json +100 -0
  180. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +4 -0
  181. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.json +104 -0
  182. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  183. package/artifacts/contracts/types/Fee.sol/FeeLib.json +2 -2
  184. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
  185. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +31 -17
  186. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  187. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +17 -4
  188. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  189. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +26 -3
  190. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +4 -0
  191. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.json +100 -0
  192. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  193. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  194. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.dbg.json +4 -0
  195. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.json +100 -0
  196. package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +4 -0
  197. package/artifacts/contracts/types/Referral.sol/ReferralLib.json +142 -0
  198. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +1 -1
  199. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +2 -2
  200. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +1 -1
  201. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +134 -8
  202. package/artifacts/contracts/types/Seconds.sol/SecondsLib.dbg.json +4 -0
  203. package/artifacts/contracts/types/Seconds.sol/SecondsLib.json +124 -0
  204. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  205. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
  206. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  207. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +38 -7
  208. package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +1 -1
  209. package/artifacts/contracts/types/UFixed.sol/MathLib.json +2 -2
  210. package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +1 -1
  211. package/artifacts/contracts/types/UFixed.sol/UFixedLib.json +2 -2
  212. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  213. package/artifacts/contracts/types/Version.sol/VersionLib.json +2 -2
  214. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  215. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +22 -3
  216. package/contracts/components/Component.sol +251 -0
  217. package/contracts/components/Distribution.sol +204 -79
  218. package/contracts/components/IComponent.sol +74 -0
  219. package/contracts/components/IDistributionComponent.sol +43 -18
  220. package/contracts/components/IPoolComponent.sol +88 -39
  221. package/contracts/components/IProductComponent.sol +12 -9
  222. package/contracts/components/Pool.sol +216 -163
  223. package/contracts/components/Product.sol +133 -139
  224. package/contracts/instance/AccessManagerUpgradeableInitializeable.sol +13 -0
  225. package/contracts/instance/BundleManager.sol +127 -0
  226. package/contracts/instance/Cloneable.sol +51 -0
  227. package/contracts/instance/IInstance.sol +85 -39
  228. package/contracts/instance/IInstanceService.sol +72 -0
  229. package/contracts/instance/Instance.sol +310 -66
  230. package/contracts/instance/InstanceAccessManager.sol +522 -0
  231. package/contracts/instance/InstanceReader.sol +290 -0
  232. package/contracts/instance/InstanceService.sol +495 -0
  233. package/contracts/instance/InstanceServiceManager.sol +54 -0
  234. package/contracts/instance/ObjectManager.sol +82 -0
  235. package/contracts/instance/base/ComponentService.sol +134 -0
  236. package/contracts/instance/base/IKeyValueStore.sol +13 -14
  237. package/contracts/instance/base/ILifecycle.sol +3 -3
  238. package/contracts/instance/base/KeyValueStore.sol +52 -38
  239. package/contracts/instance/base/Lifecycle.sol +12 -3
  240. package/contracts/instance/module/IAccess.sol +54 -0
  241. package/contracts/instance/module/IBundle.sol +21 -0
  242. package/contracts/instance/module/IComponents.sol +35 -0
  243. package/contracts/instance/module/IDistribution.sol +41 -0
  244. package/contracts/instance/module/IPolicy.sol +72 -0
  245. package/contracts/instance/module/IRisk.sol +11 -0
  246. package/contracts/instance/module/ISetup.sol +33 -0
  247. package/contracts/instance/module/ITreasury.sol +23 -0
  248. package/contracts/instance/service/ApplicationService.sol +350 -0
  249. package/contracts/instance/service/ApplicationServiceManager.sol +35 -0
  250. package/contracts/instance/service/BundleService.sol +336 -0
  251. package/contracts/instance/service/BundleServiceManager.sol +51 -0
  252. package/contracts/instance/service/ClaimService.sol +151 -0
  253. package/contracts/instance/service/ClaimServiceManager.sol +35 -0
  254. package/contracts/instance/service/DistributionService.sol +435 -22
  255. package/contracts/instance/service/DistributionServiceManager.sol +51 -0
  256. package/contracts/instance/service/IApplicationService.sol +82 -0
  257. package/contracts/instance/service/IBundleService.sol +62 -0
  258. package/contracts/instance/service/IClaimService.sol +61 -0
  259. package/contracts/instance/service/IDistributionService.sol +87 -1
  260. package/contracts/instance/service/IPolicyService.sol +72 -0
  261. package/contracts/instance/service/IPoolService.sol +22 -24
  262. package/contracts/instance/service/IProductService.sol +9 -76
  263. package/contracts/instance/service/PolicyService.sol +403 -0
  264. package/contracts/instance/service/PolicyServiceManager.sol +54 -0
  265. package/contracts/instance/service/PoolService.sol +181 -110
  266. package/contracts/instance/service/PoolServiceManager.sol +51 -0
  267. package/contracts/instance/service/ProductService.sol +163 -432
  268. package/contracts/instance/service/ProductServiceManager.sol +54 -0
  269. package/contracts/registry/ChainNft.sol +47 -24
  270. package/contracts/registry/IRegistry.sol +52 -8
  271. package/contracts/registry/IRegistryService.sol +52 -20
  272. package/contracts/registry/ITransferInterceptor.sol +1 -0
  273. package/contracts/registry/Registry.sol +277 -236
  274. package/contracts/registry/RegistryAccessManager.sol +216 -0
  275. package/contracts/registry/RegistryService.sol +113 -271
  276. package/contracts/registry/RegistryServiceManager.sol +24 -25
  277. package/contracts/registry/ReleaseManager.sol +322 -0
  278. package/contracts/registry/TokenRegistry.sol +116 -0
  279. package/contracts/shared/ERC165.sol +14 -8
  280. package/contracts/shared/INftOwnable.sol +11 -10
  281. package/contracts/shared/IPolicyHolder.sol +26 -0
  282. package/contracts/shared/IRegisterable.sol +4 -6
  283. package/contracts/shared/IRegistryLinked.sol +12 -0
  284. package/contracts/shared/IService.sol +18 -0
  285. package/contracts/shared/IVersionable.sol +4 -47
  286. package/contracts/shared/NftOwnable.sol +67 -83
  287. package/contracts/shared/PolicyHolder.sol +81 -0
  288. package/contracts/shared/ProxyManager.sol +100 -25
  289. package/contracts/shared/Registerable.sol +16 -31
  290. package/contracts/shared/RegistryLinked.sol +48 -0
  291. package/contracts/shared/Service.sol +58 -0
  292. package/contracts/shared/TokenHandler.sol +33 -0
  293. package/contracts/shared/Versionable.sol +4 -92
  294. package/contracts/test/TestRegisterable.sol +1 -1
  295. package/contracts/test/TestRoleId.sol +1 -1
  296. package/contracts/test/TestService.sol +6 -7
  297. package/contracts/types/Blocknumber.sol +1 -0
  298. package/contracts/types/ClaimId.sol +52 -0
  299. package/contracts/types/DistributorType.sol +55 -0
  300. package/contracts/types/Fee.sol +1 -0
  301. package/contracts/types/Key32.sol +8 -3
  302. package/contracts/types/NftId.sol +8 -0
  303. package/contracts/types/NftIdSet.sol +26 -24
  304. package/contracts/types/NumberId.sol +52 -0
  305. package/contracts/types/ObjectType.sol +40 -14
  306. package/contracts/types/PayoutId.sol +54 -0
  307. package/contracts/types/Referral.sol +89 -0
  308. package/contracts/types/RoleId.sol +67 -15
  309. package/contracts/types/Seconds.sol +54 -0
  310. package/contracts/types/StateId.sol +6 -1
  311. package/contracts/types/Timestamp.sol +17 -13
  312. package/contracts/types/UFixed.sol +1 -0
  313. package/contracts/types/Version.sol +5 -1
  314. package/package.json +3 -3
  315. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +0 -4
  316. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.json +0 -301
  317. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +0 -4
  318. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +0 -4
  319. package/artifacts/contracts/experiment/errors/Require.sol/Require.json +0 -105
  320. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +0 -4
  321. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +0 -105
  322. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +0 -4
  323. package/artifacts/contracts/experiment/inheritance/A.sol/A.json +0 -128
  324. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +0 -4
  325. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +0 -42
  326. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +0 -4
  327. package/artifacts/contracts/experiment/inheritance/B.sol/B.json +0 -76
  328. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +0 -4
  329. package/artifacts/contracts/experiment/inheritance/C.sol/C.json +0 -89
  330. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +0 -4
  331. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.json +0 -128
  332. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +0 -4
  333. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.json +0 -37
  334. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +0 -4
  335. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +0 -4
  336. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.json +0 -63
  337. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +0 -4
  338. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +0 -59
  339. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +0 -4
  340. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.json +0 -124
  341. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +0 -4
  342. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +0 -74
  343. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +0 -4
  344. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +0 -124
  345. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +0 -4
  346. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +0 -207
  347. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +0 -4
  348. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +0 -10
  349. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +0 -4
  350. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +0 -10
  351. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +0 -4
  352. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.json +0 -24
  353. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +0 -4
  354. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +0 -4
  355. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +0 -113
  356. package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +0 -4
  357. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +0 -4
  358. package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +0 -4
  359. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +0 -4
  360. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +0 -4
  361. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +0 -297
  362. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +0 -4
  363. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +0 -4
  364. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +0 -297
  365. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
  366. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +0 -117
  367. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +0 -4
  368. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.json +0 -10
  369. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +0 -4
  370. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.dbg.json +0 -4
  371. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.json +0 -10
  372. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.dbg.json +0 -4
  373. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.dbg.json +0 -4
  374. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.json +0 -10
  375. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +0 -4
  376. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +0 -4
  377. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +0 -271
  378. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
  379. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +0 -271
  380. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +0 -4
  381. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +0 -4
  382. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +0 -164
  383. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +0 -4
  384. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +0 -164
  385. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +0 -4
  386. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +0 -4
  387. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +0 -113
  388. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +0 -4
  389. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +0 -131
  390. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +0 -4
  391. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +0 -4
  392. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +0 -638
  393. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +0 -4
  394. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +0 -76
  395. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +0 -4
  396. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +0 -638
  397. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +0 -4
  398. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +0 -827
  399. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +0 -4
  400. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +0 -4
  401. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +0 -457
  402. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.dbg.json +0 -4
  403. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.json +0 -557
  404. package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +0 -4
  405. package/artifacts/contracts/test/TestPool.sol/TestPool.json +0 -716
  406. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +0 -4
  407. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +0 -744
  408. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.dbg.json +0 -4
  409. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.json +0 -99
  410. package/contracts/components/BaseComponent.sol +0 -79
  411. package/contracts/components/IBaseComponent.sol +0 -19
  412. package/contracts/experiment/errors/Require.sol +0 -38
  413. package/contracts/experiment/errors/Revert.sol +0 -44
  414. package/contracts/experiment/inheritance/A.sol +0 -53
  415. package/contracts/experiment/inheritance/B.sol +0 -28
  416. package/contracts/experiment/inheritance/C.sol +0 -34
  417. package/contracts/experiment/inheritance/IA.sol +0 -13
  418. package/contracts/experiment/inheritance/IB.sol +0 -10
  419. package/contracts/experiment/inheritance/IC.sol +0 -12
  420. package/contracts/experiment/statemachine/Dummy.sol +0 -27
  421. package/contracts/experiment/statemachine/ISM.sol +0 -25
  422. package/contracts/experiment/statemachine/SM.sol +0 -57
  423. package/contracts/experiment/statemachine/SimpleStateMachine.sol +0 -31
  424. package/contracts/experiment/types/TypeA.sol +0 -47
  425. package/contracts/experiment/types/TypeB.sol +0 -29
  426. package/contracts/instance/IInstanceLinked.sol +0 -8
  427. package/contracts/instance/base/ComponentServiceBase.sol +0 -49
  428. package/contracts/instance/base/IInstanceBase.sol +0 -23
  429. package/contracts/instance/base/IService.sol +0 -15
  430. package/contracts/instance/base/InstanceBase.sol +0 -89
  431. package/contracts/instance/base/ModuleBase.sol +0 -57
  432. package/contracts/instance/base/ServiceBase.sol +0 -44
  433. package/contracts/instance/module/bundle/BundleModule.sol +0 -134
  434. package/contracts/instance/module/bundle/IBundle.sol +0 -53
  435. package/contracts/instance/module/component/ComponentModule.sol +0 -71
  436. package/contracts/instance/module/component/IComponent.sol +0 -28
  437. package/contracts/instance/module/distribution/DistributionModule.sol +0 -17
  438. package/contracts/instance/module/distribution/IDistribution.sol +0 -10
  439. package/contracts/instance/module/policy/IPolicy.sol +0 -63
  440. package/contracts/instance/module/policy/PolicyModule.sol +0 -91
  441. package/contracts/instance/module/pool/IPoolModule.sol +0 -41
  442. package/contracts/instance/module/pool/PoolModule.sol +0 -95
  443. package/contracts/instance/module/risk/IRisk.sol +0 -26
  444. package/contracts/instance/module/risk/RiskModule.sol +0 -62
  445. package/contracts/instance/module/treasury/ITreasury.sol +0 -84
  446. package/contracts/instance/module/treasury/TokenHandler.sol +0 -48
  447. package/contracts/instance/module/treasury/TreasuryModule.sol +0 -131
  448. package/contracts/instance/service/ComponentOwnerService.sol +0 -315
  449. package/contracts/instance/service/IComponentOwnerService.sol +0 -20
  450. package/contracts/registry/IChainNft.sol +0 -22
  451. package/contracts/test/TestDistribution.sol +0 -22
  452. package/contracts/test/TestPool.sol +0 -27
  453. package/contracts/test/TestProduct.sol +0 -74
  454. package/contracts/types/ReferralId.sol +0 -48
@@ -7,319 +7,276 @@
7
7
  "inputs": [
8
8
  {
9
9
  "internalType": "address",
10
- "name": "registry",
10
+ "name": "authority",
11
11
  "type": "address"
12
- },
13
- {
14
- "internalType": "NftId",
15
- "name": "nftId",
16
- "type": "uint96"
17
12
  }
18
13
  ],
19
- "name": "ErrorAlreadyLinked",
14
+ "name": "AccessManagedInvalidAuthority",
20
15
  "type": "error"
21
16
  },
22
17
  {
23
18
  "inputs": [
24
19
  {
25
20
  "internalType": "address",
26
- "name": "contractAddress",
21
+ "name": "caller",
27
22
  "type": "address"
23
+ },
24
+ {
25
+ "internalType": "uint32",
26
+ "name": "delay",
27
+ "type": "uint32"
28
28
  }
29
29
  ],
30
- "name": "ErrorContractNotRegistered",
30
+ "name": "AccessManagedRequiredDelay",
31
31
  "type": "error"
32
32
  },
33
33
  {
34
34
  "inputs": [
35
35
  {
36
36
  "internalType": "address",
37
- "name": "account",
37
+ "name": "caller",
38
38
  "type": "address"
39
39
  }
40
40
  ],
41
- "name": "ErrorNotOwner",
41
+ "name": "AccessManagedUnauthorized",
42
42
  "type": "error"
43
43
  },
44
44
  {
45
45
  "inputs": [
46
46
  {
47
- "internalType": "address",
48
- "name": "registryAddress",
49
- "type": "address"
47
+ "internalType": "ObjectType",
48
+ "name": "objectType",
49
+ "type": "uint8"
50
+ },
51
+ {
52
+ "internalType": "StateId",
53
+ "name": "fromStateId",
54
+ "type": "uint8"
55
+ },
56
+ {
57
+ "internalType": "StateId",
58
+ "name": "toStateId",
59
+ "type": "uint8"
50
60
  }
51
61
  ],
52
- "name": "ErrorNotRegistry",
62
+ "name": "ErrorInvalidStateTransition",
53
63
  "type": "error"
54
64
  },
55
65
  {
56
- "inputs": [],
57
- "name": "ErrorRegistryAddressZero",
66
+ "inputs": [
67
+ {
68
+ "internalType": "NftId",
69
+ "name": "nftId",
70
+ "type": "uint96"
71
+ }
72
+ ],
73
+ "name": "ErrorNftOwnableAlreadyLinked",
58
74
  "type": "error"
59
75
  },
60
76
  {
61
77
  "inputs": [
62
78
  {
63
79
  "internalType": "address",
64
- "name": "registry",
80
+ "name": "contractAddress",
65
81
  "type": "address"
66
82
  }
67
83
  ],
68
- "name": "ErrorRegistryAlreadyInitialized",
84
+ "name": "ErrorNftOwnableContractNotRegistered",
69
85
  "type": "error"
70
86
  },
71
87
  {
72
88
  "inputs": [],
73
- "name": "ErrorRegistryNotInitialized",
89
+ "name": "ErrorNftOwnableInitialOwnerZero",
74
90
  "type": "error"
75
91
  },
76
92
  {
77
- "anonymous": false,
78
93
  "inputs": [
79
94
  {
80
- "indexed": false,
81
- "internalType": "Version",
82
- "name": "version",
83
- "type": "uint24"
84
- },
85
- {
86
- "indexed": false,
87
- "internalType": "address",
88
- "name": "implementation",
89
- "type": "address"
90
- },
91
- {
92
- "indexed": false,
93
95
  "internalType": "address",
94
- "name": "activatedBy",
96
+ "name": "account",
95
97
  "type": "address"
96
98
  }
97
99
  ],
98
- "name": "LogVersionableInitialized",
99
- "type": "event"
100
+ "name": "ErrorNftOwnableNotOwner",
101
+ "type": "error"
100
102
  },
101
103
  {
102
104
  "inputs": [
103
105
  {
104
106
  "internalType": "NftId",
105
- "name": "bundleNftId",
106
- "type": "uint96"
107
- },
108
- {
109
- "internalType": "NftId",
110
- "name": "poolNftId",
107
+ "name": "nftId",
111
108
  "type": "uint96"
112
109
  },
113
110
  {
114
- "internalType": "uint256",
115
- "name": "amount",
116
- "type": "uint256"
111
+ "internalType": "ObjectType",
112
+ "name": "objectType",
113
+ "type": "uint8"
117
114
  }
118
115
  ],
119
- "name": "addBundleToPool",
120
- "outputs": [],
121
- "stateMutability": "nonpayable",
122
- "type": "function"
116
+ "name": "ErrorNoLifecycle",
117
+ "type": "error"
123
118
  },
124
119
  {
125
120
  "inputs": [
126
121
  {
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"
122
+ "internalType": "address",
123
+ "name": "registryAddress",
124
+ "type": "address"
147
125
  }
148
126
  ],
149
- "name": "calculateFeeAmount",
150
- "outputs": [
151
- {
152
- "internalType": "uint256",
153
- "name": "feeAmount",
154
- "type": "uint256"
155
- },
127
+ "name": "ErrorNotRegistry",
128
+ "type": "error"
129
+ },
130
+ {
131
+ "anonymous": false,
132
+ "inputs": [
156
133
  {
157
- "internalType": "uint256",
158
- "name": "netAmount",
159
- "type": "uint256"
134
+ "indexed": false,
135
+ "internalType": "address",
136
+ "name": "authority",
137
+ "type": "address"
160
138
  }
161
139
  ],
162
- "stateMutability": "pure",
163
- "type": "function"
140
+ "name": "AuthorityUpdated",
141
+ "type": "event"
164
142
  },
165
143
  {
144
+ "anonymous": false,
166
145
  "inputs": [
167
146
  {
168
- "internalType": "NftId",
169
- "name": "bundleNftId",
170
- "type": "uint96"
147
+ "indexed": false,
148
+ "internalType": "ObjectType",
149
+ "name": "objectType",
150
+ "type": "uint8"
171
151
  },
172
152
  {
173
- "internalType": "NftId",
174
- "name": "policyNftId",
175
- "type": "uint96"
153
+ "indexed": false,
154
+ "internalType": "KeyId",
155
+ "name": "keyId",
156
+ "type": "bytes31"
176
157
  },
177
158
  {
178
- "internalType": "uint256",
179
- "name": "amount",
180
- "type": "uint256"
159
+ "indexed": false,
160
+ "internalType": "StateId",
161
+ "name": "state",
162
+ "type": "uint8"
163
+ },
164
+ {
165
+ "indexed": false,
166
+ "internalType": "address",
167
+ "name": "createdBy",
168
+ "type": "address"
169
+ },
170
+ {
171
+ "indexed": false,
172
+ "internalType": "address",
173
+ "name": "txOrigin",
174
+ "type": "address"
181
175
  }
182
176
  ],
183
- "name": "collateralizePolicy",
184
- "outputs": [],
185
- "stateMutability": "nonpayable",
186
- "type": "function"
177
+ "name": "LogInfoCreated",
178
+ "type": "event"
187
179
  },
188
180
  {
181
+ "anonymous": false,
189
182
  "inputs": [
190
183
  {
191
- "internalType": "NftId",
192
- "name": "bundleNftId",
193
- "type": "uint96"
184
+ "indexed": false,
185
+ "internalType": "ObjectType",
186
+ "name": "objectType",
187
+ "type": "uint8"
194
188
  },
195
189
  {
196
- "internalType": "NftId",
197
- "name": "poolNftId",
198
- "type": "uint96"
190
+ "indexed": false,
191
+ "internalType": "KeyId",
192
+ "name": "keyId",
193
+ "type": "bytes31"
199
194
  },
200
195
  {
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"
196
+ "indexed": false,
197
+ "internalType": "StateId",
198
+ "name": "state",
199
+ "type": "uint8"
216
200
  },
217
201
  {
218
- "internalType": "uint256",
219
- "name": "amount",
220
- "type": "uint256"
202
+ "indexed": false,
203
+ "internalType": "address",
204
+ "name": "updatedBy",
205
+ "type": "address"
221
206
  },
222
207
  {
223
- "internalType": "uint256",
224
- "name": "lifetime",
225
- "type": "uint256"
208
+ "indexed": false,
209
+ "internalType": "address",
210
+ "name": "txOrigin",
211
+ "type": "address"
226
212
  },
227
213
  {
228
- "internalType": "bytes",
229
- "name": "filter",
230
- "type": "bytes"
214
+ "indexed": false,
215
+ "internalType": "Blocknumber",
216
+ "name": "lastUpdatedIn",
217
+ "type": "uint32"
231
218
  }
232
219
  ],
233
- "name": "createBundleInfo",
234
- "outputs": [],
235
- "stateMutability": "nonpayable",
236
- "type": "function"
220
+ "name": "LogInfoUpdated",
221
+ "type": "event"
237
222
  },
238
223
  {
224
+ "anonymous": false,
239
225
  "inputs": [
240
226
  {
241
- "internalType": "NftId",
242
- "name": "policyNftId",
243
- "type": "uint96"
244
- },
245
- {
246
- "internalType": "NftId",
247
- "name": "productNftId",
248
- "type": "uint96"
249
- },
250
- {
251
- "internalType": "ReferralId",
252
- "name": "referralId",
253
- "type": "bytes8"
254
- },
255
- {
256
- "internalType": "RiskId",
257
- "name": "riskId",
258
- "type": "bytes8"
227
+ "indexed": false,
228
+ "internalType": "ObjectType",
229
+ "name": "objectType",
230
+ "type": "uint8"
259
231
  },
260
232
  {
261
- "internalType": "uint256",
262
- "name": "sumInsuredAmount",
263
- "type": "uint256"
233
+ "indexed": false,
234
+ "internalType": "KeyId",
235
+ "name": "keyId",
236
+ "type": "bytes31"
264
237
  },
265
238
  {
266
- "internalType": "uint256",
267
- "name": "premiumAmount",
268
- "type": "uint256"
239
+ "indexed": false,
240
+ "internalType": "StateId",
241
+ "name": "stateOld",
242
+ "type": "uint8"
269
243
  },
270
244
  {
271
- "internalType": "uint256",
272
- "name": "lifetime",
273
- "type": "uint256"
245
+ "indexed": false,
246
+ "internalType": "StateId",
247
+ "name": "stateNew",
248
+ "type": "uint8"
274
249
  },
275
250
  {
276
- "internalType": "NftId",
277
- "name": "bundleNftId",
278
- "type": "uint96"
279
- }
280
- ],
281
- "name": "createPolicyInfo",
282
- "outputs": [],
283
- "stateMutability": "nonpayable",
284
- "type": "function"
285
- },
286
- {
287
- "inputs": [
288
- {
289
- "internalType": "RiskId",
290
- "name": "riskId",
291
- "type": "bytes8"
251
+ "indexed": false,
252
+ "internalType": "address",
253
+ "name": "updatedBy",
254
+ "type": "address"
292
255
  },
293
256
  {
294
- "internalType": "NftId",
295
- "name": "productNftId",
296
- "type": "uint96"
257
+ "indexed": false,
258
+ "internalType": "address",
259
+ "name": "txOrigin",
260
+ "type": "address"
297
261
  },
298
262
  {
299
- "internalType": "bytes",
300
- "name": "data",
301
- "type": "bytes"
263
+ "indexed": false,
264
+ "internalType": "Blocknumber",
265
+ "name": "lastUpdatedIn",
266
+ "type": "uint32"
302
267
  }
303
268
  ],
304
- "name": "createRisk",
305
- "outputs": [],
306
- "stateMutability": "nonpayable",
307
- "type": "function"
269
+ "name": "LogStateUpdated",
270
+ "type": "event"
308
271
  },
309
272
  {
310
- "inputs": [
311
- {
312
- "internalType": "NftId",
313
- "name": "poolNftId",
314
- "type": "uint96"
315
- }
316
- ],
317
- "name": "getBundleCount",
273
+ "inputs": [],
274
+ "name": "authority",
318
275
  "outputs": [
319
276
  {
320
- "internalType": "uint256",
321
- "name": "bundleCount",
322
- "type": "uint256"
277
+ "internalType": "address",
278
+ "name": "",
279
+ "type": "address"
323
280
  }
324
281
  ],
325
282
  "stateMutability": "view",
@@ -329,24 +286,121 @@
329
286
  "inputs": [
330
287
  {
331
288
  "internalType": "NftId",
332
- "name": "nftId",
289
+ "name": "applicationNftId",
333
290
  "type": "uint96"
334
- }
335
- ],
336
- "name": "getBundleInfo",
337
- "outputs": [
291
+ },
338
292
  {
339
293
  "components": [
340
294
  {
341
295
  "internalType": "NftId",
342
- "name": "poolNftId",
296
+ "name": "productNftId",
343
297
  "type": "uint96"
344
298
  },
345
299
  {
346
- "components": [
347
- {
348
- "internalType": "UFixed",
349
- "name": "fractionalFee",
300
+ "internalType": "NftId",
301
+ "name": "bundleNftId",
302
+ "type": "uint96"
303
+ },
304
+ {
305
+ "internalType": "ReferralId",
306
+ "name": "referralId",
307
+ "type": "bytes8"
308
+ },
309
+ {
310
+ "internalType": "RiskId",
311
+ "name": "riskId",
312
+ "type": "bytes8"
313
+ },
314
+ {
315
+ "internalType": "uint256",
316
+ "name": "sumInsuredAmount",
317
+ "type": "uint256"
318
+ },
319
+ {
320
+ "internalType": "uint256",
321
+ "name": "premiumAmount",
322
+ "type": "uint256"
323
+ },
324
+ {
325
+ "internalType": "uint256",
326
+ "name": "premiumPaidAmount",
327
+ "type": "uint256"
328
+ },
329
+ {
330
+ "internalType": "Seconds",
331
+ "name": "lifetime",
332
+ "type": "uint40"
333
+ },
334
+ {
335
+ "internalType": "bytes",
336
+ "name": "applicationData",
337
+ "type": "bytes"
338
+ },
339
+ {
340
+ "internalType": "bytes",
341
+ "name": "policyData",
342
+ "type": "bytes"
343
+ },
344
+ {
345
+ "internalType": "uint16",
346
+ "name": "claimsCount",
347
+ "type": "uint16"
348
+ },
349
+ {
350
+ "internalType": "uint16",
351
+ "name": "openClaimsCount",
352
+ "type": "uint16"
353
+ },
354
+ {
355
+ "internalType": "uint256",
356
+ "name": "payoutAmount",
357
+ "type": "uint256"
358
+ },
359
+ {
360
+ "internalType": "Timestamp",
361
+ "name": "activatedAt",
362
+ "type": "uint40"
363
+ },
364
+ {
365
+ "internalType": "Timestamp",
366
+ "name": "expiredAt",
367
+ "type": "uint40"
368
+ },
369
+ {
370
+ "internalType": "Timestamp",
371
+ "name": "closedAt",
372
+ "type": "uint40"
373
+ }
374
+ ],
375
+ "internalType": "struct IPolicy.PolicyInfo",
376
+ "name": "policy",
377
+ "type": "tuple"
378
+ }
379
+ ],
380
+ "name": "createApplication",
381
+ "outputs": [],
382
+ "stateMutability": "nonpayable",
383
+ "type": "function"
384
+ },
385
+ {
386
+ "inputs": [
387
+ {
388
+ "internalType": "NftId",
389
+ "name": "bundleNftId",
390
+ "type": "uint96"
391
+ },
392
+ {
393
+ "components": [
394
+ {
395
+ "internalType": "NftId",
396
+ "name": "poolNftId",
397
+ "type": "uint96"
398
+ },
399
+ {
400
+ "components": [
401
+ {
402
+ "internalType": "UFixed",
403
+ "name": "fractionalFee",
350
404
  "type": "uint256"
351
405
  },
352
406
  {
@@ -360,76 +414,463 @@
360
414
  "type": "tuple"
361
415
  },
362
416
  {
363
- "internalType": "bytes",
364
- "name": "filter",
365
- "type": "bytes"
417
+ "internalType": "bytes",
418
+ "name": "filter",
419
+ "type": "bytes"
420
+ },
421
+ {
422
+ "internalType": "uint256",
423
+ "name": "capitalAmount",
424
+ "type": "uint256"
425
+ },
426
+ {
427
+ "internalType": "uint256",
428
+ "name": "lockedAmount",
429
+ "type": "uint256"
430
+ },
431
+ {
432
+ "internalType": "uint256",
433
+ "name": "balanceAmount",
434
+ "type": "uint256"
435
+ },
436
+ {
437
+ "internalType": "Seconds",
438
+ "name": "lifetime",
439
+ "type": "uint40"
440
+ },
441
+ {
442
+ "internalType": "Timestamp",
443
+ "name": "expiredAt",
444
+ "type": "uint40"
445
+ },
446
+ {
447
+ "internalType": "Timestamp",
448
+ "name": "closedAt",
449
+ "type": "uint40"
450
+ }
451
+ ],
452
+ "internalType": "struct IBundle.BundleInfo",
453
+ "name": "bundle",
454
+ "type": "tuple"
455
+ }
456
+ ],
457
+ "name": "createBundle",
458
+ "outputs": [],
459
+ "stateMutability": "nonpayable",
460
+ "type": "function"
461
+ },
462
+ {
463
+ "inputs": [
464
+ {
465
+ "internalType": "NftId",
466
+ "name": "distributionNftId",
467
+ "type": "uint96"
468
+ },
469
+ {
470
+ "components": [
471
+ {
472
+ "internalType": "NftId",
473
+ "name": "productNftId",
474
+ "type": "uint96"
475
+ },
476
+ {
477
+ "internalType": "contract TokenHandler",
478
+ "name": "tokenHandler",
479
+ "type": "address"
480
+ },
481
+ {
482
+ "components": [
483
+ {
484
+ "internalType": "UFixed",
485
+ "name": "fractionalFee",
486
+ "type": "uint256"
487
+ },
488
+ {
489
+ "internalType": "uint256",
490
+ "name": "fixedFee",
491
+ "type": "uint256"
492
+ }
493
+ ],
494
+ "internalType": "struct Fee",
495
+ "name": "minDistributionOwnerFee",
496
+ "type": "tuple"
497
+ },
498
+ {
499
+ "components": [
500
+ {
501
+ "internalType": "UFixed",
502
+ "name": "fractionalFee",
503
+ "type": "uint256"
504
+ },
505
+ {
506
+ "internalType": "uint256",
507
+ "name": "fixedFee",
508
+ "type": "uint256"
509
+ }
510
+ ],
511
+ "internalType": "struct Fee",
512
+ "name": "distributionFee",
513
+ "type": "tuple"
514
+ },
515
+ {
516
+ "internalType": "address",
517
+ "name": "wallet",
518
+ "type": "address"
519
+ },
520
+ {
521
+ "internalType": "uint256",
522
+ "name": "sumDistributionOwnerFees",
523
+ "type": "uint256"
524
+ }
525
+ ],
526
+ "internalType": "struct ISetup.DistributionSetupInfo",
527
+ "name": "setup",
528
+ "type": "tuple"
529
+ }
530
+ ],
531
+ "name": "createDistributionSetup",
532
+ "outputs": [],
533
+ "stateMutability": "nonpayable",
534
+ "type": "function"
535
+ },
536
+ {
537
+ "inputs": [
538
+ {
539
+ "internalType": "NftId",
540
+ "name": "nftId",
541
+ "type": "uint96"
542
+ },
543
+ {
544
+ "components": [
545
+ {
546
+ "internalType": "DistributorType",
547
+ "name": "distributorType",
548
+ "type": "bytes8"
549
+ },
550
+ {
551
+ "internalType": "bool",
552
+ "name": "active",
553
+ "type": "bool"
554
+ },
555
+ {
556
+ "internalType": "bytes",
557
+ "name": "data",
558
+ "type": "bytes"
559
+ },
560
+ {
561
+ "internalType": "uint256",
562
+ "name": "sumCommisions",
563
+ "type": "uint256"
564
+ },
565
+ {
566
+ "internalType": "uint256",
567
+ "name": "numPoliciesSold",
568
+ "type": "uint256"
569
+ }
570
+ ],
571
+ "internalType": "struct IDistribution.DistributorInfo",
572
+ "name": "info",
573
+ "type": "tuple"
574
+ }
575
+ ],
576
+ "name": "createDistributor",
577
+ "outputs": [],
578
+ "stateMutability": "nonpayable",
579
+ "type": "function"
580
+ },
581
+ {
582
+ "inputs": [
583
+ {
584
+ "internalType": "Key32",
585
+ "name": "distributorKey",
586
+ "type": "bytes32"
587
+ },
588
+ {
589
+ "components": [
590
+ {
591
+ "internalType": "string",
592
+ "name": "name",
593
+ "type": "string"
594
+ },
595
+ {
596
+ "internalType": "UFixed",
597
+ "name": "minDiscountPercentage",
598
+ "type": "uint256"
599
+ },
600
+ {
601
+ "internalType": "UFixed",
602
+ "name": "maxDiscountPercentage",
603
+ "type": "uint256"
604
+ },
605
+ {
606
+ "internalType": "UFixed",
607
+ "name": "commissionPercentage",
608
+ "type": "uint256"
609
+ },
610
+ {
611
+ "internalType": "uint32",
612
+ "name": "maxReferralCount",
613
+ "type": "uint32"
614
+ },
615
+ {
616
+ "internalType": "uint32",
617
+ "name": "maxReferralLifetime",
618
+ "type": "uint32"
619
+ },
620
+ {
621
+ "internalType": "bool",
622
+ "name": "allowSelfReferrals",
623
+ "type": "bool"
624
+ },
625
+ {
626
+ "internalType": "bool",
627
+ "name": "allowRenewals",
628
+ "type": "bool"
629
+ },
630
+ {
631
+ "internalType": "bytes",
632
+ "name": "data",
633
+ "type": "bytes"
634
+ }
635
+ ],
636
+ "internalType": "struct IDistribution.DistributorTypeInfo",
637
+ "name": "info",
638
+ "type": "tuple"
639
+ }
640
+ ],
641
+ "name": "createDistributorType",
642
+ "outputs": [],
643
+ "stateMutability": "nonpayable",
644
+ "type": "function"
645
+ },
646
+ {
647
+ "inputs": [
648
+ {
649
+ "internalType": "NftId",
650
+ "name": "poolNftId",
651
+ "type": "uint96"
652
+ },
653
+ {
654
+ "components": [
655
+ {
656
+ "internalType": "string",
657
+ "name": "name",
658
+ "type": "string"
659
+ },
660
+ {
661
+ "internalType": "contract IERC20Metadata",
662
+ "name": "token",
663
+ "type": "address"
664
+ },
665
+ {
666
+ "internalType": "contract TokenHandler",
667
+ "name": "tokenHandler",
668
+ "type": "address"
669
+ },
670
+ {
671
+ "internalType": "address",
672
+ "name": "wallet",
673
+ "type": "address"
674
+ },
675
+ {
676
+ "internalType": "bytes",
677
+ "name": "data",
678
+ "type": "bytes"
679
+ }
680
+ ],
681
+ "internalType": "struct IComponents.ComponentInfo",
682
+ "name": "info",
683
+ "type": "tuple"
684
+ }
685
+ ],
686
+ "name": "createPoolSetup",
687
+ "outputs": [],
688
+ "stateMutability": "nonpayable",
689
+ "type": "function"
690
+ },
691
+ {
692
+ "inputs": [
693
+ {
694
+ "internalType": "NftId",
695
+ "name": "productNftId",
696
+ "type": "uint96"
697
+ },
698
+ {
699
+ "components": [
700
+ {
701
+ "internalType": "contract IERC20Metadata",
702
+ "name": "token",
703
+ "type": "address"
704
+ },
705
+ {
706
+ "internalType": "contract TokenHandler",
707
+ "name": "tokenHandler",
708
+ "type": "address"
709
+ },
710
+ {
711
+ "internalType": "NftId",
712
+ "name": "distributionNftId",
713
+ "type": "uint96"
714
+ },
715
+ {
716
+ "internalType": "NftId",
717
+ "name": "poolNftId",
718
+ "type": "uint96"
719
+ },
720
+ {
721
+ "components": [
722
+ {
723
+ "internalType": "UFixed",
724
+ "name": "fractionalFee",
725
+ "type": "uint256"
726
+ },
727
+ {
728
+ "internalType": "uint256",
729
+ "name": "fixedFee",
730
+ "type": "uint256"
731
+ }
732
+ ],
733
+ "internalType": "struct Fee",
734
+ "name": "productFee",
735
+ "type": "tuple"
736
+ },
737
+ {
738
+ "components": [
739
+ {
740
+ "internalType": "UFixed",
741
+ "name": "fractionalFee",
742
+ "type": "uint256"
743
+ },
744
+ {
745
+ "internalType": "uint256",
746
+ "name": "fixedFee",
747
+ "type": "uint256"
748
+ }
749
+ ],
750
+ "internalType": "struct Fee",
751
+ "name": "processingFee",
752
+ "type": "tuple"
753
+ },
754
+ {
755
+ "internalType": "bool",
756
+ "name": "isIntercepting",
757
+ "type": "bool"
758
+ },
759
+ {
760
+ "internalType": "address",
761
+ "name": "wallet",
762
+ "type": "address"
763
+ }
764
+ ],
765
+ "internalType": "struct ISetup.ProductSetupInfo",
766
+ "name": "setup",
767
+ "type": "tuple"
768
+ }
769
+ ],
770
+ "name": "createProductSetup",
771
+ "outputs": [],
772
+ "stateMutability": "nonpayable",
773
+ "type": "function"
774
+ },
775
+ {
776
+ "inputs": [
777
+ {
778
+ "internalType": "Key32",
779
+ "name": "referralKey",
780
+ "type": "bytes32"
781
+ },
782
+ {
783
+ "components": [
784
+ {
785
+ "internalType": "NftId",
786
+ "name": "distributorNftId",
787
+ "type": "uint96"
788
+ },
789
+ {
790
+ "internalType": "string",
791
+ "name": "referralCode",
792
+ "type": "string"
366
793
  },
367
794
  {
368
- "internalType": "uint256",
369
- "name": "capitalAmount",
795
+ "internalType": "UFixed",
796
+ "name": "discountPercentage",
370
797
  "type": "uint256"
371
798
  },
372
799
  {
373
- "internalType": "uint256",
374
- "name": "lockedAmount",
375
- "type": "uint256"
800
+ "internalType": "uint32",
801
+ "name": "maxReferrals",
802
+ "type": "uint32"
376
803
  },
377
804
  {
378
- "internalType": "uint256",
379
- "name": "balanceAmount",
380
- "type": "uint256"
805
+ "internalType": "uint32",
806
+ "name": "usedReferrals",
807
+ "type": "uint32"
381
808
  },
382
809
  {
383
810
  "internalType": "Timestamp",
384
- "name": "expiredAt",
811
+ "name": "expiryAt",
385
812
  "type": "uint40"
386
813
  },
387
814
  {
388
- "internalType": "Timestamp",
389
- "name": "closedAt",
390
- "type": "uint40"
815
+ "internalType": "bytes",
816
+ "name": "data",
817
+ "type": "bytes"
391
818
  }
392
819
  ],
393
- "internalType": "struct IBundle.BundleInfo",
394
- "name": "bundleInfo",
820
+ "internalType": "struct IDistribution.ReferralInfo",
821
+ "name": "referralInfo",
395
822
  "type": "tuple"
396
823
  }
397
824
  ],
398
- "stateMutability": "view",
825
+ "name": "createReferral",
826
+ "outputs": [],
827
+ "stateMutability": "nonpayable",
399
828
  "type": "function"
400
829
  },
401
830
  {
402
831
  "inputs": [
403
832
  {
404
- "internalType": "NftId",
405
- "name": "poolNftId",
406
- "type": "uint96"
833
+ "internalType": "RiskId",
834
+ "name": "riskId",
835
+ "type": "bytes8"
407
836
  },
408
837
  {
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"
838
+ "components": [
839
+ {
840
+ "internalType": "NftId",
841
+ "name": "productNftId",
842
+ "type": "uint96"
843
+ },
844
+ {
845
+ "internalType": "bytes",
846
+ "name": "data",
847
+ "type": "bytes"
848
+ }
849
+ ],
850
+ "internalType": "struct IRisk.RiskInfo",
851
+ "name": "risk",
852
+ "type": "tuple"
420
853
  }
421
854
  ],
422
- "stateMutability": "view",
855
+ "name": "createRisk",
856
+ "outputs": [],
857
+ "stateMutability": "nonpayable",
423
858
  "type": "function"
424
859
  },
425
860
  {
426
- "inputs": [],
427
- "name": "getComponentCount",
861
+ "inputs": [
862
+ {
863
+ "internalType": "Key32",
864
+ "name": "key",
865
+ "type": "bytes32"
866
+ }
867
+ ],
868
+ "name": "exists",
428
869
  "outputs": [
429
870
  {
430
- "internalType": "uint256",
431
- "name": "numberOfCompnents",
432
- "type": "uint256"
871
+ "internalType": "bool",
872
+ "name": "",
873
+ "type": "bool"
433
874
  }
434
875
  ],
435
876
  "stateMutability": "view",
@@ -438,17 +879,56 @@
438
879
  {
439
880
  "inputs": [
440
881
  {
441
- "internalType": "uint256",
442
- "name": "idx",
443
- "type": "uint256"
882
+ "internalType": "Key32",
883
+ "name": "key",
884
+ "type": "bytes32"
444
885
  }
445
886
  ],
446
- "name": "getComponentId",
887
+ "name": "get",
447
888
  "outputs": [
448
889
  {
449
- "internalType": "NftId",
450
- "name": "nftId",
451
- "type": "uint96"
890
+ "components": [
891
+ {
892
+ "components": [
893
+ {
894
+ "internalType": "ObjectType",
895
+ "name": "objectType",
896
+ "type": "uint8"
897
+ },
898
+ {
899
+ "internalType": "StateId",
900
+ "name": "state",
901
+ "type": "uint8"
902
+ },
903
+ {
904
+ "internalType": "address",
905
+ "name": "updatedBy",
906
+ "type": "address"
907
+ },
908
+ {
909
+ "internalType": "Blocknumber",
910
+ "name": "updatedIn",
911
+ "type": "uint32"
912
+ },
913
+ {
914
+ "internalType": "Blocknumber",
915
+ "name": "createdIn",
916
+ "type": "uint32"
917
+ }
918
+ ],
919
+ "internalType": "struct IKeyValueStore.Metadata",
920
+ "name": "metadata",
921
+ "type": "tuple"
922
+ },
923
+ {
924
+ "internalType": "bytes",
925
+ "name": "data",
926
+ "type": "bytes"
927
+ }
928
+ ],
929
+ "internalType": "struct IKeyValueStore.Value",
930
+ "name": "value",
931
+ "type": "tuple"
452
932
  }
453
933
  ],
454
934
  "stateMutability": "view",
@@ -456,10 +936,10 @@
456
936
  },
457
937
  {
458
938
  "inputs": [],
459
- "name": "getComponentOwnerService",
939
+ "name": "getBundleManager",
460
940
  "outputs": [
461
941
  {
462
- "internalType": "contract IComponentOwnerService",
942
+ "internalType": "contract BundleManager",
463
943
  "name": "",
464
944
  "type": "address"
465
945
  }
@@ -468,18 +948,12 @@
468
948
  "type": "function"
469
949
  },
470
950
  {
471
- "inputs": [
472
- {
473
- "internalType": "NftId",
474
- "name": "nftId",
475
- "type": "uint96"
476
- }
477
- ],
478
- "name": "getComponentToken",
951
+ "inputs": [],
952
+ "name": "getBundleService",
479
953
  "outputs": [
480
954
  {
481
- "internalType": "contract IERC20Metadata",
482
- "name": "token",
955
+ "internalType": "contract IBundleService",
956
+ "name": "",
483
957
  "type": "address"
484
958
  }
485
959
  ],
@@ -489,17 +963,17 @@
489
963
  {
490
964
  "inputs": [
491
965
  {
492
- "internalType": "NftId",
493
- "name": "nftId",
494
- "type": "uint96"
966
+ "internalType": "Key32",
967
+ "name": "key",
968
+ "type": "bytes32"
495
969
  }
496
970
  ],
497
- "name": "getComponentWallet",
971
+ "name": "getData",
498
972
  "outputs": [
499
973
  {
500
- "internalType": "address",
501
- "name": "wallet",
502
- "type": "address"
974
+ "internalType": "bytes",
975
+ "name": "data",
976
+ "type": "bytes"
503
977
  }
504
978
  ],
505
979
  "stateMutability": "view",
@@ -518,42 +992,6 @@
518
992
  "stateMutability": "view",
519
993
  "type": "function"
520
994
  },
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
995
  {
558
996
  "inputs": [],
559
997
  "name": "getInitialInfo",
@@ -599,24 +1037,25 @@
599
1037
  "internalType": "struct IRegistry.ObjectInfo",
600
1038
  "name": "",
601
1039
  "type": "tuple"
602
- },
603
- {
604
- "internalType": "bytes",
605
- "name": "data",
606
- "type": "bytes"
607
1040
  }
608
1041
  ],
609
1042
  "stateMutability": "view",
610
1043
  "type": "function"
611
1044
  },
612
1045
  {
613
- "inputs": [],
614
- "name": "getInitializedVersion",
1046
+ "inputs": [
1047
+ {
1048
+ "internalType": "ObjectType",
1049
+ "name": "objectType",
1050
+ "type": "uint8"
1051
+ }
1052
+ ],
1053
+ "name": "getInitialState",
615
1054
  "outputs": [
616
1055
  {
617
- "internalType": "uint64",
1056
+ "internalType": "StateId",
618
1057
  "name": "",
619
- "type": "uint64"
1058
+ "type": "uint8"
620
1059
  }
621
1060
  ],
622
1061
  "stateMutability": "view",
@@ -624,11 +1063,11 @@
624
1063
  },
625
1064
  {
626
1065
  "inputs": [],
627
- "name": "getKeyValueStore",
1066
+ "name": "getInstanceAccessManager",
628
1067
  "outputs": [
629
1068
  {
630
- "internalType": "contract IKeyValueStore",
631
- "name": "keyValueStore",
1069
+ "internalType": "contract InstanceAccessManager",
1070
+ "name": "",
632
1071
  "type": "address"
633
1072
  }
634
1073
  ],
@@ -637,12 +1076,12 @@
637
1076
  },
638
1077
  {
639
1078
  "inputs": [],
640
- "name": "getNftId",
1079
+ "name": "getInstanceReader",
641
1080
  "outputs": [
642
1081
  {
643
- "internalType": "NftId",
1082
+ "internalType": "contract InstanceReader",
644
1083
  "name": "",
645
- "type": "uint96"
1084
+ "type": "address"
646
1085
  }
647
1086
  ],
648
1087
  "stateMutability": "view",
@@ -650,102 +1089,57 @@
650
1089
  },
651
1090
  {
652
1091
  "inputs": [],
653
- "name": "getOwner",
1092
+ "name": "getMajorVersion",
654
1093
  "outputs": [
655
1094
  {
656
- "internalType": "address",
657
- "name": "owner",
658
- "type": "address"
1095
+ "internalType": "VersionPart",
1096
+ "name": "majorVersion",
1097
+ "type": "uint8"
659
1098
  }
660
1099
  ],
661
- "stateMutability": "view",
1100
+ "stateMutability": "pure",
662
1101
  "type": "function"
663
1102
  },
664
1103
  {
665
1104
  "inputs": [
666
1105
  {
667
- "internalType": "NftId",
668
- "name": "nftId",
669
- "type": "uint96"
1106
+ "internalType": "Key32",
1107
+ "name": "key",
1108
+ "type": "bytes32"
670
1109
  }
671
1110
  ],
672
- "name": "getPolicyInfo",
1111
+ "name": "getMetadata",
673
1112
  "outputs": [
674
1113
  {
675
1114
  "components": [
676
1115
  {
677
- "internalType": "NftId",
678
- "name": "productNftId",
679
- "type": "uint96"
680
- },
681
- {
682
- "internalType": "NftId",
683
- "name": "bundleNftId",
684
- "type": "uint96"
685
- },
686
- {
687
- "internalType": "ReferralId",
688
- "name": "referralId",
689
- "type": "bytes8"
690
- },
691
- {
692
- "internalType": "address",
693
- "name": "beneficiary",
694
- "type": "address"
695
- },
696
- {
697
- "internalType": "RiskId",
698
- "name": "riskId",
699
- "type": "bytes8"
700
- },
701
- {
702
- "internalType": "uint256",
703
- "name": "sumInsuredAmount",
704
- "type": "uint256"
705
- },
706
- {
707
- "internalType": "uint256",
708
- "name": "premiumAmount",
709
- "type": "uint256"
710
- },
711
- {
712
- "internalType": "uint256",
713
- "name": "premiumPaidAmount",
714
- "type": "uint256"
715
- },
716
- {
717
- "internalType": "uint256",
718
- "name": "lifetime",
719
- "type": "uint256"
720
- },
721
- {
722
- "internalType": "bytes",
723
- "name": "applicationData",
724
- "type": "bytes"
725
- },
726
- {
727
- "internalType": "bytes",
728
- "name": "policyData",
729
- "type": "bytes"
1116
+ "internalType": "ObjectType",
1117
+ "name": "objectType",
1118
+ "type": "uint8"
730
1119
  },
731
1120
  {
732
- "internalType": "Timestamp",
733
- "name": "activatedAt",
734
- "type": "uint40"
1121
+ "internalType": "StateId",
1122
+ "name": "state",
1123
+ "type": "uint8"
735
1124
  },
736
1125
  {
737
- "internalType": "Timestamp",
738
- "name": "expiredAt",
739
- "type": "uint40"
1126
+ "internalType": "address",
1127
+ "name": "updatedBy",
1128
+ "type": "address"
740
1129
  },
741
1130
  {
742
- "internalType": "Timestamp",
743
- "name": "closedAt",
744
- "type": "uint40"
1131
+ "internalType": "Blocknumber",
1132
+ "name": "updatedIn",
1133
+ "type": "uint32"
1134
+ },
1135
+ {
1136
+ "internalType": "Blocknumber",
1137
+ "name": "createdIn",
1138
+ "type": "uint32"
745
1139
  }
746
1140
  ],
747
- "internalType": "struct IPolicy.PolicyInfo",
748
- "name": "info",
1141
+ "internalType": "struct IKeyValueStore.Metadata",
1142
+ "name": "metadata",
749
1143
  "type": "tuple"
750
1144
  }
751
1145
  ],
@@ -753,31 +1147,26 @@
753
1147
  "type": "function"
754
1148
  },
755
1149
  {
756
- "inputs": [
1150
+ "inputs": [],
1151
+ "name": "getNftId",
1152
+ "outputs": [
757
1153
  {
758
1154
  "internalType": "NftId",
759
- "name": "nftId",
1155
+ "name": "",
760
1156
  "type": "uint96"
761
1157
  }
762
1158
  ],
763
- "name": "getPoolInfo",
1159
+ "stateMutability": "view",
1160
+ "type": "function"
1161
+ },
1162
+ {
1163
+ "inputs": [],
1164
+ "name": "getOwner",
764
1165
  "outputs": [
765
1166
  {
766
- "components": [
767
- {
768
- "internalType": "bool",
769
- "name": "isVerifying",
770
- "type": "bool"
771
- },
772
- {
773
- "internalType": "UFixed",
774
- "name": "collateralizationLevel",
775
- "type": "uint256"
776
- }
777
- ],
778
- "internalType": "struct IPool.PoolInfo",
779
- "name": "info",
780
- "type": "tuple"
1167
+ "internalType": "address",
1168
+ "name": "",
1169
+ "type": "address"
781
1170
  }
782
1171
  ],
783
1172
  "stateMutability": "view",
@@ -785,10 +1174,10 @@
785
1174
  },
786
1175
  {
787
1176
  "inputs": [],
788
- "name": "getPoolService",
1177
+ "name": "getPolicyService",
789
1178
  "outputs": [
790
1179
  {
791
- "internalType": "contract IPoolService",
1180
+ "internalType": "contract IPolicyService",
792
1181
  "name": "",
793
1182
  "type": "address"
794
1183
  }
@@ -797,19 +1186,13 @@
797
1186
  "type": "function"
798
1187
  },
799
1188
  {
800
- "inputs": [
801
- {
802
- "internalType": "NftId",
803
- "name": "componentNftId",
804
- "type": "uint96"
805
- }
806
- ],
807
- "name": "getProductNftId",
1189
+ "inputs": [],
1190
+ "name": "getPoolService",
808
1191
  "outputs": [
809
1192
  {
810
- "internalType": "NftId",
811
- "name": "productNftId",
812
- "type": "uint96"
1193
+ "internalType": "contract IPoolService",
1194
+ "name": "",
1195
+ "type": "address"
813
1196
  }
814
1197
  ],
815
1198
  "stateMutability": "view",
@@ -834,7 +1217,7 @@
834
1217
  "outputs": [
835
1218
  {
836
1219
  "internalType": "contract IRegistry",
837
- "name": "registry",
1220
+ "name": "",
838
1221
  "type": "address"
839
1222
  }
840
1223
  ],
@@ -842,31 +1225,13 @@
842
1225
  "type": "function"
843
1226
  },
844
1227
  {
845
- "inputs": [
846
- {
847
- "internalType": "RiskId",
848
- "name": "riskId",
849
- "type": "bytes8"
850
- }
851
- ],
852
- "name": "getRiskInfo",
1228
+ "inputs": [],
1229
+ "name": "getRegistryAddress",
853
1230
  "outputs": [
854
1231
  {
855
- "components": [
856
- {
857
- "internalType": "NftId",
858
- "name": "productNftId",
859
- "type": "uint96"
860
- },
861
- {
862
- "internalType": "bytes",
863
- "name": "data",
864
- "type": "bytes"
865
- }
866
- ],
867
- "internalType": "struct IRisk.RiskInfo",
868
- "name": "info",
869
- "type": "tuple"
1232
+ "internalType": "address",
1233
+ "name": "",
1234
+ "type": "address"
870
1235
  }
871
1236
  ],
872
1237
  "stateMutability": "view",
@@ -894,17 +1259,30 @@
894
1259
  {
895
1260
  "inputs": [
896
1261
  {
897
- "internalType": "NftId",
898
- "name": "componentNftId",
899
- "type": "uint96"
1262
+ "internalType": "ObjectType",
1263
+ "name": "objectType",
1264
+ "type": "uint8"
900
1265
  }
901
1266
  ],
902
- "name": "getTokenHandler",
1267
+ "name": "hasLifecycle",
903
1268
  "outputs": [
904
1269
  {
905
- "internalType": "contract TokenHandler",
906
- "name": "tokenHandler",
907
- "type": "address"
1270
+ "internalType": "bool",
1271
+ "name": "",
1272
+ "type": "bool"
1273
+ }
1274
+ ],
1275
+ "stateMutability": "view",
1276
+ "type": "function"
1277
+ },
1278
+ {
1279
+ "inputs": [],
1280
+ "name": "isConsumingScheduledOp",
1281
+ "outputs": [
1282
+ {
1283
+ "internalType": "bytes4",
1284
+ "name": "",
1285
+ "type": "bytes4"
908
1286
  }
909
1287
  ],
910
1288
  "stateMutability": "view",
@@ -913,338 +1291,250 @@
913
1291
  {
914
1292
  "inputs": [
915
1293
  {
916
- "internalType": "NftId",
917
- "name": "productNftId",
918
- "type": "uint96"
1294
+ "internalType": "ObjectType",
1295
+ "name": "objectType",
1296
+ "type": "uint8"
1297
+ },
1298
+ {
1299
+ "internalType": "StateId",
1300
+ "name": "fromId",
1301
+ "type": "uint8"
1302
+ },
1303
+ {
1304
+ "internalType": "StateId",
1305
+ "name": "toId",
1306
+ "type": "uint8"
919
1307
  }
920
1308
  ],
921
- "name": "getTreasuryInfo",
1309
+ "name": "isValidTransition",
922
1310
  "outputs": [
923
1311
  {
924
- "components": [
925
- {
926
- "internalType": "NftId",
927
- "name": "poolNftId",
928
- "type": "uint96"
929
- },
930
- {
931
- "internalType": "NftId",
932
- "name": "distributionNftId",
933
- "type": "uint96"
934
- },
935
- {
936
- "internalType": "contract IERC20Metadata",
937
- "name": "token",
938
- "type": "address"
939
- },
940
- {
941
- "components": [
942
- {
943
- "internalType": "UFixed",
944
- "name": "fractionalFee",
945
- "type": "uint256"
946
- },
947
- {
948
- "internalType": "uint256",
949
- "name": "fixedFee",
950
- "type": "uint256"
951
- }
952
- ],
953
- "internalType": "struct Fee",
954
- "name": "productFee",
955
- "type": "tuple"
956
- },
957
- {
958
- "components": [
959
- {
960
- "internalType": "UFixed",
961
- "name": "fractionalFee",
962
- "type": "uint256"
963
- },
964
- {
965
- "internalType": "uint256",
966
- "name": "fixedFee",
967
- "type": "uint256"
968
- }
969
- ],
970
- "internalType": "struct Fee",
971
- "name": "processingFee",
972
- "type": "tuple"
973
- },
974
- {
975
- "components": [
976
- {
977
- "internalType": "UFixed",
978
- "name": "fractionalFee",
979
- "type": "uint256"
980
- },
981
- {
982
- "internalType": "uint256",
983
- "name": "fixedFee",
984
- "type": "uint256"
985
- }
986
- ],
987
- "internalType": "struct Fee",
988
- "name": "poolFee",
989
- "type": "tuple"
990
- },
991
- {
992
- "components": [
993
- {
994
- "internalType": "UFixed",
995
- "name": "fractionalFee",
996
- "type": "uint256"
997
- },
998
- {
999
- "internalType": "uint256",
1000
- "name": "fixedFee",
1001
- "type": "uint256"
1002
- }
1003
- ],
1004
- "internalType": "struct Fee",
1005
- "name": "stakingFee",
1006
- "type": "tuple"
1007
- },
1008
- {
1009
- "components": [
1010
- {
1011
- "internalType": "UFixed",
1012
- "name": "fractionalFee",
1013
- "type": "uint256"
1014
- },
1015
- {
1016
- "internalType": "uint256",
1017
- "name": "fixedFee",
1018
- "type": "uint256"
1019
- }
1020
- ],
1021
- "internalType": "struct Fee",
1022
- "name": "performanceFee",
1023
- "type": "tuple"
1024
- },
1025
- {
1026
- "components": [
1027
- {
1028
- "internalType": "UFixed",
1029
- "name": "fractionalFee",
1030
- "type": "uint256"
1031
- },
1032
- {
1033
- "internalType": "uint256",
1034
- "name": "fixedFee",
1035
- "type": "uint256"
1036
- }
1037
- ],
1038
- "internalType": "struct Fee",
1039
- "name": "distributionFee",
1040
- "type": "tuple"
1041
- }
1042
- ],
1043
- "internalType": "struct ITreasury.TreasuryInfo",
1044
- "name": "info",
1045
- "type": "tuple"
1312
+ "internalType": "bool",
1313
+ "name": "",
1314
+ "type": "bool"
1315
+ }
1316
+ ],
1317
+ "stateMutability": "view",
1318
+ "type": "function"
1319
+ },
1320
+ {
1321
+ "inputs": [],
1322
+ "name": "linkToRegisteredNftId",
1323
+ "outputs": [],
1324
+ "stateMutability": "nonpayable",
1325
+ "type": "function"
1326
+ },
1327
+ {
1328
+ "inputs": [
1329
+ {
1330
+ "internalType": "address",
1331
+ "name": "to",
1332
+ "type": "address"
1333
+ },
1334
+ {
1335
+ "internalType": "uint256",
1336
+ "name": "tokenId",
1337
+ "type": "uint256"
1046
1338
  }
1047
1339
  ],
1048
- "stateMutability": "view",
1340
+ "name": "nftMint",
1341
+ "outputs": [],
1342
+ "stateMutability": "nonpayable",
1049
1343
  "type": "function"
1050
1344
  },
1051
1345
  {
1052
1346
  "inputs": [
1053
1347
  {
1054
- "internalType": "uint256",
1055
- "name": "a",
1056
- "type": "uint256"
1348
+ "internalType": "address",
1349
+ "name": "from",
1350
+ "type": "address"
1057
1351
  },
1058
1352
  {
1059
- "internalType": "int8",
1060
- "name": "exp",
1061
- "type": "int8"
1062
- }
1063
- ],
1064
- "name": "getUFixed",
1065
- "outputs": [
1353
+ "internalType": "address",
1354
+ "name": "to",
1355
+ "type": "address"
1356
+ },
1066
1357
  {
1067
- "internalType": "UFixed",
1068
- "name": "",
1358
+ "internalType": "uint256",
1359
+ "name": "tokenId",
1069
1360
  "type": "uint256"
1070
1361
  }
1071
1362
  ],
1072
- "stateMutability": "pure",
1363
+ "name": "nftTransferFrom",
1364
+ "outputs": [],
1365
+ "stateMutability": "nonpayable",
1073
1366
  "type": "function"
1074
1367
  },
1075
1368
  {
1076
1369
  "inputs": [
1077
1370
  {
1078
- "internalType": "uint256",
1079
- "name": "a",
1080
- "type": "uint256"
1081
- }
1082
- ],
1083
- "name": "getUFixed",
1084
- "outputs": [
1085
- {
1086
- "internalType": "UFixed",
1371
+ "internalType": "address",
1087
1372
  "name": "",
1088
- "type": "uint256"
1373
+ "type": "address"
1089
1374
  }
1090
1375
  ],
1091
- "stateMutability": "pure",
1376
+ "name": "setAuthority",
1377
+ "outputs": [],
1378
+ "stateMutability": "nonpayable",
1092
1379
  "type": "function"
1093
1380
  },
1094
1381
  {
1095
- "inputs": [],
1096
- "name": "getVersion",
1097
- "outputs": [
1382
+ "inputs": [
1098
1383
  {
1099
- "internalType": "Version",
1100
- "name": "",
1101
- "type": "uint24"
1384
+ "internalType": "contract InstanceAccessManager",
1385
+ "name": "accessManager",
1386
+ "type": "address"
1102
1387
  }
1103
1388
  ],
1104
- "stateMutability": "pure",
1389
+ "name": "setInstanceAccessManager",
1390
+ "outputs": [],
1391
+ "stateMutability": "nonpayable",
1105
1392
  "type": "function"
1106
1393
  },
1107
1394
  {
1108
1395
  "inputs": [
1109
1396
  {
1110
- "internalType": "uint256",
1111
- "name": "index",
1112
- "type": "uint256"
1397
+ "internalType": "bytes4",
1398
+ "name": "interfaceId",
1399
+ "type": "bytes4"
1113
1400
  }
1114
1401
  ],
1115
- "name": "getVersion",
1402
+ "name": "supportsInterface",
1116
1403
  "outputs": [
1117
1404
  {
1118
- "internalType": "Version",
1119
- "name": "version",
1120
- "type": "uint24"
1405
+ "internalType": "bool",
1406
+ "name": "",
1407
+ "type": "bool"
1121
1408
  }
1122
1409
  ],
1123
1410
  "stateMutability": "view",
1124
1411
  "type": "function"
1125
1412
  },
1126
1413
  {
1127
- "inputs": [],
1128
- "name": "getVersionCount",
1414
+ "inputs": [
1415
+ {
1416
+ "internalType": "ObjectType",
1417
+ "name": "objectType",
1418
+ "type": "uint8"
1419
+ },
1420
+ {
1421
+ "internalType": "KeyId",
1422
+ "name": "id",
1423
+ "type": "bytes31"
1424
+ }
1425
+ ],
1426
+ "name": "toKey32",
1129
1427
  "outputs": [
1130
1428
  {
1131
- "internalType": "uint256",
1132
- "name": "numberOfVersions",
1133
- "type": "uint256"
1429
+ "internalType": "Key32",
1430
+ "name": "",
1431
+ "type": "bytes32"
1134
1432
  }
1135
1433
  ],
1136
- "stateMutability": "view",
1434
+ "stateMutability": "pure",
1137
1435
  "type": "function"
1138
1436
  },
1139
1437
  {
1140
1438
  "inputs": [
1141
1439
  {
1142
- "internalType": "Version",
1143
- "name": "version",
1144
- "type": "uint24"
1145
- }
1146
- ],
1147
- "name": "getVersionInfo",
1148
- "outputs": [
1440
+ "internalType": "NftId",
1441
+ "name": "applicationNftId",
1442
+ "type": "uint96"
1443
+ },
1149
1444
  {
1150
1445
  "components": [
1151
1446
  {
1152
- "internalType": "Version",
1153
- "name": "version",
1154
- "type": "uint24"
1447
+ "internalType": "NftId",
1448
+ "name": "productNftId",
1449
+ "type": "uint96"
1155
1450
  },
1156
1451
  {
1157
- "internalType": "address",
1158
- "name": "implementation",
1159
- "type": "address"
1452
+ "internalType": "NftId",
1453
+ "name": "bundleNftId",
1454
+ "type": "uint96"
1160
1455
  },
1161
1456
  {
1162
- "internalType": "address",
1163
- "name": "activatedBy",
1164
- "type": "address"
1457
+ "internalType": "ReferralId",
1458
+ "name": "referralId",
1459
+ "type": "bytes8"
1165
1460
  },
1166
1461
  {
1167
- "internalType": "Timestamp",
1168
- "name": "activatedAt",
1169
- "type": "uint40"
1462
+ "internalType": "RiskId",
1463
+ "name": "riskId",
1464
+ "type": "bytes8"
1170
1465
  },
1171
1466
  {
1172
- "internalType": "Blocknumber",
1173
- "name": "activatedIn",
1174
- "type": "uint32"
1175
- }
1176
- ],
1177
- "internalType": "struct IVersionable.VersionInfo",
1178
- "name": "versionInfo",
1179
- "type": "tuple"
1180
- }
1181
- ],
1182
- "stateMutability": "view",
1183
- "type": "function"
1184
- },
1185
- {
1186
- "inputs": [],
1187
- "name": "getZeroFee",
1188
- "outputs": [
1189
- {
1190
- "components": [
1467
+ "internalType": "uint256",
1468
+ "name": "sumInsuredAmount",
1469
+ "type": "uint256"
1470
+ },
1191
1471
  {
1192
- "internalType": "UFixed",
1193
- "name": "fractionalFee",
1472
+ "internalType": "uint256",
1473
+ "name": "premiumAmount",
1194
1474
  "type": "uint256"
1195
1475
  },
1196
1476
  {
1197
1477
  "internalType": "uint256",
1198
- "name": "fixedFee",
1478
+ "name": "premiumPaidAmount",
1479
+ "type": "uint256"
1480
+ },
1481
+ {
1482
+ "internalType": "Seconds",
1483
+ "name": "lifetime",
1484
+ "type": "uint40"
1485
+ },
1486
+ {
1487
+ "internalType": "bytes",
1488
+ "name": "applicationData",
1489
+ "type": "bytes"
1490
+ },
1491
+ {
1492
+ "internalType": "bytes",
1493
+ "name": "policyData",
1494
+ "type": "bytes"
1495
+ },
1496
+ {
1497
+ "internalType": "uint16",
1498
+ "name": "claimsCount",
1499
+ "type": "uint16"
1500
+ },
1501
+ {
1502
+ "internalType": "uint16",
1503
+ "name": "openClaimsCount",
1504
+ "type": "uint16"
1505
+ },
1506
+ {
1507
+ "internalType": "uint256",
1508
+ "name": "payoutAmount",
1199
1509
  "type": "uint256"
1510
+ },
1511
+ {
1512
+ "internalType": "Timestamp",
1513
+ "name": "activatedAt",
1514
+ "type": "uint40"
1515
+ },
1516
+ {
1517
+ "internalType": "Timestamp",
1518
+ "name": "expiredAt",
1519
+ "type": "uint40"
1520
+ },
1521
+ {
1522
+ "internalType": "Timestamp",
1523
+ "name": "closedAt",
1524
+ "type": "uint40"
1200
1525
  }
1201
1526
  ],
1202
- "internalType": "struct Fee",
1203
- "name": "fee",
1527
+ "internalType": "struct IPolicy.PolicyInfo",
1528
+ "name": "policy",
1204
1529
  "type": "tuple"
1205
- }
1206
- ],
1207
- "stateMutability": "view",
1208
- "type": "function"
1209
- },
1210
- {
1211
- "inputs": [
1212
- {
1213
- "internalType": "NftId",
1214
- "name": "productNftId",
1215
- "type": "uint96"
1216
- }
1217
- ],
1218
- "name": "hasTreasuryInfo",
1219
- "outputs": [
1220
- {
1221
- "internalType": "bool",
1222
- "name": "hasInfo",
1223
- "type": "bool"
1224
- }
1225
- ],
1226
- "stateMutability": "view",
1227
- "type": "function"
1228
- },
1229
- {
1230
- "inputs": [
1231
- {
1232
- "internalType": "address",
1233
- "name": "implementation",
1234
- "type": "address"
1235
- },
1236
- {
1237
- "internalType": "address",
1238
- "name": "activatedBy",
1239
- "type": "address"
1240
1530
  },
1241
1531
  {
1242
- "internalType": "bytes",
1243
- "name": "activationData",
1244
- "type": "bytes"
1532
+ "internalType": "StateId",
1533
+ "name": "newState",
1534
+ "type": "uint8"
1245
1535
  }
1246
1536
  ],
1247
- "name": "initialize",
1537
+ "name": "updateApplication",
1248
1538
  "outputs": [],
1249
1539
  "stateMutability": "nonpayable",
1250
1540
  "type": "function"
@@ -1252,25 +1542,17 @@
1252
1542
  {
1253
1543
  "inputs": [
1254
1544
  {
1255
- "internalType": "Version",
1256
- "name": "version",
1257
- "type": "uint24"
1258
- }
1259
- ],
1260
- "name": "isInitialized",
1261
- "outputs": [
1545
+ "internalType": "NftId",
1546
+ "name": "applicationNftId",
1547
+ "type": "uint96"
1548
+ },
1262
1549
  {
1263
- "internalType": "bool",
1264
- "name": "",
1265
- "type": "bool"
1550
+ "internalType": "StateId",
1551
+ "name": "newState",
1552
+ "type": "uint8"
1266
1553
  }
1267
1554
  ],
1268
- "stateMutability": "view",
1269
- "type": "function"
1270
- },
1271
- {
1272
- "inputs": [],
1273
- "name": "linkToRegisteredNftId",
1555
+ "name": "updateApplicationState",
1274
1556
  "outputs": [],
1275
1557
  "stateMutability": "nonpayable",
1276
1558
  "type": "function"
@@ -1279,21 +1561,80 @@
1279
1561
  "inputs": [
1280
1562
  {
1281
1563
  "internalType": "NftId",
1282
- "name": "nftId",
1564
+ "name": "bundleNftId",
1283
1565
  "type": "uint96"
1284
1566
  },
1285
1567
  {
1286
- "internalType": "contract IERC20Metadata",
1287
- "name": "token",
1288
- "type": "address"
1568
+ "components": [
1569
+ {
1570
+ "internalType": "NftId",
1571
+ "name": "poolNftId",
1572
+ "type": "uint96"
1573
+ },
1574
+ {
1575
+ "components": [
1576
+ {
1577
+ "internalType": "UFixed",
1578
+ "name": "fractionalFee",
1579
+ "type": "uint256"
1580
+ },
1581
+ {
1582
+ "internalType": "uint256",
1583
+ "name": "fixedFee",
1584
+ "type": "uint256"
1585
+ }
1586
+ ],
1587
+ "internalType": "struct Fee",
1588
+ "name": "fee",
1589
+ "type": "tuple"
1590
+ },
1591
+ {
1592
+ "internalType": "bytes",
1593
+ "name": "filter",
1594
+ "type": "bytes"
1595
+ },
1596
+ {
1597
+ "internalType": "uint256",
1598
+ "name": "capitalAmount",
1599
+ "type": "uint256"
1600
+ },
1601
+ {
1602
+ "internalType": "uint256",
1603
+ "name": "lockedAmount",
1604
+ "type": "uint256"
1605
+ },
1606
+ {
1607
+ "internalType": "uint256",
1608
+ "name": "balanceAmount",
1609
+ "type": "uint256"
1610
+ },
1611
+ {
1612
+ "internalType": "Seconds",
1613
+ "name": "lifetime",
1614
+ "type": "uint40"
1615
+ },
1616
+ {
1617
+ "internalType": "Timestamp",
1618
+ "name": "expiredAt",
1619
+ "type": "uint40"
1620
+ },
1621
+ {
1622
+ "internalType": "Timestamp",
1623
+ "name": "closedAt",
1624
+ "type": "uint40"
1625
+ }
1626
+ ],
1627
+ "internalType": "struct IBundle.BundleInfo",
1628
+ "name": "bundle",
1629
+ "type": "tuple"
1289
1630
  },
1290
1631
  {
1291
- "internalType": "address",
1292
- "name": "wallet",
1293
- "type": "address"
1632
+ "internalType": "StateId",
1633
+ "name": "newState",
1634
+ "type": "uint8"
1294
1635
  }
1295
1636
  ],
1296
- "name": "registerComponent",
1637
+ "name": "updateBundle",
1297
1638
  "outputs": [],
1298
1639
  "stateMutability": "nonpayable",
1299
1640
  "type": "function"
@@ -1302,28 +1643,16 @@
1302
1643
  "inputs": [
1303
1644
  {
1304
1645
  "internalType": "NftId",
1305
- "name": "nftId",
1646
+ "name": "bundleNftId",
1306
1647
  "type": "uint96"
1307
1648
  },
1308
1649
  {
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"
1650
+ "internalType": "StateId",
1651
+ "name": "newState",
1652
+ "type": "uint8"
1324
1653
  }
1325
1654
  ],
1326
- "name": "registerPool",
1655
+ "name": "updateBundleState",
1327
1656
  "outputs": [],
1328
1657
  "stateMutability": "nonpayable",
1329
1658
  "type": "function"
@@ -1332,24 +1661,19 @@
1332
1661
  "inputs": [
1333
1662
  {
1334
1663
  "internalType": "NftId",
1335
- "name": "productNftId",
1664
+ "name": "distributionNftId",
1336
1665
  "type": "uint96"
1337
1666
  },
1338
1667
  {
1339
1668
  "components": [
1340
1669
  {
1341
1670
  "internalType": "NftId",
1342
- "name": "poolNftId",
1343
- "type": "uint96"
1344
- },
1345
- {
1346
- "internalType": "NftId",
1347
- "name": "distributionNftId",
1671
+ "name": "productNftId",
1348
1672
  "type": "uint96"
1349
1673
  },
1350
1674
  {
1351
- "internalType": "contract IERC20Metadata",
1352
- "name": "token",
1675
+ "internalType": "contract TokenHandler",
1676
+ "name": "tokenHandler",
1353
1677
  "type": "address"
1354
1678
  },
1355
1679
  {
@@ -1366,41 +1690,7 @@
1366
1690
  }
1367
1691
  ],
1368
1692
  "internalType": "struct Fee",
1369
- "name": "productFee",
1370
- "type": "tuple"
1371
- },
1372
- {
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"
1388
- },
1389
- {
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",
1693
+ "name": "minDistributionOwnerFee",
1404
1694
  "type": "tuple"
1405
1695
  },
1406
1696
  {
@@ -1417,50 +1707,31 @@
1417
1707
  }
1418
1708
  ],
1419
1709
  "internalType": "struct Fee",
1420
- "name": "stakingFee",
1710
+ "name": "distributionFee",
1421
1711
  "type": "tuple"
1422
1712
  },
1423
1713
  {
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"
1714
+ "internalType": "address",
1715
+ "name": "wallet",
1716
+ "type": "address"
1439
1717
  },
1440
1718
  {
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"
1719
+ "internalType": "uint256",
1720
+ "name": "sumDistributionOwnerFees",
1721
+ "type": "uint256"
1456
1722
  }
1457
1723
  ],
1458
- "internalType": "struct ITreasury.TreasuryInfo",
1459
- "name": "info",
1724
+ "internalType": "struct ISetup.DistributionSetupInfo",
1725
+ "name": "setup",
1460
1726
  "type": "tuple"
1727
+ },
1728
+ {
1729
+ "internalType": "StateId",
1730
+ "name": "newState",
1731
+ "type": "uint8"
1461
1732
  }
1462
1733
  ],
1463
- "name": "registerProductSetup",
1734
+ "name": "updateDistributionSetup",
1464
1735
  "outputs": [],
1465
1736
  "stateMutability": "nonpayable",
1466
1737
  "type": "function"
@@ -1469,23 +1740,17 @@
1469
1740
  "inputs": [
1470
1741
  {
1471
1742
  "internalType": "NftId",
1472
- "name": "bundleNftId",
1743
+ "name": "distributionNftId",
1473
1744
  "type": "uint96"
1474
1745
  },
1475
1746
  {
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"
1747
+ "internalType": "StateId",
1748
+ "name": "newState",
1749
+ "type": "uint8"
1487
1750
  }
1488
1751
  ],
1752
+ "name": "updateDistributionSetupState",
1753
+ "outputs": [],
1489
1754
  "stateMutability": "nonpayable",
1490
1755
  "type": "function"
1491
1756
  },
@@ -1499,64 +1764,148 @@
1499
1764
  {
1500
1765
  "components": [
1501
1766
  {
1502
- "internalType": "NftId",
1503
- "name": "poolNftId",
1504
- "type": "uint96"
1767
+ "internalType": "DistributorType",
1768
+ "name": "distributorType",
1769
+ "type": "bytes8"
1505
1770
  },
1506
1771
  {
1507
- "components": [
1508
- {
1509
- "internalType": "UFixed",
1510
- "name": "fractionalFee",
1511
- "type": "uint256"
1512
- },
1513
- {
1514
- "internalType": "uint256",
1515
- "name": "fixedFee",
1516
- "type": "uint256"
1517
- }
1518
- ],
1519
- "internalType": "struct Fee",
1520
- "name": "fee",
1521
- "type": "tuple"
1772
+ "internalType": "bool",
1773
+ "name": "active",
1774
+ "type": "bool"
1522
1775
  },
1523
1776
  {
1524
1777
  "internalType": "bytes",
1525
- "name": "filter",
1778
+ "name": "data",
1526
1779
  "type": "bytes"
1527
1780
  },
1528
1781
  {
1529
1782
  "internalType": "uint256",
1530
- "name": "capitalAmount",
1783
+ "name": "sumCommisions",
1531
1784
  "type": "uint256"
1532
1785
  },
1533
1786
  {
1534
1787
  "internalType": "uint256",
1535
- "name": "lockedAmount",
1788
+ "name": "numPoliciesSold",
1536
1789
  "type": "uint256"
1790
+ }
1791
+ ],
1792
+ "internalType": "struct IDistribution.DistributorInfo",
1793
+ "name": "info",
1794
+ "type": "tuple"
1795
+ },
1796
+ {
1797
+ "internalType": "StateId",
1798
+ "name": "newState",
1799
+ "type": "uint8"
1800
+ }
1801
+ ],
1802
+ "name": "updateDistributor",
1803
+ "outputs": [],
1804
+ "stateMutability": "nonpayable",
1805
+ "type": "function"
1806
+ },
1807
+ {
1808
+ "inputs": [
1809
+ {
1810
+ "internalType": "NftId",
1811
+ "name": "nftId",
1812
+ "type": "uint96"
1813
+ },
1814
+ {
1815
+ "internalType": "StateId",
1816
+ "name": "newState",
1817
+ "type": "uint8"
1818
+ }
1819
+ ],
1820
+ "name": "updateDistributorState",
1821
+ "outputs": [],
1822
+ "stateMutability": "nonpayable",
1823
+ "type": "function"
1824
+ },
1825
+ {
1826
+ "inputs": [
1827
+ {
1828
+ "internalType": "Key32",
1829
+ "name": "distributorKey",
1830
+ "type": "bytes32"
1831
+ },
1832
+ {
1833
+ "components": [
1834
+ {
1835
+ "internalType": "string",
1836
+ "name": "name",
1837
+ "type": "string"
1537
1838
  },
1538
1839
  {
1539
- "internalType": "uint256",
1540
- "name": "balanceAmount",
1840
+ "internalType": "UFixed",
1841
+ "name": "minDiscountPercentage",
1541
1842
  "type": "uint256"
1542
1843
  },
1543
1844
  {
1544
- "internalType": "Timestamp",
1545
- "name": "expiredAt",
1546
- "type": "uint40"
1845
+ "internalType": "UFixed",
1846
+ "name": "maxDiscountPercentage",
1847
+ "type": "uint256"
1547
1848
  },
1548
1849
  {
1549
- "internalType": "Timestamp",
1550
- "name": "closedAt",
1551
- "type": "uint40"
1850
+ "internalType": "UFixed",
1851
+ "name": "commissionPercentage",
1852
+ "type": "uint256"
1853
+ },
1854
+ {
1855
+ "internalType": "uint32",
1856
+ "name": "maxReferralCount",
1857
+ "type": "uint32"
1858
+ },
1859
+ {
1860
+ "internalType": "uint32",
1861
+ "name": "maxReferralLifetime",
1862
+ "type": "uint32"
1863
+ },
1864
+ {
1865
+ "internalType": "bool",
1866
+ "name": "allowSelfReferrals",
1867
+ "type": "bool"
1868
+ },
1869
+ {
1870
+ "internalType": "bool",
1871
+ "name": "allowRenewals",
1872
+ "type": "bool"
1873
+ },
1874
+ {
1875
+ "internalType": "bytes",
1876
+ "name": "data",
1877
+ "type": "bytes"
1552
1878
  }
1553
1879
  ],
1554
- "internalType": "struct IBundle.BundleInfo",
1555
- "name": "bundleInfo",
1880
+ "internalType": "struct IDistribution.DistributorTypeInfo",
1881
+ "name": "info",
1556
1882
  "type": "tuple"
1883
+ },
1884
+ {
1885
+ "internalType": "StateId",
1886
+ "name": "newState",
1887
+ "type": "uint8"
1888
+ }
1889
+ ],
1890
+ "name": "updateDistributorType",
1891
+ "outputs": [],
1892
+ "stateMutability": "nonpayable",
1893
+ "type": "function"
1894
+ },
1895
+ {
1896
+ "inputs": [
1897
+ {
1898
+ "internalType": "Key32",
1899
+ "name": "distributorKey",
1900
+ "type": "bytes32"
1901
+ },
1902
+ {
1903
+ "internalType": "StateId",
1904
+ "name": "newState",
1905
+ "type": "uint8"
1557
1906
  }
1558
1907
  ],
1559
- "name": "setBundleInfo",
1908
+ "name": "updateDistributorTypeState",
1560
1909
  "outputs": [],
1561
1910
  "stateMutability": "nonpayable",
1562
1911
  "type": "function"
@@ -1585,11 +1934,6 @@
1585
1934
  "name": "referralId",
1586
1935
  "type": "bytes8"
1587
1936
  },
1588
- {
1589
- "internalType": "address",
1590
- "name": "beneficiary",
1591
- "type": "address"
1592
- },
1593
1937
  {
1594
1938
  "internalType": "RiskId",
1595
1939
  "name": "riskId",
@@ -1611,9 +1955,9 @@
1611
1955
  "type": "uint256"
1612
1956
  },
1613
1957
  {
1614
- "internalType": "uint256",
1958
+ "internalType": "Seconds",
1615
1959
  "name": "lifetime",
1616
- "type": "uint256"
1960
+ "type": "uint40"
1617
1961
  },
1618
1962
  {
1619
1963
  "internalType": "bytes",
@@ -1625,6 +1969,21 @@
1625
1969
  "name": "policyData",
1626
1970
  "type": "bytes"
1627
1971
  },
1972
+ {
1973
+ "internalType": "uint16",
1974
+ "name": "claimsCount",
1975
+ "type": "uint16"
1976
+ },
1977
+ {
1978
+ "internalType": "uint16",
1979
+ "name": "openClaimsCount",
1980
+ "type": "uint16"
1981
+ },
1982
+ {
1983
+ "internalType": "uint256",
1984
+ "name": "payoutAmount",
1985
+ "type": "uint256"
1986
+ },
1628
1987
  {
1629
1988
  "internalType": "Timestamp",
1630
1989
  "name": "activatedAt",
@@ -1642,11 +2001,16 @@
1642
2001
  }
1643
2002
  ],
1644
2003
  "internalType": "struct IPolicy.PolicyInfo",
1645
- "name": "info",
2004
+ "name": "policy",
1646
2005
  "type": "tuple"
2006
+ },
2007
+ {
2008
+ "internalType": "StateId",
2009
+ "name": "newState",
2010
+ "type": "uint8"
1647
2011
  }
1648
2012
  ],
1649
- "name": "setPolicyInfo",
2013
+ "name": "updatePolicy",
1650
2014
  "outputs": [],
1651
2015
  "stateMutability": "nonpayable",
1652
2016
  "type": "function"
@@ -1654,16 +2018,49 @@
1654
2018
  {
1655
2019
  "inputs": [
1656
2020
  {
1657
- "internalType": "RiskId",
1658
- "name": "riskId",
1659
- "type": "bytes8"
2021
+ "internalType": "NftId",
2022
+ "name": "policyNftId",
2023
+ "type": "uint96"
2024
+ },
2025
+ {
2026
+ "internalType": "StateId",
2027
+ "name": "newState",
2028
+ "type": "uint8"
2029
+ }
2030
+ ],
2031
+ "name": "updatePolicyState",
2032
+ "outputs": [],
2033
+ "stateMutability": "nonpayable",
2034
+ "type": "function"
2035
+ },
2036
+ {
2037
+ "inputs": [
2038
+ {
2039
+ "internalType": "NftId",
2040
+ "name": "poolNftId",
2041
+ "type": "uint96"
1660
2042
  },
1661
2043
  {
1662
2044
  "components": [
1663
2045
  {
1664
- "internalType": "NftId",
1665
- "name": "productNftId",
1666
- "type": "uint96"
2046
+ "internalType": "string",
2047
+ "name": "name",
2048
+ "type": "string"
2049
+ },
2050
+ {
2051
+ "internalType": "contract IERC20Metadata",
2052
+ "name": "token",
2053
+ "type": "address"
2054
+ },
2055
+ {
2056
+ "internalType": "contract TokenHandler",
2057
+ "name": "tokenHandler",
2058
+ "type": "address"
2059
+ },
2060
+ {
2061
+ "internalType": "address",
2062
+ "name": "wallet",
2063
+ "type": "address"
1667
2064
  },
1668
2065
  {
1669
2066
  "internalType": "bytes",
@@ -1671,12 +2068,35 @@
1671
2068
  "type": "bytes"
1672
2069
  }
1673
2070
  ],
1674
- "internalType": "struct IRisk.RiskInfo",
2071
+ "internalType": "struct IComponents.ComponentInfo",
1675
2072
  "name": "info",
1676
2073
  "type": "tuple"
2074
+ },
2075
+ {
2076
+ "internalType": "StateId",
2077
+ "name": "newState",
2078
+ "type": "uint8"
2079
+ }
2080
+ ],
2081
+ "name": "updatePoolSetup",
2082
+ "outputs": [],
2083
+ "stateMutability": "nonpayable",
2084
+ "type": "function"
2085
+ },
2086
+ {
2087
+ "inputs": [
2088
+ {
2089
+ "internalType": "NftId",
2090
+ "name": "poolNftId",
2091
+ "type": "uint96"
2092
+ },
2093
+ {
2094
+ "internalType": "StateId",
2095
+ "name": "newState",
2096
+ "type": "uint8"
1677
2097
  }
1678
2098
  ],
1679
- "name": "setRiskInfo",
2099
+ "name": "updatePoolSetupState",
1680
2100
  "outputs": [],
1681
2101
  "stateMutability": "nonpayable",
1682
2102
  "type": "function"
@@ -1691,9 +2111,14 @@
1691
2111
  {
1692
2112
  "components": [
1693
2113
  {
1694
- "internalType": "NftId",
1695
- "name": "poolNftId",
1696
- "type": "uint96"
2114
+ "internalType": "contract IERC20Metadata",
2115
+ "name": "token",
2116
+ "type": "address"
2117
+ },
2118
+ {
2119
+ "internalType": "contract TokenHandler",
2120
+ "name": "tokenHandler",
2121
+ "type": "address"
1697
2122
  },
1698
2123
  {
1699
2124
  "internalType": "NftId",
@@ -1701,9 +2126,9 @@
1701
2126
  "type": "uint96"
1702
2127
  },
1703
2128
  {
1704
- "internalType": "contract IERC20Metadata",
1705
- "name": "token",
1706
- "type": "address"
2129
+ "internalType": "NftId",
2130
+ "name": "poolNftId",
2131
+ "type": "uint96"
1707
2132
  },
1708
2133
  {
1709
2134
  "components": [
@@ -1740,117 +2165,45 @@
1740
2165
  "type": "tuple"
1741
2166
  },
1742
2167
  {
1743
- "components": [
1744
- {
1745
- "internalType": "UFixed",
1746
- "name": "fractionalFee",
1747
- "type": "uint256"
1748
- },
1749
- {
1750
- "internalType": "uint256",
1751
- "name": "fixedFee",
1752
- "type": "uint256"
1753
- }
1754
- ],
1755
- "internalType": "struct Fee",
1756
- "name": "poolFee",
1757
- "type": "tuple"
1758
- },
1759
- {
1760
- "components": [
1761
- {
1762
- "internalType": "UFixed",
1763
- "name": "fractionalFee",
1764
- "type": "uint256"
1765
- },
1766
- {
1767
- "internalType": "uint256",
1768
- "name": "fixedFee",
1769
- "type": "uint256"
1770
- }
1771
- ],
1772
- "internalType": "struct Fee",
1773
- "name": "stakingFee",
1774
- "type": "tuple"
1775
- },
1776
- {
1777
- "components": [
1778
- {
1779
- "internalType": "UFixed",
1780
- "name": "fractionalFee",
1781
- "type": "uint256"
1782
- },
1783
- {
1784
- "internalType": "uint256",
1785
- "name": "fixedFee",
1786
- "type": "uint256"
1787
- }
1788
- ],
1789
- "internalType": "struct Fee",
1790
- "name": "performanceFee",
1791
- "type": "tuple"
2168
+ "internalType": "bool",
2169
+ "name": "isIntercepting",
2170
+ "type": "bool"
1792
2171
  },
1793
2172
  {
1794
- "components": [
1795
- {
1796
- "internalType": "UFixed",
1797
- "name": "fractionalFee",
1798
- "type": "uint256"
1799
- },
1800
- {
1801
- "internalType": "uint256",
1802
- "name": "fixedFee",
1803
- "type": "uint256"
1804
- }
1805
- ],
1806
- "internalType": "struct Fee",
1807
- "name": "distributionFee",
1808
- "type": "tuple"
2173
+ "internalType": "address",
2174
+ "name": "wallet",
2175
+ "type": "address"
1809
2176
  }
1810
2177
  ],
1811
- "internalType": "struct ITreasury.TreasuryInfo",
1812
- "name": "info",
2178
+ "internalType": "struct ISetup.ProductSetupInfo",
2179
+ "name": "setup",
1813
2180
  "type": "tuple"
2181
+ },
2182
+ {
2183
+ "internalType": "StateId",
2184
+ "name": "newState",
2185
+ "type": "uint8"
1814
2186
  }
1815
2187
  ],
1816
- "name": "setTreasuryInfo",
2188
+ "name": "updateProductSetup",
1817
2189
  "outputs": [],
1818
2190
  "stateMutability": "nonpayable",
1819
2191
  "type": "function"
1820
2192
  },
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
2193
  {
1841
2194
  "inputs": [
1842
2195
  {
1843
2196
  "internalType": "NftId",
1844
- "name": "nftId",
2197
+ "name": "productNftId",
1845
2198
  "type": "uint96"
1846
2199
  },
1847
2200
  {
1848
2201
  "internalType": "StateId",
1849
- "name": "state",
2202
+ "name": "newState",
1850
2203
  "type": "uint8"
1851
2204
  }
1852
2205
  ],
1853
- "name": "updateBundleState",
2206
+ "name": "updateProductSetupState",
1854
2207
  "outputs": [],
1855
2208
  "stateMutability": "nonpayable",
1856
2209
  "type": "function"
@@ -1858,17 +2211,59 @@
1858
2211
  {
1859
2212
  "inputs": [
1860
2213
  {
1861
- "internalType": "NftId",
1862
- "name": "nftId",
1863
- "type": "uint96"
2214
+ "internalType": "Key32",
2215
+ "name": "referralKey",
2216
+ "type": "bytes32"
2217
+ },
2218
+ {
2219
+ "components": [
2220
+ {
2221
+ "internalType": "NftId",
2222
+ "name": "distributorNftId",
2223
+ "type": "uint96"
2224
+ },
2225
+ {
2226
+ "internalType": "string",
2227
+ "name": "referralCode",
2228
+ "type": "string"
2229
+ },
2230
+ {
2231
+ "internalType": "UFixed",
2232
+ "name": "discountPercentage",
2233
+ "type": "uint256"
2234
+ },
2235
+ {
2236
+ "internalType": "uint32",
2237
+ "name": "maxReferrals",
2238
+ "type": "uint32"
2239
+ },
2240
+ {
2241
+ "internalType": "uint32",
2242
+ "name": "usedReferrals",
2243
+ "type": "uint32"
2244
+ },
2245
+ {
2246
+ "internalType": "Timestamp",
2247
+ "name": "expiryAt",
2248
+ "type": "uint40"
2249
+ },
2250
+ {
2251
+ "internalType": "bytes",
2252
+ "name": "data",
2253
+ "type": "bytes"
2254
+ }
2255
+ ],
2256
+ "internalType": "struct IDistribution.ReferralInfo",
2257
+ "name": "referralInfo",
2258
+ "type": "tuple"
1864
2259
  },
1865
2260
  {
1866
2261
  "internalType": "StateId",
1867
- "name": "state",
2262
+ "name": "newState",
1868
2263
  "type": "uint8"
1869
2264
  }
1870
2265
  ],
1871
- "name": "updatePolicyState",
2266
+ "name": "updateReferral",
1872
2267
  "outputs": [],
1873
2268
  "stateMutability": "nonpayable",
1874
2269
  "type": "function"
@@ -1876,17 +2271,17 @@
1876
2271
  {
1877
2272
  "inputs": [
1878
2273
  {
1879
- "internalType": "RiskId",
1880
- "name": "riskId",
1881
- "type": "bytes8"
2274
+ "internalType": "Key32",
2275
+ "name": "referralKey",
2276
+ "type": "bytes32"
1882
2277
  },
1883
2278
  {
1884
2279
  "internalType": "StateId",
1885
- "name": "state",
2280
+ "name": "newState",
1886
2281
  "type": "uint8"
1887
2282
  }
1888
2283
  ],
1889
- "name": "updateRiskState",
2284
+ "name": "updateReferralState",
1890
2285
  "outputs": [],
1891
2286
  "stateMutability": "nonpayable",
1892
2287
  "type": "function"
@@ -1894,17 +2289,34 @@
1894
2289
  {
1895
2290
  "inputs": [
1896
2291
  {
1897
- "internalType": "Key32",
1898
- "name": "key",
1899
- "type": "bytes32"
2292
+ "internalType": "RiskId",
2293
+ "name": "riskId",
2294
+ "type": "bytes8"
2295
+ },
2296
+ {
2297
+ "components": [
2298
+ {
2299
+ "internalType": "NftId",
2300
+ "name": "productNftId",
2301
+ "type": "uint96"
2302
+ },
2303
+ {
2304
+ "internalType": "bytes",
2305
+ "name": "data",
2306
+ "type": "bytes"
2307
+ }
2308
+ ],
2309
+ "internalType": "struct IRisk.RiskInfo",
2310
+ "name": "risk",
2311
+ "type": "tuple"
1900
2312
  },
1901
2313
  {
1902
2314
  "internalType": "StateId",
1903
- "name": "state",
2315
+ "name": "newState",
1904
2316
  "type": "uint8"
1905
2317
  }
1906
2318
  ],
1907
- "name": "updateState",
2319
+ "name": "updateRisk",
1908
2320
  "outputs": [],
1909
2321
  "stateMutability": "nonpayable",
1910
2322
  "type": "function"
@@ -1912,22 +2324,17 @@
1912
2324
  {
1913
2325
  "inputs": [
1914
2326
  {
1915
- "internalType": "address",
1916
- "name": "implementation",
1917
- "type": "address"
1918
- },
1919
- {
1920
- "internalType": "address",
1921
- "name": "activatedBy",
1922
- "type": "address"
2327
+ "internalType": "RiskId",
2328
+ "name": "riskId",
2329
+ "type": "bytes8"
1923
2330
  },
1924
2331
  {
1925
- "internalType": "bytes",
1926
- "name": "upgradeData",
1927
- "type": "bytes"
2332
+ "internalType": "StateId",
2333
+ "name": "newState",
2334
+ "type": "uint8"
1928
2335
  }
1929
2336
  ],
1930
- "name": "upgrade",
2337
+ "name": "updateRiskState",
1931
2338
  "outputs": [],
1932
2339
  "stateMutability": "nonpayable",
1933
2340
  "type": "function"