@etherisc/gif-next 0.0.2-e9148e0-933 → 0.0.2-e94f4c7-084

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