@etherisc/gif-next 0.0.2-ce2fc91-485 → 0.0.2-ce87da3-250

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