@etherisc/gif-next 0.0.2-d96b9e1-825 → 0.0.2-da0f894-204

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