@etherisc/gif-next 0.0.2-c576a00-897 → 0.0.2-c5c9395-682

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