@etherisc/gif-next 0.0.2-f9bc4c7-556 → 0.0.2-faaba97-954

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