@etherisc/gif-next 0.0.2-da77c50-824 → 0.0.2-dc95063-418

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