@etherisc/gif-next 0.0.2-8eb96a8-113 → 0.0.2-8f5f625-515

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